figma-kit 1.0.0-beta.11 → 1.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +70 -56
- package/dist/index.d.ts +0 -10
- package/dist/index.mjs +3389 -9635
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,64 +1,78 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),i=require("react"),ct=require("react-dom");function Fa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=Fa(i),Io=Fa(ct);function H(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function $d(e,t){const n=h.createContext(t);function o(a){const{children:s,...c}=a,l=h.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:s})}function r(a){const s=h.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}function be(e,t=[]){let n=[];function o(a,s){const c=h.createContext(s),l=n.length;n=[...n,s];function u(f){const{scope:g,children:b,...v}=f,m=(g==null?void 0:g[e][l])||c,x=h.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:x,children:b})}function d(f,g){const b=(g==null?void 0:g[e][l])||c,v=h.useContext(b);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const r=()=>{const a=n.map(s=>h.createContext(s));return function(c){const l=(c==null?void 0:c[e])||a;return h.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,wd(r,...t)]}function wd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...c,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Cd(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ba(...e){return t=>e.forEach(n=>Cd(n,t))}function ee(...e){return h.useCallback(Ba(...e),e)}var He=h.forwardRef((e,t)=>{const{children:n,...o}=e,r=h.Children.toArray(n),a=r.find(yd);if(a){const s=a.props.children,c=r.map(l=>l===a?h.Children.count(s)>1?h.Children.only(null):h.isValidElement(s)?s.props.children:null:l);return p.jsx(po,{...o,ref:t,children:h.isValidElement(s)?h.cloneElement(s,void 0,c):null})}return p.jsx(po,{...o,ref:t,children:n})});He.displayName="Slot";var po=h.forwardRef((e,t)=>{const{children:n,...o}=e;if(h.isValidElement(n)){const r=Sd(n);return h.cloneElement(n,{...Ed(o,n.props),ref:t?Ba(t,r):r})}return h.Children.count(n)>1?h.Children.only(null):null});po.displayName="SlotClone";var Va=({children:e})=>p.jsx(p.Fragment,{children:e});function yd(e){return h.isValidElement(e)&&e.type===Va}function Ed(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{a(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Sd(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ha(e){const t=e+"CollectionProvider",[n,o]=be(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=b=>{const{scope:v,children:m}=b,x=i.useRef(null),$=i.useRef(new Map).current;return p.jsx(r,{scope:v,itemMap:$,collectionRef:x,children:m})};s.displayName=t;const c=e+"CollectionSlot",l=i.forwardRef((b,v)=>{const{scope:m,children:x}=b,$=a(c,m),w=ee(v,$.collectionRef);return p.jsx(He,{ref:w,children:x})});l.displayName=c;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=i.forwardRef((b,v)=>{const{scope:m,children:x,...$}=b,w=i.useRef(null),C=ee(v,w),E=a(u,m);return i.useEffect(()=>(E.itemMap.set(w,{ref:w,...$}),()=>void E.itemMap.delete(w))),p.jsx(He,{[d]:"",ref:C,children:x})});f.displayName=u;function g(b){const v=a(e+"CollectionConsumer",b);return i.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const $=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,y)=>$.indexOf(E.ref.current)-$.indexOf(y.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},g,o]}var ze=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Rd=h.useId||(()=>{}),Pd=0;function rt(e){const[t,n]=h.useState(Rd());return ze(()=>{e||n(o=>o??String(Pd++))},[e]),e||(t?`radix-${t}`:"")}var _d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],z=_d.reduce((e,t)=>{const n=h.forwardRef((o,r)=>{const{asChild:a,...s}=o,c=a?He:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...s,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Td(e,t){e&&Io.flushSync(()=>e.dispatchEvent(t))}function Te(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Re({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Nd({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,c=Te(n),l=h.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[s,l]}function Nd({defaultProp:e,onChange:t}){const n=h.useState(e),[o]=n,r=h.useRef(o),a=Te(t);return h.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}var Md=h.createContext(void 0);function Wt(e){const t=h.useContext(Md);return e||t||"ltr"}var qn="rovingFocusGroup.onEntryFocus",Ad={bubbles:!1,cancelable:!0},yn="RovingFocusGroup",[mo,za,Id]=Ha(yn),[Od,St]=be(yn,[Id]),[Dd,kd]=Od(yn),Wa=h.forwardRef((e,t)=>p.jsx(mo.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(mo.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(jd,{...e,ref:t})})}));Wa.displayName=yn;var jd=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,g=h.useRef(null),b=ee(t,g),v=Wt(a),[m=null,x]=Re({prop:s,defaultProp:c,onChange:l}),[$,w]=h.useState(!1),C=Te(u),E=za(n),y=h.useRef(!1),[_,S]=h.useState(0);return h.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(qn,C),()=>P.removeEventListener(qn,C)},[C]),p.jsx(Dd,{scope:n,orientation:o,dir:v,loop:r,currentTabStopId:m,onItemFocus:h.useCallback(P=>x(P),[x]),onItemShiftTab:h.useCallback(()=>w(!0),[]),onFocusableItemAdd:h.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:h.useCallback(()=>S(P=>P-1),[]),children:p.jsx(z.div,{tabIndex:$||_===0?-1:0,"data-orientation":o,...f,ref:b,style:{outline:"none",...e.style},onMouseDown:H(e.onMouseDown,()=>{y.current=!0}),onFocus:H(e.onFocus,P=>{const I=!y.current;if(P.target===P.currentTarget&&I&&!$){const N=new CustomEvent(qn,Ad);if(P.currentTarget.dispatchEvent(N),!N.defaultPrevented){const D=E().filter(B=>B.focusable),k=D.find(B=>B.active),V=D.find(B=>B.id===m),O=[k,V,...D].filter(Boolean).map(B=>B.ref.current);Ka(O,d)}}y.current=!1}),onBlur:H(e.onBlur,()=>w(!1))})})}),Ga="RovingFocusGroupItem",Ua=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...s}=e,c=rt(),l=a||c,u=kd(Ga,n),d=u.currentTabStopId===l,f=za(n),{onFocusableItemAdd:g,onFocusableItemRemove:b}=u;return h.useEffect(()=>{if(o)return g(),()=>b()},[o,g,b]),p.jsx(mo.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(z.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:H(e.onMouseDown,v=>{o?u.onItemFocus(l):v.preventDefault()}),onFocus:H(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:H(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=Bd(v,u.orientation,u.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let $=f().filter(w=>w.focusable).map(w=>w.ref.current);if(m==="last")$.reverse();else if(m==="prev"||m==="next"){m==="prev"&&$.reverse();const w=$.indexOf(v.currentTarget);$=u.loop?Vd($,w+1):$.slice(w+1)}setTimeout(()=>Ka($))}})})})});Ua.displayName=Ga;var Ld={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bd(e,t,n){const o=Fd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Ld[o]}function Ka(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Vd(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Oo=Wa,Do=Ua;function Hd(e,t){return h.useReducer((n,o)=>t[n][o]??n,e)}var Ie=e=>{const{present:t,children:n}=e,o=zd(t),r=typeof n=="function"?n({present:o.isPresent}):h.Children.only(n),a=ee(o.ref,Wd(r));return typeof n=="function"||o.isPresent?h.cloneElement(r,{ref:a}):null};Ie.displayName="Presence";function zd(e){const[t,n]=h.useState(),o=h.useRef({}),r=h.useRef(e),a=h.useRef("none"),s=e?"mounted":"unmounted",[c,l]=Hd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=Zt(o.current);a.current=c==="mounted"?u:"none"},[c]),ze(()=>{const u=o.current,d=r.current;if(d!==e){const g=a.current,b=Zt(u);e?l("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&g!==b?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),ze(()=>{if(t){const u=f=>{const b=Zt(o.current).includes(f.animationName);f.target===t&&b&&Io.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(a.current=Zt(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:h.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Zt(e){return(e==null?void 0:e.animationName)||"none"}function Wd(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ko="Tabs",[Gd,Sw]=be(ko,[St]),Ya=St(),[Ud,jo]=Gd(ko),Xa=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:a,orientation:s="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=Wt(c),[f,g]=Re({prop:o,onChange:r,defaultProp:a});return p.jsx(Ud,{scope:n,baseId:rt(),value:f,onValueChange:g,orientation:s,dir:d,activationMode:l,children:p.jsx(z.div,{dir:d,"data-orientation":s,...u,ref:t})})});Xa.displayName=ko;var qa="TabsList",Za=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,a=jo(qa,n),s=Ya(n);return p.jsx(Oo,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:p.jsx(z.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});Za.displayName=qa;var Qa="TabsTrigger",Ja=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...a}=e,s=jo(Qa,n),c=Ya(n),l=ns(s.baseId,o),u=os(s.baseId,o),d=o===s.value;return p.jsx(Do,{asChild:!0,...c,focusable:!r,active:d,children:p.jsx(z.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:H(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?s.onValueChange(o):f.preventDefault()}),onKeyDown:H(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(o)}),onFocus:H(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!r&&f&&s.onValueChange(o)})})})});Ja.displayName=Qa;var es="TabsContent",ts=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:a,...s}=e,c=jo(es,n),l=ns(c.baseId,o),u=os(c.baseId,o),d=o===c.value,f=h.useRef(d);return h.useEffect(()=>{const g=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(g)},[]),p.jsx(Ie,{present:r||d,children:({present:g})=>p.jsx(z.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!g,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:g&&a})})});ts.displayName=es;function ns(e,t){return`${e}-trigger-${t}`}function os(e,t){return`${e}-content-${t}`}var Kd=Xa,Yd=Za,Xd=Ja,qd=ts;function rs(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=rs(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Zd(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=rs(e))&&(o&&(o+=" "),o+=t);return o}const Wr=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,T=Zd,Xe=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return T(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,s=Object.keys(r).map(u=>{const d=n==null?void 0:n[u],f=a==null?void 0:a[u];if(d===null)return null;const g=Wr(d)||Wr(f);return r[u][g]}),c=n&&Object.entries(n).reduce((u,d)=>{let[f,g]=d;return g===void 0||(u[f]=g),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,d)=>{let{class:f,className:g,...b}=d;return Object.entries(b).every(v=>{let[m,x]=v;return Array.isArray(x)?x.includes({...a,...c}[m]):{...a,...c}[m]===x})?[...u,f,g]:u},[]);return T(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fo=require("@radix-ui/react-tabs"),_=require("class-variance-authority"),po=require("@radix-ui/react-toggle-group"),Cn=require("@radix-ui/react-slot"),mo=require("@radix-ui/react-radio-group"),go=require("@radix-ui/react-select"),ho=require("@radix-ui/react-dropdown-menu"),vo=require("@radix-ui/react-context-menu"),yo=require("@radix-ui/react-popover"),bo=require("@radix-ui/react-tooltip"),xo=require("@radix-ui/react-dialog"),Ro=require("@radix-ui/react-alert-dialog"),J=require("remeda"),Co=require("@emmetio/math-expression"),_n=require("merge-props"),_o=require("@radix-ui/react-slider"),wo=require("@radix-ui/react-collapsible"),So=require("react-textarea-autosize"),jo=require("@radix-ui/react-switch");function je(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const Yr=je(fo),wn=je(po),Sn=je(mo),ye=je(go),pe=je(ho),me=je(vo),lr=je(yo),cr=je(bo),er=je(xo),Me=je(Ro),wt=je(_o),Nt=je(wo),gn=je(jo);function Eo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jt={exports:{}},vr={},Et={exports:{}},I={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var hn;function To(){if(hn)return I;hn=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),C=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),P=Symbol.iterator;function G(u){return u===null||typeof u!="object"?null:(u=P&&u[P]||u["@@iterator"],typeof u=="function"?u:null)}var Y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,Q={};function re(u,h,$){this.props=u,this.context=h,this.refs=Q,this.updater=$||Y}re.prototype.isReactComponent={},re.prototype.setState=function(u,h){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,h,"setState")},re.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function ae(){}ae.prototype=re.prototype;function z(u,h,$){this.props=u,this.context=h,this.refs=Q,this.updater=$||Y}var Re=z.prototype=new ae;Re.constructor=z,k(Re,re.prototype),Re.isPureReactComponent=!0;var ce=Array.isArray,S=Object.prototype.hasOwnProperty,U={current:null},xe={key:!0,ref:!0,__self:!0,__source:!0};function Se(u,h,$){var D,F={},X=null,q=null;if(h!=null)for(D in h.ref!==void 0&&(q=h.ref),h.key!==void 0&&(X=""+h.key),h)S.call(h,D)&&!xe.hasOwnProperty(D)&&(F[D]=h[D]);var H=arguments.length-2;if(H===1)F.children=$;else if(1<H){for(var B=Array(H),se=0;se<H;se++)B[se]=arguments[se+2];F.children=B}if(u&&u.defaultProps)for(D in H=u.defaultProps,H)F[D]===void 0&&(F[D]=H[D]);return{$$typeof:t,type:u,key:X,ref:q,props:F,_owner:U.current}}function Ee(u,h){return{$$typeof:t,type:u.type,key:h,ref:u.ref,props:u.props,_owner:u._owner}}function ge(u){return typeof u=="object"&&u!==null&&u.$$typeof===t}function Ce(u){var h={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function($){return h[$]})}var Te=/\/+/g;function le(u,h){return typeof u=="object"&&u!==null&&u.key!=null?Ce(""+u.key):h.toString(36)}function he(u,h,$,D,F){var X=typeof u;(X==="undefined"||X==="boolean")&&(u=null);var q=!1;if(u===null)q=!0;else switch(X){case"string":case"number":q=!0;break;case"object":switch(u.$$typeof){case t:case r:q=!0}}if(q)return q=u,F=F(q),u=D===""?"."+le(q,0):D,ce(F)?($="",u!=null&&($=u.replace(Te,"$&/")+"/"),he(F,h,$,"",function(se){return se})):F!=null&&(ge(F)&&(F=Ee(F,$+(!F.key||q&&q.key===F.key?"":(""+F.key).replace(Te,"$&/")+"/")+u)),h.push(F)),1;if(q=0,D=D===""?".":D+":",ce(u))for(var H=0;H<u.length;H++){X=u[H];var B=D+le(X,H);q+=he(X,h,$,B,F)}else if(B=G(u),typeof B=="function")for(u=B.call(u),H=0;!(X=u.next()).done;)X=X.value,B=D+le(X,H++),q+=he(X,h,$,B,F);else if(X==="object")throw h=String(u),Error("Objects are not valid as a React child (found: "+(h==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":h)+"). If you meant to render a collection of children, use an array instead.");return q}function ue(u,h,$){if(u==null)return u;var D=[],F=0;return he(u,D,"","",function(X){return h.call($,X,F++)}),D}function Pe(u){if(u._status===-1){var h=u._result;h=h(),h.then(function($){(u._status===0||u._status===-1)&&(u._status=1,u._result=$)},function($){(u._status===0||u._status===-1)&&(u._status=2,u._result=$)}),u._status===-1&&(u._status=0,u._result=h)}if(u._status===1)return u._result.default;throw u._result}var j={current:null},Ne={transition:null},He={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:Ne,ReactCurrentOwner:U};function Oe(){throw Error("act(...) is not supported in production builds of React.")}return I.Children={map:ue,forEach:function(u,h,$){ue(u,function(){h.apply(this,arguments)},$)},count:function(u){var h=0;return ue(u,function(){h++}),h},toArray:function(u){return ue(u,function(h){return h})||[]},only:function(u){if(!ge(u))throw Error("React.Children.only expected to receive a single React element child.");return u}},I.Component=re,I.Fragment=n,I.Profiler=o,I.PureComponent=z,I.StrictMode=a,I.Suspense=x,I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=He,I.act=Oe,I.cloneElement=function(u,h,$){if(u==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+u+".");var D=k({},u.props),F=u.key,X=u.ref,q=u._owner;if(h!=null){if(h.ref!==void 0&&(X=h.ref,q=U.current),h.key!==void 0&&(F=""+h.key),u.type&&u.type.defaultProps)var H=u.type.defaultProps;for(B in h)S.call(h,B)&&!xe.hasOwnProperty(B)&&(D[B]=h[B]===void 0&&H!==void 0?H[B]:h[B])}var B=arguments.length-2;if(B===1)D.children=$;else if(1<B){H=Array(B);for(var se=0;se<B;se++)H[se]=arguments[se+2];D.children=H}return{$$typeof:t,type:u.type,key:F,ref:X,props:D,_owner:q}},I.createContext=function(u){return u={$$typeof:p,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},u.Provider={$$typeof:l,_context:u},u.Consumer=u},I.createElement=Se,I.createFactory=function(u){var h=Se.bind(null,u);return h.type=u,h},I.createRef=function(){return{current:null}},I.forwardRef=function(u){return{$$typeof:g,render:u}},I.isValidElement=ge,I.lazy=function(u){return{$$typeof:R,_payload:{_status:-1,_result:u},_init:Pe}},I.memo=function(u,h){return{$$typeof:C,type:u,compare:h===void 0?null:h}},I.startTransition=function(u){var h=Ne.transition;Ne.transition={};try{u()}finally{Ne.transition=h}},I.unstable_act=Oe,I.useCallback=function(u,h){return j.current.useCallback(u,h)},I.useContext=function(u){return j.current.useContext(u)},I.useDebugValue=function(){},I.useDeferredValue=function(u){return j.current.useDeferredValue(u)},I.useEffect=function(u,h){return j.current.useEffect(u,h)},I.useId=function(){return j.current.useId()},I.useImperativeHandle=function(u,h,$){return j.current.useImperativeHandle(u,h,$)},I.useInsertionEffect=function(u,h){return j.current.useInsertionEffect(u,h)},I.useLayoutEffect=function(u,h){return j.current.useLayoutEffect(u,h)},I.useMemo=function(u,h){return j.current.useMemo(u,h)},I.useReducer=function(u,h,$){return j.current.useReducer(u,h,$)},I.useRef=function(u){return j.current.useRef(u)},I.useState=function(u){return j.current.useState(u)},I.useSyncExternalStore=function(u,h,$){return j.current.useSyncExternalStore(u,h,$)},I.useTransition=function(){return j.current.useTransition()},I.version="18.3.1",I}var br={exports:{}};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/br.exports;var vn;function Po(){return vn||(vn=1,function(t,r){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",a=Symbol.for("react.element"),o=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),C=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),re=Symbol.iterator,ae="@@iterator";function z(e){if(e===null||typeof e!="object")return null;var s=re&&e[re]||e[ae];return typeof s=="function"?s:null}var Re={current:null},ce={transition:null},S={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},U={current:null},xe={},Se=null;function Ee(e){Se=e}xe.setExtraStackFrame=function(e){Se=e},xe.getCurrentStack=null,xe.getStackAddendum=function(){var e="";Se&&(e+=Se);var s=xe.getCurrentStack;return s&&(e+=s()||""),e};var ge=!1,Ce=!1,Te=!1,le=!1,he=!1,ue={ReactCurrentDispatcher:Re,ReactCurrentBatchConfig:ce,ReactCurrentOwner:U};ue.ReactDebugCurrentFrame=xe,ue.ReactCurrentActQueue=S;function Pe(e){{for(var s=arguments.length,f=new Array(s>1?s-1:0),d=1;d<s;d++)f[d-1]=arguments[d];Ne("warn",e,f)}}function j(e){{for(var s=arguments.length,f=new Array(s>1?s-1:0),d=1;d<s;d++)f[d-1]=arguments[d];Ne("error",e,f)}}function Ne(e,s,f){{var d=ue.ReactDebugCurrentFrame,b=d.getStackAddendum();b!==""&&(s+="%s",f=f.concat([b]));var E=f.map(function(w){return String(w)});E.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,E)}}var He={};function Oe(e,s){{var f=e.constructor,d=f&&(f.displayName||f.name)||"ReactClass",b=d+"."+s;if(He[b])return;j("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",s,d),He[b]=!0}}var u={isMounted:function(e){return!1},enqueueForceUpdate:function(e,s,f){Oe(e,"forceUpdate")},enqueueReplaceState:function(e,s,f,d){Oe(e,"replaceState")},enqueueSetState:function(e,s,f,d){Oe(e,"setState")}},h=Object.assign,$={};Object.freeze($);function D(e,s,f){this.props=e,this.context=s,this.refs=$,this.updater=f||u}D.prototype.isReactComponent={},D.prototype.setState=function(e,s){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,s,"setState")},D.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};{var F={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},X=function(e,s){Object.defineProperty(D.prototype,e,{get:function(){Pe("%s(...) is deprecated in plain JavaScript React classes. %s",s[0],s[1])}})};for(var q in F)F.hasOwnProperty(q)&&X(q,F[q])}function H(){}H.prototype=D.prototype;function B(e,s,f){this.props=e,this.context=s,this.refs=$,this.updater=f||u}var se=B.prototype=new H;se.constructor=B,h(se,D.prototype),se.isPureReactComponent=!0;function rt(){var e={current:null};return Object.seal(e),e}var _r=Array.isArray;function rr(e){return _r(e)}function tt(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,f=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return f}}function tr(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function Ye(e){if(tr(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tt(e)),Ae(e)}function wr(e,s,f){var d=e.displayName;if(d)return d;var b=s.displayName||s.name||"";return b!==""?f+"("+b+")":f}function qe(e){return e.displayName||"Context"}function ke(e){if(e==null)return null;if(typeof e.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case o:return"Portal";case g:return"Profiler";case p:return"StrictMode";case P:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var s=e;return qe(s)+".Consumer";case x:var f=e;return qe(f._context)+".Provider";case R:return wr(e,e.render,"ForwardRef");case Y:var d=e.displayName||null;return d!==null?d:ke(e.type)||"Memo";case k:{var b=e,E=b._payload,w=b._init;try{return ke(w(E))}catch{return null}}}return null}var Ke=Object.prototype.hasOwnProperty,nr={key:!0,ref:!0,__self:!0,__source:!0},Sr,jr,ar;ar={};function dr(e){if(Ke.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function Fe(e){if(Ke.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function nt(e,s){var f=function(){Sr||(Sr=!0,j("%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://reactjs.org/link/special-props)",s))};f.isReactWarning=!0,Object.defineProperty(e,"key",{get:f,configurable:!0})}function Er(e,s){var f=function(){jr||(jr=!0,j("%s: `ref` 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://reactjs.org/link/special-props)",s))};f.isReactWarning=!0,Object.defineProperty(e,"ref",{get:f,configurable:!0})}function Tr(e){if(typeof e.ref=="string"&&U.current&&e.__self&&U.current.stateNode!==e.__self){var s=ke(U.current.type);ar[s]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',s,e.ref),ar[s]=!0)}}var Xe=function(e,s,f,d,b,E,w){var N={$$typeof:a,type:e,key:s,ref:f,props:w,_owner:E};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function at(e,s,f){var d,b={},E=null,w=null,N=null,A=null;if(s!=null){dr(s)&&(w=s.ref,Tr(s)),Fe(s)&&(Ye(s.key),E=""+s.key),N=s.__self===void 0?null:s.__self,A=s.__source===void 0?null:s.__source;for(d in s)Ke.call(s,d)&&!nr.hasOwnProperty(d)&&(b[d]=s[d])}var K=arguments.length-2;if(K===1)b.children=f;else if(K>1){for(var Z=Array(K),ee=0;ee<K;ee++)Z[ee]=arguments[ee+2];Object.freeze&&Object.freeze(Z),b.children=Z}if(e&&e.defaultProps){var ne=e.defaultProps;for(d in ne)b[d]===void 0&&(b[d]=ne[d])}if(E||w){var ie=typeof e=="function"?e.displayName||e.name||"Unknown":e;E&&nt(b,ie),w&&Er(b,ie)}return Xe(e,E,w,N,A,U.current,b)}function ot(e,s){var f=Xe(e.type,s,e.ref,e._self,e._source,e._owner,e.props);return f}function st(e,s,f){if(e==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var d,b=h({},e.props),E=e.key,w=e.ref,N=e._self,A=e._source,K=e._owner;if(s!=null){dr(s)&&(w=s.ref,K=U.current),Fe(s)&&(Ye(s.key),E=""+s.key);var Z;e.type&&e.type.defaultProps&&(Z=e.type.defaultProps);for(d in s)Ke.call(s,d)&&!nr.hasOwnProperty(d)&&(s[d]===void 0&&Z!==void 0?b[d]=Z[d]:b[d]=s[d])}var ee=arguments.length-2;if(ee===1)b.children=f;else if(ee>1){for(var ne=Array(ee),ie=0;ie<ee;ie++)ne[ie]=arguments[ie+2];b.children=ne}return Xe(e.type,E,w,N,A,K,b)}function Le(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}var Pr=".",it=":";function ct(e){var s=/[=:]/g,f={"=":"=0",":":"=2"},d=e.replace(s,function(b){return f[b]});return"$"+d}var or=!1,Nr=/\/+/g;function Ie(e){return e.replace(Nr,"$&/")}function Je(e,s){return typeof e=="object"&&e!==null&&e.key!=null?(Ye(e.key),ct(""+e.key)):s.toString(36)}function Ve(e,s,f,d,b){var E=typeof e;(E==="undefined"||E==="boolean")&&(e=null);var w=!1;if(e===null)w=!0;else switch(E){case"string":case"number":w=!0;break;case"object":switch(e.$$typeof){case a:case o:w=!0}}if(w){var N=e,A=b(N),K=d===""?Pr+Je(N,0):d;if(rr(A)){var Z="";K!=null&&(Z=Ie(K)+"/"),Ve(A,s,Z,"",function(uo){return uo})}else A!=null&&(Le(A)&&(A.key&&(!N||N.key!==A.key)&&Ye(A.key),A=ot(A,f+(A.key&&(!N||N.key!==A.key)?Ie(""+A.key)+"/":"")+K)),s.push(A));return 1}var ee,ne,ie=0,de=d===""?Pr:d+it;if(rr(e))for(var Ur=0;Ur<e.length;Ur++)ee=e[Ur],ne=de+Je(ee,Ur),ie+=Ve(ee,s,f,ne,b);else{var _t=z(e);if(typeof _t=="function"){var dn=e;_t===dn.entries&&(or||Pe("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),or=!0);for(var co=_t.call(dn),pn,lo=0;!(pn=co.next()).done;)ee=pn.value,ne=de+Je(ee,lo++),ie+=Ve(ee,s,f,ne,b)}else if(E==="object"){var mn=String(e);throw new Error("Objects are not valid as a React child (found: "+(mn==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":mn)+"). If you meant to render a collection of children, use an array instead.")}}return ie}function Qe(e,s,f){if(e==null)return e;var d=[],b=0;return Ve(e,d,"","",function(E){return s.call(f,E,b++)}),d}function lt(e){var s=0;return Qe(e,function(){s++}),s}function kr(e,s,f){Qe(e,function(){s.apply(this,arguments)},f)}function ut(e){return Qe(e,function(s){return s})||[]}function Or(e){if(!Le(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}function Ir(e){var s={$$typeof:C,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};s.Provider={$$typeof:x,_context:s};var f=!1,d=!1,b=!1;{var E={$$typeof:C,_context:s};Object.defineProperties(E,{Provider:{get:function(){return d||(d=!0,j("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),s.Provider},set:function(w){s.Provider=w}},_currentValue:{get:function(){return s._currentValue},set:function(w){s._currentValue=w}},_currentValue2:{get:function(){return s._currentValue2},set:function(w){s._currentValue2=w}},_threadCount:{get:function(){return s._threadCount},set:function(w){s._threadCount=w}},Consumer:{get:function(){return f||(f=!0,j("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),s.Consumer}},displayName:{get:function(){return s.displayName},set:function(w){b||(Pe("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",w),b=!0)}}}),s.Consumer=E}return s._currentRenderer=null,s._currentRenderer2=null,s}var Ze=-1,pr=0,mr=1,$r=2;function ft(e){if(e._status===Ze){var s=e._result,f=s();if(f.then(function(E){if(e._status===pr||e._status===Ze){var w=e;w._status=mr,w._result=E}},function(E){if(e._status===pr||e._status===Ze){var w=e;w._status=$r,w._result=E}}),e._status===Ze){var d=e;d._status=pr,d._result=f}}if(e._status===mr){var b=e._result;return b===void 0&&j(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
18
|
+
|
|
19
|
+
Your code should look like:
|
|
20
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
21
|
+
|
|
22
|
+
Did you accidentally put curly braces around the import?`,b),"default"in b||j(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
23
|
+
|
|
24
|
+
Your code should look like:
|
|
25
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,b),b.default}else throw e._result}function dt(e){var s={_status:Ze,_result:e},f={$$typeof:k,_payload:s,_init:ft};{var d,b;Object.defineProperties(f,{defaultProps:{configurable:!0,get:function(){return d},set:function(E){j("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),d=E,Object.defineProperty(f,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return b},set:function(E){j("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),b=E,Object.defineProperty(f,"propTypes",{enumerable:!0})}}})}return f}function pt(e){e!=null&&e.$$typeof===Y?j("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?j("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&j("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&(e.defaultProps!=null||e.propTypes!=null)&&j("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var s={$$typeof:R,render:e};{var f;Object.defineProperty(s,"displayName",{enumerable:!1,configurable:!0,get:function(){return f},set:function(d){f=d,!e.name&&!e.displayName&&(e.displayName=d)}})}return s}var Mr;Mr=Symbol.for("react.module.reference");function i(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===g||he||e===p||e===P||e===G||le||e===Q||ge||Ce||Te||typeof e=="object"&&e!==null&&(e.$$typeof===k||e.$$typeof===Y||e.$$typeof===x||e.$$typeof===C||e.$$typeof===R||e.$$typeof===Mr||e.getModuleId!==void 0))}function m(e,s){i(e)||j("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e);var f={$$typeof:Y,type:e,compare:s===void 0?null:s};{var d;Object.defineProperty(f,"displayName",{enumerable:!1,configurable:!0,get:function(){return d},set:function(b){d=b,!e.name&&!e.displayName&&(e.displayName=b)}})}return f}function v(){var e=Re.current;return e===null&&j(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
26
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
27
|
+
2. You might be breaking the Rules of Hooks
|
|
28
|
+
3. You might have more than one copy of React in the same app
|
|
29
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function T(e){var s=v();if(e._context!==void 0){var f=e._context;f.Consumer===e?j("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):f.Provider===e&&j("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return s.useContext(e)}function L(e){var s=v();return s.useState(e)}function W(e,s,f){var d=v();return d.useReducer(e,s,f)}function M(e){var s=v();return s.useRef(e)}function O(e,s){var f=v();return f.useEffect(e,s)}function fe(e,s){var f=v();return f.useInsertionEffect(e,s)}function te(e,s){var f=v();return f.useLayoutEffect(e,s)}function oe(e,s){var f=v();return f.useCallback(e,s)}function _e(e,s){var f=v();return f.useMemo(e,s)}function ze(e,s,f){var d=v();return d.useImperativeHandle(e,s,f)}function $e(e,s){{var f=v();return f.useDebugValue(e,s)}}function ve(){var e=v();return e.useTransition()}function gr(e){var s=v();return s.useDeferredValue(e)}function mt(){var e=v();return e.useId()}function gt(e,s,f){var d=v();return d.useSyncExternalStore(e,s,f)}var hr=0,Wt,Gt,Ht,Yt,qt,Kt,Xt;function Jt(){}Jt.__reactDisabledLog=!0;function Wa(){{if(hr===0){Wt=console.log,Gt=console.info,Ht=console.warn,Yt=console.error,qt=console.group,Kt=console.groupCollapsed,Xt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Jt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}hr++}}function Ga(){{if(hr--,hr===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:h({},e,{value:Wt}),info:h({},e,{value:Gt}),warn:h({},e,{value:Ht}),error:h({},e,{value:Yt}),group:h({},e,{value:qt}),groupCollapsed:h({},e,{value:Kt}),groupEnd:h({},e,{value:Xt})})}hr<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ht=ue.ReactCurrentDispatcher,vt;function Dr(e,s,f){{if(vt===void 0)try{throw Error()}catch(b){var d=b.stack.trim().match(/\n( *(at )?)/);vt=d&&d[1]||""}return`
|
|
30
|
+
`+vt+e}}var yt=!1,Ar;{var Ha=typeof WeakMap=="function"?WeakMap:Map;Ar=new Ha}function Qt(e,s){if(!e||yt)return"";{var f=Ar.get(e);if(f!==void 0)return f}var d;yt=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var E;E=ht.current,ht.current=null,Wa();try{if(s){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(de){d=de}Reflect.construct(e,[],w)}else{try{w.call()}catch(de){d=de}e.call(w.prototype)}}else{try{throw Error()}catch(de){d=de}e()}}catch(de){if(de&&d&&typeof de.stack=="string"){for(var N=de.stack.split(`
|
|
31
|
+
`),A=d.stack.split(`
|
|
32
|
+
`),K=N.length-1,Z=A.length-1;K>=1&&Z>=0&&N[K]!==A[Z];)Z--;for(;K>=1&&Z>=0;K--,Z--)if(N[K]!==A[Z]){if(K!==1||Z!==1)do if(K--,Z--,Z<0||N[K]!==A[Z]){var ee=`
|
|
33
|
+
`+N[K].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),typeof e=="function"&&Ar.set(e,ee),ee}while(K>=1&&Z>=0);break}}}finally{yt=!1,ht.current=E,Ga(),Error.prepareStackTrace=b}var ne=e?e.displayName||e.name:"",ie=ne?Dr(ne):"";return typeof e=="function"&&Ar.set(e,ie),ie}function Ya(e,s,f){return Qt(e,!1)}function qa(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function Fr(e,s,f){if(e==null)return"";if(typeof e=="function")return Qt(e,qa(e));if(typeof e=="string")return Dr(e);switch(e){case P:return Dr("Suspense");case G:return Dr("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case R:return Ya(e.render);case Y:return Fr(e.type,s,f);case k:{var d=e,b=d._payload,E=d._init;try{return Fr(E(b),s,f)}catch{}}}return""}var Zt={},en=ue.ReactDebugCurrentFrame;function Lr(e){if(e){var s=e._owner,f=Fr(e.type,e._source,s?s.type:null);en.setExtraStackFrame(f)}else en.setExtraStackFrame(null)}function Ka(e,s,f,d,b){{var E=Function.call.bind(Ke);for(var w in e)if(E(e,w)){var N=void 0;try{if(typeof e[w]!="function"){var A=Error((d||"React class")+": "+f+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw A.name="Invariant Violation",A}N=e[w](s,w,d,f,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(K){N=K}N&&!(N instanceof Error)&&(Lr(b),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",f,w,typeof N),Lr(null)),N instanceof Error&&!(N.message in Zt)&&(Zt[N.message]=!0,Lr(b),j("Failed %s type: %s",f,N.message),Lr(null))}}}function sr(e){if(e){var s=e._owner,f=Fr(e.type,e._source,s?s.type:null);Ee(f)}else Ee(null)}var bt;bt=!1;function rn(){if(U.current){var e=ke(U.current.type);if(e)return`
|
|
34
|
+
|
|
35
|
+
Check the render method of \``+e+"`."}return""}function Xa(e){if(e!==void 0){var s=e.fileName.replace(/^.*[\\\/]/,""),f=e.lineNumber;return`
|
|
36
|
+
|
|
37
|
+
Check your code at `+s+":"+f+"."}return""}function Ja(e){return e!=null?Xa(e.__source):""}var tn={};function Qa(e){var s=rn();if(!s){var f=typeof e=="string"?e:e.displayName||e.name;f&&(s=`
|
|
38
|
+
|
|
39
|
+
Check the top-level render call using <`+f+">.")}return s}function nn(e,s){if(!(!e._store||e._store.validated||e.key!=null)){e._store.validated=!0;var f=Qa(s);if(!tn[f]){tn[f]=!0;var d="";e&&e._owner&&e._owner!==U.current&&(d=" It was passed a child from "+ke(e._owner.type)+"."),sr(e),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',f,d),sr(null)}}}function an(e,s){if(typeof e=="object"){if(rr(e))for(var f=0;f<e.length;f++){var d=e[f];Le(d)&&nn(d,s)}else if(Le(e))e._store&&(e._store.validated=!0);else if(e){var b=z(e);if(typeof b=="function"&&b!==e.entries)for(var E=b.call(e),w;!(w=E.next()).done;)Le(w.value)&&nn(w.value,s)}}}function on(e){{var s=e.type;if(s==null||typeof s=="string")return;var f;if(typeof s=="function")f=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===R||s.$$typeof===Y))f=s.propTypes;else return;if(f){var d=ke(s);Ka(f,e.props,"prop",d,e)}else if(s.PropTypes!==void 0&&!bt){bt=!0;var b=ke(s);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",b||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Za(e){{for(var s=Object.keys(e.props),f=0;f<s.length;f++){var d=s[f];if(d!=="children"&&d!=="key"){sr(e),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d),sr(null);break}}e.ref!==null&&(sr(e),j("Invalid attribute `ref` supplied to `React.Fragment`."),sr(null))}}function sn(e,s,f){var d=i(e);if(!d){var b="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(b+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=Ja(s);E?b+=E:b+=rn();var w;e===null?w="null":rr(e)?w="array":e!==void 0&&e.$$typeof===a?(w="<"+(ke(e.type)||"Unknown")+" />",b=" Did you accidentally export a JSX literal instead of a component?"):w=typeof e,j("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",w,b)}var N=at.apply(this,arguments);if(N==null)return N;if(d)for(var A=2;A<arguments.length;A++)an(arguments[A],e);return e===l?Za(N):on(N),N}var cn=!1;function eo(e){var s=sn.bind(null,e);return s.type=e,cn||(cn=!0,Pe("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(s,"type",{enumerable:!1,get:function(){return Pe("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),s}function ro(e,s,f){for(var d=st.apply(this,arguments),b=2;b<arguments.length;b++)an(arguments[b],d.type);return on(d),d}function to(e,s){var f=ce.transition;ce.transition={};var d=ce.transition;ce.transition._updatedFibers=new Set;try{e()}finally{if(ce.transition=f,f===null&&d._updatedFibers){var b=d._updatedFibers.size;b>10&&Pe("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),d._updatedFibers.clear()}}}var ln=!1,Vr=null;function no(e){if(Vr===null)try{var s=("require"+Math.random()).slice(0,7),f=t&&t[s];Vr=f.call(t,"timers").setImmediate}catch{Vr=function(b){ln===!1&&(ln=!0,typeof MessageChannel>"u"&&j("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var E=new MessageChannel;E.port1.onmessage=b,E.port2.postMessage(void 0)}}return Vr(e)}var ir=0,un=!1;function fn(e){{var s=ir;ir++,S.current===null&&(S.current=[]);var f=S.isBatchingLegacy,d;try{if(S.isBatchingLegacy=!0,d=e(),!f&&S.didScheduleLegacyUpdate){var b=S.current;b!==null&&(S.didScheduleLegacyUpdate=!1,Ct(b))}}catch(ne){throw zr(s),ne}finally{S.isBatchingLegacy=f}if(d!==null&&typeof d=="object"&&typeof d.then=="function"){var E=d,w=!1,N={then:function(ne,ie){w=!0,E.then(function(de){zr(s),ir===0?xt(de,ne,ie):ne(de)},function(de){zr(s),ie(de)})}};return!un&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){w||(un=!0,j("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),N}else{var A=d;if(zr(s),ir===0){var K=S.current;K!==null&&(Ct(K),S.current=null);var Z={then:function(ne,ie){S.current===null?(S.current=[],xt(A,ne,ie)):ne(A)}};return Z}else{var ee={then:function(ne,ie){ne(A)}};return ee}}}}function zr(e){e!==ir-1&&j("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ir=e}function xt(e,s,f){{var d=S.current;if(d!==null)try{Ct(d),no(function(){d.length===0?(S.current=null,s(e)):xt(e,s,f)})}catch(b){f(b)}else s(e)}}var Rt=!1;function Ct(e){if(!Rt){Rt=!0;var s=0;try{for(;s<e.length;s++){var f=e[s];do f=f(!0);while(f!==null)}e.length=0}catch(d){throw e=e.slice(s+1),d}finally{Rt=!1}}}var ao=sn,oo=ro,so=eo,io={map:Qe,forEach:kr,count:lt,toArray:ut,only:Or};r.Children=io,r.Component=D,r.Fragment=l,r.Profiler=g,r.PureComponent=B,r.StrictMode=p,r.Suspense=P,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,r.act=fn,r.cloneElement=oo,r.createContext=Ir,r.createElement=ao,r.createFactory=so,r.createRef=rt,r.forwardRef=pt,r.isValidElement=Le,r.lazy=dt,r.memo=m,r.startTransition=to,r.unstable_act=fn,r.useCallback=oe,r.useContext=T,r.useDebugValue=$e,r.useDeferredValue=gr,r.useEffect=O,r.useId=mt,r.useImperativeHandle=ze,r.useInsertionEffect=fe,r.useLayoutEffect=te,r.useMemo=_e,r.useReducer=W,r.useRef=M,r.useState=L,r.useSyncExternalStore=gt,r.useTransition=ve,r.version=n,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(br,br.exports)),br.exports}process.env.NODE_ENV==="production"?Et.exports=To():Et.exports=Po();var V=Et.exports;const y=Eo(V);/**
|
|
40
|
+
* @license React
|
|
41
|
+
* react-jsx-runtime.production.min.js
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/var yn;function No(){if(yn)return vr;yn=1;var t=V,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function p(g,x,C){var R,P={},G=null,Y=null;C!==void 0&&(G=""+C),x.key!==void 0&&(G=""+x.key),x.ref!==void 0&&(Y=x.ref);for(R in x)a.call(x,R)&&!l.hasOwnProperty(R)&&(P[R]=x[R]);if(g&&g.defaultProps)for(R in x=g.defaultProps,x)P[R]===void 0&&(P[R]=x[R]);return{$$typeof:r,type:g,key:G,ref:Y,props:P,_owner:o.current}}return vr.Fragment=n,vr.jsx=p,vr.jsxs=p,vr}var yr={};/**
|
|
48
|
+
* @license React
|
|
49
|
+
* react-jsx-runtime.development.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/var bn;function ko(){return bn||(bn=1,process.env.NODE_ENV!=="production"&&function(){var t=V,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),g=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),k=Symbol.iterator,Q="@@iterator";function re(i){if(i===null||typeof i!="object")return null;var m=k&&i[k]||i[Q];return typeof m=="function"?m:null}var ae=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(i){{for(var m=arguments.length,v=new Array(m>1?m-1:0),T=1;T<m;T++)v[T-1]=arguments[T];Re("error",i,v)}}function Re(i,m,v){{var T=ae.ReactDebugCurrentFrame,L=T.getStackAddendum();L!==""&&(m+="%s",v=v.concat([L]));var W=v.map(function(M){return String(M)});W.unshift("Warning: "+m),Function.prototype.apply.call(console[i],console,W)}}var ce=!1,S=!1,U=!1,xe=!1,Se=!1,Ee;Ee=Symbol.for("react.module.reference");function ge(i){return!!(typeof i=="string"||typeof i=="function"||i===a||i===l||Se||i===o||i===C||i===R||xe||i===Y||ce||S||U||typeof i=="object"&&i!==null&&(i.$$typeof===G||i.$$typeof===P||i.$$typeof===p||i.$$typeof===g||i.$$typeof===x||i.$$typeof===Ee||i.getModuleId!==void 0))}function Ce(i,m,v){var T=i.displayName;if(T)return T;var L=m.displayName||m.name||"";return L!==""?v+"("+L+")":v}function Te(i){return i.displayName||"Context"}function le(i){if(i==null)return null;if(typeof i.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case a:return"Fragment";case n:return"Portal";case l:return"Profiler";case o:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case g:var m=i;return Te(m)+".Consumer";case p:var v=i;return Te(v._context)+".Provider";case x:return Ce(i,i.render,"ForwardRef");case P:var T=i.displayName||null;return T!==null?T:le(i.type)||"Memo";case G:{var L=i,W=L._payload,M=L._init;try{return le(M(W))}catch{return null}}}return null}var he=Object.assign,ue=0,Pe,j,Ne,He,Oe,u,h;function $(){}$.__reactDisabledLog=!0;function D(){{if(ue===0){Pe=console.log,j=console.info,Ne=console.warn,He=console.error,Oe=console.group,u=console.groupCollapsed,h=console.groupEnd;var i={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:i,log:i,warn:i,error:i,group:i,groupCollapsed:i,groupEnd:i})}ue++}}function F(){{if(ue--,ue===0){var i={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:he({},i,{value:Pe}),info:he({},i,{value:j}),warn:he({},i,{value:Ne}),error:he({},i,{value:He}),group:he({},i,{value:Oe}),groupCollapsed:he({},i,{value:u}),groupEnd:he({},i,{value:h})})}ue<0&&z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=ae.ReactCurrentDispatcher,q;function H(i,m,v){{if(q===void 0)try{throw Error()}catch(L){var T=L.stack.trim().match(/\n( *(at )?)/);q=T&&T[1]||""}return`
|
|
56
|
+
`+q+i}}var B=!1,se;{var rt=typeof WeakMap=="function"?WeakMap:Map;se=new rt}function _r(i,m){if(!i||B)return"";{var v=se.get(i);if(v!==void 0)return v}var T;B=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W;W=X.current,X.current=null,D();try{if(m){var M=function(){throw Error()};if(Object.defineProperty(M.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(M,[])}catch(ve){T=ve}Reflect.construct(i,[],M)}else{try{M.call()}catch(ve){T=ve}i.call(M.prototype)}}else{try{throw Error()}catch(ve){T=ve}i()}}catch(ve){if(ve&&T&&typeof ve.stack=="string"){for(var O=ve.stack.split(`
|
|
57
|
+
`),fe=T.stack.split(`
|
|
58
|
+
`),te=O.length-1,oe=fe.length-1;te>=1&&oe>=0&&O[te]!==fe[oe];)oe--;for(;te>=1&&oe>=0;te--,oe--)if(O[te]!==fe[oe]){if(te!==1||oe!==1)do if(te--,oe--,oe<0||O[te]!==fe[oe]){var _e=`
|
|
59
|
+
`+O[te].replace(" at new "," at ");return i.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",i.displayName)),typeof i=="function"&&se.set(i,_e),_e}while(te>=1&&oe>=0);break}}}finally{B=!1,X.current=W,F(),Error.prepareStackTrace=L}var ze=i?i.displayName||i.name:"",$e=ze?H(ze):"";return typeof i=="function"&&se.set(i,$e),$e}function rr(i,m,v){return _r(i,!1)}function tt(i){var m=i.prototype;return!!(m&&m.isReactComponent)}function tr(i,m,v){if(i==null)return"";if(typeof i=="function")return _r(i,tt(i));if(typeof i=="string")return H(i);switch(i){case C:return H("Suspense");case R:return H("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case x:return rr(i.render);case P:return tr(i.type,m,v);case G:{var T=i,L=T._payload,W=T._init;try{return tr(W(L),m,v)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,Ye={},wr=ae.ReactDebugCurrentFrame;function qe(i){if(i){var m=i._owner,v=tr(i.type,i._source,m?m.type:null);wr.setExtraStackFrame(v)}else wr.setExtraStackFrame(null)}function ke(i,m,v,T,L){{var W=Function.call.bind(Ae);for(var M in i)if(W(i,M)){var O=void 0;try{if(typeof i[M]!="function"){var fe=Error((T||"React class")+": "+v+" type `"+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[M]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fe.name="Invariant Violation",fe}O=i[M](m,M,T,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(te){O=te}O&&!(O instanceof Error)&&(qe(L),z("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",v,M,typeof O),qe(null)),O instanceof Error&&!(O.message in Ye)&&(Ye[O.message]=!0,qe(L),z("Failed %s type: %s",v,O.message),qe(null))}}}var Ke=Array.isArray;function nr(i){return Ke(i)}function Sr(i){{var m=typeof Symbol=="function"&&Symbol.toStringTag,v=m&&i[Symbol.toStringTag]||i.constructor.name||"Object";return v}}function jr(i){try{return ar(i),!1}catch{return!0}}function ar(i){return""+i}function dr(i){if(jr(i))return z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Sr(i)),ar(i)}var Fe=ae.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0},Er,Tr,Xe;Xe={};function at(i){if(Ae.call(i,"ref")){var m=Object.getOwnPropertyDescriptor(i,"ref").get;if(m&&m.isReactWarning)return!1}return i.ref!==void 0}function ot(i){if(Ae.call(i,"key")){var m=Object.getOwnPropertyDescriptor(i,"key").get;if(m&&m.isReactWarning)return!1}return i.key!==void 0}function st(i,m){if(typeof i.ref=="string"&&Fe.current&&m&&Fe.current.stateNode!==m){var v=le(Fe.current.type);Xe[v]||(z('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',le(Fe.current.type),i.ref),Xe[v]=!0)}}function Le(i,m){{var v=function(){Er||(Er=!0,z("%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://reactjs.org/link/special-props)",m))};v.isReactWarning=!0,Object.defineProperty(i,"key",{get:v,configurable:!0})}}function Pr(i,m){{var v=function(){Tr||(Tr=!0,z("%s: `ref` 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://reactjs.org/link/special-props)",m))};v.isReactWarning=!0,Object.defineProperty(i,"ref",{get:v,configurable:!0})}}var it=function(i,m,v,T,L,W,M){var O={$$typeof:r,type:i,key:m,ref:v,props:M,_owner:W};return O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function ct(i,m,v,T,L){{var W,M={},O=null,fe=null;v!==void 0&&(dr(v),O=""+v),ot(m)&&(dr(m.key),O=""+m.key),at(m)&&(fe=m.ref,st(m,L));for(W in m)Ae.call(m,W)&&!nt.hasOwnProperty(W)&&(M[W]=m[W]);if(i&&i.defaultProps){var te=i.defaultProps;for(W in te)M[W]===void 0&&(M[W]=te[W])}if(O||fe){var oe=typeof i=="function"?i.displayName||i.name||"Unknown":i;O&&Le(M,oe),fe&&Pr(M,oe)}return it(i,O,fe,L,T,Fe.current,M)}}var or=ae.ReactCurrentOwner,Nr=ae.ReactDebugCurrentFrame;function Ie(i){if(i){var m=i._owner,v=tr(i.type,i._source,m?m.type:null);Nr.setExtraStackFrame(v)}else Nr.setExtraStackFrame(null)}var Je;Je=!1;function Ve(i){return typeof i=="object"&&i!==null&&i.$$typeof===r}function Qe(){{if(or.current){var i=le(or.current.type);if(i)return`
|
|
60
|
+
|
|
61
|
+
Check the render method of \``+i+"`."}return""}}function lt(i){return""}var kr={};function ut(i){{var m=Qe();if(!m){var v=typeof i=="string"?i:i.displayName||i.name;v&&(m=`
|
|
62
|
+
|
|
63
|
+
Check the top-level render call using <`+v+">.")}return m}}function Or(i,m){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var v=ut(m);if(kr[v])return;kr[v]=!0;var T="";i&&i._owner&&i._owner!==or.current&&(T=" It was passed a child from "+le(i._owner.type)+"."),Ie(i),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,T),Ie(null)}}function Ir(i,m){{if(typeof i!="object")return;if(nr(i))for(var v=0;v<i.length;v++){var T=i[v];Ve(T)&&Or(T,m)}else if(Ve(i))i._store&&(i._store.validated=!0);else if(i){var L=re(i);if(typeof L=="function"&&L!==i.entries)for(var W=L.call(i),M;!(M=W.next()).done;)Ve(M.value)&&Or(M.value,m)}}}function Ze(i){{var m=i.type;if(m==null||typeof m=="string")return;var v;if(typeof m=="function")v=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===x||m.$$typeof===P))v=m.propTypes;else return;if(v){var T=le(m);ke(v,i.props,"prop",T,i)}else if(m.PropTypes!==void 0&&!Je){Je=!0;var L=le(m);z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pr(i){{for(var m=Object.keys(i.props),v=0;v<m.length;v++){var T=m[v];if(T!=="children"&&T!=="key"){Ie(i),z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),Ie(null);break}}i.ref!==null&&(Ie(i),z("Invalid attribute `ref` supplied to `React.Fragment`."),Ie(null))}}var mr={};function $r(i,m,v,T,L,W){{var M=ge(i);if(!M){var O="";(i===void 0||typeof i=="object"&&i!==null&&Object.keys(i).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var fe=lt();fe?O+=fe:O+=Qe();var te;i===null?te="null":nr(i)?te="array":i!==void 0&&i.$$typeof===r?(te="<"+(le(i.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):te=typeof i,z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",te,O)}var oe=ct(i,m,v,L,W);if(oe==null)return oe;if(M){var _e=m.children;if(_e!==void 0)if(T)if(nr(_e)){for(var ze=0;ze<_e.length;ze++)Ir(_e[ze],i);Object.freeze&&Object.freeze(_e)}else z("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 Ir(_e,i)}if(Ae.call(m,"key")){var $e=le(i),ve=Object.keys(m).filter(function(gt){return gt!=="key"}),gr=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!mr[$e+gr]){var mt=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";z(`A props object containing a "key" prop is being spread into JSX:
|
|
64
|
+
let props = %s;
|
|
65
|
+
<%s {...props} />
|
|
66
|
+
React keys must be passed directly to JSX without using spread:
|
|
67
|
+
let props = %s;
|
|
68
|
+
<%s key={someKey} {...props} />`,gr,$e,mt,$e),mr[$e+gr]=!0}}return i===a?pr(oe):Ze(oe),oe}}function ft(i,m,v){return $r(i,m,v,!0)}function dt(i,m,v){return $r(i,m,v,!1)}var pt=dt,Mr=ft;yr.Fragment=a,yr.jsx=pt,yr.jsxs=Mr}()),yr}process.env.NODE_ENV==="production"?jt.exports=No():jt.exports=ko();var c=jt.exports;/**
|
|
2
69
|
* @license
|
|
3
70
|
* MIT License
|
|
4
71
|
* Copyright (c) 2022 WorkOS
|
|
5
72
|
* https://github.com/radix-ui/primitives/blob/main/LICENSE
|
|
6
|
-
* */function
|
|
73
|
+
* */function Oo(t,r){typeof t=="function"?t(r):t!=null&&(t.current=r)}function jn(...t){return r=>t.forEach(n=>Oo(n,r))}function qr(...t){return V.useCallback(jn(...t),t)}const En=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Yr.Root,{ref:r,className:_.cx(n,"fp-TabsRoot"),...a})}),Tn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Yr.List,{ref:r,className:_.cx(n,"fp-TabsList"),...a})}),Pn=y.forwardRef((t,r)=>{const{className:n,...a}=t,o=Io(),l=jn(r,o);return c.jsx(Yr.Trigger,{ref:l,className:_.cx(n,"fp-TabsTrigger"),...a})});function Io(){return V.useCallback(t=>{t!==null&&(t.style.width=t.getBoundingClientRect().width+"px")},[])}const Nn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Yr.Content,{ref:r,className:_.cx(n,"fp-TabsContent"),...a})});En.displayName="Tabs.Root";Tn.displayName="Tabs.List";Pn.displayName="Tabs.Trigger";Nn.displayName="Tabs.Content";const $o=Object.freeze(Object.defineProperty({__proto__:null,Content:Nn,List:Tn,Root:En,Trigger:Pn},Symbol.toStringTag,{value:"Module"})),Kr=_.cva("fp-Text",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium",large:"fp-size-large"},weight:{default:"fp-weight-default",strong:"fp-weight-strong"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end"},block:{true:"fp-block"}}}),We=y.forwardRef((t,r)=>{const{asChild:n,className:a,size:o,weight:l,align:p,block:g,...x}=t,C=n?Cn.Slot:"span";return c.jsx(C,{ref:r,className:Kr({className:a,size:o,weight:l,align:p,block:g}),...x})});We.displayName="Text";const Xr=y.forwardRef((t,r)=>{const{className:n,size:a,weight:o,align:l,block:p,...g}=t;return c.jsx("label",{ref:r,className:Kr({className:n,size:a,weight:o,align:l,block:p}),...g})});Xr.displayName="Label";const kn=y.forwardRef((t,r)=>{const{className:n,size:a,weight:o,align:l,block:p,...g}=t;return c.jsx("p",{ref:r,className:Kr({className:n,size:a,weight:o,align:l,block:p}),...g})});kn.displayName="Paragraph";const On=y.forwardRef((t,r)=>{const{asChild:n,className:a,size:o,weight:l,align:p,block:g,...x}=t,C=n?Cn.Slot:"a";return c.jsx(C,{ref:r,className:_.cx(Kr({className:a,size:o,weight:l,align:p,block:g}),"fp-Link"),...x})});On.displayName="Link";/**
|
|
7
74
|
* @license
|
|
8
75
|
* MIT License
|
|
9
76
|
* Copyright (c) 2022 WorkOS
|
|
10
77
|
* https://github.com/radix-ui/primitives/blob/main/LICENSE
|
|
11
|
-
* */function xs(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function ho({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=lf({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,c=xs(n),l=h.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[s,l]}function lf({defaultProp:e,onChange:t}){const n=h.useState(e),[o]=n,r=h.useRef(o),a=xs(t);return h.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}const $s=i.forwardRef((e,t)=>{const{className:n,fullWidth:o,value:r,defaultValue:a,onValueChange:s,...c}=e,[l,u]=ho({prop:r,defaultProp:a,onChange:s});return p.jsx(sf,{ref:t,className:T(n,"fp-SegmentedControlRoot",{"fp-full-width":o}),...c,type:"single",value:l,onValueChange:d=>{d&&u(d)}})}),ws=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(cf,{ref:t,className:T(n,"fp-SegmentedControlItem"),...o})}),Cs=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(qe,{ref:t,className:T(n,"fp-SegmentedControlText"),...o})});$s.displayName="SegmentedControl.Root";ws.displayName="SegmentedControl.Item";Cs.displayName="SegmentedControl.Text";const uf=Object.freeze(Object.defineProperty({__proto__:null,Item:ws,Root:$s,Text:Cs},Symbol.toStringTag,{value:"Module"}));function Fo(e){const[t,n]=h.useState(void 0);return ze(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let s,c;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,c=u.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function ys(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Bo="Radio",[df,Es]=be(Bo),[ff,pf]=df(Bo),Ss=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:a,disabled:s,value:c="on",onCheck:l,...u}=e,[d,f]=h.useState(null),g=ee(t,m=>f(m)),b=h.useRef(!1),v=d?!!d.closest("form"):!0;return p.jsxs(ff,{scope:n,checked:r,disabled:s,children:[p.jsx(z.button,{type:"button",role:"radio","aria-checked":r,"data-state":_s(r),"data-disabled":s?"":void 0,disabled:s,value:c,...u,ref:g,onClick:H(e.onClick,m=>{r||l==null||l(),v&&(b.current=m.isPropagationStopped(),b.current||m.stopPropagation())})}),v&&p.jsx(mf,{control:d,bubbles:!b.current,name:o,value:c,checked:r,required:a,disabled:s,style:{transform:"translateX(-100%)"}})]})});Ss.displayName=Bo;var Rs="RadioIndicator",Ps=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,a=pf(Rs,n);return p.jsx(Ie,{present:o||a.checked,children:p.jsx(z.span,{"data-state":_s(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});Ps.displayName=Rs;var mf=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=h.useRef(null),s=ys(n),c=Fo(t);return h.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const g=new Event("click",{bubbles:o});f.call(l,n),l.dispatchEvent(g)}},[s,n,o]),p.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:a,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function _s(e){return e?"checked":"unchecked"}var hf=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vo="RadioGroup",[gf,Pw]=be(Vo,[St,Es]),Ts=St(),Ns=Es(),[vf,bf]=gf(Vo),Ms=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:a,required:s=!1,disabled:c=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...g}=e,b=Ts(n),v=Wt(u),[m,x]=Re({prop:a,defaultProp:r,onChange:f});return p.jsx(vf,{scope:n,name:o,required:s,disabled:c,value:m,onValueChange:x,children:p.jsx(Oo,{asChild:!0,...b,orientation:l,dir:v,loop:d,children:p.jsx(z.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":c?"":void 0,dir:v,...g,ref:t})})})});Ms.displayName=Vo;var As="RadioGroupItem",Is=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,a=bf(As,n),s=a.disabled||o,c=Ts(n),l=Ns(n),u=h.useRef(null),d=ee(t,u),f=a.value===r.value,g=h.useRef(!1);return h.useEffect(()=>{const b=m=>{hf.includes(m.key)&&(g.current=!0)},v=()=>g.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",v)}},[]),p.jsx(Do,{asChild:!0,...c,focusable:!s,active:f,children:p.jsx(Ss,{disabled:s,required:a.required,checked:f,...l,...r,name:a.name,ref:d,onCheck:()=>a.onValueChange(r.value),onKeyDown:H(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:H(r.onFocus,()=>{var b;g.current&&((b=u.current)==null||b.click())})})})});Is.displayName=As;var xf="RadioGroupIndicator",$f=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=Ns(n);return p.jsx(Ps,{...r,...o,ref:t})});$f.displayName=xf;var wf=Ms,Cf=Is;function Pn(e,t){const n=i.createContext(t);function o(a){const{children:s,...c}=a,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:s})}function r(a){const s=i.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}const[yf,Ef]=Pn("RadioGroup"),Os=i.forwardRef((e,t)=>{const{orientation:n="horizontal",disabled:o,className:r,...a}=e;return p.jsx(yf,{orientation:n,disabled:o,children:p.jsx(wf,{ref:t,orientation:n,disabled:o,className:T(r,"fp-RadioGroupRoot"),...a})})}),Ds=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Cf,{ref:t,className:T(n,"fp-RadioGroupItem"),...o})}),ks=i.forwardRef((e,t)=>{const{orientation:n,disabled:o}=Ef("Label"),{className:r,...a}=e;return p.jsx(Rn,{ref:t,className:T(r,"fp-RadioGroupLabel"),"data-orientation":n,"data-disabled":o?"":void 0,...a})});Os.displayName="RadioGroup.Root";Ds.displayName="RadioGroup.Item";ks.displayName="RadioGroup.Label";const Sf=Object.freeze(Object.defineProperty({__proto__:null,Item:Ds,Label:ks,Root:Os},Symbol.toStringTag,{value:"Module"})),Rf="6",Pf="0 0 24 24",_f=Xe("fp-Icon",{variants:{size:{1:"fp-size-1",2:"fp-size-2","2_5":"fp-size-2_5",3:"fp-size-3","3_5":"fp-size-3_5",4:"fp-size-4",5:"fp-size-5",6:"fp-size-6",7:"fp-size-7",8:"fp-size-8",9:"fp-size-9",10:"fp-size-10"}},defaultVariants:{size:Rf}});function Ze(e){const{path:t,viewBox:n=Pf,displayName:o}=e,r=i.forwardRef((a,s)=>{const{size:c,className:l,...u}=a;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",ref:s,viewBox:n,className:_f({className:l,size:c}),fill:"none",...u,children:t})});return r.displayName=o||"Icon",r}const js=Ze({displayName:"Close",path:p.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",strokeLinejoin:"round",d:"M17 7 7 17M7 7l10 10"})}),Ho=Ze({displayName:"ChevronRight",path:p.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M11.121 14.121L13.243 12L11.12 9.879"})}),Tf=Ze({displayName:"ChevronUp",path:p.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M14.121 12.879L12 10.757L9.87903 12.88"})}),Ls=Ze({displayName:"ChevronDown",path:p.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M9.87897 11.121L12 13.243L14.121 11.12"})})}),_n=Ze({displayName:"Checkmark",viewBox:"0 0 16 16",path:p.jsx("path",{fill:"var(--color-icon)",fillRule:"evenodd",clipRule:"evenodd",d:"M11.777 4.08399C11.8873 4.1575 11.9639 4.27178 11.99 4.40172C12.016 4.53167 11.9894 4.66665 11.916 4.77699L7.91602 10.777C7.87506 10.8387 7.82091 10.8905 7.75748 10.9287C7.69405 10.9669 7.62294 10.9905 7.54926 10.9979C7.47559 11.0053 7.40119 10.9962 7.33146 10.9713C7.26172 10.9464 7.19839 10.9063 7.14602 10.854L4.14602 7.85399C4.09953 7.80751 4.06266 7.75232 4.0375 7.69158C4.01234 7.63084 3.99939 7.56574 3.99939 7.49999C3.99939 7.43425 4.01234 7.36915 4.0375 7.30841C4.06266 7.24767 4.09953 7.19248 4.14602 7.14599C4.19251 7.09951 4.2477 7.06263 4.30844 7.03747C4.36918 7.01231 4.43428 6.99936 4.50002 6.99936C4.56577 6.99936 4.63087 7.01231 4.6916 7.03747C4.75234 7.06263 4.80753 7.09951 4.85402 7.14599L7.42202 9.71599L11.084 4.22299C11.1575 4.11271 11.2718 4.03612 11.4018 4.01006C11.5317 3.98399 11.6667 4.01059 11.777 4.08399Z"})}),Fs=Ze({displayName:"Circle",viewBox:"0 0 16 16",path:p.jsx("circle",{fill:"var(--color-icon)",cx:"8",cy:"8",r:"3"})}),Nf=Ze({displayName:"CheckmarkIndeterminate",viewBox:"0 0 16 16",path:p.jsx("path",{fill:"var(--color-icon)",d:"M4 8a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z"})}),[Mf,zo]=Pn("Checkbox"),Bs=i.forwardRef((e,t)=>{const{className:n,id:o,...r}=e,a=i.useId(),s=o??a;return p.jsx(Mf,{id:s,children:p.jsx("div",{ref:t,className:T(n,"fp-CheckboxRoot"),...r})})}),Vs=i.forwardRef((e,t)=>{const{className:n,indeterminate:o,...r}=e,{id:a}=zo("Input"),s=Af(o),c=En(t,s);return p.jsxs(p.Fragment,{children:[p.jsx("input",{ref:c,className:T(n,"fp-CheckboxInput"),id:a,"aria-labelledby":`checkbox-label-${a}`,"aria-describedby":`checkbox-description-${a}`,...r,type:"checkbox"}),p.jsx(Hs,{})]})}),Hs=()=>p.jsxs("span",{className:"fp-CheckboxIndicator","aria-hidden":"true",children:[p.jsx(_n,{className:"fp-CheckboxCheckmark",size:"4"}),p.jsx(Nf,{className:"fp-CheckboxIndeterminate",size:"4"})]}),zs=i.forwardRef((e,t)=>{const{className:n,...o}=e,{id:r}=zo("Input");return p.jsx(Rn,{"aria-hidden":"true",ref:t,className:T(n,"fp-CheckboxLabel"),htmlFor:r,id:`checkbox-label-${r}`,...o})}),Ws=i.forwardRef((e,t)=>{const{className:n,...o}=e,{id:r}=zo("Description");return p.jsx(qe,{"aria-hidden":"true",ref:t,className:T(n,"fp-CheckboxDescription"),id:`checkbox-description-${r}`,...o})});function Af(e){return i.useCallback(t=>{t&&(t.indeterminate=!!e)},[e])}Bs.displayName="Checkbox.Root";Vs.displayName="Checkbox.Input";Hs.displayName="Checkbox.Indicator";zs.displayName="Checkbox.Label";Ws.displayName="Checkbox.Description";const If=Object.freeze(Object.defineProperty({__proto__:null,Description:Ws,Input:Vs,Label:zs,Root:Bs},Symbol.toStringTag,{value:"Module"}));function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},R.apply(null,arguments)}function Ur(e,[t,n]){return Math.min(n,Math.max(t,e))}function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Oe(e,t=[]){let n=[];function o(a,s){const c=i.createContext(s),l=n.length;n=[...n,s];function u(f){const{scope:g,children:b,...v}=f,m=(g==null?void 0:g[e][l])||c,x=i.useMemo(()=>v,Object.values(v));return i.createElement(m.Provider,{value:x},b)}function d(f,g){const b=(g==null?void 0:g[e][l])||c,v=i.useContext(b);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const r=()=>{const a=n.map(s=>i.createContext(s));return function(c){const l=(c==null?void 0:c[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Of(r,...t)]}function Of(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Df(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tn(...e){return t=>e.forEach(n=>Df(n,t))}function J(...e){return i.useCallback(Tn(...e),e)}const wt=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),a=r.find(kf);if(a){const s=a.props.children,c=r.map(l=>l===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:l);return i.createElement(go,R({},o,{ref:t}),i.isValidElement(s)?i.cloneElement(s,void 0,c):null)}return i.createElement(go,R({},o,{ref:t}),n)});wt.displayName="Slot";const go=i.forwardRef((e,t)=>{const{children:n,...o}=e;return i.isValidElement(n)?i.cloneElement(n,{...jf(o,n.props),ref:t?Tn(t,n.ref):n.ref}):i.Children.count(n)>1?i.Children.only(null):null});go.displayName="SlotClone";const Gs=({children:e})=>i.createElement(i.Fragment,null,e);function kf(e){return i.isValidElement(e)&&e.type===Gs}function jf(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{a(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Wo(e){const t=e+"CollectionProvider",[n,o]=Oe(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=b=>{const{scope:v,children:m}=b,x=i.useRef(null),$=i.useRef(new Map).current;return i.createElement(r,{scope:v,itemMap:$,collectionRef:x},m)},c=e+"CollectionSlot",l=i.forwardRef((b,v)=>{const{scope:m,children:x}=b,$=a(c,m),w=J(v,$.collectionRef);return i.createElement(wt,{ref:w},x)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=i.forwardRef((b,v)=>{const{scope:m,children:x,...$}=b,w=i.useRef(null),C=J(v,w),E=a(u,m);return i.useEffect(()=>(E.itemMap.set(w,{ref:w,...$}),()=>void E.itemMap.delete(w))),i.createElement(wt,{[d]:"",ref:C},x)});function g(b){const v=a(e+"CollectionConsumer",b);return i.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const $=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,y)=>$.indexOf(E.ref.current)-$.indexOf(y.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},g,o]}const Lf=i.createContext(void 0);function Go(e){const t=i.useContext(Lf);return e||t||"ltr"}const Ff=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q=Ff.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:a,...s}=o,c=a?wt:t;return i.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),i.createElement(c,R({},s,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Us(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function me(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Bf(e,t=globalThis==null?void 0:globalThis.document){const n=me(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const vo="dismissableLayer.update",Vf="dismissableLayer.pointerDownOutside",Hf="dismissableLayer.focusOutside";let Kr;const zf=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Uo=i.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=i.useContext(zf),[f,g]=i.useState(null),b=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,v]=i.useState({}),m=J(t,P=>g(P)),x=Array.from(d.layers),[$]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf($),C=f?x.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,y=C>=w,_=Wf(P=>{const I=P.target,N=[...d.branches].some(D=>D.contains(I));!y||N||(a==null||a(P),c==null||c(P),P.defaultPrevented||l==null||l())},b),S=Gf(P=>{const I=P.target;[...d.branches].some(D=>D.contains(I))||(s==null||s(P),c==null||c(P),P.defaultPrevented||l==null||l())},b);return Bf(P=>{C===d.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},b),i.useEffect(()=>{if(f)return o&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kr=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Yr(),()=>{o&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Kr)}},[f,b,o,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Yr())},[f,d]),i.useEffect(()=>{const P=()=>v({});return document.addEventListener(vo,P),()=>document.removeEventListener(vo,P)},[]),i.createElement(q.div,R({},u,{ref:m,style:{pointerEvents:E?y?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,S.onFocusCapture),onBlurCapture:A(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,_.onPointerDownCapture)}))});function Wf(e,t=globalThis==null?void 0:globalThis.document){const n=me(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let u=function(){Ks(Vf,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Gf(e,t=globalThis==null?void 0:globalThis.document){const n=me(e),o=i.useRef(!1);return i.useEffect(()=>{const r=a=>{a.target&&!o.current&&Ks(Hf,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Yr(){const e=new CustomEvent(vo);document.dispatchEvent(e)}function Ks(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Us(r,a):r.dispatchEvent(a)}let Zn=0;function Ys(){i.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Xr()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Xr()),Zn++,()=>{Zn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),Zn--}},[])}function Xr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Qn="focusScope.autoFocusOnMount",Jn="focusScope.autoFocusOnUnmount",qr={bubbles:!1,cancelable:!0},Xs=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[c,l]=i.useState(null),u=me(r),d=me(a),f=i.useRef(null),g=J(t,m=>l(m)),b=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(C){if(b.paused||!c)return;const E=C.target;c.contains(E)?f.current=E:Fe(f.current,{select:!0})},x=function(C){if(b.paused||!c)return;const E=C.relatedTarget;E!==null&&(c.contains(E)||Fe(f.current,{select:!0}))},$=function(C){if(document.activeElement===document.body)for(const y of C)y.removedNodes.length>0&&Fe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const w=new MutationObserver($);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),w.disconnect()}}},[o,c,b.paused]),i.useEffect(()=>{if(c){Qr.add(b);const m=document.activeElement;if(!c.contains(m)){const $=new CustomEvent(Qn,qr);c.addEventListener(Qn,u),c.dispatchEvent($),$.defaultPrevented||(Uf(Zf(qs(c)),{select:!0}),document.activeElement===m&&Fe(c))}return()=>{c.removeEventListener(Qn,u),setTimeout(()=>{const $=new CustomEvent(Jn,qr);c.addEventListener(Jn,d),c.dispatchEvent($),$.defaultPrevented||Fe(m??document.body,{select:!0}),c.removeEventListener(Jn,d),Qr.remove(b)},0)}}},[c,u,d,b]);const v=i.useCallback(m=>{if(!n&&!o||b.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,$=document.activeElement;if(x&&$){const w=m.currentTarget,[C,E]=Kf(w);C&&E?!m.shiftKey&&$===E?(m.preventDefault(),n&&Fe(C,{select:!0})):m.shiftKey&&$===C&&(m.preventDefault(),n&&Fe(E,{select:!0})):$===w&&m.preventDefault()}},[n,o,b.paused]);return i.createElement(q.div,R({tabIndex:-1},s,{ref:g,onKeyDown:v}))});function Uf(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Fe(o,{select:t}),document.activeElement!==n)return}function Kf(e){const t=qs(e),n=Zr(t,e),o=Zr(t.reverse(),e);return[n,o]}function qs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zr(e,t){for(const n of e)if(!Yf(n,{upTo:t}))return n}function Yf(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 Xf(e){return e instanceof HTMLInputElement&&"select"in e}function Fe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Xf(e)&&t&&e.select()}}const Qr=qf();function qf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jr(e,t),e.unshift(t)},remove(t){var n;e=Jr(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Jr(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Zf(e){return e.filter(t=>t.tagName!=="A")}const he=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Qf=h.useId||(()=>{});let Jf=0;function Ne(e){const[t,n]=h.useState(Qf());return he(()=>{n(o=>o??String(Jf++))},[e]),t?`radix-${t}`:""}const ep=["top","right","bottom","left"],ye=Math.min,ge=Math.max,hn=Math.round,Qt=Math.floor,We=e=>({x:e,y:e}),tp={left:"right",right:"left",bottom:"top",top:"bottom"},np={start:"end",end:"start"};function bo(e,t,n){return ge(e,ye(t,n))}function Me(e,t){return typeof e=="function"?e(t):e}function Ae(e){return e.split("-")[0]}function Pt(e){return e.split("-")[1]}function Ko(e){return e==="x"?"y":"x"}function Yo(e){return e==="y"?"height":"width"}function _t(e){return["top","bottom"].includes(Ae(e))?"y":"x"}function Xo(e){return Ko(_t(e))}function op(e,t,n){n===void 0&&(n=!1);const o=Pt(e),r=Xo(e),a=Yo(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=gn(s)),[s,gn(s)]}function rp(e){const t=gn(e);return[xo(e),t,xo(t)]}function xo(e){return e.replace(/start|end/g,t=>np[t])}function ap(e,t,n){const o=["left","right"],r=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?a:s;default:return[]}}function sp(e,t,n,o){const r=Pt(e);let a=ap(Ae(e),n==="start",o);return r&&(a=a.map(s=>s+"-"+r),t&&(a=a.concat(a.map(xo)))),a}function gn(e){return e.replace(/left|right|bottom|top/g,t=>tp[t])}function cp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zs(e){return typeof e!="number"?cp(e):{top:e,right:e,bottom:e,left:e}}function vn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ea(e,t,n){let{reference:o,floating:r}=e;const a=_t(t),s=Xo(t),c=Yo(s),l=Ae(t),u=a==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let b;switch(l){case"top":b={x:d,y:o.y-r.height};break;case"bottom":b={x:d,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:f};break;case"left":b={x:o.x-r.width,y:f};break;default:b={x:o.x,y:o.y}}switch(Pt(t)){case"start":b[s]-=g*(n&&u?-1:1);break;case"end":b[s]+=g*(n&&u?-1:1);break}return b}const ip=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:s}=n,c=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=ea(u,o,l),g=o,b={},v=0;for(let m=0;m<c.length;m++){const{name:x,fn:$}=c[m],{x:w,y:C,data:E,reset:y}=await $({x:d,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:b,rects:u,platform:s,elements:{reference:e,floating:t}});d=w??d,f=C??f,b={...b,[x]:{...b[x],...E}},y&&v<=50&&(v++,typeof y=="object"&&(y.placement&&(g=y.placement),y.rects&&(u=y.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:d,y:f}=ea(u,g,l)),m=-1)}return{x:d,y:f,placement:g,strategy:r,middlewareData:b}};async function jt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:s,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:g=!1,padding:b=0}=Me(t,e),v=Zs(b),x=c[g?f==="floating"?"reference":"floating":f],$=vn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),E=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},y=vn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:C,strategy:l}):w);return{top:($.top-y.top+v.top)/E.y,bottom:(y.bottom-$.bottom+v.bottom)/E.y,left:($.left-y.left+v.left)/E.x,right:(y.right-$.right+v.right)/E.x}}const lp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:s,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Me(e,t)||{};if(u==null)return{};const f=Zs(d),g={x:n,y:o},b=Xo(r),v=Yo(b),m=await s.getDimensions(u),x=b==="y",$=x?"top":"left",w=x?"bottom":"right",C=x?"clientHeight":"clientWidth",E=a.reference[v]+a.reference[b]-g[b]-a.floating[v],y=g[b]-a.reference[b],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let S=_?_[C]:0;(!S||!await(s.isElement==null?void 0:s.isElement(_)))&&(S=c.floating[C]||a.floating[v]);const P=E/2-y/2,I=S/2-m[v]/2-1,N=ye(f[$],I),D=ye(f[w],I),k=N,V=S-m[v]-D,F=S/2-m[v]/2+P,O=bo(k,F,V),B=!l.arrow&&Pt(r)!=null&&F!==O&&a.reference[v]/2-(F<k?N:D)-m[v]/2<0,L=B?F<k?F-k:F-V:0;return{[b]:g[b]+L,data:{[b]:O,centerOffset:F-O-L,...B&&{alignmentOffset:L}},reset:B}}}),up=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:s,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...x}=Me(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const $=Ae(r),w=Ae(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=g||(w||!m?[gn(c)]:rp(c));!g&&v!=="none"&&E.push(...sp(c,m,v,C));const y=[c,...E],_=await jt(t,x),S=[];let P=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&S.push(_[$]),f){const k=op(r,s,C);S.push(_[k[0]],_[k[1]])}if(P=[...P,{placement:r,overflows:S}],!S.every(k=>k<=0)){var I,N;const k=(((I=a.flip)==null?void 0:I.index)||0)+1,V=y[k];if(V)return{data:{index:k,overflows:P},reset:{placement:V}};let F=(N=P.filter(O=>O.overflows[0]<=0).sort((O,B)=>O.overflows[1]-B.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(b){case"bestFit":{var D;const O=(D=P.map(B=>[B.placement,B.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((B,L)=>B[1]-L[1])[0])==null?void 0:D[0];O&&(F=O);break}case"initialPlacement":F=c;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function ta(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function na(e){return ep.some(t=>e[t]>=0)}const dp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Me(e,t);switch(o){case"referenceHidden":{const a=await jt(t,{...r,elementContext:"reference"}),s=ta(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:na(s)}}}case"escaped":{const a=await jt(t,{...r,altBoundary:!0}),s=ta(a,n.floating);return{data:{escapedOffsets:s,escaped:na(s)}}}default:return{}}}}};async function fp(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Ae(n),c=Pt(n),l=_t(n)==="y",u=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,f=Me(t,e);let{mainAxis:g,crossAxis:b,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&typeof v=="number"&&(b=c==="end"?v*-1:v),l?{x:b*d,y:g*u}:{x:g*u,y:b*d}}const pp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:s,middlewareData:c}=t,l=await fp(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:s}}}}},mp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:x=>{let{x:$,y:w}=x;return{x:$,y:w}}},...l}=Me(e,t),u={x:n,y:o},d=await jt(t,l),f=_t(Ae(r)),g=Ko(f);let b=u[g],v=u[f];if(a){const x=g==="y"?"top":"left",$=g==="y"?"bottom":"right",w=b+d[x],C=b-d[$];b=bo(w,b,C)}if(s){const x=f==="y"?"top":"left",$=f==="y"?"bottom":"right",w=v+d[x],C=v-d[$];v=bo(w,v,C)}const m=c.fn({...t,[g]:b,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}},hp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:s}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Me(e,t),d={x:n,y:o},f=_t(r),g=Ko(f);let b=d[g],v=d[f];const m=Me(c,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+x.mainAxis,y=a.reference[g]+a.reference[C]-x.mainAxis;b<E?b=E:b>y&&(b=y)}if(u){var $,w;const C=g==="y"?"width":"height",E=["top","left"].includes(Ae(r)),y=a.reference[f]-a.floating[C]+(E&&(($=s.offset)==null?void 0:$[f])||0)+(E?0:x.crossAxis),_=a.reference[f]+a.reference[C]+(E?0:((w=s.offset)==null?void 0:w[f])||0)-(E?x.crossAxis:0);v<y?v=y:v>_&&(v=_)}return{[g]:b,[f]:v}}}},gp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:a}=t,{apply:s=()=>{},...c}=Me(e,t),l=await jt(t,c),u=Ae(n),d=Pt(n),f=_t(n)==="y",{width:g,height:b}=o.floating;let v,m;u==="top"||u==="bottom"?(v=u,m=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(m=u,v=d==="end"?"top":"bottom");const x=b-l.top-l.bottom,$=g-l.left-l.right,w=ye(b-l[v],x),C=ye(g-l[m],$),E=!t.middlewareData.shift;let y=w,_=C;if(f?_=d||E?ye(C,$):$:y=d||E?ye(w,x):x,E&&!d){const P=ge(l.left,0),I=ge(l.right,0),N=ge(l.top,0),D=ge(l.bottom,0);f?_=g-2*(P!==0||I!==0?P+I:ge(l.left,l.right)):y=b-2*(N!==0||D!==0?N+D:ge(l.top,l.bottom))}await s({...t,availableWidth:_,availableHeight:y});const S=await r.getDimensions(a.floating);return g!==S.width||b!==S.height?{reset:{rects:!0}}:{}}}};function Tt(e){return Qs(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(Qs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qs(e){return e instanceof Node||e instanceof ve(e).Node}function Ee(e){return e instanceof Element||e instanceof ve(e).Element}function Se(e){return e instanceof HTMLElement||e instanceof ve(e).HTMLElement}function oa(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot}function Gt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function vp(e){return["table","td","th"].includes(Tt(e))}function qo(e){const t=Zo(),n=we(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function bp(e){let t=Ge(e);for(;Se(t)&&!Ct(t);){if(qo(t))return t;t=Ge(t)}return null}function Zo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ct(e){return["html","body","#document"].includes(Tt(e))}function we(e){return ve(e).getComputedStyle(e)}function Nn(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ge(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oa(e)&&e.host||De(e);return oa(t)?t.host:t}function Js(e){const t=Ge(e);return Ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&Gt(t)?t:Js(t)}function Lt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Js(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),s=ve(r);return a?t.concat(s,s.visualViewport||[],Gt(r)?r:[],s.frameElement&&n?Lt(s.frameElement):[]):t.concat(r,Lt(r,[],n))}function ec(e){const t=we(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Se(e),a=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=hn(n)!==a||hn(o)!==s;return c&&(n=a,o=s),{width:n,height:o,$:c}}function Qo(e){return Ee(e)?e:e.contextElement}function gt(e){const t=Qo(e);if(!Se(t))return We(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=ec(t);let s=(a?hn(n.width):n.width)/o,c=(a?hn(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const xp=We(0);function tc(e){const t=ve(e);return!Zo()||!t.visualViewport?xp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $p(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ve(e)?!1:t}function at(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=Qo(e);let s=We(1);t&&(o?Ee(o)&&(s=gt(o)):s=gt(e));const c=$p(a,n,o)?tc(a):We(0);let l=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,d=r.width/s.x,f=r.height/s.y;if(a){const g=ve(a),b=o&&Ee(o)?ve(o):o;let v=g,m=v.frameElement;for(;m&&o&&b!==v;){const x=gt(m),$=m.getBoundingClientRect(),w=we(m),C=$.left+(m.clientLeft+parseFloat(w.paddingLeft))*x.x,E=$.top+(m.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,f*=x.y,l+=C,u+=E,v=ve(m),m=v.frameElement}}return vn({width:d,height:f,x:l,y:u})}const wp=[":popover-open",":modal"];function Jo(e){return wp.some(t=>{try{return e.matches(t)}catch{return!1}})}function Cp(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",s=De(o),c=t?Jo(t.floating):!1;if(o===s||c&&a)return n;let l={scrollLeft:0,scrollTop:0},u=We(1);const d=We(0),f=Se(o);if((f||!f&&!a)&&((Tt(o)!=="body"||Gt(s))&&(l=Nn(o)),Se(o))){const g=at(o);u=gt(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function yp(e){return Array.from(e.getClientRects())}function nc(e){return at(De(e)).left+Nn(e).scrollLeft}function Ep(e){const t=De(e),n=Nn(e),o=e.ownerDocument.body,r=ge(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=ge(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+nc(e);const c=-n.scrollTop;return we(o).direction==="rtl"&&(s+=ge(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:s,y:c}}function Sp(e,t){const n=ve(e),o=De(e),r=n.visualViewport;let a=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){a=r.width,s=r.height;const u=Zo();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:a,height:s,x:c,y:l}}function Rp(e,t){const n=at(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Se(e)?gt(e):We(1),s=e.clientWidth*a.x,c=e.clientHeight*a.y,l=r*a.x,u=o*a.y;return{width:s,height:c,x:l,y:u}}function ra(e,t,n){let o;if(t==="viewport")o=Sp(e,n);else if(t==="document")o=Ep(De(e));else if(Ee(t))o=Rp(t,n);else{const r=tc(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return vn(o)}function oc(e,t){const n=Ge(e);return n===t||!Ee(n)||Ct(n)?!1:we(n).position==="fixed"||oc(n,t)}function Pp(e,t){const n=t.get(e);if(n)return n;let o=Lt(e,[],!1).filter(c=>Ee(c)&&Tt(c)!=="body"),r=null;const a=we(e).position==="fixed";let s=a?Ge(e):e;for(;Ee(s)&&!Ct(s);){const c=we(s),l=qo(s);!l&&c.position==="fixed"&&(r=null),(a?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Gt(s)&&!l&&oc(e,s))?o=o.filter(d=>d!==s):r=c,s=Ge(s)}return t.set(e,o),o}function _p(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Jo(t)?[]:Pp(t,this._c):[].concat(n),o],c=s[0],l=s.reduce((u,d)=>{const f=ra(t,d,r);return u.top=ge(f.top,u.top),u.right=ye(f.right,u.right),u.bottom=ye(f.bottom,u.bottom),u.left=ge(f.left,u.left),u},ra(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Tp(e){const{width:t,height:n}=ec(e);return{width:t,height:n}}function Np(e,t,n){const o=Se(t),r=De(t),a=n==="fixed",s=at(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const l=We(0);if(o||!o&&!a)if((Tt(t)!=="body"||Gt(r))&&(c=Nn(t)),o){const f=at(t,!0,a,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else r&&(l.x=nc(r));const u=s.left+c.scrollLeft-l.x,d=s.top+c.scrollTop-l.y;return{x:u,y:d,width:s.width,height:s.height}}function eo(e){return we(e).position==="static"}function aa(e,t){return!Se(e)||we(e).position==="fixed"?null:t?t(e):e.offsetParent}function rc(e,t){const n=ve(e);if(Jo(e))return n;if(!Se(e)){let r=Ge(e);for(;r&&!Ct(r);){if(Ee(r)&&!eo(r))return r;r=Ge(r)}return n}let o=aa(e,t);for(;o&&vp(o)&&eo(o);)o=aa(o,t);return o&&Ct(o)&&eo(o)&&!qo(o)?n:o||bp(e)||n}const Mp=async function(e){const t=this.getOffsetParent||rc,n=this.getDimensions,o=await n(e.floating);return{reference:Np(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ap(e){return we(e).direction==="rtl"}const Ip={convertOffsetParentRelativeRectToViewportRelativeRect:Cp,getDocumentElement:De,getClippingRect:_p,getOffsetParent:rc,getElementRects:Mp,getClientRects:yp,getDimensions:Tp,getScale:gt,isElement:Ee,isRTL:Ap};function Op(e,t){let n=null,o;const r=De(e);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),a();const{left:u,top:d,width:f,height:g}=e.getBoundingClientRect();if(c||t(),!f||!g)return;const b=Qt(d),v=Qt(r.clientWidth-(u+f)),m=Qt(r.clientHeight-(d+g)),x=Qt(u),w={rootMargin:-b+"px "+-v+"px "+-m+"px "+-x+"px",threshold:ge(0,ye(1,l))||1};let C=!0;function E(y){const _=y[0].intersectionRatio;if(_!==l){if(!C)return s();_?s(!1,_):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(E,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),a}function ac(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Qo(e),d=r||a?[...u?Lt(u):[],...Lt(t)]:[];d.forEach($=>{r&&$.addEventListener("scroll",n,{passive:!0}),a&&$.addEventListener("resize",n)});const f=u&&c?Op(u,n):null;let g=-1,b=null;s&&(b=new ResizeObserver($=>{let[w]=$;w&&w.target===u&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=b)==null||C.observe(t)})),n()}),u&&!l&&b.observe(u),b.observe(t));let v,m=l?at(e):null;l&&x();function x(){const $=at(e);m&&($.x!==m.x||$.y!==m.y||$.width!==m.width||$.height!==m.height)&&n(),m=$,v=requestAnimationFrame(x)}return n(),()=>{var $;d.forEach(w=>{r&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f==null||f(),($=b)==null||$.disconnect(),b=null,l&&cancelAnimationFrame(v)}}const Dp=pp,kp=mp,jp=up,Lp=gp,Fp=dp,sa=lp,Bp=hp,Vp=(e,t,n)=>{const o=new Map,r={platform:Ip,...n},a={...r.platform,_c:o};return ip(e,t,{...r,platform:a})};var pn=typeof document<"u"?i.useLayoutEffect:i.useEffect;function bn(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!bn(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!bn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ca(e,t){const n=sc(e);return Math.round(t*n)/n}function ia(e){const t=h.useRef(e);return pn(()=>{t.current=e}),t}function cc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,b]=h.useState(o);bn(g,o)||b(o);const[v,m]=h.useState(null),[x,$]=h.useState(null),w=h.useCallback(L=>{L!==_.current&&(_.current=L,m(L))},[]),C=h.useCallback(L=>{L!==S.current&&(S.current=L,$(L))},[]),E=a||v,y=s||x,_=h.useRef(null),S=h.useRef(null),P=h.useRef(d),I=l!=null,N=ia(l),D=ia(r),k=h.useCallback(()=>{if(!_.current||!S.current)return;const L={placement:t,strategy:n,middleware:g};D.current&&(L.platform=D.current),Vp(_.current,S.current,L).then(W=>{const M={...W,isPositioned:!0};V.current&&!bn(P.current,M)&&(P.current=M,Io.flushSync(()=>{f(M)}))})},[g,t,n,D]);pn(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);const V=h.useRef(!1);pn(()=>(V.current=!0,()=>{V.current=!1}),[]),pn(()=>{if(E&&(_.current=E),y&&(S.current=y),E&&y){if(N.current)return N.current(E,y,k);k()}},[E,y,k,N,I]);const F=h.useMemo(()=>({reference:_,floating:S,setReference:w,setFloating:C}),[w,C]),O=h.useMemo(()=>({reference:E,floating:y}),[E,y]),B=h.useMemo(()=>{const L={position:n,left:0,top:0};if(!O.floating)return L;const W=ca(O.floating,d.x),M=ca(O.floating,d.y);return c?{...L,transform:"translate("+W+"px, "+M+"px)",...sc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:M}},[n,c,O.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:k,refs:F,elements:O,floatingStyles:B}),[d,k,F,O,B])}const Hp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?sa({element:o.current,padding:r}).fn(n):{}:o?sa({element:o,padding:r}).fn(n):{}}}},ic=(e,t)=>({...Dp(e),options:[e,t]}),lc=(e,t)=>({...kp(e),options:[e,t]}),uc=(e,t)=>({...Bp(e),options:[e,t]}),dc=(e,t)=>({...jp(e),options:[e,t]}),fc=(e,t)=>({...Lp(e),options:[e,t]}),pc=(e,t)=>({...Fp(e),options:[e,t]}),mc=(e,t)=>({...Hp(e),options:[e,t]}),zp=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return i.createElement(q.svg,R({},a,{ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:i.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Wp=zp;function hc(e){const[t,n]=i.useState(void 0);return he(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let s,c;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,c=u.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const gc="Popper",[vc,Nt]=Oe(gc),[Gp,bc]=vc(gc),Up=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return i.createElement(Gp,{scope:t,anchor:o,onAnchorChange:r},n)},Kp="PopperAnchor",Yp=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=bc(Kp,n),s=i.useRef(null),c=J(t,s);return i.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:i.createElement(q.div,R({},r,{ref:c}))}),xc="PopperContent",[Xp,qp]=vc(xc),Zp=i.forwardRef((e,t)=>{var n,o,r,a,s,c,l,u;const{__scopePopper:d,side:f="bottom",sideOffset:g=0,align:b="center",alignOffset:v=0,arrowPadding:m=0,avoidCollisions:x=!0,collisionBoundary:$=[],collisionPadding:w=0,sticky:C="partial",hideWhenDetached:E=!1,updatePositionStrategy:y="optimized",onPlaced:_,...S}=e,P=bc(xc,d),[I,N]=i.useState(null),D=J(t,xe=>N(xe)),[k,V]=i.useState(null),F=hc(k),O=(n=F==null?void 0:F.width)!==null&&n!==void 0?n:0,B=(o=F==null?void 0:F.height)!==null&&o!==void 0?o:0,L=f+(b!=="center"?"-"+b:""),W=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},M=Array.isArray($)?$:[$],Z=M.length>0,Q={padding:W,boundary:M.filter(tm),altBoundary:Z},{refs:se,floatingStyles:ue,placement:de,isPositioned:fe,middlewareData:te}=cc({strategy:"fixed",placement:L,whileElementsMounted:(...xe)=>ac(...xe,{animationFrame:y==="always"}),elements:{reference:P.anchor},middleware:[ic({mainAxis:g+B,alignmentAxis:v}),x&&lc({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?uc():void 0,...Q}),x&&dc({...Q}),fc({...Q,apply:({elements:xe,rects:Le,availableWidth:nt,availableHeight:Xn})=>{const{width:ut,height:xd}=Le.reference,qt=xe.floating.style;qt.setProperty("--radix-popper-available-width",`${nt}px`),qt.setProperty("--radix-popper-available-height",`${Xn}px`),qt.setProperty("--radix-popper-anchor-width",`${ut}px`),qt.setProperty("--radix-popper-anchor-height",`${xd}px`)}}),k&&mc({element:k,padding:m}),nm({arrowWidth:O,arrowHeight:B}),E&&pc({strategy:"referenceHidden",...Q})]}),[j,G]=$c(de),U=me(_);he(()=>{fe&&(U==null||U())},[fe,U]);const K=(r=te.arrow)===null||r===void 0?void 0:r.x,Y=(a=te.arrow)===null||a===void 0?void 0:a.y,X=((s=te.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[ne,oe]=i.useState();return he(()=>{I&&oe(window.getComputedStyle(I).zIndex)},[I]),i.createElement("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ue,transform:fe?ue.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(c=te.transformOrigin)===null||c===void 0?void 0:c.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},i.createElement(Xp,{scope:d,placedSide:j,onArrowChange:V,arrowX:K,arrowY:Y,shouldHideArrow:X},i.createElement(q.div,R({"data-side":j,"data-align":G},S,{ref:D,style:{...S.style,animation:fe?void 0:"none",opacity:(u=te.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Qp="PopperArrow",Jp={top:"bottom",right:"left",bottom:"top",left:"right"},em=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=qp(Qp,o),s=Jp[a.placedSide];return i.createElement("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}},i.createElement(Wp,R({},r,{ref:n,style:{...r.style,display:"block"}})))});function tm(e){return e!==null}const nm=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,a,s;const{placement:c,rects:l,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,g=f?0:e.arrowWidth,b=f?0:e.arrowHeight,[v,m]=$c(c),x={start:"0%",center:"50%",end:"100%"}[m],$=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+g/2,w=((a=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)+b/2;let C="",E="";return v==="bottom"?(C=f?x:`${$}px`,E=`${-b}px`):v==="top"?(C=f?x:`${$}px`,E=`${l.floating.height+b}px`):v==="right"?(C=`${-b}px`,E=f?x:`${w}px`):v==="left"&&(C=`${l.floating.width+b}px`,E=f?x:`${w}px`),{data:{x:C,y:E}}}});function $c(e){const[t,n="center"]=e.split("-");return[t,n]}const Mn=Up,er=Yp,tr=Zp,wc=em,nr=i.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?ct.createPortal(i.createElement(q.div,R({},r,{ref:t})),o):null});function Ue({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=om({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,c=me(n),l=i.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[s,l]}function om({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),a=me(t);return i.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}function Cc(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const yc=i.forwardRef((e,t)=>i.createElement(q.span,R({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),rm=yc;var am=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dt=new WeakMap,Jt=new WeakMap,en={},to=0,Ec=function(e){return e&&(e.host||Ec(e.parentNode))},sm=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Ec(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},cm=function(e,t,n,o){var r=sm(t,Array.isArray(e)?e:[e]);en[n]||(en[n]=new WeakMap);var a=en[n],s=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(g){if(c.has(g))d(g);else try{var b=g.getAttribute(o),v=b!==null&&b!=="false",m=(dt.get(g)||0)+1,x=(a.get(g)||0)+1;dt.set(g,m),a.set(g,x),s.push(g),m===1&&v&&Jt.set(g,!0),x===1&&g.setAttribute(n,"true"),v||g.setAttribute(o,"true")}catch($){console.error("aria-hidden: cannot operate on ",g,$)}})};return d(t),c.clear(),to++,function(){s.forEach(function(f){var g=dt.get(f)-1,b=a.get(f)-1;dt.set(f,g),a.set(f,b),g||(Jt.has(f)||f.removeAttribute(o),Jt.delete(f)),b||f.removeAttribute(n)}),to--,to||(dt=new WeakMap,dt=new WeakMap,Jt=new WeakMap,en={})}},An=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=am(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),cm(o,r,n,"aria-hidden")):function(){return null}},re=function(){return re=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},re.apply(this,arguments)};function or(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Sc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Dt="right-scroll-bar-position",kt="width-before-scroll-bar",im="with-scroll-bars-hidden",lm="--removed-body-scroll-bar-size";function no(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function um(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var dm=typeof window<"u"?h.useLayoutEffect:h.useEffect,la=new WeakMap;function Rc(e,t){var n=um(null,function(o){return e.forEach(function(r){return no(r,o)})});return dm(function(){var o=la.get(n);if(o){var r=new Set(o),a=new Set(e),s=n.current;r.forEach(function(c){a.has(c)||no(c,null)}),a.forEach(function(c){r.has(c)||no(c,s)})}la.set(n,e)},[e]),n}function fm(e){return e}function pm(e,t){t===void 0&&(t=fm);var n=[],o=!1,r={read:function(){if(o)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,o);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(a){for(o=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){o=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(a),s=n}var l=function(){var d=s;s=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return r}function Pc(e){e===void 0&&(e={});var t=pm(null);return t.options=re({async:!0,ssr:!1},e),t}var _c=function(e){var t=e.sideCar,n=or(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return h.createElement(o,re({},n))};_c.isSideCarExport=!0;function Tc(e,t){return e.useMedium(t),_c}var Nc=Pc(),oo=function(){},In=h.forwardRef(function(e,t){var n=h.useRef(null),o=h.useState({onScrollCapture:oo,onWheelCapture:oo,onTouchMoveCapture:oo}),r=o[0],a=o[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,g=e.sideCar,b=e.noIsolation,v=e.inert,m=e.allowPinchZoom,x=e.as,$=x===void 0?"div":x,w=or(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),C=g,E=Rc([n,t]),y=re(re({},w),r);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:Nc,removeScrollBar:u,shards:f,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),s?h.cloneElement(h.Children.only(c),re(re({},y),{ref:E})):h.createElement($,re({},y,{className:l,ref:E}),c))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:kt,zeroRight:Dt};var mm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mm();return t&&e.setAttribute("nonce",t),e}function gm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hm())&&(gm(t,n),vm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xm=function(){var e=bm();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rr=function(){var e=xm(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},$m={left:0,top:0,right:0,gap:0},ro=function(e){return parseInt(e||"",10)||0},wm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[ro(n),ro(o),ro(r)]},Cm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $m;var t=wm(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},ym=rr(),vt="data-scroll-locked",Em=function(e,t,n,o){var r=e.left,a=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
12
|
-
.`.concat(im,` {
|
|
13
|
-
overflow: hidden `).concat(o,`;
|
|
14
|
-
padding-right: `).concat(c,"px ").concat(o,`;
|
|
15
|
-
}
|
|
16
|
-
body[`).concat(vt,`] {
|
|
17
|
-
overflow: hidden `).concat(o,`;
|
|
18
|
-
overscroll-behavior: contain;
|
|
19
|
-
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
20
|
-
padding-left: `.concat(r,`px;
|
|
21
|
-
padding-top: `).concat(a,`px;
|
|
22
|
-
padding-right: `).concat(s,`px;
|
|
23
|
-
margin-left:0;
|
|
24
|
-
margin-top:0;
|
|
25
|
-
margin-right: `).concat(c,"px ").concat(o,`;
|
|
26
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.`).concat(Dt,` {
|
|
30
|
-
right: `).concat(c,"px ").concat(o,`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.`).concat(kt,` {
|
|
34
|
-
margin-right: `).concat(c,"px ").concat(o,`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.`).concat(Dt," .").concat(Dt,` {
|
|
38
|
-
right: 0 `).concat(o,`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.`).concat(kt," .").concat(kt,` {
|
|
42
|
-
margin-right: 0 `).concat(o,`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
body[`).concat(vt,`] {
|
|
46
|
-
`).concat(lm,": ").concat(c,`px;
|
|
47
|
-
}
|
|
48
|
-
`)},ua=function(){var e=parseInt(document.body.getAttribute(vt)||"0",10);return isFinite(e)?e:0},Sm=function(){h.useEffect(function(){return document.body.setAttribute(vt,(ua()+1).toString()),function(){var e=ua()-1;e<=0?document.body.removeAttribute(vt):document.body.setAttribute(vt,e.toString())}},[])},Mc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Sm();var a=h.useMemo(function(){return Cm(r)},[r]);return h.createElement(ym,{styles:Em(a,!t,r,n?"":"!important")})},$o=!1;if(typeof window<"u")try{var tn=Object.defineProperty({},"passive",{get:function(){return $o=!0,!0}});window.addEventListener("test",tn,tn),window.removeEventListener("test",tn,tn)}catch{$o=!1}var ft=$o?{passive:!1}:!1,Rm=function(e){return e.tagName==="TEXTAREA"},Ac=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Rm(e)&&n[t]==="visible")},Pm=function(e){return Ac(e,"overflowY")},_m=function(e){return Ac(e,"overflowX")},da=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Ic(e,n);if(o){var r=Oc(e,n),a=r[1],s=r[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Tm=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Nm=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Ic=function(e,t){return e==="v"?Pm(t):_m(t)},Oc=function(e,t){return e==="v"?Tm(t):Nm(t)},Mm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Am=function(e,t,n,o,r){var a=Mm(e,window.getComputedStyle(t).direction),s=a*o,c=n.target,l=t.contains(c),u=!1,d=s>0,f=0,g=0;do{var b=Oc(e,c),v=b[0],m=b[1],x=b[2],$=m-x-a*v;(v||$)&&Ic(e,c)&&(f+=$,g+=v),c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&(f===0||!r)||!d&&(g===0||!r))&&(u=!0),u},nn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fa=function(e){return[e.deltaX,e.deltaY]},pa=function(e){return e&&"current"in e?e.current:e},Im=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Om=function(e){return`
|
|
49
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
50
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
51
|
-
`)},Dm=0,pt=[];function km(e){var t=h.useRef([]),n=h.useRef([0,0]),o=h.useRef(),r=h.useState(Dm++)[0],a=h.useState(function(){return rr()})[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Sc([e.lockRef.current],(e.shards||[]).map(pa),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=h.useCallback(function(m,x){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var $=nn(m),w=n.current,C="deltaX"in m?m.deltaX:w[0]-$[0],E="deltaY"in m?m.deltaY:w[1]-$[1],y,_=m.target,S=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in m&&S==="h"&&_.type==="range")return!1;var P=da(S,_);if(!P)return!0;if(P?y=S:(y=S==="v"?"h":"v",P=da(S,_)),!P)return!1;if(!o.current&&"changedTouches"in m&&(C||E)&&(o.current=y),!y)return!0;var I=o.current||y;return Am(I,x,m,I==="h"?C:E,!0)},[]),l=h.useCallback(function(m){var x=m;if(!(!pt.length||pt[pt.length-1]!==a)){var $="deltaY"in x?fa(x):nn(x),w=t.current.filter(function(y){return y.name===x.type&&y.target===x.target&&Im(y.delta,$)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(pa).filter(Boolean).filter(function(y){return y.contains(x.target)}),E=C.length>0?c(x,C[0]):!s.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=h.useCallback(function(m,x,$,w){var C={name:m,delta:x,target:$,should:w};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),d=h.useCallback(function(m){n.current=nn(m),o.current=void 0},[]),f=h.useCallback(function(m){u(m.type,fa(m),m.target,c(m,e.lockRef.current))},[]),g=h.useCallback(function(m){u(m.type,nn(m),m.target,c(m,e.lockRef.current))},[]);h.useEffect(function(){return pt.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",l,ft),document.addEventListener("touchmove",l,ft),document.addEventListener("touchstart",d,ft),function(){pt=pt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ft),document.removeEventListener("touchmove",l,ft),document.removeEventListener("touchstart",d,ft)}},[]);var b=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(a,{styles:Om(r)}):null,b?h.createElement(Mc,{gapMode:"margin"}):null)}const jm=Tc(Nc,km);var ar=h.forwardRef(function(e,t){return h.createElement(In,re({},e,{ref:t,sideCar:jm}))});ar.classNames=In.classNames;const Lm=[" ","Enter","ArrowUp","ArrowDown"],Fm=[" ","Enter"],On="Select",[Dn,kn,Bm]=Wo(On),[Mt,_w]=Oe(On,[Bm,Nt]),jn=Nt(),[Vm,Qe]=Mt(On),[Hm,zm]=Mt(On),Wm=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:g,required:b}=e,v=jn(t),[m,x]=i.useState(null),[$,w]=i.useState(null),[C,E]=i.useState(!1),y=Go(u),[_=!1,S]=Ue({prop:o,defaultProp:r,onChange:a}),[P,I]=Ue({prop:s,defaultProp:c,onChange:l}),N=i.useRef(null),D=m?!!m.closest("form"):!0,[k,V]=i.useState(new Set),F=Array.from(k).map(O=>O.props.value).join(";");return i.createElement(Mn,v,i.createElement(Vm,{required:b,scope:t,trigger:m,onTriggerChange:x,valueNode:$,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:E,contentId:Ne(),value:P,onValueChange:I,open:_,onOpenChange:S,dir:y,triggerPointerDownPosRef:N,disabled:g},i.createElement(Dn.Provider,{scope:t},i.createElement(Hm,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(O=>{V(B=>new Set(B).add(O))},[]),onNativeOptionRemove:i.useCallback(O=>{V(B=>{const L=new Set(B);return L.delete(O),L})},[])},n)),D?i.createElement(Fc,{key:F,"aria-hidden":!0,required:b,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:O=>I(O.target.value),disabled:g},P===void 0?i.createElement("option",{value:""}):null,Array.from(k)):null))},Gm="SelectTrigger",Um=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=jn(n),s=Qe(Gm,n),c=s.disabled||o,l=J(t,s.onTriggerChange),u=kn(n),[d,f,g]=Bc(v=>{const m=u().filter(w=>!w.disabled),x=m.find(w=>w.value===s.value),$=Vc(m,v,x);$!==void 0&&s.onValueChange($.value)}),b=()=>{c||(s.onOpenChange(!0),g())};return i.createElement(er,R({asChild:!0},a),i.createElement(q.button,R({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:c,"data-disabled":c?"":void 0,"data-placeholder":Lc(s.value)?"":void 0},r,{ref:l,onClick:A(r.onClick,v=>{v.currentTarget.focus()}),onPointerDown:A(r.onPointerDown,v=>{const m=v.target;m.hasPointerCapture(v.pointerId)&&m.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(b(),s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:A(r.onKeyDown,v=>{const m=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&f(v.key),!(m&&v.key===" ")&&Lm.includes(v.key)&&(b(),v.preventDefault())})})))}),Km="SelectValue",Ym=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:s="",...c}=e,l=Qe(Km,n),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=J(t,l.onValueNodeChange);return he(()=>{u(d)},[u,d]),i.createElement(q.span,R({},c,{ref:f,style:{pointerEvents:"none"}}),Lc(l.value)?i.createElement(i.Fragment,null,s):a)}),Xm=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return i.createElement(q.span,R({"aria-hidden":!0},r,{ref:t}),o||"▼")}),qm=e=>i.createElement(nr,R({asChild:!0},e)),yt="SelectContent",Zm=i.forwardRef((e,t)=>{const n=Qe(yt,e.__scopeSelect),[o,r]=i.useState();if(he(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?ct.createPortal(i.createElement(Dc,{scope:e.__scopeSelect},i.createElement(Dn.Slot,{scope:e.__scopeSelect},i.createElement("div",null,e.children))),a):null}return i.createElement(Qm,R({},e,{ref:t}))}),Pe=10,[Dc,Je]=Mt(yt),Qm=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:g,collisionPadding:b,sticky:v,hideWhenDetached:m,avoidCollisions:x,...$}=e,w=Qe(yt,n),[C,E]=i.useState(null),[y,_]=i.useState(null),S=J(t,j=>E(j)),[P,I]=i.useState(null),[N,D]=i.useState(null),k=kn(n),[V,F]=i.useState(!1),O=i.useRef(!1);i.useEffect(()=>{if(C)return An(C)},[C]),Ys();const B=i.useCallback(j=>{const[G,...U]=k().map(X=>X.ref.current),[K]=U.slice(-1),Y=document.activeElement;for(const X of j)if(X===Y||(X==null||X.scrollIntoView({block:"nearest"}),X===G&&y&&(y.scrollTop=0),X===K&&y&&(y.scrollTop=y.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[k,y]),L=i.useCallback(()=>B([P,C]),[B,P,C]);i.useEffect(()=>{V&&L()},[V,L]);const{onOpenChange:W,triggerPointerDownPosRef:M}=w;i.useEffect(()=>{if(C){let j={x:0,y:0};const G=K=>{var Y,X,ne,oe;j={x:Math.abs(Math.round(K.pageX)-((Y=(X=M.current)===null||X===void 0?void 0:X.x)!==null&&Y!==void 0?Y:0)),y:Math.abs(Math.round(K.pageY)-((ne=(oe=M.current)===null||oe===void 0?void 0:oe.y)!==null&&ne!==void 0?ne:0))}},U=K=>{j.x<=10&&j.y<=10?K.preventDefault():C.contains(K.target)||W(!1),document.removeEventListener("pointermove",G),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",U,{capture:!0})}}},[C,W,M]),i.useEffect(()=>{const j=()=>W(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[W]);const[Z,Q]=Bc(j=>{const G=k().filter(Y=>!Y.disabled),U=G.find(Y=>Y.ref.current===document.activeElement),K=Vc(G,j,U);K&&setTimeout(()=>K.ref.current.focus())}),se=i.useCallback((j,G,U)=>{const K=!O.current&&!U;(w.value!==void 0&&w.value===G||K)&&(I(j),K&&(O.current=!0))},[w.value]),ue=i.useCallback(()=>C==null?void 0:C.focus(),[C]),de=i.useCallback((j,G,U)=>{const K=!O.current&&!U;(w.value!==void 0&&w.value===G||K)&&D(j)},[w.value]),fe=o==="popper"?ma:Jm,te=fe===ma?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:g,collisionPadding:b,sticky:v,hideWhenDetached:m,avoidCollisions:x}:{};return i.createElement(Dc,{scope:n,content:C,viewport:y,onViewportChange:_,itemRefCallback:se,selectedItem:P,onItemLeave:ue,itemTextRefCallback:de,focusSelectedItem:L,selectedItemText:N,position:o,isPositioned:V,searchRef:Z},i.createElement(ar,{as:wt,allowPinchZoom:!0},i.createElement(Xs,{asChild:!0,trapped:w.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:A(r,j=>{var G;(G=w.trigger)===null||G===void 0||G.focus({preventScroll:!0}),j.preventDefault()})},i.createElement(Uo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},i.createElement(fe,R({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:j=>j.preventDefault()},$,te,{onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...$.style},onKeyDown:A($.onKeyDown,j=>{const G=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!G&&j.key.length===1&&Q(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let K=k().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(j.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const Y=j.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>B(K)),j.preventDefault()}})}))))))}),Jm=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=Qe(yt,n),s=Je(yt,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=J(t,S=>d(S)),g=kn(n),b=i.useRef(!1),v=i.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:$,focusSelectedItem:w}=s,C=i.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&u&&m&&x&&$){const S=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),N=$.getBoundingClientRect();if(a.dir!=="rtl"){const Y=N.left-P.left,X=I.left-Y,ne=S.left-X,oe=S.width+ne,xe=Math.max(oe,P.width),Le=window.innerWidth-Pe,nt=Ur(X,[Pe,Le-xe]);c.style.minWidth=oe+"px",c.style.left=nt+"px"}else{const Y=P.right-N.right,X=window.innerWidth-I.right-Y,ne=window.innerWidth-S.right-X,oe=S.width+ne,xe=Math.max(oe,P.width),Le=window.innerWidth-Pe,nt=Ur(X,[Pe,Le-xe]);c.style.minWidth=oe+"px",c.style.right=nt+"px"}const D=g(),k=window.innerHeight-Pe*2,V=m.scrollHeight,F=window.getComputedStyle(u),O=parseInt(F.borderTopWidth,10),B=parseInt(F.paddingTop,10),L=parseInt(F.borderBottomWidth,10),W=parseInt(F.paddingBottom,10),M=O+B+V+W+L,Z=Math.min(x.offsetHeight*5,M),Q=window.getComputedStyle(m),se=parseInt(Q.paddingTop,10),ue=parseInt(Q.paddingBottom,10),de=S.top+S.height/2-Pe,fe=k-de,te=x.offsetHeight/2,j=x.offsetTop+te,G=O+B+j,U=M-G;if(G<=de){const Y=x===D[D.length-1].ref.current;c.style.bottom="0px";const X=u.clientHeight-m.offsetTop-m.offsetHeight,ne=Math.max(fe,te+(Y?ue:0)+X+L),oe=G+ne;c.style.height=oe+"px"}else{const Y=x===D[0].ref.current;c.style.top="0px";const ne=Math.max(de,O+m.offsetTop+(Y?se:0)+te)+U;c.style.height=ne+"px",m.scrollTop=G-de+m.offsetTop}c.style.margin=`${Pe}px 0`,c.style.minHeight=Z+"px",c.style.maxHeight=k+"px",o==null||o(),requestAnimationFrame(()=>b.current=!0)}},[g,a.trigger,a.valueNode,c,u,m,x,$,a.dir,o]);he(()=>C(),[C]);const[E,y]=i.useState();he(()=>{u&&y(window.getComputedStyle(u).zIndex)},[u]);const _=i.useCallback(S=>{S&&v.current===!0&&(C(),w==null||w(),v.current=!1)},[C,w]);return i.createElement(eh,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:b,onScrollButtonChange:_},i.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},i.createElement(q.div,R({},r,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}}))))}),ma=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Pe,...a}=e,s=jn(n);return i.createElement(tr,R({},s,a,{ref:t,align:o,collisionPadding:r,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)"}}))}),[eh,sr]=Mt(yt,{}),ha="SelectViewport",th=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Je(ha,n),a=sr(ha,n),s=J(t,r.onViewportChange),c=i.useRef(0);return i.createElement(i.Fragment,null,i.createElement("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}"}}),i.createElement(Dn.Slot,{scope:n},i.createElement(q.div,R({"data-radix-select-viewport":"",role:"presentation"},o,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:A(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&d){const g=Math.abs(c.current-u.scrollTop);if(g>0){const b=window.innerHeight-Pe*2,v=parseFloat(d.style.minHeight),m=parseFloat(d.style.height),x=Math.max(v,m);if(x<b){const $=x+g,w=Math.min(b,$),C=$-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})}))))}),nh="SelectGroup",[oh,rh]=Mt(nh),ah=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ne();return i.createElement(oh,{scope:n,id:r},i.createElement(q.div,R({role:"group","aria-labelledby":r},o,{ref:t})))}),sh="SelectLabel",ch=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=rh(sh,n);return i.createElement(q.div,R({id:r.id},o,{ref:t}))}),wo="SelectItem",[ih,kc]=Mt(wo),lh=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...s}=e,c=Qe(wo,n),l=Je(wo,n),u=c.value===o,[d,f]=i.useState(a??""),[g,b]=i.useState(!1),v=J(t,$=>{var w;return(w=l.itemRefCallback)===null||w===void 0?void 0:w.call(l,$,o,r)}),m=Ne(),x=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.createElement(ih,{scope:n,value:o,disabled:r,textId:m,isSelected:u,onItemTextChange:i.useCallback($=>{f(w=>{var C;return w||((C=$==null?void 0:$.textContent)!==null&&C!==void 0?C:"").trim()})},[])},i.createElement(Dn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d},i.createElement(q.div,R({role:"option","aria-labelledby":m,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1},s,{ref:v,onFocus:A(s.onFocus,()=>b(!0)),onBlur:A(s.onBlur,()=>b(!1)),onPointerUp:A(s.onPointerUp,x),onPointerMove:A(s.onPointerMove,$=>{if(r){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}else $.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(s.onPointerLeave,$=>{if($.currentTarget===document.activeElement){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}}),onKeyDown:A(s.onKeyDown,$=>{var w;((w=l.searchRef)===null||w===void 0?void 0:w.current)!==""&&$.key===" "||(Fm.includes($.key)&&x(),$.key===" "&&$.preventDefault())})}))))}),on="SelectItemText",uh=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,s=Qe(on,n),c=Je(on,n),l=kc(on,n),u=zm(on,n),[d,f]=i.useState(null),g=J(t,$=>f($),l.onItemTextChange,$=>{var w;return(w=c.itemTextRefCallback)===null||w===void 0?void 0:w.call(c,$,l.value,l.disabled)}),b=d==null?void 0:d.textContent,v=i.useMemo(()=>i.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},b),[l.disabled,l.value,b]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return he(()=>(m(v),()=>x(v)),[m,x,v]),i.createElement(i.Fragment,null,i.createElement(q.span,R({id:l.textId},a,{ref:g})),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?ct.createPortal(a.children,s.valueNode):null)}),dh="SelectItemIndicator",fh=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return kc(dh,n).isSelected?i.createElement(q.span,R({"aria-hidden":!0},o,{ref:t})):null}),ga="SelectScrollUpButton",ph=i.forwardRef((e,t)=>{const n=Je(ga,e.__scopeSelect),o=sr(ga,e.__scopeSelect),[r,a]=i.useState(!1),s=J(t,o.onScrollButtonChange);return he(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?i.createElement(jc,R({},e,{ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}})):null}),va="SelectScrollDownButton",mh=i.forwardRef((e,t)=>{const n=Je(va,e.__scopeSelect),o=sr(va,e.__scopeSelect),[r,a]=i.useState(!1),s=J(t,o.onScrollButtonChange);return he(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?i.createElement(jc,R({},e,{ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}})):null}),jc=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Je("SelectScrollButton",n),s=i.useRef(null),c=kn(n),l=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),he(()=>{var u;const d=c().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[c]),i.createElement(q.div,R({"aria-hidden":!0},r,{ref:t,style:{flexShrink:0,...r.style},onPointerDown:A(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:A(r.onPointerMove,()=>{var u;(u=a.onItemLeave)===null||u===void 0||u.call(a),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:A(r.onPointerLeave,()=>{l()})}))}),hh=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return i.createElement(q.div,R({"aria-hidden":!0},o,{ref:t}))}),ba="SelectArrow",gh=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=jn(n),a=Qe(ba,n),s=Je(ba,n);return a.open&&s.position==="popper"?i.createElement(wc,R({},r,o,{ref:t})):null});function Lc(e){return e===""||e===void 0}const Fc=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=i.useRef(null),a=J(t,r),s=Cc(n);return i.useEffect(()=>{const c=r.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(c,n),c.dispatchEvent(f)}},[s,n]),i.createElement(yc,{asChild:!0},i.createElement("select",R({},o,{ref:a,defaultValue:n})))});Fc.displayName="BubbleSelect";function Bc(e){const t=me(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(s=>{const c=n.current+s;t(c),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),a=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function Vc(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=vh(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function vh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const bh=Wm,xh=Um,$h=Ym,wh=Xm,Ch=qm,yh=Zm,Eh=th,Sh=ah,Rh=ch,Ph=lh,_h=uh,Th=fh,Nh=ph,Mh=mh,Ah=hh,Ih=gh,Hc=bh,Oh=Ih,cr=i.forwardRef((e,t)=>{const{placeholder:n,className:o,...r}=e;return p.jsxs(xh,{ref:t,...r,className:T(o,"fp-SelectTrigger"),children:[p.jsx($h,{placeholder:n}),p.jsx(wh,{className:"fp-SelectTriggerIcon",children:p.jsx(Ls,{})})]})}),ir=i.forwardRef((e,t)=>{const{children:n,portal:o=!1,className:r,...a}=e,s=o?Ch:i.Fragment;return p.jsx(s,{children:p.jsxs(yh,{ref:t,...a,className:T(r,"fp-MenuContent"),children:[p.jsx(Nh,{className:"fp-SelectScrollUpButton",children:p.jsx(Tf,{})}),p.jsx(Eh,{children:n}),p.jsx(Mh,{className:"fp-SelectScrollDownButton",children:p.jsx(Ls,{})})]})})}),lr=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(Ph,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[p.jsx(Th,{className:"fp-MenuItemIndicator",children:p.jsx(_n,{size:"4"})}),p.jsx(_h,{children:n})]})}),zc=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Ah,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),Wc=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Rh,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),Gc=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Sh,{ref:t,className:T(n,"fp-MenuGroup"),...o})});cr.displayName="Select.Trigger";ir.displayName="Select.Content";lr.displayName="Select.Item";zc.displayName="Select.Separator";Gc.displayName="Select.Group";Wc.displayName="Select.Label";const Dh=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Oh,Content:ir,Group:Gc,Item:lr,Label:Wc,Root:Hc,Separator:zc,Trigger:cr},Symbol.toStringTag,{value:"Module"}));function kh(e,t){return i.useReducer((n,o)=>{const r=t[n][o];return r??n},e)}const it=e=>{const{present:t,children:n}=e,o=jh(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),a=J(o.ref,r.ref);return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:a}):null};it.displayName="Presence";function jh(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[c,l]=kh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=rn(o.current);a.current=c==="mounted"?u:"none"},[c]),he(()=>{const u=o.current,d=r.current;if(d!==e){const g=a.current,b=rn(u);e?l("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&g!==b?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),he(()=>{if(t){const u=f=>{const b=rn(o.current).includes(f.animationName);f.target===t&&b&&ct.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(a.current=rn(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function rn(e){return(e==null?void 0:e.animationName)||"none"}const ao="rovingFocusGroup.onEntryFocus",Lh={bubbles:!1,cancelable:!0},ur="RovingFocusGroup",[Co,Uc,Fh]=Wo(ur),[Bh,Kc]=Oe(ur,[Fh]),[Vh,Hh]=Bh(ur),zh=i.forwardRef((e,t)=>i.createElement(Co.Provider,{scope:e.__scopeRovingFocusGroup},i.createElement(Co.Slot,{scope:e.__scopeRovingFocusGroup},i.createElement(Wh,R({},e,{ref:t}))))),Wh=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,f=i.useRef(null),g=J(t,f),b=Go(a),[v=null,m]=Ue({prop:s,defaultProp:c,onChange:l}),[x,$]=i.useState(!1),w=me(u),C=Uc(n),E=i.useRef(!1),[y,_]=i.useState(0);return i.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(ao,w),()=>S.removeEventListener(ao,w)},[w]),i.createElement(Vh,{scope:n,orientation:o,dir:b,loop:r,currentTabStopId:v,onItemFocus:i.useCallback(S=>m(S),[m]),onItemShiftTab:i.useCallback(()=>$(!0),[]),onFocusableItemAdd:i.useCallback(()=>_(S=>S+1),[]),onFocusableItemRemove:i.useCallback(()=>_(S=>S-1),[])},i.createElement(q.div,R({tabIndex:x||y===0?-1:0,"data-orientation":o},d,{ref:g,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{E.current=!0}),onFocus:A(e.onFocus,S=>{const P=!E.current;if(S.target===S.currentTarget&&P&&!x){const I=new CustomEvent(ao,Lh);if(S.currentTarget.dispatchEvent(I),!I.defaultPrevented){const N=C().filter(O=>O.focusable),D=N.find(O=>O.active),k=N.find(O=>O.id===v),F=[D,k,...N].filter(Boolean).map(O=>O.ref.current);Yc(F)}}E.current=!1}),onBlur:A(e.onBlur,()=>$(!1))})))}),Gh="RovingFocusGroupItem",Uh=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...s}=e,c=Ne(),l=a||c,u=Hh(Gh,n),d=u.currentTabStopId===l,f=Uc(n),{onFocusableItemAdd:g,onFocusableItemRemove:b}=u;return i.useEffect(()=>{if(o)return g(),()=>b()},[o,g,b]),i.createElement(Co.ItemSlot,{scope:n,id:l,focusable:o,active:r},i.createElement(q.span,R({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:t,onMouseDown:A(e.onMouseDown,v=>{o?u.onItemFocus(l):v.preventDefault()}),onFocus:A(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:A(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=Xh(v,u.orientation,u.dir);if(m!==void 0){v.preventDefault();let $=f().filter(w=>w.focusable).map(w=>w.ref.current);if(m==="last")$.reverse();else if(m==="prev"||m==="next"){m==="prev"&&$.reverse();const w=$.indexOf(v.currentTarget);$=u.loop?qh($,w+1):$.slice(w+1)}setTimeout(()=>Yc($))}})})))}),Kh={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yh(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xh(e,t,n){const o=Yh(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Kh[o]}function Yc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const Zh=zh,Qh=Uh,yo=["Enter"," "],Jh=["ArrowDown","PageUp","Home"],Xc=["ArrowUp","PageDown","End"],eg=[...Jh,...Xc],tg={ltr:[...yo,"ArrowRight"],rtl:[...yo,"ArrowLeft"]},ng={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[Ft,og,rg]=Wo(Ln),[lt,Fn]=Oe(Ln,[rg,Nt,Kc]),Bn=Nt(),qc=Kc(),[Zc,et]=lt(Ln),[ag,Ut]=lt(Ln),sg=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:s=!0}=e,c=Bn(t),[l,u]=i.useState(null),d=i.useRef(!1),f=me(a),g=Go(r);return i.useEffect(()=>{const b=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),i.createElement(Mn,c,i.createElement(Zc,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u},i.createElement(ag,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:g,modal:s},o)))},Qc=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Bn(n);return i.createElement(er,R({},r,o,{ref:t}))}),Jc="MenuPortal",[cg,ei]=lt(Jc,{forceMount:void 0}),ig=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=et(Jc,t);return i.createElement(cg,{scope:t,forceMount:n},i.createElement(it,{present:n||a.open},i.createElement(nr,{asChild:!0,container:r},o)))},$e="MenuContent",[lg,dr]=lt($e),ug=i.forwardRef((e,t)=>{const n=ei($e,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=et($e,e.__scopeMenu),s=Ut($e,e.__scopeMenu);return i.createElement(Ft.Provider,{scope:e.__scopeMenu},i.createElement(it,{present:o||a.open},i.createElement(Ft.Slot,{scope:e.__scopeMenu},s.modal?i.createElement(dg,R({},r,{ref:t})):i.createElement(fg,R({},r,{ref:t})))))}),dg=i.forwardRef((e,t)=>{const n=et($e,e.__scopeMenu),o=i.useRef(null),r=J(t,o);return i.useEffect(()=>{const a=o.current;if(a)return An(a)},[]),i.createElement(fr,R({},e,{ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),fg=i.forwardRef((e,t)=>{const n=et($e,e.__scopeMenu);return i.createElement(fr,R({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),fr=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:g,onDismiss:b,disableOutsideScroll:v,...m}=e,x=et($e,n),$=Ut($e,n),w=Bn(n),C=qc(n),E=og(n),[y,_]=i.useState(null),S=i.useRef(null),P=J(t,S,x.onContentChange),I=i.useRef(0),N=i.useRef(""),D=i.useRef(0),k=i.useRef(null),V=i.useRef("right"),F=i.useRef(0),O=v?ar:i.Fragment,B=v?{as:wt,allowPinchZoom:!0}:void 0,L=M=>{var Z,Q;const se=N.current+M,ue=E().filter(U=>!U.disabled),de=document.activeElement,fe=(Z=ue.find(U=>U.ref.current===de))===null||Z===void 0?void 0:Z.textValue,te=ue.map(U=>U.textValue),j=Mg(te,se,fe),G=(Q=ue.find(U=>U.textValue===j))===null||Q===void 0?void 0:Q.ref.current;(function U(K){N.current=K,window.clearTimeout(I.current),K!==""&&(I.current=window.setTimeout(()=>U(""),1e3))})(se),G&&setTimeout(()=>G.focus())};i.useEffect(()=>()=>window.clearTimeout(I.current),[]),Ys();const W=i.useCallback(M=>{var Z,Q;return V.current===((Z=k.current)===null||Z===void 0?void 0:Z.side)&&Ig(M,(Q=k.current)===null||Q===void 0?void 0:Q.area)},[]);return i.createElement(lg,{scope:n,searchRef:N,onItemEnter:i.useCallback(M=>{W(M)&&M.preventDefault()},[W]),onItemLeave:i.useCallback(M=>{var Z;W(M)||((Z=S.current)===null||Z===void 0||Z.focus(),_(null))},[W]),onTriggerLeave:i.useCallback(M=>{W(M)&&M.preventDefault()},[W]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback(M=>{k.current=M},[])},i.createElement(O,B,i.createElement(Xs,{asChild:!0,trapped:r,onMountAutoFocus:A(a,M=>{var Z;M.preventDefault(),(Z=S.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:s},i.createElement(Uo,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:g,onDismiss:b},i.createElement(Zh,R({asChild:!0},C,{dir:$.dir,orientation:"vertical",loop:o,currentTabStopId:y,onCurrentTabStopIdChange:_,onEntryFocus:A(l,M=>{$.isUsingKeyboardRef.current||M.preventDefault()})}),i.createElement(tr,R({role:"menu","aria-orientation":"vertical","data-state":ci(x.open),"data-radix-menu-content":"",dir:$.dir},w,m,{ref:P,style:{outline:"none",...m.style},onKeyDown:A(m.onKeyDown,M=>{const Q=M.target.closest("[data-radix-menu-content]")===M.currentTarget,se=M.ctrlKey||M.altKey||M.metaKey,ue=M.key.length===1;Q&&(M.key==="Tab"&&M.preventDefault(),!se&&ue&&L(M.key));const de=S.current;if(M.target!==de||!eg.includes(M.key))return;M.preventDefault();const te=E().filter(j=>!j.disabled).map(j=>j.ref.current);Xc.includes(M.key)&&te.reverse(),Tg(te)}),onBlur:A(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(I.current),N.current="")}),onPointerMove:A(e.onPointerMove,Bt(M=>{const Z=M.target,Q=F.current!==M.clientX;if(M.currentTarget.contains(Z)&&Q){const se=M.clientX>F.current?"right":"left";V.current=se,F.current=M.clientX}}))})))))))}),ti=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({role:"group"},o,{ref:t}))}),pg=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({},o,{ref:t}))}),Eo="MenuItem",xa="menu.itemSelect",pr=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=i.useRef(null),s=Ut(Eo,e.__scopeMenu),c=dr(Eo,e.__scopeMenu),l=J(t,a),u=i.useRef(!1),d=()=>{const f=a.current;if(!n&&f){const g=new CustomEvent(xa,{bubbles:!0,cancelable:!0});f.addEventListener(xa,b=>o==null?void 0:o(b),{once:!0}),Us(f,g),g.defaultPrevented?u.current=!1:s.onClose()}};return i.createElement(ni,R({},r,{ref:l,disabled:n,onClick:A(e.onClick,d),onPointerDown:f=>{var g;(g=e.onPointerDown)===null||g===void 0||g.call(e,f),u.current=!0},onPointerUp:A(e.onPointerUp,f=>{var g;u.current||(g=f.currentTarget)===null||g===void 0||g.click()}),onKeyDown:A(e.onKeyDown,f=>{const g=c.searchRef.current!=="";n||g&&f.key===" "||yo.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),ni=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,s=dr(Eo,n),c=qc(n),l=i.useRef(null),u=J(t,l),[d,f]=i.useState(!1),[g,b]=i.useState("");return i.useEffect(()=>{const v=l.current;if(v){var m;b(((m=v.textContent)!==null&&m!==void 0?m:"").trim())}},[a.children]),i.createElement(Ft.ItemSlot,{scope:n,disabled:o,textValue:r??g},i.createElement(Qh,R({asChild:!0},c,{focusable:!o}),i.createElement(q.div,R({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:u,onPointerMove:A(e.onPointerMove,Bt(v=>{o?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:A(e.onPointerLeave,Bt(v=>s.onItemLeave(v))),onFocus:A(e.onFocus,()=>f(!0)),onBlur:A(e.onBlur,()=>f(!1))}))))}),mg=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return i.createElement(ri,{scope:e.__scopeMenu,checked:n},i.createElement(pr,R({role:"menuitemcheckbox","aria-checked":xn(n)?"mixed":n},r,{ref:t,"data-state":mr(n),onSelect:A(r.onSelect,()=>o==null?void 0:o(xn(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),hg="MenuRadioGroup",[gg,vg]=lt(hg,{value:void 0,onValueChange:()=>{}}),bg=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=me(o);return i.createElement(gg,{scope:e.__scopeMenu,value:n,onValueChange:a},i.createElement(ti,R({},r,{ref:t})))}),xg="MenuRadioItem",$g=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=vg(xg,e.__scopeMenu),a=n===r.value;return i.createElement(ri,{scope:e.__scopeMenu,checked:a},i.createElement(pr,R({role:"menuitemradio","aria-checked":a},o,{ref:t,"data-state":mr(a),onSelect:A(o.onSelect,()=>{var s;return(s=r.onValueChange)===null||s===void 0?void 0:s.call(r,n)},{checkForDefaultPrevented:!1})})))}),oi="MenuItemIndicator",[ri,wg]=lt(oi,{checked:!1}),Cg=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=wg(oi,n);return i.createElement(it,{present:o||xn(a.checked)||a.checked===!0},i.createElement(q.span,R({},r,{ref:t,"data-state":mr(a.checked)})))}),yg=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({role:"separator","aria-orientation":"horizontal"},o,{ref:t}))}),ai="MenuSub",[Eg,si]=lt(ai),Sg=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,a=et(ai,t),s=Bn(t),[c,l]=i.useState(null),[u,d]=i.useState(null),f=me(r);return i.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),i.createElement(Mn,s,i.createElement(Zc,{scope:t,open:o,onOpenChange:f,content:u,onContentChange:d},i.createElement(Eg,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:c,onTriggerChange:l},n)))},an="MenuSubTrigger",Rg=i.forwardRef((e,t)=>{const n=et(an,e.__scopeMenu),o=Ut(an,e.__scopeMenu),r=si(an,e.__scopeMenu),a=dr(an,e.__scopeMenu),s=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),i.createElement(Qc,R({asChild:!0},u),i.createElement(ni,R({id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ci(n.open)},e,{ref:Tn(t,r.onTriggerChange),onClick:f=>{var g;(g=e.onClick)===null||g===void 0||g.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Bt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:A(e.onPointerLeave,Bt(f=>{var g;d();const b=(g=n.content)===null||g===void 0?void 0:g.getBoundingClientRect();if(b){var v;const m=(v=n.content)===null||v===void 0?void 0:v.dataset.side,x=m==="right",$=x?-5:5,w=b[x?"left":"right"],C=b[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+$,y:f.clientY},{x:w,y:b.top},{x:C,y:b.top},{x:C,y:b.bottom},{x:w,y:b.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,f=>{const g=a.searchRef.current!=="";if(!(e.disabled||g&&f.key===" ")&&tg[o.dir].includes(f.key)){var b;n.onOpenChange(!0),(b=n.content)===null||b===void 0||b.focus(),f.preventDefault()}})})))}),Pg="MenuSubContent",_g=i.forwardRef((e,t)=>{const n=ei($e,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=et($e,e.__scopeMenu),s=Ut($e,e.__scopeMenu),c=si(Pg,e.__scopeMenu),l=i.useRef(null),u=J(t,l);return i.createElement(Ft.Provider,{scope:e.__scopeMenu},i.createElement(it,{present:o||a.open},i.createElement(Ft.Slot,{scope:e.__scopeMenu},i.createElement(fr,R({id:c.contentId,"aria-labelledby":c.triggerId},r,{ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;s.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:A(e.onFocusOutside,d=>{d.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:A(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),g=ng[s.dir].includes(d.key);if(f&&g){var b;a.onOpenChange(!1),(b=c.trigger)===null||b===void 0||b.focus(),d.preventDefault()}})})))))});function ci(e){return e?"open":"closed"}function xn(e){return e==="indeterminate"}function mr(e){return xn(e)?"indeterminate":e?"checked":"unchecked"}function Tg(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ng(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Mg(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ng(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Ag(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const c=t[a].x,l=t[a].y,u=t[s].x,d=t[s].y;l>o!=d>o&&n<(u-c)*(o-l)/(d-l)+c&&(r=!r)}return r}function Ig(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ag(n,t)}function Bt(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ii=sg,li=Qc,ui=ig,di=ug,fi=ti,pi=pg,mi=pr,hi=mg,gi=bg,vi=$g,bi=Cg,xi=yg,$i=Sg,wi=Rg,Ci=_g,yi="DropdownMenu",[Og,Tw]=Oe(yi,[Fn]),ie=Fn(),[Dg,Ei]=Og(yi),kg=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=ie(t),u=i.useRef(null),[d=!1,f]=Ue({prop:r,defaultProp:a,onChange:s});return i.createElement(Dg,{scope:t,triggerId:Ne(),triggerRef:u,contentId:Ne(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(g=>!g),[f]),modal:c},i.createElement(ii,R({},l,{open:d,onOpenChange:f,dir:o,modal:c}),n))},jg="DropdownMenuTrigger",Lg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=Ei(jg,n),s=ie(n);return i.createElement(li,R({asChild:!0},s),i.createElement(q.button,R({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":o?"":void 0,disabled:o},r,{ref:Tn(t,a.triggerRef),onPointerDown:A(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:A(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})))}),Fg=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ie(t);return i.createElement(ui,R({},o,n))},Bg="DropdownMenuContent",Vg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Ei(Bg,n),a=ie(n),s=i.useRef(!1);return i.createElement(di,R({id:r.contentId,"aria-labelledby":r.triggerId},a,o,{ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,c=>{var l;s.current||(l=r.triggerRef.current)===null||l===void 0||l.focus(),s.current=!1,c.preventDefault()}),onInteractOutside:A(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(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)"}}))}),Hg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(fi,R({},r,o,{ref:t}))}),zg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(pi,R({},r,o,{ref:t}))}),Wg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(mi,R({},r,o,{ref:t}))}),Gg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(hi,R({},r,o,{ref:t}))}),Ug=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(gi,R({},r,o,{ref:t}))}),Kg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(vi,R({},r,o,{ref:t}))}),Yg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(bi,R({},r,o,{ref:t}))}),Xg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(xi,R({},r,o,{ref:t}))}),qg=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:a}=e,s=ie(t),[c=!1,l]=Ue({prop:o,defaultProp:a,onChange:r});return i.createElement($i,R({},s,{open:c,onOpenChange:l}),n)},Zg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(wi,R({},r,o,{ref:t}))}),Qg=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ie(n);return i.createElement(Ci,R({},r,o,{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)"}}))}),Jg=kg,ev=Lg,Si=Fg,tv=Vg,nv=Hg,ov=zg,rv=Wg,av=Gg,sv=Ug,cv=Kg,Ri=Yg,iv=Xg,lv=qg,uv=Zg,dv=Qg,fv=Jg,pv=ev,mv=lv,hv=sv,Pi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsx(Si,{children:p.jsx(tv,{ref:t,sideOffset:6,...r,className:T(o,"fp-MenuContent"),children:n})})}),_i=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(rv,{ref:t,...o,className:T(n,"fp-MenuItem")})}),Ti=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(iv,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),Ni=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(ov,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),Mi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(nv,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),Ai=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(uv,{ref:t,...r,className:T(o,"fp-MenuItem"),children:[n,p.jsx(Ho,{className:"fp-MenuSubtriggerCaret"})]})}),Ii=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Si,{children:p.jsx(dv,{ref:t,...o,className:T(n,"fp-MenuContent"),sideOffset:12})})}),Oi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(av,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[p.jsx(Ri,{className:"fp-MenuItemIndicator",children:p.jsx(_n,{size:"4"})}),n]})}),Di=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(cv,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuRadioItem"),children:[p.jsx(Ri,{className:"fp-MenuItemIndicator",children:p.jsx(Fs,{size:"4"})}),n]})});Pi.displayName="DropdownMenu.Content";_i.displayName="DropdownMenu.Item";Ti.displayName="DropdownMenu.Separator";Mi.displayName="DropdownMenu.Group";Ni.displayName="DropdownMenu.Label";Ai.displayName="DropdownMenu.SubTrigger";Ii.displayName="DropdownMenu.SubContent";Oi.displayName="DropdownMenu.CheckboxItem";Di.displayName="DropdownMenu.RadioItem";const gv=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:Oi,Content:Pi,Group:Mi,Item:_i,Label:Ni,RadioGroup:hv,RadioItem:Di,Root:fv,Separator:Ti,Sub:mv,SubContent:Ii,SubTrigger:Ai,Trigger:pv},Symbol.toStringTag,{value:"Module"})),ki="ContextMenu",[vv,Nw]=Oe(ki,[Fn]),le=Fn(),[bv,ji]=vv(ki),xv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,dir:r,modal:a=!0}=e,[s,c]=i.useState(!1),l=le(t),u=me(o),d=i.useCallback(f=>{c(f),u(f)},[u]);return i.createElement(bv,{scope:t,open:s,onOpenChange:d,modal:a},i.createElement(ii,R({},l,{dir:r,open:s,onOpenChange:d,modal:a}),n))},$v="ContextMenuTrigger",wv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:o=!1,...r}=e,a=ji($v,n),s=le(n),c=i.useRef({x:0,y:0}),l=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),u=i.useRef(0),d=i.useCallback(()=>window.clearTimeout(u.current),[]),f=g=>{c.current={x:g.clientX,y:g.clientY},a.onOpenChange(!0)};return i.useEffect(()=>d,[d]),i.useEffect(()=>void(o&&d()),[o,d]),i.createElement(i.Fragment,null,i.createElement(li,R({},s,{virtualRef:l})),i.createElement(q.span,R({"data-state":a.open?"open":"closed","data-disabled":o?"":void 0},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:A(e.onContextMenu,g=>{d(),f(g),g.preventDefault()}),onPointerDown:o?e.onPointerDown:A(e.onPointerDown,sn(g=>{d(),u.current=window.setTimeout(()=>f(g),700)})),onPointerMove:o?e.onPointerMove:A(e.onPointerMove,sn(d)),onPointerCancel:o?e.onPointerCancel:A(e.onPointerCancel,sn(d)),onPointerUp:o?e.onPointerUp:A(e.onPointerUp,sn(d))})))}),Cv=e=>{const{__scopeContextMenu:t,...n}=e,o=le(t);return i.createElement(ui,R({},o,n))},yv="ContextMenuContent",Ev=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ji(yv,n),a=le(n),s=i.useRef(!1);return i.createElement(di,R({},a,o,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,c),!c.defaultPrevented&&s.current&&c.preventDefault(),s.current=!1},onInteractOutside:c=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,c),!c.defaultPrevented&&!r.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Sv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(fi,R({},r,o,{ref:t}))}),Rv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(pi,R({},r,o,{ref:t}))}),Pv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(mi,R({},r,o,{ref:t}))}),_v=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(hi,R({},r,o,{ref:t}))}),Tv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(gi,R({},r,o,{ref:t}))}),Nv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(vi,R({},r,o,{ref:t}))}),Mv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(bi,R({},r,o,{ref:t}))}),Av=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(xi,R({},r,o,{ref:t}))}),Iv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,open:r,defaultOpen:a}=e,s=le(t),[c,l]=Ue({prop:r,defaultProp:a,onChange:o});return i.createElement($i,R({},s,{open:c,onOpenChange:l}),n)},Ov=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(wi,R({},r,o,{ref:t}))}),Dv=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=le(n);return i.createElement(Ci,R({},r,o,{ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))});function sn(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const kv=xv,jv=wv,Li=Cv,Lv=Ev,Fv=Sv,Bv=Rv,Vv=Pv,Hv=_v,zv=Tv,Wv=Nv,Fi=Mv,Gv=Av,Uv=Iv,Kv=Ov,Yv=Dv,Xv=kv,qv=jv,Zv=Uv,Qv=zv,Bi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsx(Li,{children:p.jsx(Lv,{ref:t,...r,className:T(o,"fp-MenuContent"),children:n})})}),Vi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Vv,{ref:t,...o,className:T(n,"fp-MenuItem")})}),Hi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Gv,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),zi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Bv,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),Wi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Fv,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),Gi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(Kv,{ref:t,...r,className:T(o,"fp-MenuItem"),children:[n,p.jsx(Ho,{className:"fp-MenuSubtriggerCaret"})]})}),Ui=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Li,{children:p.jsx(Yv,{ref:t,...o,className:T(n,"fp-MenuContent"),sideOffset:12})})}),Ki=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(Hv,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[p.jsx(Fi,{className:"fp-MenuItemIndicator",children:p.jsx(_n,{size:"4"})}),n]})}),Yi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsxs(Wv,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuRadioItem"),children:[p.jsx(Fi,{className:"fp-MenuItemIndicator",children:p.jsx(Fs,{size:"4"})}),n]})});Bi.displayName="ContextMenu.Content";Vi.displayName="ContextMenu.Item";Hi.displayName="ContextMenu.Separator";zi.displayName="ContextMenu.Label";Wi.displayName="ContextMenu.Group";Gi.displayName="ContextMenu.SubTrigger";Ui.displayName="ContextMenu.SubContent";Ki.displayName="ContextMenu.CheckboxItem";Yi.displayName="ContextMenu.RadioItem";const Jv=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:Ki,Content:Bi,Group:Wi,Item:Vi,Label:zi,RadioGroup:Qv,RadioItem:Yi,Root:Xv,Separator:Hi,Sub:Zv,SubContent:Ui,SubTrigger:Gi,Trigger:qv},Symbol.toStringTag,{value:"Module"}));function eb(e,t=globalThis==null?void 0:globalThis.document){const n=Te(e);h.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var tb="DismissableLayer",So="dismissableLayer.update",nb="dismissableLayer.pointerDownOutside",ob="dismissableLayer.focusOutside",$a,Xi=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hr=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=h.useContext(Xi),[d,f]=h.useState(null),g=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=h.useState({}),v=ee(t,S=>f(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),$=m.indexOf(x),w=d?m.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=$,y=sb(S=>{const P=S.target,I=[...u.branches].some(N=>N.contains(P));!E||I||(r==null||r(S),s==null||s(S),S.defaultPrevented||c==null||c())},g),_=cb(S=>{const P=S.target;[...u.branches].some(N=>N.contains(P))||(a==null||a(S),s==null||s(S),S.defaultPrevented||c==null||c())},g);return eb(S=>{w===u.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},g),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($a=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),wa(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=$a)}},[d,g,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),wa())},[d,u]),h.useEffect(()=>{const S=()=>b({});return document.addEventListener(So,S),()=>document.removeEventListener(So,S)},[]),p.jsx(z.div,{...l,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,_.onFocusCapture),onBlurCapture:H(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,y.onPointerDownCapture)})});hr.displayName=tb;var rb="DismissableLayerBranch",ab=h.forwardRef((e,t)=>{const n=h.useContext(Xi),o=h.useRef(null),r=ee(t,o);return h.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(z.div,{...e,ref:r})});ab.displayName=rb;function sb(e,t=globalThis==null?void 0:globalThis.document){const n=Te(e),o=h.useRef(!1),r=h.useRef(()=>{});return h.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let l=function(){qi(nb,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function cb(e,t=globalThis==null?void 0:globalThis.document){const n=Te(e),o=h.useRef(!1);return h.useEffect(()=>{const r=a=>{a.target&&!o.current&&qi(ob,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function wa(){const e=new CustomEvent(So);document.dispatchEvent(e)}function qi(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Td(r,a):r.dispatchEvent(a)}var so=0;function Zi(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ca()),document.body.insertAdjacentElement("beforeend",e[1]??Ca()),so++,()=>{so===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),so--}},[])}function Ca(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var co="focusScope.autoFocusOnMount",io="focusScope.autoFocusOnUnmount",ya={bubbles:!1,cancelable:!0},ib="FocusScope",gr=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[c,l]=h.useState(null),u=Te(r),d=Te(a),f=h.useRef(null),g=ee(t,m=>l(m)),b=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let m=function(C){if(b.paused||!c)return;const E=C.target;c.contains(E)?f.current=E:Be(f.current,{select:!0})},x=function(C){if(b.paused||!c)return;const E=C.relatedTarget;E!==null&&(c.contains(E)||Be(f.current,{select:!0}))},$=function(C){if(document.activeElement===document.body)for(const y of C)y.removedNodes.length>0&&Be(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const w=new MutationObserver($);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),w.disconnect()}}},[o,c,b.paused]),h.useEffect(()=>{if(c){Sa.add(b);const m=document.activeElement;if(!c.contains(m)){const $=new CustomEvent(co,ya);c.addEventListener(co,u),c.dispatchEvent($),$.defaultPrevented||(lb(mb(Qi(c)),{select:!0}),document.activeElement===m&&Be(c))}return()=>{c.removeEventListener(co,u),setTimeout(()=>{const $=new CustomEvent(io,ya);c.addEventListener(io,d),c.dispatchEvent($),$.defaultPrevented||Be(m??document.body,{select:!0}),c.removeEventListener(io,d),Sa.remove(b)},0)}}},[c,u,d,b]);const v=h.useCallback(m=>{if(!n&&!o||b.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,$=document.activeElement;if(x&&$){const w=m.currentTarget,[C,E]=ub(w);C&&E?!m.shiftKey&&$===E?(m.preventDefault(),n&&Be(C,{select:!0})):m.shiftKey&&$===C&&(m.preventDefault(),n&&Be(E,{select:!0})):$===w&&m.preventDefault()}},[n,o,b.paused]);return p.jsx(z.div,{tabIndex:-1,...s,ref:g,onKeyDown:v})});gr.displayName=ib;function lb(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Be(o,{select:t}),document.activeElement!==n)return}function ub(e){const t=Qi(e),n=Ea(t,e),o=Ea(t.reverse(),e);return[n,o]}function Qi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ea(e,t){for(const n of e)if(!db(n,{upTo:t}))return n}function db(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 fb(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fb(e)&&t&&e.select()}}var Sa=pb();function pb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ra(e,t),e.unshift(t)},remove(t){var n;e=Ra(e,t),(n=e[0])==null||n.resume()}}}function Ra(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function mb(e){return e.filter(t=>t.tagName!=="A")}var hb="Arrow",Ji=h.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return p.jsx(z.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ji.displayName=hb;var gb=Ji,vr="Popper",[el,tl]=be(vr),[vb,nl]=el(vr),ol=e=>{const{__scopePopper:t,children:n}=e,[o,r]=h.useState(null);return p.jsx(vb,{scope:t,anchor:o,onAnchorChange:r,children:n})};ol.displayName=vr;var rl="PopperAnchor",al=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=nl(rl,n),s=h.useRef(null),c=ee(t,s);return h.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:p.jsx(z.div,{...r,ref:c})});al.displayName=rl;var br="PopperContent",[bb,xb]=el(br),sl=h.forwardRef((e,t)=>{var j,G,U,K,Y,X;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:g=!1,updatePositionStrategy:b="optimized",onPlaced:v,...m}=e,x=nl(br,n),[$,w]=h.useState(null),C=ee(t,ne=>w(ne)),[E,y]=h.useState(null),_=Fo(E),S=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,I=o+(a!=="center"?"-"+a:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],k=D.length>0,V={padding:N,boundary:D.filter(wb),altBoundary:k},{refs:F,floatingStyles:O,placement:B,isPositioned:L,middlewareData:W}=cc({strategy:"fixed",placement:I,whileElementsMounted:(...ne)=>ac(...ne,{animationFrame:b==="always"}),elements:{reference:x.anchor},middleware:[ic({mainAxis:r+P,alignmentAxis:s}),l&&lc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?uc():void 0,...V}),l&&dc({...V}),fc({...V,apply:({elements:ne,rects:oe,availableWidth:xe,availableHeight:Le})=>{const{width:nt,height:Xn}=oe.reference,ut=ne.floating.style;ut.setProperty("--radix-popper-available-width",`${xe}px`),ut.setProperty("--radix-popper-available-height",`${Le}px`),ut.setProperty("--radix-popper-anchor-width",`${nt}px`),ut.setProperty("--radix-popper-anchor-height",`${Xn}px`)}}),E&&mc({element:E,padding:c}),Cb({arrowWidth:S,arrowHeight:P}),g&&pc({strategy:"referenceHidden",...V})]}),[M,Z]=ll(B),Q=Te(v);ze(()=>{L&&(Q==null||Q())},[L,Q]);const se=(j=W.arrow)==null?void 0:j.x,ue=(G=W.arrow)==null?void 0:G.y,de=((U=W.arrow)==null?void 0:U.centerOffset)!==0,[fe,te]=h.useState();return ze(()=>{$&&te(window.getComputedStyle($).zIndex)},[$]),p.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:L?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(K=W.transformOrigin)==null?void 0:K.x,(Y=W.transformOrigin)==null?void 0:Y.y].join(" "),...((X=W.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(bb,{scope:n,placedSide:M,onArrowChange:y,arrowX:se,arrowY:ue,shouldHideArrow:de,children:p.jsx(z.div,{"data-side":M,"data-align":Z,...m,ref:C,style:{...m.style,animation:L?void 0:"none"}})})})});sl.displayName=br;var cl="PopperArrow",$b={top:"bottom",right:"left",bottom:"top",left:"right"},il=h.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=xb(cl,o),s=$b[a.placedSide];return p.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:p.jsx(gb,{...r,ref:n,style:{...r.style,display:"block"}})})});il.displayName=cl;function wb(e){return e!==null}var Cb=e=>({name:"transformOrigin",options:e,fn(t){var x,$,w;const{placement:n,rects:o,middlewareData:r}=t,s=((x=r.arrow)==null?void 0:x.centerOffset)!==0,c=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=ll(n),f={start:"0%",center:"50%",end:"100%"}[d],g=((($=r.arrow)==null?void 0:$.x)??0)+c/2,b=(((w=r.arrow)==null?void 0:w.y)??0)+l/2;let v="",m="";return u==="bottom"?(v=s?f:`${g}px`,m=`${-l}px`):u==="top"?(v=s?f:`${g}px`,m=`${o.floating.height+l}px`):u==="right"?(v=`${-l}px`,m=s?f:`${b}px`):u==="left"&&(v=`${o.floating.width+l}px`,m=s?f:`${b}px`),{data:{x:v,y:m}}}});function ll(e){const[t,n="center"]=e.split("-");return[t,n]}var yb=ol,ul=al,Eb=sl,Sb=il,Rb="Portal",xr=h.forwardRef((e,t)=>{var c;const{container:n,...o}=e,[r,a]=h.useState(!1);ze(()=>a(!0),[]);const s=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?ct.createPortal(p.jsx(z.div,{...o,ref:t}),s):null});xr.displayName=Rb;var dl=Pc(),lo=function(){},Vn=h.forwardRef(function(e,t){var n=h.useRef(null),o=h.useState({onScrollCapture:lo,onWheelCapture:lo,onTouchMoveCapture:lo}),r=o[0],a=o[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,g=e.sideCar,b=e.noIsolation,v=e.inert,m=e.allowPinchZoom,x=e.as,$=x===void 0?"div":x,w=e.gapMode,C=or(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,y=Rc([n,t]),_=re(re({},C),r);return h.createElement(h.Fragment,null,d&&h.createElement(E,{sideCar:dl,removeScrollBar:u,shards:f,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:w}),s?h.cloneElement(h.Children.only(c),re(re({},_),{ref:y})):h.createElement($,re({},_,{className:l,ref:y}),c))});Vn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vn.classNames={fullWidth:kt,zeroRight:Dt};var Ro=!1;if(typeof window<"u")try{var cn=Object.defineProperty({},"passive",{get:function(){return Ro=!0,!0}});window.addEventListener("test",cn,cn),window.removeEventListener("test",cn,cn)}catch{Ro=!1}var mt=Ro?{passive:!1}:!1,Pb=function(e){return e.tagName==="TEXTAREA"},fl=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Pb(e)&&n[t]==="visible")},_b=function(e){return fl(e,"overflowY")},Tb=function(e){return fl(e,"overflowX")},Pa=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=pl(e,o);if(r){var a=ml(e,o),s=a[1],c=a[2];if(s>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Nb=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Mb=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},pl=function(e,t){return e==="v"?_b(t):Tb(t)},ml=function(e,t){return e==="v"?Nb(t):Mb(t)},Ab=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ib=function(e,t,n,o,r){var a=Ab(e,window.getComputedStyle(t).direction),s=a*o,c=n.target,l=t.contains(c),u=!1,d=s>0,f=0,g=0;do{var b=ml(e,c),v=b[0],m=b[1],x=b[2],$=m-x-a*v;(v||$)&&pl(e,c)&&(f+=$,g+=v),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&(Math.abs(f)<1||!r)||!d&&(Math.abs(g)<1||!r))&&(u=!0),u},ln=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_a=function(e){return[e.deltaX,e.deltaY]},Ta=function(e){return e&&"current"in e?e.current:e},Ob=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Db=function(e){return`
|
|
52
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
53
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
54
|
-
`)},kb=0,ht=[];function jb(e){var t=h.useRef([]),n=h.useRef([0,0]),o=h.useRef(),r=h.useState(kb++)[0],a=h.useState(rr)[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Sc([e.lockRef.current],(e.shards||[]).map(Ta),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=h.useCallback(function(m,x){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var $=ln(m),w=n.current,C="deltaX"in m?m.deltaX:w[0]-$[0],E="deltaY"in m?m.deltaY:w[1]-$[1],y,_=m.target,S=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in m&&S==="h"&&_.type==="range")return!1;var P=Pa(S,_);if(!P)return!0;if(P?y=S:(y=S==="v"?"h":"v",P=Pa(S,_)),!P)return!1;if(!o.current&&"changedTouches"in m&&(C||E)&&(o.current=y),!y)return!0;var I=o.current||y;return Ib(I,x,m,I==="h"?C:E,!0)},[]),l=h.useCallback(function(m){var x=m;if(!(!ht.length||ht[ht.length-1]!==a)){var $="deltaY"in x?_a(x):ln(x),w=t.current.filter(function(y){return y.name===x.type&&(y.target===x.target||x.target===y.shadowParent)&&Ob(y.delta,$)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(Ta).filter(Boolean).filter(function(y){return y.contains(x.target)}),E=C.length>0?c(x,C[0]):!s.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=h.useCallback(function(m,x,$,w){var C={name:m,delta:x,target:$,should:w,shadowParent:Lb($)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),d=h.useCallback(function(m){n.current=ln(m),o.current=void 0},[]),f=h.useCallback(function(m){u(m.type,_a(m),m.target,c(m,e.lockRef.current))},[]),g=h.useCallback(function(m){u(m.type,ln(m),m.target,c(m,e.lockRef.current))},[]);h.useEffect(function(){return ht.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",l,mt),document.addEventListener("touchmove",l,mt),document.addEventListener("touchstart",d,mt),function(){ht=ht.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,mt),document.removeEventListener("touchmove",l,mt),document.removeEventListener("touchstart",d,mt)}},[]);var b=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(a,{styles:Db(r)}):null,b?h.createElement(Mc,{gapMode:e.gapMode}):null)}function Lb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Fb=Tc(dl,jb);var $r=h.forwardRef(function(e,t){return h.createElement(Vn,re({},e,{ref:t,sideCar:Fb}))});$r.classNames=Vn.classNames;var wr="Popover",[hl,Mw]=be(wr,[tl]),Kt=tl(),[Bb,tt]=hl(wr),gl=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:s=!1}=e,c=Kt(t),l=h.useRef(null),[u,d]=h.useState(!1),[f=!1,g]=Re({prop:o,defaultProp:r,onChange:a});return p.jsx(yb,{...c,children:p.jsx(Bb,{scope:t,contentId:rt(),triggerRef:l,open:f,onOpenChange:g,onOpenToggle:h.useCallback(()=>g(b=>!b),[g]),hasCustomAnchor:u,onCustomAnchorAdd:h.useCallback(()=>d(!0),[]),onCustomAnchorRemove:h.useCallback(()=>d(!1),[]),modal:s,children:n})})};gl.displayName=wr;var vl="PopoverAnchor",bl=h.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=tt(vl,n),a=Kt(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=r;return h.useEffect(()=>(s(),()=>c()),[s,c]),p.jsx(ul,{...a,...o,ref:t})});bl.displayName=vl;var xl="PopoverTrigger",$l=h.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=tt(xl,n),a=Kt(n),s=ee(t,r.triggerRef),c=p.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Rl(r.open),...o,ref:s,onClick:H(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:p.jsx(ul,{asChild:!0,...a,children:c})});$l.displayName=xl;var Cr="PopoverPortal",[Vb,Hb]=hl(Cr,{forceMount:void 0}),wl=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=tt(Cr,t);return p.jsx(Vb,{scope:t,forceMount:n,children:p.jsx(Ie,{present:n||a.open,children:p.jsx(xr,{asChild:!0,container:r,children:o})})})};wl.displayName=Cr;var Et="PopoverContent",Cl=h.forwardRef((e,t)=>{const n=Hb(Et,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=tt(Et,e.__scopePopover);return p.jsx(Ie,{present:o||a.open,children:a.modal?p.jsx(zb,{...r,ref:t}):p.jsx(Wb,{...r,ref:t})})});Cl.displayName=Et;var zb=h.forwardRef((e,t)=>{const n=tt(Et,e.__scopePopover),o=h.useRef(null),r=ee(t,o),a=h.useRef(!1);return h.useEffect(()=>{const s=o.current;if(s)return An(s)},[]),p.jsx($r,{as:He,allowPinchZoom:!0,children:p.jsx(yl,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),a.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:H(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Wb=h.forwardRef((e,t)=>{const n=tt(Et,e.__scopePopover),o=h.useRef(!1),r=h.useRef(!1);return p.jsx(yl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(o.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),yl=h.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,g=tt(Et,n),b=Kt(n);return Zi(),p.jsx(gr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:p.jsx(hr,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:p.jsx(Eb,{"data-state":Rl(g.open),role:"dialog",id:g.contentId,...b,...f,ref:t,style:{...f.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)"}})})})}),El="PopoverClose",Sl=h.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=tt(El,n);return p.jsx(z.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>r.onOpenChange(!1))})});Sl.displayName=El;var Gb="PopoverArrow",Ub=h.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Kt(n);return p.jsx(Sb,{...r,...o,ref:t})});Ub.displayName=Gb;function Rl(e){return e?"open":"closed"}var Kb=gl,Yb=bl,Xb=$l,qb=wl,Zb=Cl,Qb=Sl;const[Hn,Jb]=Oe("Tooltip",[Nt]),zn=Nt(),e0="TooltipProvider",t0=700,Po="tooltip.open",[n0,yr]=Hn(e0),Pl=e=>{const{__scopeTooltip:t,delayDuration:n=t0,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,[s,c]=i.useState(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),i.createElement(n0,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),c(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(d=>{l.current=d},[]),disableHoverableContent:r},a)},Er="Tooltip",[o0,Yt]=Hn(Er),_l=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=yr(Er,e.__scopeTooltip),u=zn(t),[d,f]=i.useState(null),g=Ne(),b=i.useRef(0),v=s??l.disableHoverableContent,m=c??l.delayDuration,x=i.useRef(!1),[$=!1,w]=Ue({prop:o,defaultProp:r,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Po))):l.onClose(),a==null||a(S)}}),C=i.useMemo(()=>$?x.current?"delayed-open":"instant-open":"closed",[$]),E=i.useCallback(()=>{window.clearTimeout(b.current),x.current=!1,w(!0)},[w]),y=i.useCallback(()=>{window.clearTimeout(b.current),w(!1)},[w]),_=i.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{x.current=!0,w(!0)},m)},[m,w]);return i.useEffect(()=>()=>window.clearTimeout(b.current),[]),i.createElement(Mn,u,i.createElement(o0,{scope:t,contentId:g,open:$,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayed?_():E()},[l.isOpenDelayed,_,E]),onTriggerLeave:i.useCallback(()=>{v?y():window.clearTimeout(b.current)},[y,v]),onOpen:E,onClose:y,disableHoverableContent:v},n))},Na="TooltipTrigger",Tl=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Yt(Na,n),a=yr(Na,n),s=zn(n),c=i.useRef(null),l=J(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),i.createElement(er,R({asChild:!0},s),i.createElement(q.button,R({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},o,{ref:l,onPointerMove:A(e.onPointerMove,g=>{g.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:A(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:A(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:A(e.onBlur,r.onClose),onClick:A(e.onClick,r.onClose)})))}),Nl="TooltipPortal",[r0,a0]=Hn(Nl,{forceMount:void 0}),Ml=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=Yt(Nl,t);return i.createElement(r0,{scope:t,forceMount:n},i.createElement(it,{present:n||a.open},i.createElement(nr,{asChild:!0,container:r},o)))},Vt="TooltipContent",Al=i.forwardRef((e,t)=>{const n=a0(Vt,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,s=Yt(Vt,e.__scopeTooltip);return i.createElement(it,{present:o||s.open},s.disableHoverableContent?i.createElement(Il,R({side:r},a,{ref:t})):i.createElement(s0,R({side:r},a,{ref:t})))}),s0=i.forwardRef((e,t)=>{const n=Yt(Vt,e.__scopeTooltip),o=yr(Vt,e.__scopeTooltip),r=i.useRef(null),a=J(t,r),[s,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,g=i.useCallback(()=>{c(null),f(!1)},[f]),b=i.useCallback((v,m)=>{const x=v.currentTarget,$={x:v.clientX,y:v.clientY},w=u0($,x.getBoundingClientRect()),C=d0($,w),E=f0(m.getBoundingClientRect()),y=m0([...C,...E]);c(y),f(!0)},[f]);return i.useEffect(()=>()=>g(),[g]),i.useEffect(()=>{if(l&&d){const v=x=>b(x,d),m=x=>b(x,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",m)}}},[l,d,b,g]),i.useEffect(()=>{if(s){const v=m=>{const x=m.target,$={x:m.clientX,y:m.clientY},w=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),C=!p0($,s);w?g():C&&(g(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,s,u,g]),i.createElement(Il,R({},e,{ref:a}))}),[c0,i0]=Hn(Er,{isInside:!1}),Il=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...c}=e,l=Yt(Vt,n),u=zn(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(Po,d),()=>document.removeEventListener(Po,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=g=>{const b=g.target;b!=null&&b.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),i.createElement(Uo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d},i.createElement(tr,R({"data-state":l.stateAttribute},u,c,{ref:t,style:{...c.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)"}}),i.createElement(Gs,null,o),i.createElement(c0,{scope:n,isInside:!0},i.createElement(rm,{id:l.contentId,role:"tooltip"},r||o))))}),l0="TooltipArrow",Ol=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=zn(n);return i0(l0,n).isInside?null:i.createElement(wc,R({},r,o,{ref:t}))});function u0(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function d0(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function f0(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function p0(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const c=t[a].x,l=t[a].y,u=t[s].x,d=t[s].y;l>o!=d>o&&n<(u-c)*(o-l)/(d-l)+c&&(r=!r)}return r}function m0(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),h0(t)}function h0(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}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)}const g0=Pl,Dl=_l,kl=Tl,jl=Ml,Ll=Al,Fl=Ol,v0=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Fl,Content:Ll,Portal:jl,Provider:g0,Root:Dl,Tooltip:_l,TooltipArrow:Ol,TooltipContent:Al,TooltipPortal:Ml,TooltipProvider:Pl,TooltipTrigger:Tl,Trigger:kl,createTooltipScope:Jb},Symbol.toStringTag,{value:"Module"})),{TooltipProvider:b0}=v0,x0=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Ll,{ref:t,className:T(n,"fp-tooltip"),...o})}),$0=e=>{const{className:t,...n}=e;return p.jsx(Fl,{className:T(t,"fp-tooltip-arrow"),...n})},Sr=i.forwardRef((e,t)=>{const{defaultOpen:n,open:o,onOpenChange:r,delayDuration:a,disableHoverableContent:s,container:c,forceMount:l,children:u,content:d,...f}=e,g={open:o,defaultOpen:n,onOpenChange:r,delayDuration:a,disableHoverableContent:s};return p.jsxs(Dl,{...g,children:[p.jsx(kl,{asChild:!0,children:u}),p.jsx(jl,{forceMount:l,container:c,children:p.jsxs(x0,{ref:t,arrowPadding:10,...f,children:[d,p.jsx($0,{})]})})]})});Sr.displayName="Tooltip";const w0=Xe("fp-IconButton",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium"},activeAppearance:{subtle:"fp-active-appearance-subtle",solid:"fp-active-appearance-solid"}},defaultVariants:{size:"small",activeAppearance:"subtle"}}),Wn=i.forwardRef((e,t)=>{const{className:n,size:o,activeAppearance:r,"aria-label":a,tooltipContent:s,disableTooltip:c,...l}=e,u=p.jsx("button",{ref:t,className:w0({className:n,size:o,activeAppearance:r}),"aria-label":a,...l});return c?u:p.jsx(Sr,{content:s??a,children:u})});Wn.displayName="IconButton";const Rr=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsx("header",{ref:t,className:T(o,"fp-DialogBaseHeader"),...r,children:n})}),Pr=i.forwardRef((e,t)=>{const{className:n,size:o,...r}=e;return p.jsx("div",{ref:t,className:C0({className:n,size:o}),...r})}),_r=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx("div",{ref:t,className:T(n,"fp-DialogBaseControls"),...o})}),C0=Xe("fp-DialogBaseSection",{variants:{size:{base:"fp-DialogBaseSection-base",small:"fp-DialogBaseSection-small"}},defaultVariants:{size:"base"}});Rr.displayName="Dialog.Header";Pr.displayName="Dialog.Section";_r.displayName="Dialog.Controls";const y0=Kb,E0=Yb,S0=qb,Bl=i.forwardRef((e,t)=>p.jsx(Xb,{ref:t,...e,asChild:!0})),Vl=i.forwardRef((e,t)=>{const{className:n,style:o,width:r,height:a,maxWidth:s,maxHeight:c,...l}=e;return p.jsx(Zb,{ref:t,className:T(n,"fp-DialogBaseContent"),style:{...o,width:r,height:a,maxWidth:s,maxHeight:c},...l})}),Hl=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(qe,{ref:t,className:T(n,"fp-DialogBaseTitle"),weight:"strong",...o})}),zl=i.forwardRef((e,t)=>{const{children:n,...o}=e;return p.jsx(Qb,{ref:t,asChild:!0,...o,children:n||p.jsx(Wn,{"aria-label":"Close",disableTooltip:!0,children:p.jsx(js,{})})})});Bl.displayName="Popover.Trigger";Vl.displayName="Popover.Content";Hl.displayName="Popover.Title";zl.displayName="Popover.Close";const R0=Object.freeze(Object.defineProperty({__proto__:null,Anchor:E0,Close:zl,Content:Vl,Controls:_r,Header:Rr,Portal:S0,Root:y0,Section:Pr,Title:Hl,Trigger:Bl},Symbol.toStringTag,{value:"Module"}));var Tr="Dialog",[Wl,Gl]=be(Tr),[P0,Ce]=Wl(Tr),Ul=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:s=!0}=e,c=h.useRef(null),l=h.useRef(null),[u=!1,d]=Re({prop:o,defaultProp:r,onChange:a});return p.jsx(P0,{scope:t,triggerRef:c,contentRef:l,contentId:rt(),titleId:rt(),descriptionId:rt(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};Ul.displayName=Tr;var Kl="DialogTrigger",Yl=h.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(Kl,n),a=ee(t,r.triggerRef);return p.jsx(z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ar(r.open),...o,ref:a,onClick:H(e.onClick,r.onOpenToggle)})});Yl.displayName=Kl;var Nr="DialogPortal",[_0,Xl]=Wl(Nr,{forceMount:void 0}),ql=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=Ce(Nr,t);return p.jsx(_0,{scope:t,forceMount:n,children:h.Children.map(o,s=>p.jsx(Ie,{present:n||a.open,children:p.jsx(xr,{asChild:!0,container:r,children:s})}))})};ql.displayName=Nr;var $n="DialogOverlay",Zl=h.forwardRef((e,t)=>{const n=Xl($n,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=Ce($n,e.__scopeDialog);return a.modal?p.jsx(Ie,{present:o||a.open,children:p.jsx(T0,{...r,ref:t})}):null});Zl.displayName=$n;var T0=h.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce($n,n);return p.jsx($r,{as:He,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(z.div,{"data-state":Ar(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),st="DialogContent",Ql=h.forwardRef((e,t)=>{const n=Xl(st,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=Ce(st,e.__scopeDialog);return p.jsx(Ie,{present:o||a.open,children:a.modal?p.jsx(N0,{...r,ref:t}):p.jsx(M0,{...r,ref:t})})});Ql.displayName=st;var N0=h.forwardRef((e,t)=>{const n=Ce(st,e.__scopeDialog),o=h.useRef(null),r=ee(t,n.contentRef,o);return h.useEffect(()=>{const a=o.current;if(a)return An(a)},[]),p.jsx(Jl,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&a.preventDefault()}),onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault())})}),M0=h.forwardRef((e,t)=>{const n=Ce(st,e.__scopeDialog),o=h.useRef(!1),r=h.useRef(!1);return p.jsx(Jl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(o.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),Jl=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...s}=e,c=Ce(st,n),l=h.useRef(null),u=ee(t,l);return Zi(),p.jsxs(p.Fragment,{children:[p.jsx(gr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:p.jsx(hr,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Ar(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(I0,{titleId:c.titleId}),p.jsx(D0,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Mr="DialogTitle",eu=h.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(Mr,n);return p.jsx(z.h2,{id:r.titleId,...o,ref:t})});eu.displayName=Mr;var tu="DialogDescription",nu=h.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(tu,n);return p.jsx(z.p,{id:r.descriptionId,...o,ref:t})});nu.displayName=tu;var ou="DialogClose",ru=h.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=Ce(ou,n);return p.jsx(z.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>r.onOpenChange(!1))})});ru.displayName=ou;function Ar(e){return e?"open":"closed"}var au="DialogTitleWarning",[A0,su]=$d(au,{contentName:st,titleName:Mr,docsSlug:"dialog"}),I0=({titleId:e})=>{const t=su(au),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
55
|
-
|
|
56
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
57
|
-
|
|
58
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},O0="DialogDescriptionWarning",D0=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${su(O0).contentName}}.`;return h.useEffect(()=>{var a;const r=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},cu=Ul,iu=Yl,lu=ql,uu=Zl,du=Ql,fu=eu,k0=nu,Ir=ru;const j0=cu,L0=lu,pu=i.forwardRef((e,t)=>p.jsx(iu,{ref:t,...e,asChild:!0})),F0=Xe(["fp-DialogBaseContent","fp-DialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3",fullscreen:"fp-size-fullscreen"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),mu=i.forwardRef((e,t)=>{const{children:n,className:o,size:r,placement:a,style:s,width:c,height:l,maxWidth:u,maxHeight:d,...f}=e;return p.jsx(du,{ref:t,className:F0({className:o,size:r,placement:a}),"aria-describedby":void 0,style:{...s,width:c,height:l,maxWidth:u,maxHeight:d},...f,children:n})}),hu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(uu,{ref:t,className:T(n,"fp-DialogBaseOverlay"),...o})}),gu=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsx(fu,{ref:t,className:T(o,"fp-DialogBaseTitle"),...r,asChild:!0,children:p.jsx(qe,{weight:"strong",children:n})})}),vu=i.forwardRef((e,t)=>{const{children:n,...o}=e;return p.jsx(Ir,{ref:t,asChild:!0,...o,children:n||p.jsx(Wn,{"aria-label":"Close",disableTooltip:!0,children:p.jsx(js,{})})})});pu.displayName="Dialog.Trigger";mu.displayName="Dialog.Content";hu.displayName="Dialog.Overlay";gu.displayName="Dialog.Title";vu.displayName="Dialog.Close";const B0=Object.freeze(Object.defineProperty({__proto__:null,Close:vu,Content:mu,Controls:_r,Header:Rr,Overlay:hu,Portal:L0,Root:j0,Section:Pr,Title:gu,Trigger:pu},Symbol.toStringTag,{value:"Module"}));var bu="AlertDialog",[V0,Aw]=be(bu,[Gl]),ke=Gl(),xu=e=>{const{__scopeAlertDialog:t,...n}=e,o=ke(t);return p.jsx(cu,{...o,...n,modal:!0})};xu.displayName=bu;var H0="AlertDialogTrigger",$u=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=ke(n);return p.jsx(iu,{...r,...o,ref:t})});$u.displayName=H0;var z0="AlertDialogPortal",wu=e=>{const{__scopeAlertDialog:t,...n}=e,o=ke(t);return p.jsx(lu,{...o,...n})};wu.displayName=z0;var W0="AlertDialogOverlay",Cu=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=ke(n);return p.jsx(uu,{...r,...o,ref:t})});Cu.displayName=W0;var bt="AlertDialogContent",[G0,U0]=V0(bt),yu=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,a=ke(n),s=h.useRef(null),c=ee(t,s),l=h.useRef(null);return p.jsx(A0,{contentName:bt,titleName:Eu,docsSlug:"alert-dialog",children:p.jsx(G0,{scope:n,cancelRef:l,children:p.jsxs(du,{role:"alertdialog",...a,...r,ref:c,onOpenAutoFocus:H(r.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[p.jsx(Va,{children:o}),p.jsx(Y0,{contentRef:s})]})})})});yu.displayName=bt;var Eu="AlertDialogTitle",Su=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=ke(n);return p.jsx(fu,{...r,...o,ref:t})});Su.displayName=Eu;var Ru="AlertDialogDescription",Pu=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=ke(n);return p.jsx(k0,{...r,...o,ref:t})});Pu.displayName=Ru;var K0="AlertDialogAction",_u=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=ke(n);return p.jsx(Ir,{...r,...o,ref:t})});_u.displayName=K0;var Tu="AlertDialogCancel",Nu=h.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=U0(Tu,n),a=ke(n),s=ee(t,r);return p.jsx(Ir,{...a,...o,ref:s})});Nu.displayName=Tu;var Y0=({contentRef:e})=>{const t=`\`${bt}\` requires a description for the component to be accessible for screen reader users.
|
|
59
|
-
|
|
60
|
-
You can add a description to the \`${bt}\` by passing a \`${Ru}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
61
|
-
|
|
62
|
-
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 \`${bt}\`. 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.
|
|
63
|
-
|
|
64
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return h.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},X0=xu,q0=$u,Z0=wu,Q0=Cu,J0=yu,ex=_u,tx=Nu,nx=Su,ox=Pu;const rx=X0,ax=Z0,Mu=i.forwardRef((e,t)=>p.jsx(q0,{ref:t,...e,asChild:!0})),sx=Xe(["fp-DialogBaseContent","fp-AlertDialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),Au=i.forwardRef((e,t)=>{const{className:n,size:o,placement:r,style:a,width:s,height:c,maxWidth:l,maxHeight:u,...d}=e;return p.jsx(J0,{ref:t,className:sx({className:n,size:o,placement:r}),style:{...a,width:s,height:c,maxWidth:l,maxHeight:u},...d})}),Iu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Q0,{ref:t,className:T(n,"fp-DialogBaseOverlay"),...o})}),Ou=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsx(nx,{ref:t,className:T(o,"fp-AlertDialogTitle"),...r,asChild:!0,children:p.jsx(qe,{weight:"strong",children:n})})}),Du=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return p.jsx(ox,{ref:t,className:T(o,"fp-AlertDialogDescription"),...r,asChild:!0,children:p.jsx(qe,{children:n})})}),ku=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx("div",{ref:t,className:T(n,"fp-AlertDialogActions"),...o})}),ju=i.forwardRef((e,t)=>p.jsx(tx,{ref:t,asChild:!0,...e})),Lu=i.forwardRef((e,t)=>p.jsx(ex,{ref:t,asChild:!0,...e}));Mu.displayName="AlertDialog.Trigger";Au.displayName="AlertDialog.Content";Iu.displayName="AlertDialog.Overlay";Ou.displayName="AlertDialog.Title";Du.displayName="AlertDialog.Description";ku.displayName="AlertDialog.Actions";ju.displayName="AlertDialog.Cancel";Lu.displayName="AlertDialog.Action";const cx=Object.freeze(Object.defineProperty({__proto__:null,Action:Lu,Actions:ku,Cancel:ju,Content:Au,Description:Du,Overlay:Iu,Portal:ax,Root:rx,Title:Ou,Trigger:Mu},Symbol.toStringTag,{value:"Module"})),[Fu,Or]=Pn("ValueFieldProvider",null),ae=i.forwardRef((e,t)=>{const{className:n,disabled:o,...r}=e,a=Or("Root");return p.jsx(Fu,{disabled:o,children:p.jsx("label",{ref:t,className:T(n,"fp-ValueFieldRoot"),"data-disabled":o||a!=null&&a.disabled?"":void 0,...r})})}),At=i.forwardRef((e,t)=>{const{className:n,disabled:o,...r}=e;return p.jsx(Fu,{disabled:o,children:p.jsx("div",{ref:t,className:T(n,"fp-ValueFieldMulti"),"data-disabled":o?"":void 0,...r})})}),It=i.forwardRef((e,t)=>{const{className:n,...o}=e,r=Or("Root");return p.jsx("span",{ref:t,className:T(n,"fp-ValueFieldLabel"),"data-disabled":r!=null&&r.disabled?"":void 0,...o})});ae.displayName="ValueField.Root";It.displayName="ValueField.Label";At.displayName="ValueField.Multi";function ix(e,t,n){let o=r=>e(r,...t);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:t})}function Gn(e,t,n){let o=e.length-t.length;if(o===0)return e(...t);if(o===1)return ix(e,t,n);throw new Error("Wrong number of arguments")}var lx={done:!1,hasNext:!1};function Ht(e,...t){let n=e,o=t.map(a=>"lazy"in a?ux(a):void 0),r=0;for(;r<t.length;){if(o[r]===void 0||!dx(n)){let l=t[r];n=l(n),r+=1;continue}let a=[];for(let l=r;l<t.length;l++){let u=o[l];if(u===void 0||(a.push(u),u.isSingle))break}let s=[];for(let l of n)if(Bu(l,s,a))break;let{isSingle:c}=a.at(-1);n=c?s[0]:s,r+=a.length}return n}function Bu(e,t,n){if(n.length===0)return t.push(e),!1;let o=e,r=lx,a=!1;for(let[s,c]of n.entries()){let{index:l,items:u}=c;if(u.push(o),r=c(o,l,u),c.index+=1,r.hasNext){if(r.hasMany??!1){for(let d of r.next)if(Bu(d,t,n.slice(s+1)))return!0;return!1}o=r.next}if(!r.hasNext)break;r.done&&(a=!0)}return r.hasNext&&t.push(o),!!a}function ux(e){let{lazy:t,lazyArgs:n}=e,o=t(...n);return Object.assign(o,{isSingle:t.single??!1,index:0,items:[]})}function dx(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function fx(e){return(t,n)=>{if(n===0)return e(t);if(!Number.isInteger(n))throw new TypeError(`precision must be an integer: ${n}`);if(n>15||n<-15)throw new RangeError("precision must be between -15 and 15");if(Number.isNaN(t)||!Number.isFinite(t))return e(t);let o=10**n;return e(t*o)/o}}function Ve(...e){return Gn(fx(Math.round),e)}function px(...e){return Gn(mx,e)}function mx(e,t){let n={};for(let o of t)o in e&&(n[o]=e[o]);return n}function Ma(...e){return Gn(Xt,e)}function Xt(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Array.isArray(e))return hx(e,t);if(e instanceof Map)return gx(e,t);if(e instanceof Set)return vx(e,t);if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let[n,o]of Object.entries(e))if(!(n in t)||!Xt(o,t[n]))return!1;return!0}function hx(e,t){if(e.length!==t.length)return!1;for(let[n,o]of e.entries())if(!Xt(o,t[n]))return!1;return!0}function gx(e,t){if(e.size!==t.size)return!1;for(let[n,o]of e.entries())if(!t.has(n)||!Xt(o,t.get(n)))return!1;return!0}function vx(e,t){if(e.size!==t.size)return!1;let n=[...t];for(let o of e){let r=!1;for(let[a,s]of n.entries())if(Xt(o,s)){r=!0,n.splice(a,1);break}if(!r)return!1}return!0}function _e(...e){return Gn(bx,e)}var bx=(e,{min:t,max:n})=>t!==void 0&&e<t?t:n!==void 0&&e>n?n:e;function uo(e){return e>47&&e<58}function xx(e){return e===32||e===9||e===160}class Dr{constructor(t,n,o){o==null&&typeof t=="string"&&(o=t.length),this.string=t,this.pos=this.start=n||0,this.end=o||0}eof(){return this.pos>=this.end}limit(t,n){return new Dr(this.string,t,n)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(t){const n=this.peek(),o=typeof t=="function"?t(n):n===t;return o&&this.next(),o}eatWhile(t){const n=this.pos;for(;!this.eof()&&this.eat(t););return this.pos!==n}backUp(t){this.pos-=t||1}current(){return this.substring(this.start,this.pos)}substring(t,n){return this.string.slice(t,n)}error(t,n=this.pos){return new $x(`${t} at ${n+1}`,n,this.string)}}class $x extends Error{constructor(t,n,o){super(t),this.pos=n,this.string=o}}const wx=Un("null",0);function Cx(e){const t=typeof e=="string"?new Dr(e):e;let n,o=0,r=21;const a=[];for(;!t.eof();)t.eatWhile(xx),t.start=t.pos,yx(t)?(r&1||ot("Unexpected number",t),a.push(Sx(t.current())),r=10):Nx(t.peek())?(n=t.next(),_x(n)&&r&16?(Vu(n)&&a.push(Rx(n,o)),r=21):(r&2||ot("Unexpected operator",t),a.push(Px(n,o)),r=21)):t.eat(40)?(r&4||ot('Unexpected "("',t),o+=10,r=53):t.eat(41)?(o-=10,r&32?a.push(wx):r&8||ot('Unexpected ")"',t),r=14):ot("Unknown character",t);(o<0||o>=10)&&ot('Unmatched "()"',t);const s=Ex(a);return s===null&&ot("Parity",t),s}function yx(e){const t=e.pos;return e.eat(46)&&e.eatWhile(uo)||e.eatWhile(uo)&&(!e.eat(46)||e.eatWhile(uo))?!0:(e.pos=t,!1)}function Ex(e){const t=[],n=[];let o=0;for(let r=0;r<e.length;r++){const a=e[r];if(a.type==="num")n.push(a);else{for(o+=a.type==="op1"?1:2;t.length&&a.priority<=t[t.length-1].priority;)n.push(t.pop());t.push(a)}}return o+1===n.length+t.length?n.concat(t.reverse()):null}function Sx(e,t){return Un("num",parseFloat(e),t)}function Rx(e,t=0){return e===45&&(t+=2),Un("op1",e,t)}function Px(e,t=0){return e===42?t+=1:(e===47||e===92)&&(t+=2),Un("op2",e,t)}function ot(e,t){throw t&&(e+=` at column ${t.pos} of expression`),new Error(e)}function _x(e){return Tx(e)||Vu(e)}function Tx(e){return e===43}function Vu(e){return e===45}function Nx(e){return e===43||e===45||e===42||e===47||e===92}function Un(e,t,n=0){return{type:e,value:t,priority:n}}const Mx={45:e=>-e},Ax={43:(e,t)=>e+t,45:(e,t)=>e-t,42:(e,t)=>e*t,47:(e,t)=>e/t,92:(e,t)=>Math.floor(e/t)};function Ix(e){if(Array.isArray(e)||(e=Cx(e)),!e||!e.length)return null;const t=[];let n,o,r;for(let a=0,s=e.length;a<s;a++){const c=e[a];if(c.type==="num")t.push(c.value);else if(c.type==="op2")o=t.pop(),n=t.pop(),r=Ax[c.value],t.push(r(n,o));else if(c.type==="op1")n=t.pop(),r=Mx[c.value],t.push(r(n));else throw new Error("Invalid expression")}if(t.length>1)throw new Error("Invalid Expression (parity)");return t[0]}function Ke(e,t){const[n,o]=e,[r,a]=t;return function(s){return n===o||r===a?r:(s-n)/(o-n)*(a-r)+r}}var Aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ox(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wn=Aa&&Aa.__assign||function(){return wn=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},wn.apply(this,arguments)};function Dx(e,t,n){if(t==="className")e.className=[e.className,n].join(" ").trim();else if(t==="style")e.style=wn(wn({},e.style),n);else if(typeof n=="function"){var o=e[t];e[t]=o?function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];o.apply(void 0,r),n.apply(void 0,r)}:n}else{if(n===void 0||typeof n!="object"&&n===e[t])return;if(!(t in e))e[t]=n;else throw new Error("Didn’t know how to merge prop '".concat(t,"'. ")+"Only 'className', 'style', and event handlers are supported")}}var kx=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1?t[0]:t.reduce(function(o,r){for(var a in r)Dx(o,a,r[a]);return o},{})};const Hu=Ox(kx);function jx(){const[e,t]=i.useState(!0),n=i.useCallback(()=>{t(!0)},[]),o=i.useCallback(()=>{t(!1)},[]),r=i.useCallback(a=>{e&&a.currentTarget.selectionStart===a.currentTarget.selectionEnd&&(a.currentTarget.select(),t(!1))},[e]);return{onMouseLeave:o,onMouseUp:r,onFocus:n}}const kr=i.forwardRef((e,t)=>{const{type:n="text",className:o,selectOnClick:r=!1,...a}=e,s=i.useRef(null),c=En(s,t),{onMouseLeave:l,onMouseUp:u,onFocus:d}=jx(),f=r?Hu({onMouseLeave:l,onMouseUp:u,onFocus:d},a):a;return p.jsx("input",{ref:c,type:n,className:T(o,"fp-Input"),...f})});kr.displayName="Input";const Lx=1,Fx=10,jr=e=>{const{className:t,inputRef:n,value:o,onChange:r,smallNudge:a=Lx,bigNudge:s=Fx,formatter:c,disabled:l,...u}=e,d=i.useRef(null),f=En(n,d),[g,b]=i.useState(null),v=g??c.format(o),m=Or("ValueField"),x=y=>{const _=c.parse(y,o);if(y.length===0||!_.valid||_.value===o)return $();b(null),r(_.value)},$=()=>{b(null)},w=y=>{b(y.currentTarget.value)},C=y=>{const _=y.currentTarget;if(y.key==="Enter"&&(y.preventDefault(),_.blur()),y.key==="Escape"&&(y.preventDefault(),$(),requestAnimationFrame(()=>{_.blur()})),y.key==="ArrowUp"||y.key==="ArrowDown"){if(!c.incrementBy)return;y.preventDefault();const S=c.parse(_.value,o),P=S.valid?S.value:o,I=y.shiftKey?s:a,N=y.key==="ArrowUp"?I:-I,D=c.getIncrementTargets?c.getIncrementTargets(_):null,k=c.incrementBy(P,N,D);x(c.format(k)),requestAnimationFrame(()=>{if(D&&c.getIncrementSelection){const[V,F]=c.getIncrementSelection(D);_.setSelectionRange(V,F)}else _.select()})}},E=y=>{x(y.currentTarget.value)};return p.jsx(kr,{ref:f,dir:"auto",autoComplete:"off",spellCheck:"false",selectOnClick:!0,className:T(t,"fp-ValueFieldBase"),value:v,onChange:w,disabled:l||(m==null?void 0:m.disabled),...Hu(u,{onBlur:E,onKeyDown:C})})};jr.displayName="ValueField.Base";const Bx=15,pe=i.forwardRef((e,t)=>{const{value:n,onChange:o,min:r,max:a,targetRange:s,precision:c,suffix:l,allowedUnits:u,...d}=e,f=i.useMemo(()=>Vx({min:r,max:a,precision:c,targetRange:s,suffix:l,allowedUnits:u}),[r,a,c,s,l,u]);return p.jsx(jr,{inputRef:t,value:n,onChange:o,formatter:f,...d})});function Vx(e={}){const{min:t,max:n,targetRange:o,precision:r=Bx,suffix:a,allowedUnits:s=[]}=e,{toDisplayValue:c,fromDisplayValue:l}=Hx({min:t,max:n,targetRange:o});return{parse:(u,d)=>{try{return{valid:!0,value:Ht(u,f=>Wx({expression:f,displayValue:c(d),suffix:a,allowedUnits:s}),Ve(r),l,_e({min:t,max:n}))}}catch{return{valid:!1}}},format:u=>Ht(u,_e({min:t,max:n}),c,Ve(r),d=>zx(d,a)),incrementBy(u,d){return u+l(d)}}}function Hx(e){const{min:t,max:n,targetRange:o}=e;if(!o)return{toDisplayValue:r=>r,fromDisplayValue:r=>r};if(typeof t!="number"||typeof n!="number")throw Error("'targetRange' requires specifying 'min' and 'max'.");if(t===n)throw Error("'min' and 'max' cannot be equal.");return{toDisplayValue:Ke([t,n],o),fromDisplayValue:Ke(o,[t,n])}}function zx(e,t){return Number.isNaN(e)?"":t?`${e}${t}`:`${e}`}function Wx(e){const{displayValue:t,expression:n,suffix:o="",allowedUnits:r=[]}=e,a="(\\d*\\.?\\d+)",s=`(?:${[...r,o].join("|")})*`,c=n.replace(new RegExp(`${a}${s}`,"gi"),(u,d)=>d).replace(new RegExp(`${s}${a}`,"gi"),(u,d)=>d).replace(new RegExp(`${a}%`,"gi"),(u,d)=>`(${t}*${d}/100)`).replace(new RegExp(`%${a}`,"gi"),(u,d)=>`(${t}*${d}/100)`).replace(new RegExp(`${a}x`,"gi"),(u,d)=>`(${t}*${d})`).replace(new RegExp(`x${a}`,"gi"),(u,d)=>`(${t}*${d})`).replace(new RegExp("(?<!\\d)x(?!\\d)","gi"),`${t}`).trim(),l=Ix(c);if(l===null)throw new Error("Invalid expression.");return l}const zu=i.forwardRef((e,t)=>{const{value:n,onChange:o,ignoreAlpha:r=!1,...a}=e,s=i.useMemo(()=>Gx({ignoreAlpha:r}),[r]);return p.jsx(jr,{inputRef:t,value:n,onChange:o,formatter:s,...a})});function Gx(e){const{ignoreAlpha:t}=e;return{parse(n,o){try{return{value:Ht(n,Ux,r=>Kx(r,o),Yx,r=>t?{...r,a:1}:r),valid:!0}}catch{return{valid:!1}}},format(n){return(Math.round(n.r*255).toString(16).padStart(2,"0")+Math.round(n.g*255).toString(16).padStart(2,"0")+Math.round(n.b*255).toString(16).padStart(2,"0")).toUpperCase()},incrementBy(n,o,r){return r??(r={r:!0,g:!0,b:!0}),{r:r.r?_e(Math.round(n.r*255)+o,{min:0,max:255})/255:n.r,g:r.g?_e(Math.round(n.g*255)+o,{min:0,max:255})/255:n.g,b:r.b?_e(Math.round(n.b*255)+o,{min:0,max:255})/255:n.b,a:n.a}},getIncrementTargets(n){const o=n.selectionStart,r=n.selectionEnd;return o===null||r===null?null:{r:o<2||o===2&&r===2,g:o<4&&r>=3||o===4&&r===4,b:r>=5}},getIncrementSelection(n){let o,r;return n?(n.r?o=0:n.g?o=2:o=4,n.b?r=6:n.g?r=4:r=2,[o,r]):[0,6]}}}function Ux(e){var n;const t=/[0-9a-f]+/gi;return((n=e.match(t))==null?void 0:n[0])??""}function Kx(e,t){if(!/^[0-9a-f]{1,8}$/i.test(e))throw new Error("Invalid hex substring");switch(e.length){case 1:return e.repeat(6)+un(t.a);case 2:return e.repeat(3)+un(t.a);case 3:return e.split("").map(n=>n.repeat(2)).join("")+un(t.a);case 4:return e.slice(0,3).split("").map(n=>n.repeat(2)).join("")+e[3].repeat(2);case 5:return e.slice(0,3).split("").map(n=>n.repeat(2)).join("")+e.slice(-2);case 6:return e+un(t.a);case 7:return e.slice(0,6)+e[6].repeat(2);case 8:return e;default:throw new Error("Invalid hex substring")}}function Yx(e){return{r:parseInt(e.substring(0,2),16)/255,g:parseInt(e.substring(2,4),16)/255,b:parseInt(e.substring(4,6),16)/255,a:parseInt(e.substring(6,8),16)/255}}function un(e){return Math.round(e*255).toString(16)}const Xx=Object.freeze(Object.defineProperty({__proto__:null,Hex:zu,Label:It,Multi:At,Numeric:pe,Root:ae},Symbol.toStringTag,{value:"Module"}));function dn(e){const t=Ve(e*255,0).toString(16);return t.length<2?"0"+t:t}function Cn({r:e,g:t,b:n,a:o}){const r=o<1?dn(o):"";return"#"+dn(e)+dn(t)+dn(n)+r}function qx(e){return Cn(_o(e))}function Zx(e){return Cn(Ye(e))}function zt({r:e,g:t,b:n,a:o}){const r=Math.max(e,t,n),a=r-Math.min(e,t,n),s=a?r===e?(t-n)/a:r===t?2+(n-e)/a:4+(e-t)/a:0;return{h:60*(s<0?s+6:s),s:r?a/r*100:0,v:r*100,a:o}}function Ye({h:e,s:t,v:n,a:o}){e=e/360*6,t=t/100,n=n/100;const r=Math.floor(e),a=n*(1-t),s=n*(1-(e-r)*t),c=n*(1-(1-e+r)*t),l=r%6;return{r:[n,s,a,a,c,n][l],g:[c,n,n,s,a,a][l],b:[a,a,c,n,n,s][l],a:o}}function Wu({h:e,s:t,l:n,a:o}){return t*=(n<50?n:100-n)/100,{h:e,s:t>0?2*t/(n+t)*100:0,v:n+t,a:o}}function Gu({h:e,s:t,v:n,a:o}){const r=(200-t)*n/100;return{h:e,s:r>0&&r<200?t*n/100/(r<=100?r:200-r)*100:0,l:r/2,a:o}}function _o(e){return Ye(Wu(e))}function Ia(e){return Gu(zt(e))}function xt(e){const t=Ve(e.r,4),n=Ve(e.g,4),o=Ve(e.b,4),r=Ve(e.a,2);return r<1?`color(display-p3 ${t} ${n} ${o} / ${r})`:`color(display-p3 ${t} ${n} ${o})`}function $t(e){const t=Math.round(e.r*255),n=Math.round(e.g*255),o=Math.round(e.b*255),r=e.a;return r<1?`rgb(${t} ${n} ${o} / ${r})`:`rgb(${t} ${n} ${o})`}function To(e){const{r:t,g:n,b:o,a:r}=e;return{r:t+(1-t)*(1-r),g:n+(1-n)*(1-r),b:o+(1-o)*(1-r),a:1}}const Qx={r:0,g:0,b:0,a:1},Jx=["hex","rgb","hsl","hsv"],[e$,je]=Pn("ColorPicker"),t$=e=>{const{colorSpace:t,models:n=Jx,defaultActiveModel:o,activeModel:r,onActiveModelChange:a,defaultColor:s,color:c,onColorChange:l,children:u}=e;n$(r,o,n);const[d=Qx,f]=ho({prop:c,defaultProp:s,onChange:l}),[g=n[0],b]=ho({prop:r,defaultProp:o,onChange:a}),[v,m]=i.useState({}),x={hsv:v.hsv??zt(d),hsl:v.hsl??Ia(d),rgb:v.rgb??d,hex:v.hex??Cn(d)},$=x.hsv.h,w=C=>{const{mode:E,value:y}=C;E==="rgb"?(m({rgb:y,hsv:zt(y),hsl:Ia(y),hex:Cn(y)}),f(y)):E==="hsv"?(m({hsv:y,hsl:Gu(y),rgb:Ye(y),hex:Zx(y)}),f(Ye(y))):E==="hsl"&&(m({hsv:Wu(y),hsl:y,rgb:_o(y),hex:qx(y)}),f(_o(y)))};return p.jsx(e$,{colorSpace:t,models:n,activeModel:g,onActiveModelChange:b,color:d,onColorChange:w,hue:$,colorsByModel:x,children:u})};function n$(e,t,n){if(n.length===0)throw new Error("The 'models' prop must contain at least one color model. Omit the 'models' prop entirely to use default models.");if(e&&!n.includes(e))throw new Error(`Invalid 'activeModel': '${e}' is not present in the 'models' array. Make sure 'activeModel' matches a model name in 'models'.`);if(t&&!n.includes(t))throw new Error(`Invalid 'defaultActiveModel': '${t}' is not present in the 'models' array. Make sure 'activeModel' matches a model name in 'models'.`)}function Uu(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ku=["PageUp","PageDown"],Yu=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ot="Slider",[No,o$,r$]=Ha(Ot),[qu,Iw]=be(Ot,[r$]),[a$,Kn]=qu(Ot),Zu=h.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:s="horizontal",disabled:c=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[o],value:d,onValueChange:f=()=>{},onValueCommit:g=()=>{},inverted:b=!1,...v}=e,m=h.useRef(new Set),x=h.useRef(0),w=s==="horizontal"?s$:c$,[C=[],E]=Re({prop:d,defaultProp:u,onChange:N=>{var k;(k=[...m.current][x.current])==null||k.focus(),f(N)}}),y=h.useRef(C);function _(N){const D=p$(C,N);I(N,D)}function S(N){I(N,x.current)}function P(){const N=y.current[x.current];C[x.current]!==N&&g(C)}function I(N,D,{commit:k}={commit:!1}){const V=v$(a),F=b$(Math.round((N-o)/a)*a+o,V),O=Uu(F,[o,r]);E((B=[])=>{const L=d$(B,O,D);if(g$(L,l*a)){x.current=L.indexOf(O);const W=String(L)!==String(B);return W&&k&&g(L),W?L:B}else return B})}return p.jsx(a$,{scope:e.__scopeSlider,name:n,disabled:c,min:o,max:r,valueIndexToChangeRef:x,thumbs:m.current,values:C,orientation:s,children:p.jsx(No.Provider,{scope:e.__scopeSlider,children:p.jsx(No.Slot,{scope:e.__scopeSlider,children:p.jsx(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:t,onPointerDown:H(v.onPointerDown,()=>{c||(y.current=C)}),min:o,max:r,inverted:b,onSlideStart:c?void 0:_,onSlideMove:c?void 0:S,onSlideEnd:c?void 0:P,onHomeKeyDown:()=>!c&&I(o,0,{commit:!0}),onEndKeyDown:()=>!c&&I(r,C.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:D})=>{if(!c){const F=Ku.includes(N.key)||N.shiftKey&&Yu.includes(N.key)?10:1,O=x.current,B=C[O],L=a*F*D;I(B+L,O,{commit:!0})}}})})})})});Zu.displayName=Ot;var[Qu,Ju]=qu(Ot,{startEdge:"left",endEdge:"right",size:"width",direction:1}),s$=h.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=e,[f,g]=h.useState(null),b=ee(t,C=>g(C)),v=h.useRef(),m=Wt(r),x=m==="ltr",$=x&&!a||!x&&a;function w(C){const E=v.current||f.getBoundingClientRect(),y=[0,E.width],S=Lr(y,$?[n,o]:[o,n]);return v.current=E,S(C-E.left)}return p.jsx(Qu,{scope:e.__scopeSlider,startEdge:$?"left":"right",endEdge:$?"right":"left",direction:$?1:-1,size:"width",children:p.jsx(ed,{dir:m,"data-orientation":"horizontal",...d,ref:b,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:C=>{const E=w(C.clientX);s==null||s(E)},onSlideMove:C=>{const E=w(C.clientX);c==null||c(E)},onSlideEnd:()=>{v.current=void 0,l==null||l()},onStepKeyDown:C=>{const y=Xu[$?"from-left":"from-right"].includes(C.key);u==null||u({event:C,direction:y?-1:1})}})})}),c$=h.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,d=h.useRef(null),f=ee(t,d),g=h.useRef(),b=!r;function v(m){const x=g.current||d.current.getBoundingClientRect(),$=[0,x.height],C=Lr($,b?[o,n]:[n,o]);return g.current=x,C(m-x.top)}return p.jsx(Qu,{scope:e.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:p.jsx(ed,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const x=v(m.clientY);a==null||a(x)},onSlideMove:m=>{const x=v(m.clientY);s==null||s(x)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:m=>{const $=Xu[b?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:$?-1:1})}})})}),ed=h.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:c,onStepKeyDown:l,...u}=e,d=Kn(Ot,n);return p.jsx(z.span,{...u,ref:t,onKeyDown:H(e.onKeyDown,f=>{f.key==="Home"?(s(f),f.preventDefault()):f.key==="End"?(c(f),f.preventDefault()):Ku.concat(Yu).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:H(e.onPointerDown,f=>{const g=f.target;g.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(g)?g.focus():o(f)}),onPointerMove:H(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&r(f)}),onPointerUp:H(e.onPointerUp,f=>{const g=f.target;g.hasPointerCapture(f.pointerId)&&(g.releasePointerCapture(f.pointerId),a(f))})})}),td="SliderTrack",nd=h.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=Kn(td,n);return p.jsx(z.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});nd.displayName=td;var Mo="SliderRange",i$=h.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=Kn(Mo,n),a=Ju(Mo,n),s=h.useRef(null),c=ee(t,s),l=r.values.length,u=r.values.map(g=>rd(g,r.min,r.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return p.jsx(z.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:c,style:{...e.style,[a.startEdge]:d+"%",[a.endEdge]:f+"%"}})});i$.displayName=Mo;var Ao="SliderThumb",od=h.forwardRef((e,t)=>{const n=o$(e.__scopeSlider),[o,r]=h.useState(null),a=ee(t,c=>r(c)),s=h.useMemo(()=>o?n().findIndex(c=>c.ref.current===o):-1,[n,o]);return p.jsx(l$,{...e,ref:a,index:s})}),l$=h.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,s=Kn(Ao,n),c=Ju(Ao,n),[l,u]=h.useState(null),d=ee(t,$=>u($)),f=l?!!l.closest("form"):!0,g=Fo(l),b=s.values[o],v=b===void 0?0:rd(b,s.min,s.max),m=f$(o,s.values.length),x=g==null?void 0:g[c.size];return x&&m$(x,v,c.direction),h.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`${v}%`},children:[p.jsx(No.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(z.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":s.min,"aria-valuenow":b,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:b===void 0?{display:"none"}:e.style,onFocus:H(e.onFocus,()=>{s.valueIndexToChangeRef.current=o})})}),f&&p.jsx(u$,{name:r??(s.name?s.name+(s.values.length>1?"[]":""):void 0),value:b},o)]})});od.displayName=Ao;var u$=e=>{const{value:t,...n}=e,o=h.useRef(null),r=ys(t);return h.useEffect(()=>{const a=o.current,s=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(s,"value").set;if(r!==t&&l){const u=new Event("input",{bubbles:!0});l.call(a,t),a.dispatchEvent(u)}},[r,t]),p.jsx("input",{style:{display:"none"},...n,ref:o,defaultValue:t})};function d$(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function rd(e,t,n){const a=100/(n-t)*(e-t);return Uu(a,[0,100])}function f$(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function p$(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function m$(e,t,n){const o=e/2,a=Lr([0,50],[0,o]);return(o-a(t)*n)*n}function h$(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function g$(e,t){if(t>0){const n=h$(e);return Math.min(...n)>=t}return!0}function Lr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function v$(e){return(String(e).split(".")[1]||"").length}function b$(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var x$=Zu,$$=nd,w$=od;const C$=2,y$=0,E$=100,S$="horizontal",R$="ltr",Yn=i.forwardRef((e,t)=>{const{className:n,min:o=y$,max:r=E$,defaultValue:a=[o],value:s,onValueChange:c,orientation:l=S$,dir:u=R$,inverted:d,disabled:f,range:g=!0,rangeAnchor:b,baseValue:v,hints:m,...x}=e,$=i.useRef(null),w=En($,t),{onPointerDown:C,focusVisible:E}=N$($),[y,_]=i.useState(s??a),S=i.useRef(s),P=i.useRef(a);i.useEffect(()=>{Ma(s,S.current)&&Ma(a,P.current)||_(s??a)},[s,a]),i.useEffect(()=>{$.current&&$.current.style.setProperty("--radix-slider-thumb-transform",T$(l,u,d))},[$,l,u,d]);const I=N=>{const D=N.map(k=>M$(k,m,o,r));c==null||c(D),_(D)};return p.jsxs(x$,{tabIndex:-1,ref:w,className:T(n,"fp-SliderRoot"),value:y,onValueChange:I,onPointerDown:C,min:o,max:r,orientation:l,dir:u,inverted:d,disabled:f,...x,children:[p.jsx($$,{className:"fp-SliderTrack"}),g&&p.jsx(_$,{dir:u,value:y,min:o,max:r,orientation:l,inverted:d,rangeAnchor:b,disabled:f}),m&&m.map(N=>p.jsx(P$,{hint:N,baseValue:v,min:o,max:r,orientation:l,dir:u,inverted:d},N)),y.map((N,D)=>p.jsx(w$,{className:T("fp-SliderThumb",{"fp-SliderThumb-focusVisible":E,"fp-SliderThumb-baseValue":N===v})},D))]})});Yn.displayName="Slider";const P$=e=>{const{baseValue:t,dir:n,inverted:o,max:r,min:a,orientation:s,hint:c}=e,{startEdge:l}=ad(s,n,o),u=Ke([a,r],[0,100])(c),d=4;return p.jsx(p.Fragment,{children:p.jsx("span",{className:T("fp-SliderHint",{"fp-SliderHint-baseValue":c===t}),"data-orientation":s,style:{[l]:`calc(${u}% - ${d/2}px)`}})})},_$=e=>{const{min:t,max:n,value:o,rangeAnchor:r=t,orientation:a,dir:s,inverted:c,disabled:l}=e,u=o.length>1?Math.min(...o):Math.min(r,...o),d=o.length>1?Math.max(...o):Math.max(r,...o),f=Ke([t,n],[0,100])(u),g=100-Ke([t,n],[0,100])(d),b=ad(a,s,c);return p.jsx("span",{className:"fp-SliderRange","data-orientation":a,"data-disabled":l?"":void 0,style:{[b.startEdge]:`${f}%`,[b.endEdge]:`${g}%`}})};function ad(e,t,n){const o=n?"inverted":"normal";return{vertical:{normal:{startEdge:"bottom",endEdge:"top"},inverted:{startEdge:"top",endEdge:"bottom"}},horizontal:{normal:{startEdge:t==="ltr"?"left":"right",endEdge:t==="ltr"?"right":"left"},inverted:{startEdge:t==="ltr"?"right":"left",endEdge:t==="ltr"?"left":"right"}}}[e][o]}function T$(e,t,n){const o=n?"inverted":"normal";return{vertical:{normal:"translateY(50%)",inverted:"translateY(-50%)"},horizontal:{normal:t==="ltr"?"translateX(-50%)":"translateX(50%)",inverted:t==="ltr"?"translateX(50%)":"translateX(-50%)"}}[e][o]}function N$(e){const[t,n]=i.useState(!1),o=()=>{var a;n(!1),window.removeEventListener("pointerup",o),(a=e.current)==null||a.focus()};return{onPointerDown:()=>{n(!0),window.addEventListener("pointerup",o)},focusVisible:!t}}function M$(e,t,n,o){const r=Ke([0,100],[0,o-n])(C$),a=t==null?void 0:t.find(s=>Math.abs(s-e)<=r);return typeof a=="number"?a:e}const A$=e=>{const{className:t,style:n}=e,{activeModel:o,colorSpace:r,hue:a,color:s,onColorChange:c}=je("Hue"),l=I$[o],u=f=>{const g=l.setHue(s,f[0]);c({mode:"rgb",value:g})},d=l.getThumbColor(a,r);return p.jsx(Yn,{"aria-label":"hue",range:!1,min:0,max:359,value:[a],onValueChange:u,className:`fp-ColorPickerHueSlider fp-color-model-${o} fp-color-space-${r} ${t}`,style:{"--slider-thumb-bg":d,...n}})},fn={getHue:e=>Math.round(zt(e).h),setHue:(e,t)=>{const{s:n,v:o}=zt(e);return Ye({h:t,s:n,v:o,a:e.a})},getThumbColor:(e,t)=>{const{r:n,g:o,b:r}=Ye({h:e,s:100,v:100,a:1});return t==="display-p3"?`color(display-p3 ${+n.toFixed(4)} ${+o.toFixed(4)} ${+r.toFixed(4)})`:`rgb(${Math.round(n*255)} ${Math.round(o*255)} ${Math.round(r*255)})`}},I$={rgb:fn,hsl:fn,hsv:fn,hex:fn},O$=e=>{const{className:t,style:n}=e,{colorSpace:o,color:r,onColorChange:a}=je("Hue"),s={srgb:{transparent:$t({...r,a:0}),opaque:$t({...r,a:1})},p3:{transparent:xt({...r,a:0}),opaque:xt({...r,a:1})}},c={srgb:$t(To(r)),p3:xt(To(r))},l=u=>{a({mode:"rgb",value:{...r,a:Ve(u[0]/100,2)}})};return p.jsx(Yn,{"aria-label":"alpha",min:0,max:100,range:!1,value:[r.a*100],onValueChange:l,className:`fp-ColorPickerAlphaSlider fp-color-space-${o} ${t}`,style:{"--track-bg-transparent-srgb":s.srgb.transparent,"--track-bg-opaque-srgb":s.srgb.opaque,"--track-bg-transparent-p3":s.p3.transparent,"--track-bg-opaque-p3":s.p3.opaque,"--thumb-bg-srgb":c.srgb,"--thumb-bg-p3":c.p3,...n}})},D$=8,k$=e=>{const{onColorChange:t,colorsByModel:n,hue:o,colorSpace:r,activeModel:a}=je("ColorPicker.Area"),s={srgb:$t(Ye({h:o,s:100,v:100,a:1})),p3:xt(Ye({h:o,s:100,v:100,a:1}))},c={srgb:$t(n.rgb),p3:xt(n.rgb)},l=j$(n,a),u=i.useRef(null),{size:d}=L$(u),f=v=>{t(a==="hsl"?{mode:"hsl",value:{h:o,s:v.x,l:100-v.y,a:n.rgb.a}}:{mode:"hsv",value:{h:o,s:v.x,v:100-v.y,a:n.rgb.a}})},g=v=>{if(v.type==="pointerdown"&&v.currentTarget.setPointerCapture(v.pointerId),v.type==="pointermove"&&!v.currentTarget.hasPointerCapture(v.pointerId))return;const m=v.currentTarget.getBoundingClientRect();f({x:Ht(v.clientX-m.x,Ke([0,d],[0,100]),_e({min:0,max:100})),y:Ht(v.clientY-m.y-D$,Ke([0,d],[0,100]),_e({min:0,max:100}))})},b=v=>{const m=v.shiftKey?10:1,x={ArrowRight:{x:1,y:0},ArrowLeft:{x:-1,y:0},ArrowDown:{x:0,y:1},ArrowUp:{x:0,y:-1}}[v.key];x&&f({x:_e(l.x+x.x*m,{min:0,max:100}),y:_e(l.y+x.y*m,{min:0,max:100})})};return p.jsxs("div",{ref:u,className:"fp-ColorPickerArea",onPointerDown:g,onPointerMove:g,style:{"--base-color-srgb":s.srgb,"--base-color-p3":s.p3},children:[p.jsx("div",{className:`fp-ColorPickerAreaCanvas fp-color-space-${r} fp-color-model-${a}`}),p.jsx("div",{tabIndex:0,onKeyDown:b,className:`fp-ColorPickerThumb fp-color-space-${r}`,style:{"--thumb-bg-srgb":c.srgb,"--thumb-bg-p3":c.p3,left:`${l.x}%`,top:`${l.y}%`}})]})};function j$(e,t){if(t==="hsl"){const n=e.hsl;return{x:n.s,y:100-n.l}}else{const n=e.hsv;return{x:n.s,y:100-n.v}}}function L$(e){const[t,n]=i.useState(0);return i.useLayoutEffect(()=>{const o=e.current;if(!o)return;n(o.getBoundingClientRect().width);const r=new ResizeObserver(a=>{for(const s of a)n(s.contentRect.width)});return r.observe(o),()=>{r.unobserve(o)}},[e]),{size:t}}const fo={0:"fp-gap-0",px:"fp-gap-px","0.5":"fp-gap-0_5",1:"fp-gap-1","1.5":"fp-gap-1_5",2:"fp-gap-2","2.5":"fp-gap-2_5",3:"fp-gap-3","3.5":"fp-gap-3_5",4:"fp-gap-4",5:"fp-gap-5",6:"fp-gap-6",7:"fp-gap-7",8:"fp-gap-8",9:"fp-gap-9",10:"fp-gap-10",11:"fp-gap-11",12:"fp-gap-12",13:"fp-gap-13",14:"fp-gap-14",15:"fp-gap-15",16:"fp-gap-16"},F$=Xe("fp-Flex",{variants:{direction:{row:"fp-direction-row",column:"fp-direction-column",rowReverse:"fp-direction-row-reverse",columnReverse:"fp-direction-column-reverse"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end",baseline:"fp-align-baseline",stretch:"fp-align-stretch"},justify:{start:"fp-justify-start",center:"fp-justify-center",end:"fp-justify-end",between:"fp-justify-between"},wrap:{nowrap:"fp-wrap-nowrap",wrap:"fp-wrap-wrap",wrapReverse:"fp-wrap-wrap-reverse"},gap:fo,columnGap:fo,rowGap:fo},defaultVariants:{direction:"row"}}),Fr=i.forwardRef((e,t)=>{const{className:n,direction:o,align:r,justify:a,wrap:s,gap:c,columnGap:l,rowGap:u,...d}=e;return p.jsx("div",{ref:t,className:F$({className:n,direction:o,align:r,justify:a,wrap:s,gap:c,columnGap:l,rowGap:u}),...d})});Fr.displayName="Flex";const B$=e=>{const{models:t,activeModel:n,onActiveModelChange:o}=je("ColorPicker.Input"),r=px({hex:V$,hsv:z$,hsl:W$,rgb:H$},t)[n];return p.jsxs(Fr,{gap:"2.5",className:e.className,style:e.style,children:[t.length>1&&p.jsxs(Hc,{value:n,onValueChange:o,children:[p.jsx(cr,{style:{width:56}}),p.jsx(ir,{children:t.map(a=>p.jsx(lr,{value:a,children:a.toUpperCase()},a))})]}),p.jsx(r,{})]})},V$=()=>{const{colorsByModel:e,onColorChange:t}=je("ColorPicker.HEX"),n=e.rgb,o=a=>{t({mode:"rgb",value:a})},r=a=>{t({mode:"rgb",value:{...n,a}})};return p.jsxs(At,{children:[p.jsx(ae,{children:p.jsx(zu,{onChange:o,value:n})}),p.jsxs(ae,{style:{flex:"0 0 52px"},children:[p.jsx(pe,{onChange:r,value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),p.jsx(It,{children:"%"})]})]})},H$=()=>{const{colorsByModel:e,onColorChange:t}=je("ColorPicker.RGBA"),n=e.rgb,o=r=>a=>{t({mode:"rgb",value:{...n,[r]:a}})};return p.jsxs(At,{children:[p.jsx(ae,{children:p.jsx(pe,{onChange:o("r"),value:n.r,min:0,max:1,targetRange:[0,255],precision:0})}),p.jsx(ae,{children:p.jsx(pe,{onChange:o("g"),value:n.g,min:0,max:1,targetRange:[0,255],precision:0})}),p.jsx(ae,{children:p.jsx(pe,{onChange:o("b"),value:n.b,min:0,max:1,targetRange:[0,255],precision:0})}),p.jsxs(ae,{style:{flex:"0 0 52px"},children:[p.jsx(pe,{onChange:o("a"),value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),p.jsx(It,{children:"%"})]})]})},z$=()=>{const{colorsByModel:e,onColorChange:t}=je("ColorPicker.HSVA"),n=e.hsv,o=r=>a=>{t({mode:"hsv",value:{...n,[r]:a}})};return p.jsxs(At,{children:[p.jsx(ae,{children:p.jsx(pe,{onChange:o("h"),value:n.h,min:0,max:360,precision:0})}),p.jsx(ae,{children:p.jsx(pe,{onChange:o("s"),value:n.s,min:0,max:100,precision:0})}),p.jsx(ae,{children:p.jsx(pe,{onChange:o("v"),value:n.v,min:0,max:100,precision:0})}),p.jsxs(ae,{style:{flex:"0 0 52px"},children:[p.jsx(pe,{onChange:o("a"),value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),p.jsx(It,{children:"%"})]})]})},W$=()=>{const{colorsByModel:e,onColorChange:t}=je("ColorPicker.HSLA"),n=e.hsl,o=r=>a=>{t({mode:"hsl",value:{...n,[r]:a}})};return p.jsxs(At,{children:[p.jsx(ae,{children:p.jsx(pe,{onChange:o("h"),value:n.h,min:0,max:360,precision:0})}),p.jsx(ae,{children:p.jsx(pe,{onChange:o("s"),value:n.s,min:0,max:100,precision:0})}),p.jsx(ae,{children:p.jsx(pe,{onChange:o("l"),value:n.l,min:0,max:100,precision:0})}),p.jsxs(ae,{style:{flex:"0 0 52px"},children:[p.jsx(pe,{onChange:o("a"),value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),p.jsx(It,{children:"%"})]})]})},G$=Object.freeze(Object.defineProperty({__proto__:null,Alpha:O$,Area:k$,Hue:A$,Input:B$,Root:t$,useColorPickerContext:je},Symbol.toStringTag,{value:"Module"}));var Br="Collapsible",[U$,Ow]=be(Br),[K$,Vr]=U$(Br),sd=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:a,onOpenChange:s,...c}=e,[l=!1,u]=Re({prop:o,defaultProp:r,onChange:s});return p.jsx(K$,{scope:n,disabled:a,contentId:rt(),open:l,onOpenToggle:h.useCallback(()=>u(d=>!d),[u]),children:p.jsx(z.div,{"data-state":zr(l),"data-disabled":a?"":void 0,...c,ref:t})})});sd.displayName=Br;var cd="CollapsibleTrigger",id=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=Vr(cd,n);return p.jsx(z.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":zr(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:H(e.onClick,r.onOpenToggle)})});id.displayName=cd;var Hr="CollapsibleContent",ld=h.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Vr(Hr,e.__scopeCollapsible);return p.jsx(Ie,{present:n||r.open,children:({present:a})=>p.jsx(Y$,{...o,ref:t,present:a})})});ld.displayName=Hr;var Y$=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...a}=e,s=Vr(Hr,n),[c,l]=h.useState(o),u=h.useRef(null),d=ee(t,u),f=h.useRef(0),g=f.current,b=h.useRef(0),v=b.current,m=s.open||c,x=h.useRef(m),$=h.useRef();return h.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),ze(()=>{const w=u.current;if(w){$.current=$.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,b.current=C.width,x.current||(w.style.transitionDuration=$.current.transitionDuration,w.style.animationName=$.current.animationName),l(o)}},[s.open,o]),p.jsx(z.div,{"data-state":zr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:d,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&r})});function zr(e){return e?"open":"closed"}var X$=sd,q$=id,Z$=ld;const ud=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(X$,{ref:t,className:T(n,"fp-CollapsibleRoot"),...o})}),dd=i.forwardRef((e,t)=>{const{className:n,children:o,...r}=e;return p.jsxs(q$,{ref:t,className:T(n,"fp-CollapsibleTrigger"),...r,children:[p.jsx(Ho,{viewBox:"4 4 16 16",size:"4",className:"fp-CollapsibleIndicator"}),o]})}),fd=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(Z$,{ref:t,className:T(n,"fp-CollapsibleContent"),...o})});ud.displayName="Collapsible.Root";dd.displayName="Collapsible.Trigger";fd.displayName="Collapsible.Content";const Q$=Object.freeze(Object.defineProperty({__proto__:null,Content:fd,Root:ud,Trigger:dd},Symbol.toStringTag,{value:"Module"})),J$=Xe("fp-Button",{variants:{variant:{primary:"fp-variant-primary",secondary:"fp-variant-secondary",inverse:"fp-variant-inverse",destructive:"fp-variant-destructive",success:"fp-variant-success",text:"fp-variant-text"},size:{small:"fp-size-small",medium:"fp-size-medium"},fullWidth:{true:"fp-full-width"}},defaultVariants:{variant:"secondary",size:"small"}}),pd=i.forwardRef((e,t)=>{const{className:n,variant:o,size:r,fullWidth:a,...s}=e;return p.jsx("button",{ref:t,className:J$({className:n,variant:o,size:r,fullWidth:a}),...s})});pd.displayName="Button";function ew(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}var tw=i.useLayoutEffect,nw=function(t){var n=h.useRef(t);return tw(function(){n.current=t}),n},Oa=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},ow=function(t,n){var o=i.useRef();return i.useCallback(function(r){t.current=r,o.current&&Oa(o.current,null),o.current=n,n&&Oa(n,r)},[n])},Da={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},rw=function(t){Object.keys(Da).forEach(function(n){t.style.setProperty(n,Da[n],"important")})},ka=rw,ce=null,ja=function(t,n){var o=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?o+n.borderSize:o-n.paddingSize};function aw(e,t,n,o){n===void 0&&(n=1),o===void 0&&(o=1/0),ce||(ce=document.createElement("textarea"),ce.setAttribute("tabindex","-1"),ce.setAttribute("aria-hidden","true"),ka(ce)),ce.parentNode===null&&document.body.appendChild(ce);var r=e.paddingSize,a=e.borderSize,s=e.sizingStyle,c=s.boxSizing;Object.keys(s).forEach(function(g){var b=g;ce.style[b]=s[b]}),ka(ce),ce.value=t;var l=ja(ce,e);ce.value=t,l=ja(ce,e),ce.value="x";var u=ce.scrollHeight-r,d=u*n;c==="border-box"&&(d=d+r+a),l=Math.max(d,l);var f=u*o;return c==="border-box"&&(f=f+r+a),l=Math.min(f,l),[l,u]}var La=function(){},sw=function(t,n){return t.reduce(function(o,r){return o[r]=n[r],o},{})},cw=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],iw=!!document.documentElement.currentStyle,lw=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var o=sw(cw,n),r=o.boxSizing;if(r==="")return null;iw&&r==="border-box"&&(o.width=parseFloat(o.width)+parseFloat(o.borderRightWidth)+parseFloat(o.borderLeftWidth)+parseFloat(o.paddingRight)+parseFloat(o.paddingLeft)+"px");var a=parseFloat(o.paddingBottom)+parseFloat(o.paddingTop),s=parseFloat(o.borderBottomWidth)+parseFloat(o.borderTopWidth);return{sizingStyle:o,paddingSize:a,borderSize:s}},uw=lw;function md(e,t,n){var o=nw(n);h.useLayoutEffect(function(){var r=function(s){return o.current(s)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var dw=function(t){md(window,"resize",t)},fw=function(t){md(document.fonts,"loadingdone",t)},pw=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],mw=function(t,n){var o=t.cacheMeasurements,r=t.maxRows,a=t.minRows,s=t.onChange,c=s===void 0?La:s,l=t.onHeightChange,u=l===void 0?La:l,d=ew(t,pw),f=d.value!==void 0,g=h.useRef(null),b=ow(g,n),v=h.useRef(0),m=h.useRef(),x=function(){var C=g.current,E=o&&m.current?m.current:uw(C);if(E){m.current=E;var y=aw(E,C.value||C.placeholder||"x",a,r),_=y[0],S=y[1];v.current!==_&&(v.current=_,C.style.setProperty("height",_+"px","important"),u(_,{rowHeight:S}))}},$=function(C){f||x(),c(C)};return h.useLayoutEffect(x),dw(x),fw(x),h.createElement("textarea",R({},d,{onChange:$,ref:b}))},hw=h.forwardRef(mw);const hd=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(hw,{className:T(n,"fp-textarea"),ref:t,...o})});hd.displayName="Textarea";const gd="Switch",[gw,Dw]=Oe(gd),[vw,bw]=gw(gd),xw=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:a,required:s,disabled:c,value:l="on",onCheckedChange:u,...d}=e,[f,g]=i.useState(null),b=J(t,w=>g(w)),v=i.useRef(!1),m=f?!!f.closest("form"):!0,[x=!1,$]=Ue({prop:r,defaultProp:a,onChange:u});return i.createElement(vw,{scope:n,checked:x,disabled:c},i.createElement(q.button,R({type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":vd(x),"data-disabled":c?"":void 0,disabled:c,value:l},d,{ref:b,onClick:A(e.onClick,w=>{$(C=>!C),m&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),m&&i.createElement(Cw,{control:f,bubbles:!v.current,name:o,value:l,checked:x,required:s,disabled:c,style:{transform:"translateX(-100%)"}}))}),$w="SwitchThumb",ww=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=bw($w,n);return i.createElement(q.span,R({"data-state":vd(r.checked),"data-disabled":r.disabled?"":void 0},o,{ref:t}))}),Cw=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=i.useRef(null),s=Cc(n),c=hc(t);return i.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const g=new Event("click",{bubbles:o});f.call(l,n),l.dispatchEvent(g)}},[s,n,o]),i.createElement("input",R({type:"checkbox","aria-hidden":!0,defaultChecked:n},r,{tabIndex:-1,ref:a,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function vd(e){return e?"checked":"unchecked"}const yw=xw,Ew=ww,bd=i.forwardRef((e,t)=>{const{className:n,...o}=e;return p.jsx(yw,{ref:t,className:T(n,"fp-switchRoot"),...o,children:p.jsx(Ew,{ref:t,className:T(n,"fp-switchThumb")})})});bd.displayName="Switch";exports.AlertDialog=cx;exports.Button=pd;exports.Checkbox=If;exports.Collapsible=Q$;exports.ColorPicker=G$;exports.ContextMenu=Jv;exports.Dialog=B0;exports.DropdownMenu=gv;exports.Flex=Fr;exports.IconButton=Wn;exports.Input=kr;exports.Label=Rn;exports.Link=bs;exports.Paragraph=vs;exports.Popover=R0;exports.RadioGroup=Sf;exports.SegmentedControl=uf;exports.Select=Dh;exports.Slider=Yn;exports.Switch=bd;exports.Tabs=ef;exports.Text=qe;exports.Textarea=hd;exports.Tooltip=Sr;exports.TooltipProvider=b0;exports.ValueField=Xx;exports.blendWithWhite=To;exports.createIcon=Ze;exports.rgbaToCssString=$t;exports.rgbaToP3String=xt;
|
|
78
|
+
* */function In(t){const r=V.useRef(t);return V.useEffect(()=>{r.current=t}),V.useMemo(()=>(...n)=>{var a;return(a=r.current)==null?void 0:a.call(r,...n)},[])}function Tt({prop:t,defaultProp:r,onChange:n=()=>{}}){const[a,o]=Mo({defaultProp:r,onChange:n}),l=t!==void 0,p=l?t:a,g=In(n),x=V.useCallback(C=>{if(l){const P=typeof C=="function"?C(t):C;P!==t&&g(P)}else o(C)},[l,t,o,g]);return[p,x]}function Mo({defaultProp:t,onChange:r}){const n=V.useState(t),[a]=n,o=V.useRef(a),l=In(r);return V.useEffect(()=>{o.current!==a&&(l(a),o.current=a)},[a,o,l]),n}const $n=y.forwardRef((t,r)=>{const{className:n,fullWidth:a,value:o,defaultValue:l,onValueChange:p,...g}=t,[x,C]=Tt({prop:o,defaultProp:l,onChange:p});return c.jsx(wn.Root,{ref:r,className:_.cx(n,"fp-SegmentedControlRoot",{"fp-full-width":a}),...g,type:"single",value:x,onValueChange:R=>{R&&C(R)}})}),Mn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(wn.Item,{ref:r,className:_.cx(n,"fp-SegmentedControlItem"),...a})}),Dn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(We,{ref:r,className:_.cx(n,"fp-SegmentedControlText"),...a})});$n.displayName="SegmentedControl.Root";Mn.displayName="SegmentedControl.Item";Dn.displayName="SegmentedControl.Text";const Do=Object.freeze(Object.defineProperty({__proto__:null,Item:Mn,Root:$n,Text:Dn},Symbol.toStringTag,{value:"Module"}));function Jr(t,r){const n=y.createContext(r);function a(l){const{children:p,...g}=l,x=y.useMemo(()=>g,Object.values(g));return c.jsx(n.Provider,{value:x,children:p})}function o(l){const p=y.useContext(n);if(p)return p;if(r!==void 0)return r;throw new Error(`\`${l}\` must be used within \`${t}\``)}return a.displayName=t+"Provider",[a,o]}const[Ao,Fo]=Jr("RadioGroup"),An=y.forwardRef((t,r)=>{const{orientation:n="horizontal",disabled:a,className:o,...l}=t;return c.jsx(Ao,{orientation:n,disabled:a,children:c.jsx(Sn.Root,{ref:r,orientation:n,disabled:a,className:_.cx(o,"fp-RadioGroupRoot"),...l})})}),Fn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Sn.Item,{ref:r,className:_.cx(n,"fp-RadioGroupItem"),...a})}),Ln=y.forwardRef((t,r)=>{const{orientation:n,disabled:a}=Fo("Label"),{className:o,...l}=t;return c.jsx(Xr,{ref:r,className:_.cx(o,"fp-RadioGroupLabel"),"data-orientation":n,"data-disabled":a?"":void 0,...l})});An.displayName="RadioGroup.Root";Fn.displayName="RadioGroup.Item";Ln.displayName="RadioGroup.Label";const Lo=Object.freeze(Object.defineProperty({__proto__:null,Item:Fn,Label:Ln,Root:An},Symbol.toStringTag,{value:"Module"})),Vo="6",zo="0 0 24 24",Uo=_.cva("fp-Icon",{variants:{size:{1:"fp-size-1",2:"fp-size-2","2_5":"fp-size-2_5",3:"fp-size-3","3_5":"fp-size-3_5",4:"fp-size-4",5:"fp-size-5",6:"fp-size-6",7:"fp-size-7",8:"fp-size-8",9:"fp-size-9",10:"fp-size-10"}},defaultVariants:{size:Vo}});function Ge(t){const{path:r,viewBox:n=zo,displayName:a}=t,o=y.forwardRef((l,p)=>{const{size:g,className:x,...C}=l;return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",ref:p,viewBox:n,className:Uo({className:x,size:g}),fill:"none",...C,children:r})});return o.displayName=a||"Icon",o}const Vn=Ge({displayName:"Close",path:c.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",strokeLinejoin:"round",d:"M17 7 7 17M7 7l10 10"})}),kt=Ge({displayName:"ChevronRight",path:c.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M11.121 14.121L13.243 12L11.12 9.879"})}),Bo=Ge({displayName:"ChevronUp",path:c.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M14.121 12.879L12 10.757L9.87903 12.88"})}),zn=Ge({displayName:"ChevronDown",path:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M9.87897 11.121L12 13.243L14.121 11.12"})})}),Qr=Ge({displayName:"Checkmark",viewBox:"0 0 16 16",path:c.jsx("path",{fill:"var(--color-icon)",fillRule:"evenodd",clipRule:"evenodd",d:"M11.777 4.08399C11.8873 4.1575 11.9639 4.27178 11.99 4.40172C12.016 4.53167 11.9894 4.66665 11.916 4.77699L7.91602 10.777C7.87506 10.8387 7.82091 10.8905 7.75748 10.9287C7.69405 10.9669 7.62294 10.9905 7.54926 10.9979C7.47559 11.0053 7.40119 10.9962 7.33146 10.9713C7.26172 10.9464 7.19839 10.9063 7.14602 10.854L4.14602 7.85399C4.09953 7.80751 4.06266 7.75232 4.0375 7.69158C4.01234 7.63084 3.99939 7.56574 3.99939 7.49999C3.99939 7.43425 4.01234 7.36915 4.0375 7.30841C4.06266 7.24767 4.09953 7.19248 4.14602 7.14599C4.19251 7.09951 4.2477 7.06263 4.30844 7.03747C4.36918 7.01231 4.43428 6.99936 4.50002 6.99936C4.56577 6.99936 4.63087 7.01231 4.6916 7.03747C4.75234 7.06263 4.80753 7.09951 4.85402 7.14599L7.42202 9.71599L11.084 4.22299C11.1575 4.11271 11.2718 4.03612 11.4018 4.01006C11.5317 3.98399 11.6667 4.01059 11.777 4.08399Z"})}),Un=Ge({displayName:"Circle",viewBox:"0 0 16 16",path:c.jsx("circle",{fill:"var(--color-icon)",cx:"8",cy:"8",r:"3"})}),Wo=Ge({displayName:"CheckmarkIndeterminate",viewBox:"0 0 16 16",path:c.jsx("path",{fill:"var(--color-icon)",d:"M4 8a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z"})}),[Go,Ot]=Jr("Checkbox"),Bn=y.forwardRef((t,r)=>{const{className:n,id:a,...o}=t,l=V.useId(),p=a??l;return c.jsx(Go,{id:p,children:c.jsx("div",{ref:r,className:_.cx(n,"fp-CheckboxRoot"),...o})})}),Wn=y.forwardRef((t,r)=>{const{className:n,indeterminate:a,...o}=t,{id:l}=Ot("Input"),p=Ho(a),g=qr(r,p);return c.jsxs(c.Fragment,{children:[c.jsx("input",{ref:g,className:_.cx(n,"fp-CheckboxInput"),id:l,"aria-labelledby":`checkbox-label-${l}`,"aria-describedby":`checkbox-description-${l}`,...o,type:"checkbox"}),c.jsx(Gn,{})]})}),Gn=()=>c.jsxs("span",{className:"fp-CheckboxIndicator","aria-hidden":"true",children:[c.jsx(Qr,{className:"fp-CheckboxCheckmark",size:"4"}),c.jsx(Wo,{className:"fp-CheckboxIndeterminate",size:"4"})]}),Hn=y.forwardRef((t,r)=>{const{className:n,...a}=t,{id:o}=Ot("Input");return c.jsx(Xr,{"aria-hidden":"true",ref:r,className:_.cx(n,"fp-CheckboxLabel"),htmlFor:o,id:`checkbox-label-${o}`,...a})}),Yn=y.forwardRef((t,r)=>{const{className:n,...a}=t,{id:o}=Ot("Description");return c.jsx(We,{"aria-hidden":"true",ref:r,className:_.cx(n,"fp-CheckboxDescription"),id:`checkbox-description-${o}`,...a})});function Ho(t){return V.useCallback(r=>{r&&(r.indeterminate=!!t)},[t])}Bn.displayName="Checkbox.Root";Wn.displayName="Checkbox.Input";Gn.displayName="Checkbox.Indicator";Hn.displayName="Checkbox.Label";Yn.displayName="Checkbox.Description";const Yo=Object.freeze(Object.defineProperty({__proto__:null,Description:Yn,Input:Wn,Label:Hn,Root:Bn},Symbol.toStringTag,{value:"Module"})),qn=ye.Root,qo=ye.Arrow,It=y.forwardRef((t,r)=>{const{placeholder:n,className:a,...o}=t;return c.jsxs(ye.Trigger,{ref:r,...o,className:_.cx(a,"fp-SelectTrigger"),children:[c.jsx(ye.Value,{placeholder:n}),c.jsx(ye.Icon,{className:"fp-SelectTriggerIcon",children:c.jsx(zn,{})})]})}),$t=y.forwardRef((t,r)=>{const{children:n,portal:a=!1,className:o,...l}=t,p=a?ye.Portal:y.Fragment;return c.jsx(p,{children:c.jsxs(ye.Content,{ref:r,...l,className:_.cx(o,"fp-MenuContent"),children:[c.jsx(ye.ScrollUpButton,{className:"fp-SelectScrollUpButton",children:c.jsx(Bo,{})}),c.jsx(ye.Viewport,{children:n}),c.jsx(ye.ScrollDownButton,{className:"fp-SelectScrollDownButton",children:c.jsx(zn,{})})]})})}),Mt=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(ye.Item,{ref:r,...o,className:_.cx(a,"fp-MenuItem fp-MenuCheckboxItem"),children:[c.jsx(ye.ItemIndicator,{className:"fp-MenuItemIndicator",children:c.jsx(Qr,{size:"4"})}),c.jsx(ye.ItemText,{children:n})]})}),Kn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(ye.Separator,{ref:r,className:_.cx(n,"fp-MenuSeparator"),...a})}),Xn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(ye.Label,{ref:r,className:_.cx(n,"fp-MenuLabel"),...a})}),Jn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(ye.Group,{ref:r,className:_.cx(n,"fp-MenuGroup"),...a})});It.displayName="Select.Trigger";$t.displayName="Select.Content";Mt.displayName="Select.Item";Kn.displayName="Select.Separator";Jn.displayName="Select.Group";Xn.displayName="Select.Label";const Ko=Object.freeze(Object.defineProperty({__proto__:null,Arrow:qo,Content:$t,Group:Jn,Item:Mt,Label:Xn,Root:qn,Separator:Kn,Trigger:It},Symbol.toStringTag,{value:"Module"})),Xo=pe.Root,Jo=pe.Trigger,Qo=pe.Sub,Zo=pe.RadioGroup,Qn=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsx(pe.Portal,{children:c.jsx(pe.Content,{ref:r,sideOffset:6,...o,className:_.cx(a,"fp-MenuContent"),children:n})})}),Zn=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(pe.Item,{ref:r,...a,className:_.cx(n,"fp-MenuItem")})}),ea=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(pe.Separator,{ref:r,className:_.cx(n,"fp-MenuSeparator"),...a})}),ra=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(pe.Label,{ref:r,className:_.cx(n,"fp-MenuLabel"),...a})}),ta=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(pe.Group,{ref:r,className:_.cx(n,"fp-MenuGroup"),...a})}),na=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(pe.SubTrigger,{ref:r,...o,className:_.cx(a,"fp-MenuItem"),children:[n,c.jsx(kt,{className:"fp-MenuSubtriggerCaret"})]})}),aa=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(pe.Portal,{children:c.jsx(pe.SubContent,{ref:r,...a,className:_.cx(n,"fp-MenuContent"),sideOffset:12})})}),oa=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(pe.CheckboxItem,{ref:r,...o,className:_.cx(a,"fp-MenuItem fp-MenuCheckboxItem"),children:[c.jsx(pe.ItemIndicator,{className:"fp-MenuItemIndicator",children:c.jsx(Qr,{size:"4"})}),n]})}),sa=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(pe.RadioItem,{ref:r,...o,className:_.cx(a,"fp-MenuItem fp-MenuRadioItem"),children:[c.jsx(pe.ItemIndicator,{className:"fp-MenuItemIndicator",children:c.jsx(Un,{size:"4"})}),n]})});Qn.displayName="DropdownMenu.Content";Zn.displayName="DropdownMenu.Item";ea.displayName="DropdownMenu.Separator";ta.displayName="DropdownMenu.Group";ra.displayName="DropdownMenu.Label";na.displayName="DropdownMenu.SubTrigger";aa.displayName="DropdownMenu.SubContent";oa.displayName="DropdownMenu.CheckboxItem";sa.displayName="DropdownMenu.RadioItem";const es=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:oa,Content:Qn,Group:ta,Item:Zn,Label:ra,RadioGroup:Zo,RadioItem:sa,Root:Xo,Separator:ea,Sub:Qo,SubContent:aa,SubTrigger:na,Trigger:Jo},Symbol.toStringTag,{value:"Module"})),rs=me.Root,ts=me.Trigger,ns=me.Sub,as=me.RadioGroup,ia=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsx(me.Portal,{children:c.jsx(me.Content,{ref:r,...o,className:_.cx(a,"fp-MenuContent"),children:n})})}),ca=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(me.Item,{ref:r,...a,className:_.cx(n,"fp-MenuItem")})}),la=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(me.Separator,{ref:r,className:_.cx(n,"fp-MenuSeparator"),...a})}),ua=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(me.Label,{ref:r,className:_.cx(n,"fp-MenuLabel"),...a})}),fa=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(me.Group,{ref:r,className:_.cx(n,"fp-MenuGroup"),...a})}),da=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(me.SubTrigger,{ref:r,...o,className:_.cx(a,"fp-MenuItem"),children:[n,c.jsx(kt,{className:"fp-MenuSubtriggerCaret"})]})}),pa=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(me.Portal,{children:c.jsx(me.SubContent,{ref:r,...a,className:_.cx(n,"fp-MenuContent"),sideOffset:12})})}),ma=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(me.CheckboxItem,{ref:r,...o,className:_.cx(a,"fp-MenuItem fp-MenuCheckboxItem"),children:[c.jsx(me.ItemIndicator,{className:"fp-MenuItemIndicator",children:c.jsx(Qr,{size:"4"})}),n]})}),ga=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsxs(me.RadioItem,{ref:r,...o,className:_.cx(a,"fp-MenuItem fp-MenuRadioItem"),children:[c.jsx(me.ItemIndicator,{className:"fp-MenuItemIndicator",children:c.jsx(Un,{size:"4"})}),n]})});ia.displayName="ContextMenu.Content";ca.displayName="ContextMenu.Item";la.displayName="ContextMenu.Separator";ua.displayName="ContextMenu.Label";fa.displayName="ContextMenu.Group";da.displayName="ContextMenu.SubTrigger";pa.displayName="ContextMenu.SubContent";ma.displayName="ContextMenu.CheckboxItem";ga.displayName="ContextMenu.RadioItem";const os=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:ma,Content:ia,Group:fa,Item:ca,Label:ua,RadioGroup:as,RadioItem:ga,Root:rs,Separator:la,Sub:ns,SubContent:pa,SubTrigger:da,Trigger:ts},Symbol.toStringTag,{value:"Module"})),{TooltipProvider:ss}=cr,is=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(cr.Content,{ref:r,className:_.cx(n,"fp-tooltip"),...a})}),cs=t=>{const{className:r,...n}=t;return c.jsx(cr.Arrow,{className:_.cx(r,"fp-tooltip-arrow"),...n})},Dt=y.forwardRef((t,r)=>{const{defaultOpen:n,open:a,onOpenChange:o,delayDuration:l,disableHoverableContent:p,container:g,forceMount:x,children:C,content:R,...P}=t,G={open:a,defaultOpen:n,onOpenChange:o,delayDuration:l,disableHoverableContent:p};return c.jsxs(cr.Root,{...G,children:[c.jsx(cr.Trigger,{asChild:!0,children:C}),c.jsx(cr.Portal,{forceMount:x,container:g,children:c.jsxs(is,{ref:r,arrowPadding:10,...P,children:[R,c.jsx(cs,{})]})})]})});Dt.displayName="Tooltip";const ls=_.cva("fp-IconButton",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium"},activeAppearance:{subtle:"fp-active-appearance-subtle",solid:"fp-active-appearance-solid"}},defaultVariants:{size:"small",activeAppearance:"subtle"}}),Zr=y.forwardRef((t,r)=>{const{className:n,size:a,activeAppearance:o,"aria-label":l,tooltipContent:p,disableTooltip:g,...x}=t,C=c.jsx("button",{ref:r,className:ls({className:n,size:a,activeAppearance:o}),"aria-label":l,...x});return g?C:c.jsx(Dt,{content:p??l,children:C})});Zr.displayName="IconButton";const At=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsx("header",{ref:r,className:_.cx(a,"fp-DialogBaseHeader"),...o,children:n})}),Ft=y.forwardRef((t,r)=>{const{className:n,size:a,...o}=t;return c.jsx("div",{ref:r,className:us({className:n,size:a}),...o})}),Lt=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx("div",{ref:r,className:_.cx(n,"fp-DialogBaseControls"),...a})}),us=_.cva("fp-DialogBaseSection",{variants:{size:{base:"fp-DialogBaseSection-base",small:"fp-DialogBaseSection-small"}},defaultVariants:{size:"base"}});At.displayName="Dialog.Header";Ft.displayName="Dialog.Section";Lt.displayName="Dialog.Controls";const fs=lr.Root,ds=lr.Anchor,ps=lr.Portal,ha=y.forwardRef((t,r)=>c.jsx(lr.Trigger,{ref:r,...t,asChild:!0})),va=y.forwardRef((t,r)=>{const{className:n,style:a,width:o,height:l,maxWidth:p,maxHeight:g,...x}=t;return c.jsx(lr.Content,{ref:r,className:_.cx(n,"fp-DialogBaseContent"),style:{...a,width:o,height:l,maxWidth:p,maxHeight:g},...x})}),ya=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(We,{ref:r,className:_.cx(n,"fp-DialogBaseTitle"),weight:"strong",...a})}),ba=y.forwardRef((t,r)=>{const{children:n,...a}=t;return c.jsx(lr.Close,{ref:r,asChild:!0,...a,children:n||c.jsx(Zr,{"aria-label":"Close",disableTooltip:!0,children:c.jsx(Vn,{})})})});ha.displayName="Popover.Trigger";va.displayName="Popover.Content";ya.displayName="Popover.Title";ba.displayName="Popover.Close";const ms=Object.freeze(Object.defineProperty({__proto__:null,Anchor:ds,Close:ba,Content:va,Controls:Lt,Header:At,Portal:ps,Root:fs,Section:Ft,Title:ya,Trigger:ha},Symbol.toStringTag,{value:"Module"})),gs=er.Root,hs=er.Portal,xa=y.forwardRef((t,r)=>c.jsx(er.Trigger,{ref:r,...t,asChild:!0})),vs=_.cva(["fp-DialogBaseContent","fp-DialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3",fullscreen:"fp-size-fullscreen"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),Ra=y.forwardRef((t,r)=>{const{children:n,className:a,size:o,placement:l,style:p,width:g,height:x,maxWidth:C,maxHeight:R,...P}=t;return c.jsx(er.Content,{ref:r,className:vs({className:a,size:o,placement:l}),"aria-describedby":void 0,style:{...p,width:g,height:x,maxWidth:C,maxHeight:R},...P,children:n})}),Ca=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(er.Overlay,{ref:r,className:_.cx(n,"fp-DialogBaseOverlay"),...a})}),_a=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsx(er.Title,{ref:r,className:_.cx(a,"fp-DialogBaseTitle"),...o,asChild:!0,children:c.jsx(We,{weight:"strong",children:n})})}),wa=y.forwardRef((t,r)=>{const{children:n,...a}=t;return c.jsx(er.Close,{ref:r,asChild:!0,...a,children:n||c.jsx(Zr,{"aria-label":"Close",disableTooltip:!0,children:c.jsx(Vn,{})})})});xa.displayName="Dialog.Trigger";Ra.displayName="Dialog.Content";Ca.displayName="Dialog.Overlay";_a.displayName="Dialog.Title";wa.displayName="Dialog.Close";const ys=Object.freeze(Object.defineProperty({__proto__:null,Close:wa,Content:Ra,Controls:Lt,Header:At,Overlay:Ca,Portal:hs,Root:gs,Section:Ft,Title:_a,Trigger:xa},Symbol.toStringTag,{value:"Module"})),bs=Me.Root,xs=Me.Portal,Sa=y.forwardRef((t,r)=>c.jsx(Me.Trigger,{ref:r,...t,asChild:!0})),Rs=_.cva(["fp-DialogBaseContent","fp-AlertDialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),ja=y.forwardRef((t,r)=>{const{className:n,size:a,placement:o,style:l,width:p,height:g,maxWidth:x,maxHeight:C,...R}=t;return c.jsx(Me.Content,{ref:r,className:Rs({className:n,size:a,placement:o}),style:{...l,width:p,height:g,maxWidth:x,maxHeight:C},...R})}),Ea=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Me.Overlay,{ref:r,className:_.cx(n,"fp-DialogBaseOverlay"),...a})}),Ta=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsx(Me.Title,{ref:r,className:_.cx(a,"fp-AlertDialogTitle"),...o,asChild:!0,children:c.jsx(We,{weight:"strong",children:n})})}),Pa=y.forwardRef((t,r)=>{const{children:n,className:a,...o}=t;return c.jsx(Me.Description,{ref:r,className:_.cx(a,"fp-AlertDialogDescription"),...o,asChild:!0,children:c.jsx(We,{children:n})})}),Na=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx("div",{ref:r,className:_.cx(n,"fp-AlertDialogActions"),...a})}),ka=y.forwardRef((t,r)=>c.jsx(Me.Cancel,{ref:r,asChild:!0,...t})),Oa=y.forwardRef((t,r)=>c.jsx(Me.Action,{ref:r,asChild:!0,...t}));Sa.displayName="AlertDialog.Trigger";ja.displayName="AlertDialog.Content";Ea.displayName="AlertDialog.Overlay";Ta.displayName="AlertDialog.Title";Pa.displayName="AlertDialog.Description";Na.displayName="AlertDialog.Actions";ka.displayName="AlertDialog.Cancel";Oa.displayName="AlertDialog.Action";const Cs=Object.freeze(Object.defineProperty({__proto__:null,Action:Oa,Actions:Na,Cancel:ka,Content:ja,Description:Pa,Overlay:Ea,Portal:xs,Root:bs,Title:Ta,Trigger:Sa},Symbol.toStringTag,{value:"Module"})),[Ia,Vt]=Jr("ValueFieldProvider",null),be=y.forwardRef((t,r)=>{const{className:n,disabled:a,...o}=t,l=Vt("Root");return c.jsx(Ia,{disabled:a,children:c.jsx("label",{ref:r,className:_.cx(n,"fp-ValueFieldRoot"),"data-disabled":a||l!=null&&l.disabled?"":void 0,...o})})}),ur=y.forwardRef((t,r)=>{const{className:n,disabled:a,...o}=t;return c.jsx(Ia,{disabled:a,children:c.jsx("div",{ref:r,className:_.cx(n,"fp-ValueFieldMulti"),"data-disabled":a?"":void 0,...o})})}),fr=y.forwardRef((t,r)=>{const{className:n,...a}=t,o=Vt("Root");return c.jsx("span",{ref:r,className:_.cx(n,"fp-ValueFieldLabel"),"data-disabled":o!=null&&o.disabled?"":void 0,...a})});be.displayName="ValueField.Root";fr.displayName="ValueField.Label";ur.displayName="ValueField.Multi";function Ue(t,r){const[n,a]=t,[o,l]=r;return function(p){return n===a||o===l?o:(p-n)/(a-n)*(l-o)+o}}function _s(){const[t,r]=V.useState(!0),n=V.useCallback(()=>{r(!0)},[]),a=V.useCallback(()=>{r(!1)},[]),o=V.useCallback(l=>{t&&l.currentTarget.selectionStart===l.currentTarget.selectionEnd&&(l.currentTarget.select(),r(!1))},[t]);return{onMouseLeave:a,onMouseUp:o,onFocus:n}}const zt=y.forwardRef((t,r)=>{const{type:n="text",className:a,selectOnClick:o=!1,...l}=t,p=V.useRef(null),g=qr(p,r),{onMouseLeave:x,onMouseUp:C,onFocus:R}=_s(),P=o?_n({onMouseLeave:x,onMouseUp:C,onFocus:R},l):l;return c.jsx("input",{ref:g,type:n,className:_.cx(a,"fp-Input"),...P})});zt.displayName="Input";const ws=1,Ss=10,Ut=t=>{const{className:r,inputRef:n,value:a,onChange:o,smallNudge:l=ws,bigNudge:p=Ss,formatter:g,disabled:x,...C}=t,R=V.useRef(null),P=qr(n,R),[G,Y]=V.useState(null),k=G??g.format(a),Q=Vt("ValueField"),re=S=>{const U=g.parse(S,a);if(S.length===0||!U.valid||U.value===a)return ae();Y(null),o(U.value)},ae=()=>{Y(null)},z=S=>{Y(S.currentTarget.value)},Re=S=>{const U=S.currentTarget;if(S.key==="Enter"&&(S.preventDefault(),U.blur()),S.key==="Escape"&&(S.preventDefault(),ae(),requestAnimationFrame(()=>{U.blur()})),S.key==="ArrowUp"||S.key==="ArrowDown"){if(!g.incrementBy)return;S.preventDefault();const xe=g.parse(U.value,a),Se=xe.valid?xe.value:a,Ee=S.shiftKey?p:l,ge=S.key==="ArrowUp"?Ee:-Ee,Ce=g.getIncrementTargets?g.getIncrementTargets(U):null,Te=g.incrementBy(Se,ge,Ce);re(g.format(Te)),requestAnimationFrame(()=>{if(Ce&&g.getIncrementSelection){const[le,he]=g.getIncrementSelection(Ce);U.setSelectionRange(le,he)}else U.select()})}},ce=S=>{re(S.currentTarget.value)};return c.jsx(zt,{ref:P,dir:"auto",autoComplete:"off",spellCheck:"false",selectOnClick:!0,className:_.cx(r,"fp-ValueFieldBase"),value:k,onChange:z,disabled:x||(Q==null?void 0:Q.disabled),..._n(C,{onBlur:ce,onKeyDown:Re})})};Ut.displayName="ValueField.Base";const js=15,we=y.forwardRef((t,r)=>{const{value:n,onChange:a,min:o,max:l,targetRange:p,precision:g,suffix:x,allowedUnits:C,...R}=t,P=V.useMemo(()=>Es({min:o,max:l,precision:g,targetRange:p,suffix:x,allowedUnits:C}),[o,l,g,p,x,C]);return c.jsx(Ut,{inputRef:r,value:n,onChange:a,formatter:P,...R})});function Es(t={}){const{min:r,max:n,targetRange:a,precision:o=js,suffix:l,allowedUnits:p=[]}=t,{toDisplayValue:g,fromDisplayValue:x}=Ts({min:r,max:n,targetRange:a});return{parse:(C,R)=>{try{return{valid:!0,value:J.pipe(C,P=>Ns({expression:P,displayValue:g(R),suffix:l,allowedUnits:p}),J.round(o),x,J.clamp({min:r,max:n}))}}catch{return{valid:!1}}},format:C=>J.pipe(C,J.clamp({min:r,max:n}),g,J.round(o),R=>Ps(R,l)),incrementBy(C,R){return C+x(R)}}}function Ts(t){const{min:r,max:n,targetRange:a}=t;if(!a)return{toDisplayValue:o=>o,fromDisplayValue:o=>o};if(typeof r!="number"||typeof n!="number")throw Error("'targetRange' requires specifying 'min' and 'max'.");if(r===n)throw Error("'min' and 'max' cannot be equal.");return{toDisplayValue:Ue([r,n],a),fromDisplayValue:Ue(a,[r,n])}}function Ps(t,r){return Number.isNaN(t)?"":r?`${t}${r}`:`${t}`}function Ns(t){const{displayValue:r,expression:n,suffix:a="",allowedUnits:o=[]}=t,l="(\\d*\\.?\\d+)",p=`(?:${[...o,a].join("|")})*`,g=n.replace(new RegExp(`${l}${p}`,"gi"),(C,R)=>R).replace(new RegExp(`${p}${l}`,"gi"),(C,R)=>R).replace(new RegExp(`${l}%`,"gi"),(C,R)=>`(${r}*${R}/100)`).replace(new RegExp(`%${l}`,"gi"),(C,R)=>`(${r}*${R}/100)`).replace(new RegExp(`${l}x`,"gi"),(C,R)=>`(${r}*${R})`).replace(new RegExp(`x${l}`,"gi"),(C,R)=>`(${r}*${R})`).replace(new RegExp("(?<!\\d)x(?!\\d)","gi"),`${r}`).trim(),x=Co(g);if(x===null)throw new Error("Invalid expression.");return x}const $a=y.forwardRef((t,r)=>{const{value:n,onChange:a,ignoreAlpha:o=!1,...l}=t,p=V.useMemo(()=>ks({ignoreAlpha:o}),[o]);return c.jsx(Ut,{inputRef:r,value:n,onChange:a,formatter:p,...l})});function ks(t){const{ignoreAlpha:r}=t;return{parse(n,a){try{return{value:J.pipe(n,Os,o=>Is(o,a),$s,o=>r?{...o,a:1}:o),valid:!0}}catch{return{valid:!1}}},format(n){return(Math.round(n.r*255).toString(16).padStart(2,"0")+Math.round(n.g*255).toString(16).padStart(2,"0")+Math.round(n.b*255).toString(16).padStart(2,"0")).toUpperCase()},incrementBy(n,a,o){return o??(o={r:!0,g:!0,b:!0}),{r:o.r?J.clamp(Math.round(n.r*255)+a,{min:0,max:255})/255:n.r,g:o.g?J.clamp(Math.round(n.g*255)+a,{min:0,max:255})/255:n.g,b:o.b?J.clamp(Math.round(n.b*255)+a,{min:0,max:255})/255:n.b,a:n.a}},getIncrementTargets(n){const a=n.selectionStart,o=n.selectionEnd;return a===null||o===null?null:{r:a<2||a===2&&o===2,g:a<4&&o>=3||a===4&&o===4,b:o>=5}},getIncrementSelection(n){let a,o;return n?(n.r?a=0:n.g?a=2:a=4,n.b?o=6:n.g?o=4:o=2,[a,o]):[0,6]}}}function Os(t){var n;const r=/[0-9a-f]+/gi;return((n=t.match(r))==null?void 0:n[0])??""}function Is(t,r){if(!/^[0-9a-f]{1,8}$/i.test(t))throw new Error("Invalid hex substring");switch(t.length){case 1:return t.repeat(6)+Br(r.a);case 2:return t.repeat(3)+Br(r.a);case 3:return t.split("").map(n=>n.repeat(2)).join("")+Br(r.a);case 4:return t.slice(0,3).split("").map(n=>n.repeat(2)).join("")+t[3].repeat(2);case 5:return t.slice(0,3).split("").map(n=>n.repeat(2)).join("")+t.slice(-2);case 6:return t+Br(r.a);case 7:return t.slice(0,6)+t[6].repeat(2);case 8:return t;default:throw new Error("Invalid hex substring")}}function $s(t){return{r:parseInt(t.substring(0,2),16)/255,g:parseInt(t.substring(2,4),16)/255,b:parseInt(t.substring(4,6),16)/255,a:parseInt(t.substring(6,8),16)/255}}function Br(t){return Math.round(t*255).toString(16)}const Ms=Object.freeze(Object.defineProperty({__proto__:null,Hex:$a,Label:fr,Multi:ur,Numeric:we,Root:be},Symbol.toStringTag,{value:"Module"}));function Wr(t){const r=J.round(t*255,0).toString(16);return r.length<2?"0"+r:r}function Hr({r:t,g:r,b:n,a}){const o=a<1?Wr(a):"";return"#"+Wr(t)+Wr(r)+Wr(n)+o}function Ds(t){return Hr(Pt(t))}function As(t){return Hr(Be(t))}function Cr({r:t,g:r,b:n,a}){const o=Math.max(t,r,n),l=o-Math.min(t,r,n),p=l?o===t?(r-n)/l:o===r?2+(n-t)/l:4+(t-r)/l:0;return{h:60*(p<0?p+6:p),s:o?l/o*100:0,v:o*100,a}}function Be({h:t,s:r,v:n,a}){t=t/360*6,r=r/100,n=n/100;const o=Math.floor(t),l=n*(1-r),p=n*(1-(t-o)*r),g=n*(1-(1-t+o)*r),x=o%6;return{r:[n,p,l,l,g,n][x],g:[g,n,n,p,l,l][x],b:[l,l,g,n,n,p][x],a}}function Ma({h:t,s:r,l:n,a}){return r*=(n<50?n:100-n)/100,{h:t,s:r>0?2*r/(n+r)*100:0,v:n+r,a}}function Da({h:t,s:r,v:n,a}){const o=(200-r)*n/100;return{h:t,s:o>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0,l:o/2,a}}function Pt(t){return Be(Ma(t))}function xn(t){return Da(Cr(t))}function xr(t){const r=J.round(t.r,4),n=J.round(t.g,4),a=J.round(t.b,4),o=J.round(t.a,2);return o<1?`color(display-p3 ${r} ${n} ${a} / ${o})`:`color(display-p3 ${r} ${n} ${a})`}function Rr(t){const r=Math.round(t.r*255),n=Math.round(t.g*255),a=Math.round(t.b*255),o=t.a;return o<1?`rgb(${r} ${n} ${a} / ${o})`:`rgb(${r} ${n} ${a})`}function Rn(t){const{r,g:n,b:a,a:o}=t;return{r:r+(1-r)*(1-o),g:n+(1-n)*(1-o),b:a+(1-a)*(1-o),a:1}}const Fs={r:0,g:0,b:0,a:1},Ls=["hex","rgb","hsl","hsv"],[Vs,De]=Jr("ColorPicker"),zs=t=>{const{colorSpace:r,models:n=Ls,defaultActiveModel:a,activeModel:o,onActiveModelChange:l,defaultColor:p,color:g,onColorChange:x,children:C}=t;Us(o,a,n);const[R=Fs,P]=Tt({prop:g,defaultProp:p,onChange:x}),[G=n[0],Y]=Tt({prop:o,defaultProp:a,onChange:l}),[k,Q]=V.useState({}),re={hsv:k.hsv??Cr(R),hsl:k.hsl??xn(R),rgb:k.rgb??R,hex:k.hex??Hr(R)},ae=re.hsv.h,z=Re=>{const{mode:ce,value:S}=Re;ce==="rgb"?(Q({rgb:S,hsv:Cr(S),hsl:xn(S),hex:Hr(S)}),P(S)):ce==="hsv"?(Q({hsv:S,hsl:Da(S),rgb:Be(S),hex:As(S)}),P(Be(S))):ce==="hsl"&&(Q({hsv:Ma(S),hsl:S,rgb:Pt(S),hex:Ds(S)}),P(Pt(S)))};return c.jsx(Vs,{colorSpace:r,models:n,activeModel:G,onActiveModelChange:Y,color:R,onColorChange:z,hue:ae,colorsByModel:re,children:C})};function Us(t,r,n){if(n.length===0)throw new Error("The 'models' prop must contain at least one color model. Omit the 'models' prop entirely to use default models.");if(t&&!n.includes(t))throw new Error(`Invalid 'activeModel': '${t}' is not present in the 'models' array. Make sure 'activeModel' matches a model name in 'models'.`);if(r&&!n.includes(r))throw new Error(`Invalid 'defaultActiveModel': '${r}' is not present in the 'models' array. Make sure 'activeModel' matches a model name in 'models'.`)}const Bs=2,Ws=0,Gs=100,Hs="horizontal",Ys="ltr",et=y.forwardRef((t,r)=>{const{className:n,min:a=Ws,max:o=Gs,defaultValue:l=[a],value:p,onValueChange:g,orientation:x=Hs,dir:C=Ys,inverted:R,disabled:P,range:G=!0,rangeAnchor:Y,baseValue:k,hints:Q,...re}=t,ae=V.useRef(null),z=qr(ae,r),{onPointerDown:Re,focusVisible:ce}=Js(ae),[S,U]=V.useState(p??l),xe=V.useRef(p),Se=V.useRef(l);V.useEffect(()=>{J.isDeepEqual(p,xe.current)&&J.isDeepEqual(l,Se.current)||U(p??l)},[p,l]),V.useEffect(()=>{ae.current&&ae.current.style.setProperty("--radix-slider-thumb-transform",Xs(x,C,R))},[ae,x,C,R]);const Ee=ge=>{const Ce=ge.map(Te=>Qs(Te,Q,a,o));g==null||g(Ce),U(Ce)};return c.jsxs(wt.Root,{tabIndex:-1,ref:z,className:_.cx(n,"fp-SliderRoot"),value:S,onValueChange:Ee,onPointerDown:Re,min:a,max:o,orientation:x,dir:C,inverted:R,disabled:P,...re,children:[c.jsx(wt.Track,{className:"fp-SliderTrack"}),G&&c.jsx(Ks,{dir:C,value:S,min:a,max:o,orientation:x,inverted:R,rangeAnchor:Y,disabled:P}),Q&&Q.map(ge=>c.jsx(qs,{hint:ge,baseValue:k,min:a,max:o,orientation:x,dir:C,inverted:R},ge)),S.map((ge,Ce)=>c.jsx(wt.Thumb,{className:_.cx("fp-SliderThumb",{"fp-SliderThumb-focusVisible":ce,"fp-SliderThumb-baseValue":ge===k})},Ce))]})});et.displayName="Slider";const qs=t=>{const{baseValue:r,dir:n,inverted:a,max:o,min:l,orientation:p,hint:g}=t,{startEdge:x}=Aa(p,n,a),C=Ue([l,o],[0,100])(g),R=4;return c.jsx(c.Fragment,{children:c.jsx("span",{className:_.cx("fp-SliderHint",{"fp-SliderHint-baseValue":g===r}),"data-orientation":p,style:{[x]:`calc(${C}% - ${R/2}px)`}})})},Ks=t=>{const{min:r,max:n,value:a,rangeAnchor:o=r,orientation:l,dir:p,inverted:g,disabled:x}=t,C=a.length>1?Math.min(...a):Math.min(o,...a),R=a.length>1?Math.max(...a):Math.max(o,...a),P=Ue([r,n],[0,100])(C),G=100-Ue([r,n],[0,100])(R),Y=Aa(l,p,g);return c.jsx("span",{className:"fp-SliderRange","data-orientation":l,"data-disabled":x?"":void 0,style:{[Y.startEdge]:`${P}%`,[Y.endEdge]:`${G}%`}})};function Aa(t,r,n){const a=n?"inverted":"normal";return{vertical:{normal:{startEdge:"bottom",endEdge:"top"},inverted:{startEdge:"top",endEdge:"bottom"}},horizontal:{normal:{startEdge:r==="ltr"?"left":"right",endEdge:r==="ltr"?"right":"left"},inverted:{startEdge:r==="ltr"?"right":"left",endEdge:r==="ltr"?"left":"right"}}}[t][a]}function Xs(t,r,n){const a=n?"inverted":"normal";return{vertical:{normal:"translateY(50%)",inverted:"translateY(-50%)"},horizontal:{normal:r==="ltr"?"translateX(-50%)":"translateX(50%)",inverted:r==="ltr"?"translateX(50%)":"translateX(-50%)"}}[t][a]}function Js(t){const[r,n]=V.useState(!1),a=()=>{var l;n(!1),window.removeEventListener("pointerup",a),(l=t.current)==null||l.focus()};return{onPointerDown:()=>{n(!0),window.addEventListener("pointerup",a)},focusVisible:!r}}function Qs(t,r,n,a){const o=Ue([0,100],[0,a-n])(Bs),l=r==null?void 0:r.find(p=>Math.abs(p-t)<=o);return typeof l=="number"?l:t}const Zs=t=>{const{className:r,style:n}=t,{activeModel:a,colorSpace:o,hue:l,color:p,onColorChange:g}=De("Hue"),x=ei[a],C=P=>{const G=x.setHue(p,P[0]);g({mode:"rgb",value:G})},R=x.getThumbColor(l,o);return c.jsx(et,{"aria-label":"hue",range:!1,min:0,max:359,value:[l],onValueChange:C,className:`fp-ColorPickerHueSlider fp-color-model-${a} fp-color-space-${o} ${r}`,style:{"--slider-thumb-bg":R,...n}})},Gr={getHue:t=>Math.round(Cr(t).h),setHue:(t,r)=>{const{s:n,v:a}=Cr(t);return Be({h:r,s:n,v:a,a:t.a})},getThumbColor:(t,r)=>{const{r:n,g:a,b:o}=Be({h:t,s:100,v:100,a:1});return r==="display-p3"?`color(display-p3 ${+n.toFixed(4)} ${+a.toFixed(4)} ${+o.toFixed(4)})`:`rgb(${Math.round(n*255)} ${Math.round(a*255)} ${Math.round(o*255)})`}},ei={rgb:Gr,hsl:Gr,hsv:Gr,hex:Gr},ri=t=>{const{className:r,style:n}=t,{colorSpace:a,color:o,onColorChange:l}=De("Hue"),p={srgb:{transparent:Rr({...o,a:0}),opaque:Rr({...o,a:1})},p3:{transparent:xr({...o,a:0}),opaque:xr({...o,a:1})}},g={srgb:Rr(Rn(o)),p3:xr(Rn(o))},x=C=>{l({mode:"rgb",value:{...o,a:J.round(C[0]/100,2)}})};return c.jsx(et,{"aria-label":"alpha",min:0,max:100,range:!1,value:[o.a*100],onValueChange:x,className:`fp-ColorPickerAlphaSlider fp-color-space-${a} ${r}`,style:{"--track-bg-transparent-srgb":p.srgb.transparent,"--track-bg-opaque-srgb":p.srgb.opaque,"--track-bg-transparent-p3":p.p3.transparent,"--track-bg-opaque-p3":p.p3.opaque,"--thumb-bg-srgb":g.srgb,"--thumb-bg-p3":g.p3,...n}})},ti=8,ni=t=>{const{onColorChange:r,colorsByModel:n,hue:a,colorSpace:o,activeModel:l}=De("ColorPicker.Area"),p={srgb:Rr(Be({h:a,s:100,v:100,a:1})),p3:xr(Be({h:a,s:100,v:100,a:1}))},g={srgb:Rr(n.rgb),p3:xr(n.rgb)},x=ai(n,l),C=V.useRef(null),{size:R}=oi(C),P=k=>{r(l==="hsl"?{mode:"hsl",value:{h:a,s:k.x,l:100-k.y,a:n.rgb.a}}:{mode:"hsv",value:{h:a,s:k.x,v:100-k.y,a:n.rgb.a}})},G=k=>{if(k.type==="pointerdown"&&k.currentTarget.setPointerCapture(k.pointerId),k.type==="pointermove"&&!k.currentTarget.hasPointerCapture(k.pointerId))return;const Q=k.currentTarget.getBoundingClientRect();P({x:J.pipe(k.clientX-Q.x,Ue([0,R],[0,100]),J.clamp({min:0,max:100})),y:J.pipe(k.clientY-Q.y-ti,Ue([0,R],[0,100]),J.clamp({min:0,max:100}))})},Y=k=>{const Q=k.shiftKey?10:1,re={ArrowRight:{x:1,y:0},ArrowLeft:{x:-1,y:0},ArrowDown:{x:0,y:1},ArrowUp:{x:0,y:-1}}[k.key];re&&P({x:J.clamp(x.x+re.x*Q,{min:0,max:100}),y:J.clamp(x.y+re.y*Q,{min:0,max:100})})};return c.jsxs("div",{ref:C,className:"fp-ColorPickerArea",onPointerDown:G,onPointerMove:G,style:{"--base-color-srgb":p.srgb,"--base-color-p3":p.p3},children:[c.jsx("div",{className:`fp-ColorPickerAreaCanvas fp-color-space-${o} fp-color-model-${l}`}),c.jsx("div",{tabIndex:0,onKeyDown:Y,className:`fp-ColorPickerThumb fp-color-space-${o}`,style:{"--thumb-bg-srgb":g.srgb,"--thumb-bg-p3":g.p3,left:`${x.x}%`,top:`${x.y}%`}})]})};function ai(t,r){if(r==="hsl"){const n=t.hsl;return{x:n.s,y:100-n.l}}else{const n=t.hsv;return{x:n.s,y:100-n.v}}}function oi(t){const[r,n]=y.useState(0);return y.useLayoutEffect(()=>{const a=t.current;if(!a)return;n(a.getBoundingClientRect().width);const o=new ResizeObserver(l=>{for(const p of l)n(p.contentRect.width)});return o.observe(a),()=>{o.unobserve(a)}},[t]),{size:r}}const St={0:"fp-gap-0",px:"fp-gap-px","0.5":"fp-gap-0_5",1:"fp-gap-1","1.5":"fp-gap-1_5",2:"fp-gap-2","2.5":"fp-gap-2_5",3:"fp-gap-3","3.5":"fp-gap-3_5",4:"fp-gap-4",5:"fp-gap-5",6:"fp-gap-6",7:"fp-gap-7",8:"fp-gap-8",9:"fp-gap-9",10:"fp-gap-10",11:"fp-gap-11",12:"fp-gap-12",13:"fp-gap-13",14:"fp-gap-14",15:"fp-gap-15",16:"fp-gap-16"},si=_.cva("fp-Flex",{variants:{direction:{row:"fp-direction-row",column:"fp-direction-column",rowReverse:"fp-direction-row-reverse",columnReverse:"fp-direction-column-reverse"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end",baseline:"fp-align-baseline",stretch:"fp-align-stretch"},justify:{start:"fp-justify-start",center:"fp-justify-center",end:"fp-justify-end",between:"fp-justify-between"},wrap:{nowrap:"fp-wrap-nowrap",wrap:"fp-wrap-wrap",wrapReverse:"fp-wrap-wrap-reverse"},gap:St,columnGap:St,rowGap:St},defaultVariants:{direction:"row"}}),Bt=y.forwardRef((t,r)=>{const{className:n,direction:a,align:o,justify:l,wrap:p,gap:g,columnGap:x,rowGap:C,...R}=t;return c.jsx("div",{ref:r,className:si({className:n,direction:a,align:o,justify:l,wrap:p,gap:g,columnGap:x,rowGap:C}),...R})});Bt.displayName="Flex";const ii=t=>{const{models:r,activeModel:n,onActiveModelChange:a}=De("ColorPicker.Input"),o=J.pick({hex:ci,hsv:ui,hsl:fi,rgb:li},r)[n];return c.jsxs(Bt,{gap:"2.5",className:t.className,style:t.style,children:[r.length>1&&c.jsxs(qn,{value:n,onValueChange:a,children:[c.jsx(It,{style:{width:56}}),c.jsx($t,{children:r.map(l=>c.jsx(Mt,{value:l,children:l.toUpperCase()},l))})]}),c.jsx(o,{})]})},ci=()=>{const{colorsByModel:t,onColorChange:r}=De("ColorPicker.HEX"),n=t.rgb,a=l=>{r({mode:"rgb",value:l})},o=l=>{r({mode:"rgb",value:{...n,a:l}})};return c.jsxs(ur,{children:[c.jsx(be,{children:c.jsx($a,{onChange:a,value:n})}),c.jsxs(be,{style:{flex:"0 0 52px"},children:[c.jsx(we,{onChange:o,value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),c.jsx(fr,{children:"%"})]})]})},li=()=>{const{colorsByModel:t,onColorChange:r}=De("ColorPicker.RGBA"),n=t.rgb,a=o=>l=>{r({mode:"rgb",value:{...n,[o]:l}})};return c.jsxs(ur,{children:[c.jsx(be,{children:c.jsx(we,{onChange:a("r"),value:n.r,min:0,max:1,targetRange:[0,255],precision:0})}),c.jsx(be,{children:c.jsx(we,{onChange:a("g"),value:n.g,min:0,max:1,targetRange:[0,255],precision:0})}),c.jsx(be,{children:c.jsx(we,{onChange:a("b"),value:n.b,min:0,max:1,targetRange:[0,255],precision:0})}),c.jsxs(be,{style:{flex:"0 0 52px"},children:[c.jsx(we,{onChange:a("a"),value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),c.jsx(fr,{children:"%"})]})]})},ui=()=>{const{colorsByModel:t,onColorChange:r}=De("ColorPicker.HSVA"),n=t.hsv,a=o=>l=>{r({mode:"hsv",value:{...n,[o]:l}})};return c.jsxs(ur,{children:[c.jsx(be,{children:c.jsx(we,{onChange:a("h"),value:n.h,min:0,max:360,precision:0})}),c.jsx(be,{children:c.jsx(we,{onChange:a("s"),value:n.s,min:0,max:100,precision:0})}),c.jsx(be,{children:c.jsx(we,{onChange:a("v"),value:n.v,min:0,max:100,precision:0})}),c.jsxs(be,{style:{flex:"0 0 52px"},children:[c.jsx(we,{onChange:a("a"),value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),c.jsx(fr,{children:"%"})]})]})},fi=()=>{const{colorsByModel:t,onColorChange:r}=De("ColorPicker.HSLA"),n=t.hsl,a=o=>l=>{r({mode:"hsl",value:{...n,[o]:l}})};return c.jsxs(ur,{children:[c.jsx(be,{children:c.jsx(we,{onChange:a("h"),value:n.h,min:0,max:360,precision:0})}),c.jsx(be,{children:c.jsx(we,{onChange:a("s"),value:n.s,min:0,max:100,precision:0})}),c.jsx(be,{children:c.jsx(we,{onChange:a("l"),value:n.l,min:0,max:100,precision:0})}),c.jsxs(be,{style:{flex:"0 0 52px"},children:[c.jsx(we,{onChange:a("a"),value:n.a,min:0,max:1,targetRange:[0,100],precision:2,allowedUnits:["%"]}),c.jsx(fr,{children:"%"})]})]})},di=Object.freeze(Object.defineProperty({__proto__:null,Alpha:ri,Area:ni,Hue:Zs,Input:ii,Root:zs,useColorPickerContext:De},Symbol.toStringTag,{value:"Module"})),Fa=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Nt.Root,{ref:r,className:_.cx(n,"fp-CollapsibleRoot"),...a})}),La=y.forwardRef((t,r)=>{const{className:n,children:a,...o}=t;return c.jsxs(Nt.Trigger,{ref:r,className:_.cx(n,"fp-CollapsibleTrigger"),...o,children:[c.jsx(kt,{viewBox:"4 4 16 16",size:"4",className:"fp-CollapsibleIndicator"}),a]})}),Va=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(Nt.Content,{ref:r,className:_.cx(n,"fp-CollapsibleContent"),...a})});Fa.displayName="Collapsible.Root";La.displayName="Collapsible.Trigger";Va.displayName="Collapsible.Content";const pi=Object.freeze(Object.defineProperty({__proto__:null,Content:Va,Root:Fa,Trigger:La},Symbol.toStringTag,{value:"Module"})),mi=_.cva("fp-Button",{variants:{variant:{primary:"fp-variant-primary",secondary:"fp-variant-secondary",inverse:"fp-variant-inverse",destructive:"fp-variant-destructive",success:"fp-variant-success",text:"fp-variant-text"},size:{small:"fp-size-small",medium:"fp-size-medium"},fullWidth:{true:"fp-full-width"}},defaultVariants:{variant:"secondary",size:"small"}}),za=y.forwardRef((t,r)=>{const{className:n,variant:a,size:o,fullWidth:l,...p}=t;return c.jsx("button",{ref:r,className:mi({className:n,variant:a,size:o,fullWidth:l}),...p})});za.displayName="Button";const Ua=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(So,{className:_.cx(n,"fp-textarea"),ref:r,...a})});Ua.displayName="Textarea";const Ba=y.forwardRef((t,r)=>{const{className:n,...a}=t;return c.jsx(gn.Root,{ref:r,className:_.cx(n,"fp-switchRoot"),...a,children:c.jsx(gn.Thumb,{ref:r,className:_.cx(n,"fp-switchThumb")})})});Ba.displayName="Switch";exports.AlertDialog=Cs;exports.Button=za;exports.Checkbox=Yo;exports.Collapsible=pi;exports.ColorPicker=di;exports.ContextMenu=os;exports.Dialog=ys;exports.DropdownMenu=es;exports.Flex=Bt;exports.IconButton=Zr;exports.Input=zt;exports.Label=Xr;exports.Link=On;exports.Paragraph=kn;exports.Popover=ms;exports.RadioGroup=Lo;exports.SegmentedControl=Do;exports.Select=Ko;exports.Slider=et;exports.Switch=Ba;exports.Tabs=$o;exports.Text=We;exports.Textarea=Ua;exports.Tooltip=Dt;exports.TooltipProvider=ss;exports.ValueField=Ms;exports.createIcon=Ge;
|