@mp-front/components 0.0.1-next-3 → 0.0.1-next-5

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.
Files changed (46) hide show
  1. package/dist/classNames-CN12fVA7.cjs +1 -0
  2. package/dist/{index-CcUNk-y0.js → classNames-EUcv3dqx.js} +174 -188
  3. package/dist/components/index.d.ts +2 -0
  4. package/dist/components/index.d.ts.map +1 -1
  5. package/dist/components/steps/steps.component.d.ts +1 -1
  6. package/dist/components/steps/steps.component.d.ts.map +1 -1
  7. package/dist/components/steps/steps.stories.d.ts +4 -0
  8. package/dist/components/steps/steps.stories.d.ts.map +1 -1
  9. package/dist/components/steps/steps.types.d.ts +2 -0
  10. package/dist/components/steps/steps.types.d.ts.map +1 -1
  11. package/dist/components/toggle/constants/variants.d.ts +18 -0
  12. package/dist/components/toggle/constants/variants.d.ts.map +1 -0
  13. package/dist/components/toggle/index.d.ts +3 -0
  14. package/dist/components/toggle/index.d.ts.map +1 -0
  15. package/dist/components/toggle/toggle.component.d.ts +27 -0
  16. package/dist/components/toggle/toggle.component.d.ts.map +1 -0
  17. package/dist/components/toggle/toggle.stories.d.ts +15 -0
  18. package/dist/components/toggle/toggle.stories.d.ts.map +1 -0
  19. package/dist/components/toggle/toggle.test.d.ts +2 -0
  20. package/dist/components/toggle/toggle.test.d.ts.map +1 -0
  21. package/dist/components/toggle-group/index.d.ts +2 -0
  22. package/dist/components/toggle-group/index.d.ts.map +1 -0
  23. package/dist/components/toggle-group/toggle-group-context.d.ts +22 -0
  24. package/dist/components/toggle-group/toggle-group-context.d.ts.map +1 -0
  25. package/dist/components/toggle-group/toggle-group-item.component.d.ts +28 -0
  26. package/dist/components/toggle-group/toggle-group-item.component.d.ts.map +1 -0
  27. package/dist/components/toggle-group/toggle-group.component.d.ts +37 -0
  28. package/dist/components/toggle-group/toggle-group.component.d.ts.map +1 -0
  29. package/dist/components/toggle-group/toggle-group.stories.d.ts +16 -0
  30. package/dist/components/toggle-group/toggle-group.stories.d.ts.map +1 -0
  31. package/dist/components/toggle-group/toggle-group.test.d.ts +2 -0
  32. package/dist/components/toggle-group/toggle-group.test.d.ts.map +1 -0
  33. package/dist/index-B2-I-g4_.js +18 -0
  34. package/dist/index-CFlnP8Em.cjs +1 -0
  35. package/dist/layout/content.component.d.ts.map +1 -1
  36. package/dist/styles.css +1 -1
  37. package/dist/ui-components-hooks.js +1 -1
  38. package/dist/ui-components-index.cjs +30 -30
  39. package/dist/ui-components-index.js +7022 -6698
  40. package/dist/ui-components-layout.cjs +32 -32
  41. package/dist/ui-components-layout.js +6058 -5901
  42. package/dist/ui-components-utils.cjs +1 -1
  43. package/dist/ui-components-utils.js +7 -6
  44. package/dist/{useTranslation-Cenukg7h.js → useTranslation-DlVfOUdM.js} +3 -3
  45. package/package.json +2 -1
  46. package/dist/index-B2DyV2Jl.cjs +0 -1
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-BP9HuXkV.cjs"),O=require("./index-B2DyV2Jl.cjs"),S=require("react"),ne=require("./skeleton-avatar-Ce_osCsT.cjs"),Nf=require("react-dom"),kf=require("./use-controlled-state-H7oMYjxi.cjs");function Lf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=Lf(S),qs=Lf(Nf);function Ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Vf={sm:"size-8",md:"size-12",lg:"size-16",xl:"size-20"},Xx=({size:e="sm",text:t,className:n,color:r="border-t-blue-500"})=>h.jsxRuntimeExports.jsx("div",{className:"grid gap-4 place-content-center",children:h.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxRuntimeExports.jsx("output",{className:O.classNames(Vf[e],"animate-spin rounded-full border-4",r,n),"aria-busy":"true"}),!!t&&h.jsxRuntimeExports.jsx("span",{className:"flex justify-center",children:t})]})});var Bf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Yx="VisuallyHidden",$f=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(h.Primitive.span,{...e,ref:t,style:{...Bf,...e.style}}));$f.displayName=Yx;var Zx=$f;function Qx(e,t){const n=v.createContext(t),r=s=>{const{children:c,...l}=s,u=v.useMemo(()=>l,Object.values(l));return h.jsxRuntimeExports.jsx(n.Provider,{value:u,children:c})};r.displayName=e+"Provider";function o(s){const c=v.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function he(e,t=[]){let n=[];function r(s,c){const l=v.createContext(c),u=n.length;n=[...n,c];const i=f=>{var y;const{scope:d,children:p,...g}=f,m=((y=d==null?void 0:d[e])==null?void 0:y[u])||l,x=v.useMemo(()=>g,Object.values(g));return h.jsxRuntimeExports.jsx(m.Provider,{value:x,children:p})};i.displayName=s+"Provider";function a(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[u])||l,g=v.useContext(p);if(g)return g;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[i,a]}const o=()=>{const s=n.map(c=>v.createContext(c));return function(l){const u=(l==null?void 0:l[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,Jx(o,...t)]}function Jx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=r.reduce((l,{useScope:u,scopeName:i})=>{const f=u(s)[`__scope${i}`];return{...l,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Bn(e){const t=e+"CollectionProvider",[n,r]=he(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:x,children:y}=m,E=S.useRef(null),b=S.useRef(new Map).current;return h.jsxRuntimeExports.jsx(o,{scope:x,itemMap:b,collectionRef:E,children:y})};c.displayName=t;const l=e+"CollectionSlot",u=h.createSlot(l),i=S.forwardRef((m,x)=>{const{scope:y,children:E}=m,b=s(l,y),R=h.useComposedRefs(x,b.collectionRef);return h.jsxRuntimeExports.jsx(u,{ref:R,children:E})});i.displayName=l;const a=e+"CollectionItemSlot",f="data-radix-collection-item",d=h.createSlot(a),p=S.forwardRef((m,x)=>{const{scope:y,children:E,...b}=m,R=S.useRef(null),w=h.useComposedRefs(x,R),P=s(a,y);return S.useEffect(()=>(P.itemMap.set(R,{ref:R,...b}),()=>void P.itemMap.delete(R))),h.jsxRuntimeExports.jsx(d,{[f]:"",ref:w,children:E})});p.displayName=a;function g(m){const x=s(e+"CollectionConsumer",m);return S.useCallback(()=>{const E=x.collectionRef.current;if(!E)return[];const b=Array.from(E.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((P,C)=>b.indexOf(P.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:c,Slot:i,ItemSlot:p},g,r]}function N(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var ev=v[" useInsertionEffect ".trim().toString()]||h.useLayoutEffect2;function we({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,c]=tv({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:o;{const a=v.useRef(e!==void 0);v.useEffect(()=>{const f=a.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=l},[l,r])}const i=v.useCallback(a=>{var f;if(l){const d=nv(a)?a(e):a;d!==e&&((f=c.current)==null||f.call(c,d))}else s(a)},[l,e,s,c]);return[u,i]}function tv({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),s=v.useRef(t);return ev(()=>{s.current=t},[t]),v.useEffect(()=>{var c;o.current!==n&&((c=s.current)==null||c.call(s,n),o.current=n)},[n,o]),[n,r,s]}function nv(e){return typeof e=="function"}function rv(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Re=e=>{const{present:t,children:n}=e,r=ov(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=h.useComposedRefs(r.ref,iv(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:s}):null};Re.displayName="Presence";function ov(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),s=v.useRef("none"),c=e?"mounted":"unmounted",[l,u]=rv(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const i=ur(r.current);s.current=l==="mounted"?i:"none"},[l]),h.useLayoutEffect2(()=>{const i=r.current,a=o.current;if(a!==e){const d=s.current,p=ur(i);e?u("MOUNT"):p==="none"||(i==null?void 0:i.display)==="none"?u("UNMOUNT"):u(a&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),h.useLayoutEffect2(()=>{if(t){let i;const a=t.ownerDocument.defaultView??window,f=p=>{const m=ur(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",i=a.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},d=p=>{p.target===t&&(s.current=ur(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{a.clearTimeout(i),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(i=>{r.current=i?getComputedStyle(i):null,n(i)},[])}}function ur(e){return(e==null?void 0:e.animationName)||"none"}function iv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sv=v[" useId ".trim().toString()]||(()=>{}),av=0;function ge(e){const[t,n]=v.useState(sv());return h.useLayoutEffect2(()=>{n(r=>r??String(av++))},[e]),t?`radix-${t}`:""}var Do="Collapsible",[cv,Uf]=he(Do),[uv,Ks]=cv(Do),Gf=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:c,...l}=e,[u,i]=we({prop:r,defaultProp:o??!1,onChange:c,caller:Do});return h.jsxRuntimeExports.jsx(uv,{scope:n,disabled:s,contentId:ge(),open:u,onOpenToggle:v.useCallback(()=>i(a=>!a),[i]),children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":Ys(u),"data-disabled":s?"":void 0,...l,ref:t})})});Gf.displayName=Do;var Hf="CollapsibleTrigger",zf=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Ks(Hf,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ys(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:N(e.onClick,o.onOpenToggle)})});zf.displayName=Hf;var Xs="CollapsibleContent",Wf=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ks(Xs,e.__scopeCollapsible);return h.jsxRuntimeExports.jsx(Re,{present:n||o.open,children:({present:s})=>h.jsxRuntimeExports.jsx(lv,{...r,ref:t,present:s})})});Wf.displayName=Xs;var lv=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,c=Ks(Xs,n),[l,u]=v.useState(r),i=v.useRef(null),a=h.useComposedRefs(t,i),f=v.useRef(0),d=f.current,p=v.useRef(0),g=p.current,m=c.open||l,x=v.useRef(m),y=v.useRef(void 0);return v.useEffect(()=>{const E=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(E)},[]),h.useLayoutEffect2(()=>{const E=i.current;if(E){y.current=y.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const b=E.getBoundingClientRect();f.current=b.height,p.current=b.width,x.current||(E.style.transitionDuration=y.current.transitionDuration,E.style.animationName=y.current.animationName),u(r)}},[c.open,r]),h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":Ys(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!m,...s,ref:a,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&o})});function Ys(e){return e?"open":"closed"}var fv=Gf,dv=zf,hv=Wf,pv=v.createContext(void 0);function Tt(e){const t=v.useContext(pv);return e||t||"ltr"}var Ue="Accordion",mv=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Zs,gv,xv]=Bn(Ue),[No]=he(Ue,[xv,Uf]),Qs=Uf(),qf=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return h.jsxRuntimeExports.jsx(Zs.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?h.jsxRuntimeExports.jsx(bv,{...s,ref:t}):h.jsxRuntimeExports.jsx(Ev,{...o,ref:t})})});qf.displayName=Ue;var[Kf,vv]=No(Ue),[Xf,yv]=No(Ue,{collapsible:!1}),Ev=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...c}=e,[l,u]=we({prop:n,defaultProp:r??"",onChange:o,caller:Ue});return h.jsxRuntimeExports.jsx(Kf,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:S.useCallback(()=>s&&u(""),[s,u]),children:h.jsxRuntimeExports.jsx(Xf,{scope:e.__scopeAccordion,collapsible:s,children:h.jsxRuntimeExports.jsx(Yf,{...c,ref:t})})})}),bv=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[c,l]=we({prop:n,defaultProp:r??[],onChange:o,caller:Ue}),u=S.useCallback(a=>l((f=[])=>[...f,a]),[l]),i=S.useCallback(a=>l((f=[])=>f.filter(d=>d!==a)),[l]);return h.jsxRuntimeExports.jsx(Kf,{scope:e.__scopeAccordion,value:c,onItemOpen:u,onItemClose:i,children:h.jsxRuntimeExports.jsx(Xf,{scope:e.__scopeAccordion,collapsible:!0,children:h.jsxRuntimeExports.jsx(Yf,{...s,ref:t})})})}),[wv,ko]=No(Ue),Yf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...c}=e,l=S.useRef(null),u=h.useComposedRefs(l,t),i=gv(n),f=Tt(o)==="ltr",d=N(e.onKeyDown,p=>{var _;if(!mv.includes(p.key))return;const g=p.target,m=i().filter(M=>{var j;return!((j=M.ref.current)!=null&&j.disabled)}),x=m.findIndex(M=>M.ref.current===g),y=m.length;if(x===-1)return;p.preventDefault();let E=x;const b=0,R=y-1,w=()=>{E=x+1,E>R&&(E=b)},P=()=>{E=x-1,E<b&&(E=R)};switch(p.key){case"Home":E=b;break;case"End":E=R;break;case"ArrowRight":s==="horizontal"&&(f?w():P());break;case"ArrowDown":s==="vertical"&&w();break;case"ArrowLeft":s==="horizontal"&&(f?P():w());break;case"ArrowUp":s==="vertical"&&P();break}const C=E%y;(_=m[C].ref.current)==null||_.focus()});return h.jsxRuntimeExports.jsx(wv,{scope:n,disabled:r,direction:o,orientation:s,children:h.jsxRuntimeExports.jsx(Zs.Slot,{scope:n,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...c,"data-orientation":s,ref:u,onKeyDown:r?void 0:d})})})}),mo="AccordionItem",[Rv,Js]=No(mo),Zf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=ko(mo,n),c=vv(mo,n),l=Qs(n),u=ge(),i=r&&c.value.includes(r)||!1,a=s.disabled||e.disabled;return h.jsxRuntimeExports.jsx(Rv,{scope:n,open:i,disabled:a,triggerId:u,children:h.jsxRuntimeExports.jsx(fv,{"data-orientation":s.orientation,"data-state":rd(i),...l,...o,ref:t,disabled:a,open:i,onOpenChange:f=>{f?c.onItemOpen(r):c.onItemClose(r)}})})});Zf.displayName=mo;var Qf="AccordionHeader",Jf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ko(Ue,n),s=Js(Qf,n);return h.jsxRuntimeExports.jsx(h.Primitive.h3,{"data-orientation":o.orientation,"data-state":rd(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Jf.displayName=Qf;var ns="AccordionTrigger",ed=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ko(Ue,n),s=Js(ns,n),c=yv(ns,n),l=Qs(n);return h.jsxRuntimeExports.jsx(Zs.ItemSlot,{scope:n,children:h.jsxRuntimeExports.jsx(dv,{"aria-disabled":s.open&&!c.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...l,...r,ref:t})})});ed.displayName=ns;var td="AccordionContent",nd=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ko(Ue,n),s=Js(td,n),c=Qs(n);return h.jsxRuntimeExports.jsx(hv,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...c,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});nd.displayName=td;function rd(e){return e?"open":"closed"}var Sv=qf,Cv=Zf,_v=Jf,jv=ed,Pv=nd;function Ve(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Tv(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Av="DismissableLayer",rs="dismissableLayer.update",Ov="dismissableLayer.pointerDownOutside",Mv="dismissableLayer.focusOutside",Ec,od=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,i=v.useContext(od),[a,f]=v.useState(null),d=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),g=h.useComposedRefs(t,C=>f(C)),m=Array.from(i.layers),[x]=[...i.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),E=a?m.indexOf(a):-1,b=i.layersWithOutsidePointerEventsDisabled.size>0,R=E>=y,w=Nv(C=>{const _=C.target,M=[...i.branches].some(j=>j.contains(_));!R||M||(o==null||o(C),c==null||c(C),C.defaultPrevented||l==null||l())},d),P=kv(C=>{const _=C.target;[...i.branches].some(j=>j.contains(_))||(s==null||s(C),c==null||c(C),C.defaultPrevented||l==null||l())},d);return Tv(C=>{E===i.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},d),v.useEffect(()=>{if(a)return n&&(i.layersWithOutsidePointerEventsDisabled.size===0&&(Ec=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),i.layersWithOutsidePointerEventsDisabled.add(a)),i.layers.add(a),bc(),()=>{n&&i.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Ec)}},[a,d,n,i]),v.useEffect(()=>()=>{a&&(i.layers.delete(a),i.layersWithOutsidePointerEventsDisabled.delete(a),bc())},[a,i]),v.useEffect(()=>{const C=()=>p({});return document.addEventListener(rs,C),()=>document.removeEventListener(rs,C)},[]),h.jsxRuntimeExports.jsx(h.Primitive.div,{...u,ref:g,style:{pointerEvents:b?R?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,P.onFocusCapture),onBlurCapture:N(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,w.onPointerDownCapture)})});Qt.displayName=Av;var Iv="DismissableLayerBranch",Dv=v.forwardRef((e,t)=>{const n=v.useContext(od),r=v.useRef(null),o=h.useComposedRefs(t,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsxRuntimeExports.jsx(h.Primitive.div,{...e,ref:o})});Dv.displayName=Iv;function Nv(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let u=function(){id(Ov,n,i,{discrete:!0})};const i={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function kv(e,t=globalThis==null?void 0:globalThis.document){const n=Ve(e),r=v.useRef(!1);return v.useEffect(()=>{const o=s=>{s.target&&!r.current&&id(Mv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bc(){const e=new CustomEvent(rs);document.dispatchEvent(e)}function id(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?h.dispatchDiscreteCustomEvent(o,s):o.dispatchEvent(s)}var gi="focusScope.autoFocusOnMount",xi="focusScope.autoFocusOnUnmount",wc={bubbles:!1,cancelable:!0},Lv="FocusScope",$n=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=v.useState(null),i=Ve(o),a=Ve(s),f=v.useRef(null),d=h.useComposedRefs(t,m=>u(m)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let m=function(b){if(p.paused||!l)return;const R=b.target;l.contains(R)?f.current=R:ot(f.current,{select:!0})},x=function(b){if(p.paused||!l)return;const R=b.relatedTarget;R!==null&&(l.contains(R)||ot(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const w of b)w.removedNodes.length>0&&ot(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const E=new MutationObserver(y);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),E.disconnect()}}},[r,l,p.paused]),v.useEffect(()=>{if(l){Sc.add(p);const m=document.activeElement;if(!l.contains(m)){const y=new CustomEvent(gi,wc);l.addEventListener(gi,i),l.dispatchEvent(y),y.defaultPrevented||(Fv(Gv(sd(l)),{select:!0}),document.activeElement===m&&ot(l))}return()=>{l.removeEventListener(gi,i),setTimeout(()=>{const y=new CustomEvent(xi,wc);l.addEventListener(xi,a),l.dispatchEvent(y),y.defaultPrevented||ot(m??document.body,{select:!0}),l.removeEventListener(xi,a),Sc.remove(p)},0)}}},[l,i,a,p]);const g=v.useCallback(m=>{if(!n&&!r||p.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const E=m.currentTarget,[b,R]=Vv(E);b&&R?!m.shiftKey&&y===R?(m.preventDefault(),n&&ot(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&ot(R,{select:!0})):y===E&&m.preventDefault()}},[n,r,p.paused]);return h.jsxRuntimeExports.jsx(h.Primitive.div,{tabIndex:-1,...c,ref:d,onKeyDown:g})});$n.displayName=Lv;function Fv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ot(r,{select:t}),document.activeElement!==n)return}function Vv(e){const t=sd(e),n=Rc(t,e),r=Rc(t.reverse(),e);return[n,r]}function sd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rc(e,t){for(const n of e)if(!Bv(n,{upTo:t}))return n}function Bv(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 $v(e){return e instanceof HTMLInputElement&&"select"in e}function ot(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$v(e)&&t&&e.select()}}var Sc=Uv();function Uv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Cc(e,t),e.unshift(t)},remove(t){var n;e=Cc(e,t),(n=e[0])==null||n.resume()}}}function Cc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Gv(e){return e.filter(t=>t.tagName!=="A")}var vi=0;function Lo(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_c()),document.body.insertAdjacentElement("beforeend",e[1]??_c()),vi++,()=>{vi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vi--}},[])}function _c(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},He.apply(this,arguments)};function ad(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Hv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var so="right-scroll-bar-position",ao="width-before-scroll-bar",zv="with-scroll-bars-hidden",Wv="--removed-body-scroll-bar-size";function yi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qv(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Kv=typeof window<"u"?v.useLayoutEffect:v.useEffect,jc=new WeakMap;function Xv(e,t){var n=qv(null,function(r){return e.forEach(function(o){return yi(o,r)})});return Kv(function(){var r=jc.get(n);if(r){var o=new Set(r),s=new Set(e),c=n.current;o.forEach(function(l){s.has(l)||yi(l,null)}),s.forEach(function(l){o.has(l)||yi(l,c)})}jc.set(n,e)},[e]),n}function Yv(e){return e}function Zv(e,t){t===void 0&&(t=Yv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,r);return n.push(c),function(){n=n.filter(function(l){return l!==c})}},assignSyncMedium:function(s){for(r=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var c=[];if(n.length){var l=n;n=[],l.forEach(s),c=n}var u=function(){var a=c;c=[],a.forEach(s)},i=function(){return Promise.resolve().then(u)};i(),n={push:function(a){c.push(a),i()},filter:function(a){return c=c.filter(a),n}}}};return o}function Qv(e){e===void 0&&(e={});var t=Zv(null);return t.options=He({async:!0,ssr:!1},e),t}var cd=function(e){var t=e.sideCar,n=ad(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,He({},n))};cd.isSideCarExport=!0;function Jv(e,t){return e.useMedium(t),cd}var ud=Qv(),Ei=function(){},Fo=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ei,onWheelCapture:Ei,onTouchMoveCapture:Ei}),o=r[0],s=r[1],c=e.forwardProps,l=e.children,u=e.className,i=e.removeScrollBar,a=e.enabled,f=e.shards,d=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,x=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,R=ad(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,P=Xv([n,t]),C=He(He({},R),o);return v.createElement(v.Fragment,null,a&&v.createElement(w,{sideCar:ud,removeScrollBar:i,shards:f,noRelative:p,noIsolation:g,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:b}),c?v.cloneElement(v.Children.only(l),He(He({},C),{ref:P})):v.createElement(E,He({},C,{className:u,ref:P}),l))});Fo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fo.classNames={fullWidth:ao,zeroRight:so};var e0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t0(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e0();return t&&e.setAttribute("nonce",t),e}function n0(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r0(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var o0=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t0())&&(n0(t,n),r0(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},i0=function(){var e=o0();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ld=function(){var e=i0(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},s0={left:0,top:0,right:0,gap:0},bi=function(e){return parseInt(e||"",10)||0},a0=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[bi(n),bi(r),bi(o)]},c0=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s0;var t=a0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u0=ld(),zt="data-scroll-locked",l0=function(e,t,n,r){var o=e.left,s=e.top,c=e.right,l=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(zv,` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-BP9HuXkV.cjs"),M=require("./classNames-CN12fVA7.cjs"),S=require("react"),ne=require("./skeleton-avatar-Ce_osCsT.cjs"),Ud=require("react-dom"),Oe=require("./index-CFlnP8Em.cjs"),Gd=require("./use-controlled-state-H7oMYjxi.cjs");function zd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=zd(S),Js=zd(Ud);function Hd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Wd={sm:"size-8",md:"size-12",lg:"size-16",xl:"size-20"},dv=({size:e="sm",text:t,className:n,color:r="border-t-blue-500"})=>h.jsxRuntimeExports.jsx("div",{className:"grid gap-4 place-content-center",children:h.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxRuntimeExports.jsx("output",{className:M.classNames(Wd[e],"animate-spin rounded-full border-4",r,n),"aria-busy":"true"}),!!t&&h.jsxRuntimeExports.jsx("span",{className:"flex justify-center",children:t})]})});var qd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),fv="VisuallyHidden",Kd=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(h.Primitive.span,{...e,ref:t,style:{...qd,...e.style}}));Kd.displayName=fv;var hv=Kd;function pv(e,t){const n=v.createContext(t),r=i=>{const{children:c,...l}=i,u=v.useMemo(()=>l,Object.values(l));return h.jsxRuntimeExports.jsx(n.Provider,{value:u,children:c})};r.displayName=e+"Provider";function o(i){const c=v.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function fe(e,t=[]){let n=[];function r(i,c){const l=v.createContext(c),u=n.length;n=[...n,c];const s=d=>{var y;const{scope:f,children:p,...m}=d,g=((y=f==null?void 0:f[e])==null?void 0:y[u])||l,x=v.useMemo(()=>m,Object.values(m));return h.jsxRuntimeExports.jsx(g.Provider,{value:x,children:p})};s.displayName=i+"Provider";function a(d,f){var g;const p=((g=f==null?void 0:f[e])==null?void 0:g[u])||l,m=v.useContext(p);if(m)return m;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[s,a]}const o=()=>{const i=n.map(c=>v.createContext(c));return function(l){const u=(l==null?void 0:l[e])||i;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,mv(o,...t)]}function mv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((l,{useScope:u,scopeName:s})=>{const d=u(i)[`__scope${s}`];return{...l,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function $n(e){const t=e+"CollectionProvider",[n,r]=fe(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=g=>{const{scope:x,children:y}=g,E=S.useRef(null),b=S.useRef(new Map).current;return h.jsxRuntimeExports.jsx(o,{scope:x,itemMap:b,collectionRef:E,children:y})};c.displayName=t;const l=e+"CollectionSlot",u=h.createSlot(l),s=S.forwardRef((g,x)=>{const{scope:y,children:E}=g,b=i(l,y),w=h.useComposedRefs(x,b.collectionRef);return h.jsxRuntimeExports.jsx(u,{ref:w,children:E})});s.displayName=l;const a=e+"CollectionItemSlot",d="data-radix-collection-item",f=h.createSlot(a),p=S.forwardRef((g,x)=>{const{scope:y,children:E,...b}=g,w=S.useRef(null),R=h.useComposedRefs(x,w),_=i(a,y);return S.useEffect(()=>(_.itemMap.set(w,{ref:w,...b}),()=>void _.itemMap.delete(w))),h.jsxRuntimeExports.jsx(f,{[d]:"",ref:R,children:E})});p.displayName=a;function m(g){const x=i(e+"CollectionConsumer",g);return S.useCallback(()=>{const E=x.collectionRef.current;if(!E)return[];const b=Array.from(E.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,j)=>b.indexOf(_.ref.current)-b.indexOf(j.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:c,Slot:s,ItemSlot:p},m,r]}function N(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var gv=v[" useInsertionEffect ".trim().toString()]||h.useLayoutEffect2;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=xv({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:o;{const a=v.useRef(e!==void 0);v.useEffect(()=>{const d=a.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=l},[l,r])}const s=v.useCallback(a=>{var d;if(l){const f=vv(a)?a(e):a;f!==e&&((d=c.current)==null||d.call(c,f))}else i(a)},[l,e,i,c]);return[u,s]}function xv({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),i=v.useRef(t);return gv(()=>{i.current=t},[t]),v.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function vv(e){return typeof e=="function"}function yv(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Re=e=>{const{present:t,children:n}=e,r=Ev(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=h.useComposedRefs(r.ref,bv(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:i}):null};Re.displayName="Presence";function Ev(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),i=v.useRef("none"),c=e?"mounted":"unmounted",[l,u]=yv(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const s=lr(r.current);i.current=l==="mounted"?s:"none"},[l]),h.useLayoutEffect2(()=>{const s=r.current,a=o.current;if(a!==e){const f=i.current,p=lr(s);e?u("MOUNT"):p==="none"||(s==null?void 0:s.display)==="none"?u("UNMOUNT"):u(a&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),h.useLayoutEffect2(()=>{if(t){let s;const a=t.ownerDocument.defaultView??window,d=p=>{const g=lr(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",s=a.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(i.current=lr(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{a.clearTimeout(s),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(s=>{r.current=s?getComputedStyle(s):null,n(s)},[])}}function lr(e){return(e==null?void 0:e.animationName)||"none"}function bv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wv=v[" useId ".trim().toString()]||(()=>{}),Rv=0;function xe(e){const[t,n]=v.useState(wv());return h.useLayoutEffect2(()=>{n(r=>r??String(Rv++))},[e]),t?`radix-${t}`:""}var ko="Collapsible",[Sv,Xd]=fe(ko),[Cv,ea]=Sv(ko),Yd=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:c,...l}=e,[u,s]=me({prop:r,defaultProp:o??!1,onChange:c,caller:ko});return h.jsxRuntimeExports.jsx(Cv,{scope:n,disabled:i,contentId:xe(),open:u,onOpenToggle:v.useCallback(()=>s(a=>!a),[s]),children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":na(u),"data-disabled":i?"":void 0,...l,ref:t})})});Yd.displayName=ko;var Zd="CollapsibleTrigger",Qd=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ea(Zd,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":na(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:N(e.onClick,o.onOpenToggle)})});Qd.displayName=Zd;var ta="CollapsibleContent",Jd=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ea(ta,e.__scopeCollapsible);return h.jsxRuntimeExports.jsx(Re,{present:n||o.open,children:({present:i})=>h.jsxRuntimeExports.jsx(_v,{...r,ref:t,present:i})})});Jd.displayName=ta;var _v=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,c=ea(ta,n),[l,u]=v.useState(r),s=v.useRef(null),a=h.useComposedRefs(t,s),d=v.useRef(0),f=d.current,p=v.useRef(0),m=p.current,g=c.open||l,x=v.useRef(g),y=v.useRef(void 0);return v.useEffect(()=>{const E=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(E)},[]),h.useLayoutEffect2(()=>{const E=s.current;if(E){y.current=y.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const b=E.getBoundingClientRect();d.current=b.height,p.current=b.width,x.current||(E.style.transitionDuration=y.current.transitionDuration,E.style.animationName=y.current.animationName),u(r)}},[c.open,r]),h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":na(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!g,...i,ref:a,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&o})});function na(e){return e?"open":"closed"}var jv=Yd,Pv=Qd,Tv=Jd,Av=v.createContext(void 0);function ht(e){const t=v.useContext(Av);return e||t||"ltr"}var Ge="Accordion",Ov=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ra,Mv,Iv]=$n(Ge),[Lo]=fe(Ge,[Iv,Xd]),oa=Xd(),ef=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return h.jsxRuntimeExports.jsx(ra.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?h.jsxRuntimeExports.jsx(Lv,{...i,ref:t}):h.jsxRuntimeExports.jsx(kv,{...o,ref:t})})});ef.displayName=Ge;var[tf,Dv]=Lo(Ge),[nf,Nv]=Lo(Ge,{collapsible:!1}),kv=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...c}=e,[l,u]=me({prop:n,defaultProp:r??"",onChange:o,caller:Ge});return h.jsxRuntimeExports.jsx(tf,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:S.useCallback(()=>i&&u(""),[i,u]),children:h.jsxRuntimeExports.jsx(nf,{scope:e.__scopeAccordion,collapsible:i,children:h.jsxRuntimeExports.jsx(rf,{...c,ref:t})})})}),Lv=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[c,l]=me({prop:n,defaultProp:r??[],onChange:o,caller:Ge}),u=S.useCallback(a=>l((d=[])=>[...d,a]),[l]),s=S.useCallback(a=>l((d=[])=>d.filter(f=>f!==a)),[l]);return h.jsxRuntimeExports.jsx(tf,{scope:e.__scopeAccordion,value:c,onItemOpen:u,onItemClose:s,children:h.jsxRuntimeExports.jsx(nf,{scope:e.__scopeAccordion,collapsible:!0,children:h.jsxRuntimeExports.jsx(rf,{...i,ref:t})})})}),[Fv,Fo]=Lo(Ge),rf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...c}=e,l=S.useRef(null),u=h.useComposedRefs(l,t),s=Mv(n),d=ht(o)==="ltr",f=N(e.onKeyDown,p=>{var P;if(!Ov.includes(p.key))return;const m=p.target,g=s().filter(T=>{var C;return!((C=T.ref.current)!=null&&C.disabled)}),x=g.findIndex(T=>T.ref.current===m),y=g.length;if(x===-1)return;p.preventDefault();let E=x;const b=0,w=y-1,R=()=>{E=x+1,E>w&&(E=b)},_=()=>{E=x-1,E<b&&(E=w)};switch(p.key){case"Home":E=b;break;case"End":E=w;break;case"ArrowRight":i==="horizontal"&&(d?R():_());break;case"ArrowDown":i==="vertical"&&R();break;case"ArrowLeft":i==="horizontal"&&(d?_():R());break;case"ArrowUp":i==="vertical"&&_();break}const j=E%y;(P=g[j].ref.current)==null||P.focus()});return h.jsxRuntimeExports.jsx(Fv,{scope:n,disabled:r,direction:o,orientation:i,children:h.jsxRuntimeExports.jsx(ra.Slot,{scope:n,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...c,"data-orientation":i,ref:u,onKeyDown:r?void 0:f})})})}),go="AccordionItem",[Vv,ia]=Lo(go),of=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=Fo(go,n),c=Dv(go,n),l=oa(n),u=xe(),s=r&&c.value.includes(r)||!1,a=i.disabled||e.disabled;return h.jsxRuntimeExports.jsx(Vv,{scope:n,open:s,disabled:a,triggerId:u,children:h.jsxRuntimeExports.jsx(jv,{"data-orientation":i.orientation,"data-state":df(s),...l,...o,ref:t,disabled:a,open:s,onOpenChange:d=>{d?c.onItemOpen(r):c.onItemClose(r)}})})});of.displayName=go;var sf="AccordionHeader",af=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Fo(Ge,n),i=ia(sf,n);return h.jsxRuntimeExports.jsx(h.Primitive.h3,{"data-orientation":o.orientation,"data-state":df(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});af.displayName=sf;var as="AccordionTrigger",cf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Fo(Ge,n),i=ia(as,n),c=Nv(as,n),l=oa(n);return h.jsxRuntimeExports.jsx(ra.ItemSlot,{scope:n,children:h.jsxRuntimeExports.jsx(Pv,{"aria-disabled":i.open&&!c.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...l,...r,ref:t})})});cf.displayName=as;var uf="AccordionContent",lf=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Fo(Ge,n),i=ia(uf,n),c=oa(n);return h.jsxRuntimeExports.jsx(Tv,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...c,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});lf.displayName=uf;function df(e){return e?"open":"closed"}var Bv=ef,$v=of,Uv=af,Gv=cf,zv=lf;function Be(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Hv(e,t=globalThis==null?void 0:globalThis.document){const n=Be(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Wv="DismissableLayer",cs="dismissableLayer.update",qv="dismissableLayer.pointerDownOutside",Kv="dismissableLayer.focusOutside",_c,ff=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tn=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:l,...u}=e,s=v.useContext(ff),[a,d]=v.useState(null),f=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=h.useComposedRefs(t,j=>d(j)),g=Array.from(s.layers),[x]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),E=a?g.indexOf(a):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=E>=y,R=Zv(j=>{const P=j.target,T=[...s.branches].some(C=>C.contains(P));!w||T||(o==null||o(j),c==null||c(j),j.defaultPrevented||l==null||l())},f),_=Qv(j=>{const P=j.target;[...s.branches].some(C=>C.contains(P))||(i==null||i(j),c==null||c(j),j.defaultPrevented||l==null||l())},f);return Hv(j=>{E===s.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},f),v.useEffect(()=>{if(a)return n&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(_c=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(a)),s.layers.add(a),jc(),()=>{n&&s.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=_c)}},[a,f,n,s]),v.useEffect(()=>()=>{a&&(s.layers.delete(a),s.layersWithOutsidePointerEventsDisabled.delete(a),jc())},[a,s]),v.useEffect(()=>{const j=()=>p({});return document.addEventListener(cs,j),()=>document.removeEventListener(cs,j)},[]),h.jsxRuntimeExports.jsx(h.Primitive.div,{...u,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,_.onFocusCapture),onBlurCapture:N(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,R.onPointerDownCapture)})});tn.displayName=Wv;var Xv="DismissableLayerBranch",Yv=v.forwardRef((e,t)=>{const n=v.useContext(ff),r=v.useRef(null),o=h.useComposedRefs(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),h.jsxRuntimeExports.jsx(h.Primitive.div,{...e,ref:o})});Yv.displayName=Xv;function Zv(e,t=globalThis==null?void 0:globalThis.document){const n=Be(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let u=function(){hf(qv,n,s,{discrete:!0})};const s={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Qv(e,t=globalThis==null?void 0:globalThis.document){const n=Be(e),r=v.useRef(!1);return v.useEffect(()=>{const o=i=>{i.target&&!r.current&&hf(Kv,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function jc(){const e=new CustomEvent(cs);document.dispatchEvent(e)}function hf(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?h.dispatchDiscreteCustomEvent(o,i):o.dispatchEvent(i)}var Ei="focusScope.autoFocusOnMount",bi="focusScope.autoFocusOnUnmount",Pc={bubbles:!1,cancelable:!0},Jv="FocusScope",Un=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[l,u]=v.useState(null),s=Be(o),a=Be(i),d=v.useRef(null),f=h.useComposedRefs(t,g=>u(g)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let g=function(b){if(p.paused||!l)return;const w=b.target;l.contains(w)?d.current=w:it(d.current,{select:!0})},x=function(b){if(p.paused||!l)return;const w=b.relatedTarget;w!==null&&(l.contains(w)||it(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&it(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const E=new MutationObserver(y);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),E.disconnect()}}},[r,l,p.paused]),v.useEffect(()=>{if(l){Ac.add(p);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(Ei,Pc);l.addEventListener(Ei,s),l.dispatchEvent(y),y.defaultPrevented||(e0(i0(pf(l)),{select:!0}),document.activeElement===g&&it(l))}return()=>{l.removeEventListener(Ei,s),setTimeout(()=>{const y=new CustomEvent(bi,Pc);l.addEventListener(bi,a),l.dispatchEvent(y),y.defaultPrevented||it(g??document.body,{select:!0}),l.removeEventListener(bi,a),Ac.remove(p)},0)}}},[l,s,a,p]);const m=v.useCallback(g=>{if(!n&&!r||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const E=g.currentTarget,[b,w]=t0(E);b&&w?!g.shiftKey&&y===w?(g.preventDefault(),n&&it(b,{select:!0})):g.shiftKey&&y===b&&(g.preventDefault(),n&&it(w,{select:!0})):y===E&&g.preventDefault()}},[n,r,p.paused]);return h.jsxRuntimeExports.jsx(h.Primitive.div,{tabIndex:-1,...c,ref:f,onKeyDown:m})});Un.displayName=Jv;function e0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(it(r,{select:t}),document.activeElement!==n)return}function t0(e){const t=pf(e),n=Tc(t,e),r=Tc(t.reverse(),e);return[n,r]}function pf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Tc(e,t){for(const n of e)if(!n0(n,{upTo:t}))return n}function n0(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 r0(e){return e instanceof HTMLInputElement&&"select"in e}function it(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&r0(e)&&t&&e.select()}}var Ac=o0();function o0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Oc(e,t),e.unshift(t)},remove(t){var n;e=Oc(e,t),(n=e[0])==null||n.resume()}}}function Oc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function i0(e){return e.filter(t=>t.tagName!=="A")}var wi=0;function Vo(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mc()),document.body.insertAdjacentElement("beforeend",e[1]??Mc()),wi++,()=>{wi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wi--}},[])}function Mc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},He.apply(this,arguments)};function mf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s0(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ao="right-scroll-bar-position",co="width-before-scroll-bar",a0="with-scroll-bars-hidden",c0="--removed-body-scroll-bar-size";function Ri(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function u0(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var l0=typeof window<"u"?v.useLayoutEffect:v.useEffect,Ic=new WeakMap;function d0(e,t){var n=u0(null,function(r){return e.forEach(function(o){return Ri(o,r)})});return l0(function(){var r=Ic.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(l){i.has(l)||Ri(l,null)}),i.forEach(function(l){o.has(l)||Ri(l,c)})}Ic.set(n,e)},[e]),n}function f0(e){return e}function h0(e,t){t===void 0&&(t=f0);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(l){return l!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var l=n;n=[],l.forEach(i),c=n}var u=function(){var a=c;c=[],a.forEach(i)},s=function(){return Promise.resolve().then(u)};s(),n={push:function(a){c.push(a),s()},filter:function(a){return c=c.filter(a),n}}}};return o}function p0(e){e===void 0&&(e={});var t=h0(null);return t.options=He({async:!0,ssr:!1},e),t}var gf=function(e){var t=e.sideCar,n=mf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,He({},n))};gf.isSideCarExport=!0;function m0(e,t){return e.useMedium(t),gf}var xf=p0(),Si=function(){},Bo=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Si,onWheelCapture:Si,onTouchMoveCapture:Si}),o=r[0],i=r[1],c=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,a=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,g=e.inert,x=e.allowPinchZoom,y=e.as,E=y===void 0?"div":y,b=e.gapMode,w=mf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=f,_=d0([n,t]),j=He(He({},w),o);return v.createElement(v.Fragment,null,a&&v.createElement(R,{sideCar:xf,removeScrollBar:s,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:b}),c?v.cloneElement(v.Children.only(l),He(He({},j),{ref:_})):v.createElement(E,He({},j,{className:u,ref:_}),l))});Bo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bo.classNames={fullWidth:co,zeroRight:ao};var g0=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function x0(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=g0();return t&&e.setAttribute("nonce",t),e}function v0(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function y0(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var E0=function(){var e=0,t=null;return{add:function(n){e==0&&(t=x0())&&(v0(t,n),y0(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b0=function(){var e=E0();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vf=function(){var e=b0(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},w0={left:0,top:0,right:0,gap:0},Ci=function(e){return parseInt(e||"",10)||0},R0=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ci(n),Ci(r),Ci(o)]},S0=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return w0;var t=R0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},C0=vf(),Kt="data-scroll-locked",_0=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,l=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(a0,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(l,"px ").concat(r,`;
5
5
  }
6
- body[`).concat(zt,`] {
6
+ body[`).concat(Kt,`] {
7
7
  overflow: hidden `).concat(r,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
10
  padding-left: `.concat(o,`px;
11
- padding-top: `).concat(s,`px;
11
+ padding-top: `).concat(i,`px;
12
12
  padding-right: `).concat(c,`px;
13
13
  margin-left:0;
14
14
  margin-top:0;
@@ -16,33 +16,33 @@
16
16
  `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
17
17
  }
18
18
 
19
- .`).concat(so,` {
19
+ .`).concat(ao,` {
20
20
  right: `).concat(l,"px ").concat(r,`;
21
21
  }
22
22
 
23
- .`).concat(ao,` {
23
+ .`).concat(co,` {
24
24
  margin-right: `).concat(l,"px ").concat(r,`;
25
25
  }
26
26
 
27
- .`).concat(so," .").concat(so,` {
27
+ .`).concat(ao," .").concat(ao,` {
28
28
  right: 0 `).concat(r,`;
29
29
  }
30
30
 
31
- .`).concat(ao," .").concat(ao,` {
31
+ .`).concat(co," .").concat(co,` {
32
32
  margin-right: 0 `).concat(r,`;
33
33
  }
34
34
 
35
- body[`).concat(zt,`] {
36
- `).concat(Wv,": ").concat(l,`px;
35
+ body[`).concat(Kt,`] {
36
+ `).concat(c0,": ").concat(l,`px;
37
37
  }
38
- `)},Pc=function(){var e=parseInt(document.body.getAttribute(zt)||"0",10);return isFinite(e)?e:0},f0=function(){v.useEffect(function(){return document.body.setAttribute(zt,(Pc()+1).toString()),function(){var e=Pc()-1;e<=0?document.body.removeAttribute(zt):document.body.setAttribute(zt,e.toString())}},[])},d0=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;f0();var s=v.useMemo(function(){return c0(o)},[o]);return v.createElement(u0,{styles:l0(s,!t,o,n?"":"!important")})},os=!1;if(typeof window<"u")try{var lr=Object.defineProperty({},"passive",{get:function(){return os=!0,!0}});window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{os=!1}var It=os?{passive:!1}:!1,h0=function(e){return e.tagName==="TEXTAREA"},fd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!h0(e)&&n[t]==="visible")},p0=function(e){return fd(e,"overflowY")},m0=function(e){return fd(e,"overflowX")},Tc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=dd(e,r);if(o){var s=hd(e,r),c=s[1],l=s[2];if(c>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},g0=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},x0=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dd=function(e,t){return e==="v"?p0(t):m0(t)},hd=function(e,t){return e==="v"?g0(t):x0(t)},v0=function(e,t){return e==="h"&&t==="rtl"?-1:1},y0=function(e,t,n,r,o){var s=v0(e,window.getComputedStyle(t).direction),c=s*r,l=n.target,u=t.contains(l),i=!1,a=c>0,f=0,d=0;do{if(!l)break;var p=hd(e,l),g=p[0],m=p[1],x=p[2],y=m-x-s*g;(g||y)&&dd(e,l)&&(f+=y,d+=g);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(a&&Math.abs(f)<1||!a&&Math.abs(d)<1)&&(i=!0),i},fr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ac=function(e){return[e.deltaX,e.deltaY]},Oc=function(e){return e&&"current"in e?e.current:e},E0=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b0=function(e){return`
38
+ `)},Dc=function(){var e=parseInt(document.body.getAttribute(Kt)||"0",10);return isFinite(e)?e:0},j0=function(){v.useEffect(function(){return document.body.setAttribute(Kt,(Dc()+1).toString()),function(){var e=Dc()-1;e<=0?document.body.removeAttribute(Kt):document.body.setAttribute(Kt,e.toString())}},[])},P0=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;j0();var i=v.useMemo(function(){return S0(o)},[o]);return v.createElement(C0,{styles:_0(i,!t,o,n?"":"!important")})},us=!1;if(typeof window<"u")try{var dr=Object.defineProperty({},"passive",{get:function(){return us=!0,!0}});window.addEventListener("test",dr,dr),window.removeEventListener("test",dr,dr)}catch{us=!1}var kt=us?{passive:!1}:!1,T0=function(e){return e.tagName==="TEXTAREA"},yf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!T0(e)&&n[t]==="visible")},A0=function(e){return yf(e,"overflowY")},O0=function(e){return yf(e,"overflowX")},Nc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ef(e,r);if(o){var i=bf(e,r),c=i[1],l=i[2];if(c>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M0=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},I0=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ef=function(e,t){return e==="v"?A0(t):O0(t)},bf=function(e,t){return e==="v"?M0(t):I0(t)},D0=function(e,t){return e==="h"&&t==="rtl"?-1:1},N0=function(e,t,n,r,o){var i=D0(e,window.getComputedStyle(t).direction),c=i*r,l=n.target,u=t.contains(l),s=!1,a=c>0,d=0,f=0;do{if(!l)break;var p=bf(e,l),m=p[0],g=p[1],x=p[2],y=g-x-i*m;(m||y)&&Ef(e,l)&&(d+=y,f+=m);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(a&&Math.abs(d)<1||!a&&Math.abs(f)<1)&&(s=!0),s},fr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kc=function(e){return[e.deltaX,e.deltaY]},Lc=function(e){return e&&"current"in e?e.current:e},k0=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L0=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},w0=0,Dt=[];function R0(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(w0++)[0],s=v.useState(ld)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Hv([e.lockRef.current],(e.shards||[]).map(Oc),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!c.current.allowPinchZoom;var y=fr(m),E=n.current,b="deltaX"in m?m.deltaX:E[0]-y[0],R="deltaY"in m?m.deltaY:E[1]-y[1],w,P=m.target,C=Math.abs(b)>Math.abs(R)?"h":"v";if("touches"in m&&C==="h"&&P.type==="range")return!1;var _=window.getSelection(),M=_&&_.anchorNode,j=M?M===P||M.contains(P):!1;if(j)return!1;var A=Tc(C,P);if(!A)return!0;if(A?w=C:(w=C==="v"?"h":"v",A=Tc(C,P)),!A)return!1;if(!r.current&&"changedTouches"in m&&(b||R)&&(r.current=w),!w)return!0;var I=r.current||w;return y0(I,x,m,I==="h"?b:R)},[]),u=v.useCallback(function(m){var x=m;if(!(!Dt.length||Dt[Dt.length-1]!==s)){var y="deltaY"in x?Ac(x):fr(x),E=t.current.filter(function(w){return w.name===x.type&&(w.target===x.target||x.target===w.shadowParent)&&E0(w.delta,y)})[0];if(E&&E.should){x.cancelable&&x.preventDefault();return}if(!E){var b=(c.current.shards||[]).map(Oc).filter(Boolean).filter(function(w){return w.contains(x.target)}),R=b.length>0?l(x,b[0]):!c.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),i=v.useCallback(function(m,x,y,E){var b={name:m,delta:x,target:y,should:E,shadowParent:S0(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(R){return R!==b})},1)},[]),a=v.useCallback(function(m){n.current=fr(m),r.current=void 0},[]),f=v.useCallback(function(m){i(m.type,Ac(m),m.target,l(m,e.lockRef.current))},[]),d=v.useCallback(function(m){i(m.type,fr(m),m.target,l(m,e.lockRef.current))},[]);v.useEffect(function(){return Dt.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",u,It),document.addEventListener("touchmove",u,It),document.addEventListener("touchstart",a,It),function(){Dt=Dt.filter(function(m){return m!==s}),document.removeEventListener("wheel",u,It),document.removeEventListener("touchmove",u,It),document.removeEventListener("touchstart",a,It)}},[]);var p=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(s,{styles:b0(o)}):null,p?v.createElement(d0,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function S0(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const C0=Jv(ud,R0);var Un=v.forwardRef(function(e,t){return v.createElement(Fo,He({},e,{ref:t,sideCar:C0}))});Un.classNames=Fo.classNames;var _0=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Nt=new WeakMap,dr=new WeakMap,hr={},wi=0,pd=function(e){return e&&(e.host||pd(e.parentNode))},j0=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},P0=function(e,t,n,r){var o=j0(t,Array.isArray(e)?e:[e]);hr[n]||(hr[n]=new WeakMap);var s=hr[n],c=[],l=new Set,u=new Set(o),i=function(f){!f||l.has(f)||(l.add(f),i(f.parentNode))};o.forEach(i);var a=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(d){if(l.has(d))a(d);else try{var p=d.getAttribute(r),g=p!==null&&p!=="false",m=(Nt.get(d)||0)+1,x=(s.get(d)||0)+1;Nt.set(d,m),s.set(d,x),c.push(d),m===1&&g&&dr.set(d,!0),x===1&&d.setAttribute(n,"true"),g||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return a(t),l.clear(),wi++,function(){c.forEach(function(f){var d=Nt.get(f)-1,p=s.get(f)-1;Nt.set(f,d),s.set(f,p),d||(dr.has(f)||f.removeAttribute(r),dr.delete(f)),p||f.removeAttribute(n)}),wi--,wi||(Nt=new WeakMap,Nt=new WeakMap,dr=new WeakMap,hr={})}},Vo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=_0(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),P0(r,o,n,"aria-hidden")):function(){return null}},Bo="Dialog",[md]=he(Bo),[T0,Ge]=md(Bo),gd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=v.useRef(null),u=v.useRef(null),[i,a]=we({prop:r,defaultProp:o??!1,onChange:s,caller:Bo});return h.jsxRuntimeExports.jsx(T0,{scope:t,triggerRef:l,contentRef:u,contentId:ge(),titleId:ge(),descriptionId:ge(),open:i,onOpenChange:a,onOpenToggle:v.useCallback(()=>a(f=>!f),[a]),modal:c,children:n})};gd.displayName=Bo;var xd="DialogTrigger",A0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(xd,n),s=h.useComposedRefs(t,o.triggerRef);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":na(o.open),...r,ref:s,onClick:N(e.onClick,o.onOpenToggle)})});A0.displayName=xd;var ea="DialogPortal",[O0,vd]=md(ea,{forceMount:void 0}),yd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Ge(ea,t);return h.jsxRuntimeExports.jsx(O0,{scope:t,forceMount:n,children:v.Children.map(r,c=>h.jsxRuntimeExports.jsx(Re,{present:n||s.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:c})}))})};yd.displayName=ea;var go="DialogOverlay",Ed=v.forwardRef((e,t)=>{const n=vd(go,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ge(go,e.__scopeDialog);return s.modal?h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:h.jsxRuntimeExports.jsx(I0,{...o,ref:t})}):null});Ed.displayName=go;var M0=h.createSlot("DialogOverlay.RemoveScroll"),I0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(go,n);return h.jsxRuntimeExports.jsx(Un,{as:M0,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":na(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Rt="DialogContent",bd=v.forwardRef((e,t)=>{const n=vd(Rt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ge(Rt,e.__scopeDialog);return h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:s.modal?h.jsxRuntimeExports.jsx(D0,{...o,ref:t}):h.jsxRuntimeExports.jsx(N0,{...o,ref:t})})});bd.displayName=Rt;var D0=v.forwardRef((e,t)=>{const n=Ge(Rt,e.__scopeDialog),r=v.useRef(null),o=h.useComposedRefs(t,n.contentRef,r);return v.useEffect(()=>{const s=r.current;if(s)return Vo(s)},[]),h.jsxRuntimeExports.jsx(wd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&s.preventDefault()}),onFocusOutside:N(e.onFocusOutside,s=>s.preventDefault())})}),N0=v.forwardRef((e,t)=>{const n=Ge(Rt,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return h.jsxRuntimeExports.jsx(wd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,i;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),wd=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,l=Ge(Rt,n),u=v.useRef(null),i=h.useComposedRefs(t,u);return Lo(),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx($n,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsxRuntimeExports.jsx(Qt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":na(l.open),...c,ref:i,onDismiss:()=>l.onOpenChange(!1)})}),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(L0,{titleId:l.titleId}),h.jsxRuntimeExports.jsx(V0,{contentRef:u,descriptionId:l.descriptionId})]})]})}),ta="DialogTitle",Rd=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(ta,n);return h.jsxRuntimeExports.jsx(h.Primitive.h2,{id:o.titleId,...r,ref:t})});Rd.displayName=ta;var Sd="DialogDescription",Cd=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(Sd,n);return h.jsxRuntimeExports.jsx(h.Primitive.p,{id:o.descriptionId,...r,ref:t})});Cd.displayName=Sd;var _d="DialogClose",k0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ge(_d,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});k0.displayName=_d;function na(e){return e?"open":"closed"}var jd="DialogTitleWarning",[MM,Pd]=Qx(jd,{contentName:Rt,titleName:ta,docsSlug:"dialog"}),L0=({titleId:e})=>{const t=Pd(jd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},F0=0,Lt=[];function V0(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(F0++)[0],i=v.useState(vf)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=s0([e.lockRef.current],(e.shards||[]).map(Lc),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!c.current.allowPinchZoom;var y=fr(g),E=n.current,b="deltaX"in g?g.deltaX:E[0]-y[0],w="deltaY"in g?g.deltaY:E[1]-y[1],R,_=g.target,j=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in g&&j==="h"&&_.type==="range")return!1;var P=window.getSelection(),T=P&&P.anchorNode,C=T?T===_||T.contains(_):!1;if(C)return!1;var O=Nc(j,_);if(!O)return!0;if(O?R=j:(R=j==="v"?"h":"v",O=Nc(j,_)),!O)return!1;if(!r.current&&"changedTouches"in g&&(b||w)&&(r.current=R),!R)return!0;var I=r.current||R;return N0(I,x,g,I==="h"?b:w)},[]),u=v.useCallback(function(g){var x=g;if(!(!Lt.length||Lt[Lt.length-1]!==i)){var y="deltaY"in x?kc(x):fr(x),E=t.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&k0(R.delta,y)})[0];if(E&&E.should){x.cancelable&&x.preventDefault();return}if(!E){var b=(c.current.shards||[]).map(Lc).filter(Boolean).filter(function(R){return R.contains(x.target)}),w=b.length>0?l(x,b[0]):!c.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),s=v.useCallback(function(g,x,y,E){var b={name:g,delta:x,target:y,should:E,shadowParent:B0(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),a=v.useCallback(function(g){n.current=fr(g),r.current=void 0},[]),d=v.useCallback(function(g){s(g.type,kc(g),g.target,l(g,e.lockRef.current))},[]),f=v.useCallback(function(g){s(g.type,fr(g),g.target,l(g,e.lockRef.current))},[]);v.useEffect(function(){return Lt.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,kt),document.addEventListener("touchmove",u,kt),document.addEventListener("touchstart",a,kt),function(){Lt=Lt.filter(function(g){return g!==i}),document.removeEventListener("wheel",u,kt),document.removeEventListener("touchmove",u,kt),document.removeEventListener("touchstart",a,kt)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(i,{styles:L0(o)}):null,p?v.createElement(P0,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function B0(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $0=m0(xf,V0);var Gn=v.forwardRef(function(e,t){return v.createElement(Bo,He({},e,{ref:t,sideCar:$0}))});Gn.classNames=Bo.classNames;var U0=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ft=new WeakMap,hr=new WeakMap,pr={},_i=0,wf=function(e){return e&&(e.host||wf(e.parentNode))},G0=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wf(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},z0=function(e,t,n,r){var o=G0(t,Array.isArray(e)?e:[e]);pr[n]||(pr[n]=new WeakMap);var i=pr[n],c=[],l=new Set,u=new Set(o),s=function(d){!d||l.has(d)||(l.add(d),s(d.parentNode))};o.forEach(s);var a=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(l.has(f))a(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",g=(Ft.get(f)||0)+1,x=(i.get(f)||0)+1;Ft.set(f,g),i.set(f,x),c.push(f),g===1&&m&&hr.set(f,!0),x===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return a(t),l.clear(),_i++,function(){c.forEach(function(d){var f=Ft.get(d)-1,p=i.get(d)-1;Ft.set(d,f),i.set(d,p),f||(hr.has(d)||d.removeAttribute(r),hr.delete(d)),p||d.removeAttribute(n)}),_i--,_i||(Ft=new WeakMap,Ft=new WeakMap,hr=new WeakMap,pr={})}},$o=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=U0(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),z0(r,o,n,"aria-hidden")):function(){return null}},Uo="Dialog",[Rf]=fe(Uo),[H0,ze]=Rf(Uo),Sf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!0}=e,l=v.useRef(null),u=v.useRef(null),[s,a]=me({prop:r,defaultProp:o??!1,onChange:i,caller:Uo});return h.jsxRuntimeExports.jsx(H0,{scope:t,triggerRef:l,contentRef:u,contentId:xe(),titleId:xe(),descriptionId:xe(),open:s,onOpenChange:a,onOpenToggle:v.useCallback(()=>a(d=>!d),[a]),modal:c,children:n})};Sf.displayName=Uo;var Cf="DialogTrigger",W0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(Cf,n),i=h.useComposedRefs(t,o.triggerRef);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ca(o.open),...r,ref:i,onClick:N(e.onClick,o.onOpenToggle)})});W0.displayName=Cf;var sa="DialogPortal",[q0,_f]=Rf(sa,{forceMount:void 0}),jf=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ze(sa,t);return h.jsxRuntimeExports.jsx(q0,{scope:t,forceMount:n,children:v.Children.map(r,c=>h.jsxRuntimeExports.jsx(Re,{present:n||i.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:c})}))})};jf.displayName=sa;var xo="DialogOverlay",Pf=v.forwardRef((e,t)=>{const n=_f(xo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ze(xo,e.__scopeDialog);return i.modal?h.jsxRuntimeExports.jsx(Re,{present:r||i.open,children:h.jsxRuntimeExports.jsx(X0,{...o,ref:t})}):null});Pf.displayName=xo;var K0=h.createSlot("DialogOverlay.RemoveScroll"),X0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(xo,n);return h.jsxRuntimeExports.jsx(Gn,{as:K0,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":ca(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jt="DialogContent",Tf=v.forwardRef((e,t)=>{const n=_f(jt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ze(jt,e.__scopeDialog);return h.jsxRuntimeExports.jsx(Re,{present:r||i.open,children:i.modal?h.jsxRuntimeExports.jsx(Y0,{...o,ref:t}):h.jsxRuntimeExports.jsx(Z0,{...o,ref:t})})});Tf.displayName=jt;var Y0=v.forwardRef((e,t)=>{const n=ze(jt,e.__scopeDialog),r=v.useRef(null),o=h.useComposedRefs(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return $o(i)},[]),h.jsxRuntimeExports.jsx(Af,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&i.preventDefault()}),onFocusOutside:N(e.onFocusOutside,i=>i.preventDefault())})}),Z0=v.forwardRef((e,t)=>{const n=ze(jt,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return h.jsxRuntimeExports.jsx(Af,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,s;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)==null?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Af=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...c}=e,l=ze(jt,n),u=v.useRef(null),s=h.useComposedRefs(t,u);return Vo(),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(Un,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:h.jsxRuntimeExports.jsx(tn,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ca(l.open),...c,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(J0,{titleId:l.titleId}),h.jsxRuntimeExports.jsx(ty,{contentRef:u,descriptionId:l.descriptionId})]})]})}),aa="DialogTitle",Of=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(aa,n);return h.jsxRuntimeExports.jsx(h.Primitive.h2,{id:o.titleId,...r,ref:t})});Of.displayName=aa;var Mf="DialogDescription",If=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(Mf,n);return h.jsxRuntimeExports.jsx(h.Primitive.p,{id:o.descriptionId,...r,ref:t})});If.displayName=Mf;var Df="DialogClose",Q0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(Df,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});Q0.displayName=Df;function ca(e){return e?"open":"closed"}var Nf="DialogTitleWarning",[cI,kf]=pv(Nf,{contentName:jt,titleName:aa,docsSlug:"dialog"}),J0=({titleId:e})=>{const t=kf(Nf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},F0="DialogDescriptionWarning",V0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Pd(F0).contentName}}.`;return v.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},B0=gd,$0=yd,U0=Ed,G0=bd,H0=Rd,z0=Cd,pr={exports:{}},Ri={};/**
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ey="DialogDescriptionWarning",ty=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kf(ey).contentName}}.`;return v.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ny=Sf,ry=jf,oy=Pf,iy=Tf,sy=Of,ay=If,mr={exports:{}},ji={};/**
46
46
  * @license React
47
47
  * use-sync-external-store-shim.production.js
48
48
  *
@@ -50,7 +50,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
50
50
  *
51
51
  * This source code is licensed under the MIT license found in the
52
52
  * LICENSE file in the root directory of this source tree.
53
- */var Mc;function W0(){if(Mc)return Ri;Mc=1;var e=S;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,c=e.useDebugValue;function l(f,d){var p=d(),g=r({inst:{value:p,getSnapshot:d}}),m=g[0].inst,x=g[1];return s(function(){m.value=p,m.getSnapshot=d,u(m)&&x({inst:m})},[f,p,d]),o(function(){return u(m)&&x({inst:m}),f(function(){u(m)&&x({inst:m})})},[f]),c(p),p}function u(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!n(f,p)}catch{return!0}}function i(f,d){return d()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:l;return Ri.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:a,Ri}var Si={};/**
53
+ */var Fc;function cy(){if(Fc)return ji;Fc=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,c=e.useDebugValue;function l(d,f){var p=f(),m=r({inst:{value:p,getSnapshot:f}}),g=m[0].inst,x=m[1];return i(function(){g.value=p,g.getSnapshot=f,u(g)&&x({inst:g})},[d,p,f]),o(function(){return u(g)&&x({inst:g}),d(function(){u(g)&&x({inst:g})})},[d]),c(p),p}function u(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function s(d,f){return f()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:l;return ji.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:a,ji}var Pi={};/**
54
54
  * @license React
55
55
  * use-sync-external-store-shim.development.js
56
56
  *
@@ -58,53 +58,53 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
58
58
  *
59
59
  * This source code is licensed under the MIT license found in the
60
60
  * LICENSE file in the root directory of this source tree.
61
- */var Ic;function q0(){return Ic||(Ic=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){a||o.startTransition===void 0||(a=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=g();if(!f){var x=g();s(m,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=c({inst:{value:m,getSnapshot:g}});var y=x[0].inst,E=x[1];return u(function(){y.value=m,y.getSnapshot=g,n(y)&&E({inst:y})},[p,m,g]),l(function(){return n(y)&&E({inst:y}),p(function(){n(y)&&E({inst:y})})},[p]),i(m),m}function n(p){var g=p.getSnapshot;p=p.value;try{var m=g();return!s(p,m)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,s=typeof Object.is=="function"?Object.is:e,c=o.useState,l=o.useEffect,u=o.useLayoutEffect,i=o.useDebugValue,a=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Si.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Si}var Dc;function K0(){return Dc||(Dc=1,process.env.NODE_ENV==="production"?pr.exports=W0():pr.exports=q0()),pr.exports}var X0=K0();function Y0(){return X0.useSyncExternalStore(Z0,()=>!0,()=>!1)}function Z0(){return()=>{}}var ra="Avatar",[Q0]=he(ra),[J0,Td]=Q0(ra),Ad=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=v.useState("idle");return h.jsxRuntimeExports.jsx(J0,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{...r,ref:t})})});Ad.displayName=ra;var Od="AvatarImage",Md=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,c=Td(Od,n),l=ey(r,s),u=Ve(i=>{o(i),c.onImageLoadingStatusChange(i)});return h.useLayoutEffect2(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?h.jsxRuntimeExports.jsx(h.Primitive.img,{...s,ref:t,src:r}):null});Md.displayName=Od;var Id="AvatarFallback",Dd=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Td(Id,n),[c,l]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(u)}},[r]),c&&s.imageLoadingStatus!=="loaded"?h.jsxRuntimeExports.jsx(h.Primitive.span,{...o,ref:t}):null});Dd.displayName=Id;function Nc(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function ey(e,{referrerPolicy:t,crossOrigin:n}){const r=Y0(),o=v.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[c,l]=v.useState(()=>Nc(s,e));return h.useLayoutEffect2(()=>{l(Nc(s,e))},[s,e]),h.useLayoutEffect2(()=>{const u=f=>()=>{l(f)};if(!s)return;const i=u("loaded"),a=u("error");return s.addEventListener("load",i),s.addEventListener("error",a),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",i),s.removeEventListener("error",a)}},[s,n,t]),c}var ty=Ad,ny=Md,ry=Dd;function Gn(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Hn(e){const[t,n]=v.useState(void 0);return h.useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,l;if("borderBoxSize"in s){const u=s.borderBoxSize,i=Array.isArray(u)?u[0]:u;c=i.inlineSize,l=i.blockSize}else c=e.offsetWidth,l=e.offsetHeight;n({width:c,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $o="Checkbox",[oy]=he($o),[iy,oa]=oy($o);function sy(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:c,name:l,onCheckedChange:u,required:i,value:a="on",internal_do_not_use_render:f}=e,[d,p]=we({prop:n,defaultProp:o??!1,onChange:u,caller:$o}),[g,m]=v.useState(null),[x,y]=v.useState(null),E=v.useRef(!1),b=g?!!c||!!g.closest("form"):!0,R={checked:d,disabled:s,setChecked:p,control:g,setControl:m,name:l,form:c,value:a,hasConsumerStoppedPropagationRef:E,required:i,defaultChecked:at(o)?!1:o,isFormControl:b,bubbleInput:x,setBubbleInput:y};return h.jsxRuntimeExports.jsx(iy,{scope:t,...R,children:cy(f)?f(R):r})}var Nd="CheckboxTrigger",kd=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:c,disabled:l,checked:u,required:i,setControl:a,setChecked:f,hasConsumerStoppedPropagationRef:d,isFormControl:p,bubbleInput:g}=oa(Nd,e),m=h.useComposedRefs(o,a),x=v.useRef(u);return v.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const E=()=>f(x.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[s,f]),h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"checkbox","aria-checked":at(u)?"mixed":u,"aria-required":i,"data-state":$d(u),"data-disabled":l?"":void 0,disabled:l,value:c,...r,ref:m,onKeyDown:N(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:N(n,y=>{f(E=>at(E)?!0:!E),g&&p&&(d.current=y.isPropagationStopped(),d.current||y.stopPropagation())})})});kd.displayName=Nd;var Ld=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:c,disabled:l,value:u,onCheckedChange:i,form:a,...f}=e;return h.jsxRuntimeExports.jsx(sy,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:l,required:c,onCheckedChange:i,name:r,form:a,value:u,internal_do_not_use_render:({isFormControl:d})=>h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(kd,{...f,ref:t,__scopeCheckbox:n}),d&&h.jsxRuntimeExports.jsx(Bd,{__scopeCheckbox:n})]})})});Ld.displayName=$o;var Fd="CheckboxIndicator",ay=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=oa(Fd,n);return h.jsxRuntimeExports.jsx(Re,{present:r||at(s.checked)||s.checked===!0,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":$d(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ay.displayName=Fd;var Vd="CheckboxBubbleInput",Bd=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:c,required:l,disabled:u,name:i,value:a,form:f,bubbleInput:d,setBubbleInput:p}=oa(Vd,e),g=h.useComposedRefs(n,p),m=Gn(s),x=Hn(r);v.useEffect(()=>{const E=d;if(!E)return;const b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set,P=!o.current;if(m!==s&&w){const C=new Event("click",{bubbles:P});E.indeterminate=at(s),w.call(E,at(s)?!1:s),E.dispatchEvent(C)}},[d,m,s,o]);const y=v.useRef(at(s)?!1:s);return h.jsxRuntimeExports.jsx(h.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??y.current,required:l,disabled:u,name:i,value:a,form:f,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Bd.displayName=Vd;function cy(e){return typeof e=="function"}function at(e){return e==="indeterminate"}function $d(e){return at(e)?"indeterminate":e?"checked":"unchecked"}const uy=["top","right","bottom","left"],ct=Math.min,je=Math.max,xo=Math.round,mr=Math.floor,We=e=>({x:e,y:e}),ly={left:"right",right:"left",bottom:"top",top:"bottom"},fy={start:"end",end:"start"};function is(e,t,n){return je(e,ct(t,n))}function Je(e,t){return typeof e=="function"?e(t):e}function et(e){return e.split("-")[0]}function Jt(e){return e.split("-")[1]}function ia(e){return e==="x"?"y":"x"}function sa(e){return e==="y"?"height":"width"}const dy=new Set(["top","bottom"]);function ze(e){return dy.has(et(e))?"y":"x"}function aa(e){return ia(ze(e))}function hy(e,t,n){n===void 0&&(n=!1);const r=Jt(e),o=aa(e),s=sa(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=vo(c)),[c,vo(c)]}function py(e){const t=vo(e);return[ss(e),t,ss(t)]}function ss(e){return e.replace(/start|end/g,t=>fy[t])}const kc=["left","right"],Lc=["right","left"],my=["top","bottom"],gy=["bottom","top"];function xy(e,t,n){switch(e){case"top":case"bottom":return n?t?Lc:kc:t?kc:Lc;case"left":case"right":return t?my:gy;default:return[]}}function vy(e,t,n,r){const o=Jt(e);let s=xy(et(e),n==="start",r);return o&&(s=s.map(c=>c+"-"+o),t&&(s=s.concat(s.map(ss)))),s}function vo(e){return e.replace(/left|right|bottom|top/g,t=>ly[t])}function yy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ud(e){return typeof e!="number"?yy(e):{top:e,right:e,bottom:e,left:e}}function yo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Fc(e,t,n){let{reference:r,floating:o}=e;const s=ze(t),c=aa(t),l=sa(c),u=et(t),i=s==="y",a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Jt(t)){case"start":p[c]-=d*(n&&i?-1:1);break;case"end":p[c]+=d*(n&&i?-1:1);break}return p}const Ey=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:c}=n,l=s.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let i=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Fc(i,r,u),d=r,p={},g=0;for(let m=0;m<l.length;m++){const{name:x,fn:y}=l[m],{x:E,y:b,data:R,reset:w}=await y({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:i,platform:c,elements:{reference:e,floating:t}});a=E??a,f=b??f,p={...p,[x]:{...p[x],...R}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(i=w.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:a,y:f}=Fc(i,d,u)),m=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}};async function Tn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:c,elements:l,strategy:u}=e,{boundary:i="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Je(t,e),g=Ud(p),x=l[d?f==="floating"?"reference":"floating":f],y=yo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:i,rootBoundary:a,strategy:u})),E=f==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),R=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},w=yo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:b,strategy:u}):E);return{top:(y.top-w.top+g.top)/R.y,bottom:(w.bottom-y.bottom+g.bottom)/R.y,left:(y.left-w.left+g.left)/R.x,right:(w.right-y.right+g.right)/R.x}}const by=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:c,elements:l,middlewareData:u}=t,{element:i,padding:a=0}=Je(e,t)||{};if(i==null)return{};const f=Ud(a),d={x:n,y:r},p=aa(o),g=sa(p),m=await c.getDimensions(i),x=p==="y",y=x?"top":"left",E=x?"bottom":"right",b=x?"clientHeight":"clientWidth",R=s.reference[g]+s.reference[p]-d[p]-s.floating[g],w=d[p]-s.reference[p],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(i));let C=P?P[b]:0;(!C||!await(c.isElement==null?void 0:c.isElement(P)))&&(C=l.floating[b]||s.floating[g]);const _=R/2-w/2,M=C/2-m[g]/2-1,j=ct(f[y],M),A=ct(f[E],M),I=j,F=C-m[g]-A,B=C/2-m[g]/2+_,q=is(I,B,F),U=!u.arrow&&Jt(o)!=null&&B!==q&&s.reference[g]/2-(B<I?j:A)-m[g]/2<0,G=U?B<I?B-I:B-F:0;return{[p]:d[p]+G,data:{[p]:q,centerOffset:B-q-G,...U&&{alignmentOffset:G}},reset:U}}}),wy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:c,initialPlacement:l,platform:u,elements:i}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=Je(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=et(o),E=ze(l),b=et(l)===l,R=await(u.isRTL==null?void 0:u.isRTL(i.floating)),w=d||(b||!m?[vo(l)]:py(l)),P=g!=="none";!d&&P&&w.push(...vy(l,m,g,R));const C=[l,...w],_=await Tn(t,x),M=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(a&&M.push(_[y]),f){const B=hy(o,c,R);M.push(_[B[0]],_[B[1]])}if(j=[...j,{placement:o,overflows:M}],!M.every(B=>B<=0)){var A,I;const B=(((A=s.flip)==null?void 0:A.index)||0)+1,q=C[B];if(q&&(!(f==="alignment"?E!==ze(q):!1)||j.every($=>ze($.placement)===E?$.overflows[0]>0:!0)))return{data:{index:B,overflows:j},reset:{placement:q}};let U=(I=j.filter(G=>G.overflows[0]<=0).sort((G,$)=>G.overflows[1]-$.overflows[1])[0])==null?void 0:I.placement;if(!U)switch(p){case"bestFit":{var F;const G=(F=j.filter($=>{if(P){const V=ze($.placement);return V===E||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,T)=>V+T,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:F[0];G&&(U=G);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Vc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bc(e){return uy.some(t=>e[t]>=0)}const Ry=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Je(e,t);switch(r){case"referenceHidden":{const s=await Tn(t,{...o,elementContext:"reference"}),c=Vc(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bc(c)}}}case"escaped":{const s=await Tn(t,{...o,altBoundary:!0}),c=Vc(s,n.floating);return{data:{escapedOffsets:c,escaped:Bc(c)}}}default:return{}}}}},Gd=new Set(["left","top"]);async function Sy(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=et(n),l=Jt(n),u=ze(n)==="y",i=Gd.has(c)?-1:1,a=s&&u?-1:1,f=Je(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),u?{x:p*a,y:d*i}:{x:d*i,y:p*a}}const Cy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:c,middlewareData:l}=t,u=await Sy(t,e);return c===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:c}}}}},_y=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:y,y:E}=x;return{x:y,y:E}}},...u}=Je(e,t),i={x:n,y:r},a=await Tn(t,u),f=ze(et(o)),d=ia(f);let p=i[d],g=i[f];if(s){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",E=p+a[x],b=p-a[y];p=is(E,p,b)}if(c){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=g+a[x],b=g-a[y];g=is(E,g,b)}const m=l.fn({...t,[d]:p,[f]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:s,[f]:c}}}}}},jy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:c}=t,{offset:l=0,mainAxis:u=!0,crossAxis:i=!0}=Je(e,t),a={x:n,y:r},f=ze(o),d=ia(f);let p=a[d],g=a[f];const m=Je(l,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const b=d==="y"?"height":"width",R=s.reference[d]-s.floating[b]+x.mainAxis,w=s.reference[d]+s.reference[b]-x.mainAxis;p<R?p=R:p>w&&(p=w)}if(i){var y,E;const b=d==="y"?"width":"height",R=Gd.has(et(o)),w=s.reference[f]-s.floating[b]+(R&&((y=c.offset)==null?void 0:y[f])||0)+(R?0:x.crossAxis),P=s.reference[f]+s.reference[b]+(R?0:((E=c.offset)==null?void 0:E[f])||0)-(R?x.crossAxis:0);g<w?g=w:g>P&&(g=P)}return{[d]:p,[f]:g}}}},Py=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:c,elements:l}=t,{apply:u=()=>{},...i}=Je(e,t),a=await Tn(t,i),f=et(o),d=Jt(o),p=ze(o)==="y",{width:g,height:m}=s.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=d===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,x=d==="end"?"top":"bottom");const E=m-a.top-a.bottom,b=g-a.left-a.right,R=ct(m-a[x],E),w=ct(g-a[y],b),P=!t.middlewareData.shift;let C=R,_=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=E),P&&!d){const j=je(a.left,0),A=je(a.right,0),I=je(a.top,0),F=je(a.bottom,0);p?_=g-2*(j!==0||A!==0?j+A:je(a.left,a.right)):C=m-2*(I!==0||F!==0?I+F:je(a.top,a.bottom))}await u({...t,availableWidth:_,availableHeight:C});const M=await c.getDimensions(l.floating);return g!==M.width||m!==M.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function en(e){return Hd(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ze(e){var t;return(t=(Hd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hd(e){return Uo()?e instanceof Node||e instanceof Pe(e).Node:!1}function Be(e){return Uo()?e instanceof Element||e instanceof Pe(e).Element:!1}function Xe(e){return Uo()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function $c(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}const Ty=new Set(["inline","contents"]);function zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ty.has(o)}const Ay=new Set(["table","td","th"]);function Oy(e){return Ay.has(en(e))}const My=[":popover-open",":modal"];function Go(e){return My.some(t=>{try{return e.matches(t)}catch{return!1}})}const Iy=["transform","translate","scale","rotate","perspective"],Dy=["transform","translate","scale","rotate","perspective","filter"],Ny=["paint","layout","strict","content"];function ca(e){const t=ua(),n=Be(e)?$e(e):e;return Iy.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Dy.some(r=>(n.willChange||"").includes(r))||Ny.some(r=>(n.contain||"").includes(r))}function ky(e){let t=ut(e);for(;Xe(t)&&!Kt(t);){if(ca(t))return t;if(Go(t))return null;t=ut(t)}return null}function ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ly=new Set(["html","body","#document"]);function Kt(e){return Ly.has(en(e))}function $e(e){return Pe(e).getComputedStyle(e)}function Ho(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ut(e){if(en(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$c(e)&&e.host||Ze(e);return $c(t)?t.host:t}function zd(e){const t=ut(e);return Kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&zn(t)?t:zd(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zd(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),c=Pe(o);if(s){const l=as(c);return t.concat(c,c.visualViewport||[],zn(o)?o:[],l&&n?An(l):[])}return t.concat(o,An(o,[],n))}function as(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wd(e){const t=$e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),s=o?e.offsetWidth:n,c=o?e.offsetHeight:r,l=xo(n)!==s||xo(r)!==c;return l&&(n=s,r=c),{width:n,height:r,$:l}}function la(e){return Be(e)?e:e.contextElement}function Wt(e){const t=la(e);if(!Xe(t))return We(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Wd(t);let c=(s?xo(n.width):n.width)/r,l=(s?xo(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}const Fy=We(0);function qd(e){const t=Pe(e);return!ua()||!t.visualViewport?Fy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function St(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=la(e);let c=We(1);t&&(r?Be(r)&&(c=Wt(r)):c=Wt(e));const l=Vy(s,n,r)?qd(s):We(0);let u=(o.left+l.x)/c.x,i=(o.top+l.y)/c.y,a=o.width/c.x,f=o.height/c.y;if(s){const d=Pe(s),p=r&&Be(r)?Pe(r):r;let g=d,m=as(g);for(;m&&r&&p!==g;){const x=Wt(m),y=m.getBoundingClientRect(),E=$e(m),b=y.left+(m.clientLeft+parseFloat(E.paddingLeft))*x.x,R=y.top+(m.clientTop+parseFloat(E.paddingTop))*x.y;u*=x.x,i*=x.y,a*=x.x,f*=x.y,u+=b,i+=R,g=Pe(m),m=as(g)}}return yo({width:a,height:f,x:u,y:i})}function zo(e,t){const n=Ho(e).scrollLeft;return t?t.left+n:St(Ze(e)).left+n}function Kd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-zo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function By(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",c=Ze(r),l=t?Go(t.floating):!1;if(r===c||l&&s)return n;let u={scrollLeft:0,scrollTop:0},i=We(1);const a=We(0),f=Xe(r);if((f||!f&&!s)&&((en(r)!=="body"||zn(c))&&(u=Ho(r)),Xe(r))){const p=St(r);i=Wt(r),a.x=p.x+r.clientLeft,a.y=p.y+r.clientTop}const d=c&&!f&&!s?Kd(c,u):We(0);return{width:n.width*i.x,height:n.height*i.y,x:n.x*i.x-u.scrollLeft*i.x+a.x+d.x,y:n.y*i.y-u.scrollTop*i.y+a.y+d.y}}function $y(e){return Array.from(e.getClientRects())}function Uy(e){const t=Ze(e),n=Ho(e),r=e.ownerDocument.body,o=je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+zo(e);const l=-n.scrollTop;return $e(r).direction==="rtl"&&(c+=je(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:c,y:l}}const Uc=25;function Gy(e,t){const n=Pe(e),r=Ze(e),o=n.visualViewport;let s=r.clientWidth,c=r.clientHeight,l=0,u=0;if(o){s=o.width,c=o.height;const a=ua();(!a||a&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const i=zo(r);if(i<=0){const a=r.ownerDocument,f=a.body,d=getComputedStyle(f),p=a.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-p);g<=Uc&&(s-=g)}else i<=Uc&&(s+=i);return{width:s,height:c,x:l,y:u}}const Hy=new Set(["absolute","fixed"]);function zy(e,t){const n=St(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?Wt(e):We(1),c=e.clientWidth*s.x,l=e.clientHeight*s.y,u=o*s.x,i=r*s.y;return{width:c,height:l,x:u,y:i}}function Gc(e,t,n){let r;if(t==="viewport")r=Gy(e,n);else if(t==="document")r=Uy(Ze(e));else if(Be(t))r=zy(t,n);else{const o=qd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yo(r)}function Xd(e,t){const n=ut(e);return n===t||!Be(n)||Kt(n)?!1:$e(n).position==="fixed"||Xd(n,t)}function Wy(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(l=>Be(l)&&en(l)!=="body"),o=null;const s=$e(e).position==="fixed";let c=s?ut(e):e;for(;Be(c)&&!Kt(c);){const l=$e(c),u=ca(c);!u&&l.position==="fixed"&&(o=null),(s?!u&&!o:!u&&l.position==="static"&&!!o&&Hy.has(o.position)||zn(c)&&!u&&Xd(e,c))?r=r.filter(a=>a!==c):o=l,c=ut(c)}return t.set(e,r),r}function qy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?Go(t)?[]:Wy(t,this._c):[].concat(n),r],l=c[0],u=c.reduce((i,a)=>{const f=Gc(t,a,o);return i.top=je(f.top,i.top),i.right=ct(f.right,i.right),i.bottom=ct(f.bottom,i.bottom),i.left=je(f.left,i.left),i},Gc(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ky(e){const{width:t,height:n}=Wd(e);return{width:t,height:n}}function Xy(e,t,n){const r=Xe(t),o=Ze(t),s=n==="fixed",c=St(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const u=We(0);function i(){u.x=zo(o)}if(r||!r&&!s)if((en(t)!=="body"||zn(o))&&(l=Ho(t)),r){const p=St(t,!0,s,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&i();s&&!r&&o&&i();const a=o&&!r&&!s?Kd(o,l):We(0),f=c.left+l.scrollLeft-u.x-a.x,d=c.top+l.scrollTop-u.y-a.y;return{x:f,y:d,width:c.width,height:c.height}}function Ci(e){return $e(e).position==="static"}function Hc(e,t){if(!Xe(e)||$e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function Yd(e,t){const n=Pe(e);if(Go(e))return n;if(!Xe(e)){let o=ut(e);for(;o&&!Kt(o);){if(Be(o)&&!Ci(o))return o;o=ut(o)}return n}let r=Hc(e,t);for(;r&&Oy(r)&&Ci(r);)r=Hc(r,t);return r&&Kt(r)&&Ci(r)&&!ca(r)?n:r||ky(e)||n}const Yy=async function(e){const t=this.getOffsetParent||Yd,n=this.getDimensions,r=await n(e.floating);return{reference:Xy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Zy(e){return $e(e).direction==="rtl"}const Qy={convertOffsetParentRelativeRectToViewportRelativeRect:By,getDocumentElement:Ze,getClippingRect:qy,getOffsetParent:Yd,getElementRects:Yy,getClientRects:$y,getDimensions:Ky,getScale:Wt,isElement:Be,isRTL:Zy};function Zd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jy(e,t){let n=null,r;const o=Ze(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function c(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const i=e.getBoundingClientRect(),{left:a,top:f,width:d,height:p}=i;if(l||t(),!d||!p)return;const g=mr(f),m=mr(o.clientWidth-(a+d)),x=mr(o.clientHeight-(f+p)),y=mr(a),b={rootMargin:-g+"px "+-m+"px "+-x+"px "+-y+"px",threshold:je(0,ct(1,u))||1};let R=!0;function w(P){const C=P[0].intersectionRatio;if(C!==u){if(!R)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C===1&&!Zd(i,e.getBoundingClientRect())&&c(),R=!1}try{n=new IntersectionObserver(w,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(e)}return c(!0),s}function e1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,i=la(e),a=o||s?[...i?An(i):[],...An(t)]:[];a.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=i&&l?Jy(i,n):null;let d=-1,p=null;c&&(p=new ResizeObserver(y=>{let[E]=y;E&&E.target===i&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),i&&!u&&p.observe(i),p.observe(t));let g,m=u?St(e):null;u&&x();function x(){const y=St(e);m&&!Zd(m,y)&&n(),m=y,g=requestAnimationFrame(x)}return n(),()=>{var y;a.forEach(E=>{o&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const t1=Cy,n1=_y,r1=wy,o1=Py,i1=Ry,zc=by,s1=jy,a1=(e,t,n)=>{const r=new Map,o={platform:Qy,...n},s={...o.platform,_c:r};return Ey(e,t,{...o,platform:s})};var c1=typeof document<"u",u1=function(){},co=c1?S.useLayoutEffect:u1;function Eo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Eo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Eo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wc(e,t){const n=Qd(e);return Math.round(t*n)/n}function _i(e){const t=v.useRef(e);return co(()=>{t.current=e}),t}function l1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:i}=e,[a,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=v.useState(r);Eo(d,r)||p(r);const[g,m]=v.useState(null),[x,y]=v.useState(null),E=v.useCallback($=>{$!==P.current&&(P.current=$,m($))},[]),b=v.useCallback($=>{$!==C.current&&(C.current=$,y($))},[]),R=s||g,w=c||x,P=v.useRef(null),C=v.useRef(null),_=v.useRef(a),M=u!=null,j=_i(u),A=_i(o),I=_i(i),F=v.useCallback(()=>{if(!P.current||!C.current)return;const $={placement:t,strategy:n,middleware:d};A.current&&($.platform=A.current),a1(P.current,C.current,$).then(V=>{const T={...V,isPositioned:I.current!==!1};B.current&&!Eo(_.current,T)&&(_.current=T,qs.flushSync(()=>{f(T)}))})},[d,t,n,A,I]);co(()=>{i===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[i]);const B=v.useRef(!1);co(()=>(B.current=!0,()=>{B.current=!1}),[]),co(()=>{if(R&&(P.current=R),w&&(C.current=w),R&&w){if(j.current)return j.current(R,w,F);F()}},[R,w,F,j,M]);const q=v.useMemo(()=>({reference:P,floating:C,setReference:E,setFloating:b}),[E,b]),U=v.useMemo(()=>({reference:R,floating:w}),[R,w]),G=v.useMemo(()=>{const $={position:n,left:0,top:0};if(!U.floating)return $;const V=Wc(U.floating,a.x),T=Wc(U.floating,a.y);return l?{...$,transform:"translate("+V+"px, "+T+"px)",...Qd(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:T}},[n,l,U.floating,a.x,a.y]);return v.useMemo(()=>({...a,update:F,refs:q,elements:U,floatingStyles:G}),[a,F,q,U,G])}const f1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?zc({element:r.current,padding:o}).fn(n):{}:r?zc({element:r,padding:o}).fn(n):{}}}},d1=(e,t)=>({...t1(e),options:[e,t]}),h1=(e,t)=>({...n1(e),options:[e,t]}),p1=(e,t)=>({...s1(e),options:[e,t]}),m1=(e,t)=>({...r1(e),options:[e,t]}),g1=(e,t)=>({...o1(e),options:[e,t]}),x1=(e,t)=>({...i1(e),options:[e,t]}),v1=(e,t)=>({...f1(e),options:[e,t]});var y1="Arrow",Jd=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsxRuntimeExports.jsx(h.Primitive.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jd.displayName=y1;var E1=Jd,fa="Popper",[eh,dt]=he(fa),[b1,th]=eh(fa),nh=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return h.jsxRuntimeExports.jsx(b1,{scope:t,anchor:r,onAnchorChange:o,children:n})};nh.displayName=fa;var rh="PopperAnchor",oh=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=th(rh,n),c=v.useRef(null),l=h.useComposedRefs(t,c),u=v.useRef(null);return v.useEffect(()=>{const i=u.current;u.current=(r==null?void 0:r.current)||c.current,i!==u.current&&s.onAnchorChange(u.current)}),r?null:h.jsxRuntimeExports.jsx(h.Primitive.div,{...o,ref:l})});oh.displayName=rh;var da="PopperContent",[w1,R1]=eh(da),ih=v.forwardRef((e,t)=>{var k,W,K,z,J,D;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:i=[],collisionPadding:a=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,x=th(da,n),[y,E]=v.useState(null),b=h.useComposedRefs(t,ae=>E(ae)),[R,w]=v.useState(null),P=Hn(R),C=(P==null?void 0:P.width)??0,_=(P==null?void 0:P.height)??0,M=r+(s!=="center"?"-"+s:""),j=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},A=Array.isArray(i)?i:[i],I=A.length>0,F={padding:j,boundary:A.filter(C1),altBoundary:I},{refs:B,floatingStyles:q,placement:U,isPositioned:G,middlewareData:$}=l1({strategy:"fixed",placement:M,whileElementsMounted:(...ae)=>e1(...ae,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[d1({mainAxis:o+_,alignmentAxis:c}),u&&h1({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?p1():void 0,...F}),u&&m1({...F}),g1({...F,apply:({elements:ae,rects:ve,availableWidth:rt,availableHeight:ln})=>{const{width:fn,height:Kx}=ve.reference,cr=ae.floating.style;cr.setProperty("--radix-popper-available-width",`${rt}px`),cr.setProperty("--radix-popper-available-height",`${ln}px`),cr.setProperty("--radix-popper-anchor-width",`${fn}px`),cr.setProperty("--radix-popper-anchor-height",`${Kx}px`)}}),R&&v1({element:R,padding:l}),_1({arrowWidth:C,arrowHeight:_}),d&&x1({strategy:"referenceHidden",...F})]}),[V,T]=ch(U),L=Ve(g);h.useLayoutEffect2(()=>{G&&(L==null||L())},[G,L]);const Y=(k=$.arrow)==null?void 0:k.x,Q=(W=$.arrow)==null?void 0:W.y,X=((K=$.arrow)==null?void 0:K.centerOffset)!==0,[ee,Z]=v.useState();return h.useLayoutEffect2(()=>{y&&Z(window.getComputedStyle(y).zIndex)},[y]),h.jsxRuntimeExports.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(z=$.transformOrigin)==null?void 0:z.x,(J=$.transformOrigin)==null?void 0:J.y].join(" "),...((D=$.hide)==null?void 0:D.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsxRuntimeExports.jsx(w1,{scope:n,placedSide:V,onArrowChange:w,arrowX:Y,arrowY:Q,shouldHideArrow:X,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-side":V,"data-align":T,...m,ref:b,style:{...m.style,animation:G?void 0:"none"}})})})});ih.displayName=da;var sh="PopperArrow",S1={top:"bottom",right:"left",bottom:"top",left:"right"},ah=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=R1(sh,r),c=S1[s.placedSide];return h.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsxRuntimeExports.jsx(E1,{...o,ref:n,style:{...o.style,display:"block"}})})});ah.displayName=sh;function C1(e){return e!==null}var _1=e=>({name:"transformOrigin",options:e,fn(t){var x,y,E;const{placement:n,rects:r,middlewareData:o}=t,c=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[i,a]=ch(n),f={start:"0%",center:"50%",end:"100%"}[a],d=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((E=o.arrow)==null?void 0:E.y)??0)+u/2;let g="",m="";return i==="bottom"?(g=c?f:`${d}px`,m=`${-u}px`):i==="top"?(g=c?f:`${d}px`,m=`${r.floating.height+u}px`):i==="right"?(g=`${-u}px`,m=c?f:`${p}px`):i==="left"&&(g=`${r.floating.width+u}px`,m=c?f:`${p}px`),{data:{x:g,y:m}}}});function ch(e){const[t,n="center"]=e.split("-");return[t,n]}var Wo=nh,Wn=oh,qo=ih,Ko=ah,ji="rovingFocusGroup.onEntryFocus",j1={bubbles:!1,cancelable:!0},qn="RovingFocusGroup",[cs,uh,P1]=Bn(qn),[T1,tn]=he(qn,[P1]),[A1,O1]=T1(qn),lh=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(cs.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsxRuntimeExports.jsx(cs.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsxRuntimeExports.jsx(M1,{...e,ref:t})})}));lh.displayName=qn;var M1=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:i,preventScrollOnEntryFocus:a=!1,...f}=e,d=v.useRef(null),p=h.useComposedRefs(t,d),g=Tt(s),[m,x]=we({prop:c,defaultProp:l??null,onChange:u,caller:qn}),[y,E]=v.useState(!1),b=Ve(i),R=uh(n),w=v.useRef(!1),[P,C]=v.useState(0);return v.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(ji,b),()=>_.removeEventListener(ji,b)},[b]),h.jsxRuntimeExports.jsx(A1,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:v.useCallback(_=>x(_),[x]),onItemShiftTab:v.useCallback(()=>E(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(_=>_+1),[]),onFocusableItemRemove:v.useCallback(()=>C(_=>_-1),[]),children:h.jsxRuntimeExports.jsx(h.Primitive.div,{tabIndex:y||P===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:N(e.onMouseDown,()=>{w.current=!0}),onFocus:N(e.onFocus,_=>{const M=!w.current;if(_.target===_.currentTarget&&M&&!y){const j=new CustomEvent(ji,j1);if(_.currentTarget.dispatchEvent(j),!j.defaultPrevented){const A=R().filter(U=>U.focusable),I=A.find(U=>U.active),F=A.find(U=>U.id===m),q=[I,F,...A].filter(Boolean).map(U=>U.ref.current);hh(q,a)}}w.current=!1}),onBlur:N(e.onBlur,()=>E(!1))})})}),fh="RovingFocusGroupItem",dh=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:c,...l}=e,u=ge(),i=s||u,a=O1(fh,n),f=a.currentTabStopId===i,d=uh(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=a;return v.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),h.jsxRuntimeExports.jsx(cs.ItemSlot,{scope:n,id:i,focusable:r,active:o,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{tabIndex:f?0:-1,"data-orientation":a.orientation,...l,ref:t,onMouseDown:N(e.onMouseDown,x=>{r?a.onItemFocus(i):x.preventDefault()}),onFocus:N(e.onFocus,()=>a.onItemFocus(i)),onKeyDown:N(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){a.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=N1(x,a.orientation,a.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=d().filter(R=>R.focusable).map(R=>R.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const R=b.indexOf(x.currentTarget);b=a.loop?k1(b,R+1):b.slice(R+1)}setTimeout(()=>hh(b))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:m!=null}):c})})});dh.displayName=fh;var I1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function N1(e,t,n){const r=D1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return I1[r]}function hh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function k1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ha=lh,pa=dh,us=["Enter"," "],L1=["ArrowDown","PageUp","Home"],ph=["ArrowUp","PageDown","End"],F1=[...L1,...ph],V1={ltr:[...us,"ArrowRight"],rtl:[...us,"ArrowLeft"]},B1={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Kn="Menu",[On,$1,U1]=Bn(Kn),[At,mh]=he(Kn,[U1,dt,tn]),Xo=dt(),gh=tn(),[G1,Ot]=At(Kn),[H1,Xn]=At(Kn),xh=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:c=!0}=e,l=Xo(t),[u,i]=v.useState(null),a=v.useRef(!1),f=Ve(s),d=Tt(o);return v.useEffect(()=>{const p=()=>{a.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>a.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),h.jsxRuntimeExports.jsx(Wo,{...l,children:h.jsxRuntimeExports.jsx(G1,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:i,children:h.jsxRuntimeExports.jsx(H1,{scope:t,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:a,dir:d,modal:c,children:r})})})};xh.displayName=Kn;var z1="MenuAnchor",ma=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xo(n);return h.jsxRuntimeExports.jsx(Wn,{...o,...r,ref:t})});ma.displayName=z1;var ga="MenuPortal",[W1,vh]=At(ga,{forceMount:void 0}),yh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ot(ga,t);return h.jsxRuntimeExports.jsx(W1,{scope:t,forceMount:n,children:h.jsxRuntimeExports.jsx(Re,{present:n||s.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:r})})})};yh.displayName=ga;var Me="MenuContent",[q1,xa]=At(Me),Eh=v.forwardRef((e,t)=>{const n=vh(Me,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(Me,e.__scopeMenu),c=Xn(Me,e.__scopeMenu);return h.jsxRuntimeExports.jsx(On.Provider,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:h.jsxRuntimeExports.jsx(On.Slot,{scope:e.__scopeMenu,children:c.modal?h.jsxRuntimeExports.jsx(K1,{...o,ref:t}):h.jsxRuntimeExports.jsx(X1,{...o,ref:t})})})})}),K1=v.forwardRef((e,t)=>{const n=Ot(Me,e.__scopeMenu),r=v.useRef(null),o=h.useComposedRefs(t,r);return v.useEffect(()=>{const s=r.current;if(s)return Vo(s)},[]),h.jsxRuntimeExports.jsx(va,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:N(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),X1=v.forwardRef((e,t)=>{const n=Ot(Me,e.__scopeMenu);return h.jsxRuntimeExports.jsx(va,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Y1=h.createSlot("MenuContent.ScrollLock"),va=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:p,disableOutsideScroll:g,...m}=e,x=Ot(Me,n),y=Xn(Me,n),E=Xo(n),b=gh(n),R=$1(n),[w,P]=v.useState(null),C=v.useRef(null),_=h.useComposedRefs(t,C,x.onContentChange),M=v.useRef(0),j=v.useRef(""),A=v.useRef(0),I=v.useRef(null),F=v.useRef("right"),B=v.useRef(0),q=g?Un:v.Fragment,U=g?{as:Y1,allowPinchZoom:!0}:void 0,G=V=>{var k,W;const T=j.current+V,L=R().filter(K=>!K.disabled),Y=document.activeElement,Q=(k=L.find(K=>K.ref.current===Y))==null?void 0:k.textValue,X=L.map(K=>K.textValue),ee=cE(X,T,Q),Z=(W=L.find(K=>K.textValue===ee))==null?void 0:W.ref.current;(function K(z){j.current=z,window.clearTimeout(M.current),z!==""&&(M.current=window.setTimeout(()=>K(""),1e3))})(T),Z&&setTimeout(()=>Z.focus())};v.useEffect(()=>()=>window.clearTimeout(M.current),[]),Lo();const $=v.useCallback(V=>{var L,Y;return F.current===((L=I.current)==null?void 0:L.side)&&lE(V,(Y=I.current)==null?void 0:Y.area)},[]);return h.jsxRuntimeExports.jsx(q1,{scope:n,searchRef:j,onItemEnter:v.useCallback(V=>{$(V)&&V.preventDefault()},[$]),onItemLeave:v.useCallback(V=>{var T;$(V)||((T=C.current)==null||T.focus(),P(null))},[$]),onTriggerLeave:v.useCallback(V=>{$(V)&&V.preventDefault()},[$]),pointerGraceTimerRef:A,onPointerGraceIntentChange:v.useCallback(V=>{I.current=V},[]),children:h.jsxRuntimeExports.jsx(q,{...U,children:h.jsxRuntimeExports.jsx($n,{asChild:!0,trapped:o,onMountAutoFocus:N(s,V=>{var T;V.preventDefault(),(T=C.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f,onInteractOutside:d,onDismiss:p,children:h.jsxRuntimeExports.jsx(ha,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:P,onEntryFocus:N(u,V=>{y.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsxRuntimeExports.jsx(qo,{role:"menu","aria-orientation":"vertical","data-state":kh(x.open),"data-radix-menu-content":"",dir:y.dir,...E,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:N(m.onKeyDown,V=>{const L=V.target.closest("[data-radix-menu-content]")===V.currentTarget,Y=V.ctrlKey||V.altKey||V.metaKey,Q=V.key.length===1;L&&(V.key==="Tab"&&V.preventDefault(),!Y&&Q&&G(V.key));const X=C.current;if(V.target!==X||!F1.includes(V.key))return;V.preventDefault();const Z=R().filter(k=>!k.disabled).map(k=>k.ref.current);ph.includes(V.key)&&Z.reverse(),sE(Z)}),onBlur:N(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(M.current),j.current="")}),onPointerMove:N(e.onPointerMove,Mn(V=>{const T=V.target,L=B.current!==V.clientX;if(V.currentTarget.contains(T)&&L){const Y=V.clientX>B.current?"right":"left";F.current=Y,B.current=V.clientX}}))})})})})})})});Eh.displayName=Me;var Z1="MenuGroup",ya=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"group",...r,ref:t})});ya.displayName=Z1;var Q1="MenuLabel",bh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{...r,ref:t})});bh.displayName=Q1;var bo="MenuItem",qc="menu.itemSelect",Yo=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=v.useRef(null),c=Xn(bo,e.__scopeMenu),l=xa(bo,e.__scopeMenu),u=h.useComposedRefs(t,s),i=v.useRef(!1),a=()=>{const f=s.current;if(!n&&f){const d=new CustomEvent(qc,{bubbles:!0,cancelable:!0});f.addEventListener(qc,p=>r==null?void 0:r(p),{once:!0}),h.dispatchDiscreteCustomEvent(f,d),d.defaultPrevented?i.current=!1:c.onClose()}};return h.jsxRuntimeExports.jsx(wh,{...o,ref:u,disabled:n,onClick:N(e.onClick,a),onPointerDown:f=>{var d;(d=e.onPointerDown)==null||d.call(e,f),i.current=!0},onPointerUp:N(e.onPointerUp,f=>{var d;i.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:N(e.onKeyDown,f=>{const d=l.searchRef.current!=="";n||d&&f.key===" "||us.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Yo.displayName=bo;var wh=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,c=xa(bo,n),l=gh(n),u=v.useRef(null),i=h.useComposedRefs(t,u),[a,f]=v.useState(!1),[d,p]=v.useState("");return v.useEffect(()=>{const g=u.current;g&&p((g.textContent??"").trim())},[s.children]),h.jsxRuntimeExports.jsx(On.ItemSlot,{scope:n,disabled:r,textValue:o??d,children:h.jsxRuntimeExports.jsx(pa,{asChild:!0,...l,focusable:!r,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:i,onPointerMove:N(e.onPointerMove,Mn(g=>{r?c.onItemLeave(g):(c.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:N(e.onPointerLeave,Mn(g=>c.onItemLeave(g))),onFocus:N(e.onFocus,()=>f(!0)),onBlur:N(e.onBlur,()=>f(!1))})})})}),J1="MenuCheckboxItem",Rh=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsxRuntimeExports.jsx(Ph,{scope:e.__scopeMenu,checked:n,children:h.jsxRuntimeExports.jsx(Yo,{role:"menuitemcheckbox","aria-checked":wo(n)?"mixed":n,...o,ref:t,"data-state":ba(n),onSelect:N(o.onSelect,()=>r==null?void 0:r(wo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Rh.displayName=J1;var Sh="MenuRadioGroup",[eE,tE]=At(Sh,{value:void 0,onValueChange:()=>{}}),Ch=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ve(r);return h.jsxRuntimeExports.jsx(eE,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsxRuntimeExports.jsx(ya,{...o,ref:t})})});Ch.displayName=Sh;var _h="MenuRadioItem",jh=v.forwardRef((e,t)=>{const{value:n,...r}=e,o=tE(_h,e.__scopeMenu),s=n===o.value;return h.jsxRuntimeExports.jsx(Ph,{scope:e.__scopeMenu,checked:s,children:h.jsxRuntimeExports.jsx(Yo,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":ba(s),onSelect:N(r.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,n)},{checkForDefaultPrevented:!1})})})});jh.displayName=_h;var Ea="MenuItemIndicator",[Ph,nE]=At(Ea,{checked:!1}),Th=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=nE(Ea,n);return h.jsxRuntimeExports.jsx(Re,{present:r||wo(s.checked)||s.checked===!0,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{...o,ref:t,"data-state":ba(s.checked)})})});Th.displayName=Ea;var rE="MenuSeparator",Ah=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ah.displayName=rE;var oE="MenuArrow",Oh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xo(n);return h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t})});Oh.displayName=oE;var iE="MenuSub",[IM,Mh]=At(iE),bn="MenuSubTrigger",Ih=v.forwardRef((e,t)=>{const n=Ot(bn,e.__scopeMenu),r=Xn(bn,e.__scopeMenu),o=Mh(bn,e.__scopeMenu),s=xa(bn,e.__scopeMenu),c=v.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,i={__scopeMenu:e.__scopeMenu},a=v.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return v.useEffect(()=>a,[a]),v.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),u(null)}},[l,u]),h.jsxRuntimeExports.jsx(ma,{asChild:!0,...i,children:h.jsxRuntimeExports.jsx(wh,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":kh(n.open),...e,ref:h.composeRefs(t,o.onTriggerChange),onClick:f=>{var d;(d=e.onClick)==null||d.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:N(e.onPointerMove,Mn(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:N(e.onPointerLeave,Mn(f=>{var p,g;a();const d=(p=n.content)==null?void 0:p.getBoundingClientRect();if(d){const m=(g=n.content)==null?void 0:g.dataset.side,x=m==="right",y=x?-5:5,E=d[x?"left":"right"],b=d[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:E,y:d.top},{x:b,y:d.top},{x:b,y:d.bottom},{x:E,y:d.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:N(e.onKeyDown,f=>{var p;const d=s.searchRef.current!=="";e.disabled||d&&f.key===" "||V1[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});Ih.displayName=bn;var Dh="MenuSubContent",Nh=v.forwardRef((e,t)=>{const n=vh(Me,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(Me,e.__scopeMenu),c=Xn(Me,e.__scopeMenu),l=Mh(Dh,e.__scopeMenu),u=v.useRef(null),i=h.useComposedRefs(t,u);return h.jsxRuntimeExports.jsx(On.Provider,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:h.jsxRuntimeExports.jsx(On.Slot,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(va,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:i,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var f;c.isUsingKeyboardRef.current&&((f=u.current)==null||f.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:N(e.onFocusOutside,a=>{a.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:N(e.onEscapeKeyDown,a=>{c.onClose(),a.preventDefault()}),onKeyDown:N(e.onKeyDown,a=>{var p;const f=a.currentTarget.contains(a.target),d=B1[c.dir].includes(a.key);f&&d&&(s.onOpenChange(!1),(p=l.trigger)==null||p.focus(),a.preventDefault())})})})})})});Nh.displayName=Dh;function kh(e){return e?"open":"closed"}function wo(e){return e==="indeterminate"}function ba(e){return wo(e)?"indeterminate":e?"checked":"unchecked"}function sE(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function aE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cE(e,t,n){const o=t.length>1&&Array.from(t).every(i=>i===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=aE(e,Math.max(s,0));o.length===1&&(c=c.filter(i=>i!==n));const u=c.find(i=>i.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function uE(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s],u=t[c],i=l.x,a=l.y,f=u.x,d=u.y;a>r!=d>r&&n<(f-i)*(r-a)/(d-a)+i&&(o=!o)}return o}function lE(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return uE(n,t)}function Mn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var fE=xh,dE=ma,hE=yh,pE=Eh,mE=ya,gE=bh,xE=Yo,vE=Rh,yE=Ch,EE=jh,bE=Th,wE=Ah,RE=Oh,SE=Ih,CE=Nh,Zo="DropdownMenu",[_E]=he(Zo,[mh]),Se=mh(),[jE,Lh]=_E(Zo),Fh=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=Se(t),i=v.useRef(null),[a,f]=we({prop:o,defaultProp:s??!1,onChange:c,caller:Zo});return h.jsxRuntimeExports.jsx(jE,{scope:t,triggerId:ge(),triggerRef:i,contentId:ge(),open:a,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(d=>!d),[f]),modal:l,children:h.jsxRuntimeExports.jsx(fE,{...u,open:a,onOpenChange:f,dir:r,modal:l,children:n})})};Fh.displayName=Zo;var Vh="DropdownMenuTrigger",Bh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Lh(Vh,n),c=Se(n);return h.jsxRuntimeExports.jsx(dE,{asChild:!0,...c,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:h.composeRefs(t,s.triggerRef),onPointerDown:N(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:N(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Bh.displayName=Vh;var PE="DropdownMenuPortal",$h=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Se(t);return h.jsxRuntimeExports.jsx(hE,{...r,...n})};$h.displayName=PE;var Uh="DropdownMenuContent",Gh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lh(Uh,n),s=Se(n),c=v.useRef(!1);return h.jsxRuntimeExports.jsx(pE,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:N(e.onCloseAutoFocus,l=>{var u;c.current||(u=o.triggerRef.current)==null||u.focus(),c.current=!1,l.preventDefault()}),onInteractOutside:N(e.onInteractOutside,l=>{const u=l.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0,a=u.button===2||i;(!o.modal||a)&&(c.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)"}})});Gh.displayName=Uh;var TE="DropdownMenuGroup",AE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(mE,{...o,...r,ref:t})});AE.displayName=TE;var OE="DropdownMenuLabel",Hh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(gE,{...o,...r,ref:t})});Hh.displayName=OE;var ME="DropdownMenuItem",zh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(xE,{...o,...r,ref:t})});zh.displayName=ME;var IE="DropdownMenuCheckboxItem",DE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(vE,{...o,...r,ref:t})});DE.displayName=IE;var NE="DropdownMenuRadioGroup",kE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(yE,{...o,...r,ref:t})});kE.displayName=NE;var LE="DropdownMenuRadioItem",FE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(EE,{...o,...r,ref:t})});FE.displayName=LE;var VE="DropdownMenuItemIndicator",BE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(bE,{...o,...r,ref:t})});BE.displayName=VE;var $E="DropdownMenuSeparator",Wh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(wE,{...o,...r,ref:t})});Wh.displayName=$E;var UE="DropdownMenuArrow",GE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(RE,{...o,...r,ref:t})});GE.displayName=UE;var HE="DropdownMenuSubTrigger",zE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(SE,{...o,...r,ref:t})});zE.displayName=HE;var WE="DropdownMenuSubContent",qE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(CE,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qE.displayName=WE;var KE=Fh,XE=Bh,YE=$h,ZE=Gh,QE=Hh,JE=zh,eb=Wh,tb="Label",qh=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(h.Primitive.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));qh.displayName=tb;var[wa]=he("Form"),Ra="Form",[nb,Yn]=wa(Ra),[rb,Kh]=wa(Ra),Xh=v.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,s=v.useRef(null),c=h.useComposedRefs(t,s),[l,u]=v.useState({}),i=v.useCallback(j=>l[j],[l]),a=v.useCallback((j,A)=>u(I=>({...I,[j]:{...I[j]??{},...A}})),[]),f=v.useCallback(j=>{u(A=>({...A,[j]:void 0})),E(A=>({...A,[j]:{}}))},[]),[d,p]=v.useState({}),g=v.useCallback(j=>d[j]??[],[d]),m=v.useCallback((j,A)=>{p(I=>({...I,[j]:[...I[j]??[],A]}))},[]),x=v.useCallback((j,A)=>{p(I=>({...I,[j]:(I[j]??[]).filter(F=>F.id!==A)}))},[]),[y,E]=v.useState({}),b=v.useCallback(j=>y[j]??{},[y]),R=v.useCallback((j,A)=>{E(I=>({...I,[j]:{...I[j]??{},...A}}))},[]),[w,P]=v.useState({}),C=v.useCallback((j,A)=>{P(I=>{const F=new Set(I[j]).add(A);return{...I,[j]:F}})},[]),_=v.useCallback((j,A)=>{P(I=>{const F=new Set(I[j]);return F.delete(A),{...I,[j]:F}})},[]),M=v.useCallback(j=>Array.from(w[j]??[]).join(" ")||void 0,[w]);return h.jsxRuntimeExports.jsx(nb,{scope:n,getFieldValidity:i,onFieldValidityChange:a,getFieldCustomMatcherEntries:g,onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:x,getFieldCustomErrors:b,onFieldCustomErrorsChange:R,onFieldValiditionClear:f,children:h.jsxRuntimeExports.jsx(rb,{scope:n,onFieldMessageIdAdd:C,onFieldMessageIdRemove:_,getFieldDescription:M,children:h.jsxRuntimeExports.jsx(h.Primitive.form,{...o,ref:c,onInvalid:N(e.onInvalid,j=>{const A=ep(j.currentTarget);A===j.target&&A.focus(),j.preventDefault()}),onSubmit:N(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:N(e.onReset,r)})})})});Xh.displayName=Ra;var Sa="FormField",[ob,Ca]=wa(Sa),Yh=v.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...s}=e,l=Yn(Sa,n).getFieldValidity(r),u=ge();return h.jsxRuntimeExports.jsx(ob,{scope:n,id:u,name:r,serverInvalid:o,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-valid":ja(l,o),"data-invalid":Pa(l,o),...s,ref:t})})});Yh.displayName=Sa;var ls="FormLabel",Zh=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Yn(ls,n),s=Ca(ls,n),c=r.htmlFor||s.id,l=o.getFieldValidity(s.name);return h.jsxRuntimeExports.jsx(qh,{"data-valid":ja(l,s.serverInvalid),"data-invalid":Pa(l,s.serverInvalid),...r,ref:t,htmlFor:c})});Zh.displayName=ls;var uo="FormControl",Qh=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Yn(uo,n),s=Ca(uo,n),c=Kh(uo,n),l=v.useRef(null),u=h.useComposedRefs(t,l),i=r.name||s.name,a=r.id||s.id,f=o.getFieldCustomMatcherEntries(i),{onFieldValidityChange:d,onFieldCustomErrorsChange:p,onFieldValiditionClear:g}=o,m=v.useCallback(async E=>{if(tp(E.validity)){const I=Pi(E.validity);d(i,I);return}const b=E.form?new FormData(E.form):new FormData,R=[E.value,b],w=[],P=[];f.forEach(I=>{hb(I,R)?P.push(I):pb(I)&&w.push(I)});const C=w.map(({id:I,match:F})=>[I,F(...R)]),_=Object.fromEntries(C),M=Object.values(_).some(Boolean),j=M;E.setCustomValidity(j?In:"");const A=Pi(E.validity);if(d(i,A),p(i,_),!M&&P.length>0){const I=P.map(({id:$,match:V})=>V(...R).then(T=>[$,T])),F=await Promise.all(I),B=Object.fromEntries(F),U=Object.values(B).some(Boolean);E.setCustomValidity(U?In:"");const G=Pi(E.validity);d(i,G),p(i,B)}},[f,i,p,d]);v.useEffect(()=>{const E=l.current;if(E){const b=()=>m(E);return E.addEventListener("change",b),()=>E.removeEventListener("change",b)}},[m]);const x=v.useCallback(()=>{const E=l.current;E&&(E.setCustomValidity(""),g(i))},[i,g]);v.useEffect(()=>{var b;const E=(b=l.current)==null?void 0:b.form;if(E)return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)},[x]),v.useEffect(()=>{const E=l.current,b=E==null?void 0:E.closest("form");if(b&&s.serverInvalid){const R=ep(b);R===E&&R.focus()}},[s.serverInvalid]);const y=o.getFieldValidity(i);return h.jsxRuntimeExports.jsx(h.Primitive.input,{"data-valid":ja(y,s.serverInvalid),"data-invalid":Pa(y,s.serverInvalid),"aria-invalid":s.serverInvalid?!0:void 0,"aria-describedby":c.getFieldDescription(i),title:"",...r,ref:u,id:a,name:i,onInvalid:N(e.onInvalid,E=>{const b=E.currentTarget;m(b)}),onChange:N(e.onChange,E=>{x()})})});Qh.displayName=uo;var In="This value is not valid",ib={badInput:In,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},Zn="FormMessage",Jh=v.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,s=Ca(Zn,e.__scopeForm),c=r??s.name;return n===void 0?h.jsxRuntimeExports.jsx(_a,{...o,ref:t,name:c,children:e.children||In}):typeof n=="function"?h.jsxRuntimeExports.jsx(ab,{match:n,...o,ref:t,name:c}):h.jsxRuntimeExports.jsx(sb,{match:n,...o,ref:t,name:c})});Jh.displayName=Zn;var sb=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:s,...c}=e,u=Yn(Zn,c.__scopeForm).getFieldValidity(o);return r||(u==null?void 0:u[n])?h.jsxRuntimeExports.jsx(_a,{ref:t,...c,name:o,children:s??ib[n]}):null}),ab=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:s,children:c,...l}=e,u=Yn(Zn,l.__scopeForm),i=v.useRef(null),a=h.useComposedRefs(t,i),f=ge(),d=s??f,p=v.useMemo(()=>({id:d,match:n}),[d,n]),{onFieldCustomMatcherEntryAdd:g,onFieldCustomMatcherEntryRemove:m}=u;v.useEffect(()=>(g(o,p),()=>m(o,p.id)),[p,o,g,m]);const x=u.getFieldValidity(o),E=u.getFieldCustomErrors(o)[d];return r||x&&!tp(x)&&E?h.jsxRuntimeExports.jsx(_a,{id:d,ref:a,...l,name:o,children:c??In}):null}),_a=v.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...s}=e,c=Kh(Zn,n),l=ge(),u=r??l,{onFieldMessageIdAdd:i,onFieldMessageIdRemove:a}=c;return v.useEffect(()=>(i(o,u),()=>a(o,u)),[o,u,i,a]),h.jsxRuntimeExports.jsx(h.Primitive.span,{id:u,...s,ref:t})}),cb="FormSubmit",ub=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"submit",...r,ref:t})});ub.displayName=cb;function Pi(e){const t={};for(const n in e)t[n]=e[n];return t}function lb(e){return e instanceof HTMLElement}function fb(e){return"validity"in e}function db(e){return fb(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function ep(e){const t=e.elements,[n]=Array.from(t).filter(lb).filter(db);return n}function hb(e,t){return e.match.constructor.name==="AsyncFunction"||mb(e.match,t)}function pb(e){return e.match.constructor.name==="Function"}function mb(e,t){return e(...t)instanceof Promise}function tp(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function ja(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function Pa(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}var gb=Xh,xb=Yh,vb=Zh,yb=Qh,Eb=Jh;function Ro(e,[t,n]){return Math.min(n,Math.max(t,e))}var Qo="Popover",[np]=he(Qo,[dt]),Qn=dt(),[bb,Mt]=np(Qo),rp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=Qn(t),u=v.useRef(null),[i,a]=v.useState(!1),[f,d]=we({prop:r,defaultProp:o??!1,onChange:s,caller:Qo});return h.jsxRuntimeExports.jsx(Wo,{...l,children:h.jsxRuntimeExports.jsx(bb,{scope:t,contentId:ge(),triggerRef:u,open:f,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:i,onCustomAnchorAdd:v.useCallback(()=>a(!0),[]),onCustomAnchorRemove:v.useCallback(()=>a(!1),[]),modal:c,children:n})})};rp.displayName=Qo;var op="PopoverAnchor",wb=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(op,n),s=Qn(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return v.useEffect(()=>(c(),()=>l()),[c,l]),h.jsxRuntimeExports.jsx(Wn,{...s,...r,ref:t})});wb.displayName=op;var ip="PopoverTrigger",Rb=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(ip,n),s=Qn(n),c=h.useComposedRefs(t,o.triggerRef),l=h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cp(o.open),...r,ref:c,onClick:N(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:h.jsxRuntimeExports.jsx(Wn,{asChild:!0,...s,children:l})});Rb.displayName=ip;var Sb="PopoverPortal",[DM,Cb]=np(Sb,{forceMount:void 0}),Xt="PopoverContent",_b=v.forwardRef((e,t)=>{const n=Cb(Xt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Mt(Xt,e.__scopePopover);return h.jsxRuntimeExports.jsx(Re,{present:r||s.open,children:s.modal?h.jsxRuntimeExports.jsx(Pb,{...o,ref:t}):h.jsxRuntimeExports.jsx(Tb,{...o,ref:t})})});_b.displayName=Xt;var jb=h.createSlot("PopoverContent.RemoveScroll"),Pb=v.forwardRef((e,t)=>{const n=Mt(Xt,e.__scopePopover),r=v.useRef(null),o=h.useComposedRefs(t,r),s=v.useRef(!1);return v.useEffect(()=>{const c=r.current;if(c)return Vo(c)},[]),h.jsxRuntimeExports.jsx(Un,{as:jb,allowPinchZoom:!0,children:h.jsxRuntimeExports.jsx(sp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,c=>{var l;c.preventDefault(),s.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,i=l.button===2||u;s.current=i},{checkForDefaultPrevented:!1}),onFocusOutside:N(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),Tb=v.forwardRef((e,t)=>{const n=Mt(Xt,e.__scopePopover),r=v.useRef(!1),o=v.useRef(!1);return h.jsxRuntimeExports.jsx(sp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,i;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),sp=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:i,onInteractOutside:a,...f}=e,d=Mt(Xt,n),p=Qn(n);return Lo(),h.jsxRuntimeExports.jsx($n,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:i,onDismiss:()=>d.onOpenChange(!1),children:h.jsxRuntimeExports.jsx(qo,{"data-state":cp(d.open),role:"dialog",id:d.contentId,...p,...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)"}})})})}),ap="PopoverClose",Ab=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Mt(ap,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});Ab.displayName=ap;var Ob="PopoverArrow",Mb=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Qn(n);return h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t})});Mb.displayName=Ob;function cp(e){return e?"open":"closed"}var Ib=rp,Ta="Progress",Aa=100,[Db]=he(Ta),[Nb,kb]=Db(Ta),up=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=Lb,...c}=e;(o||o===0)&&!Kc(o)&&console.error(Fb(`${o}`,"Progress"));const l=Kc(o)?o:Aa;r!==null&&!Xc(r,l)&&console.error(Vb(`${r}`,"Progress"));const u=Xc(r,l)?r:null,i=So(u)?s(u,l):void 0;return h.jsxRuntimeExports.jsx(Nb,{scope:n,value:u,max:l,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":So(u)?u:void 0,"aria-valuetext":i,role:"progressbar","data-state":dp(u,l),"data-value":u??void 0,"data-max":l,...c,ref:t})})});up.displayName=Ta;var lp="ProgressIndicator",fp=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=kb(lp,n);return h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":dp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fp.displayName=lp;function Lb(e,t){return`${Math.round(e/t*100)}%`}function dp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function So(e){return typeof e=="number"}function Kc(e){return So(e)&&!isNaN(e)&&e>0}function Xc(e,t){return So(e)&&!isNaN(e)&&e<=t&&e>=0}function Fb(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Aa}\`.`}function Vb(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
61
+ */var Vc;function uy(){return Vc||(Vc=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}function t(p,m){a||o.startTransition===void 0||(a=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=m();if(!d){var x=m();i(g,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}x=c({inst:{value:g,getSnapshot:m}});var y=x[0].inst,E=x[1];return u(function(){y.value=g,y.getSnapshot=m,n(y)&&E({inst:y})},[p,g,m]),l(function(){return n(y)&&E({inst:y}),p(function(){n(y)&&E({inst:y})})},[p]),s(g),g}function n(p){var m=p.getSnapshot;p=p.value;try{var g=m();return!i(p,g)}catch{return!0}}function r(p,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,c=o.useState,l=o.useEffect,u=o.useLayoutEffect,s=o.useDebugValue,a=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Pi.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Pi}var Bc;function ly(){return Bc||(Bc=1,process.env.NODE_ENV==="production"?mr.exports=cy():mr.exports=uy()),mr.exports}var dy=ly();function fy(){return dy.useSyncExternalStore(hy,()=>!0,()=>!1)}function hy(){return()=>{}}var ua="Avatar",[py]=fe(ua),[my,Lf]=py(ua),Ff=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=v.useState("idle");return h.jsxRuntimeExports.jsx(my,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{...r,ref:t})})});Ff.displayName=ua;var Vf="AvatarImage",Bf=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,c=Lf(Vf,n),l=gy(r,i),u=Be(s=>{o(s),c.onImageLoadingStatusChange(s)});return h.useLayoutEffect2(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?h.jsxRuntimeExports.jsx(h.Primitive.img,{...i,ref:t,src:r}):null});Bf.displayName=Vf;var $f="AvatarFallback",Uf=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=Lf($f,n),[c,l]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(u)}},[r]),c&&i.imageLoadingStatus!=="loaded"?h.jsxRuntimeExports.jsx(h.Primitive.span,{...o,ref:t}):null});Uf.displayName=$f;function $c(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function gy(e,{referrerPolicy:t,crossOrigin:n}){const r=fy(),o=v.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[c,l]=v.useState(()=>$c(i,e));return h.useLayoutEffect2(()=>{l($c(i,e))},[i,e]),h.useLayoutEffect2(()=>{const u=d=>()=>{l(d)};if(!i)return;const s=u("loaded"),a=u("error");return i.addEventListener("load",s),i.addEventListener("error",a),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",s),i.removeEventListener("error",a)}},[i,n,t]),c}var xy=Ff,vy=Bf,yy=Uf;function zn(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Hn(e){const[t,n]=v.useState(void 0);return h.useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let c,l;if("borderBoxSize"in i){const u=i.borderBoxSize,s=Array.isArray(u)?u[0]:u;c=s.inlineSize,l=s.blockSize}else c=e.offsetWidth,l=e.offsetHeight;n({width:c,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Go="Checkbox",[Ey]=fe(Go),[by,la]=Ey(Go);function wy(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:c,name:l,onCheckedChange:u,required:s,value:a="on",internal_do_not_use_render:d}=e,[f,p]=me({prop:n,defaultProp:o??!1,onChange:u,caller:Go}),[m,g]=v.useState(null),[x,y]=v.useState(null),E=v.useRef(!1),b=m?!!c||!!m.closest("form"):!0,w={checked:f,disabled:i,setChecked:p,control:m,setControl:g,name:l,form:c,value:a,hasConsumerStoppedPropagationRef:E,required:s,defaultChecked:ct(o)?!1:o,isFormControl:b,bubbleInput:x,setBubbleInput:y};return h.jsxRuntimeExports.jsx(by,{scope:t,...w,children:Sy(d)?d(w):r})}var Gf="CheckboxTrigger",zf=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:c,disabled:l,checked:u,required:s,setControl:a,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=la(Gf,e),g=h.useComposedRefs(o,a),x=v.useRef(u);return v.useEffect(()=>{const y=i==null?void 0:i.form;if(y){const E=()=>d(x.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[i,d]),h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"checkbox","aria-checked":ct(u)?"mixed":u,"aria-required":s,"data-state":Xf(u),"data-disabled":l?"":void 0,disabled:l,value:c,...r,ref:g,onKeyDown:N(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:N(n,y=>{d(E=>ct(E)?!0:!E),m&&p&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})})});zf.displayName=Gf;var Hf=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:c,disabled:l,value:u,onCheckedChange:s,form:a,...d}=e;return h.jsxRuntimeExports.jsx(wy,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:l,required:c,onCheckedChange:s,name:r,form:a,value:u,internal_do_not_use_render:({isFormControl:f})=>h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(zf,{...d,ref:t,__scopeCheckbox:n}),f&&h.jsxRuntimeExports.jsx(Kf,{__scopeCheckbox:n})]})})});Hf.displayName=Go;var Wf="CheckboxIndicator",Ry=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=la(Wf,n);return h.jsxRuntimeExports.jsx(Re,{present:r||ct(i.checked)||i.checked===!0,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":Xf(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Ry.displayName=Wf;var qf="CheckboxBubbleInput",Kf=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:c,required:l,disabled:u,name:s,value:a,form:d,bubbleInput:f,setBubbleInput:p}=la(qf,e),m=h.useComposedRefs(n,p),g=zn(i),x=Hn(r);v.useEffect(()=>{const E=f;if(!E)return;const b=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(b,"checked").set,_=!o.current;if(g!==i&&R){const j=new Event("click",{bubbles:_});E.indeterminate=ct(i),R.call(E,ct(i)?!1:i),E.dispatchEvent(j)}},[f,g,i,o]);const y=v.useRef(ct(i)?!1:i);return h.jsxRuntimeExports.jsx(h.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??y.current,required:l,disabled:u,name:s,value:a,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Kf.displayName=qf;function Sy(e){return typeof e=="function"}function ct(e){return e==="indeterminate"}function Xf(e){return ct(e)?"indeterminate":e?"checked":"unchecked"}const Cy=["top","right","bottom","left"],ut=Math.min,je=Math.max,vo=Math.round,gr=Math.floor,qe=e=>({x:e,y:e}),_y={left:"right",right:"left",bottom:"top",top:"bottom"},jy={start:"end",end:"start"};function ls(e,t,n){return je(e,ut(t,n))}function et(e,t){return typeof e=="function"?e(t):e}function tt(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function da(e){return e==="x"?"y":"x"}function fa(e){return e==="y"?"height":"width"}const Py=new Set(["top","bottom"]);function We(e){return Py.has(tt(e))?"y":"x"}function ha(e){return da(We(e))}function Ty(e,t,n){n===void 0&&(n=!1);const r=nn(e),o=ha(e),i=fa(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=yo(c)),[c,yo(c)]}function Ay(e){const t=yo(e);return[ds(e),t,ds(t)]}function ds(e){return e.replace(/start|end/g,t=>jy[t])}const Uc=["left","right"],Gc=["right","left"],Oy=["top","bottom"],My=["bottom","top"];function Iy(e,t,n){switch(e){case"top":case"bottom":return n?t?Gc:Uc:t?Uc:Gc;case"left":case"right":return t?Oy:My;default:return[]}}function Dy(e,t,n,r){const o=nn(e);let i=Iy(tt(e),n==="start",r);return o&&(i=i.map(c=>c+"-"+o),t&&(i=i.concat(i.map(ds)))),i}function yo(e){return e.replace(/left|right|bottom|top/g,t=>_y[t])}function Ny(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yf(e){return typeof e!="number"?Ny(e):{top:e,right:e,bottom:e,left:e}}function Eo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function zc(e,t,n){let{reference:r,floating:o}=e;const i=We(t),c=ha(t),l=fa(c),u=tt(t),s=i==="y",a=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(u){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(nn(t)){case"start":p[c]-=f*(n&&s?-1:1);break;case"end":p[c]+=f*(n&&s?-1:1);break}return p}async function ky(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:c,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=et(t,e),m=Yf(p),x=l[f?d==="floating"?"reference":"floating":d],y=Eo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:a,strategy:u})),E=d==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),w=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},R=Eo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:b,strategy:u}):E);return{top:(y.top-R.top+m.top)/w.y,bottom:(R.bottom-y.bottom+m.bottom)/w.y,left:(y.left-R.left+m.left)/w.x,right:(R.right-y.right+m.right)/w.x}}const Ly=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,l=i.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let s=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:d}=zc(s,r,u),f=r,p={},m=0;for(let x=0;x<l.length;x++){var g;const{name:y,fn:E}=l[x],{x:b,y:w,data:R,reset:_}=await E({x:a,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:{...c,detectOverflow:(g=c.detectOverflow)!=null?g:ky},elements:{reference:e,floating:t}});a=b??a,d=w??d,p={...p,[y]:{...p[y],...R}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(s=_.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:a,y:d}=zc(s,f,u)),x=-1)}return{x:a,y:d,placement:f,strategy:o,middlewareData:p}},Fy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:c,elements:l,middlewareData:u}=t,{element:s,padding:a=0}=et(e,t)||{};if(s==null)return{};const d=Yf(a),f={x:n,y:r},p=ha(o),m=fa(p),g=await c.getDimensions(s),x=p==="y",y=x?"top":"left",E=x?"bottom":"right",b=x?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],R=f[p]-i.reference[p],_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(s));let j=_?_[b]:0;(!j||!await(c.isElement==null?void 0:c.isElement(_)))&&(j=l.floating[b]||i.floating[m]);const P=w/2-R/2,T=j/2-g[m]/2-1,C=ut(d[y],T),O=ut(d[E],T),I=C,k=j-g[m]-O,B=j/2-g[m]/2+P,q=ls(I,B,k),U=!u.arrow&&nn(o)!=null&&B!==q&&i.reference[m]/2-(B<I?C:O)-g[m]/2<0,G=U?B<I?B-I:B-k:0;return{[p]:f[p]+G,data:{[p]:q,centerOffset:B-q-G,...U&&{alignmentOffset:G}},reset:U}}}),Vy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:l,platform:u,elements:s}=t,{mainAxis:a=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...x}=et(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=tt(o),E=We(l),b=tt(l)===l,w=await(u.isRTL==null?void 0:u.isRTL(s.floating)),R=f||(b||!g?[yo(l)]:Ay(l)),_=m!=="none";!f&&_&&R.push(...Dy(l,g,m,w));const j=[l,...R],P=await u.detectOverflow(t,x),T=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(a&&T.push(P[y]),d){const B=Ty(o,c,w);T.push(P[B[0]],P[B[1]])}if(C=[...C,{placement:o,overflows:T}],!T.every(B=>B<=0)){var O,I;const B=(((O=i.flip)==null?void 0:O.index)||0)+1,q=j[B];if(q&&(!(d==="alignment"?E!==We(q):!1)||C.every($=>We($.placement)===E?$.overflows[0]>0:!0)))return{data:{index:B,overflows:C},reset:{placement:q}};let U=(I=C.filter(G=>G.overflows[0]<=0).sort((G,$)=>G.overflows[1]-$.overflows[1])[0])==null?void 0:I.placement;if(!U)switch(p){case"bestFit":{var k;const G=(k=C.filter($=>{if(_){const V=We($.placement);return V===E||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,A)=>V+A,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:k[0];G&&(U=G);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Hc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wc(e){return Cy.some(t=>e[t]>=0)}const By=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=et(e,t);switch(o){case"referenceHidden":{const c=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=Hc(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Wc(l)}}}case"escaped":{const c=await r.detectOverflow(t,{...i,altBoundary:!0}),l=Hc(c,n.floating);return{data:{escapedOffsets:l,escaped:Wc(l)}}}default:return{}}}}},Zf=new Set(["left","top"]);async function $y(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=tt(n),l=nn(n),u=We(n)==="y",s=Zf.has(c)?-1:1,a=i&&u?-1:1,d=et(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),u?{x:p*a,y:f*s}:{x:f*s,y:p*a}}const Uy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:l}=t,u=await $y(t,e);return c===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:c}}}}},Gy=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:u={fn:y=>{let{x:E,y:b}=y;return{x:E,y:b}}},...s}=et(e,t),a={x:n,y:r},d=await i.detectOverflow(t,s),f=We(tt(o)),p=da(f);let m=a[p],g=a[f];if(c){const y=p==="y"?"top":"left",E=p==="y"?"bottom":"right",b=m+d[y],w=m-d[E];m=ls(b,m,w)}if(l){const y=f==="y"?"top":"left",E=f==="y"?"bottom":"right",b=g+d[y],w=g-d[E];g=ls(b,g,w)}const x=u.fn({...t,[p]:m,[f]:g});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:c,[f]:l}}}}}},zy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:l=0,mainAxis:u=!0,crossAxis:s=!0}=et(e,t),a={x:n,y:r},d=We(o),f=da(d);let p=a[f],m=a[d];const g=et(l,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const b=f==="y"?"height":"width",w=i.reference[f]-i.floating[b]+x.mainAxis,R=i.reference[f]+i.reference[b]-x.mainAxis;p<w?p=w:p>R&&(p=R)}if(s){var y,E;const b=f==="y"?"width":"height",w=Zf.has(tt(o)),R=i.reference[d]-i.floating[b]+(w&&((y=c.offset)==null?void 0:y[d])||0)+(w?0:x.crossAxis),_=i.reference[d]+i.reference[b]+(w?0:((E=c.offset)==null?void 0:E[d])||0)-(w?x.crossAxis:0);m<R?m=R:m>_&&(m=_)}return{[f]:p,[d]:m}}}},Hy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:c,elements:l}=t,{apply:u=()=>{},...s}=et(e,t),a=await c.detectOverflow(t,s),d=tt(o),f=nn(o),p=We(o)==="y",{width:m,height:g}=i.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=f===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,x=f==="end"?"top":"bottom");const E=g-a.top-a.bottom,b=m-a.left-a.right,w=ut(g-a[x],E),R=ut(m-a[y],b),_=!t.middlewareData.shift;let j=w,P=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=E),_&&!f){const C=je(a.left,0),O=je(a.right,0),I=je(a.top,0),k=je(a.bottom,0);p?P=m-2*(C!==0||O!==0?C+O:je(a.left,a.right)):j=g-2*(I!==0||k!==0?I+k:je(a.top,a.bottom))}await u({...t,availableWidth:P,availableHeight:j});const T=await c.getDimensions(l.floating);return m!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function zo(){return typeof window<"u"}function rn(e){return Qf(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(Qf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qf(e){return zo()?e instanceof Node||e instanceof Pe(e).Node:!1}function $e(e){return zo()?e instanceof Element||e instanceof Pe(e).Element:!1}function Ye(e){return zo()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function qc(e){return!zo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}const Wy=new Set(["inline","contents"]);function Wn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Wy.has(o)}const qy=new Set(["table","td","th"]);function Ky(e){return qy.has(rn(e))}const Xy=[":popover-open",":modal"];function Ho(e){return Xy.some(t=>{try{return e.matches(t)}catch{return!1}})}const Yy=["transform","translate","scale","rotate","perspective"],Zy=["transform","translate","scale","rotate","perspective","filter"],Qy=["paint","layout","strict","content"];function pa(e){const t=ma(),n=$e(e)?Ue(e):e;return Yy.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zy.some(r=>(n.willChange||"").includes(r))||Qy.some(r=>(n.contain||"").includes(r))}function Jy(e){let t=lt(e);for(;Ye(t)&&!Zt(t);){if(pa(t))return t;if(Ho(t))return null;t=lt(t)}return null}function ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eE=new Set(["html","body","#document"]);function Zt(e){return eE.has(rn(e))}function Ue(e){return Pe(e).getComputedStyle(e)}function Wo(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lt(e){if(rn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qc(e)&&e.host||Qe(e);return qc(t)?t.host:t}function Jf(e){const t=lt(e);return Zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&Wn(t)?t:Jf(t)}function On(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jf(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),c=Pe(o);if(i){const l=fs(c);return t.concat(c,c.visualViewport||[],Wn(o)?o:[],l&&n?On(l):[])}return t.concat(o,On(o,[],n))}function fs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eh(e){const t=Ue(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,l=vo(n)!==i||vo(r)!==c;return l&&(n=i,r=c),{width:n,height:r,$:l}}function ga(e){return $e(e)?e:e.contextElement}function Xt(e){const t=ga(e);if(!Ye(t))return qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=eh(t);let c=(i?vo(n.width):n.width)/r,l=(i?vo(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}const tE=qe(0);function th(e){const t=Pe(e);return!ma()||!t.visualViewport?tE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function Pt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ga(e);let c=qe(1);t&&(r?$e(r)&&(c=Xt(r)):c=Xt(e));const l=nE(i,n,r)?th(i):qe(0);let u=(o.left+l.x)/c.x,s=(o.top+l.y)/c.y,a=o.width/c.x,d=o.height/c.y;if(i){const f=Pe(i),p=r&&$e(r)?Pe(r):r;let m=f,g=fs(m);for(;g&&r&&p!==m;){const x=Xt(g),y=g.getBoundingClientRect(),E=Ue(g),b=y.left+(g.clientLeft+parseFloat(E.paddingLeft))*x.x,w=y.top+(g.clientTop+parseFloat(E.paddingTop))*x.y;u*=x.x,s*=x.y,a*=x.x,d*=x.y,u+=b,s+=w,m=Pe(g),g=fs(m)}}return Eo({width:a,height:d,x:u,y:s})}function qo(e,t){const n=Wo(e).scrollLeft;return t?t.left+n:Pt(Qe(e)).left+n}function nh(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rE(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",c=Qe(r),l=t?Ho(t.floating):!1;if(r===c||l&&i)return n;let u={scrollLeft:0,scrollTop:0},s=qe(1);const a=qe(0),d=Ye(r);if((d||!d&&!i)&&((rn(r)!=="body"||Wn(c))&&(u=Wo(r)),Ye(r))){const p=Pt(r);s=Xt(r),a.x=p.x+r.clientLeft,a.y=p.y+r.clientTop}const f=c&&!d&&!i?nh(c,u):qe(0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+a.x+f.x,y:n.y*s.y-u.scrollTop*s.y+a.y+f.y}}function oE(e){return Array.from(e.getClientRects())}function iE(e){const t=Qe(e),n=Wo(e),r=e.ownerDocument.body,o=je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+qo(e);const l=-n.scrollTop;return Ue(r).direction==="rtl"&&(c+=je(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:l}}const Kc=25;function sE(e,t){const n=Pe(e),r=Qe(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,l=0,u=0;if(o){i=o.width,c=o.height;const a=ma();(!a||a&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const s=qo(r);if(s<=0){const a=r.ownerDocument,d=a.body,f=getComputedStyle(d),p=a.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-p);m<=Kc&&(i-=m)}else s<=Kc&&(i+=s);return{width:i,height:c,x:l,y:u}}const aE=new Set(["absolute","fixed"]);function cE(e,t){const n=Pt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ye(e)?Xt(e):qe(1),c=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,s=r*i.y;return{width:c,height:l,x:u,y:s}}function Xc(e,t,n){let r;if(t==="viewport")r=sE(e,n);else if(t==="document")r=iE(Qe(e));else if($e(t))r=cE(t,n);else{const o=th(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Eo(r)}function rh(e,t){const n=lt(e);return n===t||!$e(n)||Zt(n)?!1:Ue(n).position==="fixed"||rh(n,t)}function uE(e,t){const n=t.get(e);if(n)return n;let r=On(e,[],!1).filter(l=>$e(l)&&rn(l)!=="body"),o=null;const i=Ue(e).position==="fixed";let c=i?lt(e):e;for(;$e(c)&&!Zt(c);){const l=Ue(c),u=pa(c);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&aE.has(o.position)||Wn(c)&&!u&&rh(e,c))?r=r.filter(a=>a!==c):o=l,c=lt(c)}return t.set(e,r),r}function lE(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?Ho(t)?[]:uE(t,this._c):[].concat(n),r],l=c[0],u=c.reduce((s,a)=>{const d=Xc(t,a,o);return s.top=je(d.top,s.top),s.right=ut(d.right,s.right),s.bottom=ut(d.bottom,s.bottom),s.left=je(d.left,s.left),s},Xc(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function dE(e){const{width:t,height:n}=eh(e);return{width:t,height:n}}function fE(e,t,n){const r=Ye(t),o=Qe(t),i=n==="fixed",c=Pt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=qe(0);function s(){u.x=qo(o)}if(r||!r&&!i)if((rn(t)!=="body"||Wn(o))&&(l=Wo(t)),r){const p=Pt(t,!0,i,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&s();i&&!r&&o&&s();const a=o&&!r&&!i?nh(o,l):qe(0),d=c.left+l.scrollLeft-u.x-a.x,f=c.top+l.scrollTop-u.y-a.y;return{x:d,y:f,width:c.width,height:c.height}}function Ti(e){return Ue(e).position==="static"}function Yc(e,t){if(!Ye(e)||Ue(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qe(e)===n&&(n=n.ownerDocument.body),n}function oh(e,t){const n=Pe(e);if(Ho(e))return n;if(!Ye(e)){let o=lt(e);for(;o&&!Zt(o);){if($e(o)&&!Ti(o))return o;o=lt(o)}return n}let r=Yc(e,t);for(;r&&Ky(r)&&Ti(r);)r=Yc(r,t);return r&&Zt(r)&&Ti(r)&&!pa(r)?n:r||Jy(e)||n}const hE=async function(e){const t=this.getOffsetParent||oh,n=this.getDimensions,r=await n(e.floating);return{reference:fE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pE(e){return Ue(e).direction==="rtl"}const mE={convertOffsetParentRelativeRectToViewportRelativeRect:rE,getDocumentElement:Qe,getClippingRect:lE,getOffsetParent:oh,getElementRects:hE,getClientRects:oE,getDimensions:dE,getScale:Xt,isElement:$e,isRTL:pE};function ih(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gE(e,t){let n=null,r;const o=Qe(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function c(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const s=e.getBoundingClientRect(),{left:a,top:d,width:f,height:p}=s;if(l||t(),!f||!p)return;const m=gr(d),g=gr(o.clientWidth-(a+f)),x=gr(o.clientHeight-(d+p)),y=gr(a),b={rootMargin:-m+"px "+-g+"px "+-x+"px "+-y+"px",threshold:je(0,ut(1,u))||1};let w=!0;function R(_){const j=_[0].intersectionRatio;if(j!==u){if(!w)return c();j?c(!1,j):r=setTimeout(()=>{c(!1,1e-7)},1e3)}j===1&&!ih(s,e.getBoundingClientRect())&&c(),w=!1}try{n=new IntersectionObserver(R,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,b)}n.observe(e)}return c(!0),i}function xE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,s=ga(e),a=o||i?[...s?On(s):[],...On(t)]:[];a.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=s&&l?gE(s,n):null;let f=-1,p=null;c&&(p=new ResizeObserver(y=>{let[E]=y;E&&E.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),s&&!u&&p.observe(s),p.observe(t));let m,g=u?Pt(e):null;u&&x();function x(){const y=Pt(e);g&&!ih(g,y)&&n(),g=y,m=requestAnimationFrame(x)}return n(),()=>{var y;a.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const vE=Uy,yE=Gy,EE=Vy,bE=Hy,wE=By,Zc=Fy,RE=zy,SE=(e,t,n)=>{const r=new Map,o={platform:mE,...n},i={...o.platform,_c:r};return Ly(e,t,{...o,platform:i})};var CE=typeof document<"u",_E=function(){},uo=CE?S.useLayoutEffect:_E;function bo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!bo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!bo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function sh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qc(e,t){const n=sh(e);return Math.round(t*n)/n}function Ai(e){const t=v.useRef(e);return uo(()=>{t.current=e}),t}function jE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:c}={},transform:l=!0,whileElementsMounted:u,open:s}=e,[a,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);bo(f,r)||p(r);const[m,g]=v.useState(null),[x,y]=v.useState(null),E=v.useCallback($=>{$!==_.current&&(_.current=$,g($))},[]),b=v.useCallback($=>{$!==j.current&&(j.current=$,y($))},[]),w=i||m,R=c||x,_=v.useRef(null),j=v.useRef(null),P=v.useRef(a),T=u!=null,C=Ai(u),O=Ai(o),I=Ai(s),k=v.useCallback(()=>{if(!_.current||!j.current)return;const $={placement:t,strategy:n,middleware:f};O.current&&($.platform=O.current),SE(_.current,j.current,$).then(V=>{const A={...V,isPositioned:I.current!==!1};B.current&&!bo(P.current,A)&&(P.current=A,Js.flushSync(()=>{d(A)}))})},[f,t,n,O,I]);uo(()=>{s===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[s]);const B=v.useRef(!1);uo(()=>(B.current=!0,()=>{B.current=!1}),[]),uo(()=>{if(w&&(_.current=w),R&&(j.current=R),w&&R){if(C.current)return C.current(w,R,k);k()}},[w,R,k,C,T]);const q=v.useMemo(()=>({reference:_,floating:j,setReference:E,setFloating:b}),[E,b]),U=v.useMemo(()=>({reference:w,floating:R}),[w,R]),G=v.useMemo(()=>{const $={position:n,left:0,top:0};if(!U.floating)return $;const V=Qc(U.floating,a.x),A=Qc(U.floating,a.y);return l?{...$,transform:"translate("+V+"px, "+A+"px)",...sh(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:A}},[n,l,U.floating,a.x,a.y]);return v.useMemo(()=>({...a,update:k,refs:q,elements:U,floatingStyles:G}),[a,k,q,U,G])}const PE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Zc({element:r.current,padding:o}).fn(n):{}:r?Zc({element:r,padding:o}).fn(n):{}}}},TE=(e,t)=>({...vE(e),options:[e,t]}),AE=(e,t)=>({...yE(e),options:[e,t]}),OE=(e,t)=>({...RE(e),options:[e,t]}),ME=(e,t)=>({...EE(e),options:[e,t]}),IE=(e,t)=>({...bE(e),options:[e,t]}),DE=(e,t)=>({...wE(e),options:[e,t]}),NE=(e,t)=>({...PE(e),options:[e,t]});var kE="Arrow",ah=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return h.jsxRuntimeExports.jsx(h.Primitive.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});ah.displayName=kE;var LE=ah,xa="Popper",[ch,pt]=fe(xa),[FE,uh]=ch(xa),lh=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return h.jsxRuntimeExports.jsx(FE,{scope:t,anchor:r,onAnchorChange:o,children:n})};lh.displayName=xa;var dh="PopperAnchor",fh=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=uh(dh,n),c=v.useRef(null),l=h.useComposedRefs(t,c),u=v.useRef(null);return v.useEffect(()=>{const s=u.current;u.current=(r==null?void 0:r.current)||c.current,s!==u.current&&i.onAnchorChange(u.current)}),r?null:h.jsxRuntimeExports.jsx(h.Primitive.div,{...o,ref:l})});fh.displayName=dh;var va="PopperContent",[VE,BE]=ch(va),hh=v.forwardRef((e,t)=>{var L,W,K,H,J,D;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:s=[],collisionPadding:a=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,x=uh(va,n),[y,E]=v.useState(null),b=h.useComposedRefs(t,ae=>E(ae)),[w,R]=v.useState(null),_=Hn(w),j=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,T=r+(i!=="center"?"-"+i:""),C=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},O=Array.isArray(s)?s:[s],I=O.length>0,k={padding:C,boundary:O.filter(UE),altBoundary:I},{refs:B,floatingStyles:q,placement:U,isPositioned:G,middlewareData:$}=jE({strategy:"fixed",placement:T,whileElementsMounted:(...ae)=>xE(...ae,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[TE({mainAxis:o+P,alignmentAxis:c}),u&&AE({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?OE():void 0,...k}),u&&ME({...k}),IE({...k,apply:({elements:ae,rects:ye,availableWidth:ot,availableHeight:fn})=>{const{width:hn,height:lv}=ye.reference,ur=ae.floating.style;ur.setProperty("--radix-popper-available-width",`${ot}px`),ur.setProperty("--radix-popper-available-height",`${fn}px`),ur.setProperty("--radix-popper-anchor-width",`${hn}px`),ur.setProperty("--radix-popper-anchor-height",`${lv}px`)}}),w&&NE({element:w,padding:l}),GE({arrowWidth:j,arrowHeight:P}),f&&DE({strategy:"referenceHidden",...k})]}),[V,A]=gh(U),F=Be(m);h.useLayoutEffect2(()=>{G&&(F==null||F())},[G,F]);const Y=(L=$.arrow)==null?void 0:L.x,Q=(W=$.arrow)==null?void 0:W.y,X=((K=$.arrow)==null?void 0:K.centerOffset)!==0,[ee,Z]=v.useState();return h.useLayoutEffect2(()=>{y&&Z(window.getComputedStyle(y).zIndex)},[y]),h.jsxRuntimeExports.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(H=$.transformOrigin)==null?void 0:H.x,(J=$.transformOrigin)==null?void 0:J.y].join(" "),...((D=$.hide)==null?void 0:D.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsxRuntimeExports.jsx(VE,{scope:n,placedSide:V,onArrowChange:R,arrowX:Y,arrowY:Q,shouldHideArrow:X,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-side":V,"data-align":A,...g,ref:b,style:{...g.style,animation:G?void 0:"none"}})})})});hh.displayName=va;var ph="PopperArrow",$E={top:"bottom",right:"left",bottom:"top",left:"right"},mh=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=BE(ph,r),c=$E[i.placedSide];return h.jsxRuntimeExports.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:h.jsxRuntimeExports.jsx(LE,{...o,ref:n,style:{...o.style,display:"block"}})})});mh.displayName=ph;function UE(e){return e!==null}var GE=e=>({name:"transformOrigin",options:e,fn(t){var x,y,E;const{placement:n,rects:r,middlewareData:o}=t,c=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[s,a]=gh(n),d={start:"0%",center:"50%",end:"100%"}[a],f=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((E=o.arrow)==null?void 0:E.y)??0)+u/2;let m="",g="";return s==="bottom"?(m=c?d:`${f}px`,g=`${-u}px`):s==="top"?(m=c?d:`${f}px`,g=`${r.floating.height+u}px`):s==="right"?(m=`${-u}px`,g=c?d:`${p}px`):s==="left"&&(m=`${r.floating.width+u}px`,g=c?d:`${p}px`),{data:{x:m,y:g}}}});function gh(e){const[t,n="center"]=e.split("-");return[t,n]}var Ko=lh,qn=fh,Xo=hh,Yo=mh,Oi="rovingFocusGroup.onEntryFocus",zE={bubbles:!1,cancelable:!0},Kn="RovingFocusGroup",[hs,xh,HE]=$n(Kn),[WE,mt]=fe(Kn,[HE]),[qE,KE]=WE(Kn),vh=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(hs.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsxRuntimeExports.jsx(hs.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsxRuntimeExports.jsx(XE,{...e,ref:t})})}));vh.displayName=Kn;var XE=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,preventScrollOnEntryFocus:a=!1,...d}=e,f=v.useRef(null),p=h.useComposedRefs(t,f),m=ht(i),[g,x]=me({prop:c,defaultProp:l??null,onChange:u,caller:Kn}),[y,E]=v.useState(!1),b=Be(s),w=xh(n),R=v.useRef(!1),[_,j]=v.useState(0);return v.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(Oi,b),()=>P.removeEventListener(Oi,b)},[b]),h.jsxRuntimeExports.jsx(qE,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:g,onItemFocus:v.useCallback(P=>x(P),[x]),onItemShiftTab:v.useCallback(()=>E(!0),[]),onFocusableItemAdd:v.useCallback(()=>j(P=>P+1),[]),onFocusableItemRemove:v.useCallback(()=>j(P=>P-1),[]),children:h.jsxRuntimeExports.jsx(h.Primitive.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:N(e.onMouseDown,()=>{R.current=!0}),onFocus:N(e.onFocus,P=>{const T=!R.current;if(P.target===P.currentTarget&&T&&!y){const C=new CustomEvent(Oi,zE);if(P.currentTarget.dispatchEvent(C),!C.defaultPrevented){const O=w().filter(U=>U.focusable),I=O.find(U=>U.active),k=O.find(U=>U.id===g),q=[I,k,...O].filter(Boolean).map(U=>U.ref.current);bh(q,a)}}R.current=!1}),onBlur:N(e.onBlur,()=>E(!1))})})}),yh="RovingFocusGroupItem",Eh=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:c,...l}=e,u=xe(),s=i||u,a=KE(yh,n),d=a.currentTabStopId===s,f=xh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:g}=a;return v.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),h.jsxRuntimeExports.jsx(hs.ItemSlot,{scope:n,id:s,focusable:r,active:o,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{tabIndex:d?0:-1,"data-orientation":a.orientation,...l,ref:t,onMouseDown:N(e.onMouseDown,x=>{r?a.onItemFocus(s):x.preventDefault()}),onFocus:N(e.onFocus,()=>a.onItemFocus(s)),onKeyDown:N(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){a.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=QE(x,a.orientation,a.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=f().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const w=b.indexOf(x.currentTarget);b=a.loop?JE(b,w+1):b.slice(w+1)}setTimeout(()=>bh(b))}}),children:typeof c=="function"?c({isCurrentTabStop:d,hasTabStop:g!=null}):c})})});Eh.displayName=yh;var YE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function QE(e,t,n){const r=ZE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return YE[r]}function bh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function JE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zo=vh,Qo=Eh,ps=["Enter"," "],eb=["ArrowDown","PageUp","Home"],wh=["ArrowUp","PageDown","End"],tb=[...eb,...wh],nb={ltr:[...ps,"ArrowRight"],rtl:[...ps,"ArrowLeft"]},rb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Xn="Menu",[Mn,ob,ib]=$n(Xn),[It,Rh]=fe(Xn,[ib,pt,mt]),Jo=pt(),Sh=mt(),[sb,Dt]=It(Xn),[ab,Yn]=It(Xn),Ch=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:c=!0}=e,l=Jo(t),[u,s]=v.useState(null),a=v.useRef(!1),d=Be(i),f=ht(o);return v.useEffect(()=>{const p=()=>{a.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>a.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),h.jsxRuntimeExports.jsx(Ko,{...l,children:h.jsxRuntimeExports.jsx(sb,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s,children:h.jsxRuntimeExports.jsx(ab,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:a,dir:f,modal:c,children:r})})})};Ch.displayName=Xn;var cb="MenuAnchor",ya=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Jo(n);return h.jsxRuntimeExports.jsx(qn,{...o,...r,ref:t})});ya.displayName=cb;var Ea="MenuPortal",[ub,_h]=It(Ea,{forceMount:void 0}),jh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Dt(Ea,t);return h.jsxRuntimeExports.jsx(ub,{scope:t,forceMount:n,children:h.jsxRuntimeExports.jsx(Re,{present:n||i.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:r})})})};jh.displayName=Ea;var Ie="MenuContent",[lb,ba]=It(Ie),Ph=v.forwardRef((e,t)=>{const n=_h(Ie,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Dt(Ie,e.__scopeMenu),c=Yn(Ie,e.__scopeMenu);return h.jsxRuntimeExports.jsx(Mn.Provider,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(Re,{present:r||i.open,children:h.jsxRuntimeExports.jsx(Mn.Slot,{scope:e.__scopeMenu,children:c.modal?h.jsxRuntimeExports.jsx(db,{...o,ref:t}):h.jsxRuntimeExports.jsx(fb,{...o,ref:t})})})})}),db=v.forwardRef((e,t)=>{const n=Dt(Ie,e.__scopeMenu),r=v.useRef(null),o=h.useComposedRefs(t,r);return v.useEffect(()=>{const i=r.current;if(i)return $o(i)},[]),h.jsxRuntimeExports.jsx(wa,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:N(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),fb=v.forwardRef((e,t)=>{const n=Dt(Ie,e.__scopeMenu);return h.jsxRuntimeExports.jsx(wa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hb=h.createSlot("MenuContent.ScrollLock"),wa=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...g}=e,x=Dt(Ie,n),y=Yn(Ie,n),E=Jo(n),b=Sh(n),w=ob(n),[R,_]=v.useState(null),j=v.useRef(null),P=h.useComposedRefs(t,j,x.onContentChange),T=v.useRef(0),C=v.useRef(""),O=v.useRef(0),I=v.useRef(null),k=v.useRef("right"),B=v.useRef(0),q=m?Gn:v.Fragment,U=m?{as:hb,allowPinchZoom:!0}:void 0,G=V=>{var L,W;const A=C.current+V,F=w().filter(K=>!K.disabled),Y=document.activeElement,Q=(L=F.find(K=>K.ref.current===Y))==null?void 0:L.textValue,X=F.map(K=>K.textValue),ee=Cb(X,A,Q),Z=(W=F.find(K=>K.textValue===ee))==null?void 0:W.ref.current;(function K(H){C.current=H,window.clearTimeout(T.current),H!==""&&(T.current=window.setTimeout(()=>K(""),1e3))})(A),Z&&setTimeout(()=>Z.focus())};v.useEffect(()=>()=>window.clearTimeout(T.current),[]),Vo();const $=v.useCallback(V=>{var F,Y;return k.current===((F=I.current)==null?void 0:F.side)&&jb(V,(Y=I.current)==null?void 0:Y.area)},[]);return h.jsxRuntimeExports.jsx(lb,{scope:n,searchRef:C,onItemEnter:v.useCallback(V=>{$(V)&&V.preventDefault()},[$]),onItemLeave:v.useCallback(V=>{var A;$(V)||((A=j.current)==null||A.focus(),_(null))},[$]),onTriggerLeave:v.useCallback(V=>{$(V)&&V.preventDefault()},[$]),pointerGraceTimerRef:O,onPointerGraceIntentChange:v.useCallback(V=>{I.current=V},[]),children:h.jsxRuntimeExports.jsx(q,{...U,children:h.jsxRuntimeExports.jsx(Un,{asChild:!0,trapped:o,onMountAutoFocus:N(i,V=>{var A;V.preventDefault(),(A=j.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:h.jsxRuntimeExports.jsx(tn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:h.jsxRuntimeExports.jsx(Zo,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:_,onEntryFocus:N(u,V=>{y.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsxRuntimeExports.jsx(Xo,{role:"menu","aria-orientation":"vertical","data-state":zh(x.open),"data-radix-menu-content":"",dir:y.dir,...E,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:N(g.onKeyDown,V=>{const F=V.target.closest("[data-radix-menu-content]")===V.currentTarget,Y=V.ctrlKey||V.altKey||V.metaKey,Q=V.key.length===1;F&&(V.key==="Tab"&&V.preventDefault(),!Y&&Q&&G(V.key));const X=j.current;if(V.target!==X||!tb.includes(V.key))return;V.preventDefault();const Z=w().filter(L=>!L.disabled).map(L=>L.ref.current);wh.includes(V.key)&&Z.reverse(),Rb(Z)}),onBlur:N(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(T.current),C.current="")}),onPointerMove:N(e.onPointerMove,In(V=>{const A=V.target,F=B.current!==V.clientX;if(V.currentTarget.contains(A)&&F){const Y=V.clientX>B.current?"right":"left";k.current=Y,B.current=V.clientX}}))})})})})})})});Ph.displayName=Ie;var pb="MenuGroup",Ra=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"group",...r,ref:t})});Ra.displayName=pb;var mb="MenuLabel",Th=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{...r,ref:t})});Th.displayName=mb;var wo="MenuItem",Jc="menu.itemSelect",ei=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=v.useRef(null),c=Yn(wo,e.__scopeMenu),l=ba(wo,e.__scopeMenu),u=h.useComposedRefs(t,i),s=v.useRef(!1),a=()=>{const d=i.current;if(!n&&d){const f=new CustomEvent(Jc,{bubbles:!0,cancelable:!0});d.addEventListener(Jc,p=>r==null?void 0:r(p),{once:!0}),h.dispatchDiscreteCustomEvent(d,f),f.defaultPrevented?s.current=!1:c.onClose()}};return h.jsxRuntimeExports.jsx(Ah,{...o,ref:u,disabled:n,onClick:N(e.onClick,a),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),s.current=!0},onPointerUp:N(e.onPointerUp,d=>{var f;s.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:N(e.onKeyDown,d=>{const f=l.searchRef.current!=="";n||f&&d.key===" "||ps.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});ei.displayName=wo;var Ah=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,c=ba(wo,n),l=Sh(n),u=v.useRef(null),s=h.useComposedRefs(t,u),[a,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[i.children]),h.jsxRuntimeExports.jsx(Mn.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:h.jsxRuntimeExports.jsx(Qo,{asChild:!0,...l,focusable:!r,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:s,onPointerMove:N(e.onPointerMove,In(m=>{r?c.onItemLeave(m):(c.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:N(e.onPointerLeave,In(m=>c.onItemLeave(m))),onFocus:N(e.onFocus,()=>d(!0)),onBlur:N(e.onBlur,()=>d(!1))})})})}),gb="MenuCheckboxItem",Oh=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsxRuntimeExports.jsx(kh,{scope:e.__scopeMenu,checked:n,children:h.jsxRuntimeExports.jsx(ei,{role:"menuitemcheckbox","aria-checked":Ro(n)?"mixed":n,...o,ref:t,"data-state":Ca(n),onSelect:N(o.onSelect,()=>r==null?void 0:r(Ro(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Oh.displayName=gb;var Mh="MenuRadioGroup",[xb,vb]=It(Mh,{value:void 0,onValueChange:()=>{}}),Ih=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Be(r);return h.jsxRuntimeExports.jsx(xb,{scope:e.__scopeMenu,value:n,onValueChange:i,children:h.jsxRuntimeExports.jsx(Ra,{...o,ref:t})})});Ih.displayName=Mh;var Dh="MenuRadioItem",Nh=v.forwardRef((e,t)=>{const{value:n,...r}=e,o=vb(Dh,e.__scopeMenu),i=n===o.value;return h.jsxRuntimeExports.jsx(kh,{scope:e.__scopeMenu,checked:i,children:h.jsxRuntimeExports.jsx(ei,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Ca(i),onSelect:N(r.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,n)},{checkForDefaultPrevented:!1})})})});Nh.displayName=Dh;var Sa="MenuItemIndicator",[kh,yb]=It(Sa,{checked:!1}),Lh=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=yb(Sa,n);return h.jsxRuntimeExports.jsx(Re,{present:r||Ro(i.checked)||i.checked===!0,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{...o,ref:t,"data-state":Ca(i.checked)})})});Lh.displayName=Sa;var Eb="MenuSeparator",Fh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Fh.displayName=Eb;var bb="MenuArrow",Vh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Jo(n);return h.jsxRuntimeExports.jsx(Yo,{...o,...r,ref:t})});Vh.displayName=bb;var wb="MenuSub",[uI,Bh]=It(wb),Rn="MenuSubTrigger",$h=v.forwardRef((e,t)=>{const n=Dt(Rn,e.__scopeMenu),r=Yn(Rn,e.__scopeMenu),o=Bh(Rn,e.__scopeMenu),i=ba(Rn,e.__scopeMenu),c=v.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=i,s={__scopeMenu:e.__scopeMenu},a=v.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return v.useEffect(()=>a,[a]),v.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),u(null)}},[l,u]),h.jsxRuntimeExports.jsx(ya,{asChild:!0,...s,children:h.jsxRuntimeExports.jsx(Ah,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":zh(n.open),...e,ref:h.composeRefs(t,o.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:N(e.onPointerMove,In(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:N(e.onPointerLeave,In(d=>{var p,m;a();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const g=(m=n.content)==null?void 0:m.dataset.side,x=g==="right",y=x?-5:5,E=f[x?"left":"right"],b=f[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:E,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x:E,y:f.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:N(e.onKeyDown,d=>{var p;const f=i.searchRef.current!=="";e.disabled||f&&d.key===" "||nb[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});$h.displayName=Rn;var Uh="MenuSubContent",Gh=v.forwardRef((e,t)=>{const n=_h(Ie,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Dt(Ie,e.__scopeMenu),c=Yn(Ie,e.__scopeMenu),l=Bh(Uh,e.__scopeMenu),u=v.useRef(null),s=h.useComposedRefs(t,u);return h.jsxRuntimeExports.jsx(Mn.Provider,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(Re,{present:r||i.open,children:h.jsxRuntimeExports.jsx(Mn.Slot,{scope:e.__scopeMenu,children:h.jsxRuntimeExports.jsx(wa,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:s,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var d;c.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:N(e.onFocusOutside,a=>{a.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:N(e.onEscapeKeyDown,a=>{c.onClose(),a.preventDefault()}),onKeyDown:N(e.onKeyDown,a=>{var p;const d=a.currentTarget.contains(a.target),f=rb[c.dir].includes(a.key);d&&f&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),a.preventDefault())})})})})})});Gh.displayName=Uh;function zh(e){return e?"open":"closed"}function Ro(e){return e==="indeterminate"}function Ca(e){return Ro(e)?"indeterminate":e?"checked":"unchecked"}function Rb(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Sb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Cb(e,t,n){const o=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Sb(e,Math.max(i,0));o.length===1&&(c=c.filter(s=>s!==n));const u=c.find(s=>s.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function _b(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const l=t[i],u=t[c],s=l.x,a=l.y,d=u.x,f=u.y;a>r!=f>r&&n<(d-s)*(r-a)/(f-a)+s&&(o=!o)}return o}function jb(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return _b(n,t)}function In(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Pb=Ch,Tb=ya,Ab=jh,Ob=Ph,Mb=Ra,Ib=Th,Db=ei,Nb=Oh,kb=Ih,Lb=Nh,Fb=Lh,Vb=Fh,Bb=Vh,$b=$h,Ub=Gh,ti="DropdownMenu",[Gb]=fe(ti,[Rh]),Se=Rh(),[zb,Hh]=Gb(ti),Wh=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:c,modal:l=!0}=e,u=Se(t),s=v.useRef(null),[a,d]=me({prop:o,defaultProp:i??!1,onChange:c,caller:ti});return h.jsxRuntimeExports.jsx(zb,{scope:t,triggerId:xe(),triggerRef:s,contentId:xe(),open:a,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:l,children:h.jsxRuntimeExports.jsx(Pb,{...u,open:a,onOpenChange:d,dir:r,modal:l,children:n})})};Wh.displayName=ti;var qh="DropdownMenuTrigger",Kh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Hh(qh,n),c=Se(n);return h.jsxRuntimeExports.jsx(Tb,{asChild:!0,...c,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:h.composeRefs(t,i.triggerRef),onPointerDown:N(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:N(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Kh.displayName=qh;var Hb="DropdownMenuPortal",Xh=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Se(t);return h.jsxRuntimeExports.jsx(Ab,{...r,...n})};Xh.displayName=Hb;var Yh="DropdownMenuContent",Zh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Hh(Yh,n),i=Se(n),c=v.useRef(!1);return h.jsxRuntimeExports.jsx(Ob,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:N(e.onCloseAutoFocus,l=>{var u;c.current||(u=o.triggerRef.current)==null||u.focus(),c.current=!1,l.preventDefault()}),onInteractOutside:N(e.onInteractOutside,l=>{const u=l.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0,a=u.button===2||s;(!o.modal||a)&&(c.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)"}})});Zh.displayName=Yh;var Wb="DropdownMenuGroup",qb=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Mb,{...o,...r,ref:t})});qb.displayName=Wb;var Kb="DropdownMenuLabel",Qh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Ib,{...o,...r,ref:t})});Qh.displayName=Kb;var Xb="DropdownMenuItem",Jh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Db,{...o,...r,ref:t})});Jh.displayName=Xb;var Yb="DropdownMenuCheckboxItem",Zb=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Nb,{...o,...r,ref:t})});Zb.displayName=Yb;var Qb="DropdownMenuRadioGroup",Jb=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(kb,{...o,...r,ref:t})});Jb.displayName=Qb;var e1="DropdownMenuRadioItem",t1=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Lb,{...o,...r,ref:t})});t1.displayName=e1;var n1="DropdownMenuItemIndicator",r1=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Fb,{...o,...r,ref:t})});r1.displayName=n1;var o1="DropdownMenuSeparator",ep=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Vb,{...o,...r,ref:t})});ep.displayName=o1;var i1="DropdownMenuArrow",s1=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Bb,{...o,...r,ref:t})});s1.displayName=i1;var a1="DropdownMenuSubTrigger",c1=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx($b,{...o,...r,ref:t})});c1.displayName=a1;var u1="DropdownMenuSubContent",l1=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Se(n);return h.jsxRuntimeExports.jsx(Ub,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});l1.displayName=u1;var d1=Wh,f1=Kh,h1=Xh,p1=Zh,m1=Qh,g1=Jh,x1=ep,v1="Label",tp=v.forwardRef((e,t)=>h.jsxRuntimeExports.jsx(h.Primitive.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));tp.displayName=v1;var[_a]=fe("Form"),ja="Form",[y1,Zn]=_a(ja),[E1,np]=_a(ja),rp=v.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,i=v.useRef(null),c=h.useComposedRefs(t,i),[l,u]=v.useState({}),s=v.useCallback(C=>l[C],[l]),a=v.useCallback((C,O)=>u(I=>({...I,[C]:{...I[C]??{},...O}})),[]),d=v.useCallback(C=>{u(O=>({...O,[C]:void 0})),E(O=>({...O,[C]:{}}))},[]),[f,p]=v.useState({}),m=v.useCallback(C=>f[C]??[],[f]),g=v.useCallback((C,O)=>{p(I=>({...I,[C]:[...I[C]??[],O]}))},[]),x=v.useCallback((C,O)=>{p(I=>({...I,[C]:(I[C]??[]).filter(k=>k.id!==O)}))},[]),[y,E]=v.useState({}),b=v.useCallback(C=>y[C]??{},[y]),w=v.useCallback((C,O)=>{E(I=>({...I,[C]:{...I[C]??{},...O}}))},[]),[R,_]=v.useState({}),j=v.useCallback((C,O)=>{_(I=>{const k=new Set(I[C]).add(O);return{...I,[C]:k}})},[]),P=v.useCallback((C,O)=>{_(I=>{const k=new Set(I[C]);return k.delete(O),{...I,[C]:k}})},[]),T=v.useCallback(C=>Array.from(R[C]??[]).join(" ")||void 0,[R]);return h.jsxRuntimeExports.jsx(y1,{scope:n,getFieldValidity:s,onFieldValidityChange:a,getFieldCustomMatcherEntries:m,onFieldCustomMatcherEntryAdd:g,onFieldCustomMatcherEntryRemove:x,getFieldCustomErrors:b,onFieldCustomErrorsChange:w,onFieldValiditionClear:d,children:h.jsxRuntimeExports.jsx(E1,{scope:n,onFieldMessageIdAdd:j,onFieldMessageIdRemove:P,getFieldDescription:T,children:h.jsxRuntimeExports.jsx(h.Primitive.form,{...o,ref:c,onInvalid:N(e.onInvalid,C=>{const O=cp(C.currentTarget);O===C.target&&O.focus(),C.preventDefault()}),onSubmit:N(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:N(e.onReset,r)})})})});rp.displayName=ja;var Pa="FormField",[b1,Ta]=_a(Pa),op=v.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...i}=e,l=Zn(Pa,n).getFieldValidity(r),u=xe();return h.jsxRuntimeExports.jsx(b1,{scope:n,id:u,name:r,serverInvalid:o,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-valid":Oa(l,o),"data-invalid":Ma(l,o),...i,ref:t})})});op.displayName=Pa;var ms="FormLabel",ip=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Zn(ms,n),i=Ta(ms,n),c=r.htmlFor||i.id,l=o.getFieldValidity(i.name);return h.jsxRuntimeExports.jsx(tp,{"data-valid":Oa(l,i.serverInvalid),"data-invalid":Ma(l,i.serverInvalid),...r,ref:t,htmlFor:c})});ip.displayName=ms;var lo="FormControl",sp=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Zn(lo,n),i=Ta(lo,n),c=np(lo,n),l=v.useRef(null),u=h.useComposedRefs(t,l),s=r.name||i.name,a=r.id||i.id,d=o.getFieldCustomMatcherEntries(s),{onFieldValidityChange:f,onFieldCustomErrorsChange:p,onFieldValiditionClear:m}=o,g=v.useCallback(async E=>{if(up(E.validity)){const I=Mi(E.validity);f(s,I);return}const b=E.form?new FormData(E.form):new FormData,w=[E.value,b],R=[],_=[];d.forEach(I=>{A1(I,w)?_.push(I):O1(I)&&R.push(I)});const j=R.map(({id:I,match:k})=>[I,k(...w)]),P=Object.fromEntries(j),T=Object.values(P).some(Boolean),C=T;E.setCustomValidity(C?Dn:"");const O=Mi(E.validity);if(f(s,O),p(s,P),!T&&_.length>0){const I=_.map(({id:$,match:V})=>V(...w).then(A=>[$,A])),k=await Promise.all(I),B=Object.fromEntries(k),U=Object.values(B).some(Boolean);E.setCustomValidity(U?Dn:"");const G=Mi(E.validity);f(s,G),p(s,B)}},[d,s,p,f]);v.useEffect(()=>{const E=l.current;if(E){const b=()=>g(E);return E.addEventListener("change",b),()=>E.removeEventListener("change",b)}},[g]);const x=v.useCallback(()=>{const E=l.current;E&&(E.setCustomValidity(""),m(s))},[s,m]);v.useEffect(()=>{var b;const E=(b=l.current)==null?void 0:b.form;if(E)return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)},[x]),v.useEffect(()=>{const E=l.current,b=E==null?void 0:E.closest("form");if(b&&i.serverInvalid){const w=cp(b);w===E&&w.focus()}},[i.serverInvalid]);const y=o.getFieldValidity(s);return h.jsxRuntimeExports.jsx(h.Primitive.input,{"data-valid":Oa(y,i.serverInvalid),"data-invalid":Ma(y,i.serverInvalid),"aria-invalid":i.serverInvalid?!0:void 0,"aria-describedby":c.getFieldDescription(s),title:"",...r,ref:u,id:a,name:s,onInvalid:N(e.onInvalid,E=>{const b=E.currentTarget;g(b)}),onChange:N(e.onChange,E=>{x()})})});sp.displayName=lo;var Dn="This value is not valid",w1={badInput:Dn,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},Qn="FormMessage",ap=v.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,i=Ta(Qn,e.__scopeForm),c=r??i.name;return n===void 0?h.jsxRuntimeExports.jsx(Aa,{...o,ref:t,name:c,children:e.children||Dn}):typeof n=="function"?h.jsxRuntimeExports.jsx(S1,{match:n,...o,ref:t,name:c}):h.jsxRuntimeExports.jsx(R1,{match:n,...o,ref:t,name:c})});ap.displayName=Qn;var R1=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:i,...c}=e,u=Zn(Qn,c.__scopeForm).getFieldValidity(o);return r||(u==null?void 0:u[n])?h.jsxRuntimeExports.jsx(Aa,{ref:t,...c,name:o,children:i??w1[n]}):null}),S1=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:i,children:c,...l}=e,u=Zn(Qn,l.__scopeForm),s=v.useRef(null),a=h.useComposedRefs(t,s),d=xe(),f=i??d,p=v.useMemo(()=>({id:f,match:n}),[f,n]),{onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:g}=u;v.useEffect(()=>(m(o,p),()=>g(o,p.id)),[p,o,m,g]);const x=u.getFieldValidity(o),E=u.getFieldCustomErrors(o)[f];return r||x&&!up(x)&&E?h.jsxRuntimeExports.jsx(Aa,{id:f,ref:a,...l,name:o,children:c??Dn}):null}),Aa=v.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...i}=e,c=np(Qn,n),l=xe(),u=r??l,{onFieldMessageIdAdd:s,onFieldMessageIdRemove:a}=c;return v.useEffect(()=>(s(o,u),()=>a(o,u)),[o,u,s,a]),h.jsxRuntimeExports.jsx(h.Primitive.span,{id:u,...i,ref:t})}),C1="FormSubmit",_1=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"submit",...r,ref:t})});_1.displayName=C1;function Mi(e){const t={};for(const n in e)t[n]=e[n];return t}function j1(e){return e instanceof HTMLElement}function P1(e){return"validity"in e}function T1(e){return P1(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function cp(e){const t=e.elements,[n]=Array.from(t).filter(j1).filter(T1);return n}function A1(e,t){return e.match.constructor.name==="AsyncFunction"||M1(e.match,t)}function O1(e){return e.match.constructor.name==="Function"}function M1(e,t){return e(...t)instanceof Promise}function up(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function Oa(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function Ma(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}var I1=rp,D1=op,N1=ip,k1=sp,L1=ap;function So(e,[t,n]){return Math.min(n,Math.max(t,e))}var ni="Popover",[lp]=fe(ni,[pt]),Jn=pt(),[F1,Nt]=lp(ni),dp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:c=!1}=e,l=Jn(t),u=v.useRef(null),[s,a]=v.useState(!1),[d,f]=me({prop:r,defaultProp:o??!1,onChange:i,caller:ni});return h.jsxRuntimeExports.jsx(Ko,{...l,children:h.jsxRuntimeExports.jsx(F1,{scope:t,contentId:xe(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:s,onCustomAnchorAdd:v.useCallback(()=>a(!0),[]),onCustomAnchorRemove:v.useCallback(()=>a(!1),[]),modal:c,children:n})})};dp.displayName=ni;var fp="PopoverAnchor",V1=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Nt(fp,n),i=Jn(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return v.useEffect(()=>(c(),()=>l()),[c,l]),h.jsxRuntimeExports.jsx(qn,{...i,...r,ref:t})});V1.displayName=fp;var hp="PopoverTrigger",B1=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Nt(hp,n),i=Jn(n),c=h.useComposedRefs(t,o.triggerRef),l=h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gp(o.open),...r,ref:c,onClick:N(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:h.jsxRuntimeExports.jsx(qn,{asChild:!0,...i,children:l})});B1.displayName=hp;var $1="PopoverPortal",[lI,U1]=lp($1,{forceMount:void 0}),Qt="PopoverContent",G1=v.forwardRef((e,t)=>{const n=U1(Qt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Nt(Qt,e.__scopePopover);return h.jsxRuntimeExports.jsx(Re,{present:r||i.open,children:i.modal?h.jsxRuntimeExports.jsx(H1,{...o,ref:t}):h.jsxRuntimeExports.jsx(W1,{...o,ref:t})})});G1.displayName=Qt;var z1=h.createSlot("PopoverContent.RemoveScroll"),H1=v.forwardRef((e,t)=>{const n=Nt(Qt,e.__scopePopover),r=v.useRef(null),o=h.useComposedRefs(t,r),i=v.useRef(!1);return v.useEffect(()=>{const c=r.current;if(c)return $o(c)},[]),h.jsxRuntimeExports.jsx(Gn,{as:z1,allowPinchZoom:!0,children:h.jsxRuntimeExports.jsx(pp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,c=>{var l;c.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,s=l.button===2||u;i.current=s},{checkForDefaultPrevented:!1}),onFocusOutside:N(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),W1=v.forwardRef((e,t)=>{const n=Nt(Qt,e.__scopePopover),r=v.useRef(!1),o=v.useRef(!1);return h.jsxRuntimeExports.jsx(pp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,s;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)==null?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),pp=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:s,onInteractOutside:a,...d}=e,f=Nt(Qt,n),p=Jn(n);return Vo(),h.jsxRuntimeExports.jsx(Un,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:h.jsxRuntimeExports.jsx(tn,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:s,onDismiss:()=>f.onOpenChange(!1),children:h.jsxRuntimeExports.jsx(Xo,{"data-state":gp(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.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)"}})})})}),mp="PopoverClose",q1=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Nt(mp,n);return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});q1.displayName=mp;var K1="PopoverArrow",X1=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Jn(n);return h.jsxRuntimeExports.jsx(Yo,{...o,...r,ref:t})});X1.displayName=K1;function gp(e){return e?"open":"closed"}var Y1=dp,Ia="Progress",Da=100,[Z1]=fe(Ia),[Q1,J1]=Z1(Ia),xp=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=ew,...c}=e;(o||o===0)&&!eu(o)&&console.error(tw(`${o}`,"Progress"));const l=eu(o)?o:Da;r!==null&&!tu(r,l)&&console.error(nw(`${r}`,"Progress"));const u=tu(r,l)?r:null,s=Co(u)?i(u,l):void 0;return h.jsxRuntimeExports.jsx(Q1,{scope:n,value:u,max:l,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Co(u)?u:void 0,"aria-valuetext":s,role:"progressbar","data-state":Ep(u,l),"data-value":u??void 0,"data-max":l,...c,ref:t})})});xp.displayName=Ia;var vp="ProgressIndicator",yp=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=J1(vp,n);return h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":Ep(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});yp.displayName=vp;function ew(e,t){return`${Math.round(e/t*100)}%`}function Ep(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Co(e){return typeof e=="number"}function eu(e){return Co(e)&&!isNaN(e)&&e>0}function tu(e,t){return Co(e)&&!isNaN(e)&&e<=t&&e>=0}function tw(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Da}\`.`}function nw(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
62
62
  - a positive number
63
- - less than the value passed to \`max\` (or ${Aa} if no \`max\` prop is set)
63
+ - less than the value passed to \`max\` (or ${Da} if no \`max\` prop is set)
64
64
  - \`null\` or \`undefined\` if the progress is indeterminate.
65
65
 
66
- Defaulting to \`null\`.`}var Bb=up,$b=fp,Oa="Radio",[Ub,hp]=he(Oa),[Gb,Hb]=Ub(Oa),pp=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:c,value:l="on",onCheck:u,form:i,...a}=e,[f,d]=v.useState(null),p=h.useComposedRefs(t,x=>d(x)),g=v.useRef(!1),m=f?i||!!f.closest("form"):!0;return h.jsxRuntimeExports.jsxs(Gb,{scope:n,checked:o,disabled:c,children:[h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"radio","aria-checked":o,"data-state":vp(o),"data-disabled":c?"":void 0,disabled:c,value:l,...a,ref:p,onClick:N(e.onClick,x=>{o||u==null||u(),m&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),m&&h.jsxRuntimeExports.jsx(xp,{control:f,bubbles:!g.current,name:r,value:l,checked:o,required:s,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});pp.displayName=Oa;var mp="RadioIndicator",gp=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=Hb(mp,n);return h.jsxRuntimeExports.jsx(Re,{present:r||s.checked,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":vp(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});gp.displayName=mp;var zb="RadioBubbleInput",xp=v.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const c=v.useRef(null),l=h.useComposedRefs(c,s),u=Gn(n),i=Hn(t);return v.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&p){const g=new Event("click",{bubbles:r});p.call(a,n),a.dispatchEvent(g)}},[u,n,r]),h.jsxRuntimeExports.jsx(h.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});xp.displayName=zb;function vp(e){return e?"checked":"unchecked"}var Wb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Jo="RadioGroup",[qb]=he(Jo,[tn,hp]),yp=tn(),Ep=hp(),[Kb,Xb]=qb(Jo),bp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:c=!1,disabled:l=!1,orientation:u,dir:i,loop:a=!0,onValueChange:f,...d}=e,p=yp(n),g=Tt(i),[m,x]=we({prop:s,defaultProp:o??null,onChange:f,caller:Jo});return h.jsxRuntimeExports.jsx(Kb,{scope:n,name:r,required:c,disabled:l,value:m,onValueChange:x,children:h.jsxRuntimeExports.jsx(ha,{asChild:!0,...p,orientation:u,dir:g,loop:a,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"radiogroup","aria-required":c,"aria-orientation":u,"data-disabled":l?"":void 0,dir:g,...d,ref:t})})})});bp.displayName=Jo;var wp="RadioGroupItem",Rp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=Xb(wp,n),c=s.disabled||r,l=yp(n),u=Ep(n),i=v.useRef(null),a=h.useComposedRefs(t,i),f=s.value===o.value,d=v.useRef(!1);return v.useEffect(()=>{const p=m=>{Wb.includes(m.key)&&(d.current=!0)},g=()=>d.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),h.jsxRuntimeExports.jsx(pa,{asChild:!0,...l,focusable:!c,active:f,children:h.jsxRuntimeExports.jsx(pp,{disabled:c,required:s.required,checked:f,...u,...o,name:s.name,ref:a,onCheck:()=>s.onValueChange(o.value),onKeyDown:N(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:N(o.onFocus,()=>{var p;d.current&&((p=i.current)==null||p.click())})})})});Rp.displayName=wp;var Yb="RadioGroupIndicator",Sp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Ep(n);return h.jsxRuntimeExports.jsx(gp,{...o,...r,ref:t})});Sp.displayName=Yb;var Zb=bp,Qb=Rp,Jb=Sp,ew=[" ","Enter","ArrowUp","ArrowDown"],tw=[" ","Enter"],Ct="Select",[ei,ti,nw]=Bn(Ct),[nn]=he(Ct,[nw,dt]),ni=dt(),[rw,ht]=nn(Ct),[ow,iw]=nn(Ct),Cp=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:c,defaultValue:l,onValueChange:u,dir:i,name:a,autoComplete:f,disabled:d,required:p,form:g}=e,m=ni(t),[x,y]=v.useState(null),[E,b]=v.useState(null),[R,w]=v.useState(!1),P=Tt(i),[C,_]=we({prop:r,defaultProp:o??!1,onChange:s,caller:Ct}),[M,j]=we({prop:c,defaultProp:l,onChange:u,caller:Ct}),A=v.useRef(null),I=x?g||!!x.closest("form"):!0,[F,B]=v.useState(new Set),q=Array.from(F).map(U=>U.props.value).join(";");return h.jsxRuntimeExports.jsx(Wo,{...m,children:h.jsxRuntimeExports.jsxs(rw,{required:p,scope:t,trigger:x,onTriggerChange:y,valueNode:E,onValueNodeChange:b,valueNodeHasChildren:R,onValueNodeHasChildrenChange:w,contentId:ge(),value:M,onValueChange:j,open:C,onOpenChange:_,dir:P,triggerPointerDownPosRef:A,disabled:d,children:[h.jsxRuntimeExports.jsx(ei.Provider,{scope:t,children:h.jsxRuntimeExports.jsx(ow,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{B(G=>new Set(G).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{B(G=>{const $=new Set(G);return $.delete(U),$})},[]),children:n})}),I?h.jsxRuntimeExports.jsxs(Hp,{"aria-hidden":!0,required:p,tabIndex:-1,name:a,autoComplete:f,value:M,onChange:U=>j(U.target.value),disabled:d,form:g,children:[M===void 0?h.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(F)]},q):null]})})};Cp.displayName=Ct;var _p="SelectTrigger",jp=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=ni(n),c=ht(_p,n),l=c.disabled||r,u=h.useComposedRefs(t,c.onTriggerChange),i=ti(n),a=v.useRef("touch"),[f,d,p]=Wp(m=>{const x=i().filter(b=>!b.disabled),y=x.find(b=>b.value===c.value),E=qp(x,m,y);E!==void 0&&c.onValueChange(E.value)}),g=m=>{l||(c.onOpenChange(!0),p()),m&&(c.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return h.jsxRuntimeExports.jsx(Wn,{asChild:!0,...s,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":zp(c.value)?"":void 0,...o,ref:u,onClick:N(o.onClick,m=>{m.currentTarget.focus(),a.current!=="mouse"&&g(m)}),onPointerDown:N(o.onPointerDown,m=>{a.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:N(o.onKeyDown,m=>{const x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(x&&m.key===" ")&&ew.includes(m.key)&&(g(),m.preventDefault())})})})});jp.displayName=_p;var Pp="SelectValue",Tp=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:c="",...l}=e,u=ht(Pp,n),{onValueNodeHasChildrenChange:i}=u,a=s!==void 0,f=h.useComposedRefs(t,u.onValueNodeChange);return h.useLayoutEffect2(()=>{i(a)},[i,a]),h.jsxRuntimeExports.jsx(h.Primitive.span,{...l,ref:f,style:{pointerEvents:"none"},children:zp(u.value)?h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:c}):s})});Tp.displayName=Pp;var sw="SelectIcon",Ap=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsxRuntimeExports.jsx(h.Primitive.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ap.displayName=sw;var aw="SelectPortal",Op=e=>h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,...e});Op.displayName=aw;var _t="SelectContent",Mp=v.forwardRef((e,t)=>{const n=ht(_t,e.__scopeSelect),[r,o]=v.useState();if(h.useLayoutEffect2(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?qs.createPortal(h.jsxRuntimeExports.jsx(Ip,{scope:e.__scopeSelect,children:h.jsxRuntimeExports.jsx(ei.Slot,{scope:e.__scopeSelect,children:h.jsxRuntimeExports.jsx("div",{children:e.children})})}),s):null}return h.jsxRuntimeExports.jsx(Dp,{...e,ref:t})});Mp.displayName=_t;var Le=10,[Ip,pt]=nn(_t),cw="SelectContentImpl",uw=h.createSlot("SelectContent.RemoveScroll"),Dp=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:u,align:i,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x,...y}=e,E=ht(_t,n),[b,R]=v.useState(null),[w,P]=v.useState(null),C=h.useComposedRefs(t,k=>R(k)),[_,M]=v.useState(null),[j,A]=v.useState(null),I=ti(n),[F,B]=v.useState(!1),q=v.useRef(!1);v.useEffect(()=>{if(b)return Vo(b)},[b]),Lo();const U=v.useCallback(k=>{const[W,...K]=I().map(D=>D.ref.current),[z]=K.slice(-1),J=document.activeElement;for(const D of k)if(D===J||(D==null||D.scrollIntoView({block:"nearest"}),D===W&&w&&(w.scrollTop=0),D===z&&w&&(w.scrollTop=w.scrollHeight),D==null||D.focus(),document.activeElement!==J))return},[I,w]),G=v.useCallback(()=>U([_,b]),[U,_,b]);v.useEffect(()=>{F&&G()},[F,G]);const{onOpenChange:$,triggerPointerDownPosRef:V}=E;v.useEffect(()=>{if(b){let k={x:0,y:0};const W=z=>{var J,D;k={x:Math.abs(Math.round(z.pageX)-(((J=V.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(z.pageY)-(((D=V.current)==null?void 0:D.y)??0))}},K=z=>{k.x<=10&&k.y<=10?z.preventDefault():b.contains(z.target)||$(!1),document.removeEventListener("pointermove",W),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",K,{capture:!0})}}},[b,$,V]),v.useEffect(()=>{const k=()=>$(!1);return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[$]);const[T,L]=Wp(k=>{const W=I().filter(J=>!J.disabled),K=W.find(J=>J.ref.current===document.activeElement),z=qp(W,k,K);z&&setTimeout(()=>z.ref.current.focus())}),Y=v.useCallback((k,W,K)=>{const z=!q.current&&!K;(E.value!==void 0&&E.value===W||z)&&(M(k),z&&(q.current=!0))},[E.value]),Q=v.useCallback(()=>b==null?void 0:b.focus(),[b]),X=v.useCallback((k,W,K)=>{const z=!q.current&&!K;(E.value!==void 0&&E.value===W||z)&&A(k)},[E.value]),ee=r==="popper"?fs:Np,Z=ee===fs?{side:l,sideOffset:u,align:i,alignOffset:a,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return h.jsxRuntimeExports.jsx(Ip,{scope:n,content:b,viewport:w,onViewportChange:P,itemRefCallback:Y,selectedItem:_,onItemLeave:Q,itemTextRefCallback:X,focusSelectedItem:G,selectedItemText:j,position:r,isPositioned:F,searchRef:T,children:h.jsxRuntimeExports.jsx(Un,{as:uw,allowPinchZoom:!0,children:h.jsxRuntimeExports.jsx($n,{asChild:!0,trapped:E.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:N(o,k=>{var W;(W=E.trigger)==null||W.focus({preventScroll:!0}),k.preventDefault()}),children:h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:h.jsxRuntimeExports.jsx(ee,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:k=>k.preventDefault(),...y,...Z,onPlaced:()=>B(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,k=>{const W=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!W&&k.key.length===1&&L(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let z=I().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(k.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const J=k.target,D=z.indexOf(J);z=z.slice(D+1)}setTimeout(()=>U(z)),k.preventDefault()}})})})})})})});Dp.displayName=cw;var lw="SelectItemAlignedPosition",Np=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ht(_t,n),c=pt(_t,n),[l,u]=v.useState(null),[i,a]=v.useState(null),f=h.useComposedRefs(t,C=>a(C)),d=ti(n),p=v.useRef(!1),g=v.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:y,focusSelectedItem:E}=c,b=v.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&i&&m&&x&&y){const C=s.trigger.getBoundingClientRect(),_=i.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(s.dir!=="rtl"){const J=j.left-_.left,D=M.left-J,ae=C.left-D,ve=C.width+ae,rt=Math.max(ve,_.width),ln=window.innerWidth-Le,fn=Ro(D,[Le,Math.max(Le,ln-rt)]);l.style.minWidth=ve+"px",l.style.left=fn+"px"}else{const J=_.right-j.right,D=window.innerWidth-M.right-J,ae=window.innerWidth-C.right-D,ve=C.width+ae,rt=Math.max(ve,_.width),ln=window.innerWidth-Le,fn=Ro(D,[Le,Math.max(Le,ln-rt)]);l.style.minWidth=ve+"px",l.style.right=fn+"px"}const A=d(),I=window.innerHeight-Le*2,F=m.scrollHeight,B=window.getComputedStyle(i),q=parseInt(B.borderTopWidth,10),U=parseInt(B.paddingTop,10),G=parseInt(B.borderBottomWidth,10),$=parseInt(B.paddingBottom,10),V=q+U+F+$+G,T=Math.min(x.offsetHeight*5,V),L=window.getComputedStyle(m),Y=parseInt(L.paddingTop,10),Q=parseInt(L.paddingBottom,10),X=C.top+C.height/2-Le,ee=I-X,Z=x.offsetHeight/2,k=x.offsetTop+Z,W=q+U+k,K=V-W;if(W<=X){const J=A.length>0&&x===A[A.length-1].ref.current;l.style.bottom="0px";const D=i.clientHeight-m.offsetTop-m.offsetHeight,ae=Math.max(ee,Z+(J?Q:0)+D+G),ve=W+ae;l.style.height=ve+"px"}else{const J=A.length>0&&x===A[0].ref.current;l.style.top="0px";const ae=Math.max(X,q+m.offsetTop+(J?Y:0)+Z)+K;l.style.height=ae+"px",m.scrollTop=W-X+m.offsetTop}l.style.margin=`${Le}px 0`,l.style.minHeight=T+"px",l.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[d,s.trigger,s.valueNode,l,i,m,x,y,s.dir,r]);h.useLayoutEffect2(()=>b(),[b]);const[R,w]=v.useState();h.useLayoutEffect2(()=>{i&&w(window.getComputedStyle(i).zIndex)},[i]);const P=v.useCallback(C=>{C&&g.current===!0&&(b(),E==null||E(),g.current=!1)},[b,E]);return h.jsxRuntimeExports.jsx(dw,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:h.jsxRuntimeExports.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Np.displayName=lw;var fw="SelectPopperPosition",fs=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Le,...s}=e,c=ni(n);return h.jsxRuntimeExports.jsx(qo,{...c,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fs.displayName=fw;var[dw,Ma]=nn(_t,{}),ds="SelectViewport",kp=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=pt(ds,n),c=Ma(ds,n),l=h.useComposedRefs(t,s.onViewportChange),u=v.useRef(0);return h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsxRuntimeExports.jsx(ei.Slot,{scope:n,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:N(o.onScroll,i=>{const a=i.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=c;if(d!=null&&d.current&&f){const p=Math.abs(u.current-a.scrollTop);if(p>0){const g=window.innerHeight-Le*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),y=Math.max(m,x);if(y<g){const E=y+p,b=Math.min(g,E),R=E-b;f.style.height=b+"px",f.style.bottom==="0px"&&(a.scrollTop=R>0?R:0,f.style.justifyContent="flex-end")}}}u.current=a.scrollTop})})})]})});kp.displayName=ds;var Lp="SelectGroup",[hw,pw]=nn(Lp),mw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ge();return h.jsxRuntimeExports.jsx(hw,{scope:n,id:o,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"group","aria-labelledby":o,...r,ref:t})})});mw.displayName=Lp;var Fp="SelectLabel",gw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pw(Fp,n);return h.jsxRuntimeExports.jsx(h.Primitive.div,{id:o.id,...r,ref:t})});gw.displayName=Fp;var Co="SelectItem",[xw,Vp]=nn(Co),Bp=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,l=ht(Co,n),u=pt(Co,n),i=l.value===r,[a,f]=v.useState(s??""),[d,p]=v.useState(!1),g=h.useComposedRefs(t,E=>{var b;return(b=u.itemRefCallback)==null?void 0:b.call(u,E,r,o)}),m=ge(),x=v.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsxRuntimeExports.jsx(xw,{scope:n,value:r,disabled:o,textId:m,isSelected:i,onItemTextChange:v.useCallback(E=>{f(b=>b||((E==null?void 0:E.textContent)??"").trim())},[]),children:h.jsxRuntimeExports.jsx(ei.ItemSlot,{scope:n,value:r,disabled:o,textValue:a,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":i&&d,"data-state":i?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:g,onFocus:N(c.onFocus,()=>p(!0)),onBlur:N(c.onBlur,()=>p(!1)),onClick:N(c.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:N(c.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:N(c.onPointerDown,E=>{x.current=E.pointerType}),onPointerMove:N(c.onPointerMove,E=>{var b;x.current=E.pointerType,o?(b=u.onItemLeave)==null||b.call(u):x.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(c.onPointerLeave,E=>{var b;E.currentTarget===document.activeElement&&((b=u.onItemLeave)==null||b.call(u))}),onKeyDown:N(c.onKeyDown,E=>{var R;((R=u.searchRef)==null?void 0:R.current)!==""&&E.key===" "||(tw.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});Bp.displayName=Co;var wn="SelectItemText",$p=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,c=ht(wn,n),l=pt(wn,n),u=Vp(wn,n),i=iw(wn,n),[a,f]=v.useState(null),d=h.useComposedRefs(t,y=>f(y),u.onItemTextChange,y=>{var E;return(E=l.itemTextRefCallback)==null?void 0:E.call(l,y,u.value,u.disabled)}),p=a==null?void 0:a.textContent,g=v.useMemo(()=>h.jsxRuntimeExports.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=i;return h.useLayoutEffect2(()=>(m(g),()=>x(g)),[m,x,g]),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(h.Primitive.span,{id:u.textId,...s,ref:d}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?qs.createPortal(s.children,c.valueNode):null]})});$p.displayName=wn;var Up="SelectItemIndicator",vw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Vp(Up,n).isSelected?h.jsxRuntimeExports.jsx(h.Primitive.span,{"aria-hidden":!0,...r,ref:t}):null});vw.displayName=Up;var hs="SelectScrollUpButton",yw=v.forwardRef((e,t)=>{const n=pt(hs,e.__scopeSelect),r=Ma(hs,e.__scopeSelect),[o,s]=v.useState(!1),c=h.useComposedRefs(t,r.onScrollButtonChange);return h.useLayoutEffect2(()=>{if(n.viewport&&n.isPositioned){let l=function(){const i=u.scrollTop>0;s(i)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?h.jsxRuntimeExports.jsx(Gp,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});yw.displayName=hs;var ps="SelectScrollDownButton",Ew=v.forwardRef((e,t)=>{const n=pt(ps,e.__scopeSelect),r=Ma(ps,e.__scopeSelect),[o,s]=v.useState(!1),c=h.useComposedRefs(t,r.onScrollButtonChange);return h.useLayoutEffect2(()=>{if(n.viewport&&n.isPositioned){let l=function(){const i=u.scrollHeight-u.clientHeight,a=Math.ceil(u.scrollTop)<i;s(a)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?h.jsxRuntimeExports.jsx(Gp,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Ew.displayName=ps;var Gp=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=pt("SelectScrollButton",n),c=v.useRef(null),l=ti(n),u=v.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return v.useEffect(()=>()=>u(),[u]),h.useLayoutEffect2(()=>{var a;const i=l().find(f=>f.ref.current===document.activeElement);(a=i==null?void 0:i.ref.current)==null||a.scrollIntoView({block:"nearest"})},[l]),h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:N(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:N(o.onPointerMove,()=>{var i;(i=s.onItemLeave)==null||i.call(s),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:N(o.onPointerLeave,()=>{u()})})}),bw="SelectSeparator",ww=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-hidden":!0,...r,ref:t})});ww.displayName=bw;var ms="SelectArrow",Rw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ni(n),s=ht(ms,n),c=pt(ms,n);return s.open&&c.position==="popper"?h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t}):null});Rw.displayName=ms;var Sw="SelectBubbleInput",Hp=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),s=h.useComposedRefs(r,o),c=Gn(t);return v.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&a){const f=new Event("change",{bubbles:!0});a.call(l,t),l.dispatchEvent(f)}},[c,t]),h.jsxRuntimeExports.jsx(h.Primitive.select,{...n,style:{...Bf,...n.style},ref:s,defaultValue:t})});Hp.displayName=Sw;function zp(e){return e===""||e===void 0}function Wp(e){const t=Ve(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(c=>{const l=n.current+c;t(l),(function u(i){n.current=i,window.clearTimeout(r.current),i!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),s=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function qp(e,t,n){const o=t.length>1&&Array.from(t).every(i=>i===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=Cw(e,Math.max(s,0));o.length===1&&(c=c.filter(i=>i!==n));const u=c.find(i=>i.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Cw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _w=Cp,jw=jp,Pw=Tp,Tw=Ap,Aw=Op,Ow=Mp,Mw=kp,Iw=Bp,Dw=$p,Kp=["PageUp","PageDown"],Xp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Yp={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},rn="Slider",[gs,Nw,kw]=Bn(rn),[Zp]=he(rn,[kw]),[Lw,ri]=Zp(rn),Qp=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:c="horizontal",disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:i=[r],value:a,onValueChange:f=()=>{},onValueCommit:d=()=>{},inverted:p=!1,form:g,...m}=e,x=v.useRef(new Set),y=v.useRef(0),b=c==="horizontal"?Fw:Vw,[R=[],w]=we({prop:a,defaultProp:i,onChange:A=>{var F;(F=[...x.current][y.current])==null||F.focus(),f(A)}}),P=v.useRef(R);function C(A){const I=Hw(R,A);j(A,I)}function _(A){j(A,y.current)}function M(){const A=P.current[y.current];R[y.current]!==A&&d(R)}function j(A,I,{commit:F}={commit:!1}){const B=Kw(s),q=Xw(Math.round((A-r)/s)*s+r,B),U=Ro(q,[r,o]);w((G=[])=>{const $=Uw(G,U,I);if(qw($,u*s)){y.current=$.indexOf(U);const V=String($)!==String(G);return V&&F&&d($),V?$:G}else return G})}return h.jsxRuntimeExports.jsx(Lw,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:y,thumbs:x.current,values:R,orientation:c,form:g,children:h.jsxRuntimeExports.jsx(gs.Provider,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(gs.Slot,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(b,{"aria-disabled":l,"data-disabled":l?"":void 0,...m,ref:t,onPointerDown:N(m.onPointerDown,()=>{l||(P.current=R)}),min:r,max:o,inverted:p,onSlideStart:l?void 0:C,onSlideMove:l?void 0:_,onSlideEnd:l?void 0:M,onHomeKeyDown:()=>!l&&j(r,0,{commit:!0}),onEndKeyDown:()=>!l&&j(o,R.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:I})=>{if(!l){const q=Kp.includes(A.key)||A.shiftKey&&Xp.includes(A.key)?10:1,U=y.current,G=R[U],$=s*q*I;j(G+$,U,{commit:!0})}}})})})})});Qp.displayName=rn;var[Jp,em]=Zp(rn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Fw=v.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:c,onSlideMove:l,onSlideEnd:u,onStepKeyDown:i,...a}=e,[f,d]=v.useState(null),p=h.useComposedRefs(t,b=>d(b)),g=v.useRef(void 0),m=Tt(o),x=m==="ltr",y=x&&!s||!x&&s;function E(b){const R=g.current||f.getBoundingClientRect(),w=[0,R.width],C=Ia(w,y?[n,r]:[r,n]);return g.current=R,C(b-R.left)}return h.jsxRuntimeExports.jsx(Jp,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:h.jsxRuntimeExports.jsx(tm,{dir:m,"data-orientation":"horizontal",...a,ref:p,style:{...a.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const R=E(b.clientX);c==null||c(R)},onSlideMove:b=>{const R=E(b.clientX);l==null||l(R)},onSlideEnd:()=>{g.current=void 0,u==null||u()},onStepKeyDown:b=>{const w=Yp[y?"from-left":"from-right"].includes(b.key);i==null||i({event:b,direction:w?-1:1})}})})}),Vw=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...i}=e,a=v.useRef(null),f=h.useComposedRefs(t,a),d=v.useRef(void 0),p=!o;function g(m){const x=d.current||a.current.getBoundingClientRect(),y=[0,x.height],b=Ia(y,p?[r,n]:[n,r]);return d.current=x,b(m-x.top)}return h.jsxRuntimeExports.jsx(Jp,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:h.jsxRuntimeExports.jsx(tm,{"data-orientation":"vertical",...i,ref:f,style:{...i.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const x=g(m.clientY);s==null||s(x)},onSlideMove:m=>{const x=g(m.clientY);c==null||c(x)},onSlideEnd:()=>{d.current=void 0,l==null||l()},onStepKeyDown:m=>{const y=Yp[p?"from-bottom":"from-top"].includes(m.key);u==null||u({event:m,direction:y?-1:1})}})})}),tm=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:c,onEndKeyDown:l,onStepKeyDown:u,...i}=e,a=ri(rn,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{...i,ref:t,onKeyDown:N(e.onKeyDown,f=>{f.key==="Home"?(c(f),f.preventDefault()):f.key==="End"?(l(f),f.preventDefault()):Kp.concat(Xp).includes(f.key)&&(u(f),f.preventDefault())}),onPointerDown:N(e.onPointerDown,f=>{const d=f.target;d.setPointerCapture(f.pointerId),f.preventDefault(),a.thumbs.has(d)?d.focus():r(f)}),onPointerMove:N(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:N(e.onPointerUp,f=>{const d=f.target;d.hasPointerCapture(f.pointerId)&&(d.releasePointerCapture(f.pointerId),s(f))})})}),nm="SliderTrack",rm=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ri(nm,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});rm.displayName=nm;var xs="SliderRange",om=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ri(xs,n),s=em(xs,n),c=v.useRef(null),l=h.useComposedRefs(t,c),u=o.values.length,i=o.values.map(d=>am(d,o.min,o.max)),a=u>1?Math.min(...i):0,f=100-Math.max(...i);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[s.startEdge]:a+"%",[s.endEdge]:f+"%"}})});om.displayName=xs;var vs="SliderThumb",im=v.forwardRef((e,t)=>{const n=Nw(e.__scopeSlider),[r,o]=v.useState(null),s=h.useComposedRefs(t,l=>o(l)),c=v.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return h.jsxRuntimeExports.jsx(Bw,{...e,ref:s,index:c})}),Bw=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,c=ri(vs,n),l=em(vs,n),[u,i]=v.useState(null),a=h.useComposedRefs(t,E=>i(E)),f=u?c.form||!!u.closest("form"):!0,d=Hn(u),p=c.values[r],g=p===void 0?0:am(p,c.min,c.max),m=Gw(r,c.values.length),x=d==null?void 0:d[l.size],y=x?zw(x,g,l.direction):0;return v.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),h.jsxRuntimeExports.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${g}% + ${y}px)`},children:[h.jsxRuntimeExports.jsx(gs.ItemSlot,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":c.min,"aria-valuenow":p,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...s,ref:a,style:p===void 0?{display:"none"}:e.style,onFocus:N(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),f&&h.jsxRuntimeExports.jsx(sm,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:p},r)]})});im.displayName=vs;var $w="RadioBubbleInput",sm=v.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=v.useRef(null),s=h.useComposedRefs(o,r),c=Gn(t);return v.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&a){const f=new Event("input",{bubbles:!0});a.call(l,t),l.dispatchEvent(f)}},[c,t]),h.jsxRuntimeExports.jsx(h.Primitive.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});sm.displayName=$w;function Uw(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function am(e,t,n){const s=100/(n-t)*(e-t);return Ro(s,[0,100])}function Gw(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Hw(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function zw(e,t,n){const r=e/2,s=Ia([0,50],[0,r]);return(r-s(t)*n)*n}function Ww(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function qw(e,t){if(t>0){const n=Ww(e);return Math.min(...n)>=t}return!0}function Ia(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Kw(e){return(String(e).split(".")[1]||"").length}function Xw(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Yw=Qp,Zw=rm,Qw=om,Jw=im,oi="Switch",[eR]=he(oi),[tR,nR]=eR(oi),cm=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:c,disabled:l,value:u="on",onCheckedChange:i,form:a,...f}=e,[d,p]=v.useState(null),g=h.useComposedRefs(t,b=>p(b)),m=v.useRef(!1),x=d?a||!!d.closest("form"):!0,[y,E]=we({prop:o,defaultProp:s??!1,onChange:i,caller:oi});return h.jsxRuntimeExports.jsxs(tR,{scope:n,checked:y,disabled:l,children:[h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"switch","aria-checked":y,"aria-required":c,"data-state":dm(y),"data-disabled":l?"":void 0,disabled:l,value:u,...f,ref:g,onClick:N(e.onClick,b=>{E(R=>!R),x&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),x&&h.jsxRuntimeExports.jsx(fm,{control:d,bubbles:!m.current,name:r,value:u,checked:y,required:c,disabled:l,form:a,style:{transform:"translateX(-100%)"}})]})});cm.displayName=oi;var um="SwitchThumb",lm=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=nR(um,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":dm(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});lm.displayName=um;var rR="SwitchBubbleInput",fm=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const c=v.useRef(null),l=h.useComposedRefs(c,s),u=Gn(n),i=Hn(t);return v.useEffect(()=>{const a=c.current;if(!a)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&p){const g=new Event("click",{bubbles:r});p.call(a,n),a.dispatchEvent(g)}},[u,n,r]),h.jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fm.displayName=rR;function dm(e){return e?"checked":"unchecked"}var oR=cm,iR=lm,ii="Tabs",[sR]=he(ii,[tn]),hm=tn(),[aR,Da]=sR(ii),pm=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:c="horizontal",dir:l,activationMode:u="automatic",...i}=e,a=Tt(l),[f,d]=we({prop:r,onChange:o,defaultProp:s??"",caller:ii});return h.jsxRuntimeExports.jsx(aR,{scope:n,baseId:ge(),value:f,onValueChange:d,orientation:c,dir:a,activationMode:u,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{dir:a,"data-orientation":c,...i,ref:t})})});pm.displayName=ii;var mm="TabsList",gm=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Da(mm,n),c=hm(n);return h.jsxRuntimeExports.jsx(ha,{asChild:!0,...c,orientation:s.orientation,dir:s.dir,loop:r,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});gm.displayName=mm;var xm="TabsTrigger",vm=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,c=Da(xm,n),l=hm(n),u=bm(c.baseId,r),i=wm(c.baseId,r),a=r===c.value;return h.jsxRuntimeExports.jsx(pa,{asChild:!0,...l,focusable:!o,active:a,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":i,"data-state":a?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...s,ref:t,onMouseDown:N(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?c.onValueChange(r):f.preventDefault()}),onKeyDown:N(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(r)}),onFocus:N(e.onFocus,()=>{const f=c.activationMode!=="manual";!a&&!o&&f&&c.onValueChange(r)})})})});vm.displayName=xm;var ym="TabsContent",Em=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...c}=e,l=Da(ym,n),u=bm(l.baseId,r),i=wm(l.baseId,r),a=r===l.value,f=v.useRef(a);return v.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),h.jsxRuntimeExports.jsx(Re,{present:o||a,children:({present:d})=>h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":a?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!d,id:i,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&s})})});Em.displayName=ym;function bm(e,t){return`${e}-trigger-${t}`}function wm(e,t){return`${e}-content-${t}`}var cR=pm,uR=gm,lR=vm,Yc=Em,[si]=he("Tooltip",[dt]),ai=dt(),Rm="TooltipProvider",fR=700,ys="tooltip.open",[dR,Na]=si(Rm),Sm=e=>{const{__scopeTooltip:t,delayDuration:n=fR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,c=v.useRef(!0),l=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const i=u.current;return()=>window.clearTimeout(i)},[]),h.jsxRuntimeExports.jsx(dR,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(i=>{l.current=i},[]),disableHoverableContent:o,children:s})};Sm.displayName=Rm;var Dn="Tooltip",[hR,Jn]=si(Dn),Cm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=Na(Dn,e.__scopeTooltip),i=ai(t),[a,f]=v.useState(null),d=ge(),p=v.useRef(0),g=c??u.disableHoverableContent,m=l??u.delayDuration,x=v.useRef(!1),[y,E]=we({prop:r,defaultProp:o??!1,onChange:C=>{C?(u.onOpen(),document.dispatchEvent(new CustomEvent(ys))):u.onClose(),s==null||s(C)},caller:Dn}),b=v.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),R=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,E(!0)},[E]),w=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,E(!1)},[E]),P=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,E(!0),p.current=0},m)},[m,E]);return v.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),h.jsxRuntimeExports.jsx(Wo,{...i,children:h.jsxRuntimeExports.jsx(hR,{scope:t,contentId:d,open:y,stateAttribute:b,trigger:a,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayedRef.current?P():R()},[u.isOpenDelayedRef,P,R]),onTriggerLeave:v.useCallback(()=>{g?w():(window.clearTimeout(p.current),p.current=0)},[w,g]),onOpen:R,onClose:w,disableHoverableContent:g,children:n})})};Cm.displayName=Dn;var Es="TooltipTrigger",_m=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jn(Es,n),s=Na(Es,n),c=ai(n),l=v.useRef(null),u=h.useComposedRefs(t,l,o.onTriggerChange),i=v.useRef(!1),a=v.useRef(!1),f=v.useCallback(()=>i.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),h.jsxRuntimeExports.jsx(Wn,{asChild:!0,...c,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:N(e.onPointerMove,d=>{d.pointerType!=="touch"&&!a.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),a.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),a.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),i.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:N(e.onFocus,()=>{i.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});_m.displayName=Es;var ka="TooltipPortal",[pR,mR]=si(ka,{forceMount:void 0}),jm=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Jn(ka,t);return h.jsxRuntimeExports.jsx(pR,{scope:t,forceMount:n,children:h.jsxRuntimeExports.jsx(Re,{present:n||s.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:r})})})};jm.displayName=ka;var Yt="TooltipContent",Pm=v.forwardRef((e,t)=>{const n=mR(Yt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,c=Jn(Yt,e.__scopeTooltip);return h.jsxRuntimeExports.jsx(Re,{present:r||c.open,children:c.disableHoverableContent?h.jsxRuntimeExports.jsx(Tm,{side:o,...s,ref:t}):h.jsxRuntimeExports.jsx(gR,{side:o,...s,ref:t})})}),gR=v.forwardRef((e,t)=>{const n=Jn(Yt,e.__scopeTooltip),r=Na(Yt,e.__scopeTooltip),o=v.useRef(null),s=h.useComposedRefs(t,o),[c,l]=v.useState(null),{trigger:u,onClose:i}=n,a=o.current,{onPointerInTransitChange:f}=r,d=v.useCallback(()=>{l(null),f(!1)},[f]),p=v.useCallback((g,m)=>{const x=g.currentTarget,y={x:g.clientX,y:g.clientY},E=ER(y,x.getBoundingClientRect()),b=bR(y,E),R=wR(m.getBoundingClientRect()),w=SR([...b,...R]);l(w),f(!0)},[f]);return v.useEffect(()=>()=>d(),[d]),v.useEffect(()=>{if(u&&a){const g=x=>p(x,a),m=x=>p(x,u);return u.addEventListener("pointerleave",g),a.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",g),a.removeEventListener("pointerleave",m)}}},[u,a,p,d]),v.useEffect(()=>{if(c){const g=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},E=(u==null?void 0:u.contains(x))||(a==null?void 0:a.contains(x)),b=!RR(y,c);E?d():b&&(d(),i())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[u,a,c,i,d]),h.jsxRuntimeExports.jsx(Tm,{...e,ref:s})}),[xR,vR]=si(Dn,{isInside:!1}),yR=h.createSlottable("TooltipContent"),Tm=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=Jn(Yt,n),i=ai(n),{onClose:a}=u;return v.useEffect(()=>(document.addEventListener(ys,a),()=>document.removeEventListener(ys,a)),[a]),v.useEffect(()=>{if(u.trigger){const f=d=>{const p=d.target;p!=null&&p.contains(u.trigger)&&a()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,a]),h.jsxRuntimeExports.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:a,children:h.jsxRuntimeExports.jsxs(qo,{"data-state":u.stateAttribute,...i,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsxRuntimeExports.jsx(yR,{children:r}),h.jsxRuntimeExports.jsx(xR,{scope:n,isInside:!0,children:h.jsxRuntimeExports.jsx(Zx,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Pm.displayName=Yt;var Am="TooltipArrow",Om=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ai(n);return vR(Am,n).isInside?null:h.jsxRuntimeExports.jsx(Ko,{...o,...r,ref:t})});Om.displayName=Am;function ER(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function bR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function RR(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s],u=t[c],i=l.x,a=l.y,f=u.x,d=u.y;a>r!=d>r&&n<(f-i)*(r-a)/(d-a)+i&&(o=!o)}return o}function SR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),CR(t)}function CR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var _R=Sm,jR=Cm,PR=_m,TR=jm,AR=Pm,OR=Om;const MR=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(Cv,{className:O.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),IR=S.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>h.jsxRuntimeExports.jsx(_v,{className:"flex",children:h.jsxRuntimeExports.jsxs(jv,{className:O.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??h.jsxRuntimeExports.jsx(ne.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})})),La=S.createContext({});function Fa(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm=typeof window<"u",Im=Mm?S.useLayoutEffect:S.useEffect,ci=S.createContext(null);function Va(e,t){e.indexOf(t)===-1&&e.push(t)}function Ba(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ye=(e,t,n)=>n>t?t:n<e?e:n;function bs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let on=()=>{},tt=()=>{};var Df;typeof process<"u"&&((Df=process.env)==null?void 0:Df.NODE_ENV)!=="production"&&(on=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(bs(t,n))},tt=(e,t,n)=>{if(!e)throw new Error(bs(t,n))});const nt={},Dm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Nm(e){return typeof e=="object"&&e!==null}const km=e=>/^0[^.\s]+$/u.test(e);function $a(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ie=e=>e,DR=(e,t)=>n=>t(e(n)),er=(...e)=>e.reduce(DR),Nn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ua{constructor(){this.subscriptions=[]}add(t){return Va(this.subscriptions,t),()=>Ba(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const c=this.subscriptions[s];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qe=e=>e*1e3,Oe=e=>e/1e3;function Lm(e,t){return t?e*(1e3/t):0}const Zc=new Set;function Ga(e,t,n){e||Zc.has(t)||(console.warn(bs(t,n)),Zc.add(t))}const Fm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,NR=1e-7,kR=12;function LR(e,t,n,r,o){let s,c,l=0;do c=t+(n-t)/2,s=Fm(c,r,o)-e,s>0?n=c:t=c;while(Math.abs(s)>NR&&++l<kR);return c}function tr(e,t,n,r){if(e===t&&n===r)return Ie;const o=s=>LR(s,0,1,e,n);return s=>s===0||s===1?s:Fm(o(s),t,r)}const Vm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),$m=tr(.33,1.53,.69,.99),Ha=Bm($m),Um=Vm(Ha),Gm=e=>(e*=2)<1?.5*Ha(e):.5*(2-Math.pow(2,-10*(e-1))),za=e=>1-Math.sin(Math.acos(e)),Hm=Bm(za),zm=Vm(za),FR=tr(.42,0,1,1),VR=tr(0,0,.58,1),Wm=tr(.42,0,.58,1),BR=e=>Array.isArray(e)&&typeof e[0]!="number",qm=e=>Array.isArray(e)&&typeof e[0]=="number",Qc={linear:Ie,easeIn:FR,easeInOut:Wm,easeOut:VR,circIn:za,circInOut:zm,circOut:Hm,backIn:Ha,backInOut:Um,backOut:$m,anticipate:Gm},$R=e=>typeof e=="string",Jc=e=>{if(qm(e)){tt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return tr(t,n,r,o)}else if($R(e))return tt(Qc[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Qc[e];return e},gr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function UR(e,t){let n=new Set,r=new Set,o=!1,s=!1;const c=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(a){c.has(a)&&(i.schedule(a),e()),a(l)}const i={schedule:(a,f=!1,d=!1)=>{const g=d&&o?n:r;return f&&c.add(a),g.has(a)||g.add(a),a},cancel:a=>{r.delete(a),c.delete(a)},process:a=>{if(l=a,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,s&&(s=!1,i.process(a))}};return i}const GR=40;function Km(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,c=gr.reduce((b,R)=>(b[R]=UR(s),b),{}),{setup:l,read:u,resolveKeyframes:i,preUpdate:a,update:f,preRender:d,render:p,postRender:g}=c,m=()=>{const b=nt.useManualTiming?o.timestamp:performance.now();n=!1,nt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,GR),1)),o.timestamp=b,o.isProcessing=!0,l.process(o),u.process(o),i.process(o),a.process(o),f.process(o),d.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},x=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:gr.reduce((b,R)=>{const w=c[R];return b[R]=(P,C=!1,_=!1)=>(n||x(),w.schedule(P,C,_)),b},{}),cancel:b=>{for(let R=0;R<gr.length;R++)c[gr[R]].cancel(b)},state:o,steps:c}}const{schedule:se,cancel:lt,state:me,steps:Ti}=Km(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ie,!0);let lo;function HR(){lo=void 0}const Ee={now:()=>(lo===void 0&&Ee.set(me.isProcessing||nt.useManualTiming?me.timestamp:performance.now()),lo),set:e=>{lo=e,queueMicrotask(HR)}},Xm=e=>t=>typeof t=="string"&&t.startsWith(e),Ym=Xm("--"),zR=Xm("var(--"),Wa=e=>zR(e)?WR.test(e.split("/*")[0].trim()):!1,WR=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eu(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const sn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kn={...sn,transform:e=>Ye(0,1,e)},xr={...sn,default:1},Cn=e=>Math.round(e*1e5)/1e5,qa=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qR(e){return e==null}const KR=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ka=(e,t)=>n=>!!(typeof n=="string"&&KR.test(n)&&n.startsWith(e)||t&&!qR(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,c,l]=r.match(qa);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(c),alpha:l!==void 0?parseFloat(l):1}},XR=e=>Ye(0,255,e),Ai={...sn,transform:e=>Math.round(XR(e))},Et={test:Ka("rgb","red"),parse:Zm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ai.transform(e)+", "+Ai.transform(t)+", "+Ai.transform(n)+", "+Cn(kn.transform(r))+")"};function YR(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ws={test:Ka("#"),parse:YR,transform:Et.transform},nr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),it=nr("deg"),Ke=nr("%"),H=nr("px"),ZR=nr("vh"),QR=nr("vw"),tu={...Ke,parse:e=>Ke.parse(e)/100,transform:e=>Ke.transform(e*100)},Vt={test:Ka("hsl","hue"),parse:Zm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ke.transform(Cn(t))+", "+Ke.transform(Cn(n))+", "+Cn(kn.transform(r))+")"},de={test:e=>Et.test(e)||ws.test(e)||Vt.test(e),parse:e=>Et.test(e)?Et.parse(e):Vt.test(e)?Vt.parse(e):ws.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Et.transform(e):Vt.transform(e),getAnimatableNone:e=>{const t=de.parse(e);return t.alpha=0,de.transform(t)}},JR=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function eS(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(qa))==null?void 0:t.length)||0)+(((n=e.match(JR))==null?void 0:n.length)||0)>0}const Qm="number",Jm="color",tS="var",nS="var(",nu="${}",rS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ln(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const l=t.replace(rS,u=>(de.test(u)?(r.color.push(s),o.push(Jm),n.push(de.parse(u))):u.startsWith(nS)?(r.var.push(s),o.push(tS),n.push(u)):(r.number.push(s),o.push(Qm),n.push(parseFloat(u))),++s,nu)).split(nu);return{values:n,split:l,indexes:r,types:o}}function eg(e){return Ln(e).values}function tg(e){const{split:t,types:n}=Ln(e),r=t.length;return o=>{let s="";for(let c=0;c<r;c++)if(s+=t[c],o[c]!==void 0){const l=n[c];l===Qm?s+=Cn(o[c]):l===Jm?s+=de.transform(o[c]):s+=o[c]}return s}}const oS=e=>typeof e=="number"?0:de.test(e)?de.getAnimatableNone(e):e;function iS(e){const t=eg(e);return tg(e)(t.map(oS))}const ft={test:eS,parse:eg,createTransformer:tg,getAnimatableNone:iS};function Oi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,c=0;if(!t)o=s=c=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;o=Oi(u,l,e+1/3),s=Oi(u,l,e),c=Oi(u,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(c*255),alpha:r}}function _o(e,t){return n=>n>0?t:e}const ue=(e,t,n)=>e+(t-e)*n,Mi=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},aS=[ws,Et,Vt],cS=e=>aS.find(t=>t.test(e));function ru(e){const t=cS(e);if(on(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Vt&&(n=sS(n)),n}const ou=(e,t)=>{const n=ru(e),r=ru(t);if(!n||!r)return _o(e,t);const o={...n};return s=>(o.red=Mi(n.red,r.red,s),o.green=Mi(n.green,r.green,s),o.blue=Mi(n.blue,r.blue,s),o.alpha=ue(n.alpha,r.alpha,s),Et.transform(o))},Rs=new Set(["none","hidden"]);function uS(e,t){return Rs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lS(e,t){return n=>ue(e,t,n)}function Xa(e){return typeof e=="number"?lS:typeof e=="string"?Wa(e)?_o:de.test(e)?ou:hS:Array.isArray(e)?ng:typeof e=="object"?de.test(e)?ou:fS:_o}function ng(e,t){const n=[...e],r=n.length,o=e.map((s,c)=>Xa(s)(s,t[c]));return s=>{for(let c=0;c<r;c++)n[c]=o[c](s);return n}}function fS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Xa(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function dS(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],c=e.indexes[s][r[s]],l=e.values[c]??0;n[o]=l,r[s]++}return n}const hS=(e,t)=>{const n=ft.createTransformer(t),r=Ln(e),o=Ln(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Rs.has(e)&&!o.values.length||Rs.has(t)&&!r.values.length?uS(e,t):er(ng(dS(r,o),o.values),n):(on(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),_o(e,t))};function rg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ue(e,t,n):Xa(e)(e,t)}const pS=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>se.update(t,n),stop:()=>lt(t),now:()=>me.isProcessing?me.timestamp:Ee.now()}},og=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},jo=2e4;function Ya(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<jo;)t+=n,r=e.next(t);return t>=jo?1/0:t}function mS(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ya(r),jo);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Oe(o)}}const gS=5;function ig(e,t,n){const r=Math.max(t-gS,0);return Lm(n-e(r),t-r)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ii=.001;function xS({duration:e=ce.duration,bounce:t=ce.bounce,velocity:n=ce.velocity,mass:r=ce.mass}){let o,s;on(e<=qe(ce.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-t;c=Ye(ce.minDamping,ce.maxDamping,c),e=Ye(ce.minDuration,ce.maxDuration,Oe(e)),c<1?(o=i=>{const a=i*c,f=a*e,d=a-n,p=Ss(i,c),g=Math.exp(-f);return Ii-d/p*g},s=i=>{const f=i*c*e,d=f*n+n,p=Math.pow(c,2)*Math.pow(i,2)*e,g=Math.exp(-f),m=Ss(Math.pow(i,2),c);return(-o(i)+Ii>0?-1:1)*((d-p)*g)/m}):(o=i=>{const a=Math.exp(-i*e),f=(i-n)*e+1;return-Ii+a*f},s=i=>{const a=Math.exp(-i*e),f=(n-i)*(e*e);return a*f});const l=5/e,u=yS(o,s,l);if(e=qe(e),isNaN(u))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const i=Math.pow(u,2)*r;return{stiffness:i,damping:c*2*Math.sqrt(r*i),duration:e}}}const vS=12;function yS(e,t,n){let r=n;for(let o=1;o<vS;o++)r=r-e(r)/t(r);return r}function Ss(e,t){return e*Math.sqrt(1-t*t)}const ES=["duration","bounce"],bS=["stiffness","damping","mass"];function iu(e,t){return t.some(n=>e[n]!==void 0)}function wS(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!iu(e,bS)&&iu(e,ES))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Ye(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ce.mass,stiffness:o,damping:s}}else{const n=xS(e);t={...t,...n,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function Po(e=ce.visualDuration,t=ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:u,damping:i,mass:a,duration:f,velocity:d,isResolvedFromDuration:p}=wS({...n,velocity:-Oe(n.velocity||0)}),g=d||0,m=i/(2*Math.sqrt(u*a)),x=c-s,y=Oe(Math.sqrt(u/a)),E=Math.abs(x)<5;r||(r=E?ce.restSpeed.granular:ce.restSpeed.default),o||(o=E?ce.restDelta.granular:ce.restDelta.default);let b;if(m<1){const w=Ss(y,m);b=P=>{const C=Math.exp(-m*y*P);return c-C*((g+m*y*x)/w*Math.sin(w*P)+x*Math.cos(w*P))}}else if(m===1)b=w=>c-Math.exp(-y*w)*(x+(g+y*x)*w);else{const w=y*Math.sqrt(m*m-1);b=P=>{const C=Math.exp(-m*y*P),_=Math.min(w*P,300);return c-C*((g+m*y*x)*Math.sinh(_)+w*x*Math.cosh(_))/w}}const R={calculatedDuration:p&&f||null,next:w=>{const P=b(w);if(p)l.done=w>=f;else{let C=w===0?g:0;m<1&&(C=w===0?qe(g):ig(b,w,P));const _=Math.abs(C)<=r,M=Math.abs(c-P)<=o;l.done=_&&M}return l.value=l.done?c:P,l},toString:()=>{const w=Math.min(Ya(R),jo),P=og(C=>R.next(w*C).value,w,30);return w+"ms "+P},toTransition:()=>{}};return R}Po.applyToOptions=e=>{const t=mS(e,100,Po);return e.ease=t.ease,e.duration=qe(t.duration),e.type="keyframes",e};function Cs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:c,min:l,max:u,restDelta:i=.5,restSpeed:a}){const f=e[0],d={done:!1,value:f},p=_=>l!==void 0&&_<l||u!==void 0&&_>u,g=_=>l===void 0?u:u===void 0||Math.abs(l-_)<Math.abs(u-_)?l:u;let m=n*t;const x=f+m,y=c===void 0?x:c(x);y!==x&&(m=y-f);const E=_=>-m*Math.exp(-_/r),b=_=>y+E(_),R=_=>{const M=E(_),j=b(_);d.done=Math.abs(M)<=i,d.value=d.done?y:j};let w,P;const C=_=>{p(d.value)&&(w=_,P=Po({keyframes:[d.value,g(d.value)],velocity:ig(b,_,d.value),damping:o,stiffness:s,restDelta:i,restSpeed:a}))};return C(0),{calculatedDuration:null,next:_=>{let M=!1;return!P&&w===void 0&&(M=!0,R(_),C(_)),w!==void 0&&_>=w?P.next(_-w):(!M&&R(_),d)}}}function RS(e,t,n){const r=[],o=n||nt.mix||rg,s=e.length-1;for(let c=0;c<s;c++){let l=o(e[c],e[c+1]);if(t){const u=Array.isArray(t)?t[c]||Ie:t;l=er(u,l)}r.push(l)}return r}function SS(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=RS(t,r,o),u=l.length,i=a=>{if(c&&a<e[0])return t[0];let f=0;if(u>1)for(;f<e.length-2&&!(a<e[f+1]);f++);const d=Nn(e[f],e[f+1],a);return l[f](d)};return n?a=>i(Ye(e[0],e[s-1],a)):i}function CS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Nn(0,t,r);e.push(ue(n,1,o))}}function _S(e){const t=[0];return CS(t,e.length-1),t}function jS(e,t){return e.map(n=>n*t)}function PS(e,t){return e.map(()=>t||Wm).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=BR(r)?r.map(Jc):Jc(r),s={done:!1,value:t[0]},c=jS(n&&n.length===t.length?n:_S(t),e),l=SS(c,t,{ease:Array.isArray(o)?o:PS(t,o)});return{calculatedDuration:e,next:u=>(s.value=l(u),s.done=u>=e,s)}}const TS=e=>e!==null;function Za(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(TS),l=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const AS={decay:Cs,inertia:Cs,tween:Bt,keyframes:Bt,spring:Po};function sg(e){typeof e.type=="string"&&(e.type=AS[e.type])}class Qa{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const OS=e=>e/100;class Ja extends Qa{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;sg(t);const{type:n=Bt,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:c=0}=t;let{keyframes:l}=t;const u=n||Bt;process.env.NODE_ENV!=="production"&&u!==Bt&&tt(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),u!==Bt&&typeof l[0]!="number"&&(this.mixKeyframes=er(OS,rg(l[0],l[1])),l=[0,100]);const i=u({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-c})),i.calculatedDuration===null&&(i.calculatedDuration=Ya(i));const{calculatedDuration:a}=i;this.calculatedDuration=a,this.resolvedDuration=a+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=i}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:c,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:i=0,keyframes:a,repeat:f,repeatType:d,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-i*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,R=r;if(f){const _=Math.min(this.currentTime,o)/l;let M=Math.floor(_),j=_%1;!j&&_>=1&&(j=1),j===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(d==="reverse"?(j=1-j,p&&(j-=p/l)):d==="mirror"&&(R=c)),b=Ye(0,1,j)*l}const w=E?{done:!1,value:a[0]}:R.next(b);s&&(w.value=s(w.value));let{done:P}=w;!E&&u!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&g!==Cs&&(w.value=Za(a,this.options,x,this.speed)),m&&m(w.value),C&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Oe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Oe(t)}get time(){return Oe(this.currentTime)}set time(t){var n;t=qe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Oe(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=pS,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function MS(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const bt=e=>e*180/Math.PI,_s=e=>{const t=bt(Math.atan2(e[1],e[0]));return js(t)},IS={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_s,rotateZ:_s,skewX:e=>bt(Math.atan(e[1])),skewY:e=>bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},js=e=>(e=e%360,e<0&&(e+=360),e),su=_s,au=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),cu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),DS={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:au,scaleY:cu,scale:e=>(au(e)+cu(e))/2,rotateX:e=>js(bt(Math.atan2(e[6],e[5]))),rotateY:e=>js(bt(Math.atan2(-e[2],e[0]))),rotateZ:su,rotate:su,skewX:e=>bt(Math.atan(e[4])),skewY:e=>bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ps(e){return e.includes("scale")?1:0}function Ts(e,t){if(!e||e==="none")return Ps(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=DS,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=IS,o=l}if(!o)return Ps(t);const s=r[t],c=o[1].split(",").map(kS);return typeof s=="function"?s(c):c[s]}const NS=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ts(n,t)};function kS(e){return parseFloat(e.trim())}const an=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cn=new Set(an),uu=e=>e===sn||e===H,LS=new Set(["x","y","z"]),FS=an.filter(e=>!LS.has(e));function VS(e){const t=[];return FS.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const st={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ts(t,"x"),y:(e,{transform:t})=>Ts(t,"y")};st.translateX=st.x;st.translateY=st.y;const wt=new Set;let As=!1,Os=!1,Ms=!1;function ag(){if(Os){const e=Array.from(wt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=VS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,c])=>{var l;(l=r.getValue(s))==null||l.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Os=!1,As=!1,wt.forEach(e=>e.complete(Ms)),wt.clear()}function cg(){wt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Os=!0)})}function BS(){Ms=!0,cg(),ag(),Ms=!1}class ec{constructor(t,n,r,o,s,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(wt.add(this),As||(As=!0,se.read(cg),se.resolveKeyframes(ag))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),c=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),o&&s===void 0&&o.set(t[0])}MS(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),wt.delete(this)}cancel(){this.state==="scheduled"&&(wt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $S=e=>e.startsWith("--");function US(e,t,n){$S(t)?e.style.setProperty(t,n):e.style[t]=n}const GS=$a(()=>window.ScrollTimeline!==void 0),HS={};function zS(e,t){const n=$a(e);return()=>HS[t]??n()}const ug=zS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function lg(e,t){if(e)return typeof e=="function"?ug()?og(e,t):"ease-out":qm(e)?Rn(e):Array.isArray(e)?e.map(n=>lg(n,t)||lu.easeOut):lu[e]}function WS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:c="loop",ease:l="easeOut",times:u}={},i=void 0){const a={[t]:n};u&&(a.offset=u);const f=lg(l,o);Array.isArray(f)&&(a.easing=f);const d={delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:c==="reverse"?"alternate":"normal"};return i&&(d.pseudoElement=i),e.animate(a,d)}function fg(e){return typeof e=="function"&&"applyToOptions"in e}function qS({type:e,...t}){return fg(e)&&ug()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class KS extends Qa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:c=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=c,this.options=t,tt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const i=qS(t);this.animation=WS(n,r,o,i,s),i.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const a=Za(o,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(a):US(n,r,a),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Oe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Oe(t)}get time(){return Oe(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=qe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&GS()?(this.animation.timeline=t,Ie):n(this)}}const dg={anticipate:Gm,backInOut:Um,circInOut:zm};function XS(e){return e in dg}function YS(e){typeof e.ease=="string"&&XS(e.ease)&&(e.ease=dg[e.ease])}const Di=10;class ZS extends KS{constructor(t){YS(t),sg(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Ja({...c,autoplay:!1}),u=Math.max(Di,Ee.now()-this.startTime),i=Ye(0,Di,u-Di);n.setWithVelocity(l.sample(Math.max(0,u-i)).value,l.sample(u).value,i),l.stop()}}const fu=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ft.test(e)||e==="0")&&!e.startsWith("url("));function QS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function JS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],c=fu(o,t),l=fu(s,t);return on(c===l,`You are trying to animate ${t} from "${o}" to "${s}". "${c?s:o}" is not an animatable value.`,"value-not-animatable"),!c||!l?!1:QS(e)||(n==="spring"||fg(n))&&r}function Is(e){e.duration=0,e.type="keyframes"}const eC=new Set(["opacity","clipPath","filter","transform"]),tC=$a(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function nC(e){var a;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:c}=e;if(!(((a=t==null?void 0:t.owner)==null?void 0:a.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:i}=t.owner.getProps();return tC()&&n&&eC.has(n)&&(n!=="transform"||!i)&&!u&&!r&&o!=="mirror"&&s!==0&&c!=="inertia"}const rC=40;class oC extends Qa{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:c="loop",keyframes:l,name:u,motionValue:i,element:a,...f}){var g;super(),this.stop=()=>{var m,x;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ee.now();const d={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:c,name:u,motionValue:i,element:a,...f},p=(a==null?void 0:a.KeyframeResolver)||ec;this.keyframeResolver=new p(l,(m,x,y)=>this.onKeyframesResolved(m,x,d,!y),u,i,a),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,o){var x,y;this.keyframeResolver=void 0;const{name:s,type:c,velocity:l,delay:u,isHandoff:i,onUpdate:a}=r;this.resolvedAt=Ee.now(),JS(t,s,c,l)||((nt.instantAnimations||!u)&&(a==null||a(Za(t,r,n))),t[0]=t[t.length-1],Is(r),r.repeat=0);const d={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>rC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!i&&nC(d),g=(y=(x=d.motionValue)==null?void 0:x.owner)==null?void 0:y.current,m=p?new ZS({...d,element:g}):new Ja(d);m.finished.then(()=>{this.notifyFinished()}).catch(Ie),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),BS()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function hg(e,t,n,r=0,o=1){const s=Array.from(e).sort((i,a)=>i.sortNodePosition(a)).indexOf(t),c=e.size,l=(c-1)*r;return typeof n=="function"?n(s,c):o===1?s*r:l-s*r}const iC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sC(e){const t=iC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const aC=4;function pg(e,t,n=1){tt(n<=aC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=sC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const c=s.trim();return Dm(c)?parseFloat(c):c}return Wa(o)?pg(o,t,n+1):o}const cC={type:"spring",stiffness:500,damping:25,restSpeed:10},uC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lC={type:"keyframes",duration:.8},fC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dC=(e,{keyframes:t})=>t.length>2?lC:cn.has(e)?e.startsWith("scale")?uC(t[1]):cC:fC,hC=e=>e!==null;function pC(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(hC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function tc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function mC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:c,repeatDelay:l,from:u,elapsed:i,...a}){return!!Object.keys(a).length}const nc=(e,t,n,r={},o,s)=>c=>{const l=tc(r,e)||{},u=l.delay||r.delay||0;let{elapsed:i=0}=r;i=i-qe(u);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-i,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{c(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:o};mC(l)||Object.assign(a,dC(e,a)),a.duration&&(a.duration=qe(a.duration)),a.repeatDelay&&(a.repeatDelay=qe(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let f=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(Is(a),a.delay===0&&(f=!0)),(nt.instantAnimations||nt.skipAnimations)&&(f=!0,Is(a),a.delay=0),a.allowFlatten=!l.type&&!l.ease,f&&!s&&t.get()!==void 0){const d=pC(a.keyframes,l);if(d!==void 0){se.update(()=>{a.onUpdate(d),a.onComplete()});return}}return l.isSync?new Ja(a):new oC(a)};function du(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function rc(e,t,n,r){if(typeof t=="function"){const[o,s]=du(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=du(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function qt(e,t,n){const r=e.getProps();return rc(r,t,n!==void 0?n:r.custom,e)}const mg=new Set(["width","height","top","left","right","bottom",...an]),hu=30,gC=e=>!isNaN(parseFloat(e));class xC{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=Ee.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ga(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ua);const r=this.events[t].add(n);return t==="change"?()=>{r(),se.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>hu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hu);return Lm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zt(e,t){return new xC(e,t)}const Ds=e=>Array.isArray(e);function vC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zt(n))}function yC(e){return Ds(e)?e[e.length-1]||0:e}function EC(e,t){const n=qt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const c in s){const l=yC(s[c]);vC(e,c,l)}}const xe=e=>!!(e&&e.getVelocity);function bC(e){return!!(xe(e)&&e.add)}function Ns(e,t){const n=e.getValue("willChange");if(bC(n))return n.add(t);if(!n&&nt.WillChange){const r=new nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function oc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const wC="framerAppearId",gg="data-"+oc(wC);function xg(e){return e.props[gg]}function RC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:c,...l}=t;r&&(s=r);const u=[],i=o&&e.animationState&&e.animationState.getState()[o];for(const a in l){const f=e.getValue(a,e.latestValues[a]??null),d=l[a];if(d===void 0||i&&RC(i,a))continue;const p={delay:n,...tc(s||{},a)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=xg(e);if(y){const E=window.MotionHandoffAnimation(y,a,se);E!==null&&(p.startTime=E,m=!0)}}Ns(e,a),f.start(nc(a,f,d,e.shouldReduceMotion&&mg.has(a)?{type:!1}:p,e,m));const x=f.animation;x&&u.push(x)}return c&&Promise.all(u).then(()=>{se.update(()=>{c&&EC(e,c)})}),u}function ks(e,t,n={}){var u;const r=qt(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(vg(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:a=0,staggerChildren:f,staggerDirection:d}=o;return SC(e,t,i,a,f,d,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[i,a]=l==="beforeChildren"?[s,c]:[c,s];return i().then(()=>a())}else return Promise.all([s(),c(n.delay)])}function SC(e,t,n=0,r=0,o=0,s=1,c){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(ks(u,t,{...c,delay:n+(typeof r=="function"?0:r)+hg(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function CC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ks(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ks(e,t,n);else{const o=typeof t=="function"?qt(e,t,n.custom):t;r=Promise.all(vg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const _C={test:e=>e==="auto",parse:e=>e},yg=e=>t=>t.test(e),Eg=[sn,H,Ke,it,QR,ZR,_C],pu=e=>Eg.find(yg(e));function jC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||km(e):!0}const PC=new Set(["brightness","contrast","saturate","opacity"]);function TC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qa)||[];if(!r)return e;const o=n.replace(r,"");let s=PC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const AC=/\b([a-z-]*)\(.*?\)/gu,Ls={...ft,getAnimatableNone:e=>{const t=e.match(AC);return t?t.map(TC).join(" "):e}},mu={...sn,transform:Math.round},OC={rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:xr,scaleX:xr,scaleY:xr,scaleZ:xr,skew:it,skewX:it,skewY:it,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:kn,originX:tu,originY:tu,originZ:H},ic={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,inset:H,insetBlock:H,insetBlockStart:H,insetBlockEnd:H,insetInline:H,insetInlineStart:H,insetInlineEnd:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,paddingBlock:H,paddingBlockStart:H,paddingBlockEnd:H,paddingInline:H,paddingInlineStart:H,paddingInlineEnd:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,marginBlock:H,marginBlockStart:H,marginBlockEnd:H,marginInline:H,marginInlineStart:H,marginInlineEnd:H,backgroundPositionX:H,backgroundPositionY:H,...OC,zIndex:mu,fillOpacity:kn,strokeOpacity:kn,numOctaves:mu},MC={...ic,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:Ls,WebkitFilter:Ls},bg=e=>MC[e];function wg(e,t){let n=bg(e);return n!==Ls&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IC=new Set(["auto","none","0"]);function DC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!IC.has(s)&&Ln(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=wg(n,o)}class NC extends ec{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let f=t[a];if(typeof f=="string"&&(f=f.trim(),Wa(f))){const d=pg(f,n.current);d!==void 0&&(t[a]=d),a===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!mg.has(r)||t.length!==2)return;const[o,s]=t,c=pu(o),l=pu(s),u=eu(o),i=eu(s);if(u!==i&&st[r]){this.needsMeasurement=!0;return}if(c!==l)if(uu(c)&&uu(l))for(let a=0;a<t.length;a++){const f=t[a];typeof f=="string"&&(t[a]=parseFloat(f))}else st[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||jC(t[o]))&&r.push(o);r.length&&DC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=st[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,c=r[s];r[s]=st[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,i])=>{t.getValue(u).set(i)}),this.resolveNoneKeyframes()}}function kC(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const Rg=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Sg(e){return Nm(e)&&"offsetHeight"in e}const{schedule:sc}=Km(queueMicrotask,!1),Fe={x:!1,y:!1};function Cg(){return Fe.x||Fe.y}function LC(e){return e==="x"||e==="y"?Fe[e]?null:(Fe[e]=!0,()=>{Fe[e]=!1}):Fe.x||Fe.y?null:(Fe.x=Fe.y=!0,()=>{Fe.x=Fe.y=!1})}function _g(e,t){const n=kC(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function gu(e){return!(e.pointerType==="touch"||Cg())}function FC(e,t,n={}){const[r,o,s]=_g(e,n),c=l=>{if(!gu(l))return;const{target:u}=l,i=t(u,l);if(typeof i!="function"||!u)return;const a=f=>{gu(f)&&(i(f),u.removeEventListener("pointerleave",a))};u.addEventListener("pointerleave",a,o)};return r.forEach(l=>{l.addEventListener("pointerenter",c,o)}),s}const jg=(e,t)=>t?e===t?!0:jg(e,t.parentElement):!1,ac=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,VC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pg(e){return VC.has(e.tagName)||e.isContentEditable===!0}const fo=new WeakSet;function xu(e){return t=>{t.key==="Enter"&&e(t)}}function Ni(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=xu(()=>{if(fo.has(n))return;Ni(n,"down");const o=xu(()=>{Ni(n,"up")}),s=()=>Ni(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function vu(e){return ac(e)&&!Cg()}function $C(e,t,n={}){const[r,o,s]=_g(e,n),c=l=>{const u=l.currentTarget;if(!vu(l))return;fo.add(u);const i=t(u,l),a=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),fo.has(u)&&fo.delete(u),vu(p)&&typeof i=="function"&&i(p,{success:g})},f=p=>{a(p,u===window||u===document||n.useGlobalTarget||jg(u,p.target))},d=p=>{a(p,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",d,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",c,o),Sg(l)&&(l.addEventListener("focus",i=>BC(i,o)),!Pg(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function Tg(e){return Nm(e)&&"ownerSVGElement"in e}function UC(e){return Tg(e)&&e.tagName==="svg"}const GC=[...Eg,de,ft],HC=e=>GC.find(yg(e)),yu=()=>({translate:0,scale:1,origin:0,originPoint:0}),$t=()=>({x:yu(),y:yu()}),Eu=()=>({min:0,max:0}),pe=()=>({x:Eu(),y:Eu()}),Fs={current:null},Ag={current:!1},zC=typeof window<"u";function WC(){if(Ag.current=!0,!!zC)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fs.current=e.matches;e.addEventListener("change",t),t()}else Fs.current=!1}const qC=new WeakMap;function ui(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fn(e){return typeof e=="string"||Array.isArray(e)}const cc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uc=["initial",...cc];function li(e){return ui(e.animate)||uc.some(t=>Fn(e[t]))}function Og(e){return!!(li(e)||e.variants)}function KC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(xe(o))e.addValue(r,o);else if(xe(s))e.addValue(r,Zt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,Zt(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const bu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let To={};function Mg(e){To=e}function XC(){return To}class YC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:c},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ec,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Ee.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,se.render(this.render,!1,!0))};const{latestValues:u,renderState:i}=c;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=i,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=li(n),this.isVariantNode=Og(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:a,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&xe(p)&&p.set(u[d])}}mount(t){var n;this.current=t,qC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ag.current||WC(),this.shouldReduceMotion=Fs.current),process.env.NODE_ENV!=="production"&&Ga(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=cn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&se.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in To){const n=To[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<bu.length;r++){const o=bu[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,c=t[s];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=KC(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Dm(r)||km(r))?r=parseFloat(r):!HC(r)&&ft.test(n)&&(r=wg(t,n)),this.setBaseTarget(t,xe(r)?r.get():r)),xe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=rc(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!xe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ua),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){sc.render(this.render)}}class Ig extends YC{constructor(){super(...arguments),this.KeyframeResolver=NC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Dg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ZC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ki(e){return e===void 0||e===1}function Vs({scale:e,scaleX:t,scaleY:n}){return!ki(e)||!ki(t)||!ki(n)}function yt(e){return Vs(e)||Ng(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ng(e){return wu(e.x)||wu(e.y)}function wu(e){return e&&e!=="0%"}function Ao(e,t,n){const r=e-n,o=t*r;return n+o}function Ru(e,t,n,r,o){return o!==void 0&&(e=Ao(e,o,r)),Ao(e,n,r)+t}function Bs(e,t=0,n=1,r,o){e.min=Ru(e.min,t,n,r,o),e.max=Ru(e.max,t,n,r,o)}function kg(e,{x:t,y:n}){Bs(e.x,t.translate,t.scale,t.originPoint),Bs(e.y,n.translate,n.scale,n.originPoint)}const Su=.999999999999,Cu=1.0000000000001;function JC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,c;for(let l=0;l<o;l++){s=n[l],c=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,kg(e,c)),r&&yt(s.latestValues)&&Gt(e,s.latestValues))}t.x<Cu&&t.x>Su&&(t.x=1),t.y<Cu&&t.y>Su&&(t.y=1)}function Ut(e,t){e.min=e.min+t,e.max=e.max+t}function _u(e,t,n,r,o=.5){const s=ue(e.min,e.max,o);Bs(e,t,n,s,r)}function Gt(e,t){_u(e.x,t.x,t.scaleX,t.scale,t.originX),_u(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lg(e,t){return Dg(QC(e.getBoundingClientRect(),t))}function e_(e,t,n){const r=Lg(e,n),{scroll:o}=t;return o&&(Ut(r.x,o.offset.x),Ut(r.y,o.offset.y)),r}const t_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n_=an.length;function r_(e,t,n){let r="",o=!0;for(let s=0;s<n_;s++){const c=an[s],l=e[c];if(l===void 0)continue;let u=!0;if(typeof l=="number"?u=l===(c.startsWith("scale")?1:0):u=parseFloat(l)===0,!u||n){const i=Rg(l,ic[c]);if(!u){o=!1;const a=t_[c]||c;r+=`${a}(${i}) `}n&&(t[c]=i)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function lc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let c=!1,l=!1;for(const u in t){const i=t[u];if(cn.has(u)){c=!0;continue}else if(Ym(u)){o[u]=i;continue}else{const a=Rg(i,ic[u]);u.startsWith("origin")?(l=!0,s[u]=a):r[u]=a}}if(t.transform||(c||n?r.transform=r_(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:i="50%",originZ:a=0}=s;r.transformOrigin=`${u} ${i} ${a}`}}function Fg(e,{style:t,vars:n},r,o){const s=e.style;let c;for(c in t)s[c]=t[c];o==null||o.applyProjectionStyles(s,r);for(c in n)s.setProperty(c,n[c])}function ju(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const dn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(H.test(e))e=parseFloat(e);else return e;const n=ju(e,t.target.x),r=ju(e,t.target.y);return`${n}% ${r}%`}},o_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ft.parse(e);if(o.length>5)return r;const s=ft.createTransformer(e),c=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;o[0+c]/=l,o[1+c]/=u;const i=ue(l,u,.5);return typeof o[2+c]=="number"&&(o[2+c]/=i),typeof o[3+c]=="number"&&(o[3+c]/=i),s(o)}},$s={borderRadius:{...dn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dn,borderTopRightRadius:dn,borderBottomLeftRadius:dn,borderBottomRightRadius:dn,boxShadow:o_};function Vg(e,{layout:t,layoutId:n}){return cn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$s[e]||e==="opacity")}function fc(e,t,n){var c;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const l in r)(xe(r[l])||o&&xe(o[l])||Vg(l,e)||((c=n==null?void 0:n.getValue(l))==null?void 0:c.liveStyle)!==void 0)&&(s[l]=r[l]);return s}function i_(e){return window.getComputedStyle(e)}class s_ extends Ig{constructor(){super(...arguments),this.type="html",this.renderInstance=Fg}readValueFromInstance(t,n){var r;if(cn.has(n))return(r=this.projection)!=null&&r.isProjecting?Ps(n):NS(t,n);{const o=i_(t),s=(Ym(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lg(t,n)}build(t,n,r){lc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fc(t,n,r)}}const a_={offset:"stroke-dashoffset",array:"stroke-dasharray"},c_={offset:"strokeDashoffset",array:"strokeDasharray"};function u_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?a_:c_;e[s.offset]=H.transform(-r);const c=H.transform(t),l=H.transform(n);e[s.array]=`${c} ${l}`}const l_=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Bg(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,i,a){if(lc(e,l,i),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(a==null?void 0:a.transformBox)??"fill-box",delete f.transformBox);for(const p of l_)f[p]!==void 0&&(d[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&u_(f,o,s,c,!1)}const $g=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ug=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f_(e,t,n,r){Fg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute($g.has(o)?o:oc(o),t.attrs[o])}function Gg(e,t,n){const r=fc(e,t,n);for(const o in e)if(xe(e[o])||xe(t[o])){const s=an.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class d_ extends Ig{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cn.has(n)){const r=bg(n);return r&&r.default||0}return n=$g.has(n)?n:oc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Gg(t,n,r)}build(t,n,r){Bg(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){f_(t,n,r,o)}mount(t){this.isSVGTag=Ug(t.tagName),super.mount(t)}}const h_=uc.length;function Hg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Hg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<h_;n++){const r=uc[n],o=e.props[r];(Fn(o)||o===!1)&&(t[r]=o)}return t}function zg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const p_=[...cc].reverse(),m_=cc.length;function g_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CC(e,n,r)))}function x_(e){let t=g_(e),n=Pu(),r=!0;const o=u=>(i,a)=>{var d;const f=qt(e,a,u==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:g,...m}=f;i={...i,...m,...g}}return i};function s(u){t=u(e)}function c(u){const{props:i}=e,a=Hg(e.parent)||{},f=[],d=new Set;let p={},g=1/0;for(let x=0;x<m_;x++){const y=p_[x],E=n[y],b=i[y]!==void 0?i[y]:a[y],R=Fn(b),w=y===u?E.isActive:null;w===!1&&(g=x);let P=b===a[y]&&b!==i[y]&&R;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),E.protectedKeys={...p},!E.isActive&&w===null||!b&&!E.prevProp||ui(b)||typeof b=="boolean")continue;const C=v_(E.prevProp,b);let _=C||y===u&&E.isActive&&!P&&R||x>g&&R,M=!1;const j=Array.isArray(b)?b:[b];let A=j.reduce(o(y),{});w===!1&&(A={});const{prevResolvedValues:I={}}=E,F={...I,...A},B=G=>{_=!0,d.has(G)&&(M=!0,d.delete(G)),E.needsAnimating[G]=!0;const $=e.getValue(G);$&&($.liveStyle=!1)};for(const G in F){const $=A[G],V=I[G];if(p.hasOwnProperty(G))continue;let T=!1;Ds($)&&Ds(V)?T=!zg($,V):T=$!==V,T?$!=null?B(G):d.add(G):$!==void 0&&d.has(G)?B(G):E.protectedKeys[G]=!0}E.prevProp=b,E.prevResolvedValues=A,E.isActive&&(p={...p,...A}),r&&e.blockInitialAnimation&&(_=!1);const q=P&&C;_&&(!q||M)&&f.push(...j.map(G=>{const $={type:y};if(typeof G=="string"&&r&&!q&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,T=qt(V,G);if(V.enteringChildren&&T){const{delayChildren:L}=T.transition||{};$.delay=hg(V.enteringChildren,e,L)}}return{animation:G,options:$}}))}if(d.size){const x={};if(typeof i.initial!="boolean"){const y=qt(e,Array.isArray(i.initial)?i.initial[0]:i.initial);y&&y.transition&&(x.transition=y.transition)}d.forEach(y=>{const E=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=E??null}),f.push({animation:x})}let m=!!f.length;return r&&(i.initial===!1||i.initial===i.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function l(u,i){var f;if(n[u].isActive===i)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,i)}),n[u].isActive=i;const a=c(u);for(const d in n)n[d].protectedKeys={};return a}return{animateChanges:c,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Pu()}}}function v_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zg(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pu(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}function Tu(e,t){e.min=t.min,e.max=t.max}function Ne(e,t){Tu(e.x,t.x),Tu(e.y,t.y)}function Au(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Wg=1e-4,y_=1-Wg,E_=1+Wg,qg=.01,b_=0-qg,w_=0+qg;function be(e){return e.max-e.min}function R_(e,t,n){return Math.abs(e-t)<=n}function Ou(e,t,n,r=.5){e.origin=r,e.originPoint=ue(t.min,t.max,e.origin),e.scale=be(n)/be(t),e.translate=ue(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y_&&e.scale<=E_||isNaN(e.scale))&&(e.scale=1),(e.translate>=b_&&e.translate<=w_||isNaN(e.translate))&&(e.translate=0)}function _n(e,t,n,r){Ou(e.x,t.x,n.x,r?r.originX:void 0),Ou(e.y,t.y,n.y,r?r.originY:void 0)}function Mu(e,t,n){e.min=n.min+t.min,e.max=e.min+be(t)}function S_(e,t,n){Mu(e.x,t.x,n.x),Mu(e.y,t.y,n.y)}function Iu(e,t,n){e.min=t.min-n.min,e.max=e.min+be(t)}function Oo(e,t,n){Iu(e.x,t.x,n.x),Iu(e.y,t.y,n.y)}function Du(e,t,n,r,o){return e-=t,e=Ao(e,1/n,r),o!==void 0&&(e=Ao(e,1/o,r)),e}function C_(e,t=0,n=1,r=.5,o,s=e,c=e){if(Ke.test(t)&&(t=parseFloat(t),t=ue(c.min,c.max,t/100)-c.min),typeof t!="number")return;let l=ue(s.min,s.max,r);e===s&&(l-=t),e.min=Du(e.min,t,n,l,o),e.max=Du(e.max,t,n,l,o)}function Nu(e,t,[n,r,o],s,c){C_(e,t[n],t[r],t[o],t.scale,s,c)}const __=["x","scaleX","originX"],j_=["y","scaleY","originY"];function ku(e,t,n,r){Nu(e.x,t,__,n?n.x:void 0,r?r.x:void 0),Nu(e.y,t,j_,n?n.y:void 0,r?r.y:void 0)}function Lu(e){return e.translate===0&&e.scale===1}function Kg(e){return Lu(e.x)&&Lu(e.y)}function Fu(e,t){return e.min===t.min&&e.max===t.max}function P_(e,t){return Fu(e.x,t.x)&&Fu(e.y,t.y)}function Vu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xg(e,t){return Vu(e.x,t.x)&&Vu(e.y,t.y)}function Bu(e){return be(e.x)/be(e.y)}function $u(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ae(e){return[e("x"),e("y")]}function T_(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||s||c)&&(r=`translate3d(${o}px, ${s}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:i,rotate:a,rotateX:f,rotateY:d,skewX:p,skewY:g}=n;i&&(r=`perspective(${i}px) ${r}`),a&&(r+=`rotate(${a}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const Yg=["TopLeft","TopRight","BottomLeft","BottomRight"],A_=Yg.length,Uu=e=>typeof e=="string"?parseFloat(e):e,Gu=e=>typeof e=="number"||H.test(e);function O_(e,t,n,r,o,s){o?(e.opacity=ue(0,n.opacity??1,M_(r)),e.opacityExit=ue(t.opacity??1,0,I_(r))):s&&(e.opacity=ue(t.opacity??1,n.opacity??1,r));for(let c=0;c<A_;c++){const l=`border${Yg[c]}Radius`;let u=Hu(t,l),i=Hu(n,l);if(u===void 0&&i===void 0)continue;u||(u=0),i||(i=0),u===0||i===0||Gu(u)===Gu(i)?(e[l]=Math.max(ue(Uu(u),Uu(i),r),0),(Ke.test(i)||Ke.test(u))&&(e[l]+="%")):e[l]=i}(t.rotate||n.rotate)&&(e.rotate=ue(t.rotate||0,n.rotate||0,r))}function Hu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const M_=Zg(0,.5,Hm),I_=Zg(.5,.95,Ie);function Zg(e,t,n){return r=>r<e?0:r>t?1:n(Nn(e,t,r))}function D_(e,t,n){const r=xe(e)?e:Zt(e);return r.start(nc("",r,t,n)),r.animation}function Vn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const N_=(e,t)=>e.depth-t.depth;class k_{constructor(){this.children=[],this.isDirty=!1}add(t){Va(this.children,t),this.isDirty=!0}remove(t){Ba(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(N_),this.isDirty=!1,this.children.forEach(t)}}function L_(e,t){const n=Ee.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(lt(r),e(s-t))};return se.setup(r,!0),()=>lt(r)}function ho(e){return xe(e)?e.get():e}class F_{constructor(){this.members=[]}add(t){Va(this.members,t),t.scheduleRender()}remove(t){if(Ba(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const po={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Li=["","X","Y","Z"],V_=1e3;let B_=0;function Fi(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",se,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qg(r)}function Jg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},l=t==null?void 0:t()){this.id=B_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(G_),this.nodes.forEach(q_),this.nodes.forEach(K_),this.nodes.forEach(H_)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new k_)}addEventListener(c,l){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Ua),this.eventHandlers.get(c).add(l)}notifyListeners(c,...l){const u=this.eventHandlers.get(c);u&&u.notify(...l)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=Tg(c)&&!UC(c),this.instance=c;const{layoutId:l,layout:u,visualElement:i}=this.options;if(i&&!i.current&&i.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let a,f=0;const d=()=>this.root.updateBlockedByResize=!1;se.read(()=>{f=window.innerWidth}),e(c,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,a&&a(),a=L_(d,250),po.hasAnimatedSinceResize&&(po.hasAnimatedSinceResize=!1,this.nodes.forEach(qu)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&i&&(l||u)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||i.getDefaultTransition()||J_,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=i.getProps(),y=!this.targetLayout||!Xg(this.targetLayout,p),E=!f&&d;if(this.options.layoutRoot||this.resumeFrom||E||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...tc(g,"layout"),onPlay:m,onComplete:x};(i.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(a,E)}else f||qu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(X_),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const f=this.path[a];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(zu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Wu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(W_),this.nodes.forEach($_),this.nodes.forEach(U_)):this.nodes.forEach(Wu),this.clearAllSnapshots();const l=Ee.now();me.delta=Ye(0,1e3/60,l-me.timestamp),me.timestamp=l,me.isProcessing=!0,Ti.update.process(me),Ti.preRender.process(me),Ti.render.process(me),me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(z_),this.sharedNodes.forEach(Y_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!be(this.snapshot.measuredBox.x)&&!be(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Kg(this.projectionDelta),u=this.getTransformTemplate(),i=u?u(this.latestValues,""):void 0,a=i!==this.prevTransformTemplateValue;c&&this.instance&&(l||yt(this.latestValues)||a)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return c&&(u=this.removeTransform(u)),ej(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:c}=this.options;if(!c)return pe();const l=c.measureViewportBox();if(!(((i=this.scroll)==null?void 0:i.wasRoot)||this.path.some(tj))){const{scroll:a}=this.root;a&&(Ut(l.x,a.offset.x),Ut(l.y,a.offset.y))}return l}removeElementScroll(c){var u;const l=pe();if(Ne(l,c),(u=this.scroll)!=null&&u.wasRoot)return l;for(let i=0;i<this.path.length;i++){const a=this.path[i],{scroll:f,options:d}=a;a!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&Ne(l,c),Ut(l.x,f.offset.x),Ut(l.y,f.offset.y))}return l}applyTransform(c,l=!1){const u=pe();Ne(u,c);for(let i=0;i<this.path.length;i++){const a=this.path[i];!l&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Gt(u,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),yt(a.latestValues)&&Gt(u,a.latestValues)}return yt(this.latestValues)&&Gt(u,this.latestValues),u}removeTransform(c){const l=pe();Ne(l,c);for(let u=0;u<this.path.length;u++){const i=this.path[u];if(!i.instance||!yt(i.latestValues))continue;Vs(i.latestValues)&&i.updateSnapshot();const a=pe(),f=i.measurePageBox();Ne(a,f),ku(l,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,a)}return yt(this.latestValues)&&ku(l,this.latestValues),l}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(c||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:f}=this.options;if(!this.layout||!(a||f))return;this.resolvedRelativeTargetAt=me.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pe(),this.targetWithTransforms=pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),S_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ne(this.target,this.layout.layoutBox),kg(this.target,this.targetDelta)):Ne(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Vs(this.parent.latestValues)||Ng(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,l,u){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pe(),this.relativeTargetOrigin=pe(),Oo(this.relativeTargetOrigin,l,u),Ne(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===me.timestamp&&(u=!1),u)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||a))return;Ne(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;JC(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=pe());const{target:p}=c;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Au(this.prevProjectionDelta.x,this.projectionDelta.x),Au(this.prevProjectionDelta.y,this.projectionDelta.y)),_n(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!$u(this.projectionDelta.x,this.prevProjectionDelta.x)||!$u(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),c){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$t(),this.projectionDelta=$t(),this.projectionDeltaWithTransform=$t()}setAnimationOrigin(c,l=!1){const u=this.snapshot,i=u?u.latestValues:{},a={...this.latestValues},f=$t();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const d=pe(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,x=this.getStack(),y=!x||x.members.length<=1,E=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Q_));this.animationProgress=0;let b;this.mixTargetDelta=R=>{const w=R/1e3;Ku(f.x,c.x,w),Ku(f.y,c.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Z_(this.relativeTarget,this.relativeTargetOrigin,d,w),b&&P_(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=pe()),Ne(b,this.relativeTarget)),m&&(this.animationValues=a,O_(a,i,this.latestValues,w,E,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var l,u,i;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(i=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||i.stop(),this.pendingAnimation&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{po.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zt(0)),this.currentAnimation=D_(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),c.onUpdate&&c.onUpdate(a)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(V_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:l,target:u,layout:i,latestValues:a}=c;if(!(!l||!u||!i)){if(this!==c&&this.layout&&i&&ex(this.options.animationType,this.layout.layoutBox,i.layoutBox)){u=this.target||pe();const f=be(this.layout.layoutBox.x);u.x.min=c.target.x.min,u.x.max=u.x.min+f;const d=be(this.layout.layoutBox.y);u.y.min=c.target.y.min,u.y.max=u.y.min+d}Ne(l,u),Gt(l,a),_n(this.projectionDeltaWithTransform,this.layoutCorrected,l,a)}}registerSharedNode(c,l){this.sharedNodes.has(c)||this.sharedNodes.set(c,new F_),this.sharedNodes.get(c).add(l);const i=l.options.initialPromotionConfig;l.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(l):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var l;const{layoutId:c}=this.options;return c?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:c}=this.options;return c?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:l,preserveFollowOpacity:u}={}){const i=this.getStack();i&&i.promote(this,u),c&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let l=!1;const{latestValues:u}=c;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const i={};u.z&&Fi("z",c,i,this.animationValues);for(let a=0;a<Li.length;a++)Fi(`rotate${Li[a]}`,c,i,this.animationValues),Fi(`skew${Li[a]}`,c,i,this.animationValues);c.render();for(const a in i)c.setStaticValue(a,i[a]),this.animationValues&&(this.animationValues[a]=i[a]);c.scheduleRender()}applyProjectionStyles(c,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=ho(l==null?void 0:l.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none";return}const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=ho(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!yt(this.latestValues)&&(c.transform=u?u({},""):"none",this.hasProjected=!1);return}c.visibility="";const a=i.animationValues||i.latestValues;this.applyTransformsToTarget();let f=T_(this.projectionDeltaWithTransform,this.treeScale,a);u&&(f=u(a,f)),c.transform=f;const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,i.animationValues?c.opacity=i===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:c.opacity=i===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const g in $s){if(a[g]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:y}=$s[g],E=f==="none"?a[g]:m(a[g],i);if(x){const b=x.length;for(let R=0;R<b;R++)c[x[R]]=E}else y?this.options.visualElement.renderState.vars[g]=E:c[g]=E}this.options.layoutId&&(c.pointerEvents=i===this?ho(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var l;return(l=c.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(zu),this.root.sharedNodes.clear()}}}function $_(e){e.updateLayout()}function U_(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,c=t.source!==e.layout.source;s==="size"?Ae(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],p=be(d);d.min=r[f].min,d.max=d.min+p}):ex(s,t.layoutBox,r)&&Ae(f=>{const d=c?t.measuredBox[f]:t.layoutBox[f],p=be(r[f]);d.max=d.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=$t();_n(l,r,t.layoutBox);const u=$t();c?_n(u,e.applyTransform(o,!0),t.measuredBox):_n(u,r,t.layoutBox);const i=!Kg(l);let a=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:p}=f;if(d&&p){const g=pe();Oo(g,t.layoutBox,d.layoutBox);const m=pe();Oo(m,r,p.layoutBox),Xg(g,m)||(a=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:i,hasRelativeLayoutChanged:a})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function G_(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function H_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function z_(e){e.clearSnapshot()}function zu(e){e.clearMeasurements()}function Wu(e){e.isLayoutDirty=!1}function W_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function q_(e){e.resolveTargetDelta()}function K_(e){e.calcProjection()}function X_(e){e.resetSkewAndRotation()}function Y_(e){e.removeLeadSnapshot()}function Ku(e,t,n){e.translate=ue(t.translate,0,n),e.scale=ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xu(e,t,n,r){e.min=ue(t.min,n.min,r),e.max=ue(t.max,n.max,r)}function Z_(e,t,n,r){Xu(e.x,t.x,n.x,r),Xu(e.y,t.y,n.y,r)}function Q_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const J_={duration:.45,ease:[.4,0,.1,1]},Yu=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Zu=Yu("applewebkit/")&&!Yu("chrome/")?Math.round:Ie;function Qu(e){e.min=Zu(e.min),e.max=Zu(e.max)}function ej(e){Qu(e.x),Qu(e.y)}function ex(e,t,n){return e==="position"||e==="preserve-aspect"&&!R_(Bu(t),Bu(n),.2)}function tj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const nj=Jg({attachResizeListener:(e,t)=>Vn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vi={current:void 0},tx=Jg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vi.current){const e=new nj({});e.mount(window),e.setOptions({layoutScroll:!0}),Vi.current=e}return Vi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dc=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ju(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rj(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ju(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ju(e[o],null)}}}}function oj(...e){return v.useCallback(rj(...e),e)}class ij extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Sg(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sj({children:e,isPresent:t,anchorX:n,root:r}){var a;const o=S.useId(),s=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=S.useContext(dc),u=((a=e.props)==null?void 0:a.ref)??(e==null?void 0:e.ref),i=oj(s,u);return S.useInsertionEffect(()=>{const{width:f,height:d,top:p,left:g,right:m}=c.current;if(t||!s.current||!f||!d)return;const x=n==="left"?`left: ${g}`:`right: ${m}`;s.current.dataset.motionPopId=o;const y=document.createElement("style");l&&(y.nonce=l);const E=r??document.head;return E.appendChild(y),y.sheet&&y.sheet.insertRule(`
67
- [data-motion-pop-id="${o}"] {
66
+ Defaulting to \`null\`.`}var rw=xp,ow=yp,Na="Radio",[iw,bp]=fe(Na),[sw,aw]=iw(Na),wp=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:c,value:l="on",onCheck:u,form:s,...a}=e,[d,f]=v.useState(null),p=h.useComposedRefs(t,x=>f(x)),m=v.useRef(!1),g=d?s||!!d.closest("form"):!0;return h.jsxRuntimeExports.jsxs(sw,{scope:n,checked:o,disabled:c,children:[h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"radio","aria-checked":o,"data-state":_p(o),"data-disabled":c?"":void 0,disabled:c,value:l,...a,ref:p,onClick:N(e.onClick,x=>{o||u==null||u(),g&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),g&&h.jsxRuntimeExports.jsx(Cp,{control:d,bubbles:!m.current,name:r,value:l,checked:o,required:i,disabled:c,form:s,style:{transform:"translateX(-100%)"}})]})});wp.displayName=Na;var Rp="RadioIndicator",Sp=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=aw(Rp,n);return h.jsxRuntimeExports.jsx(Re,{present:r||i.checked,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":_p(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});Sp.displayName=Rp;var cw="RadioBubbleInput",Cp=v.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const c=v.useRef(null),l=h.useComposedRefs(c,i),u=zn(n),s=Hn(t);return v.useEffect(()=>{const a=c.current;if(!a)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(u!==n&&p){const m=new Event("click",{bubbles:r});p.call(a,n),a.dispatchEvent(m)}},[u,n,r]),h.jsxRuntimeExports.jsx(h.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Cp.displayName=cw;function _p(e){return e?"checked":"unchecked"}var uw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ri="RadioGroup",[lw]=fe(ri,[mt,bp]),jp=mt(),Pp=bp(),[dw,fw]=lw(ri),Tp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:c=!1,disabled:l=!1,orientation:u,dir:s,loop:a=!0,onValueChange:d,...f}=e,p=jp(n),m=ht(s),[g,x]=me({prop:i,defaultProp:o??null,onChange:d,caller:ri});return h.jsxRuntimeExports.jsx(dw,{scope:n,name:r,required:c,disabled:l,value:g,onValueChange:x,children:h.jsxRuntimeExports.jsx(Zo,{asChild:!0,...p,orientation:u,dir:m,loop:a,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"radiogroup","aria-required":c,"aria-orientation":u,"data-disabled":l?"":void 0,dir:m,...f,ref:t})})})});Tp.displayName=ri;var Ap="RadioGroupItem",Op=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=fw(Ap,n),c=i.disabled||r,l=jp(n),u=Pp(n),s=v.useRef(null),a=h.useComposedRefs(t,s),d=i.value===o.value,f=v.useRef(!1);return v.useEffect(()=>{const p=g=>{uw.includes(g.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",m)}},[]),h.jsxRuntimeExports.jsx(Qo,{asChild:!0,...l,focusable:!c,active:d,children:h.jsxRuntimeExports.jsx(wp,{disabled:c,required:i.required,checked:d,...u,...o,name:i.name,ref:a,onCheck:()=>i.onValueChange(o.value),onKeyDown:N(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:N(o.onFocus,()=>{var p;f.current&&((p=s.current)==null||p.click())})})})});Op.displayName=Ap;var hw="RadioGroupIndicator",Mp=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Pp(n);return h.jsxRuntimeExports.jsx(Sp,{...o,...r,ref:t})});Mp.displayName=hw;var pw=Tp,mw=Op,gw=Mp,xw=[" ","Enter","ArrowUp","ArrowDown"],vw=[" ","Enter"],Tt="Select",[oi,ii,yw]=$n(Tt),[on]=fe(Tt,[yw,pt]),si=pt(),[Ew,gt]=on(Tt),[bw,ww]=on(Tt),Ip=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:c,defaultValue:l,onValueChange:u,dir:s,name:a,autoComplete:d,disabled:f,required:p,form:m}=e,g=si(t),[x,y]=v.useState(null),[E,b]=v.useState(null),[w,R]=v.useState(!1),_=ht(s),[j,P]=me({prop:r,defaultProp:o??!1,onChange:i,caller:Tt}),[T,C]=me({prop:c,defaultProp:l,onChange:u,caller:Tt}),O=v.useRef(null),I=x?m||!!x.closest("form"):!0,[k,B]=v.useState(new Set),q=Array.from(k).map(U=>U.props.value).join(";");return h.jsxRuntimeExports.jsx(Ko,{...g,children:h.jsxRuntimeExports.jsxs(Ew,{required:p,scope:t,trigger:x,onTriggerChange:y,valueNode:E,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:R,contentId:xe(),value:T,onValueChange:C,open:j,onOpenChange:P,dir:_,triggerPointerDownPosRef:O,disabled:f,children:[h.jsxRuntimeExports.jsx(oi.Provider,{scope:t,children:h.jsxRuntimeExports.jsx(bw,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{B(G=>new Set(G).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{B(G=>{const $=new Set(G);return $.delete(U),$})},[]),children:n})}),I?h.jsxRuntimeExports.jsxs(Qp,{"aria-hidden":!0,required:p,tabIndex:-1,name:a,autoComplete:d,value:T,onChange:U=>C(U.target.value),disabled:f,form:m,children:[T===void 0?h.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(k)]},q):null]})})};Ip.displayName=Tt;var Dp="SelectTrigger",Np=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=si(n),c=gt(Dp,n),l=c.disabled||r,u=h.useComposedRefs(t,c.onTriggerChange),s=ii(n),a=v.useRef("touch"),[d,f,p]=em(g=>{const x=s().filter(b=>!b.disabled),y=x.find(b=>b.value===c.value),E=tm(x,g,y);E!==void 0&&c.onValueChange(E.value)}),m=g=>{l||(c.onOpenChange(!0),p()),g&&(c.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return h.jsxRuntimeExports.jsx(qn,{asChild:!0,...i,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Jp(c.value)?"":void 0,...o,ref:u,onClick:N(o.onClick,g=>{g.currentTarget.focus(),a.current!=="mouse"&&m(g)}),onPointerDown:N(o.onPointerDown,g=>{a.current=g.pointerType;const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(m(g),g.preventDefault())}),onKeyDown:N(o.onKeyDown,g=>{const x=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(x&&g.key===" ")&&xw.includes(g.key)&&(m(),g.preventDefault())})})})});Np.displayName=Dp;var kp="SelectValue",Lp=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:c="",...l}=e,u=gt(kp,n),{onValueNodeHasChildrenChange:s}=u,a=i!==void 0,d=h.useComposedRefs(t,u.onValueNodeChange);return h.useLayoutEffect2(()=>{s(a)},[s,a]),h.jsxRuntimeExports.jsx(h.Primitive.span,{...l,ref:d,style:{pointerEvents:"none"},children:Jp(u.value)?h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:c}):i})});Lp.displayName=kp;var Rw="SelectIcon",Fp=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsxRuntimeExports.jsx(h.Primitive.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Fp.displayName=Rw;var Sw="SelectPortal",Vp=e=>h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,...e});Vp.displayName=Sw;var At="SelectContent",Bp=v.forwardRef((e,t)=>{const n=gt(At,e.__scopeSelect),[r,o]=v.useState();if(h.useLayoutEffect2(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Js.createPortal(h.jsxRuntimeExports.jsx($p,{scope:e.__scopeSelect,children:h.jsxRuntimeExports.jsx(oi.Slot,{scope:e.__scopeSelect,children:h.jsxRuntimeExports.jsx("div",{children:e.children})})}),i):null}return h.jsxRuntimeExports.jsx(Up,{...e,ref:t})});Bp.displayName=At;var Fe=10,[$p,xt]=on(At),Cw="SelectContentImpl",_w=h.createSlot("SelectContent.RemoveScroll"),Up=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:c,side:l,sideOffset:u,align:s,alignOffset:a,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x,...y}=e,E=gt(At,n),[b,w]=v.useState(null),[R,_]=v.useState(null),j=h.useComposedRefs(t,L=>w(L)),[P,T]=v.useState(null),[C,O]=v.useState(null),I=ii(n),[k,B]=v.useState(!1),q=v.useRef(!1);v.useEffect(()=>{if(b)return $o(b)},[b]),Vo();const U=v.useCallback(L=>{const[W,...K]=I().map(D=>D.ref.current),[H]=K.slice(-1),J=document.activeElement;for(const D of L)if(D===J||(D==null||D.scrollIntoView({block:"nearest"}),D===W&&R&&(R.scrollTop=0),D===H&&R&&(R.scrollTop=R.scrollHeight),D==null||D.focus(),document.activeElement!==J))return},[I,R]),G=v.useCallback(()=>U([P,b]),[U,P,b]);v.useEffect(()=>{k&&G()},[k,G]);const{onOpenChange:$,triggerPointerDownPosRef:V}=E;v.useEffect(()=>{if(b){let L={x:0,y:0};const W=H=>{var J,D;L={x:Math.abs(Math.round(H.pageX)-(((J=V.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(H.pageY)-(((D=V.current)==null?void 0:D.y)??0))}},K=H=>{L.x<=10&&L.y<=10?H.preventDefault():b.contains(H.target)||$(!1),document.removeEventListener("pointermove",W),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",K,{capture:!0})}}},[b,$,V]),v.useEffect(()=>{const L=()=>$(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[$]);const[A,F]=em(L=>{const W=I().filter(J=>!J.disabled),K=W.find(J=>J.ref.current===document.activeElement),H=tm(W,L,K);H&&setTimeout(()=>H.ref.current.focus())}),Y=v.useCallback((L,W,K)=>{const H=!q.current&&!K;(E.value!==void 0&&E.value===W||H)&&(T(L),H&&(q.current=!0))},[E.value]),Q=v.useCallback(()=>b==null?void 0:b.focus(),[b]),X=v.useCallback((L,W,K)=>{const H=!q.current&&!K;(E.value!==void 0&&E.value===W||H)&&O(L)},[E.value]),ee=r==="popper"?gs:Gp,Z=ee===gs?{side:l,sideOffset:u,align:s,alignOffset:a,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x}:{};return h.jsxRuntimeExports.jsx($p,{scope:n,content:b,viewport:R,onViewportChange:_,itemRefCallback:Y,selectedItem:P,onItemLeave:Q,itemTextRefCallback:X,focusSelectedItem:G,selectedItemText:C,position:r,isPositioned:k,searchRef:A,children:h.jsxRuntimeExports.jsx(Gn,{as:_w,allowPinchZoom:!0,children:h.jsxRuntimeExports.jsx(Un,{asChild:!0,trapped:E.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:N(o,L=>{var W;(W=E.trigger)==null||W.focus({preventScroll:!0}),L.preventDefault()}),children:h.jsxRuntimeExports.jsx(tn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:h.jsxRuntimeExports.jsx(ee,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:L=>L.preventDefault(),...y,...Z,onPlaced:()=>B(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,L=>{const W=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!W&&L.key.length===1&&F(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let H=I().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(L.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const J=L.target,D=H.indexOf(J);H=H.slice(D+1)}setTimeout(()=>U(H)),L.preventDefault()}})})})})})})});Up.displayName=Cw;var jw="SelectItemAlignedPosition",Gp=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=gt(At,n),c=xt(At,n),[l,u]=v.useState(null),[s,a]=v.useState(null),d=h.useComposedRefs(t,j=>a(j)),f=ii(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:E}=c,b=v.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&s&&g&&x&&y){const j=i.trigger.getBoundingClientRect(),P=s.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),C=y.getBoundingClientRect();if(i.dir!=="rtl"){const J=C.left-P.left,D=T.left-J,ae=j.left-D,ye=j.width+ae,ot=Math.max(ye,P.width),fn=window.innerWidth-Fe,hn=So(D,[Fe,Math.max(Fe,fn-ot)]);l.style.minWidth=ye+"px",l.style.left=hn+"px"}else{const J=P.right-C.right,D=window.innerWidth-T.right-J,ae=window.innerWidth-j.right-D,ye=j.width+ae,ot=Math.max(ye,P.width),fn=window.innerWidth-Fe,hn=So(D,[Fe,Math.max(Fe,fn-ot)]);l.style.minWidth=ye+"px",l.style.right=hn+"px"}const O=f(),I=window.innerHeight-Fe*2,k=g.scrollHeight,B=window.getComputedStyle(s),q=parseInt(B.borderTopWidth,10),U=parseInt(B.paddingTop,10),G=parseInt(B.borderBottomWidth,10),$=parseInt(B.paddingBottom,10),V=q+U+k+$+G,A=Math.min(x.offsetHeight*5,V),F=window.getComputedStyle(g),Y=parseInt(F.paddingTop,10),Q=parseInt(F.paddingBottom,10),X=j.top+j.height/2-Fe,ee=I-X,Z=x.offsetHeight/2,L=x.offsetTop+Z,W=q+U+L,K=V-W;if(W<=X){const J=O.length>0&&x===O[O.length-1].ref.current;l.style.bottom="0px";const D=s.clientHeight-g.offsetTop-g.offsetHeight,ae=Math.max(ee,Z+(J?Q:0)+D+G),ye=W+ae;l.style.height=ye+"px"}else{const J=O.length>0&&x===O[0].ref.current;l.style.top="0px";const ae=Math.max(X,q+g.offsetTop+(J?Y:0)+Z)+K;l.style.height=ae+"px",g.scrollTop=W-X+g.offsetTop}l.style.margin=`${Fe}px 0`,l.style.minHeight=A+"px",l.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,l,s,g,x,y,i.dir,r]);h.useLayoutEffect2(()=>b(),[b]);const[w,R]=v.useState();h.useLayoutEffect2(()=>{s&&R(window.getComputedStyle(s).zIndex)},[s]);const _=v.useCallback(j=>{j&&m.current===!0&&(b(),E==null||E(),m.current=!1)},[b,E]);return h.jsxRuntimeExports.jsx(Tw,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_,children:h.jsxRuntimeExports.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Gp.displayName=jw;var Pw="SelectPopperPosition",gs=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Fe,...i}=e,c=si(n);return h.jsxRuntimeExports.jsx(Xo,{...c,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});gs.displayName=Pw;var[Tw,ka]=on(At,{}),xs="SelectViewport",zp=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=xt(xs,n),c=ka(xs,n),l=h.useComposedRefs(t,i.onViewportChange),u=v.useRef(0);return h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsxRuntimeExports.jsx(oi.Slot,{scope:n,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:N(o.onScroll,s=>{const a=s.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=c;if(f!=null&&f.current&&d){const p=Math.abs(u.current-a.scrollTop);if(p>0){const m=window.innerHeight-Fe*2,g=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),y=Math.max(g,x);if(y<m){const E=y+p,b=Math.min(m,E),w=E-b;d.style.height=b+"px",d.style.bottom==="0px"&&(a.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}u.current=a.scrollTop})})})]})});zp.displayName=xs;var Hp="SelectGroup",[Aw,Ow]=on(Hp),Mw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xe();return h.jsxRuntimeExports.jsx(Aw,{scope:n,id:o,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Mw.displayName=Hp;var Wp="SelectLabel",Iw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ow(Wp,n);return h.jsxRuntimeExports.jsx(h.Primitive.div,{id:o.id,...r,ref:t})});Iw.displayName=Wp;var _o="SelectItem",[Dw,qp]=on(_o),Kp=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...c}=e,l=gt(_o,n),u=xt(_o,n),s=l.value===r,[a,d]=v.useState(i??""),[f,p]=v.useState(!1),m=h.useComposedRefs(t,E=>{var b;return(b=u.itemRefCallback)==null?void 0:b.call(u,E,r,o)}),g=xe(),x=v.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsxRuntimeExports.jsx(Dw,{scope:n,value:r,disabled:o,textId:g,isSelected:s,onItemTextChange:v.useCallback(E=>{d(b=>b||((E==null?void 0:E.textContent)??"").trim())},[]),children:h.jsxRuntimeExports.jsx(oi.ItemSlot,{scope:n,value:r,disabled:o,textValue:a,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:m,onFocus:N(c.onFocus,()=>p(!0)),onBlur:N(c.onBlur,()=>p(!1)),onClick:N(c.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:N(c.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:N(c.onPointerDown,E=>{x.current=E.pointerType}),onPointerMove:N(c.onPointerMove,E=>{var b;x.current=E.pointerType,o?(b=u.onItemLeave)==null||b.call(u):x.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(c.onPointerLeave,E=>{var b;E.currentTarget===document.activeElement&&((b=u.onItemLeave)==null||b.call(u))}),onKeyDown:N(c.onKeyDown,E=>{var w;((w=u.searchRef)==null?void 0:w.current)!==""&&E.key===" "||(vw.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});Kp.displayName=_o;var Sn="SelectItemText",Xp=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,c=gt(Sn,n),l=xt(Sn,n),u=qp(Sn,n),s=ww(Sn,n),[a,d]=v.useState(null),f=h.useComposedRefs(t,y=>d(y),u.onItemTextChange,y=>{var E;return(E=l.itemTextRefCallback)==null?void 0:E.call(l,y,u.value,u.disabled)}),p=a==null?void 0:a.textContent,m=v.useMemo(()=>h.jsxRuntimeExports.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=s;return h.useLayoutEffect2(()=>(g(m),()=>x(m)),[g,x,m]),h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(h.Primitive.span,{id:u.textId,...i,ref:f}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Js.createPortal(i.children,c.valueNode):null]})});Xp.displayName=Sn;var Yp="SelectItemIndicator",Nw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return qp(Yp,n).isSelected?h.jsxRuntimeExports.jsx(h.Primitive.span,{"aria-hidden":!0,...r,ref:t}):null});Nw.displayName=Yp;var vs="SelectScrollUpButton",kw=v.forwardRef((e,t)=>{const n=xt(vs,e.__scopeSelect),r=ka(vs,e.__scopeSelect),[o,i]=v.useState(!1),c=h.useComposedRefs(t,r.onScrollButtonChange);return h.useLayoutEffect2(()=>{if(n.viewport&&n.isPositioned){let l=function(){const s=u.scrollTop>0;i(s)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?h.jsxRuntimeExports.jsx(Zp,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});kw.displayName=vs;var ys="SelectScrollDownButton",Lw=v.forwardRef((e,t)=>{const n=xt(ys,e.__scopeSelect),r=ka(ys,e.__scopeSelect),[o,i]=v.useState(!1),c=h.useComposedRefs(t,r.onScrollButtonChange);return h.useLayoutEffect2(()=>{if(n.viewport&&n.isPositioned){let l=function(){const s=u.scrollHeight-u.clientHeight,a=Math.ceil(u.scrollTop)<s;i(a)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?h.jsxRuntimeExports.jsx(Zp,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Lw.displayName=ys;var Zp=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=xt("SelectScrollButton",n),c=v.useRef(null),l=ii(n),u=v.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return v.useEffect(()=>()=>u(),[u]),h.useLayoutEffect2(()=>{var a;const s=l().find(d=>d.ref.current===document.activeElement);(a=s==null?void 0:s.ref.current)==null||a.scrollIntoView({block:"nearest"})},[l]),h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:N(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:N(o.onPointerMove,()=>{var s;(s=i.onItemLeave)==null||s.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:N(o.onPointerLeave,()=>{u()})})}),Fw="SelectSeparator",Vw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsxRuntimeExports.jsx(h.Primitive.div,{"aria-hidden":!0,...r,ref:t})});Vw.displayName=Fw;var Es="SelectArrow",Bw=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=si(n),i=gt(Es,n),c=xt(Es,n);return i.open&&c.position==="popper"?h.jsxRuntimeExports.jsx(Yo,{...o,...r,ref:t}):null});Bw.displayName=Es;var $w="SelectBubbleInput",Qp=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),i=h.useComposedRefs(r,o),c=zn(t);return v.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&a){const d=new Event("change",{bubbles:!0});a.call(l,t),l.dispatchEvent(d)}},[c,t]),h.jsxRuntimeExports.jsx(h.Primitive.select,{...n,style:{...qd,...n.style},ref:i,defaultValue:t})});Qp.displayName=$w;function Jp(e){return e===""||e===void 0}function em(e){const t=Be(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(c=>{const l=n.current+c;t(l),(function u(s){n.current=s,window.clearTimeout(r.current),s!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function tm(e,t,n){const o=t.length>1&&Array.from(t).every(s=>s===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Uw(e,Math.max(i,0));o.length===1&&(c=c.filter(s=>s!==n));const u=c.find(s=>s.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Uw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Gw=Ip,zw=Np,Hw=Lp,Ww=Fp,qw=Vp,Kw=Bp,Xw=zp,Yw=Kp,Zw=Xp,nm=["PageUp","PageDown"],rm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],om={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},sn="Slider",[bs,Qw,Jw]=$n(sn),[im]=fe(sn,[Jw]),[eR,ai]=im(sn),sm=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:c="horizontal",disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:s=[r],value:a,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...g}=e,x=v.useRef(new Set),y=v.useRef(0),b=c==="horizontal"?tR:nR,[w=[],R]=me({prop:a,defaultProp:s,onChange:O=>{var k;(k=[...x.current][y.current])==null||k.focus(),d(O)}}),_=v.useRef(w);function j(O){const I=aR(w,O);C(O,I)}function P(O){C(O,y.current)}function T(){const O=_.current[y.current];w[y.current]!==O&&f(w)}function C(O,I,{commit:k}={commit:!1}){const B=dR(i),q=fR(Math.round((O-r)/i)*i+r,B),U=So(q,[r,o]);R((G=[])=>{const $=iR(G,U,I);if(lR($,u*i)){y.current=$.indexOf(U);const V=String($)!==String(G);return V&&k&&f($),V?$:G}else return G})}return h.jsxRuntimeExports.jsx(eR,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:y,thumbs:x.current,values:w,orientation:c,form:m,children:h.jsxRuntimeExports.jsx(bs.Provider,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(bs.Slot,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(b,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:N(g.onPointerDown,()=>{l||(_.current=w)}),min:r,max:o,inverted:p,onSlideStart:l?void 0:j,onSlideMove:l?void 0:P,onSlideEnd:l?void 0:T,onHomeKeyDown:()=>!l&&C(r,0,{commit:!0}),onEndKeyDown:()=>!l&&C(o,w.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:I})=>{if(!l){const q=nm.includes(O.key)||O.shiftKey&&rm.includes(O.key)?10:1,U=y.current,G=w[U],$=i*q*I;C(G+$,U,{commit:!0})}}})})})})});sm.displayName=sn;var[am,cm]=im(sn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tR=v.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:c,onSlideMove:l,onSlideEnd:u,onStepKeyDown:s,...a}=e,[d,f]=v.useState(null),p=h.useComposedRefs(t,b=>f(b)),m=v.useRef(void 0),g=ht(o),x=g==="ltr",y=x&&!i||!x&&i;function E(b){const w=m.current||d.getBoundingClientRect(),R=[0,w.width],j=La(R,y?[n,r]:[r,n]);return m.current=w,j(b-w.left)}return h.jsxRuntimeExports.jsx(am,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:h.jsxRuntimeExports.jsx(um,{dir:g,"data-orientation":"horizontal",...a,ref:p,style:{...a.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const w=E(b.clientX);c==null||c(w)},onSlideMove:b=>{const w=E(b.clientX);l==null||l(w)},onSlideEnd:()=>{m.current=void 0,u==null||u()},onStepKeyDown:b=>{const R=om[y?"from-left":"from-right"].includes(b.key);s==null||s({event:b,direction:R?-1:1})}})})}),nR=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...s}=e,a=v.useRef(null),d=h.useComposedRefs(t,a),f=v.useRef(void 0),p=!o;function m(g){const x=f.current||a.current.getBoundingClientRect(),y=[0,x.height],b=La(y,p?[r,n]:[n,r]);return f.current=x,b(g-x.top)}return h.jsxRuntimeExports.jsx(am,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:h.jsxRuntimeExports.jsx(um,{"data-orientation":"vertical",...s,ref:d,style:{...s.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const x=m(g.clientY);i==null||i(x)},onSlideMove:g=>{const x=m(g.clientY);c==null||c(x)},onSlideEnd:()=>{f.current=void 0,l==null||l()},onStepKeyDown:g=>{const y=om[p?"from-bottom":"from-top"].includes(g.key);u==null||u({event:g,direction:y?-1:1})}})})}),um=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:c,onEndKeyDown:l,onStepKeyDown:u,...s}=e,a=ai(sn,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{...s,ref:t,onKeyDown:N(e.onKeyDown,d=>{d.key==="Home"?(c(d),d.preventDefault()):d.key==="End"?(l(d),d.preventDefault()):nm.concat(rm).includes(d.key)&&(u(d),d.preventDefault())}),onPointerDown:N(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),a.thumbs.has(f)?f.focus():r(d)}),onPointerMove:N(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:N(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),lm="SliderTrack",dm=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ai(lm,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});dm.displayName=lm;var ws="SliderRange",fm=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ai(ws,n),i=cm(ws,n),c=v.useRef(null),l=h.useComposedRefs(t,c),u=o.values.length,s=o.values.map(f=>mm(f,o.min,o.max)),a=u>1?Math.min(...s):0,d=100-Math.max(...s);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[i.startEdge]:a+"%",[i.endEdge]:d+"%"}})});fm.displayName=ws;var Rs="SliderThumb",hm=v.forwardRef((e,t)=>{const n=Qw(e.__scopeSlider),[r,o]=v.useState(null),i=h.useComposedRefs(t,l=>o(l)),c=v.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return h.jsxRuntimeExports.jsx(rR,{...e,ref:i,index:c})}),rR=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,c=ai(Rs,n),l=cm(Rs,n),[u,s]=v.useState(null),a=h.useComposedRefs(t,E=>s(E)),d=u?c.form||!!u.closest("form"):!0,f=Hn(u),p=c.values[r],m=p===void 0?0:mm(p,c.min,c.max),g=sR(r,c.values.length),x=f==null?void 0:f[l.size],y=x?cR(x,m,l.direction):0;return v.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),h.jsxRuntimeExports.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${y}px)`},children:[h.jsxRuntimeExports.jsx(bs.ItemSlot,{scope:e.__scopeSlider,children:h.jsxRuntimeExports.jsx(h.Primitive.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":c.min,"aria-valuenow":p,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...i,ref:a,style:p===void 0?{display:"none"}:e.style,onFocus:N(e.onFocus,()=>{c.valueIndexToChangeRef.current=r})})}),d&&h.jsxRuntimeExports.jsx(pm,{name:o??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:p},r)]})});hm.displayName=Rs;var oR="RadioBubbleInput",pm=v.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=v.useRef(null),i=h.useComposedRefs(o,r),c=zn(t);return v.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&a){const d=new Event("input",{bubbles:!0});a.call(l,t),l.dispatchEvent(d)}},[c,t]),h.jsxRuntimeExports.jsx(h.Primitive.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});pm.displayName=oR;function iR(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function mm(e,t,n){const i=100/(n-t)*(e-t);return So(i,[0,100])}function sR(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function aR(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function cR(e,t,n){const r=e/2,i=La([0,50],[0,r]);return(r-i(t)*n)*n}function uR(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function lR(e,t){if(t>0){const n=uR(e);return Math.min(...n)>=t}return!0}function La(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dR(e){return(String(e).split(".")[1]||"").length}function fR(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var hR=sm,pR=dm,mR=fm,gR=hm,ci="Switch",[xR]=fe(ci),[vR,yR]=xR(ci),gm=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:c,disabled:l,value:u="on",onCheckedChange:s,form:a,...d}=e,[f,p]=v.useState(null),m=h.useComposedRefs(t,b=>p(b)),g=v.useRef(!1),x=f?a||!!f.closest("form"):!0,[y,E]=me({prop:o,defaultProp:i??!1,onChange:s,caller:ci});return h.jsxRuntimeExports.jsxs(vR,{scope:n,checked:y,disabled:l,children:[h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"switch","aria-checked":y,"aria-required":c,"data-state":Em(y),"data-disabled":l?"":void 0,disabled:l,value:u,...d,ref:m,onClick:N(e.onClick,b=>{E(w=>!w),x&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),x&&h.jsxRuntimeExports.jsx(ym,{control:f,bubbles:!g.current,name:r,value:u,checked:y,required:c,disabled:l,form:a,style:{transform:"translateX(-100%)"}})]})});gm.displayName=ci;var xm="SwitchThumb",vm=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=yR(xm,n);return h.jsxRuntimeExports.jsx(h.Primitive.span,{"data-state":Em(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});vm.displayName=xm;var ER="SwitchBubbleInput",ym=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const c=v.useRef(null),l=h.useComposedRefs(c,i),u=zn(n),s=Hn(t);return v.useEffect(()=>{const a=c.current;if(!a)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(u!==n&&p){const m=new Event("click",{bubbles:r});p.call(a,n),a.dispatchEvent(m)}},[u,n,r]),h.jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ym.displayName=ER;function Em(e){return e?"checked":"unchecked"}var bR=gm,wR=vm,ui="Tabs",[RR]=fe(ui,[mt]),bm=mt(),[SR,Fa]=RR(ui),wm=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:c="horizontal",dir:l,activationMode:u="automatic",...s}=e,a=ht(l),[d,f]=me({prop:r,onChange:o,defaultProp:i??"",caller:ui});return h.jsxRuntimeExports.jsx(SR,{scope:n,baseId:xe(),value:d,onValueChange:f,orientation:c,dir:a,activationMode:u,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{dir:a,"data-orientation":c,...s,ref:t})})});wm.displayName=ui;var Rm="TabsList",Sm=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Fa(Rm,n),c=bm(n);return h.jsxRuntimeExports.jsx(Zo,{asChild:!0,...c,orientation:i.orientation,dir:i.dir,loop:r,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Sm.displayName=Rm;var Cm="TabsTrigger",_m=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,c=Fa(Cm,n),l=bm(n),u=Tm(c.baseId,r),s=Am(c.baseId,r),a=r===c.value;return h.jsxRuntimeExports.jsx(Qo,{asChild:!0,...l,focusable:!o,active:a,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":s,"data-state":a?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...i,ref:t,onMouseDown:N(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?c.onValueChange(r):d.preventDefault()}),onKeyDown:N(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&c.onValueChange(r)}),onFocus:N(e.onFocus,()=>{const d=c.activationMode!=="manual";!a&&!o&&d&&c.onValueChange(r)})})})});_m.displayName=Cm;var jm="TabsContent",Pm=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...c}=e,l=Fa(jm,n),u=Tm(l.baseId,r),s=Am(l.baseId,r),a=r===l.value,d=v.useRef(a);return v.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),h.jsxRuntimeExports.jsx(Re,{present:o||a,children:({present:f})=>h.jsxRuntimeExports.jsx(h.Primitive.div,{"data-state":a?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!f,id:s,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});Pm.displayName=jm;function Tm(e,t){return`${e}-trigger-${t}`}function Am(e,t){return`${e}-content-${t}`}var CR=wm,_R=Sm,jR=_m,nu=Pm,Om="Toggle",Va=v.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...i}=e,[c,l]=me({prop:n,onChange:o,defaultProp:r??!1,caller:Om});return h.jsxRuntimeExports.jsx(h.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:N(e.onClick,()=>{e.disabled||l(!c)})})});Va.displayName=Om;var PR=Va,vt="ToggleGroup",[Mm]=fe(vt,[mt]),Im=mt(),Ba=S.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return h.jsxRuntimeExports.jsx(TR,{...o,ref:t})}if(n==="multiple"){const o=r;return h.jsxRuntimeExports.jsx(AR,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${vt}\``)});Ba.displayName=vt;var[Dm,Nm]=Mm(vt),TR=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[c,l]=me({prop:n,defaultProp:r??"",onChange:o,caller:vt});return h.jsxRuntimeExports.jsx(Dm,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>c?[c]:[],[c]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:h.jsxRuntimeExports.jsx(km,{...i,ref:t})})}),AR=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[c,l]=me({prop:n,defaultProp:r??[],onChange:o,caller:vt}),u=S.useCallback(a=>l((d=[])=>[...d,a]),[l]),s=S.useCallback(a=>l((d=[])=>d.filter(f=>f!==a)),[l]);return h.jsxRuntimeExports.jsx(Dm,{scope:e.__scopeToggleGroup,type:"multiple",value:c,onItemActivate:u,onItemDeactivate:s,children:h.jsxRuntimeExports.jsx(km,{...i,ref:t})})});Ba.displayName=vt;var[OR,MR]=Mm(vt),km=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:i,dir:c,loop:l=!0,...u}=e,s=Im(n),a=ht(c),d={role:"group",dir:a,...u};return h.jsxRuntimeExports.jsx(OR,{scope:n,rovingFocus:o,disabled:r,children:o?h.jsxRuntimeExports.jsx(Zo,{asChild:!0,...s,orientation:i,dir:a,loop:l,children:h.jsxRuntimeExports.jsx(h.Primitive.div,{...d,ref:t})}):h.jsxRuntimeExports.jsx(h.Primitive.div,{...d,ref:t})})}),jo="ToggleGroupItem",Lm=S.forwardRef((e,t)=>{const n=Nm(jo,e.__scopeToggleGroup),r=MR(jo,e.__scopeToggleGroup),o=Im(e.__scopeToggleGroup),i=n.value.includes(e.value),c=r.disabled||e.disabled,l={...e,pressed:i,disabled:c},u=S.useRef(null);return r.rovingFocus?h.jsxRuntimeExports.jsx(Qo,{asChild:!0,...o,focusable:!c,active:i,ref:u,children:h.jsxRuntimeExports.jsx(ru,{...l,ref:t})}):h.jsxRuntimeExports.jsx(ru,{...l,ref:t})});Lm.displayName=jo;var ru=S.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,i=Nm(jo,n),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=i.type==="single"?c:void 0;return h.jsxRuntimeExports.jsx(Va,{...l,...o,ref:t,onPressedChange:u=>{u?i.onItemActivate(r):i.onItemDeactivate(r)}})}),IR=Ba,DR=Lm,[li]=fe("Tooltip",[pt]),di=pt(),Fm="TooltipProvider",NR=700,Ss="tooltip.open",[kR,$a]=li(Fm),Vm=e=>{const{__scopeTooltip:t,delayDuration:n=NR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,c=v.useRef(!0),l=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const s=u.current;return()=>window.clearTimeout(s)},[]),h.jsxRuntimeExports.jsx(kR,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(s=>{l.current=s},[]),disableHoverableContent:o,children:i})};Vm.displayName=Fm;var Nn="Tooltip",[LR,er]=li(Nn),Bm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:c,delayDuration:l}=e,u=$a(Nn,e.__scopeTooltip),s=di(t),[a,d]=v.useState(null),f=xe(),p=v.useRef(0),m=c??u.disableHoverableContent,g=l??u.delayDuration,x=v.useRef(!1),[y,E]=me({prop:r,defaultProp:o??!1,onChange:j=>{j?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ss))):u.onClose(),i==null||i(j)},caller:Nn}),b=v.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),w=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,E(!0)},[E]),R=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,E(!1)},[E]),_=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,E(!0),p.current=0},g)},[g,E]);return v.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),h.jsxRuntimeExports.jsx(Ko,{...s,children:h.jsxRuntimeExports.jsx(LR,{scope:t,contentId:f,open:y,stateAttribute:b,trigger:a,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayedRef.current?_():w()},[u.isOpenDelayedRef,_,w]),onTriggerLeave:v.useCallback(()=>{m?R():(window.clearTimeout(p.current),p.current=0)},[R,m]),onOpen:w,onClose:R,disableHoverableContent:m,children:n})})};Bm.displayName=Nn;var Cs="TooltipTrigger",$m=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=er(Cs,n),i=$a(Cs,n),c=di(n),l=v.useRef(null),u=h.useComposedRefs(t,l,o.onTriggerChange),s=v.useRef(!1),a=v.useRef(!1),d=v.useCallback(()=>s.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsxRuntimeExports.jsx(qn,{asChild:!0,...c,children:h.jsxRuntimeExports.jsx(h.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:N(e.onPointerMove,f=>{f.pointerType!=="touch"&&!a.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),a.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),a.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),s.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:N(e.onFocus,()=>{s.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});$m.displayName=Cs;var Ua="TooltipPortal",[FR,VR]=li(Ua,{forceMount:void 0}),Um=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=er(Ua,t);return h.jsxRuntimeExports.jsx(FR,{scope:t,forceMount:n,children:h.jsxRuntimeExports.jsx(Re,{present:n||i.open,children:h.jsxRuntimeExports.jsx(h.Portal,{asChild:!0,container:o,children:r})})})};Um.displayName=Ua;var Jt="TooltipContent",Gm=v.forwardRef((e,t)=>{const n=VR(Jt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,c=er(Jt,e.__scopeTooltip);return h.jsxRuntimeExports.jsx(Re,{present:r||c.open,children:c.disableHoverableContent?h.jsxRuntimeExports.jsx(zm,{side:o,...i,ref:t}):h.jsxRuntimeExports.jsx(BR,{side:o,...i,ref:t})})}),BR=v.forwardRef((e,t)=>{const n=er(Jt,e.__scopeTooltip),r=$a(Jt,e.__scopeTooltip),o=v.useRef(null),i=h.useComposedRefs(t,o),[c,l]=v.useState(null),{trigger:u,onClose:s}=n,a=o.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{l(null),d(!1)},[d]),p=v.useCallback((m,g)=>{const x=m.currentTarget,y={x:m.clientX,y:m.clientY},E=zR(y,x.getBoundingClientRect()),b=HR(y,E),w=WR(g.getBoundingClientRect()),R=KR([...b,...w]);l(R),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(u&&a){const m=x=>p(x,a),g=x=>p(x,u);return u.addEventListener("pointerleave",m),a.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",m),a.removeEventListener("pointerleave",g)}}},[u,a,p,f]),v.useEffect(()=>{if(c){const m=g=>{const x=g.target,y={x:g.clientX,y:g.clientY},E=(u==null?void 0:u.contains(x))||(a==null?void 0:a.contains(x)),b=!qR(y,c);E?f():b&&(f(),s())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,a,c,s,f]),h.jsxRuntimeExports.jsx(zm,{...e,ref:i})}),[$R,UR]=li(Nn,{isInside:!1}),GR=h.createSlottable("TooltipContent"),zm=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:c,...l}=e,u=er(Jt,n),s=di(n),{onClose:a}=u;return v.useEffect(()=>(document.addEventListener(Ss,a),()=>document.removeEventListener(Ss,a)),[a]),v.useEffect(()=>{if(u.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(u.trigger)&&a()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,a]),h.jsxRuntimeExports.jsx(tn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d=>d.preventDefault(),onDismiss:a,children:h.jsxRuntimeExports.jsxs(Xo,{"data-state":u.stateAttribute,...s,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsxRuntimeExports.jsx(GR,{children:r}),h.jsxRuntimeExports.jsx($R,{scope:n,isInside:!0,children:h.jsxRuntimeExports.jsx(hv,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Gm.displayName=Jt;var Hm="TooltipArrow",Wm=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=di(n);return UR(Hm,n).isInside?null:h.jsxRuntimeExports.jsx(Yo,{...o,...r,ref:t})});Wm.displayName=Hm;function zR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function HR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function WR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function qR(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const l=t[i],u=t[c],s=l.x,a=l.y,d=u.x,f=u.y;a>r!=f>r&&n<(d-s)*(r-a)/(f-a)+s&&(o=!o)}return o}function KR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),XR(t)}function XR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],c=t[t.length-2];if((i.x-c.x)*(o.y-c.y)>=(i.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],c=n[n.length-2];if((i.x-c.x)*(o.y-c.y)>=(i.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var YR=Vm,ZR=Bm,QR=$m,JR=Um,eS=Gm,tS=Wm;const nS=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx($v,{className:M.classNames("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e})),rS=S.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>h.jsxRuntimeExports.jsx(Uv,{className:"flex",children:h.jsxRuntimeExports.jsxs(Gv,{className:M.classNames("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??h.jsxRuntimeExports.jsx(ne.SvgArrowMp,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})})),Ga=S.createContext({});function za(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const qm=typeof window<"u",Km=qm?S.useLayoutEffect:S.useEffect,fi=S.createContext(null);function Ha(e,t){e.indexOf(t)===-1&&e.push(t)}function Wa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ze=(e,t,n)=>n>t?t:n<e?e:n;function _s(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let an=()=>{},nt=()=>{};var $d;typeof process<"u"&&(($d=process.env)==null?void 0:$d.NODE_ENV)!=="production"&&(an=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(_s(t,n))},nt=(e,t,n)=>{if(!e)throw new Error(_s(t,n))});const rt={},Xm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ym(e){return typeof e=="object"&&e!==null}const Zm=e=>/^0[^.\s]+$/u.test(e);function qa(e){let t;return()=>(t===void 0&&(t=e()),t)}const De=e=>e,oS=(e,t)=>n=>t(e(n)),tr=(...e)=>e.reduce(oS),kn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ka{constructor(){this.subscriptions=[]}add(t){return Ha(this.subscriptions,t),()=>Wa(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const c=this.subscriptions[i];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ke=e=>e*1e3,Me=e=>e/1e3;function Qm(e,t){return t?e*(1e3/t):0}const ou=new Set;function Xa(e,t,n){e||ou.has(t)||(console.warn(_s(t,n)),ou.add(t))}const Jm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,iS=1e-7,sS=12;function aS(e,t,n,r,o){let i,c,l=0;do c=t+(n-t)/2,i=Jm(c,r,o)-e,i>0?n=c:t=c;while(Math.abs(i)>iS&&++l<sS);return c}function nr(e,t,n,r){if(e===t&&n===r)return De;const o=i=>aS(i,0,1,e,n);return i=>i===0||i===1?i:Jm(o(i),t,r)}const eg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tg=e=>t=>1-e(1-t),ng=nr(.33,1.53,.69,.99),Ya=tg(ng),rg=eg(Ya),og=e=>(e*=2)<1?.5*Ya(e):.5*(2-Math.pow(2,-10*(e-1))),Za=e=>1-Math.sin(Math.acos(e)),ig=tg(Za),sg=eg(Za),cS=nr(.42,0,1,1),uS=nr(0,0,.58,1),ag=nr(.42,0,.58,1),lS=e=>Array.isArray(e)&&typeof e[0]!="number",cg=e=>Array.isArray(e)&&typeof e[0]=="number",iu={linear:De,easeIn:cS,easeInOut:ag,easeOut:uS,circIn:Za,circInOut:sg,circOut:ig,backIn:Ya,backInOut:rg,backOut:ng,anticipate:og},dS=e=>typeof e=="string",su=e=>{if(cg(e)){nt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return nr(t,n,r,o)}else if(dS(e))return nt(iu[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),iu[e];return e},xr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fS(e,t){let n=new Set,r=new Set,o=!1,i=!1;const c=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(a){c.has(a)&&(s.schedule(a),e()),a(l)}const s={schedule:(a,d=!1,f=!1)=>{const m=f&&o?n:r;return d&&c.add(a),m.has(a)||m.add(a),a},cancel:a=>{r.delete(a),c.delete(a)},process:a=>{if(l=a,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,i&&(i=!1,s.process(a))}};return s}const hS=40;function ug(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,c=xr.reduce((b,w)=>(b[w]=fS(i),b),{}),{setup:l,read:u,resolveKeyframes:s,preUpdate:a,update:d,preRender:f,render:p,postRender:m}=c,g=()=>{const b=rt.useManualTiming?o.timestamp:performance.now();n=!1,rt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,hS),1)),o.timestamp=b,o.isProcessing=!0,l.process(o),u.process(o),s.process(o),a.process(o),d.process(o),f.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:xr.reduce((b,w)=>{const R=c[w];return b[w]=(_,j=!1,P=!1)=>(n||x(),R.schedule(_,j,P)),b},{}),cancel:b=>{for(let w=0;w<xr.length;w++)c[xr[w]].cancel(b)},state:o,steps:c}}const{schedule:se,cancel:dt,state:ge,steps:Ii}=ug(typeof requestAnimationFrame<"u"?requestAnimationFrame:De,!0);let fo;function pS(){fo=void 0}const be={now:()=>(fo===void 0&&be.set(ge.isProcessing||rt.useManualTiming?ge.timestamp:performance.now()),fo),set:e=>{fo=e,queueMicrotask(pS)}},lg=e=>t=>typeof t=="string"&&t.startsWith(e),dg=lg("--"),mS=lg("var(--"),Qa=e=>mS(e)?gS.test(e.split("/*")[0].trim()):!1,gS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function au(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const cn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ln={...cn,transform:e=>Ze(0,1,e)},vr={...cn,default:1},jn=e=>Math.round(e*1e5)/1e5,Ja=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xS(e){return e==null}const vS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ec=(e,t)=>n=>!!(typeof n=="string"&&vS.test(n)&&n.startsWith(e)||t&&!xS(n)&&Object.prototype.hasOwnProperty.call(n,t)),fg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,c,l]=r.match(Ja);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(c),alpha:l!==void 0?parseFloat(l):1}},yS=e=>Ze(0,255,e),Di={...cn,transform:e=>Math.round(yS(e))},St={test:ec("rgb","red"),parse:fg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Di.transform(e)+", "+Di.transform(t)+", "+Di.transform(n)+", "+jn(Ln.transform(r))+")"};function ES(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const js={test:ec("#"),parse:ES,transform:St.transform},rr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),st=rr("deg"),Xe=rr("%"),z=rr("px"),bS=rr("vh"),wS=rr("vw"),cu={...Xe,parse:e=>Xe.parse(e)/100,transform:e=>Xe.transform(e*100)},Ut={test:ec("hsl","hue"),parse:fg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xe.transform(jn(t))+", "+Xe.transform(jn(n))+", "+jn(Ln.transform(r))+")"},he={test:e=>St.test(e)||js.test(e)||Ut.test(e),parse:e=>St.test(e)?St.parse(e):Ut.test(e)?Ut.parse(e):js.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?St.transform(e):Ut.transform(e),getAnimatableNone:e=>{const t=he.parse(e);return t.alpha=0,he.transform(t)}},RS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function SS(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ja))==null?void 0:t.length)||0)+(((n=e.match(RS))==null?void 0:n.length)||0)>0}const hg="number",pg="color",CS="var",_S="var(",uu="${}",jS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(jS,u=>(he.test(u)?(r.color.push(i),o.push(pg),n.push(he.parse(u))):u.startsWith(_S)?(r.var.push(i),o.push(CS),n.push(u)):(r.number.push(i),o.push(hg),n.push(parseFloat(u))),++i,uu)).split(uu);return{values:n,split:l,indexes:r,types:o}}function mg(e){return Fn(e).values}function gg(e){const{split:t,types:n}=Fn(e),r=t.length;return o=>{let i="";for(let c=0;c<r;c++)if(i+=t[c],o[c]!==void 0){const l=n[c];l===hg?i+=jn(o[c]):l===pg?i+=he.transform(o[c]):i+=o[c]}return i}}const PS=e=>typeof e=="number"?0:he.test(e)?he.getAnimatableNone(e):e;function TS(e){const t=mg(e);return gg(e)(t.map(PS))}const ft={test:SS,parse:mg,createTransformer:gg,getAnimatableNone:TS};function Ni(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function AS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,c=0;if(!t)o=i=c=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;o=Ni(u,l,e+1/3),i=Ni(u,l,e),c=Ni(u,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(c*255),alpha:r}}function Po(e,t){return n=>n>0?t:e}const ue=(e,t,n)=>e+(t-e)*n,ki=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},OS=[js,St,Ut],MS=e=>OS.find(t=>t.test(e));function lu(e){const t=MS(e);if(an(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ut&&(n=AS(n)),n}const du=(e,t)=>{const n=lu(e),r=lu(t);if(!n||!r)return Po(e,t);const o={...n};return i=>(o.red=ki(n.red,r.red,i),o.green=ki(n.green,r.green,i),o.blue=ki(n.blue,r.blue,i),o.alpha=ue(n.alpha,r.alpha,i),St.transform(o))},Ps=new Set(["none","hidden"]);function IS(e,t){return Ps.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function DS(e,t){return n=>ue(e,t,n)}function tc(e){return typeof e=="number"?DS:typeof e=="string"?Qa(e)?Po:he.test(e)?du:LS:Array.isArray(e)?xg:typeof e=="object"?he.test(e)?du:NS:Po}function xg(e,t){const n=[...e],r=n.length,o=e.map((i,c)=>tc(i)(i,t[c]));return i=>{for(let c=0;c<r;c++)n[c]=o[c](i);return n}}function NS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=tc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function kS(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],c=e.indexes[i][r[i]],l=e.values[c]??0;n[o]=l,r[i]++}return n}const LS=(e,t)=>{const n=ft.createTransformer(t),r=Fn(e),o=Fn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ps.has(e)&&!o.values.length||Ps.has(t)&&!r.values.length?IS(e,t):tr(xg(kS(r,o),o.values),n):(an(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Po(e,t))};function vg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ue(e,t,n):tc(e)(e,t)}const FS=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>se.update(t,n),stop:()=>dt(t),now:()=>ge.isProcessing?ge.timestamp:be.now()}},yg=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},To=2e4;function nc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<To;)t+=n,r=e.next(t);return t>=To?1/0:t}function VS(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(nc(r),To);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Me(o)}}const BS=5;function Eg(e,t,n){const r=Math.max(t-BS,0);return Qm(n-e(r),t-r)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Li=.001;function $S({duration:e=ce.duration,bounce:t=ce.bounce,velocity:n=ce.velocity,mass:r=ce.mass}){let o,i;an(e<=Ke(ce.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let c=1-t;c=Ze(ce.minDamping,ce.maxDamping,c),e=Ze(ce.minDuration,ce.maxDuration,Me(e)),c<1?(o=s=>{const a=s*c,d=a*e,f=a-n,p=Ts(s,c),m=Math.exp(-d);return Li-f/p*m},i=s=>{const d=s*c*e,f=d*n+n,p=Math.pow(c,2)*Math.pow(s,2)*e,m=Math.exp(-d),g=Ts(Math.pow(s,2),c);return(-o(s)+Li>0?-1:1)*((f-p)*m)/g}):(o=s=>{const a=Math.exp(-s*e),d=(s-n)*e+1;return-Li+a*d},i=s=>{const a=Math.exp(-s*e),d=(n-s)*(e*e);return a*d});const l=5/e,u=GS(o,i,l);if(e=Ke(e),isNaN(u))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const s=Math.pow(u,2)*r;return{stiffness:s,damping:c*2*Math.sqrt(r*s),duration:e}}}const US=12;function GS(e,t,n){let r=n;for(let o=1;o<US;o++)r=r-e(r)/t(r);return r}function Ts(e,t){return e*Math.sqrt(1-t*t)}const zS=["duration","bounce"],HS=["stiffness","damping","mass"];function fu(e,t){return t.some(n=>e[n]!==void 0)}function WS(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!fu(e,HS)&&fu(e,zS))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Ze(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ce.mass,stiffness:o,damping:i}}else{const n=$S(e);t={...t,...n,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function Ao(e=ce.visualDuration,t=ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:u,damping:s,mass:a,duration:d,velocity:f,isResolvedFromDuration:p}=WS({...n,velocity:-Me(n.velocity||0)}),m=f||0,g=s/(2*Math.sqrt(u*a)),x=c-i,y=Me(Math.sqrt(u/a)),E=Math.abs(x)<5;r||(r=E?ce.restSpeed.granular:ce.restSpeed.default),o||(o=E?ce.restDelta.granular:ce.restDelta.default);let b;if(g<1){const R=Ts(y,g);b=_=>{const j=Math.exp(-g*y*_);return c-j*((m+g*y*x)/R*Math.sin(R*_)+x*Math.cos(R*_))}}else if(g===1)b=R=>c-Math.exp(-y*R)*(x+(m+y*x)*R);else{const R=y*Math.sqrt(g*g-1);b=_=>{const j=Math.exp(-g*y*_),P=Math.min(R*_,300);return c-j*((m+g*y*x)*Math.sinh(P)+R*x*Math.cosh(P))/R}}const w={calculatedDuration:p&&d||null,next:R=>{const _=b(R);if(p)l.done=R>=d;else{let j=R===0?m:0;g<1&&(j=R===0?Ke(m):Eg(b,R,_));const P=Math.abs(j)<=r,T=Math.abs(c-_)<=o;l.done=P&&T}return l.value=l.done?c:_,l},toString:()=>{const R=Math.min(nc(w),To),_=yg(j=>w.next(R*j).value,R,30);return R+"ms "+_},toTransition:()=>{}};return w}Ao.applyToOptions=e=>{const t=VS(e,100,Ao);return e.ease=t.ease,e.duration=Ke(t.duration),e.type="keyframes",e};function As({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:c,min:l,max:u,restDelta:s=.5,restSpeed:a}){const d=e[0],f={done:!1,value:d},p=P=>l!==void 0&&P<l||u!==void 0&&P>u,m=P=>l===void 0?u:u===void 0||Math.abs(l-P)<Math.abs(u-P)?l:u;let g=n*t;const x=d+g,y=c===void 0?x:c(x);y!==x&&(g=y-d);const E=P=>-g*Math.exp(-P/r),b=P=>y+E(P),w=P=>{const T=E(P),C=b(P);f.done=Math.abs(T)<=s,f.value=f.done?y:C};let R,_;const j=P=>{p(f.value)&&(R=P,_=Ao({keyframes:[f.value,m(f.value)],velocity:Eg(b,P,f.value),damping:o,stiffness:i,restDelta:s,restSpeed:a}))};return j(0),{calculatedDuration:null,next:P=>{let T=!1;return!_&&R===void 0&&(T=!0,w(P),j(P)),R!==void 0&&P>=R?_.next(P-R):(!T&&w(P),f)}}}function qS(e,t,n){const r=[],o=n||rt.mix||vg,i=e.length-1;for(let c=0;c<i;c++){let l=o(e[c],e[c+1]);if(t){const u=Array.isArray(t)?t[c]||De:t;l=tr(u,l)}r.push(l)}return r}function KS(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(nt(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=qS(t,r,o),u=l.length,s=a=>{if(c&&a<e[0])return t[0];let d=0;if(u>1)for(;d<e.length-2&&!(a<e[d+1]);d++);const f=kn(e[d],e[d+1],a);return l[d](f)};return n?a=>s(Ze(e[0],e[i-1],a)):s}function XS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=kn(0,t,r);e.push(ue(n,1,o))}}function YS(e){const t=[0];return XS(t,e.length-1),t}function ZS(e,t){return e.map(n=>n*t)}function QS(e,t){return e.map(()=>t||ag).splice(0,e.length-1)}function Gt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=lS(r)?r.map(su):su(r),i={done:!1,value:t[0]},c=ZS(n&&n.length===t.length?n:YS(t),e),l=KS(c,t,{ease:Array.isArray(o)?o:QS(t,o)});return{calculatedDuration:e,next:u=>(i.value=l(u),i.done=u>=e,i)}}const JS=e=>e!==null;function rc(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(JS),l=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const eC={decay:As,inertia:As,tween:Gt,keyframes:Gt,spring:Ao};function bg(e){typeof e.type=="string"&&(e.type=eC[e.type])}class oc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const tC=e=>e/100;class ic extends oc{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;bg(t);const{type:n=Gt,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:c=0}=t;let{keyframes:l}=t;const u=n||Gt;process.env.NODE_ENV!=="production"&&u!==Gt&&nt(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),u!==Gt&&typeof l[0]!="number"&&(this.mixKeyframes=tr(tC,vg(l[0],l[1])),l=[0,100]);const s=u({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-c})),s.calculatedDuration===null&&(s.calculatedDuration=nc(s));const{calculatedDuration:a}=s;this.calculatedDuration=a,this.resolvedDuration=a+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=s}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:c,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:s=0,keyframes:a,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-s*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,w=r;if(d){const P=Math.min(this.currentTime,o)/l;let T=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(C=1-C,p&&(C-=p/l)):f==="mirror"&&(w=c)),b=Ze(0,1,C)*l}const R=E?{done:!1,value:a[0]}:w.next(b);i&&(R.value=i(R.value));let{done:_}=R;!E&&u!==null&&(_=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return j&&m!==As&&(R.value=rc(a,this.options,x,this.speed)),g&&g(R.value),j&&this.finish(),R}then(t,n){return this.finished.then(t,n)}get duration(){return Me(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Me(t)}get time(){return Me(this.currentTime)}set time(t){var n;t=Ke(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Me(this.currentTime))}play(){var o,i;if(this.isStopped)return;const{driver:t=FS,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(i=(o=this.options).onPlay)==null||i.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function nC(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ct=e=>e*180/Math.PI,Os=e=>{const t=Ct(Math.atan2(e[1],e[0]));return Ms(t)},rC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Os,rotateZ:Os,skewX:e=>Ct(Math.atan(e[1])),skewY:e=>Ct(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ms=e=>(e=e%360,e<0&&(e+=360),e),hu=Os,pu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pu,scaleY:mu,scale:e=>(pu(e)+mu(e))/2,rotateX:e=>Ms(Ct(Math.atan2(e[6],e[5]))),rotateY:e=>Ms(Ct(Math.atan2(-e[2],e[0]))),rotateZ:hu,rotate:hu,skewX:e=>Ct(Math.atan(e[4])),skewY:e=>Ct(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Is(e){return e.includes("scale")?1:0}function Ds(e,t){if(!e||e==="none")return Is(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=oC,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=rC,o=l}if(!o)return Is(t);const i=r[t],c=o[1].split(",").map(sC);return typeof i=="function"?i(c):c[i]}const iC=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ds(n,t)};function sC(e){return parseFloat(e.trim())}const un=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ln=new Set(un),gu=e=>e===cn||e===z,aC=new Set(["x","y","z"]),cC=un.filter(e=>!aC.has(e));function uC(e){const t=[];return cC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const at={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ds(t,"x"),y:(e,{transform:t})=>Ds(t,"y")};at.translateX=at.x;at.translateY=at.y;const _t=new Set;let Ns=!1,ks=!1,Ls=!1;function wg(){if(ks){const e=Array.from(_t).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=uC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,c])=>{var l;(l=r.getValue(i))==null||l.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ks=!1,Ns=!1,_t.forEach(e=>e.complete(Ls)),_t.clear()}function Rg(){_t.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ks=!0)})}function lC(){Ls=!0,Rg(),wg(),Ls=!1}class sc{constructor(t,n,r,o,i,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(_t.add(this),Ns||(Ns=!0,se.read(Rg),se.resolveKeyframes(wg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o==null?void 0:o.get(),c=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),o&&i===void 0&&o.set(t[0])}nC(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),_t.delete(this)}cancel(){this.state==="scheduled"&&(_t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dC=e=>e.startsWith("--");function fC(e,t,n){dC(t)?e.style.setProperty(t,n):e.style[t]=n}const hC=qa(()=>window.ScrollTimeline!==void 0),pC={};function mC(e,t){const n=qa(e);return()=>pC[t]??n()}const Sg=mC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cn([0,.65,.55,1]),circOut:Cn([.55,0,1,.45]),backIn:Cn([.31,.01,.66,-.59]),backOut:Cn([.33,1.53,.69,.99])};function Cg(e,t){if(e)return typeof e=="function"?Sg()?yg(e,t):"ease-out":cg(e)?Cn(e):Array.isArray(e)?e.map(n=>Cg(n,t)||xu.easeOut):xu[e]}function gC(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:c="loop",ease:l="easeOut",times:u}={},s=void 0){const a={[t]:n};u&&(a.offset=u);const d=Cg(l,o);Array.isArray(d)&&(a.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:c==="reverse"?"alternate":"normal"};return s&&(f.pseudoElement=s),e.animate(a,f)}function _g(e){return typeof e=="function"&&"applyToOptions"in e}function xC({type:e,...t}){return _g(e)&&Sg()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vC extends oc{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:c=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=c,this.options=t,nt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const s=xC(t);this.animation=gC(n,r,o,s,i),s.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const a=rc(o,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(a):fC(n,r,a),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,o;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(r=this.animation).commitStyles)==null||o.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Me(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Me(t)}get time(){return Me(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ke(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&hC()?(this.animation.timeline=t,De):n(this)}}const jg={anticipate:og,backInOut:rg,circInOut:sg};function yC(e){return e in jg}function EC(e){typeof e.ease=="string"&&yC(e.ease)&&(e.ease=jg[e.ease])}const Fi=10;class bC extends vC{constructor(t){EC(t),bg(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new ic({...c,autoplay:!1}),u=Math.max(Fi,be.now()-this.startTime),s=Ze(0,Fi,u-Fi);n.setWithVelocity(l.sample(Math.max(0,u-s)).value,l.sample(u).value,s),l.stop()}}const vu=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ft.test(e)||e==="0")&&!e.startsWith("url("));function wC(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function RC(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],c=vu(o,t),l=vu(i,t);return an(c===l,`You are trying to animate ${t} from "${o}" to "${i}". "${c?i:o}" is not an animatable value.`,"value-not-animatable"),!c||!l?!1:wC(e)||(n==="spring"||_g(n))&&r}function Fs(e){e.duration=0,e.type="keyframes"}const SC=new Set(["opacity","clipPath","filter","transform"]),CC=qa(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _C(e){var a;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:c}=e;if(!(((a=t==null?void 0:t.owner)==null?void 0:a.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:s}=t.owner.getProps();return CC()&&n&&SC.has(n)&&(n!=="transform"||!s)&&!u&&!r&&o!=="mirror"&&i!==0&&c!=="inertia"}const jC=40;class PC extends oc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:c="loop",keyframes:l,name:u,motionValue:s,element:a,...d}){var m;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=be.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:c,name:u,motionValue:s,element:a,...d},p=(a==null?void 0:a.KeyframeResolver)||sc;this.keyframeResolver=new p(l,(g,x,y)=>this.onKeyframesResolved(g,x,f,!y),u,s,a),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){var x,y;this.keyframeResolver=void 0;const{name:i,type:c,velocity:l,delay:u,isHandoff:s,onUpdate:a}=r;this.resolvedAt=be.now(),RC(t,i,c,l)||((rt.instantAnimations||!u)&&(a==null||a(rc(t,r,n))),t[0]=t[t.length-1],Fs(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>jC?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!s&&_C(f),m=(y=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:y.current,g=p?new bC({...f,element:m}):new ic(f);g.finished.then(()=>{this.notifyFinished()}).catch(De),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),lC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Pg(e,t,n,r=0,o=1){const i=Array.from(e).sort((s,a)=>s.sortNodePosition(a)).indexOf(t),c=e.size,l=(c-1)*r;return typeof n=="function"?n(i,c):o===1?i*r:l-i*r}const TC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function AC(e){const t=TC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const OC=4;function Tg(e,t,n=1){nt(n<=OC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=AC(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const c=i.trim();return Xm(c)?parseFloat(c):c}return Qa(o)?Tg(o,t,n+1):o}const MC={type:"spring",stiffness:500,damping:25,restSpeed:10},IC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DC={type:"keyframes",duration:.8},NC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kC=(e,{keyframes:t})=>t.length>2?DC:ln.has(e)?e.startsWith("scale")?IC(t[1]):MC:NC,LC=e=>e!==null;function FC(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(LC),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function ac(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function VC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:c,repeatDelay:l,from:u,elapsed:s,...a}){return!!Object.keys(a).length}const cc=(e,t,n,r={},o,i)=>c=>{const l=ac(r,e)||{},u=l.delay||r.delay||0;let{elapsed:s=0}=r;s=s-Ke(u);const a={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-s,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{c(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};VC(l)||Object.assign(a,kC(e,a)),a.duration&&(a.duration=Ke(a.duration)),a.repeatDelay&&(a.repeatDelay=Ke(a.repeatDelay)),a.from!==void 0&&(a.keyframes[0]=a.from);let d=!1;if((a.type===!1||a.duration===0&&!a.repeatDelay)&&(Fs(a),a.delay===0&&(d=!0)),(rt.instantAnimations||rt.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(d=!0,Fs(a),a.delay=0),a.allowFlatten=!l.type&&!l.ease,d&&!i&&t.get()!==void 0){const f=FC(a.keyframes,l);if(f!==void 0){se.update(()=>{a.onUpdate(f),a.onComplete()});return}}return l.isSync?new ic(a):new PC(a)};function yu(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uc(e,t,n,r){if(typeof t=="function"){const[o,i]=yu(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=yu(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Yt(e,t,n){const r=e.getProps();return uc(r,t,n!==void 0?n:r.custom,e)}const Ag=new Set(["width","height","top","left","right","bottom",...un]),Eu=30,BC=e=>!isNaN(parseFloat(e));class $C{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const o=be.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=BC(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Xa(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ka);const r=this.events[t].add(n);return t==="change"?()=>{r(),se.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Eu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Eu);return Qm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function en(e,t){return new $C(e,t)}const Vs=e=>Array.isArray(e);function UC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,en(n))}function GC(e){return Vs(e)?e[e.length-1]||0:e}function zC(e,t){const n=Yt(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const c in i){const l=GC(i[c]);UC(e,c,l)}}const ve=e=>!!(e&&e.getVelocity);function HC(e){return!!(ve(e)&&e.add)}function Bs(e,t){const n=e.getValue("willChange");if(HC(n))return n.add(t);if(!n&&rt.WillChange){const r=new rt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function lc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const WC="framerAppearId",Og="data-"+lc(WC);function Mg(e){return e.props[Og]}function qC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ig(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:c,...l}=t;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const s=[],a=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||a&&qC(a,d))continue;const m={delay:n,...ac(i||{},d)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const b=Mg(e);if(b){const w=window.MotionHandoffAnimation(b,d,se);w!==null&&(m.startTime=w,x=!0)}}Bs(e,d);const y=u??e.shouldReduceMotion;f.start(cc(d,f,p,y&&Ag.has(d)?{type:!1}:m,e,x));const E=f.animation;E&&s.push(E)}return c&&Promise.all(s).then(()=>{se.update(()=>{c&&zC(e,c)})}),s}function $s(e,t,n={}){var u;const r=Yt(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Ig(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(s=0)=>{const{delayChildren:a=0,staggerChildren:d,staggerDirection:f}=o;return KC(e,t,s,a,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[s,a]=l==="beforeChildren"?[i,c]:[c,i];return s().then(()=>a())}else return Promise.all([i(),c(n.delay)])}function KC(e,t,n=0,r=0,o=0,i=1,c){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push($s(u,t,{...c,delay:n+(typeof r=="function"?0:r)+Pg(e.variantChildren,u,r,o,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function XC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>$s(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=$s(e,t,n);else{const o=typeof t=="function"?Yt(e,t,n.custom):t;r=Promise.all(Ig(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const YC={test:e=>e==="auto",parse:e=>e},Dg=e=>t=>t.test(e),Ng=[cn,z,Xe,st,wS,bS,YC],bu=e=>Ng.find(Dg(e));function ZC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zm(e):!0}const QC=new Set(["brightness","contrast","saturate","opacity"]);function JC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ja)||[];if(!r)return e;const o=n.replace(r,"");let i=QC.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const e_=/\b([a-z-]*)\(.*?\)/gu,Us={...ft,getAnimatableNone:e=>{const t=e.match(e_);return t?t.map(JC).join(" "):e}},wu={...cn,transform:Math.round},t_={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:vr,scaleX:vr,scaleY:vr,scaleZ:vr,skew:st,skewX:st,skewY:st,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Ln,originX:cu,originY:cu,originZ:z},dc={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,inset:z,insetBlock:z,insetBlockStart:z,insetBlockEnd:z,insetInline:z,insetInlineStart:z,insetInlineEnd:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,paddingBlock:z,paddingBlockStart:z,paddingBlockEnd:z,paddingInline:z,paddingInlineStart:z,paddingInlineEnd:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,marginBlock:z,marginBlockStart:z,marginBlockEnd:z,marginInline:z,marginInlineStart:z,marginInlineEnd:z,fontSize:z,backgroundPositionX:z,backgroundPositionY:z,...t_,zIndex:wu,fillOpacity:Ln,strokeOpacity:Ln,numOctaves:wu},n_={...dc,color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:Us,WebkitFilter:Us},kg=e=>n_[e];function Lg(e,t){let n=kg(e);return n!==Us&&(n=ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const r_=new Set(["auto","none","0"]);function o_(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!r_.has(i)&&Fn(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Lg(n,o)}class i_ extends sc{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let d=t[a];if(typeof d=="string"&&(d=d.trim(),Qa(d))){const f=Tg(d,n.current);f!==void 0&&(t[a]=f),a===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ag.has(r)||t.length!==2)return;const[o,i]=t,c=bu(o),l=bu(i),u=au(o),s=au(i);if(u!==s&&at[r]){this.needsMeasurement=!0;return}if(c!==l)if(gu(c)&&gu(l))for(let a=0;a<t.length;a++){const d=t[a];typeof d=="string"&&(t[a]=parseFloat(d))}else at[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||ZC(t[o]))&&r.push(o);r.length&&o_(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=at[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,c=r[i];r[i]=at[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,s])=>{t.getValue(u).set(s)}),this.resolveNoneKeyframes()}}function s_(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const Fg=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gs(e){return Ym(e)&&"offsetHeight"in e}const{schedule:fc}=ug(queueMicrotask,!1),Ve={x:!1,y:!1};function Vg(){return Ve.x||Ve.y}function a_(e){return e==="x"||e==="y"?Ve[e]?null:(Ve[e]=!0,()=>{Ve[e]=!1}):Ve.x||Ve.y?null:(Ve.x=Ve.y=!0,()=>{Ve.x=Ve.y=!1})}function Bg(e,t){const n=s_(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Ru(e){return!(e.pointerType==="touch"||Vg())}function c_(e,t,n={}){const[r,o,i]=Bg(e,n),c=l=>{if(!Ru(l))return;const{target:u}=l,s=t(u,l);if(typeof s!="function"||!u)return;const a=d=>{Ru(d)&&(s(d),u.removeEventListener("pointerleave",a))};u.addEventListener("pointerleave",a,o)};return r.forEach(l=>{l.addEventListener("pointerenter",c,o)}),i}const $g=(e,t)=>t?e===t?!0:$g(e,t.parentElement):!1,hc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,u_=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function l_(e){return u_.has(e.tagName)||e.isContentEditable===!0}const d_=new Set(["INPUT","SELECT","TEXTAREA"]);function f_(e){return d_.has(e.tagName)||e.isContentEditable===!0}const ho=new WeakSet;function Su(e){return t=>{t.key==="Enter"&&e(t)}}function Vi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const h_=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Su(()=>{if(ho.has(n))return;Vi(n,"down");const o=Su(()=>{Vi(n,"up")}),i=()=>Vi(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Cu(e){return hc(e)&&!Vg()}function p_(e,t,n={}){const[r,o,i]=Bg(e,n),c=l=>{const u=l.currentTarget;if(!Cu(l))return;ho.add(u);const s=t(u,l),a=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ho.has(u)&&ho.delete(u),Cu(p)&&typeof s=="function"&&s(p,{success:m})},d=p=>{a(p,u===window||u===document||n.useGlobalTarget||$g(u,p.target))},f=p=>{a(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",c,o),Gs(l)&&(l.addEventListener("focus",s=>h_(s,o)),!l_(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function Ug(e){return Ym(e)&&"ownerSVGElement"in e}function m_(e){return Ug(e)&&e.tagName==="svg"}const g_=[...Ng,he,ft],x_=e=>g_.find(Dg(e)),_u=()=>({translate:0,scale:1,origin:0,originPoint:0}),zt=()=>({x:_u(),y:_u()}),ju=()=>({min:0,max:0}),pe=()=>({x:ju(),y:ju()}),zs={current:null},Gg={current:!1},v_=typeof window<"u";function y_(){if(Gg.current=!0,!!v_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zs.current=e.matches;e.addEventListener("change",t),t()}else zs.current=!1}const E_=new WeakMap;function hi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vn(e){return typeof e=="string"||Array.isArray(e)}const pc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mc=["initial",...pc];function pi(e){return hi(e.animate)||mc.some(t=>Vn(e[t]))}function zg(e){return!!(pi(e)||e.variants)}function b_(e,t,n){for(const r in t){const o=t[r],i=n[r];if(ve(o))e.addValue(r,o);else if(ve(i))e.addValue(r,en(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,en(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Oo={};function Hg(e){Oo=e}function w_(){return Oo}class R_{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:c,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=sc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,se.render(this.render,!1,!0))};const{latestValues:s,renderState:a}=l;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=a,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=u,this.blockInitialAnimation=!!c,this.isControllingVariants=pi(n),this.isVariantNode=zg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];s[p]!==void 0&&ve(m)&&m.set(s[p])}}mount(t){var n;this.current=t,E_.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Gg.current||y_(),this.shouldReduceMotion=zs.current),process.env.NODE_ENV!=="production"&&Xa(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),dt(this.notifyUpdate),dt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ln.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&se.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Oo){const n=Oo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Pu.length;r++){const o=Pu[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,c=t[i];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=b_(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=en(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Xm(r)||Zm(r))?r=parseFloat(r):!x_(r)&&ft.test(n)&&(r=Lg(t,n)),this.setBaseTarget(t,ve(r)?r.get():r)),ve(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const c=uc(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);c&&(r=c[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ve(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ka),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){fc.render(this.render)}}class Wg extends R_{constructor(){super(...arguments),this.KeyframeResolver=i_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ve(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class yt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function qg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function S_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function C_(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Bi(e){return e===void 0||e===1}function Hs({scale:e,scaleX:t,scaleY:n}){return!Bi(e)||!Bi(t)||!Bi(n)}function Rt(e){return Hs(e)||Kg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kg(e){return Tu(e.x)||Tu(e.y)}function Tu(e){return e&&e!=="0%"}function Mo(e,t,n){const r=e-n,o=t*r;return n+o}function Au(e,t,n,r,o){return o!==void 0&&(e=Mo(e,o,r)),Mo(e,n,r)+t}function Ws(e,t=0,n=1,r,o){e.min=Au(e.min,t,n,r,o),e.max=Au(e.max,t,n,r,o)}function Xg(e,{x:t,y:n}){Ws(e.x,t.translate,t.scale,t.originPoint),Ws(e.y,n.translate,n.scale,n.originPoint)}const Ou=.999999999999,Mu=1.0000000000001;function __(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,c;for(let l=0;l<o;l++){i=n[l],c=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Wt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,Xg(e,c)),r&&Rt(i.latestValues)&&Wt(e,i.latestValues))}t.x<Mu&&t.x>Ou&&(t.x=1),t.y<Mu&&t.y>Ou&&(t.y=1)}function Ht(e,t){e.min=e.min+t,e.max=e.max+t}function Iu(e,t,n,r,o=.5){const i=ue(e.min,e.max,o);Ws(e,t,n,i,r)}function Wt(e,t){Iu(e.x,t.x,t.scaleX,t.scale,t.originX),Iu(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yg(e,t){return qg(C_(e.getBoundingClientRect(),t))}function j_(e,t,n){const r=Yg(e,n),{scroll:o}=t;return o&&(Ht(r.x,o.offset.x),Ht(r.y,o.offset.y)),r}const P_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},T_=un.length;function A_(e,t,n){let r="",o=!0;for(let i=0;i<T_;i++){const c=un[i],l=e[c];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(c.startsWith("scale")?1:0);else{const s=parseFloat(l);u=c.startsWith("scale")?s===1:s===0}if(!u||n){const s=Fg(l,dc[c]);if(!u){o=!1;const a=P_[c]||c;r+=`${a}(${s}) `}n&&(t[c]=s)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function gc(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let c=!1,l=!1;for(const u in t){const s=t[u];if(ln.has(u)){c=!0;continue}else if(dg(u)){o[u]=s;continue}else{const a=Fg(s,dc[u]);u.startsWith("origin")?(l=!0,i[u]=a):r[u]=a}}if(t.transform||(c||n?r.transform=A_(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:s="50%",originZ:a=0}=i;r.transformOrigin=`${u} ${s} ${a}`}}function Zg(e,{style:t,vars:n},r,o){const i=e.style;let c;for(c in t)i[c]=t[c];o==null||o.applyProjectionStyles(i,r);for(c in n)i.setProperty(c,n[c])}function Du(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const pn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(z.test(e))e=parseFloat(e);else return e;const n=Du(e,t.target.x),r=Du(e,t.target.y);return`${n}% ${r}%`}},O_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ft.parse(e);if(o.length>5)return r;const i=ft.createTransformer(e),c=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;o[0+c]/=l,o[1+c]/=u;const s=ue(l,u,.5);return typeof o[2+c]=="number"&&(o[2+c]/=s),typeof o[3+c]=="number"&&(o[3+c]/=s),i(o)}},qs={borderRadius:{...pn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pn,borderTopRightRadius:pn,borderBottomLeftRadius:pn,borderBottomRightRadius:pn,boxShadow:O_};function Qg(e,{layout:t,layoutId:n}){return ln.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qs[e]||e==="opacity")}function xc(e,t,n){var c;const r=e.style,o=t==null?void 0:t.style,i={};if(!r)return i;for(const l in r)(ve(r[l])||o&&ve(o[l])||Qg(l,e)||((c=n==null?void 0:n.getValue(l))==null?void 0:c.liveStyle)!==void 0)&&(i[l]=r[l]);return i}function M_(e){return window.getComputedStyle(e)}class I_ extends Wg{constructor(){super(...arguments),this.type="html",this.renderInstance=Zg}readValueFromInstance(t,n){var r;if(ln.has(n))return(r=this.projection)!=null&&r.isProjecting?Is(n):iC(t,n);{const o=M_(t),i=(dg(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yg(t,n)}build(t,n,r){gc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xc(t,n,r)}}const D_={offset:"stroke-dashoffset",array:"stroke-dasharray"},N_={offset:"strokeDashoffset",array:"strokeDasharray"};function k_(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?D_:N_;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const L_=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Jg(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:c=0,...l},u,s,a){if(gc(e,l,s),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(a==null?void 0:a.transformBox)??"fill-box",delete d.transformBox);for(const p of L_)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&k_(d,o,i,c,!1)}const ex=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function F_(e,t,n,r){Zg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ex.has(o)?o:lc(o),t.attrs[o])}function nx(e,t,n){const r=xc(e,t,n);for(const o in e)if(ve(e[o])||ve(t[o])){const i=un.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class V_ extends Wg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ln.has(n)){const r=kg(n);return r&&r.default||0}return n=ex.has(n)?n:lc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return nx(t,n,r)}build(t,n,r){Jg(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){F_(t,n,r,o)}mount(t){this.isSVGTag=tx(t.tagName),super.mount(t)}}const B_=mc.length;function rx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<B_;n++){const r=mc[n],o=e.props[r];(Vn(o)||o===!1)&&(t[r]=o)}return t}function ox(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const $_=[...pc].reverse(),U_=pc.length;function G_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>XC(e,n,r)))}function z_(e){let t=G_(e),n=Nu(),r=!0;const o=u=>(s,a)=>{var f;const d=Yt(e,a,u==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:p,transitionEnd:m,...g}=d;s={...s,...g,...m}}return s};function i(u){t=u(e)}function c(u){const{props:s}=e,a=rx(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<U_;x++){const y=$_[x],E=n[y],b=s[y]!==void 0?s[y]:a[y],w=Vn(b),R=y===u?E.isActive:null;R===!1&&(m=x);let _=b===a[y]&&b!==s[y]&&w;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),E.protectedKeys={...p},!E.isActive&&R===null||!b&&!E.prevProp||hi(b)||typeof b=="boolean")continue;const j=H_(E.prevProp,b);let P=j||y===u&&E.isActive&&!_&&w||x>m&&w,T=!1;const C=Array.isArray(b)?b:[b];let O=C.reduce(o(y),{});R===!1&&(O={});const{prevResolvedValues:I={}}=E,k={...I,...O},B=G=>{P=!0,f.has(G)&&(T=!0,f.delete(G)),E.needsAnimating[G]=!0;const $=e.getValue(G);$&&($.liveStyle=!1)};for(const G in k){const $=O[G],V=I[G];if(p.hasOwnProperty(G))continue;let A=!1;Vs($)&&Vs(V)?A=!ox($,V):A=$!==V,A?$!=null?B(G):f.add(G):$!==void 0&&f.has(G)?B(G):E.protectedKeys[G]=!0}E.prevProp=b,E.prevResolvedValues=O,E.isActive&&(p={...p,...O}),r&&e.blockInitialAnimation&&(P=!1);const q=_&&j;P&&(!q||T)&&d.push(...C.map(G=>{const $={type:y};if(typeof G=="string"&&r&&!q&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,A=Yt(V,G);if(V.enteringChildren&&A){const{delayChildren:F}=A.transition||{};$.delay=Pg(V.enteringChildren,e,F)}}return{animation:G,options:$}}))}if(f.size){const x={};if(typeof s.initial!="boolean"){const y=Yt(e,Array.isArray(s.initial)?s.initial[0]:s.initial);y&&y.transition&&(x.transition=y.transition)}f.forEach(y=>{const E=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=E??null}),d.push({animation:x})}let g=!!d.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function l(u,s){var d;if(n[u].isActive===s)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(u,s)}),n[u].isActive=s;const a=c(u);for(const f in n)n[f].protectedKeys={};return a}return{animateChanges:c,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Nu()}}}function H_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ox(t,e):!1}function Et(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nu(){return{animate:Et(!0),whileInView:Et(),whileHover:Et(),whileTap:Et(),whileDrag:Et(),whileFocus:Et(),exit:Et()}}function ku(e,t){e.min=t.min,e.max=t.max}function ke(e,t){ku(e.x,t.x),ku(e.y,t.y)}function Lu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ix=1e-4,W_=1-ix,q_=1+ix,sx=.01,K_=0-sx,X_=0+sx;function we(e){return e.max-e.min}function Y_(e,t,n){return Math.abs(e-t)<=n}function Fu(e,t,n,r=.5){e.origin=r,e.originPoint=ue(t.min,t.max,e.origin),e.scale=we(n)/we(t),e.translate=ue(n.min,n.max,e.origin)-e.originPoint,(e.scale>=W_&&e.scale<=q_||isNaN(e.scale))&&(e.scale=1),(e.translate>=K_&&e.translate<=X_||isNaN(e.translate))&&(e.translate=0)}function Pn(e,t,n,r){Fu(e.x,t.x,n.x,r?r.originX:void 0),Fu(e.y,t.y,n.y,r?r.originY:void 0)}function Vu(e,t,n){e.min=n.min+t.min,e.max=e.min+we(t)}function Z_(e,t,n){Vu(e.x,t.x,n.x),Vu(e.y,t.y,n.y)}function Bu(e,t,n){e.min=t.min-n.min,e.max=e.min+we(t)}function Io(e,t,n){Bu(e.x,t.x,n.x),Bu(e.y,t.y,n.y)}function $u(e,t,n,r,o){return e-=t,e=Mo(e,1/n,r),o!==void 0&&(e=Mo(e,1/o,r)),e}function Q_(e,t=0,n=1,r=.5,o,i=e,c=e){if(Xe.test(t)&&(t=parseFloat(t),t=ue(c.min,c.max,t/100)-c.min),typeof t!="number")return;let l=ue(i.min,i.max,r);e===i&&(l-=t),e.min=$u(e.min,t,n,l,o),e.max=$u(e.max,t,n,l,o)}function Uu(e,t,[n,r,o],i,c){Q_(e,t[n],t[r],t[o],t.scale,i,c)}const J_=["x","scaleX","originX"],ej=["y","scaleY","originY"];function Gu(e,t,n,r){Uu(e.x,t,J_,n?n.x:void 0,r?r.x:void 0),Uu(e.y,t,ej,n?n.y:void 0,r?r.y:void 0)}function zu(e){return e.translate===0&&e.scale===1}function ax(e){return zu(e.x)&&zu(e.y)}function Hu(e,t){return e.min===t.min&&e.max===t.max}function tj(e,t){return Hu(e.x,t.x)&&Hu(e.y,t.y)}function Wu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function cx(e,t){return Wu(e.x,t.x)&&Wu(e.y,t.y)}function qu(e){return we(e.x)/we(e.y)}function Ku(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ae(e){return[e("x"),e("y")]}function nj(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((o||i||c)&&(r=`translate3d(${o}px, ${i}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:s,rotate:a,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;s&&(r=`perspective(${s}px) ${r}`),a&&(r+=`rotate(${a}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const ux=["TopLeft","TopRight","BottomLeft","BottomRight"],rj=ux.length,Xu=e=>typeof e=="string"?parseFloat(e):e,Yu=e=>typeof e=="number"||z.test(e);function oj(e,t,n,r,o,i){o?(e.opacity=ue(0,n.opacity??1,ij(r)),e.opacityExit=ue(t.opacity??1,0,sj(r))):i&&(e.opacity=ue(t.opacity??1,n.opacity??1,r));for(let c=0;c<rj;c++){const l=`border${ux[c]}Radius`;let u=Zu(t,l),s=Zu(n,l);if(u===void 0&&s===void 0)continue;u||(u=0),s||(s=0),u===0||s===0||Yu(u)===Yu(s)?(e[l]=Math.max(ue(Xu(u),Xu(s),r),0),(Xe.test(s)||Xe.test(u))&&(e[l]+="%")):e[l]=s}(t.rotate||n.rotate)&&(e.rotate=ue(t.rotate||0,n.rotate||0,r))}function Zu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ij=lx(0,.5,ig),sj=lx(.5,.95,De);function lx(e,t,n){return r=>r<e?0:r>t?1:n(kn(e,t,r))}function aj(e,t,n){const r=ve(e)?e:en(e);return r.start(cc("",r,t,n)),r.animation}function Bn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cj=(e,t)=>e.depth-t.depth;class uj{constructor(){this.children=[],this.isDirty=!1}add(t){Ha(this.children,t),this.isDirty=!0}remove(t){Wa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cj),this.isDirty=!1,this.children.forEach(t)}}function lj(e,t){const n=be.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(dt(r),e(i-t))};return se.setup(r,!0),()=>dt(r)}function po(e){return ve(e)?e.get():e}class dj{constructor(){this.members=[]}add(t){Ha(this.members,t),t.scheduleRender()}remove(t){if(Wa(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;o!==void 0&&i!==void 0&&o===i||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:l}=t.options;l===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const mo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$i=["","X","Y","Z"],fj=1e3;let hj=0;function Ui(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",se,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dx(r)}function fx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},l=t==null?void 0:t()){this.id=hj++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(gj),this.nodes.forEach(Ej),this.nodes.forEach(bj),this.nodes.forEach(xj)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new uj)}addEventListener(c,l){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Ka),this.eventHandlers.get(c).add(l)}notifyListeners(c,...l){const u=this.eventHandlers.get(c);u&&u.notify(...l)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=Ug(c)&&!m_(c),this.instance=c;const{layoutId:l,layout:u,visualElement:s}=this.options;if(s&&!s.current&&s.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let a,d=0;const f=()=>this.root.updateBlockedByResize=!1;se.read(()=>{d=window.innerWidth}),e(c,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,a&&a(),a=lj(f,250),mo.hasAnimatedSinceResize&&(mo.hasAnimatedSinceResize=!1,this.nodes.forEach(el)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&s&&(l||u)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||s.getDefaultTransition()||_j,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=s.getProps(),y=!this.targetLayout||!cx(this.targetLayout,p),E=!d&&f;if(this.options.layoutRoot||this.resumeFrom||E||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...ac(m,"layout"),onPlay:g,onComplete:x};(s.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(a,E)}else d||el(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(wj),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const d=this.path[a];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ju);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yj),this.nodes.forEach(pj),this.nodes.forEach(mj)):this.nodes.forEach(Ju),this.clearAllSnapshots();const l=be.now();ge.delta=Ze(0,1e3/60,l-ge.timestamp),ge.timestamp=l,ge.isProcessing=!0,Ii.update.process(ge),Ii.preRender.process(ge),Ii.render.process(ge),ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vj),this.sharedNodes.forEach(Rj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!we(this.snapshot.measuredBox.x)&&!we(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ax(this.projectionDelta),u=this.getTransformTemplate(),s=u?u(this.latestValues,""):void 0,a=s!==this.prevTransformTemplateValue;c&&this.instance&&(l||Rt(this.latestValues)||a)&&(o(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return c&&(u=this.removeTransform(u)),jj(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:c}=this.options;if(!c)return pe();const l=c.measureViewportBox();if(!(((s=this.scroll)==null?void 0:s.wasRoot)||this.path.some(Pj))){const{scroll:a}=this.root;a&&(Ht(l.x,a.offset.x),Ht(l.y,a.offset.y))}return l}removeElementScroll(c){var u;const l=pe();if(ke(l,c),(u=this.scroll)!=null&&u.wasRoot)return l;for(let s=0;s<this.path.length;s++){const a=this.path[s],{scroll:d,options:f}=a;a!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ke(l,c),Ht(l.x,d.offset.x),Ht(l.y,d.offset.y))}return l}applyTransform(c,l=!1){const u=pe();ke(u,c);for(let s=0;s<this.path.length;s++){const a=this.path[s];!l&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Wt(u,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),Rt(a.latestValues)&&Wt(u,a.latestValues)}return Rt(this.latestValues)&&Wt(u,this.latestValues),u}removeTransform(c){const l=pe();ke(l,c);for(let u=0;u<this.path.length;u++){const s=this.path[u];if(!s.instance||!Rt(s.latestValues))continue;Hs(s.latestValues)&&s.updateSnapshot();const a=pe(),d=s.measurePageBox();ke(a,d),Gu(l,s.latestValues,s.snapshot?s.snapshot.layoutBox:void 0,a)}return Rt(this.latestValues)&&Gu(l,this.latestValues),l}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(c||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:d}=this.options;if(!this.layout||!(a||d))return;this.resolvedRelativeTargetAt=ge.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=pe(),this.targetWithTransforms=pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Z_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ke(this.target,this.layout.layoutBox),Xg(this.target,this.targetDelta)):ke(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Hs(this.parent.latestValues)||Kg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,l,u){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pe(),this.relativeTargetOrigin=pe(),Io(this.relativeTargetOrigin,l,u),ke(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===ge.timestamp&&(u=!1),u)return;const{layout:s,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||a))return;ke(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;__(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=pe());const{target:p}=c;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Lu(this.prevProjectionDelta.x,this.projectionDelta.x),Lu(this.prevProjectionDelta.y,this.projectionDelta.y)),Pn(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Ku(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ku(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),c){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zt(),this.projectionDelta=zt(),this.projectionDeltaWithTransform=zt()}setAnimationOrigin(c,l=!1){const u=this.snapshot,s=u?u.latestValues:{},a={...this.latestValues},d=zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=pe(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),y=!x||x.members.length<=1,E=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Cj));this.animationProgress=0;let b;this.mixTargetDelta=w=>{const R=w/1e3;tl(d.x,c.x,R),tl(d.y,c.y,R),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sj(this.relativeTarget,this.relativeTargetOrigin,f,R),b&&tj(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=pe()),ke(b,this.relativeTarget)),g&&(this.animationValues=a,oj(a,s,this.latestValues,R,E,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var l,u,s;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(s=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||s.stop(),this.pendingAnimation&&(dt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{mo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=en(0)),this.currentAnimation=aj(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),c.onUpdate&&c.onUpdate(a)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fj),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:l,target:u,layout:s,latestValues:a}=c;if(!(!l||!u||!s)){if(this!==c&&this.layout&&s&&hx(this.options.animationType,this.layout.layoutBox,s.layoutBox)){u=this.target||pe();const d=we(this.layout.layoutBox.x);u.x.min=c.target.x.min,u.x.max=u.x.min+d;const f=we(this.layout.layoutBox.y);u.y.min=c.target.y.min,u.y.max=u.y.min+f}ke(l,u),Wt(l,a),Pn(this.projectionDeltaWithTransform,this.layoutCorrected,l,a)}}registerSharedNode(c,l){this.sharedNodes.has(c)||this.sharedNodes.set(c,new dj),this.sharedNodes.get(c).add(l);const s=l.options.initialPromotionConfig;l.promote({transition:s?s.transition:void 0,preserveFollowOpacity:s&&s.shouldPreserveFollowOpacity?s.shouldPreserveFollowOpacity(l):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var l;const{layoutId:c}=this.options;return c?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:c}=this.options;return c?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:l,preserveFollowOpacity:u}={}){const s=this.getStack();s&&s.promote(this,u),c&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let l=!1;const{latestValues:u}=c;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const s={};u.z&&Ui("z",c,s,this.animationValues);for(let a=0;a<$i.length;a++)Ui(`rotate${$i[a]}`,c,s,this.animationValues),Ui(`skew${$i[a]}`,c,s,this.animationValues);c.render();for(const a in s)c.setStaticValue(a,s[a]),this.animationValues&&(this.animationValues[a]=s[a]);c.scheduleRender()}applyProjectionStyles(c,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=po(l==null?void 0:l.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none";return}const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=po(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Rt(this.latestValues)&&(c.transform=u?u({},""):"none",this.hasProjected=!1);return}c.visibility="";const a=s.animationValues||s.latestValues;this.applyTransformsToTarget();let d=nj(this.projectionDeltaWithTransform,this.treeScale,a);u&&(d=u(a,d)),c.transform=d;const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,s.animationValues?c.opacity=s===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:c.opacity=s===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const m in qs){if(a[m]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=qs[m],E=d==="none"?a[m]:g(a[m],s);if(x){const b=x.length;for(let w=0;w<b;w++)c[x[w]]=E}else y?this.options.visualElement.renderState.vars[m]=E:c[m]=E}this.options.layoutId&&(c.pointerEvents=s===this?po(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var l;return(l=c.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Qu),this.root.sharedNodes.clear()}}}function pj(e){e.updateLayout()}function mj(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,c=t.source!==e.layout.source;i==="size"?Ae(d=>{const f=c?t.measuredBox[d]:t.layoutBox[d],p=we(f);f.min=r[d].min,f.max=f.min+p}):hx(i,t.layoutBox,r)&&Ae(d=>{const f=c?t.measuredBox[d]:t.layoutBox[d],p=we(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const l=zt();Pn(l,r,t.layoutBox);const u=zt();c?Pn(u,e.applyTransform(o,!0),t.measuredBox):Pn(u,r,t.layoutBox);const s=!ax(l);let a=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=pe();Io(m,t.layoutBox,f.layoutBox);const g=pe();Io(g,r,p.layoutBox),cx(m,g)||(a=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:s,hasRelativeLayoutChanged:a})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function gj(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function xj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vj(e){e.clearSnapshot()}function Qu(e){e.clearMeasurements()}function Ju(e){e.isLayoutDirty=!1}function yj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function el(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ej(e){e.resolveTargetDelta()}function bj(e){e.calcProjection()}function wj(e){e.resetSkewAndRotation()}function Rj(e){e.removeLeadSnapshot()}function tl(e,t,n){e.translate=ue(t.translate,0,n),e.scale=ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function nl(e,t,n,r){e.min=ue(t.min,n.min,r),e.max=ue(t.max,n.max,r)}function Sj(e,t,n,r){nl(e.x,t.x,n.x,r),nl(e.y,t.y,n.y,r)}function Cj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _j={duration:.45,ease:[.4,0,.1,1]},rl=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ol=rl("applewebkit/")&&!rl("chrome/")?Math.round:De;function il(e){e.min=ol(e.min),e.max=ol(e.max)}function jj(e){il(e.x),il(e.y)}function hx(e,t,n){return e==="position"||e==="preserve-aspect"&&!Y_(qu(t),qu(n),.2)}function Pj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Tj=fx({attachResizeListener:(e,t)=>Bn(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Gi={current:void 0},px=fx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gi.current){const e=new Tj({});e.mount(window),e.setOptions({layoutScroll:!0}),Gi.current=e}return Gi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vc=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Aj(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sl(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():sl(e[o],null)}}}}function Oj(...e){return v.useCallback(Aj(...e),e)}class Mj extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Gs(r)&&r.offsetWidth||0,i=Gs(r)&&r.offsetHeight||0,c=this.props.sizeRef.current;c.height=n.offsetHeight||0,c.width=n.offsetWidth||0,c.top=n.offsetTop,c.left=n.offsetLeft,c.right=o-c.width-c.left,c.bottom=i-c.height-c.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ij({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){var d;const i=S.useId(),c=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=S.useContext(vc),s=((d=e.props)==null?void 0:d.ref)??(e==null?void 0:e.ref),a=Oj(c,s);return S.useInsertionEffect(()=>{const{width:f,height:p,top:m,left:g,right:x,bottom:y}=l.current;if(t||!c.current||!f||!p)return;const E=n==="left"?`left: ${g}`:`right: ${x}`,b=r==="bottom"?`bottom: ${y}`:`top: ${m}`;c.current.dataset.motionPopId=i;const w=document.createElement("style");u&&(w.nonce=u);const R=o??document.head;return R.appendChild(w),w.sheet&&w.sheet.insertRule(`
67
+ [data-motion-pop-id="${i}"] {
68
68
  position: absolute !important;
69
69
  width: ${f}px !important;
70
- height: ${d}px !important;
71
- ${x}px !important;
72
- top: ${p}px !important;
70
+ height: ${p}px !important;
71
+ ${E}px !important;
72
+ ${b}px !important;
73
73
  }
74
- `),()=>{E.contains(y)&&E.removeChild(y)}},[t]),h.jsxRuntimeExports.jsx(ij,{isPresent:t,childRef:s,sizeRef:c,children:v.cloneElement(e,{ref:i})})}const aj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:c,anchorX:l,root:u})=>{const i=Fa(cj),a=S.useId();let f=!0,d=S.useMemo(()=>(f=!1,{id:a,initial:t,isPresent:n,custom:o,onExitComplete:p=>{i.set(p,!0);for(const g of i.values())if(!g)return;r&&r()},register:p=>(i.set(p,!1),()=>i.delete(p))}),[n,i,r]);return s&&f&&(d={...d}),S.useMemo(()=>{i.forEach((p,g)=>i.set(g,!1))},[n]),v.useEffect(()=>{!n&&!i.size&&r&&r()},[n]),c==="popLayout"&&(e=h.jsxRuntimeExports.jsx(sj,{isPresent:n,anchorX:l,root:u,children:e})),h.jsxRuntimeExports.jsx(ci.Provider,{value:d,children:e})};function cj(){return new Map}function nx(e=!0){const t=S.useContext(ci);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=S.useId();S.useEffect(()=>{if(e)return o(s)},[e]);const c=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,c]:[!0]}const vr=e=>e.key||"";function el(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const jt=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:l="left",root:u})=>{const[i,a]=nx(c),f=S.useMemo(()=>el(e),[e]),d=c&&!i?[]:f.map(vr),p=S.useRef(!0),g=S.useRef(f),m=Fa(()=>new Map),x=S.useRef(new Set),[y,E]=S.useState(f),[b,R]=S.useState(f);Im(()=>{p.current=!1,g.current=f;for(let C=0;C<b.length;C++){const _=vr(b[C]);d.includes(_)?(m.delete(_),x.current.delete(_)):m.get(_)!==!0&&m.set(_,!1)}},[b,d.length,d.join("-")]);const w=[];if(f!==y){let C=[...f];for(let _=0;_<b.length;_++){const M=b[_],j=vr(M);d.includes(j)||(C.splice(_,0,M),w.push(M))}return s==="wait"&&w.length&&(C=w),R(el(C)),E(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=S.useContext(La);return h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:b.map(C=>{const _=vr(C),M=c&&!i?!1:f===b||d.includes(_),j=()=>{if(x.current.has(_))return;if(x.current.add(_),m.has(_))m.set(_,!0);else return;let A=!0;m.forEach(I=>{I||(A=!1)}),A&&(P==null||P(),R(g.current),c&&(a==null||a()),r&&r())};return h.jsxRuntimeExports.jsx(aj,{isPresent:M,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:u,onExitComplete:M?void 0:j,anchorX:l,children:C},_)})})},rx=S.createContext({strict:!1}),tl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let nl=!1;function uj(){if(nl)return;const e={};for(const t in tl)e[t]={isEnabled:n=>tl[t].some(r=>!!n[r])};Mg(e),nl=!0}function ox(){return uj(),XC()}function lj(e){const t=ox();for(const n in e)t[n]={...t[n],...e[n]};Mg(t)}const fj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Mo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fj.has(e)}let ix=e=>!Mo(e);function dj(e){typeof e=="function"&&(ix=t=>t.startsWith("on")?!Mo(t):e(t))}try{dj(require("@emotion/is-prop-valid").default)}catch{}function hj(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ix(o)||n===!0&&Mo(o)||!t&&!Mo(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const fi=S.createContext({});function pj(e,t){if(li(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fn(n)?n:void 0,animate:Fn(r)?r:void 0}}return e.inherit!==!1?t:{}}function mj(e){const{initial:t,animate:n}=pj(e,S.useContext(fi));return S.useMemo(()=>({initial:t,animate:n}),[rl(t),rl(n)])}function rl(e){return Array.isArray(e)?e.join(" "):e}const hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sx(e,t,n){for(const r in t)!xe(t[r])&&!Vg(r,n)&&(e[r]=t[r])}function gj({transformTemplate:e},t){return S.useMemo(()=>{const n=hc();return lc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xj(e,t){const n=e.style||{},r={};return sx(r,n,e),Object.assign(r,gj(e,t)),r}function vj(e,t){const n={},r=xj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ax=()=>({...hc(),attrs:{}});function yj(e,t,n,r){const o=S.useMemo(()=>{const s=ax();return Bg(s,t,Ug(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sx(s,e.style,e),o.style={...s,...o.style}}return o}const Ej=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pc(e){return typeof e!="string"||e.includes("-")?!1:!!(Ej.indexOf(e)>-1||/[A-Z]/u.test(e))}function bj(e,t,n,{latestValues:r},o,s=!1,c){const u=(c??pc(e)?yj:vj)(t,r,o,e),i=hj(t,typeof e=="string",s),a=e!==S.Fragment?{...i,...u,ref:n}:{},{children:f}=t,d=S.useMemo(()=>xe(f)?f.get():f,[f]);return S.createElement(e,{...a,children:d})}function wj({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Rj(n,r,o,e),renderState:t()}}function Rj(e,t,n,r){const o={},s=r(e,{});for(const d in s)o[d]=ho(s[d]);let{initial:c,animate:l}=e;const u=li(e),i=Og(e);t&&i&&!u&&e.inherit!==!1&&(c===void 0&&(c=t.initial),l===void 0&&(l=t.animate));let a=n?n.initial===!1:!1;a=a||c===!1;const f=a?l:c;if(f&&typeof f!="boolean"&&!ui(f)){const d=Array.isArray(f)?f:[f];for(let p=0;p<d.length;p++){const g=rc(e,d[p]);if(g){const{transitionEnd:m,transition:x,...y}=g;for(const E in y){let b=y[E];if(Array.isArray(b)){const R=a?b.length-1:0;b=b[R]}b!==null&&(o[E]=b)}for(const E in m)o[E]=m[E]}}}return o}const cx=e=>(t,n)=>{const r=S.useContext(fi),o=S.useContext(ci),s=()=>wj(e,t,r,o);return n?s():Fa(s)},Sj=cx({scrapeMotionValuesFromProps:fc,createRenderState:hc}),Cj=cx({scrapeMotionValuesFromProps:Gg,createRenderState:ax}),_j=Symbol.for("motionComponentSymbol");function jj(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(s=>{var l;s&&((l=e.onMount)==null||l.call(e,s)),t&&(s?t.mount(s):t.unmount());const c=r.current;if(typeof c=="function")if(s){const u=c(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s)},[t])}const ux=S.createContext({});function Sn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pj(e,t,n,r,o,s){var x,y;const{visualElement:c}=S.useContext(fi),l=S.useContext(rx),u=S.useContext(ci),i=S.useContext(dc).reducedMotion,a=S.useRef(null);r=r||l.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:i,isSVG:s}));const f=a.current,d=S.useContext(ux);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Tj(a.current,n,o,d);const p=S.useRef(!1);S.useInsertionEffect(()=>{f&&p.current&&f.update(n,u)});const g=n[gg],m=S.useRef(!!g&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,g))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,g)));return Im(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),m.current&&f.animationState&&f.animationState.animateChanges())}),S.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,g)}),m.current=!1),f.enteringChildren=void 0)}),f}function Tj(e,t,n,r){const{layoutId:o,layout:s,drag:c,dragConstraints:l,layoutScroll:u,layoutRoot:i,layoutCrossfade:a}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lx(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||l&&Sn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:a,layoutScroll:u,layoutRoot:i})}function lx(e){if(e)return e.options.allowProjection!==!1?e.projection:lx(e.parent)}function Bi(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&lj(r);const s=n?n==="svg":pc(e),c=s?Cj:Sj;function l(i,a){let f;const d={...S.useContext(dc),...i,layoutId:Aj(i)},{isStatic:p}=d,g=mj(i),m=c(i,p);if(!p&&Mm){Oj(d,r);const x=Mj(d);f=x.MeasureLayout,g.visualElement=Pj(e,m,d,o,x.ProjectionNode,s)}return h.jsxRuntimeExports.jsxs(fi.Provider,{value:g,children:[f&&g.visualElement?h.jsxRuntimeExports.jsx(f,{visualElement:g.visualElement,...d}):null,bj(e,i,jj(m,g.visualElement,a),m,p,t,s)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[_j]=e,u}function Aj({layoutId:e}){const t=S.useContext(La).id;return t&&e!==void 0?t+"-"+e:e}function Oj(e,t){const n=S.useContext(rx).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?on(!1,r,"lazy-strict-mode"):tt(!1,r,"lazy-strict-mode")}}function Mj(e){const t=ox(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Ij(e,t){if(typeof Proxy>"u")return Bi;const n=new Map,r=(s,c)=>Bi(s,c,e,t),o=(s,c)=>(process.env.NODE_ENV!=="production"&&Ga(!1,"motion() is deprecated. Use motion.create() instead."),r(s,c));return new Proxy(o,{get:(s,c)=>c==="create"?r:(n.has(c)||n.set(c,Bi(c,void 0,e,t)),n.get(c))})}const Dj=(e,t)=>t.isSVG??pc(e)?new d_(t):new s_(t,{allowProjection:e!==S.Fragment});class Nj extends mt{constructor(t){super(t),t.animationState||(t.animationState=x_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ui(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let kj=0;class Lj extends mt{constructor(){super(...arguments),this.id=kj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Fj={animation:{Feature:Nj},exit:{Feature:Lj}};function rr(e){return{point:{x:e.pageX,y:e.pageY}}}const Vj=e=>t=>ac(t)&&e(t,rr(t));function jn(e,t,n,r){return Vn(e,t,Vj(n),r)}const fx=({current:e})=>e?e.ownerDocument.defaultView:null,ol=(e,t)=>Math.abs(e-t);function Bj(e,t){const n=ol(e.x,t.x),r=ol(e.y,t.y);return Math.sqrt(n**2+r**2)}const il=new Set(["auto","scroll"]);class dx{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ui(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=Bj(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!m)return;const{point:x}=p,{timestamp:y}=me;this.history.push({...x,timestamp:y});const{onStart:E,onMove:b}=this.handlers;g||(E&&E(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=$i(g,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:m,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Ui(p.type==="pointercancel"?this.lastMoveEventInfo:$i(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,E),x&&x(p,E)},!ac(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const u=rr(t),i=$i(u,this.transformPagePoint),{point:a}=i,{timestamp:f}=me;this.history=[{...a,timestamp:f}];const{onSessionStart:d}=n;d&&d(t,Ui(i,this.history)),this.removeListeners=er(jn(this.contextWindow,"pointermove",this.handlePointerMove),jn(this.contextWindow,"pointerup",this.handlePointerUp),jn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(il.has(r.overflowX)||il.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),se.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lt(this.updatePoint)}}function $i(e,t){return t?{point:t(e.point)}:e}function sl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ui({point:e},t){return{point:e,delta:sl(e,hx(t)),offset:sl(e,$j(t)),velocity:Uj(t,.1)}}function $j(e){return e[0]}function hx(e){return e[e.length-1]}function Uj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=hx(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qe(t)));)n--;if(!r)return{x:0,y:0};const s=Oe(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Gj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ue(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ue(n,e,r.max):Math.min(e,n)),e}function al(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Hj(e,{top:t,left:n,bottom:r,right:o}){return{x:al(e.x,n,o),y:al(e.y,t,r)}}function cl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function zj(e,t){return{x:cl(e.x,t.x),y:cl(e.y,t.y)}}function Wj(e,t){let n=.5;const r=be(e),o=be(t);return o>r?n=Nn(t.min,t.max-r,e.min):r>o&&(n=Nn(e.min,e.max-o,t.min)),Ye(0,1,n)}function qj(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Us=.35;function Kj(e=Us){return e===!1?e=0:e===!0&&(e=Us),{x:ul(e,"left","right"),y:ul(e,"top","bottom")}}function ul(e,t,n){return{min:ll(e,t),max:ll(e,n)}}function ll(e,t){return typeof e=="number"?e:e[t]||0}const Xj=new WeakMap;class Yj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=f=>{n?(this.stopAnimation(),this.snapToCursor(rr(f).point)):this.pauseAnimation()},c=(f,d)=>{this.stopAnimation();const{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=LC(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ae(y=>{let E=this.getAxisMotionValue(y).get()||0;if(Ke.test(E)){const{projection:b}=this.visualElement;if(b&&b.layout){const R=b.layout.layoutBox[y];R&&(E=be(R)*(parseFloat(E)/100))}}this.originPoint[y]=E}),m&&se.postRender(()=>m(f,d)),Ns(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=d;if(g&&this.currentDirection===null){this.currentDirection=Zj(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),x&&x(f,d)},u=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},i=()=>Ae(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:a}=this.getProps();this.panSession=new dx(t,{onSessionStart:s,onStart:c,onMove:l,onSessionEnd:u,resumeAnimation:i},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:r,contextWindow:fx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:l}=this.getProps();l&&se.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!yr(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=Gj(c,this.constraints[t],this.elastic[t])),s.set(c)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&Sn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Hj(r.layoutBox,t):this.constraints=!1,this.elastic=Kj(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ae(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=qj(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Sn(t))return!1;const r=t.current;tt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=e_(r,o.root,this.visualElement.getTransformPagePoint());let c=zj(o.layout.layoutBox,s);if(n){const l=n(ZC(c));this.hasMutatedConstraints=!!l,l&&(c=Dg(l))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},i=Ae(a=>{if(!yr(a,n,this.currentDirection))return;let f=u&&u[a]||{};c&&(f={min:0,max:0});const d=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[a]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(a,g)});return Promise.all(i).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ns(this.visualElement,t),r.start(nc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ae(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ae(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ae(n=>{const{drag:r}=this.getProps();if(!yr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:l}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-ue(c,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Sn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ae(c=>{const l=this.getAxisMotionValue(c);if(l&&this.constraints!==!1){const u=l.get();o[c]=Wj({min:u,max:u},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ae(c=>{if(!yr(c,t,null))return;const l=this.getAxisMotionValue(c),{min:u,max:i}=this.constraints[c];l.set(ue(u,i,o[c]))})}addListeners(){if(!this.visualElement.current)return;Xj.set(this.visualElement,this);const t=this.visualElement.current,n=jn(t,"pointerdown",u=>{const{drag:i,dragListener:a=!0}=this.getProps();i&&a&&!Pg(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Sn(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),se.read(r);const c=Vn(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:i})=>{this.isDragging&&i&&(Ae(a=>{const f=this.getAxisMotionValue(a);f&&(this.originPoint[a]+=u[a].translate,f.set(f.get()+u[a].translate))}),this.visualElement.render())}));return()=>{c(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=Us,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:l}}}function yr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Zj(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Qj extends mt{constructor(t){super(t),this.removeGroupControls=Ie,this.removeListeners=Ie,this.controls=new Yj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ie}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const fl=e=>(t,n)=>{e&&se.postRender(()=>e(t,n))};class Jj extends mt{constructor(){super(...arguments),this.removePointerDownListener=Ie}onPointerDown(t){this.session=new dx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:fl(t),onStart:fl(n),onMove:r,onEnd:(s,c)=>{delete this.session,o&&se.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=jn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Gi=!1;class eP extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Gi&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),po.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:c}=r;return c&&(c.isPresent=s,Gi=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||se.postRender(()=>{const l=c.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),sc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Gi=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function px(e){const[t,n]=nx(),r=S.useContext(La);return h.jsxRuntimeExports.jsx(eP,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(ux),isPresent:t,safeToRemove:n})}const tP={pan:{Feature:Jj},drag:{Feature:Qj,ProjectionNode:tx,MeasureLayout:px}};function dl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&se.postRender(()=>s(t,rr(t)))}class nP extends mt{mount(){const{current:t}=this.node;t&&(this.unmount=FC(t,(n,r)=>(dl(this.node,r,"Start"),o=>dl(this.node,o,"End"))))}unmount(){}}class rP extends mt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=er(Vn(this.node.current,"focus",()=>this.onFocus()),Vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function hl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&se.postRender(()=>s(t,rr(t)))}class oP extends mt{mount(){const{current:t}=this.node;t&&(this.unmount=$C(t,(n,r)=>(hl(this.node,r,"Start"),(o,{success:s})=>hl(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Gs=new WeakMap,Hi=new WeakMap,iP=e=>{const t=Gs.get(e.target);t&&t(e)},sP=e=>{e.forEach(iP)};function aP({root:e,...t}){const n=e||document;Hi.has(n)||Hi.set(n,{});const r=Hi.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(sP,{root:e,...t})),r[o]}function cP(e,t,n){const r=aP(t);return Gs.set(e,n),r.observe(e),()=>{Gs.delete(e),r.unobserve(e)}}const uP={some:0,all:1};class lP extends mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:uP[o]},l=u=>{const{isIntersecting:i}=u;if(this.isInView===i||(this.isInView=i,s&&!i&&this.hasEnteredView))return;i&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",i);const{onViewportEnter:a,onViewportLeave:f}=this.node.getProps(),d=i?a:f;d&&d(u)};return cP(this.node.current,c,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(fP(t,n))&&this.startObserver()}unmount(){}}function fP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dP={inView:{Feature:lP},tap:{Feature:oP},focus:{Feature:rP},hover:{Feature:nP}},hP={layout:{ProjectionNode:tx,MeasureLayout:px}},pP={...Fj,...dP,...tP,...hP},re=Ij(pP,Dj),mP=S.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},s)=>h.jsxRuntimeExports.jsx(Pv,{...o,className:O.classNames("overflow-hidden bg-white",t),ref:s,asChild:!0,children:h.jsxRuntimeExports.jsxs(re.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&h.jsxRuntimeExports.jsx("hr",{className:O.classNames("bg-primary-blue h-0.5 border-0",n)}),h.jsxRuntimeExports.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),gP=({items:e,classNames:t,showDivider:n,defaultValue:r})=>h.jsxRuntimeExports.jsx(Sv,{className:O.classNames("flex flex-col space-y-4",t==null?void 0:t.container),type:"single",defaultValue:r,collapsible:!0,children:e==null?void 0:e.map(o=>h.jsxRuntimeExports.jsxs(MR,{className:t==null?void 0:t.item,value:o.id,children:[h.jsxRuntimeExports.jsx(IR,{className:t==null?void 0:t.trigger,triggerIcon:o==null?void 0:o.triggerIcon,children:o.title}),h.jsxRuntimeExports.jsx(mP,{showDivider:n,dividerClassName:t==null?void 0:t.divider,className:t==null?void 0:t.content,children:o.content})]},o.id))}),xP={success:h.jsxRuntimeExports.jsx(ne.SvgIconCheckCircle,{width:24,height:24}),info:h.jsxRuntimeExports.jsx(ne.SvgIconInfoCircle,{width:24,height:24}),warning:h.jsxRuntimeExports.jsx(ne.SvgIconWarningCircle,{width:24,height:24}),error:h.jsxRuntimeExports.jsx(ne.SvgIconErrorCircle,{width:24,height:24})},vP={success:"text-green-6",info:"text-blue-6",warning:"text-gold-6",error:"text-red-6"},yP={success:"text-gray-6 hover:bg-gray-100 cursor-pointer",error:"text-gray-6 hover:bg-gray-100 cursor-pointer",warning:"text-gray-6 hover:bg-gray-100 cursor-pointer",info:"text-gray-6 hover:bg-gray-100 cursor-pointer"},EP={success:"bg-green-1 border border-green-3",info:"bg-blue-1 border border-blue-3",warning:"bg-gold-1 border border-gold-3",error:"bg-red-1 border border-red-3"},bP=({type:e="info",title:t,description:n,showIcon:r=!0,closable:o=!1,onClose:s,className:c="",children:l,...u})=>{const i=!!t&&!n&&!l||!t&&!!n&&!l;return h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:O.classNames("relative border rounded-lg p-4",EP[e],{[c]:c}),...u,children:[h.jsxRuntimeExports.jsxs(De,{gap:4,align:i?"center":"start",children:[r&&h.jsxRuntimeExports.jsx("div",{className:O.classNames("shrink-0",vP[e]),children:xP[e]}),h.jsxRuntimeExports.jsxs(De,{direction:i?"horizontal":"vertical",gap:0,className:"flex-1 min-w-0",align:i?"center":"start",children:[t&&h.jsxRuntimeExports.jsx("h4",{className:"text-base font-medium leading-tight text-gray-12",children:t}),n&&h.jsxRuntimeExports.jsx("p",{className:O.classNames("text-sm font-medium leading-tight text-gray-12",{"mt-2":!!t&&!i}),children:n}),l&&h.jsxRuntimeExports.jsx("div",{className:"mt-2",children:l})]})]}),o&&h.jsxRuntimeExports.jsx("button",{onClick:s,className:O.classNames("absolute top-4 right-4 p-1 rounded transition-colors",yP[e]),"aria-label":"Cerrar alerta",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{width:16,height:16})})]})},wP={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},RP=({size:e="md",src:t,alt:n="avatar",icon:r=h.jsxRuntimeExports.jsx(ne.SvgUser,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:s="text-white",className:c="",onClick:l,style:u})=>h.jsxRuntimeExports.jsxs(ty,{className:O.classNames("inline-flex shrink-0 overflow-hidden rounded-full",wP[e],c),onClick:l,style:u,children:[t&&h.jsxRuntimeExports.jsx(ny,{src:t,alt:n,className:"h-full w-full object-cover"}),h.jsxRuntimeExports.jsx(ry,{delayMs:0,className:O.classNames("flex h-full w-full items-center justify-center rounded-full",s,o),children:r})]}),SP={default:O.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:O.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:O.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:O.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:O.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},CP={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},pl=["sm","md","lg","xl"],_P=e=>{const t=pl.indexOf(e);return t===-1?"":O.classNames(pl.slice(0,t+1).map(n=>CP[n]))},jP={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},PP=e=>O.classNames("flex items-center justify-center gap-2 border active:scale-95",jP[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),Hs=({icon:e,children:t,leftIcon:n,rightIcon:r,type:o="button",variant:s="default",size:c="md",className:l="",isLoading:u=!1,positionLoading:i="left",cursor:a="pointer",...f})=>{const d=S.useId(),p=PP(a),{isLeftLoading:g,isRightLoading:m}=S.useMemo(()=>({isLeftLoading:i==="left"&&u,isRightLoading:i==="right"&&u}),[u,i]),x=S.useMemo(()=>["primary","secondary","text","withoutColor"].includes(s)?h.jsxRuntimeExports.jsx(ne.SvgLoaderAnimBlue,{className:"animate-spin"}):h.jsxRuntimeExports.jsx(ne.SvgLoaderAnimWhite,{className:"animate-spin"}),[s]),y=S.useMemo(()=>e??n,[e,n]);return h.jsxRuntimeExports.jsxs(re.button,{id:`${d}-button`,className:O.classNames(p,SP[s],_P(c),l),type:o,...f,children:[h.jsxRuntimeExports.jsx(jt,{mode:"wait",children:(g||y)&&h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:g?x:y},"leftIcon")}),typeof t=="string"||typeof t=="number"?h.jsxRuntimeExports.jsx("span",{className:"whitespace-normal",children:t}):t,h.jsxRuntimeExports.jsx(jt,{mode:"wait",children:(m||r)&&h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:m?x:r},"rightIcon")})]})},TP=({children:e,className:t="",align:n="horizontal",shadow:r=!0,rounded:o=!0,bordered:s=!0,...c})=>{const{...l}=c,u=O.classNames("bg-white p-4",{"flex flex-col":n==="horizontal","flex flex-col md:flex-row md:max-w-xl":n==="vertical"},{"shadow-lg":r},{"rounded-2xl":o},{"border border-gray-200":s},{[t]:t});return h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:u,...l,children:e})};var zi={exports:{}};/*!
74
+ `),()=>{R.contains(w)&&R.removeChild(w)}},[t]),h.jsxRuntimeExports.jsx(Mj,{isPresent:t,childRef:c,sizeRef:l,children:v.cloneElement(e,{ref:a})})}const Dj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:c,anchorX:l,anchorY:u,root:s})=>{const a=za(Nj),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:m=>{a.set(m,!0);for(const g of a.values())if(!g)return;r&&r()},register:m=>(a.set(m,!1),()=>a.delete(m))}),[n,a,r]);return i&&f&&(p={...p}),S.useMemo(()=>{a.forEach((m,g)=>a.set(g,!1))},[n]),v.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),c==="popLayout"&&(e=h.jsxRuntimeExports.jsx(Ij,{isPresent:n,anchorX:l,anchorY:u,root:s,children:e})),h.jsxRuntimeExports.jsx(fi.Provider,{value:p,children:e})};function Nj(){return new Map}function mx(e=!0){const t=S.useContext(fi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const c=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,c]:[!0]}const yr=e=>e.key||"";function al(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Ot=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:c=!1,anchorX:l="left",anchorY:u="top",root:s})=>{const[a,d]=mx(c),f=S.useMemo(()=>al(e),[e]),p=c&&!a?[]:f.map(yr),m=S.useRef(!0),g=S.useRef(f),x=za(()=>new Map),y=S.useRef(new Set),[E,b]=S.useState(f),[w,R]=S.useState(f);Km(()=>{m.current=!1,g.current=f;for(let P=0;P<w.length;P++){const T=yr(w[P]);p.includes(T)?(x.delete(T),y.current.delete(T)):x.get(T)!==!0&&x.set(T,!1)}},[w,p.length,p.join("-")]);const _=[];if(f!==E){let P=[...f];for(let T=0;T<w.length;T++){const C=w[T],O=yr(C);p.includes(O)||(P.splice(T,0,C),_.push(C))}return i==="wait"&&_.length&&(P=_),R(al(P)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:j}=S.useContext(Ga);return h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:w.map(P=>{const T=yr(P),C=c&&!a?!1:f===w||p.includes(T),O=()=>{if(y.current.has(T))return;if(y.current.add(T),x.has(T))x.set(T,!0);else return;let I=!0;x.forEach(k=>{k||(I=!1)}),I&&(j==null||j(),R(g.current),c&&(d==null||d()),r&&r())};return h.jsxRuntimeExports.jsx(Dj,{isPresent:C,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:s,onExitComplete:C?void 0:O,anchorX:l,anchorY:u,children:P},T)})})},gx=S.createContext({strict:!1}),cl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ul=!1;function kj(){if(ul)return;const e={};for(const t in cl)e[t]={isEnabled:n=>cl[t].some(r=>!!n[r])};Hg(e),ul=!0}function xx(){return kj(),w_()}function Lj(e){const t=xx();for(const n in e)t[n]={...t[n],...e[n]};Hg(t)}const Fj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Do(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Fj.has(e)}let vx=e=>!Do(e);function Vj(e){typeof e=="function"&&(vx=t=>t.startsWith("on")?!Do(t):e(t))}try{Vj(require("@emotion/is-prop-valid").default)}catch{}function Bj(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(vx(o)||n===!0&&Do(o)||!t&&!Do(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const mi=S.createContext({});function $j(e,t){if(pi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vn(n)?n:void 0,animate:Vn(r)?r:void 0}}return e.inherit!==!1?t:{}}function Uj(e){const{initial:t,animate:n}=$j(e,S.useContext(mi));return S.useMemo(()=>({initial:t,animate:n}),[ll(t),ll(n)])}function ll(e){return Array.isArray(e)?e.join(" "):e}const yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yx(e,t,n){for(const r in t)!ve(t[r])&&!Qg(r,n)&&(e[r]=t[r])}function Gj({transformTemplate:e},t){return S.useMemo(()=>{const n=yc();return gc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zj(e,t){const n=e.style||{},r={};return yx(r,n,e),Object.assign(r,Gj(e,t)),r}function Hj(e,t){const n={},r=zj(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ex=()=>({...yc(),attrs:{}});function Wj(e,t,n,r){const o=S.useMemo(()=>{const i=Ex();return Jg(i,t,tx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};yx(i,e.style,e),o.style={...i,...o.style}}return o}const qj=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ec(e){return typeof e!="string"||e.includes("-")?!1:!!(qj.indexOf(e)>-1||/[A-Z]/u.test(e))}function Kj(e,t,n,{latestValues:r},o,i=!1,c){const u=(c??Ec(e)?Wj:Hj)(t,r,o,e),s=Bj(t,typeof e=="string",i),a=e!==S.Fragment?{...s,...u,ref:n}:{},{children:d}=t,f=S.useMemo(()=>ve(d)?d.get():d,[d]);return S.createElement(e,{...a,children:f})}function Xj({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Yj(n,r,o,e),renderState:t()}}function Yj(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=po(i[f]);let{initial:c,animate:l}=e;const u=pi(e),s=zg(e);t&&s&&!u&&e.inherit!==!1&&(c===void 0&&(c=t.initial),l===void 0&&(l=t.animate));let a=n?n.initial===!1:!1;a=a||c===!1;const d=a?l:c;if(d&&typeof d!="boolean"&&!hi(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const m=uc(e,f[p]);if(m){const{transitionEnd:g,transition:x,...y}=m;for(const E in y){let b=y[E];if(Array.isArray(b)){const w=a?b.length-1:0;b=b[w]}b!==null&&(o[E]=b)}for(const E in g)o[E]=g[E]}}}return o}const bx=e=>(t,n)=>{const r=S.useContext(mi),o=S.useContext(fi),i=()=>Xj(e,t,r,o);return n?i():za(i)},Zj=bx({scrapeMotionValuesFromProps:xc,createRenderState:yc}),Qj=bx({scrapeMotionValuesFromProps:nx,createRenderState:Ex}),Jj=Symbol.for("motionComponentSymbol");function eP(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{var l;i&&((l=e.onMount)==null||l.call(e,i)),t&&(i?t.mount(i):t.unmount());const c=r.current;if(typeof c=="function")if(i){const u=c(i);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(i);else c&&(c.current=i)},[t])}const wx=S.createContext({});function _n(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tP(e,t,n,r,o,i){var b,w;const{visualElement:c}=S.useContext(mi),l=S.useContext(gx),u=S.useContext(fi),s=S.useContext(vc),a=s.reducedMotion,d=s.skipAnimations,f=S.useRef(null),p=S.useRef(!1);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:a,skipAnimations:d,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,g=S.useContext(wx);m&&!m.projection&&o&&(m.type==="html"||m.type==="svg")&&nP(f.current,n,o,g);const x=S.useRef(!1);S.useInsertionEffect(()=>{m&&x.current&&m.update(n,u)});const y=n[Og],E=S.useRef(!!y&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,y))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,y)));return Km(()=>{p.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),E.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!E.current&&m.animationState&&m.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var R;(R=window.MotionHandoffMarkAsComplete)==null||R.call(window,y)}),E.current=!1),m.enteringChildren=void 0)}),m}function nP(e,t,n,r){const{layoutId:o,layout:i,drag:c,dragConstraints:l,layoutScroll:u,layoutRoot:s,layoutCrossfade:a}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Rx(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!c||l&&_n(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:a,layoutScroll:u,layoutRoot:s})}function Rx(e){if(e)return e.options.allowProjection!==!1?e.projection:Rx(e.parent)}function zi(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&Lj(r);const i=n?n==="svg":Ec(e),c=i?Qj:Zj;function l(s,a){let d;const f={...S.useContext(vc),...s,layoutId:rP(s)},{isStatic:p}=f,m=Uj(s),g=c(s,p);if(!p&&qm){oP(f,r);const x=iP(f);d=x.MeasureLayout,m.visualElement=tP(e,g,f,o,x.ProjectionNode,i)}return h.jsxRuntimeExports.jsxs(mi.Provider,{value:m,children:[d&&m.visualElement?h.jsxRuntimeExports.jsx(d,{visualElement:m.visualElement,...f}):null,Kj(e,s,eP(g,m.visualElement,a),g,p,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=S.forwardRef(l);return u[Jj]=e,u}function rP({layoutId:e}){const t=S.useContext(Ga).id;return t&&e!==void 0?t+"-"+e:e}function oP(e,t){const n=S.useContext(gx).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?an(!1,r,"lazy-strict-mode"):nt(!1,r,"lazy-strict-mode")}}function iP(e){const t=xx(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function sP(e,t){if(typeof Proxy>"u")return zi;const n=new Map,r=(i,c)=>zi(i,c,e,t),o=(i,c)=>(process.env.NODE_ENV!=="production"&&Xa(!1,"motion() is deprecated. Use motion.create() instead."),r(i,c));return new Proxy(o,{get:(i,c)=>c==="create"?r:(n.has(c)||n.set(c,zi(c,void 0,e,t)),n.get(c))})}const aP=(e,t)=>t.isSVG??Ec(e)?new V_(t):new I_(t,{allowProjection:e!==S.Fragment});class cP extends yt{constructor(t){super(t),t.animationState||(t.animationState=z_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();hi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let uP=0;class lP extends yt{constructor(){super(...arguments),this.id=uP++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const dP={animation:{Feature:cP},exit:{Feature:lP}};function or(e){return{point:{x:e.pageX,y:e.pageY}}}const fP=e=>t=>hc(t)&&e(t,or(t));function Tn(e,t,n,r){return Bn(e,t,fP(n),r)}const Sx=({current:e})=>e?e.ownerDocument.defaultView:null,dl=(e,t)=>Math.abs(e-t);function hP(e,t){const n=dl(e.x,t.x),r=dl(e.y,t.y);return Math.sqrt(n**2+r**2)}const fl=new Set(["auto","scroll"]);class Cx{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:c=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Wi(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=hP(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:x}=p,{timestamp:y}=ge;this.history.push({...x,timestamp:y});const{onStart:E,onMove:b}=this.handlers;m||(E&&E(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Hi(m,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Wi(p.type==="pointercancel"?this.lastMoveEventInfo:Hi(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,E),x&&x(p,E)},!hc(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const u=or(t),s=Hi(u,this.transformPagePoint),{point:a}=s,{timestamp:d}=ge;this.history=[{...a,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Wi(s,this.history)),this.removeListeners=tr(Tn(this.contextWindow,"pointermove",this.handlePointerMove),Tn(this.contextWindow,"pointerup",this.handlePointerUp),Tn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(fl.has(r.overflowX)||fl.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),se.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),dt(this.updatePoint)}}function Hi(e,t){return t?{point:t(e.point)}:e}function hl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wi({point:e},t){return{point:e,delta:hl(e,_x(t)),offset:hl(e,pP(t)),velocity:mP(t,.1)}}function pP(e){return e[0]}function _x(e){return e[e.length-1]}function mP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=_x(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ke(t)));)n--;if(!r)return{x:0,y:0};const i=Me(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const c={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function gP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ue(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ue(n,e,r.max):Math.min(e,n)),e}function pl(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function xP(e,{top:t,left:n,bottom:r,right:o}){return{x:pl(e.x,n,o),y:pl(e.y,t,r)}}function ml(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function vP(e,t){return{x:ml(e.x,t.x),y:ml(e.y,t.y)}}function yP(e,t){let n=.5;const r=we(e),o=we(t);return o>r?n=kn(t.min,t.max-r,e.min):r>o&&(n=kn(e.min,e.max-o,t.min)),Ze(0,1,n)}function EP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ks=.35;function bP(e=Ks){return e===!1?e=0:e===!0&&(e=Ks),{x:gl(e,"left","right"),y:gl(e,"top","bottom")}}function gl(e,t,n){return{min:xl(e,t),max:xl(e,n)}}function xl(e,t){return typeof e=="number"?e:e[t]||0}const wP=new WeakMap;class RP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(or(d).point)):this.pauseAnimation()},c=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=a_(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ae(y=>{let E=this.getAxisMotionValue(y).get()||0;if(Xe.test(E)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[y];w&&(E=we(w)*(parseFloat(E)/100))}}this.originPoint[y]=E}),g&&se.update(()=>g(d,f),!1,!0),Bs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=SP(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),x&&se.update(()=>x(d,f),!1,!0)},u=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>Ae(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:a}=this.getProps();this.panSession=new Cx(t,{onSessionStart:i,onStart:c,onMove:l,onSessionEnd:u,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:r,contextWindow:Sx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:l}=this.getProps();l&&se.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Er(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=gP(c,this.constraints[t],this.elastic[t])),i.set(c)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&_n(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=xP(r.layoutBox,t):this.constraints=!1,this.elastic=bP(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ae(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=EP(r.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_n(t))return!1;const r=t.current;nt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=j_(r,o.root,this.visualElement.getTransformPagePoint());let c=vP(o.layout.layoutBox,i);if(n){const l=n(S_(c));this.hasMutatedConstraints=!!l,l&&(c=qg(l))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:c,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},s=Ae(a=>{if(!Er(a,n,this.currentDirection))return;let d=u&&u[a]||{};c&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[a]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(a,m)});return Promise.all(s).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Bs(this.visualElement,t),r.start(cc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ae(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ae(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ae(n=>{const{drag:r}=this.getProps();if(!Er(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:l}=o.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-ue(c,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!_n(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ae(c=>{const l=this.getAxisMotionValue(c);if(l&&this.constraints!==!1){const u=l.get();o[c]=yP({min:u,max:u},this.constraints[c])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ae(c=>{if(!Er(c,t,null))return;const l=this.getAxisMotionValue(c),{min:u,max:s}=this.constraints[c];l.set(ue(u,s,o[c]))})}addListeners(){if(!this.visualElement.current)return;wP.set(this.visualElement,this);const t=this.visualElement.current,n=Tn(t,"pointerdown",u=>{const{drag:s,dragListener:a=!0}=this.getProps(),d=u.target,f=d!==t&&f_(d);s&&a&&!f&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();_n(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),se.read(r);const c=Bn(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:s})=>{this.isDragging&&s&&(Ae(a=>{const d=this.getAxisMotionValue(a);d&&(this.originPoint[a]+=u[a].translate,d.set(d.get()+u[a].translate))}),this.visualElement.render())}));return()=>{c(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:c=Ks,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:c,dragMomentum:l}}}function Er(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class CP extends yt{constructor(t){super(t),this.removeGroupControls=De,this.removeListeners=De,this.controls=new RP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||De}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const qi=e=>(t,n)=>{e&&se.update(()=>e(t,n),!1,!0)};class _P extends yt{constructor(){super(...arguments),this.removePointerDownListener=De}onPointerDown(t){this.session=new Cx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:qi(t),onStart:qi(n),onMove:qi(r),onEnd:(i,c)=>{delete this.session,o&&se.postRender(()=>o(i,c))}}}mount(){this.removePointerDownListener=Tn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ki=!1;class jP extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),Ki&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),mo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:c}=r;return c&&(c.isPresent=i,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Ki=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?c.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?c.promote():c.relegate()||se.postRender(()=>{const l=c.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),fc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Ki=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jx(e){const[t,n]=mx(),r=S.useContext(Ga);return h.jsxRuntimeExports.jsx(jP,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(wx),isPresent:t,safeToRemove:n})}const PP={pan:{Feature:_P},drag:{Feature:CP,ProjectionNode:px,MeasureLayout:jx}};function vl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&se.postRender(()=>i(t,or(t)))}class TP extends yt{mount(){const{current:t}=this.node;t&&(this.unmount=c_(t,(n,r)=>(vl(this.node,r,"Start"),o=>vl(this.node,o,"End"))))}unmount(){}}class AP extends yt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tr(Bn(this.node.current,"focus",()=>this.onFocus()),Bn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&se.postRender(()=>i(t,or(t)))}class OP extends yt{mount(){const{current:t}=this.node;t&&(this.unmount=p_(t,(n,r)=>(yl(this.node,r,"Start"),(o,{success:i})=>yl(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xs=new WeakMap,Xi=new WeakMap,MP=e=>{const t=Xs.get(e.target);t&&t(e)},IP=e=>{e.forEach(MP)};function DP({root:e,...t}){const n=e||document;Xi.has(n)||Xi.set(n,{});const r=Xi.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(IP,{root:e,...t})),r[o]}function NP(e,t,n){const r=DP(t);return Xs.set(e,n),r.observe(e),()=>{Xs.delete(e),r.unobserve(e)}}const kP={some:0,all:1};class LP extends yt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:kP[o]},l=u=>{const{isIntersecting:s}=u;if(this.isInView===s||(this.isInView=s,i&&!s&&this.hasEnteredView))return;s&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",s);const{onViewportEnter:a,onViewportLeave:d}=this.node.getProps(),f=s?a:d;f&&f(u)};return NP(this.node.current,c,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(FP(t,n))&&this.startObserver()}unmount(){}}function FP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VP={inView:{Feature:LP},tap:{Feature:OP},focus:{Feature:AP},hover:{Feature:TP}},BP={layout:{ProjectionNode:px,MeasureLayout:jx}},$P={...dP,...VP,...PP,...BP},re=sP($P,aP),UP=S.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},i)=>h.jsxRuntimeExports.jsx(zv,{...o,className:M.classNames("overflow-hidden bg-white",t),ref:i,asChild:!0,children:h.jsxRuntimeExports.jsxs(re.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&h.jsxRuntimeExports.jsx("hr",{className:M.classNames("bg-primary-blue h-0.5 border-0",n)}),h.jsxRuntimeExports.jsx("div",{className:"px-5 py-[15px]",children:e})]})})),GP=({items:e,classNames:t,showDivider:n,defaultValue:r})=>h.jsxRuntimeExports.jsx(Bv,{className:M.classNames("flex flex-col space-y-4",t==null?void 0:t.container),type:"single",defaultValue:r,collapsible:!0,children:e==null?void 0:e.map(o=>h.jsxRuntimeExports.jsxs(nS,{className:t==null?void 0:t.item,value:o.id,children:[h.jsxRuntimeExports.jsx(rS,{className:t==null?void 0:t.trigger,triggerIcon:o==null?void 0:o.triggerIcon,children:o.title}),h.jsxRuntimeExports.jsx(UP,{showDivider:n,dividerClassName:t==null?void 0:t.divider,className:t==null?void 0:t.content,children:o.content})]},o.id))}),zP={success:h.jsxRuntimeExports.jsx(ne.SvgIconCheckCircle,{width:24,height:24}),info:h.jsxRuntimeExports.jsx(ne.SvgIconInfoCircle,{width:24,height:24}),warning:h.jsxRuntimeExports.jsx(ne.SvgIconWarningCircle,{width:24,height:24}),error:h.jsxRuntimeExports.jsx(ne.SvgIconErrorCircle,{width:24,height:24})},HP={success:"text-green-6",info:"text-blue-6",warning:"text-gold-6",error:"text-red-6"},WP={success:"text-gray-6 hover:bg-gray-100 cursor-pointer",error:"text-gray-6 hover:bg-gray-100 cursor-pointer",warning:"text-gray-6 hover:bg-gray-100 cursor-pointer",info:"text-gray-6 hover:bg-gray-100 cursor-pointer"},qP={success:"bg-green-1 border border-green-3",info:"bg-blue-1 border border-blue-3",warning:"bg-gold-1 border border-gold-3",error:"bg-red-1 border border-red-3"},KP=({type:e="info",title:t,description:n,showIcon:r=!0,closable:o=!1,onClose:i,className:c="",children:l,...u})=>{const s=!!t&&!n&&!l||!t&&!!n&&!l;return h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:M.classNames("relative border rounded-lg p-4",qP[e],{[c]:c}),...u,children:[h.jsxRuntimeExports.jsxs(Ne,{gap:4,align:s?"center":"start",children:[r&&h.jsxRuntimeExports.jsx("div",{className:M.classNames("shrink-0",HP[e]),children:zP[e]}),h.jsxRuntimeExports.jsxs(Ne,{direction:s?"horizontal":"vertical",gap:0,className:"flex-1 min-w-0",align:s?"center":"start",children:[t&&h.jsxRuntimeExports.jsx("h4",{className:"text-base font-medium leading-tight text-gray-12",children:t}),n&&h.jsxRuntimeExports.jsx("p",{className:M.classNames("text-sm font-medium leading-tight text-gray-12",{"mt-2":!!t&&!s}),children:n}),l&&h.jsxRuntimeExports.jsx("div",{className:"mt-2",children:l})]})]}),o&&h.jsxRuntimeExports.jsx("button",{onClick:i,className:M.classNames("absolute top-4 right-4 p-1 rounded transition-colors",WP[e]),"aria-label":"Cerrar alerta",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{width:16,height:16})})]})},XP={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},YP=({size:e="md",src:t,alt:n="avatar",icon:r=h.jsxRuntimeExports.jsx(ne.SvgUser,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:i="text-white",className:c="",onClick:l,style:u})=>h.jsxRuntimeExports.jsxs(xy,{className:M.classNames("inline-flex shrink-0 overflow-hidden rounded-full",XP[e],c),onClick:l,style:u,children:[t&&h.jsxRuntimeExports.jsx(vy,{src:t,alt:n,className:"h-full w-full object-cover"}),h.jsxRuntimeExports.jsx(yy,{delayMs:0,className:M.classNames("flex h-full w-full items-center justify-center rounded-full",i,o),children:r})]}),ZP={default:M.classNames("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),primary:M.classNames("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),secondary:M.classNames("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),text:M.classNames("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),danger:M.classNames("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10"),withoutColor:"bg-transparent border-transparent shadow-none"},QP={sm:"px-3 text-sm h-6 rounded-md",md:"px-4 py-2 h-8",lg:"px-6 py-[7px] text-base h-10 rounded-lg",xl:"px-6 py-[11px] h-12"},El=["sm","md","lg","xl"],JP=e=>{const t=El.indexOf(e);return t===-1?"":M.classNames(El.slice(0,t+1).map(n=>QP[n]))},eT={pointer:"cursor-pointer",default:"cursor-default","not-allowed":"cursor-not-allowed",wait:"cursor-wait",text:"cursor-text"},tT=e=>M.classNames("flex items-center justify-center gap-2 border active:scale-95",eT[e],"disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5 disabled:cursor-not-allowed","transition-all duration-300 ease-in-out","shadow-button"),Ys=({icon:e,children:t,leftIcon:n,rightIcon:r,type:o="button",variant:i="default",size:c="md",className:l="",isLoading:u=!1,positionLoading:s="left",cursor:a="pointer",...d})=>{const f=S.useId(),p=tT(a),{isLeftLoading:m,isRightLoading:g}=S.useMemo(()=>({isLeftLoading:s==="left"&&u,isRightLoading:s==="right"&&u}),[u,s]),x=S.useMemo(()=>["primary","secondary","text","withoutColor"].includes(i)?h.jsxRuntimeExports.jsx(ne.SvgLoaderAnimBlue,{className:"animate-spin"}):h.jsxRuntimeExports.jsx(ne.SvgLoaderAnimWhite,{className:"animate-spin"}),[i]),y=S.useMemo(()=>e??n,[e,n]);return h.jsxRuntimeExports.jsxs(re.button,{id:`${f}-button`,className:M.classNames(p,ZP[i],JP(c),l),type:o,...d,children:[h.jsxRuntimeExports.jsx(Ot,{mode:"wait",children:(m||y)&&h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},children:m?x:y},"leftIcon")}),typeof t=="string"||typeof t=="number"?h.jsxRuntimeExports.jsx("span",{className:"whitespace-normal",children:t}):t,h.jsxRuntimeExports.jsx(Ot,{mode:"wait",children:(g||r)&&h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:g?x:r},"rightIcon")})]})},nT=({children:e,className:t="",align:n="horizontal",shadow:r=!0,rounded:o=!0,bordered:i=!0,...c})=>{const{...l}=c,u=M.classNames("bg-white p-4",{"flex flex-col":n==="horizontal","flex flex-col md:flex-row md:max-w-xl":n==="vertical"},{"shadow-lg":r},{"rounded-2xl":o},{"border border-gray-200":i},{[t]:t});return h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:u,...l,children:e})};var Yi={exports:{}};/*!
75
75
  Copyright (c) 2018 Jed Watson.
76
76
  Licensed under the MIT License (MIT), see
77
77
  http://jedwatson.github.io/classnames
78
- */var ml;function AP(){return ml||(ml=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",c=0;c<arguments.length;c++){var l=arguments[c];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var c="";for(var l in s)t.call(s,l)&&s[l]&&(c=o(c,l));return c}function o(s,c){return c?s?s+" "+c:s+c:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(zi)),zi.exports}var OP=AP();const hn=Ff(OP),MP={sm:"h-4 w-4",md:"h-6 w-6"},IP={sm:"h-3 w-3",md:"h-4 w-4"},DP={sm:"h-2 w-2",md:"h-4 w-4"},NP={sm:"text-sm",md:"text-base"},mx=v.forwardRef(({label:e,size:t="md",checked:n,indeterminate:r=!1,disabled:o=!1,onCheckedChange:s,className:c,...l},u)=>{const i=v.useId(),a=p=>{o||s==null||s(p===!0)},f=r?"indeterminate":n?"checked":"none",d={checked:h.jsxRuntimeExports.jsx(ne.SvgCheckv2,{className:hn(IP[t],o?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:h.jsxRuntimeExports.jsx(ne.SvgIndeterminate,{className:hn(DP[t],o?"text-stone-300 fill-stone-300":"text-blue-800")})};return h.jsxRuntimeExports.jsxs("div",{className:hn("flex gap-2 items-start sm:items-center select-none",o?"pointer-events-none":"cursor-pointer",c),children:[h.jsxRuntimeExports.jsx(Ld,{id:i,ref:u,checked:n,"aria-checked":r?"mixed":n,disabled:o,onCheckedChange:a,className:hn("flex justify-center items-center rounded-sm border relative transition-[background-color]",MP[t],{"bg-white border-gray-300 hover:border-blue-800":!n&&!o,"bg-blue-800 border-blue-800":n&&!r&&!o||r&&!o,"bg-neutral-100 border-stone-300":o}),...l,children:f!=="none"&&d[f]}),e&&h.jsxRuntimeExports.jsx("label",{htmlFor:i,className:hn(NP[t],o&&"text-gray-400","cursor-pointer"),children:e})]})});mx.displayName="Checkbox";const kP=({children:e,className:t,width:n="min-w-full w-full",type:r="horizontal",align:o="center"})=>{const s={left:"before:w-[5%] after:w-full",center:"before:w-full after:w-full",right:"before:w-full after:w-[5%]"};return h.jsxRuntimeExports.jsx("div",{className:O.classNames("p-0 m-0 box-border",{"flex h-px items-center":r==="horizontal","inline-block border-s border-s-gray-5 min-h-[1em] h-full":r==="vertical","bg-grays-Macropay-05":r==="horizontal"&&!e,"whitespace-nowrap before:h-px after:h-px before:bg-grays-Macropay-05 after:bg-grays-Macropay-05":r==="horizontal"&&e,[`${s[o]}`]:o,[n]:n&&r==="horizontal",[`${t}`]:t}),children:e&&r==="horizontal"&&h.jsxRuntimeExports.jsx("span",{className:O.classNames("inline-block ps-4 pe-4",{[`text-${o}`]:o}),children:e})})},LP=({children:e,id:t,className:n=""})=>{const r=S.useRef(null),[o,s]=S.useState(!1);return S.useEffect(()=>{const c=document.getElementById(t)||document.createElement("div");return r.current=c,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),s(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?Nf.createPortal(e,r.current):null},gx=S.memo(LP),pn={backdrop:"fixed inset-0 bg-black/50",drawer:"fixed top-0 h-full w-80 bg-white shadow-xl",header:"flex justify-end absolute right-7",closeButton:"text-gray-500 hover:text-gray-700",children:"overflow-y-auto h-[calc(100%-3rem)]"},FP={right:"right-0",left:"left-0"},Er={backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},drawer:{transition:{type:"tween",duration:.2}}},VP=({open:e,onClose:t,children:n,position:r="right",className:o="",classNames:s={backdrop:"",drawer:"",header:"",children:""}})=>(S.useEffect(()=>{const c=l=>{l.key==="Escape"&&t()};return e&&document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),h.jsxRuntimeExports.jsx(gx,{id:"drawer",children:h.jsxRuntimeExports.jsx(jt,{children:e&&h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(re.div,{className:O.classNames(pn.backdrop,s.backdrop),initial:Er.backdrop.initial,animate:Er.backdrop.animate,exit:Er.backdrop.exit,onClick:t}),h.jsxRuntimeExports.jsxs(re.div,{className:O.classNames(pn.drawer,FP[r],s.drawer,o),initial:{x:r==="right"?"100%":"-100%"},animate:{x:0},exit:{x:r==="right"?"100%":"-100%"},transition:Er.drawer.transition,children:[h.jsxRuntimeExports.jsx("div",{className:O.classNames(pn.header,s.header),children:h.jsxRuntimeExports.jsx("button",{onClick:t,className:pn.closeButton,children:"✕"})}),h.jsxRuntimeExports.jsx("div",{className:O.classNames(pn.children,s.children),children:n})]})]})})})),BP=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(XE,{className:O.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),$P=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(YE,{children:h.jsxRuntimeExports.jsx(ZE,{...n,className:O.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:h.jsxRuntimeExports.jsx("div",{className:"p-1",children:e})})})})),UP=S.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},s)=>h.jsxRuntimeExports.jsxs(JE,{className:O.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:s,...o,children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[n&&h.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:n}),h.jsxRuntimeExports.jsx("span",{children:e})]}),r&&h.jsxRuntimeExports.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),GP=S.forwardRef(({className:e,...t},n)=>h.jsxRuntimeExports.jsx(eb,{className:O.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),HP=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(QE,{className:O.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),zP=(e,t)=>{const n={separator:()=>h.jsxRuntimeExports.jsx(GP,{className:t==null?void 0:t.separator},e.id),label:()=>h.jsxRuntimeExports.jsx(HP,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>h.jsxRuntimeExports.jsx(UP,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},WP=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>h.jsxRuntimeExports.jsxs(KE,{children:[h.jsxRuntimeExports.jsx(BP,{children:e}),h.jsxRuntimeExports.jsx($P,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(s=>h.jsxRuntimeExports.jsx("div",{children:zP(s,o)},s.id))})]}),br={container:"container mx-auto",wrapper:"flex flex-col items-center",icon:"text-3xl text-gray-300",text:"mt-3 text-base text-gray-300 font-normal"},qP=({text:e="No hay datos para mostrar",className:t="",icon:n=h.jsxRuntimeExports.jsx(ne.SvgEmpty,{})})=>h.jsxRuntimeExports.jsx(h.Slot,{children:h.jsxRuntimeExports.jsx(re.section,{"data-cy":"empty-component",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:O.classNames(br.container,t),children:h.jsxRuntimeExports.jsxs("div",{className:br.wrapper,children:[h.jsxRuntimeExports.jsx(re.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},children:S.cloneElement(n,{className:O.classNames(br.icon,n.props.className),...n.props})}),h.jsxRuntimeExports.jsx(re.h1,{"data-cy":"empty-text",className:br.text,initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},children:e})]})})});var xx=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(xx||{});const{align:KP,justify:XP,gap:YP}=xx,ZP={horizontal:"flex-row",vertical:"flex-col"},QP={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},De=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:s=!1,style:c,className:l="",onClick:u,wrap:i,...a})=>h.jsxRuntimeExports.jsx(re.div,{"aria-hidden":!0,className:O.classNames(`flex ${s?QP[o]:ZP[o]}`,O.generateClasses(YP,r),O.generateClasses(XP,t),O.generateClasses(KP,n),{[l]:l,"flex-wrap":i}),onClick:u,style:c,children:e,...a}),JP={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},vx=(e,t,n,r,o)=>{const s=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],c=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],l={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:JP[t],stateStyles:l,baseStyles:s,variantStyles:c}},yx=({onClick:e,disabled:t})=>h.jsxRuntimeExports.jsx(re.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{})},"clear-button"),eT=({error:e,size:t="md",check:n,icon:r,leftIcon:o,clear:s=!0,disabled:c=!1,variant:l="default",className:u,...i})=>{const[a,f]=S.useState(i.value??""),{baseStyles:d,variantStyles:p,sizeStyles:g,stateStyles:m}=vx(l,t,e,n,!!r),x=S.useMemo(()=>s&&a?h.jsxRuntimeExports.jsx(yx,{disabled:c,onClick:()=>f("")}):o?h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:o}):null,[s,a,o,c]);return h.jsxRuntimeExports.jsxs("div",{className:O.classNames("relative",u),children:[r&&h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:r}),h.jsxRuntimeExports.jsx(re.input,{...i,value:a,disabled:c,onChange:y=>f(y.target.value),className:O.classNames(...d,...p,g,m,u)}),h.jsxRuntimeExports.jsx(jt,{children:x})]})},tT=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:s,currency:c,currencyDisplay:l,locale:u,prefix:i="",suffix:a=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const f={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...s==="currency"&&{style:"currency",currency:c,currencyDisplay:l}},d=new Intl.NumberFormat(u,f).format(e);return`${i} ${d} ${a}`.trim()},nT=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),s=Number.parseFloat(o);return Number.isNaN(s)?null:s},rT=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),oT=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:s="decimal",currency:c="MXN",currencyDisplay:l="symbol",useGrouping:u=!0,minFractionDigits:i,maxFractionDigits:a,min:f,max:d,allowEmpty:p=!0,prefix:g,suffix:m,...x}=e,[y,E]=S.useState(Number((x==null?void 0:x.value)??null)),[b,R]=S.useState(""),[w,P]=S.useState(!1),C=S.useMemo(()=>({format:r,useGrouping:u,minFractionDigits:i,maxFractionDigits:a,mode:s,currency:c,currencyDisplay:l,locale:o,prefix:g,suffix:m}),[r,u,i,a,s,c,l,o,g,m]),_=S.useCallback(B=>tT({num:B,...C}),[C]),M=S.useCallback(B=>nT(B,g,m,p),[g,m,p]);S.useEffect(()=>{w||R(_(y))},[y,_,w]);const j=S.useCallback(B=>{const q=B.target.value;R(q);const U=M(q);rT(U,f,d)&&(E(U),t==null||t(U),n==null||n({originalEvent:B.nativeEvent,value:U}))},[M,f,d,t,n]),A=S.useCallback(B=>{var q;P(!0),y!=null&&R(y.toString()),(q=x.onFocus)==null||q.call(x,B)},[y,x]),I=S.useCallback(B=>{var q;P(!1),R(_(y)),(q=x.onBlur)==null||q.call(x,B)},[_,y,x]),F=S.useCallback(()=>{R(""),E(null),t==null||t(null)},[t]);return{displayValue:b,handleChange:j,handleFocus:A,handleBlur:I,handleClear:F,...x}},Ex=S.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:s,leftIcon:c,clear:l=!0,disabled:u=!1,variant:i="default",className:a,displayValue:f,handleChange:d,handleFocus:p,handleBlur:g,handleClear:m,...x}=oT(e),{baseStyles:y,variantStyles:E,sizeStyles:b,stateStyles:R}=vx(i,r,n,o,!!s),w=S.useMemo(()=>l&&f?h.jsxRuntimeExports.jsx(yx,{disabled:u,onClick:m}):c?h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":u}),children:c}):null,[l,f,c,u,m]);return h.jsxRuntimeExports.jsxs("div",{className:O.classNames("relative",a),children:[s&&h.jsxRuntimeExports.jsx("div",{className:O.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":u}),children:s}),h.jsxRuntimeExports.jsx(re.input,{...x,ref:t,type:"text",value:f,disabled:u,onChange:d,onFocus:p,onBlur:g,className:O.classNames(...y,...E,b,R,a)}),h.jsxRuntimeExports.jsx(jt,{children:w})]})});Ex.displayName="InputNumber";const iT={Text:eT,Number:Ex},gl=(e,t)=>`${e}-${t}`,di=S.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:s="base",weight:c="normal",...l},u)=>{if(!e)return null;const i=gl("text",s),a=gl("font",c),f=n?h.Slot:t??"p";return h.jsxRuntimeExports.jsx(f,{ref:u,className:O.classNames("text-grays-Macropay-10",i,a,r,{italic:o}),...l,children:e})});di.displayName="Typography";const sT=({children:e,as:t="p",className:n,...r})=>h.jsxRuntimeExports.jsx(di,{as:t,className:n,...r,children:e}),aT={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},cT={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},uT=({children:e,className:t="",level:n=1,...r})=>{const o=cT[n];return h.jsxRuntimeExports.jsx(di,{as:o,weight:"bold",className:`${aT[n]} ${t}`,...r,children:e})},un=di;un.Text=sT;un.Title=uT;const lT=({title:e,className:t=""})=>h.jsxRuntimeExports.jsx(un.Title,{level:3,className:t,children:e}),fT={sm:"12rem",md:"16rem",lg:"20rem",xl:"24rem"},dT={sm:"w-56",md:"w-64",lg:"w-80",xl:"w-96"},hT={sm:"px-2 py-1.5",md:"px-3 py-2",lg:"px-4 py-2.5",xl:"px-5 py-3"},bx={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},pT=({item:e,index:t,isLast:n,size:r,itemClassName:o=""})=>{const s=e.href?"a":"button",c=e.href?{href:e.href}:{onClick:e.onClick,type:"button"};return h.jsxRuntimeExports.jsx(re.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:t*.05},className:O.classNames("border-gray-5 transition-colors duration-200",{"border-b":!n,"hover:bg-gray-3":!e.disabled,"opacity-50 cursor-not-allowed":e.disabled}),children:h.jsxRuntimeExports.jsx(s,{...c,disabled:e.disabled,className:O.classNames("w-full text-left block",hT[r],bx[r],"text-gray-12 no-underline","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-inset",{"cursor-pointer":!e.disabled,"cursor-not-allowed":e.disabled,[o]:o}),children:e.content})},e.id)},mT=({message:e,size:t})=>h.jsxRuntimeExports.jsx("li",{className:O.classNames("flex items-center justify-center h-full text-gray-9",bx[t]),children:e}),gT=({paginatedItems:e,containerHeight:t,size:n,withPagination:r,showBorder:o,showShadow:s,emptyMessage:c,itemClassName:l=""})=>h.jsxRuntimeExports.jsx("ul",{style:{height:r?"auto":t},className:O.classNames(dT[n],"rounded-lg",{"border border-gray-6":o,"shadow-md":s,"overflow-y-auto scroll-smooth":!r}),children:e.length===0?h.jsxRuntimeExports.jsx(mT,{message:c,size:n}):e.map((u,i)=>h.jsxRuntimeExports.jsx(pT,{item:u,index:i,isLast:i===e.length-1,size:n,itemClassName:l},u.id))}),xT=(e,t,n,r)=>S.useMemo(()=>{if(!t)return e;const o=(n-1)*r,s=o+r;return e.slice(o,s)},[e,t,n,r]),vT=(e,t)=>S.useMemo(()=>Math.ceil(e/t),[e,t]),yT=(e,t)=>t||fT[e],ET=e=>t=>{e&&e(t)},bT=({items:e,title:t,size:n="md",withPagination:r=!1,currentPage:o=1,itemsPerPage:s=10,onPageChange:c,showBorder:l=!0,showShadow:u=!0,height:i,className:a="",titleClassName:f="",itemClassName:d="",emptyMessage:p="No items to display",onAnimationStart:g,onAnimationEnd:m,onAnimationIteration:x,...y})=>{const E=xT(e,r,o,s),b=vT(e.length,s),R=yT(n,i),w=ET(c);return h.jsxRuntimeExports.jsx("div",{onAnimationStart:g,onAnimationEnd:m,onAnimationIteration:x,...y,children:h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:O.classNames("flex flex-col",{[a]:a}),children:[t&&h.jsxRuntimeExports.jsx(lT,{title:t,size:n,className:f}),h.jsxRuntimeExports.jsx(gT,{paginatedItems:E,containerHeight:R,size:n,withPagination:r,showBorder:l,showShadow:u,emptyMessage:p,itemClassName:d}),r&&b>1&&h.jsxRuntimeExports.jsx(wx,{currentPage:o,totalPages:b,onPageChange:w,size:n})]})})},wT={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},RT={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},ST=()=>h.jsxRuntimeExports.jsx(U0,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{className:`\r
78
+ */var bl;function rT(){return bl||(bl=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",c=0;c<arguments.length;c++){var l=arguments[c];l&&(i=o(i,r(l)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var c="";for(var l in i)t.call(i,l)&&i[l]&&(c=o(c,l));return c}function o(i,c){return c?i?i+" "+c:i+c:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Yi)),Yi.exports}var oT=rT();const mn=Hd(oT),iT={sm:"h-4 w-4",md:"h-6 w-6"},sT={sm:"h-3 w-3",md:"h-4 w-4"},aT={sm:"h-2 w-2",md:"h-4 w-4"},cT={sm:"text-sm",md:"text-base"},Px=v.forwardRef(({label:e,size:t="md",checked:n,indeterminate:r=!1,disabled:o=!1,onCheckedChange:i,className:c,...l},u)=>{const s=v.useId(),a=p=>{o||i==null||i(p===!0)},d=r?"indeterminate":n?"checked":"none",f={checked:h.jsxRuntimeExports.jsx(ne.SvgCheckv2,{className:mn(sT[t],o?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:h.jsxRuntimeExports.jsx(ne.SvgIndeterminate,{className:mn(aT[t],o?"text-stone-300 fill-stone-300":"text-blue-800")})};return h.jsxRuntimeExports.jsxs("div",{className:mn("flex gap-2 items-start sm:items-center select-none",o?"pointer-events-none":"cursor-pointer",c),children:[h.jsxRuntimeExports.jsx(Hf,{id:s,ref:u,checked:n,"aria-checked":r?"mixed":n,disabled:o,onCheckedChange:a,className:mn("flex justify-center items-center rounded-sm border relative transition-[background-color]",iT[t],{"bg-white border-gray-300 hover:border-blue-800":!n&&!o,"bg-blue-800 border-blue-800":n&&!r&&!o||r&&!o,"bg-neutral-100 border-stone-300":o}),...l,children:d!=="none"&&f[d]}),e&&h.jsxRuntimeExports.jsx("label",{htmlFor:s,className:mn(cT[t],o&&"text-gray-400","cursor-pointer"),children:e})]})});Px.displayName="Checkbox";const uT=({children:e,className:t,width:n="min-w-full w-full",type:r="horizontal",align:o="center"})=>{const i={left:"before:w-[5%] after:w-full",center:"before:w-full after:w-full",right:"before:w-full after:w-[5%]"};return h.jsxRuntimeExports.jsx("div",{className:M.classNames("p-0 m-0 box-border",{"flex h-px items-center":r==="horizontal","inline-block border-s border-s-gray-5 min-h-[1em] h-full":r==="vertical","bg-grays-Macropay-05":r==="horizontal"&&!e,"whitespace-nowrap before:h-px after:h-px before:bg-grays-Macropay-05 after:bg-grays-Macropay-05":r==="horizontal"&&e,[`${i[o]}`]:o,[n]:n&&r==="horizontal",[`${t}`]:t}),children:e&&r==="horizontal"&&h.jsxRuntimeExports.jsx("span",{className:M.classNames("inline-block ps-4 pe-4",{[`text-${o}`]:o}),children:e})})},lT=({children:e,id:t,className:n=""})=>{const r=S.useRef(null),[o,i]=S.useState(!1);return S.useEffect(()=>{const c=document.getElementById(t)||document.createElement("div");return r.current=c,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),i(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?Ud.createPortal(e,r.current):null},Tx=S.memo(lT),gn={backdrop:"fixed inset-0 bg-black/50",drawer:"fixed top-0 h-full w-80 bg-white shadow-xl",header:"flex justify-end absolute right-7",closeButton:"text-gray-500 hover:text-gray-700",children:"overflow-y-auto h-[calc(100%-3rem)]"},dT={right:"right-0",left:"left-0"},br={backdrop:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},drawer:{transition:{type:"tween",duration:.2}}},fT=({open:e,onClose:t,children:n,position:r="right",className:o="",classNames:i={backdrop:"",drawer:"",header:"",children:""}})=>(S.useEffect(()=>{const c=l=>{l.key==="Escape"&&t()};return e&&document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),h.jsxRuntimeExports.jsx(Tx,{id:"drawer",children:h.jsxRuntimeExports.jsx(Ot,{children:e&&h.jsxRuntimeExports.jsxs(h.jsxRuntimeExports.Fragment,{children:[h.jsxRuntimeExports.jsx(re.div,{className:M.classNames(gn.backdrop,i.backdrop),initial:br.backdrop.initial,animate:br.backdrop.animate,exit:br.backdrop.exit,onClick:t}),h.jsxRuntimeExports.jsxs(re.div,{className:M.classNames(gn.drawer,dT[r],i.drawer,o),initial:{x:r==="right"?"100%":"-100%"},animate:{x:0},exit:{x:r==="right"?"100%":"-100%"},transition:br.drawer.transition,children:[h.jsxRuntimeExports.jsx("div",{className:M.classNames(gn.header,i.header),children:h.jsxRuntimeExports.jsx("button",{onClick:t,className:gn.closeButton,children:"✕"})}),h.jsxRuntimeExports.jsx("div",{className:M.classNames(gn.children,i.children),children:n})]})]})})})),hT=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(f1,{className:M.classNames("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),pT=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(h1,{children:h.jsxRuntimeExports.jsx(p1,{...n,className:M.classNames("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:h.jsxRuntimeExports.jsx("div",{className:"p-1",children:e})})})})),mT=S.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},i)=>h.jsxRuntimeExports.jsxs(g1,{className:M.classNames("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:i,...o,children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[n&&h.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:n}),h.jsxRuntimeExports.jsx("span",{children:e})]}),r&&h.jsxRuntimeExports.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),gT=S.forwardRef(({className:e,...t},n)=>h.jsxRuntimeExports.jsx(x1,{className:M.classNames("my-1 h-px bg-gray-3",e),ref:n,...t})),xT=S.forwardRef(({children:e,className:t,...n},r)=>h.jsxRuntimeExports.jsx(m1,{className:M.classNames("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),vT=(e,t)=>{const n={separator:()=>h.jsxRuntimeExports.jsx(gT,{className:t==null?void 0:t.separator},e.id),label:()=>h.jsxRuntimeExports.jsx(xT,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>h.jsxRuntimeExports.jsx(mT,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},yT=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>h.jsxRuntimeExports.jsxs(d1,{children:[h.jsxRuntimeExports.jsx(hT,{children:e}),h.jsxRuntimeExports.jsx(pT,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(i=>h.jsxRuntimeExports.jsx("div",{children:vT(i,o)},i.id))})]}),wr={container:"container mx-auto",wrapper:"flex flex-col items-center",icon:"text-3xl text-gray-300",text:"mt-3 text-base text-gray-300 font-normal"},ET=({text:e="No hay datos para mostrar",className:t="",icon:n=h.jsxRuntimeExports.jsx(ne.SvgEmpty,{})})=>h.jsxRuntimeExports.jsx(h.Slot,{children:h.jsxRuntimeExports.jsx(re.section,{"data-cy":"empty-component",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:M.classNames(wr.container,t),children:h.jsxRuntimeExports.jsxs("div",{className:wr.wrapper,children:[h.jsxRuntimeExports.jsx(re.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},children:S.cloneElement(n,{className:M.classNames(wr.icon,n.props.className),...n.props})}),h.jsxRuntimeExports.jsx(re.h1,{"data-cy":"empty-text",className:wr.text,initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},children:e})]})})});var Ax=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(Ax||{});const{align:bT,justify:wT,gap:RT}=Ax,ST={horizontal:"flex-row",vertical:"flex-col"},CT={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},Ne=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:i=!1,style:c,className:l="",onClick:u,wrap:s,...a})=>h.jsxRuntimeExports.jsx(re.div,{"aria-hidden":!0,className:M.classNames(`flex ${i?CT[o]:ST[o]}`,Oe.generateClasses(RT,r),Oe.generateClasses(wT,t),Oe.generateClasses(bT,n),{[l]:l,"flex-wrap":s}),onClick:u,style:c,children:e,...a}),_T={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},Ox=(e,t,n,r,o)=>{const i=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],c=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],l={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:_T[t],stateStyles:l,baseStyles:i,variantStyles:c}},Mx=({onClick:e,disabled:t})=>h.jsxRuntimeExports.jsx(re.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{})},"clear-button"),jT=({error:e,size:t="md",check:n,icon:r,leftIcon:o,clear:i=!0,disabled:c=!1,variant:l="default",className:u,...s})=>{const[a,d]=S.useState(s.value??""),{baseStyles:f,variantStyles:p,sizeStyles:m,stateStyles:g}=Ox(l,t,e,n,!!r),x=S.useMemo(()=>i&&a?h.jsxRuntimeExports.jsx(Mx,{disabled:c,onClick:()=>d("")}):o?h.jsxRuntimeExports.jsx("div",{className:M.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:o}):null,[i,a,o,c]);return h.jsxRuntimeExports.jsxs("div",{className:M.classNames("relative",u),children:[r&&h.jsxRuntimeExports.jsx("div",{className:M.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:r}),h.jsxRuntimeExports.jsx(re.input,{...s,value:a,disabled:c,onChange:y=>d(y.target.value),className:M.classNames(...f,...p,m,g,u)}),h.jsxRuntimeExports.jsx(Ot,{children:x})]})},PT=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:i,currency:c,currencyDisplay:l,locale:u,prefix:s="",suffix:a=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const d={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...i==="currency"&&{style:"currency",currency:c,currencyDisplay:l}},f=new Intl.NumberFormat(u,d).format(e);return`${s} ${f} ${a}`.trim()},TT=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),i=Number.parseFloat(o);return Number.isNaN(i)?null:i},AT=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),OT=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:i="decimal",currency:c="MXN",currencyDisplay:l="symbol",useGrouping:u=!0,minFractionDigits:s,maxFractionDigits:a,min:d,max:f,allowEmpty:p=!0,prefix:m,suffix:g,...x}=e,[y,E]=S.useState(Number((x==null?void 0:x.value)??null)),[b,w]=S.useState(""),[R,_]=S.useState(!1),j=S.useMemo(()=>({format:r,useGrouping:u,minFractionDigits:s,maxFractionDigits:a,mode:i,currency:c,currencyDisplay:l,locale:o,prefix:m,suffix:g}),[r,u,s,a,i,c,l,o,m,g]),P=S.useCallback(B=>PT({num:B,...j}),[j]),T=S.useCallback(B=>TT(B,m,g,p),[m,g,p]);S.useEffect(()=>{R||w(P(y))},[y,P,R]);const C=S.useCallback(B=>{const q=B.target.value;w(q);const U=T(q);AT(U,d,f)&&(E(U),t==null||t(U),n==null||n({originalEvent:B.nativeEvent,value:U}))},[T,d,f,t,n]),O=S.useCallback(B=>{var q;_(!0),y!=null&&w(y.toString()),(q=x.onFocus)==null||q.call(x,B)},[y,x]),I=S.useCallback(B=>{var q;_(!1),w(P(y)),(q=x.onBlur)==null||q.call(x,B)},[P,y,x]),k=S.useCallback(()=>{w(""),E(null),t==null||t(null)},[t]);return{displayValue:b,handleChange:C,handleFocus:O,handleBlur:I,handleClear:k,...x}},Ix=S.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:i,leftIcon:c,clear:l=!0,disabled:u=!1,variant:s="default",className:a,displayValue:d,handleChange:f,handleFocus:p,handleBlur:m,handleClear:g,...x}=OT(e),{baseStyles:y,variantStyles:E,sizeStyles:b,stateStyles:w}=Ox(s,r,n,o,!!i),R=S.useMemo(()=>l&&d?h.jsxRuntimeExports.jsx(Mx,{disabled:u,onClick:g}):c?h.jsxRuntimeExports.jsx("div",{className:M.classNames("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":u}),children:c}):null,[l,d,c,u,g]);return h.jsxRuntimeExports.jsxs("div",{className:M.classNames("relative",a),children:[i&&h.jsxRuntimeExports.jsx("div",{className:M.classNames("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":u}),children:i}),h.jsxRuntimeExports.jsx(re.input,{...x,ref:t,type:"text",value:d,disabled:u,onChange:f,onFocus:p,onBlur:m,className:M.classNames(...y,...E,b,w,a)}),h.jsxRuntimeExports.jsx(Ot,{children:R})]})});Ix.displayName="InputNumber";const MT={Text:jT,Number:Ix},wl=(e,t)=>`${e}-${t}`,gi=S.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:i="base",weight:c="normal",...l},u)=>{if(!e)return null;const s=wl("text",i),a=wl("font",c),d=n?h.Slot:t??"p";return h.jsxRuntimeExports.jsx(d,{ref:u,className:M.classNames("text-grays-Macropay-10",s,a,r,{italic:o}),...l,children:e})});gi.displayName="Typography";const IT=({children:e,as:t="p",className:n,...r})=>h.jsxRuntimeExports.jsx(gi,{as:t,className:n,...r,children:e}),DT={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},NT={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},kT=({children:e,className:t="",level:n=1,...r})=>{const o=NT[n];return h.jsxRuntimeExports.jsx(gi,{as:o,weight:"bold",className:`${DT[n]} ${t}`,...r,children:e})},dn=gi;dn.Text=IT;dn.Title=kT;const LT=({title:e,className:t=""})=>h.jsxRuntimeExports.jsx(dn.Title,{level:3,className:t,children:e}),FT={sm:"12rem",md:"16rem",lg:"20rem",xl:"24rem"},VT={sm:"w-56",md:"w-64",lg:"w-80",xl:"w-96"},BT={sm:"px-2 py-1.5",md:"px-3 py-2",lg:"px-4 py-2.5",xl:"px-5 py-3"},Dx={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},$T=({item:e,index:t,isLast:n,size:r,itemClassName:o=""})=>{const i=e.href?"a":"button",c=e.href?{href:e.href}:{onClick:e.onClick,type:"button"};return h.jsxRuntimeExports.jsx(re.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:t*.05},className:M.classNames("border-gray-5 transition-colors duration-200",{"border-b":!n,"hover:bg-gray-3":!e.disabled,"opacity-50 cursor-not-allowed":e.disabled}),children:h.jsxRuntimeExports.jsx(i,{...c,disabled:e.disabled,className:M.classNames("w-full text-left block",BT[r],Dx[r],"text-gray-12 no-underline","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-inset",{"cursor-pointer":!e.disabled,"cursor-not-allowed":e.disabled,[o]:o}),children:e.content})},e.id)},UT=({message:e,size:t})=>h.jsxRuntimeExports.jsx("li",{className:M.classNames("flex items-center justify-center h-full text-gray-9",Dx[t]),children:e}),GT=({paginatedItems:e,containerHeight:t,size:n,withPagination:r,showBorder:o,showShadow:i,emptyMessage:c,itemClassName:l=""})=>h.jsxRuntimeExports.jsx("ul",{style:{height:r?"auto":t},className:M.classNames(VT[n],"rounded-lg",{"border border-gray-6":o,"shadow-md":i,"overflow-y-auto scroll-smooth":!r}),children:e.length===0?h.jsxRuntimeExports.jsx(UT,{message:c,size:n}):e.map((u,s)=>h.jsxRuntimeExports.jsx($T,{item:u,index:s,isLast:s===e.length-1,size:n,itemClassName:l},u.id))}),zT=(e,t,n,r)=>S.useMemo(()=>{if(!t)return e;const o=(n-1)*r,i=o+r;return e.slice(o,i)},[e,t,n,r]),HT=(e,t)=>S.useMemo(()=>Math.ceil(e/t),[e,t]),WT=(e,t)=>t||FT[e],qT=e=>t=>{e&&e(t)},KT=({items:e,title:t,size:n="md",withPagination:r=!1,currentPage:o=1,itemsPerPage:i=10,onPageChange:c,showBorder:l=!0,showShadow:u=!0,height:s,className:a="",titleClassName:d="",itemClassName:f="",emptyMessage:p="No items to display",onAnimationStart:m,onAnimationEnd:g,onAnimationIteration:x,...y})=>{const E=zT(e,r,o,i),b=HT(e.length,i),w=WT(n,s),R=qT(c);return h.jsxRuntimeExports.jsx("div",{onAnimationStart:m,onAnimationEnd:g,onAnimationIteration:x,...y,children:h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:M.classNames("flex flex-col",{[a]:a}),children:[t&&h.jsxRuntimeExports.jsx(LT,{title:t,size:n,className:d}),h.jsxRuntimeExports.jsx(GT,{paginatedItems:E,containerHeight:w,size:n,withPagination:r,showBorder:l,showShadow:u,emptyMessage:p,itemClassName:f}),r&&b>1&&h.jsxRuntimeExports.jsx(Nx,{currentPage:o,totalPages:b,onPageChange:R,size:n})]})})},XT={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},YT={hidden:{opacity:0,scale:.95,y:8},visible:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8}},ZT=()=>h.jsxRuntimeExports.jsx(oy,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{className:`\r
79
79
  fixed inset-0 z-10\r
80
80
  bg-gray-500 bg-opacity-75\r
81
81
  transition-opacity\r
82
82
  backdrop-filter backdrop-blur-sm\r
83
- `,variants:wT,initial:"hidden",animate:"visible",exit:"exit",onClick:e=>e.stopPropagation()})}),CT=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>h.jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:h.jsxRuntimeExports.jsx(De,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:h.jsxRuntimeExports.jsx(G0,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{variants:RT,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:O.classNames("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",{[t]:t}),children:h.jsxRuntimeExports.jsxs(De,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&h.jsxRuntimeExports.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:h.jsxRuntimeExports.jsx(ne.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),_T=({type:e="default",title:t,message:n,titleAlign:r="left",children:o})=>!t&&!n?null:h.jsxRuntimeExports.jsxs(De,{gap:4,className:O.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&h.jsxRuntimeExports.jsxs(De,{align:"center",justify:"center",className:O.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&h.jsxRuntimeExports.jsx(ne.SvgClose,{}),e==="success"&&h.jsxRuntimeExports.jsx(ne.SvgDone,{}),e==="warning"&&h.jsxRuntimeExports.jsx(ne.SvgExclamation,{}),e==="info"&&h.jsxRuntimeExports.jsx(ne.SvgInfo,{})]}),h.jsxRuntimeExports.jsxs(De,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:h.jsxRuntimeExports.jsx(H0,{asChild:!0,children:h.jsxRuntimeExports.jsx(un.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:O.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:o})}),n&&h.jsxRuntimeExports.jsx(z0,{asChild:!0,children:h.jsxRuntimeExports.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),jT=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:h.jsxRuntimeExports.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&h.jsxRuntimeExports.jsx(Hs,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&h.jsxRuntimeExports.jsx(Hs,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),PT=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:o,message:s,type:c,titleAlign:l,buttonOk:u,buttonCancel:i,isCloseAble:a,className:f=""})=>h.jsxRuntimeExports.jsx(B0,{open:e,children:h.jsxRuntimeExports.jsx(jt,{children:e&&h.jsxRuntimeExports.jsxs($0,{forceMount:!0,children:[h.jsxRuntimeExports.jsx(ST,{}),h.jsxRuntimeExports.jsxs(CT,{panelClassName:f,isCloseAble:a,onClose:t,children:[r,h.jsxRuntimeExports.jsx(_T,{type:c,title:o,message:s,titleAlign:l,children:n}),n&&h.jsxRuntimeExports.jsx("div",{children:n,className:"w-full"}),h.jsxRuntimeExports.jsx(jT,{buttonOk:u,buttonCancel:i})]})]})})}),TT={success:{icon:h.jsxRuntimeExports.jsx(ne.SvgCheckCircle,{className:"size-6"}),borderColor:"border-green-6",iconColor:"text-green-6"},error:{icon:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{className:"size-6"}),borderColor:"border-primary-red",iconColor:"text-primary-red"},warning:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconWarning,{className:"size-6"}),borderColor:"border-gold-6",iconColor:"text-gold-6"},info:{icon:h.jsxRuntimeExports.jsx(ne.SvgInfoCircle,{className:"size-6"}),borderColor:"border-blue-500",iconColor:"text-blue-500"},default:{icon:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{className:"size-6"}),borderColor:"border-gray-300",iconColor:"text-primary-blue"}},AT=e=>({"top-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"top-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"top-center":{initial:{opacity:0,y:-50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.95}},"bottom-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"bottom-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"bottom-center":{initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:50,scale:.95}}})[e||"top-right"],OT=({onClose:e,id:t})=>h.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(t),className:"absolute top-2 right-2 shrink-0 p-1 rounded-md transition-colors text-gray-10 hover:text-gray-12 hover:bg-gray-4 focus:outline-none focus:ring-2 focus:ring-gray-7 cursor-pointer","aria-label":"Close notification",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{className:"size-6"})}),MT=({IconComponent:e,iconColor:t,defaultIconColor:n})=>e?h.jsxRuntimeExports.jsx(De,{align:"center",justify:"center",className:O.classNames("w-7 h-7 shrink-0 sm:w-6 sm:h-6",t||n),children:e}):null,{Title:IT,Text:DT}=un,NT=({title:e,message:t,children:n})=>h.jsxRuntimeExports.jsxs(De,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&h.jsxRuntimeExports.jsx(IT,{level:6,weight:"medium",children:e}),t&&h.jsxRuntimeExports.jsx(DT,{className:"leading-5",size:"sm",children:t}),n]}),kT=({type:e="default",title:t,message:n,duration:r=4e3,id:o,placement:s="top-right",showIcon:c=!0,closable:l=!1,onClose:u,className:i="",children:a,borderColor:f,iconColor:d,...p})=>{const{initial:g,animate:m,exit:x}=AT(s);S.useEffect(()=>{if(r>0){const R=setTimeout(()=>{u==null||u(o)},r);return()=>clearTimeout(R)}},[r,o,u]);const y=e?TT[e]:null,E=y==null?void 0:y.icon,b=O.classNames("px-6 py-4 rounded flex gap-4 max-w-96 shadow-md relative border bg-white",f||(y==null?void 0:y.borderColor),i);return h.jsxRuntimeExports.jsxs(re.div,{layout:!0,initial:g,animate:m,exit:x,transition:{duration:.35,ease:"easeOut"},className:b,role:"alert","aria-live":"polite",...p,children:[l&&h.jsxRuntimeExports.jsx(OT,{onClose:u,id:o}),c&&h.jsxRuntimeExports.jsx(MT,{IconComponent:E,iconColor:d,defaultIconColor:y==null?void 0:y.iconColor}),h.jsxRuntimeExports.jsx(NT,{title:t,message:n,children:a})]})},mc={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},gc={sm:"min-w-8 h-8",md:"min-w-9 h-9",lg:"min-w-10 h-10",xl:"min-w-12 h-12"},LT=5,xl=({onClick:e,disabled:t,size:n,label:r,children:o})=>h.jsxRuntimeExports.jsx(re.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:e,disabled:t,className:O.classNames(gc[n],mc[n],"flex items-center justify-center rounded-md border border-gray-6","transition-colors duration-200","hover:bg-gray-3 active:bg-gray-4","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),"aria-label":r,children:o}),FT=({pageNumber:e,isActive:t,onPageChange:n,size:r})=>h.jsxRuntimeExports.jsx(re.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:()=>n(e),className:O.classNames(gc[r],mc[r],"flex items-center justify-center rounded-md border transition-colors duration-200",{"bg-primary-blue text-white border-primary-blue":t,"border-gray-6 hover:bg-gray-3 active:bg-gray-4":!t}),"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,children:e},e),VT=({prevPage:e,nextPage:t,size:n})=>h.jsxRuntimeExports.jsx("span",{className:O.classNames(gc[n],mc[n],"flex items-center justify-center"),children:"..."},`ellipsis-${e}-${t}`),BT=(e,t)=>t<=LT?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"...",t]:e>=t-2?[1,"...",t-3,t-2,t-1,t]:[1,"...",e-1,e,e+1,"...",t],$T=(e,t)=>()=>{e>1&&t(e-1)},UT=(e,t,n)=>()=>{e<t&&n(e+1)},wx=({currentPage:e,totalPages:t,onPageChange:n,size:r="md",className:o=""})=>{const s=$T(e,n),c=UT(e,t,n),l=BT(e,t);return h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},className:O.classNames("flex items-center justify-center gap-1 mt-3",{[o]:o}),children:[h.jsxRuntimeExports.jsx(xl,{onClick:s,disabled:e===1,size:r,label:"Previous page",children:"←"}),l.map((u,i,a)=>{if(u==="..."){const p=a[i-1]||"start",g=a[i+1]||"end";return h.jsxRuntimeExports.jsx(VT,{prevPage:p,nextPage:g,size:r},`ellipsis-${p}-${g}`)}const f=u,d=f===e;return h.jsxRuntimeExports.jsx(FT,{pageNumber:f,isActive:d,onPageChange:n,size:r},f)}),h.jsxRuntimeExports.jsx(xl,{onClick:c,disabled:e===t,size:r,label:"Next page",children:"→"})]})},GT=e=>{const t=S.createContext(void 0);return[({value:o,children:s})=>h.jsxRuntimeExports.jsx(t.Provider,{value:o,children:s}),()=>{const o=S.useContext(t);if(o===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return o}]},[HT]=GT("PopoverContext"),zT=e=>{const[t,n]=kf.useControlledState({value:e==null?void 0:e.open,defaultValue:e==null?void 0:e.defaultOpen,onChange:e==null?void 0:e.onOpenChange});return h.jsxRuntimeExports.jsx(HT,{value:{open:t,setOpen:n},children:h.jsxRuntimeExports.jsx(Ib,{"data-slot":"popover",...e,onOpenChange:n})})},WT={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},qT={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},KT=({value:e=0,classNames:t,indicatorColor:n="primary",customIndicatorClass:r,size:o="md",showLabel:s=!1,labelClassName:c,...l})=>h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsx(Bb,{className:O.classNames("relative w-full overflow-hidden rounded-full bg-gray-200",WT[o],t==null?void 0:t.root),value:e,...l,children:h.jsxRuntimeExports.jsx($b,{className:O.classNames("h-full transition-transform duration-300 ease-in-out",r||qT[n],t==null?void 0:t.indicator),style:{transform:`translateX(-${100-(e||0)}%)`}})}),s&&h.jsxRuntimeExports.jsxs("div",{className:O.classNames("mt-1 text-right text-sm text-gray-600",c),children:[e,"%"]})]});var XT=Object.defineProperty,Io=Object.getOwnPropertySymbols,Rx=Object.prototype.hasOwnProperty,Sx=Object.prototype.propertyIsEnumerable,vl=(e,t,n)=>t in e?XT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zs=(e,t)=>{for(var n in t||(t={}))Rx.call(t,n)&&vl(e,n,t[n]);if(Io)for(var n of Io(t))Sx.call(t,n)&&vl(e,n,t[n]);return e},Ws=(e,t)=>{var n={};for(var r in e)Rx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Io)for(var r of Io(e))t.indexOf(r)<0&&Sx.call(e,r)&&(n[r]=e[r]);return n};/**
83
+ `,variants:XT,initial:"hidden",animate:"visible",exit:"exit",onClick:e=>e.stopPropagation()})}),QT=({children:e,panelClassName:t,isCloseAble:n,onClose:r})=>h.jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:h.jsxRuntimeExports.jsx(Ne,{align:"center",justify:"center",className:"min-h-full p-4 text-center items-center",children:h.jsxRuntimeExports.jsx(iy,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{variants:YT,initial:"hidden",animate:"visible",exit:"exit",transition:{duration:.2,ease:"easeOut"},className:M.classNames("relative min-w-full md:min-w-104.5 p-6 md:p-8 transform rounded-lg bg-white text-left shadow-xl outline-none max-w-lg",{[t]:t}),children:h.jsxRuntimeExports.jsxs(Ne,{className:"relative gap-6",direction:"vertical",align:"center",children:[n&&h.jsxRuntimeExports.jsx("button",{className:"absolute -right-4 -top-4 md:-right-5 w-auto h-auto",onClick:r,children:h.jsxRuntimeExports.jsx(ne.SvgClose,{className:"cursor-pointer text-gray-7 text-2xl"})}),e]})})})})}),JT=({type:e="default",title:t,message:n,titleAlign:r="left",children:o})=>!t&&!n?null:h.jsxRuntimeExports.jsxs(Ne,{gap:4,className:M.classNames("w-full",{hidden:!t&&!n}),children:[e!=="default"&&h.jsxRuntimeExports.jsxs(Ne,{align:"center",justify:"center",className:M.classNames("w-6 h-6 md:h-7 md:w-7 shrink-0 rounded-full text-white",{"bg-error":e==="error","bg-success":e==="success","bg-warning":e==="warning","bg-info":e==="info"}),children:[e==="error"&&h.jsxRuntimeExports.jsx(ne.SvgClose,{}),e==="success"&&h.jsxRuntimeExports.jsx(ne.SvgDone,{}),e==="warning"&&h.jsxRuntimeExports.jsx(ne.SvgExclamation,{}),e==="info"&&h.jsxRuntimeExports.jsx(ne.SvgInfo,{})]}),h.jsxRuntimeExports.jsxs(Ne,{direction:"vertical",gap:2,className:"w-full",children:[typeof t!="string"?t:h.jsxRuntimeExports.jsx(sy,{asChild:!0,children:h.jsxRuntimeExports.jsx(dn.Title,{weight:"semibold",level:4,...typeof t!="string"?t:{},className:M.classNames("inline-block",{[`text-${r}`]:r}),children:typeof t=="string"?t:o})}),n&&h.jsxRuntimeExports.jsx(ay,{asChild:!0,children:h.jsxRuntimeExports.jsx("span",{className:"text-base font-normal text-black text-opacity-85",children:n})})]})]}),eA=({buttonCancel:e,buttonOk:t})=>!e&&!t?null:h.jsxRuntimeExports.jsxs("div",{className:"w-full max-[400px]:grid grid-cols-1 flex flex-wrap justify-end gap-4",children:[t&&h.jsxRuntimeExports.jsx(Ys,{className:"outline-none inline-flex max-[400px]:order-1 order-2",variant:"primary",size:"xl",...t}),e&&h.jsxRuntimeExports.jsx(Ys,{className:"outline-none inline-flex max-[400px]:order-2 order-1",variant:"secondary",size:"xl",...e})]}),tA=({isOpen:e,onClose:t=()=>{},children:n,header:r,title:o,message:i,type:c,titleAlign:l,buttonOk:u,buttonCancel:s,isCloseAble:a,className:d=""})=>h.jsxRuntimeExports.jsx(ny,{open:e,children:h.jsxRuntimeExports.jsx(Ot,{children:e&&h.jsxRuntimeExports.jsxs(ry,{forceMount:!0,children:[h.jsxRuntimeExports.jsx(ZT,{}),h.jsxRuntimeExports.jsxs(QT,{panelClassName:d,isCloseAble:a,onClose:t,children:[r,h.jsxRuntimeExports.jsx(JT,{type:c,title:o,message:i,titleAlign:l,children:n}),n&&h.jsxRuntimeExports.jsx("div",{children:n,className:"w-full"}),h.jsxRuntimeExports.jsx(eA,{buttonOk:u,buttonCancel:s})]})]})})}),nA={success:{icon:h.jsxRuntimeExports.jsx(ne.SvgCheckCircle,{className:"size-6"}),borderColor:"border-green-6",iconColor:"text-green-6"},error:{icon:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{className:"size-6"}),borderColor:"border-primary-red",iconColor:"text-primary-red"},warning:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconWarning,{className:"size-6"}),borderColor:"border-gold-6",iconColor:"text-gold-6"},info:{icon:h.jsxRuntimeExports.jsx(ne.SvgInfoCircle,{className:"size-6"}),borderColor:"border-blue-500",iconColor:"text-blue-500"},default:{icon:h.jsxRuntimeExports.jsx(ne.SvgCloseCircle,{className:"size-6"}),borderColor:"border-gray-300",iconColor:"text-primary-blue"}},rA=e=>({"top-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"top-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"top-center":{initial:{opacity:0,y:-50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.95}},"bottom-left":{initial:{opacity:0,x:-100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-100,scale:.95}},"bottom-right":{initial:{opacity:0,x:100,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:100,scale:.95}},"bottom-center":{initial:{opacity:0,y:50,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:50,scale:.95}}})[e||"top-right"],oA=({onClose:e,id:t})=>h.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>e==null?void 0:e(t),className:"absolute top-2 right-2 shrink-0 p-1 rounded-md transition-colors text-gray-10 hover:text-gray-12 hover:bg-gray-4 focus:outline-none focus:ring-2 focus:ring-gray-7 cursor-pointer","aria-label":"Close notification",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{className:"size-6"})}),iA=({IconComponent:e,iconColor:t,defaultIconColor:n})=>e?h.jsxRuntimeExports.jsx(Ne,{align:"center",justify:"center",className:M.classNames("w-7 h-7 shrink-0 sm:w-6 sm:h-6",t||n),children:e}):null,{Title:sA,Text:aA}=dn,cA=({title:e,message:t,children:n})=>h.jsxRuntimeExports.jsxs(Ne,{gap:2,direction:"vertical",justify:"center",className:"w-full",children:[e&&h.jsxRuntimeExports.jsx(sA,{level:6,weight:"medium",children:e}),t&&h.jsxRuntimeExports.jsx(aA,{className:"leading-5",size:"sm",children:t}),n]}),uA=({type:e="default",title:t,message:n,duration:r=4e3,id:o,placement:i="top-right",showIcon:c=!0,closable:l=!1,onClose:u,className:s="",children:a,borderColor:d,iconColor:f,...p})=>{const{initial:m,animate:g,exit:x}=rA(i);S.useEffect(()=>{if(r>0){const w=setTimeout(()=>{u==null||u(o)},r);return()=>clearTimeout(w)}},[r,o,u]);const y=e?nA[e]:null,E=y==null?void 0:y.icon,b=M.classNames("px-6 py-4 rounded flex gap-4 max-w-96 shadow-md relative border bg-white",d||(y==null?void 0:y.borderColor),s);return h.jsxRuntimeExports.jsxs(re.div,{layout:!0,initial:m,animate:g,exit:x,transition:{duration:.35,ease:"easeOut"},className:b,role:"alert","aria-live":"polite",...p,children:[l&&h.jsxRuntimeExports.jsx(oA,{onClose:u,id:o}),c&&h.jsxRuntimeExports.jsx(iA,{IconComponent:E,iconColor:f,defaultIconColor:y==null?void 0:y.iconColor}),h.jsxRuntimeExports.jsx(cA,{title:t,message:n,children:a})]})},bc={sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},wc={sm:"min-w-8 h-8",md:"min-w-9 h-9",lg:"min-w-10 h-10",xl:"min-w-12 h-12"},lA=5,Rl=({onClick:e,disabled:t,size:n,label:r,children:o})=>h.jsxRuntimeExports.jsx(re.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:e,disabled:t,className:M.classNames(wc[n],bc[n],"flex items-center justify-center rounded-md border border-gray-6","transition-colors duration-200","hover:bg-gray-3 active:bg-gray-4","disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),"aria-label":r,children:o}),dA=({pageNumber:e,isActive:t,onPageChange:n,size:r})=>h.jsxRuntimeExports.jsx(re.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:()=>n(e),className:M.classNames(wc[r],bc[r],"flex items-center justify-center rounded-md border transition-colors duration-200",{"bg-primary-blue text-white border-primary-blue":t,"border-gray-6 hover:bg-gray-3 active:bg-gray-4":!t}),"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,children:e},e),fA=({prevPage:e,nextPage:t,size:n})=>h.jsxRuntimeExports.jsx("span",{className:M.classNames(wc[n],bc[n],"flex items-center justify-center"),children:"..."},`ellipsis-${e}-${t}`),hA=(e,t)=>t<=lA?Array.from({length:t},(n,r)=>r+1):e<=3?[1,2,3,4,"...",t]:e>=t-2?[1,"...",t-3,t-2,t-1,t]:[1,"...",e-1,e,e+1,"...",t],pA=(e,t)=>()=>{e>1&&t(e-1)},mA=(e,t,n)=>()=>{e<t&&n(e+1)},Nx=({currentPage:e,totalPages:t,onPageChange:n,size:r="md",className:o=""})=>{const i=pA(e,n),c=mA(e,t,n),l=hA(e,t);return h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},className:M.classNames("flex items-center justify-center gap-1 mt-3",{[o]:o}),children:[h.jsxRuntimeExports.jsx(Rl,{onClick:i,disabled:e===1,size:r,label:"Previous page",children:"←"}),l.map((u,s,a)=>{if(u==="..."){const p=a[s-1]||"start",m=a[s+1]||"end";return h.jsxRuntimeExports.jsx(fA,{prevPage:p,nextPage:m,size:r},`ellipsis-${p}-${m}`)}const d=u,f=d===e;return h.jsxRuntimeExports.jsx(dA,{pageNumber:d,isActive:f,onPageChange:n,size:r},d)}),h.jsxRuntimeExports.jsx(Rl,{onClick:c,disabled:e===t,size:r,label:"Next page",children:"→"})]})},gA=e=>{const t=S.createContext(void 0);return[({value:o,children:i})=>h.jsxRuntimeExports.jsx(t.Provider,{value:o,children:i}),()=>{const o=S.useContext(t);if(o===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return o}]},[xA]=gA("PopoverContext"),vA=e=>{const[t,n]=Gd.useControlledState({value:e==null?void 0:e.open,defaultValue:e==null?void 0:e.defaultOpen,onChange:e==null?void 0:e.onOpenChange});return h.jsxRuntimeExports.jsx(xA,{value:{open:t,setOpen:n},children:h.jsxRuntimeExports.jsx(Y1,{"data-slot":"popover",...e,onOpenChange:n})})},yA={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},EA={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},bA=({value:e=0,classNames:t,indicatorColor:n="primary",customIndicatorClass:r,size:o="md",showLabel:i=!1,labelClassName:c,...l})=>h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsx(rw,{className:M.classNames("relative w-full overflow-hidden rounded-full bg-gray-200",yA[o],t==null?void 0:t.root),value:e,...l,children:h.jsxRuntimeExports.jsx(ow,{className:M.classNames("h-full transition-transform duration-300 ease-in-out",r||EA[n],t==null?void 0:t.indicator),style:{transform:`translateX(-${100-(e||0)}%)`}})}),i&&h.jsxRuntimeExports.jsxs("div",{className:M.classNames("mt-1 text-right text-sm text-gray-600",c),children:[e,"%"]})]});var wA=Object.defineProperty,No=Object.getOwnPropertySymbols,kx=Object.prototype.hasOwnProperty,Lx=Object.prototype.propertyIsEnumerable,Sl=(e,t,n)=>t in e?wA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zs=(e,t)=>{for(var n in t||(t={}))kx.call(t,n)&&Sl(e,n,t[n]);if(No)for(var n of No(t))Lx.call(t,n)&&Sl(e,n,t[n]);return e},Qs=(e,t)=>{var n={};for(var r in e)kx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&No)for(var r of No(e))t.indexOf(r)<0&&Lx.call(e,r)&&(n[r]=e[r]);return n};/**
84
84
  * @license QR Code generator library (TypeScript)
85
85
  * Copyright (c) Project Nayuki.
86
86
  * SPDX-License-Identifier: MIT
87
- */var Pt;(e=>{const t=class te{constructor(u,i,a,f){if(this.version=u,this.errorCorrectionLevel=i,this.modules=[],this.isFunction=[],u<te.MIN_VERSION||u>te.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let d=[];for(let g=0;g<this.size;g++)d.push(!1);for(let g=0;g<this.size;g++)this.modules.push(d.slice()),this.isFunction.push(d.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(a);if(this.drawCodewords(p),f==-1){let g=1e9;for(let m=0;m<8;m++){this.applyMask(m),this.drawFormatBits(m);const x=this.getPenaltyScore();x<g&&(f=m,g=x),this.applyMask(m)}}o(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(u,i){const a=e.QrSegment.makeSegments(u);return te.encodeSegments(a,i)}static encodeBinary(u,i){const a=e.QrSegment.makeBytes(u);return te.encodeSegments([a],i)}static encodeSegments(u,i,a=1,f=40,d=-1,p=!0){if(!(te.MIN_VERSION<=a&&a<=f&&f<=te.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let g,m;for(g=a;;g++){const b=te.getNumDataCodewords(g,i)*8,R=c.getTotalBits(u,g);if(R<=b){m=R;break}if(g>=f)throw new RangeError("Data too long")}for(const b of[te.Ecc.MEDIUM,te.Ecc.QUARTILE,te.Ecc.HIGH])p&&m<=te.getNumDataCodewords(g,b)*8&&(i=b);let x=[];for(const b of u){n(b.mode.modeBits,4,x),n(b.numChars,b.mode.numCharCountBits(g),x);for(const R of b.getData())x.push(R)}o(x.length==m);const y=te.getNumDataCodewords(g,i)*8;o(x.length<=y),n(0,Math.min(4,y-x.length),x),n(0,(8-x.length%8)%8,x),o(x.length%8==0);for(let b=236;x.length<y;b^=253)n(b,8,x);let E=[];for(;E.length*8<x.length;)E.push(0);return x.forEach((b,R)=>E[R>>>3]|=b<<7-(R&7)),new te(g,i,E,d)}getModule(u,i){return 0<=u&&u<this.size&&0<=i&&i<this.size&&this.modules[i][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2==0),this.setFunctionModule(a,6,a%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),i=u.length;for(let a=0;a<i;a++)for(let f=0;f<i;f++)a==0&&f==0||a==0&&f==i-1||a==i-1&&f==0||this.drawAlignmentPattern(u[a],u[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const i=this.errorCorrectionLevel.formatBits<<3|u;let a=i;for(let d=0;d<10;d++)a=a<<1^(a>>>9)*1335;const f=(i<<10|a)^21522;o(f>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,r(f,d));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,r(f,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,r(f,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,r(f,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let a=0;a<12;a++)u=u<<1^(u>>>11)*7973;const i=this.version<<12|u;o(i>>>18==0);for(let a=0;a<18;a++){const f=r(i,a),d=this.size-11+a%3,p=Math.floor(a/3);this.setFunctionModule(d,p,f),this.setFunctionModule(p,d,f)}}drawFinderPattern(u,i){for(let a=-4;a<=4;a++)for(let f=-4;f<=4;f++){const d=Math.max(Math.abs(f),Math.abs(a)),p=u+f,g=i+a;0<=p&&p<this.size&&0<=g&&g<this.size&&this.setFunctionModule(p,g,d!=2&&d!=4)}}drawAlignmentPattern(u,i){for(let a=-2;a<=2;a++)for(let f=-2;f<=2;f++)this.setFunctionModule(u+f,i+a,Math.max(Math.abs(f),Math.abs(a))!=1)}setFunctionModule(u,i,a){this.modules[i][u]=a,this.isFunction[i][u]=!0}addEccAndInterleave(u){const i=this.version,a=this.errorCorrectionLevel;if(u.length!=te.getNumDataCodewords(i,a))throw new RangeError("Invalid argument");const f=te.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][i],d=te.ECC_CODEWORDS_PER_BLOCK[a.ordinal][i],p=Math.floor(te.getNumRawDataModules(i)/8),g=f-p%f,m=Math.floor(p/f);let x=[];const y=te.reedSolomonComputeDivisor(d);for(let b=0,R=0;b<f;b++){let w=u.slice(R,R+m-d+(b<g?0:1));R+=w.length;const P=te.reedSolomonComputeRemainder(w,y);b<g&&w.push(0),x.push(w.concat(P))}let E=[];for(let b=0;b<x[0].length;b++)x.forEach((R,w)=>{(b!=m-d||w>=g)&&E.push(R[b])});return o(E.length==p),E}drawCodewords(u){if(u.length!=Math.floor(te.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let i=0;for(let a=this.size-1;a>=1;a-=2){a==6&&(a=5);for(let f=0;f<this.size;f++)for(let d=0;d<2;d++){const p=a-d,m=(a+1&2)==0?this.size-1-f:f;!this.isFunction[m][p]&&i<u.length*8&&(this.modules[m][p]=r(u[i>>>3],7-(i&7)),i++)}}o(i==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let i=0;i<this.size;i++)for(let a=0;a<this.size;a++){let f;switch(u){case 0:f=(a+i)%2==0;break;case 1:f=i%2==0;break;case 2:f=a%3==0;break;case 3:f=(a+i)%3==0;break;case 4:f=(Math.floor(a/3)+Math.floor(i/2))%2==0;break;case 5:f=a*i%2+a*i%3==0;break;case 6:f=(a*i%2+a*i%3)%2==0;break;case 7:f=((a+i)%2+a*i%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[i][a]&&f&&(this.modules[i][a]=!this.modules[i][a])}}getPenaltyScore(){let u=0;for(let d=0;d<this.size;d++){let p=!1,g=0,m=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[d][x]==p?(g++,g==5?u+=te.PENALTY_N1:g>5&&u++):(this.finderPenaltyAddHistory(g,m),p||(u+=this.finderPenaltyCountPatterns(m)*te.PENALTY_N3),p=this.modules[d][x],g=1);u+=this.finderPenaltyTerminateAndCount(p,g,m)*te.PENALTY_N3}for(let d=0;d<this.size;d++){let p=!1,g=0,m=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[x][d]==p?(g++,g==5?u+=te.PENALTY_N1:g>5&&u++):(this.finderPenaltyAddHistory(g,m),p||(u+=this.finderPenaltyCountPatterns(m)*te.PENALTY_N3),p=this.modules[x][d],g=1);u+=this.finderPenaltyTerminateAndCount(p,g,m)*te.PENALTY_N3}for(let d=0;d<this.size-1;d++)for(let p=0;p<this.size-1;p++){const g=this.modules[d][p];g==this.modules[d][p+1]&&g==this.modules[d+1][p]&&g==this.modules[d+1][p+1]&&(u+=te.PENALTY_N2)}let i=0;for(const d of this.modules)i=d.reduce((p,g)=>p+(g?1:0),i);const a=this.size*this.size,f=Math.ceil(Math.abs(i*20-a*10)/a)-1;return o(0<=f&&f<=9),u+=f*te.PENALTY_N4,o(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,i=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let a=[6];for(let f=this.size-7;a.length<u;f-=i)a.splice(1,0,f);return a}}static getNumRawDataModules(u){if(u<te.MIN_VERSION||u>te.MAX_VERSION)throw new RangeError("Version number out of range");let i=(16*u+128)*u+64;if(u>=2){const a=Math.floor(u/7)+2;i-=(25*a-10)*a-55,u>=7&&(i-=36)}return o(208<=i&&i<=29648),i}static getNumDataCodewords(u,i){return Math.floor(te.getNumRawDataModules(u)/8)-te.ECC_CODEWORDS_PER_BLOCK[i.ordinal][u]*te.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let i=[];for(let f=0;f<u-1;f++)i.push(0);i.push(1);let a=1;for(let f=0;f<u;f++){for(let d=0;d<i.length;d++)i[d]=te.reedSolomonMultiply(i[d],a),d+1<i.length&&(i[d]^=i[d+1]);a=te.reedSolomonMultiply(a,2)}return i}static reedSolomonComputeRemainder(u,i){let a=i.map(f=>0);for(const f of u){const d=f^a.shift();a.push(0),i.forEach((p,g)=>a[g]^=te.reedSolomonMultiply(p,d))}return a}static reedSolomonMultiply(u,i){if(u>>>8||i>>>8)throw new RangeError("Byte out of range");let a=0;for(let f=7;f>=0;f--)a=a<<1^(a>>>7)*285,a^=(i>>>f&1)*u;return o(a>>>8==0),a}finderPenaltyCountPatterns(u){const i=u[1];o(i<=this.size*3);const a=i>0&&u[2]==i&&u[3]==i*3&&u[4]==i&&u[5]==i;return(a&&u[0]>=i*4&&u[6]>=i?1:0)+(a&&u[6]>=i*4&&u[0]>=i?1:0)}finderPenaltyTerminateAndCount(u,i,a){return u&&(this.finderPenaltyAddHistory(i,a),i=0),i+=this.size,this.finderPenaltyAddHistory(i,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(u,i){i[0]==0&&(u+=this.size),i.pop(),i.unshift(u)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(l,u,i){if(u<0||u>31||l>>>u)throw new RangeError("Value out of range");for(let a=u-1;a>=0;a--)i.push(l>>>a&1)}function r(l,u){return(l>>>u&1)!=0}function o(l){if(!l)throw new Error("Assertion error")}const s=class fe{constructor(u,i,a){if(this.mode=u,this.numChars=i,this.bitData=a,i<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}static makeBytes(u){let i=[];for(const a of u)n(a,8,i);return new fe(fe.Mode.BYTE,u.length,i)}static makeNumeric(u){if(!fe.isNumeric(u))throw new RangeError("String contains non-numeric characters");let i=[];for(let a=0;a<u.length;){const f=Math.min(u.length-a,3);n(parseInt(u.substring(a,a+f),10),f*3+1,i),a+=f}return new fe(fe.Mode.NUMERIC,u.length,i)}static makeAlphanumeric(u){if(!fe.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let i=[],a;for(a=0;a+2<=u.length;a+=2){let f=fe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a))*45;f+=fe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a+1)),n(f,11,i)}return a<u.length&&n(fe.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a)),6,i),new fe(fe.Mode.ALPHANUMERIC,u.length,i)}static makeSegments(u){return u==""?[]:fe.isNumeric(u)?[fe.makeNumeric(u)]:fe.isAlphanumeric(u)?[fe.makeAlphanumeric(u)]:[fe.makeBytes(fe.toUtf8ByteArray(u))]}static makeEci(u){let i=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,i);else if(u<16384)n(2,2,i),n(u,14,i);else if(u<1e6)n(6,3,i),n(u,21,i);else throw new RangeError("ECI assignment value out of range");return new fe(fe.Mode.ECI,0,i)}static isNumeric(u){return fe.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return fe.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,i){let a=0;for(const f of u){const d=f.mode.numCharCountBits(i);if(f.numChars>=1<<d)return 1/0;a+=4+d+f.bitData.length}return a}static toUtf8ByteArray(u){u=encodeURI(u);let i=[];for(let a=0;a<u.length;a++)u.charAt(a)!="%"?i.push(u.charCodeAt(a)):(i.push(parseInt(u.substring(a+1,a+3),16)),a+=2);return i}};s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=s;e.QrSegment=s})(Pt||(Pt={}));(e=>{(t=>{const n=class{constructor(o,s){this.ordinal=o,this.formatBits=s}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Pt||(Pt={}));(e=>{(t=>{const n=class{constructor(o,s){this.modeBits=o,this.numBitsCharCount=s}numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Pt||(Pt={}));var Ht=Pt;/**
87
+ */var Mt;(e=>{const t=class te{constructor(u,s,a,d){if(this.version=u,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],u<te.MIN_VERSION||u>te.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let f=[];for(let m=0;m<this.size;m++)f.push(!1);for(let m=0;m<this.size;m++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(a);if(this.drawCodewords(p),d==-1){let m=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const x=this.getPenaltyScore();x<m&&(d=g,m=x),this.applyMask(g)}}o(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(u,s){const a=e.QrSegment.makeSegments(u);return te.encodeSegments(a,s)}static encodeBinary(u,s){const a=e.QrSegment.makeBytes(u);return te.encodeSegments([a],s)}static encodeSegments(u,s,a=1,d=40,f=-1,p=!0){if(!(te.MIN_VERSION<=a&&a<=d&&d<=te.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let m,g;for(m=a;;m++){const b=te.getNumDataCodewords(m,s)*8,w=c.getTotalBits(u,m);if(w<=b){g=w;break}if(m>=d)throw new RangeError("Data too long")}for(const b of[te.Ecc.MEDIUM,te.Ecc.QUARTILE,te.Ecc.HIGH])p&&g<=te.getNumDataCodewords(m,b)*8&&(s=b);let x=[];for(const b of u){n(b.mode.modeBits,4,x),n(b.numChars,b.mode.numCharCountBits(m),x);for(const w of b.getData())x.push(w)}o(x.length==g);const y=te.getNumDataCodewords(m,s)*8;o(x.length<=y),n(0,Math.min(4,y-x.length),x),n(0,(8-x.length%8)%8,x),o(x.length%8==0);for(let b=236;x.length<y;b^=253)n(b,8,x);let E=[];for(;E.length*8<x.length;)E.push(0);return x.forEach((b,w)=>E[w>>>3]|=b<<7-(w&7)),new te(m,s,E,f)}getModule(u,s){return 0<=u&&u<this.size&&0<=s&&s<this.size&&this.modules[s][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let a=0;a<this.size;a++)this.setFunctionModule(6,a,a%2==0),this.setFunctionModule(a,6,a%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),s=u.length;for(let a=0;a<s;a++)for(let d=0;d<s;d++)a==0&&d==0||a==0&&d==s-1||a==s-1&&d==0||this.drawAlignmentPattern(u[a],u[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const s=this.errorCorrectionLevel.formatBits<<3|u;let a=s;for(let f=0;f<10;f++)a=a<<1^(a>>>9)*1335;const d=(s<<10|a)^21522;o(d>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,r(d,f));this.setFunctionModule(8,7,r(d,6)),this.setFunctionModule(8,8,r(d,7)),this.setFunctionModule(7,8,r(d,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,r(d,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,r(d,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,r(d,f));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let a=0;a<12;a++)u=u<<1^(u>>>11)*7973;const s=this.version<<12|u;o(s>>>18==0);for(let a=0;a<18;a++){const d=r(s,a),f=this.size-11+a%3,p=Math.floor(a/3);this.setFunctionModule(f,p,d),this.setFunctionModule(p,f,d)}}drawFinderPattern(u,s){for(let a=-4;a<=4;a++)for(let d=-4;d<=4;d++){const f=Math.max(Math.abs(d),Math.abs(a)),p=u+d,m=s+a;0<=p&&p<this.size&&0<=m&&m<this.size&&this.setFunctionModule(p,m,f!=2&&f!=4)}}drawAlignmentPattern(u,s){for(let a=-2;a<=2;a++)for(let d=-2;d<=2;d++)this.setFunctionModule(u+d,s+a,Math.max(Math.abs(d),Math.abs(a))!=1)}setFunctionModule(u,s,a){this.modules[s][u]=a,this.isFunction[s][u]=!0}addEccAndInterleave(u){const s=this.version,a=this.errorCorrectionLevel;if(u.length!=te.getNumDataCodewords(s,a))throw new RangeError("Invalid argument");const d=te.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][s],f=te.ECC_CODEWORDS_PER_BLOCK[a.ordinal][s],p=Math.floor(te.getNumRawDataModules(s)/8),m=d-p%d,g=Math.floor(p/d);let x=[];const y=te.reedSolomonComputeDivisor(f);for(let b=0,w=0;b<d;b++){let R=u.slice(w,w+g-f+(b<m?0:1));w+=R.length;const _=te.reedSolomonComputeRemainder(R,y);b<m&&R.push(0),x.push(R.concat(_))}let E=[];for(let b=0;b<x[0].length;b++)x.forEach((w,R)=>{(b!=g-f||R>=m)&&E.push(w[b])});return o(E.length==p),E}drawCodewords(u){if(u.length!=Math.floor(te.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let a=this.size-1;a>=1;a-=2){a==6&&(a=5);for(let d=0;d<this.size;d++)for(let f=0;f<2;f++){const p=a-f,g=(a+1&2)==0?this.size-1-d:d;!this.isFunction[g][p]&&s<u.length*8&&(this.modules[g][p]=r(u[s>>>3],7-(s&7)),s++)}}o(s==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let a=0;a<this.size;a++){let d;switch(u){case 0:d=(a+s)%2==0;break;case 1:d=s%2==0;break;case 2:d=a%3==0;break;case 3:d=(a+s)%3==0;break;case 4:d=(Math.floor(a/3)+Math.floor(s/2))%2==0;break;case 5:d=a*s%2+a*s%3==0;break;case 6:d=(a*s%2+a*s%3)%2==0;break;case 7:d=((a+s)%2+a*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][a]&&d&&(this.modules[s][a]=!this.modules[s][a])}}getPenaltyScore(){let u=0;for(let f=0;f<this.size;f++){let p=!1,m=0,g=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[f][x]==p?(m++,m==5?u+=te.PENALTY_N1:m>5&&u++):(this.finderPenaltyAddHistory(m,g),p||(u+=this.finderPenaltyCountPatterns(g)*te.PENALTY_N3),p=this.modules[f][x],m=1);u+=this.finderPenaltyTerminateAndCount(p,m,g)*te.PENALTY_N3}for(let f=0;f<this.size;f++){let p=!1,m=0,g=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[x][f]==p?(m++,m==5?u+=te.PENALTY_N1:m>5&&u++):(this.finderPenaltyAddHistory(m,g),p||(u+=this.finderPenaltyCountPatterns(g)*te.PENALTY_N3),p=this.modules[x][f],m=1);u+=this.finderPenaltyTerminateAndCount(p,m,g)*te.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let p=0;p<this.size-1;p++){const m=this.modules[f][p];m==this.modules[f][p+1]&&m==this.modules[f+1][p]&&m==this.modules[f+1][p+1]&&(u+=te.PENALTY_N2)}let s=0;for(const f of this.modules)s=f.reduce((p,m)=>p+(m?1:0),s);const a=this.size*this.size,d=Math.ceil(Math.abs(s*20-a*10)/a)-1;return o(0<=d&&d<=9),u+=d*te.PENALTY_N4,o(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let a=[6];for(let d=this.size-7;a.length<u;d-=s)a.splice(1,0,d);return a}}static getNumRawDataModules(u){if(u<te.MIN_VERSION||u>te.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*u+128)*u+64;if(u>=2){const a=Math.floor(u/7)+2;s-=(25*a-10)*a-55,u>=7&&(s-=36)}return o(208<=s&&s<=29648),s}static getNumDataCodewords(u,s){return Math.floor(te.getNumRawDataModules(u)/8)-te.ECC_CODEWORDS_PER_BLOCK[s.ordinal][u]*te.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let s=[];for(let d=0;d<u-1;d++)s.push(0);s.push(1);let a=1;for(let d=0;d<u;d++){for(let f=0;f<s.length;f++)s[f]=te.reedSolomonMultiply(s[f],a),f+1<s.length&&(s[f]^=s[f+1]);a=te.reedSolomonMultiply(a,2)}return s}static reedSolomonComputeRemainder(u,s){let a=s.map(d=>0);for(const d of u){const f=d^a.shift();a.push(0),s.forEach((p,m)=>a[m]^=te.reedSolomonMultiply(p,f))}return a}static reedSolomonMultiply(u,s){if(u>>>8||s>>>8)throw new RangeError("Byte out of range");let a=0;for(let d=7;d>=0;d--)a=a<<1^(a>>>7)*285,a^=(s>>>d&1)*u;return o(a>>>8==0),a}finderPenaltyCountPatterns(u){const s=u[1];o(s<=this.size*3);const a=s>0&&u[2]==s&&u[3]==s*3&&u[4]==s&&u[5]==s;return(a&&u[0]>=s*4&&u[6]>=s?1:0)+(a&&u[6]>=s*4&&u[0]>=s?1:0)}finderPenaltyTerminateAndCount(u,s,a){return u&&(this.finderPenaltyAddHistory(s,a),s=0),s+=this.size,this.finderPenaltyAddHistory(s,a),this.finderPenaltyCountPatterns(a)}finderPenaltyAddHistory(u,s){s[0]==0&&(u+=this.size),s.pop(),s.unshift(u)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(l,u,s){if(u<0||u>31||l>>>u)throw new RangeError("Value out of range");for(let a=u-1;a>=0;a--)s.push(l>>>a&1)}function r(l,u){return(l>>>u&1)!=0}function o(l){if(!l)throw new Error("Assertion error")}const i=class de{constructor(u,s,a){if(this.mode=u,this.numChars=s,this.bitData=a,s<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}static makeBytes(u){let s=[];for(const a of u)n(a,8,s);return new de(de.Mode.BYTE,u.length,s)}static makeNumeric(u){if(!de.isNumeric(u))throw new RangeError("String contains non-numeric characters");let s=[];for(let a=0;a<u.length;){const d=Math.min(u.length-a,3);n(parseInt(u.substring(a,a+d),10),d*3+1,s),a+=d}return new de(de.Mode.NUMERIC,u.length,s)}static makeAlphanumeric(u){if(!de.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let s=[],a;for(a=0;a+2<=u.length;a+=2){let d=de.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a))*45;d+=de.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a+1)),n(d,11,s)}return a<u.length&&n(de.ALPHANUMERIC_CHARSET.indexOf(u.charAt(a)),6,s),new de(de.Mode.ALPHANUMERIC,u.length,s)}static makeSegments(u){return u==""?[]:de.isNumeric(u)?[de.makeNumeric(u)]:de.isAlphanumeric(u)?[de.makeAlphanumeric(u)]:[de.makeBytes(de.toUtf8ByteArray(u))]}static makeEci(u){let s=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,s);else if(u<16384)n(2,2,s),n(u,14,s);else if(u<1e6)n(6,3,s),n(u,21,s);else throw new RangeError("ECI assignment value out of range");return new de(de.Mode.ECI,0,s)}static isNumeric(u){return de.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return de.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,s){let a=0;for(const d of u){const f=d.mode.numCharCountBits(s);if(d.numChars>=1<<f)return 1/0;a+=4+f+d.bitData.length}return a}static toUtf8ByteArray(u){u=encodeURI(u);let s=[];for(let a=0;a<u.length;a++)u.charAt(a)!="%"?s.push(u.charCodeAt(a)):(s.push(parseInt(u.substring(a+1,a+3),16)),a+=2);return s}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let c=i;e.QrSegment=i})(Mt||(Mt={}));(e=>{(t=>{const n=class{constructor(o,i){this.ordinal=o,this.formatBits=i}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Mt||(Mt={}));(e=>{(t=>{const n=class{constructor(o,i){this.modeBits=o,this.numBitsCharCount=i}numCharCountBits(o){return this.numBitsCharCount[Math.floor((o+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Mt||(Mt={}));var qt=Mt;/**
88
88
  * @license qrcode.react
89
89
  * Copyright (c) Paul O'Shannessy
90
90
  * SPDX-License-Identifier: ISC
91
- */var YT={L:Ht.QrCode.Ecc.LOW,M:Ht.QrCode.Ecc.MEDIUM,Q:Ht.QrCode.Ecc.QUARTILE,H:Ht.QrCode.Ecc.HIGH},Cx=128,_x="L",jx="#FFFFFF",Px="#000000",Tx=!1,Ax=1,ZT=4,QT=0,JT=.1;function Ox(e,t=0){const n=[];return e.forEach(function(r,o){let s=null;r.forEach(function(c,l){if(!c&&s!==null){n.push(`M${s+t} ${o+t}h${l-s}v1H${s+t}z`),s=null;return}if(l===r.length-1){if(!c)return;s===null?n.push(`M${l+t},${o+t} h1v1H${l+t}z`):n.push(`M${s+t},${o+t} h${l+1-s}v1H${s+t}z`);return}c&&s===null&&(s=l)})}),n.join("")}function Mx(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,s)=>s<t.x||s>=t.x+t.w?o:!1))}function eA(e,t,n,r){if(r==null)return null;const o=e.length+n*2,s=Math.floor(t*JT),c=o/t,l=(r.width||s)*c,u=(r.height||s)*c,i=r.x==null?e.length/2-l/2:r.x*c,a=r.y==null?e.length/2-u/2:r.y*c,f=r.opacity==null?1:r.opacity;let d=null;if(r.excavate){let g=Math.floor(i),m=Math.floor(a),x=Math.ceil(l+i-g),y=Math.ceil(u+a-m);d={x:g,y:m,w:x,h:y}}const p=r.crossOrigin;return{x:i,y:a,h:u,w:l,excavation:d,opacity:f,crossOrigin:p}}function tA(e,t){return t!=null?Math.max(Math.floor(t),0):e?ZT:QT}function Ix({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:s,size:c,boostLevel:l}){let u=S.useMemo(()=>{const g=(Array.isArray(e)?e:[e]).reduce((m,x)=>(m.push(...Ht.QrSegment.makeSegments(x)),m),[]);return Ht.QrCode.encodeSegments(g,YT[t],n,void 0,void 0,l)},[e,t,n,l]);const{cells:i,margin:a,numCells:f,calculatedImageSettings:d}=S.useMemo(()=>{let p=u.getModules();const g=tA(r,o),m=p.length+g*2,x=eA(p,c,g,s);return{cells:p,margin:g,numCells:m,calculatedImageSettings:x}},[u,c,s,r,o]);return{qrcode:u,margin:a,cells:i,numCells:f,calculatedImageSettings:d}}var nA=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),rA=S.forwardRef(function(t,n){const r=t,{value:o,size:s=Cx,level:c=_x,bgColor:l=jx,fgColor:u=Px,includeMargin:i=Tx,minVersion:a=Ax,boostLevel:f,marginSize:d,imageSettings:p}=r,m=Ws(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:x}=m,y=Ws(m,["style"]),E=p==null?void 0:p.src,b=S.useRef(null),R=S.useRef(null),w=S.useCallback(B=>{b.current=B,typeof n=="function"?n(B):n&&(n.current=B)},[n]),[P,C]=S.useState(!1),{margin:_,cells:M,numCells:j,calculatedImageSettings:A}=Ix({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:i,marginSize:d,imageSettings:p,size:s});S.useEffect(()=>{if(b.current!=null){const B=b.current,q=B.getContext("2d");if(!q)return;let U=M;const G=R.current,$=A!=null&&G!==null&&G.complete&&G.naturalHeight!==0&&G.naturalWidth!==0;$&&A.excavation!=null&&(U=Mx(M,A.excavation));const V=window.devicePixelRatio||1;B.height=B.width=s*V;const T=s/j*V;q.scale(T,T),q.fillStyle=l,q.fillRect(0,0,j,j),q.fillStyle=u,nA?q.fill(new Path2D(Ox(U,_))):M.forEach(function(L,Y){L.forEach(function(Q,X){Q&&q.fillRect(X+_,Y+_,1,1)})}),A&&(q.globalAlpha=A.opacity),$&&q.drawImage(G,A.x+_,A.y+_,A.w,A.h)}}),S.useEffect(()=>{C(!1)},[E]);const I=zs({height:s,width:s},x);let F=null;return E!=null&&(F=S.createElement("img",{src:E,key:E,style:{display:"none"},onLoad:()=>{C(!0)},ref:R,crossOrigin:A==null?void 0:A.crossOrigin})),S.createElement(S.Fragment,null,S.createElement("canvas",zs({style:I,height:s,width:s,ref:w,role:"img"},y)),F)});rA.displayName="QRCodeCanvas";var Dx=S.forwardRef(function(t,n){const r=t,{value:o,size:s=Cx,level:c=_x,bgColor:l=jx,fgColor:u=Px,includeMargin:i=Tx,minVersion:a=Ax,boostLevel:f,title:d,marginSize:p,imageSettings:g}=r,m=Ws(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:x,cells:y,numCells:E,calculatedImageSettings:b}=Ix({value:o,level:c,minVersion:a,boostLevel:f,includeMargin:i,marginSize:p,imageSettings:g,size:s});let R=y,w=null;g!=null&&b!=null&&(b.excavation!=null&&(R=Mx(y,b.excavation)),w=S.createElement("image",{href:g.src,height:b.h,width:b.w,x:b.x+x,y:b.y+x,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const P=Ox(R,x);return S.createElement("svg",zs({height:s,width:s,viewBox:`0 0 ${E} ${E}`,ref:n,role:"img"},m),!!d&&S.createElement("title",null,d),S.createElement("path",{fill:l,d:`M0,0 h${E}v${E}H0z`,shapeRendering:"crispEdges"}),S.createElement("path",{fill:u,d:P,shapeRendering:"crispEdges"}),w)});Dx.displayName="QRCodeSVG";const oA=e=>{const{value:t,className:n="",size:r=200,bgColor:o="#FFFFFF",fgColor:s="#000000",level:c="M",marginSize:l=4,imageSettings:u,...i}=e,a=O.classNames("flex items-center justify-center",n);return h.jsxRuntimeExports.jsx("div",{className:a,...i,children:h.jsxRuntimeExports.jsx(Dx,{value:t,size:r,bgColor:o,fgColor:s,level:c,marginSize:l,imageSettings:u})})};var wr={},mn={},Rr={},yl;function Te(){if(yl)return Rr;yl=1,Object.defineProperty(Rr,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return Rr.default=t,Rr}var El;function iA(){if(El)return mn;El=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.CODE39=void 0;var e=(function(){function m(x,y){for(var E=0;E<y.length;E++){var b=y[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,y,E){return y&&m(x.prototype,y),E&&m(x,E),x}})(),t=Te(),n=r(t);function r(m){return m&&m.__esModule?m:{default:m}}function o(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")}function s(m,x){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:m}function c(m,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);m.prototype=Object.create(x&&x.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(m,x):m.__proto__=x)}var l=(function(m){c(x,m);function x(y,E){return o(this,x),y=y.toUpperCase(),E.mod43&&(y+=d(g(y))),s(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,y,E))}return e(x,[{key:"encode",value:function(){for(var E=a("*"),b=0;b<this.data.length;b++)E+=a(this.data[b])+"0";return E+=a("*"),{data:E,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),x})(n.default),u=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(m){return f(p(m))}function f(m){return i[m].toString(2)}function d(m){return u[m]}function p(m){return u.indexOf(m)}function g(m){for(var x=0,y=0;y<m.length;y++)x+=p(m[y]);return x=x%43,x}return mn.CODE39=l,mn}var ke={},Sr={},Cr={},le={},bl;function or(){if(bl)return le;bl=1,Object.defineProperty(le,"__esModule",{value:!0});var e;function t(u,i,a){return i in u?Object.defineProperty(u,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):u[i]=a,u}var n=le.SET_A=0,r=le.SET_B=1,o=le.SET_C=2;le.SHIFT=98;var s=le.START_A=103,c=le.START_B=104,l=le.START_C=105;return le.MODULO=103,le.STOP=106,le.FNC1=207,le.SET_BY_CODE=(e={},t(e,s,n),t(e,c,r),t(e,l,o),e),le.SWAP={101:n,100:r,99:o},le.A_START_CHAR="Ð",le.B_START_CHAR="Ñ",le.C_START_CHAR="Ò",le.A_CHARS="[\0-_È-Ï]",le.B_CHARS="[ -È-Ï]",le.C_CHARS="(Ï*[0-9]{2}Ï*)",le.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],le}var wl;function hi(){if(wl)return Cr;wl=1,Object.defineProperty(Cr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Te(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){s(this,a);var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f.substring(1),d));return p.bytes=f.split("").map(function(g){return g.charCodeAt(0)}),p}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.bytes,p=d.shift()-105,g=r.SET_BY_CODE[p];if(g===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&d.unshift(r.FNC1);var m=a.next(d,1,g);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(p)+m.result+a.getBar((m.checksum+p)%r.MODULO)+a.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var d=this.options.ean128||!1;return typeof d=="string"&&(d=d.toLowerCase()==="true"),d}}],[{key:"getBar",value:function(d){return r.BARS[d]?r.BARS[d].toString():""}},{key:"correctIndex",value:function(d,p){if(p===r.SET_A){var g=d.shift();return g<32?g+64:g-32}else return p===r.SET_B?d.shift()-32:(d.shift()-48)*10+d.shift()-48}},{key:"next",value:function(d,p,g){if(!d.length)return{result:"",checksum:0};var m=void 0,x=void 0;if(d[0]>=200){x=d.shift()-105;var y=r.SWAP[x];y!==void 0?m=a.next(d,p+1,y):((g===r.SET_A||g===r.SET_B)&&x===r.SHIFT&&(d[0]=g===r.SET_A?d[0]>95?d[0]-96:d[0]:d[0]<32?d[0]+96:d[0]),m=a.next(d,p+1,g))}else x=a.correctIndex(d,g),m=a.next(d,p+1,g);var E=a.getBar(x),b=x*p;return{result:E+m.result,checksum:b+m.checksum}}}]),a})(n.default);return Cr.default=u,Cr}var _r={},Rl;function sA(){if(Rl)return _r;Rl=1,Object.defineProperty(_r,"__esModule",{value:!0});var e=or(),t=function(l){return l.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(l){return l.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(l){return l.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(c,l){var u=l?e.A_CHARS:e.B_CHARS,i=c.match(new RegExp("^("+u+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(i)return i[1]+"Ì"+s(c.substring(i[1].length));var a=c.match(new RegExp("^"+u+"+"))[0];return a.length===c.length?c:a+String.fromCharCode(l?205:206)+o(c.substring(a.length),!l)}function s(c){var l=r(c),u=l.length;if(u===c.length)return c;c=c.substring(u);var i=t(c)>=n(c);return l+String.fromCharCode(i?206:205)+o(c,i)}return _r.default=function(c){var l=void 0,u=r(c).length;if(u>=2)l=e.C_START_CHAR+s(c);else{var i=t(c)>n(c);l=(i?e.A_START_CHAR:e.B_START_CHAR)+o(c,i)}return l.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,f){return"Ë"+f})},_r}var Sl;function aA(){if(Sl)return Sr;Sl=1,Object.defineProperty(Sr,"__esModule",{value:!0});var e=hi(),t=o(e),n=sA(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){if(s(this,a),/^[\x00-\x7F\xC8-\xD3]+$/.test(f))var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,(0,r.default)(f),d));else var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d));return c(p)}return a})(t.default);return Sr.default=u,Sr}var jr={},Cl;function cA(){if(Cl)return jr;Cl=1,Object.defineProperty(jr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=hi(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.A_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),a})(n.default);return jr.default=u,jr}var Pr={},_l;function uA(){if(_l)return Pr;_l=1,Object.defineProperty(Pr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=hi(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.B_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),a})(n.default);return Pr.default=u,Pr}var Tr={},jl;function lA(){if(jl)return Tr;jl=1,Object.defineProperty(Tr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=hi(),n=o(t),r=or();function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.C_START_CHAR+f,d))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),a})(n.default);return Tr.default=u,Tr}var Pl;function fA(){if(Pl)return ke;Pl=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.CODE128C=ke.CODE128B=ke.CODE128A=ke.CODE128=void 0;var e=aA(),t=u(e),n=cA(),r=u(n),o=uA(),s=u(o),c=lA(),l=u(c);function u(i){return i&&i.__esModule?i:{default:i}}return ke.CODE128=t.default,ke.CODE128A=r.default,ke.CODE128B=s.default,ke.CODE128C=l.default,ke}var ye={},Ar={},Qe={},Tl;function ir(){return Tl||(Tl=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.SIDE_BIN="101",Qe.MIDDLE_BIN="01010",Qe.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Qe.EAN2_STRUCTURE=["LL","LG","GL","GG"],Qe.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Qe.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),Qe}var Or={},Mr={},Al;function sr(){if(Al)return Mr;Al=1,Object.defineProperty(Mr,"__esModule",{value:!0});var e=ir(),t=function(r,o,s){var c=r.split("").map(function(u,i){return e.BINARIES[o[i]]}).map(function(u,i){return u?u[r[i]]:""});if(s){var l=r.length-1;c=c.map(function(u,i){return i<l?u+s:u})}return c.join("")};return Mr.default=t,Mr}var Ol;function Nx(){if(Ol)return Or;Ol=1,Object.defineProperty(Or,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),t=ir(),n=sr(),r=c(n),o=Te(),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function i(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){i(d,f);function d(p,g){l(this,d);var m=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g));return m.fontSize=!g.flat&&g.fontSize>g.width*10?g.width*10:g.fontSize,m.guardHeight=g.height+m.fontSize/2+g.textMargin,m}return e(d,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(g,m){return this.text.substr(g,m)}},{key:"leftEncode",value:function(g,m){return(0,r.default)(g,m)}},{key:"rightText",value:function(g,m){return this.text.substr(g,m)}},{key:"rightEncode",value:function(g,m){return(0,r.default)(g,m)}},{key:"encodeGuarded",value:function(){var g={fontSize:this.fontSize},m={height:this.guardHeight};return[{data:t.SIDE_BIN,options:m},{data:this.leftEncode(),text:this.leftText(),options:g},{data:t.MIDDLE_BIN,options:m},{data:this.rightEncode(),text:this.rightText(),options:g},{data:t.SIDE_BIN,options:m}]}},{key:"encodeFlat",value:function(){var g=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:g.join(""),text:this.text}}}]),d})(s.default);return Or.default=a,Or}var Ml;function dA(){if(Ml)return Ar;Ml=1,Object.defineProperty(Ar,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),t=function f(d,p,g){d===null&&(d=Function.prototype);var m=Object.getOwnPropertyDescriptor(d,p);if(m===void 0){var x=Object.getPrototypeOf(d);return x===null?void 0:f(x,p,g)}else{if("value"in m)return m.value;var y=m.get;return y===void 0?void 0:y.call(g)}},n=ir(),r=Nx(),o=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function u(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var i=function(d){var p=d.substr(0,12).split("").map(function(g){return+g}).reduce(function(g,m,x){return x%2?g+m*3:g+m},0);return(10-p%10)%10},a=(function(f){u(d,f);function d(p,g){c(this,d),p.search(/^[0-9]{12}$/)!==-1&&(p+=i(p));var m=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g));return m.lastChar=g.lastChar,m}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===i(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var g=this.data.substr(1,6),m=n.EAN13_STRUCTURE[this.data[0]];return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,g,m)}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var g=this.data.substr(7,6);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,g,"RRRRRR")}},{key:"encodeGuarded",value:function(){var g=t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(g.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(g.push({data:"00"}),g.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),g}}]),d})(o.default);return Ar.default=a,Ar}var Ir={},Il;function hA(){if(Il)return Ir;Il=1,Object.defineProperty(Ir,"__esModule",{value:!0});var e=(function(){function a(f,d){for(var p=0;p<d.length;p++){var g=d[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(f,g.key,g)}}return function(f,d,p){return d&&a(f.prototype,d),p&&a(f,p),f}})(),t=function a(f,d,p){f===null&&(f=Function.prototype);var g=Object.getOwnPropertyDescriptor(f,d);if(g===void 0){var m=Object.getPrototypeOf(f);return m===null?void 0:a(m,d,p)}else{if("value"in g)return g.value;var x=g.get;return x===void 0?void 0:x.call(p)}},n=Nx(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function s(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}function c(a,f){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:a}function l(a,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);a.prototype=Object.create(f&&f.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(a,f):a.__proto__=f)}var u=function(f){var d=f.substr(0,7).split("").map(function(p){return+p}).reduce(function(p,g,m){return m%2?p+g:p+g*3},0);return(10-d%10)%10},i=(function(a){l(f,a);function f(d,p){return s(this,f),d.search(/^[0-9]{7}$/)!==-1&&(d+=u(d)),c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d,p))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===u(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var p=this.data.substr(0,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,p,"LLLL")}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var p=this.data.substr(4,4);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,p,"RRRR")}}]),f})(r.default);return Ir.default=i,Ir}var Dr={},Dl;function pA(){if(Dl)return Dr;Dl=1,Object.defineProperty(Dr,"__esModule",{value:!0});var e=(function(){function d(p,g){for(var m=0;m<g.length;m++){var x=g[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(p,x.key,x)}}return function(p,g,m){return g&&d(p.prototype,g),m&&d(p,m),p}})(),t=ir(),n=sr(),r=c(n),o=Te(),s=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function l(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function u(d,p){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:d}function i(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);d.prototype=Object.create(p&&p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(d,p):d.__proto__=p)}var a=function(p){var g=p.split("").map(function(m){return+m}).reduce(function(m,x,y){return y%2?m+x*9:m+x*3},0);return g%10},f=(function(d){i(p,d);function p(g,m){return l(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,g,m))}return e(p,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN5_STRUCTURE[a(this.data)];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),p})(s.default);return Dr.default=f,Dr}var Nr={},Nl;function mA(){if(Nl)return Nr;Nl=1,Object.defineProperty(Nr,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),t=ir(),n=sr(),r=c(n),o=Te(),s=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function u(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function i(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var a=(function(f){i(d,f);function d(p,g){return l(this,d),u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var g=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,g,"01"),text:this.text}}}]),d})(s.default);return Nr.default=a,Nr}var gn={},kl;function kx(){if(kl)return gn;kl=1,Object.defineProperty(gn,"__esModule",{value:!0});var e=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})();gn.checksum=a;var t=sr(),n=s(t),r=Te(),o=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function l(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function u(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var i=(function(f){u(d,f);function d(p,g){c(this,d),p.search(/^[0-9]{11}$/)!==-1&&(p+=a(p));var m=l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,p,g));return m.displayValue=g.displayValue,g.fontSize>g.width*10?m.fontSize=g.width*10:m.fontSize=g.fontSize,m.guardHeight=g.height+m.fontSize/2+g.textMargin,m}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var g="";return g+="101",g+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),g+="01010",g+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),g+="101",{data:g,text:this.text}}},{key:"guardedEncoding",value:function(){var g=[];return this.displayValue&&g.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),g.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),g.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),g.push({data:"01010",options:{height:this.guardHeight}}),g.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),g.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&g.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),g}}]),d})(o.default);function a(f){var d=0,p;for(p=1;p<11;p+=2)d+=parseInt(f[p]);for(p=0;p<11;p+=2)d+=parseInt(f[p])*3;return(10-d%10)%10}return gn.default=i,gn}var kr={},Ll;function gA(){if(Ll)return kr;Ll=1,Object.defineProperty(kr,"__esModule",{value:!0});var e=(function(){function g(m,x){for(var y=0;y<x.length;y++){var E=x[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(m,E.key,E)}}return function(m,x,y){return x&&g(m.prototype,x),y&&g(m,y),m}})(),t=sr(),n=c(t),r=Te(),o=c(r),s=kx();function c(g){return g&&g.__esModule?g:{default:g}}function l(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function u(g,m){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:g}function i(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(g,m):g.__proto__=m)}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],f=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],d=(function(g){i(m,g);function m(x,y){l(this,m);var E=u(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,x,y));if(E.isValid=!1,x.search(/^[0-9]{6}$/)!==-1)E.middleDigits=x,E.upcA=p(x,"0"),E.text=y.text||""+E.upcA[0]+x+E.upcA[E.upcA.length-1],E.isValid=!0;else if(x.search(/^[01][0-9]{7}$/)!==-1)if(E.middleDigits=x.substring(1,x.length-1),E.upcA=p(E.middleDigits,x[0]),E.upcA[E.upcA.length-1]===x[x.length-1])E.isValid=!0;else return u(E);else return u(E);return E.displayValue=y.displayValue,y.fontSize>y.width*10?E.fontSize=y.width*10:E.fontSize=y.fontSize,E.guardHeight=y.height+E.fontSize/2+y.textMargin,E}return e(m,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var y="";return y+="101",y+=this.encodeMiddleDigits(),y+="010101",{data:y,text:this.text}}},{key:"guardedEncoding",value:function(){var y=[];return this.displayValue&&y.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),y.push({data:"101",options:{height:this.guardHeight}}),y.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),y.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&y.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),y}},{key:"encodeMiddleDigits",value:function(){var y=this.upcA[0],E=this.upcA[this.upcA.length-1],b=f[parseInt(E)][parseInt(y)];return(0,n.default)(this.middleDigits,b)}}]),m})(o.default);function p(g,m){for(var x=parseInt(g[g.length-1]),y=a[x],E="",b=0,R=0;R<y.length;R++){var w=y[R];w==="X"?E+=g[b++]:E+=w}return E=""+m+E,""+E+(0,s.checksum)(E)}return kr.default=d,kr}var Fl;function xA(){if(Fl)return ye;Fl=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.UPCE=ye.UPC=ye.EAN2=ye.EAN5=ye.EAN8=ye.EAN13=void 0;var e=dA(),t=d(e),n=hA(),r=d(n),o=pA(),s=d(o),c=mA(),l=d(c),u=kx(),i=d(u),a=gA(),f=d(a);function d(p){return p&&p.__esModule?p:{default:p}}return ye.EAN13=t.default,ye.EAN8=r.default,ye.EAN5=s.default,ye.EAN2=l.default,ye.UPC=i.default,ye.UPCE=f.default,ye}var xt={},Lr={},kt={},Vl;function vA(){return Vl||(Vl=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.START_BIN="1010",kt.END_BIN="11101",kt.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),kt}var Bl;function Lx(){if(Bl)return Lr;Bl=1,Object.defineProperty(Lr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=vA(),n=Te(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return e(a,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var d=this,p=this.data.match(/.{2}/g).map(function(g){return d.encodePair(g)}).join("");return{data:t.START_BIN+p+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(d){var p=t.BINARIES[d[1]];return t.BINARIES[d[0]].split("").map(function(g,m){return(g==="1"?"111":"1")+(p[m]==="1"?"000":"0")}).join("")}}]),a})(r.default);return Lr.default=u,Lr}var Fr={},$l;function yA(){if($l)return Fr;$l=1,Object.defineProperty(Fr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Lx(),n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function s(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function c(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=function(a){var f=a.substr(0,13).split("").map(function(d){return parseInt(d,10)}).reduce(function(d,p,g){return d+p*(3-g%2*2)},0);return Math.ceil(f/10)*10-f},u=(function(i){c(a,i);function a(f,d){return o(this,a),f.search(/^[0-9]{13}$/)!==-1&&(f+=l(f)),s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===l(this.data)}}]),a})(n.default);return Fr.default=u,Fr}var Ul;function EA(){if(Ul)return xt;Ul=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.ITF14=xt.ITF=void 0;var e=Lx(),t=o(e),n=yA(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}return xt.ITF=t.default,xt.ITF14=r.default,xt}var Ce={},Vr={},Gl;function ar(){if(Gl)return Vr;Gl=1,Object.defineProperty(Vr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=Te(),n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function s(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function c(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var l=(function(i){c(a,i);function a(f,d){return o(this,a),s(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"encode",value:function(){for(var d="110",p=0;p<this.data.length;p++){var g=parseInt(this.data[p]),m=g.toString(2);m=u(m,4-m.length);for(var x=0;x<m.length;x++)d+=m[x]=="0"?"100":"110"}return d+="1001",{data:d,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),a})(n.default);function u(i,a){for(var f=0;f<a;f++)i="0"+i;return i}return Vr.default=l,Vr}var Br={},xn={},Hl;function pi(){if(Hl)return xn;Hl=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.mod10=e,xn.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var s=parseInt(n[o]);(o+n.length)%2===0?r+=s:r+=s*2%10+Math.floor(s*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],s=0;s<n.length;s++){var c=parseInt(n[n.length-1-s]);r+=o[s%o.length]*c}return(11-r%11)%11}return xn}var zl;function bA(){if(zl)return Br;zl=1,Object.defineProperty(Br,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a+(0,n.mod10)(a),f))}return i})(t.default);return Br.default=l,Br}var $r={},Wl;function wA(){if(Wl)return $r;Wl=1,Object.defineProperty($r,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a+(0,n.mod11)(a),f))}return i})(t.default);return $r.default=l,$r}var Ur={},ql;function RA(){if(ql)return Ur;ql=1,Object.defineProperty(Ur,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),a+=(0,n.mod10)(a),a+=(0,n.mod10)(a),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return i})(t.default);return Ur.default=l,Ur}var Gr={},Kl;function SA(){if(Kl)return Gr;Kl=1,Object.defineProperty(Gr,"__esModule",{value:!0});var e=ar(),t=r(e),n=pi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),a+=(0,n.mod11)(a),a+=(0,n.mod10)(a),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return i})(t.default);return Gr.default=l,Gr}var Xl;function CA(){if(Xl)return Ce;Xl=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.MSI1110=Ce.MSI1010=Ce.MSI11=Ce.MSI10=Ce.MSI=void 0;var e=ar(),t=a(e),n=bA(),r=a(n),o=wA(),s=a(o),c=RA(),l=a(c),u=SA(),i=a(u);function a(f){return f&&f.__esModule?f:{default:f}}return Ce.MSI=t.default,Ce.MSI10=r.default,Ce.MSI11=s.default,Ce.MSI1010=l.default,Ce.MSI1110=i.default,Ce}var vn={},Yl;function _A(){if(Yl)return vn;Yl=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.pharmacode=void 0;var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){o(this,i);var d=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f));return d.number=parseInt(a,10),d}return e(i,[{key:"encode",value:function(){for(var f=this.number,d="";!isNaN(f)&&f!=0;)f%2===0?(d="11100"+d,f=(f-2)/2):(d="100"+d,f=(f-1)/2);return d=d.slice(0,-2),{data:d,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),i})(n.default);return vn.pharmacode=l,vn}var yn={},Zl;function jA(){if(Zl)return yn;Zl=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.codabar=void 0;var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){o(this,i),a.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(a="A"+a+"A");var d=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a.toUpperCase(),f));return d.text=d.options.text||d.text.replace(/[A-D]/g,""),d}return e(i,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var f=[],d=this.getEncodings(),p=0;p<this.data.length;p++)f.push(d[this.data.charAt(p)]),p!==this.data.length-1&&f.push("0");return{text:this.text,data:f.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),i})(n.default);return yn.codabar=l,yn}var vt={},Hr={},Lt={},Ql;function PA(){return Ql||(Ql=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Lt.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Lt.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),Lt}var Jl;function Fx(){if(Jl)return Hr;Jl=1,Object.defineProperty(Hr,"__esModule",{value:!0});var e=(function(){function i(a,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,f,d){return f&&i(a.prototype,f),d&&i(a,d),a}})(),t=PA(),n=Te(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function c(i,a){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:i}function l(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(i,a):i.__proto__=a)}var u=(function(i){l(a,i);function a(f,d){return s(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,f,d))}return e(a,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.data.split("").flatMap(function(x){return t.MULTI_SYMBOLS[x]||x}),p=d.map(function(x){return a.getEncoding(x)}).join(""),g=a.checksum(d,20),m=a.checksum(d.concat(g),15);return{text:this.text,data:a.getEncoding("ÿ")+p+a.getEncoding(g)+a.getEncoding(m)+a.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(d){return t.BINARIES[a.symbolValue(d)]}},{key:"getSymbol",value:function(d){return t.SYMBOLS[d]}},{key:"symbolValue",value:function(d){return t.SYMBOLS.indexOf(d)}},{key:"checksum",value:function(d,p){var g=d.slice().reverse().reduce(function(m,x,y){var E=y%p+1;return m+a.symbolValue(x)*E},0);return a.getSymbol(g%47)}}]),a})(r.default);return Hr.default=u,Hr}var zr={},ef;function TA(){if(ef)return zr;ef=1,Object.defineProperty(zr,"__esModule",{value:!0});var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Fx(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return e(i,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),i})(n.default);return zr.default=l,zr}var tf;function AA(){if(tf)return vt;tf=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.CODE93FullASCII=vt.CODE93=void 0;var e=Fx(),t=o(e),n=TA(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}return vt.CODE93=t.default,vt.CODE93FullASCII=r.default,vt}var En={},nf;function OA(){if(nf)return En;nf=1,Object.defineProperty(En,"__esModule",{value:!0}),En.GenericBarcode=void 0;var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function s(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:u}function c(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}var l=(function(u){c(i,u);function i(a,f){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a,f))}return e(i,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),i})(n.default);return En.GenericBarcode=l,En}var rf;function MA(){if(rf)return wr;rf=1,Object.defineProperty(wr,"__esModule",{value:!0});var e=iA(),t=fA(),n=xA(),r=EA(),o=CA(),s=_A(),c=jA(),l=AA(),u=OA();return wr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:s.pharmacode,codabar:c.codabar,CODE93:l.CODE93,CODE93FullASCII:l.CODE93FullASCII,GenericBarcode:u.GenericBarcode},wr}var Wr={},of;function mi(){if(of)return Wr;of=1,Object.defineProperty(Wr,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return Wr.default=function(t,n){return e({},t,n)},Wr}var qr={},sf;function IA(){if(sf)return qr;sf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var s=0;s<o.length;s++)r(o[s]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return qr}var Kr={},af;function DA(){if(af)return Kr;af=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return Kr}var Xr={},Yr={},Zr={},cf;function Vx(){if(cf)return Zr;cf=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return Zr}var Qr={},uf;function Bx(){if(uf)return Qr;uf=1,Object.defineProperty(Qr,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return Qr.default=e,Qr}var lf;function NA(){if(lf)return Yr;lf=1,Object.defineProperty(Yr,"__esModule",{value:!0});var e=Vx(),t=o(e),n=Bx(),r=o(n);function o(c){return c&&c.__esModule?c:{default:c}}function s(c){var l={};for(var u in r.default)r.default.hasOwnProperty(u)&&(c.hasAttribute("jsbarcode-"+u.toLowerCase())&&(l[u]=c.getAttribute("jsbarcode-"+u.toLowerCase())),c.hasAttribute("data-"+u.toLowerCase())&&(l[u]=c.getAttribute("data-"+u.toLowerCase())));return l.value=c.getAttribute("jsbarcode-value")||c.getAttribute("data-value"),l=(0,t.default)(l),l}return Yr.default=s,Yr}var Jr={},eo={},_e={},ff;function $x(){if(ff)return _e;ff=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getTotalWidthOfEncodings=_e.calculateEncodingAttributes=_e.getBarcodePadding=_e.getEncodingHeight=_e.getMaximumHeightOfEncodings=void 0;var e=mi(),t=n(e);function n(i){return i&&i.__esModule?i:{default:i}}function r(i,a){return a.height+(a.displayValue&&i.text.length>0?a.fontSize+a.textMargin:0)+a.marginTop+a.marginBottom}function o(i,a,f){if(f.displayValue&&a<i){if(f.textAlign=="center")return Math.floor((i-a)/2);if(f.textAlign=="left")return 0;if(f.textAlign=="right")return Math.floor(i-a)}return 0}function s(i,a,f){for(var d=0;d<i.length;d++){var p=i[d],g=(0,t.default)(a,p.options),m;g.displayValue?m=u(p.text,g,f):m=0;var x=p.data.length*g.width;p.width=Math.ceil(Math.max(m,x)),p.height=r(p,g),p.barcodePadding=o(m,x,g)}}function c(i){for(var a=0,f=0;f<i.length;f++)a+=i[f].width;return a}function l(i){for(var a=0,f=0;f<i.length;f++)i[f].height>a&&(a=i[f].height);return a}function u(i,a,f){var d;if(f)d=f;else if(typeof document<"u")d=document.createElement("canvas").getContext("2d");else return 0;d.font=a.fontOptions+" "+a.fontSize+"px "+a.font;var p=d.measureText(i);if(!p)return 0;var g=p.width;return g}return _e.getMaximumHeightOfEncodings=l,_e.getEncodingHeight=r,_e.getBarcodePadding=o,_e.calculateEncodingAttributes=s,_e.getTotalWidthOfEncodings=c,_e}var df;function kA(){if(df)return eo;df=1,Object.defineProperty(eo,"__esModule",{value:!0});var e=(function(){function l(u,i){for(var a=0;a<i.length;a++){var f=i[a];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,i,a){return i&&l(u.prototype,i),a&&l(u,a),u}})(),t=mi(),n=o(t),r=$x();function o(l){return l&&l.__esModule?l:{default:l}}function s(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var c=(function(){function l(u,i,a){s(this,l),this.canvas=u,this.encodings=i,this.options=a}return e(l,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var i=0;i<this.encodings.length;i++){var a=(0,n.default)(this.options,this.encodings[i].options);this.drawCanvasBarcode(a,this.encodings[i]),this.drawCanvasText(a,this.encodings[i]),this.moveCanvasDrawing(this.encodings[i])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var i=this.canvas.getContext("2d");i.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,i);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=f,i.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(i.fillStyle=this.options.background,i.fillRect(0,0,this.canvas.width,this.canvas.height)),i.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(i,a){var f=this.canvas.getContext("2d"),d=a.data,p;i.textPosition=="top"?p=i.marginTop+i.fontSize+i.textMargin:p=i.marginTop,f.fillStyle=i.lineColor;for(var g=0;g<d.length;g++){var m=g*i.width+a.barcodePadding;d[g]==="1"?f.fillRect(m,p,i.width,i.height):d[g]&&f.fillRect(m,p,i.width,i.height*d[g])}}},{key:"drawCanvasText",value:function(i,a){var f=this.canvas.getContext("2d"),d=i.fontOptions+" "+i.fontSize+"px "+i.font;if(i.displayValue){var p,g;i.textPosition=="top"?g=i.marginTop+i.fontSize-i.textMargin:g=i.height+i.textMargin+i.marginTop+i.fontSize,f.font=d,i.textAlign=="left"||a.barcodePadding>0?(p=0,f.textAlign="left"):i.textAlign=="right"?(p=a.width-1,f.textAlign="right"):(p=a.width/2,f.textAlign="center"),f.fillText(a.text,p,g)}}},{key:"moveCanvasDrawing",value:function(i){var a=this.canvas.getContext("2d");a.translate(i.width,0)}},{key:"restoreCanvas",value:function(){var i=this.canvas.getContext("2d");i.restore()}}]),l})();return eo.default=c,eo}var to={},hf;function LA(){if(hf)return to;hf=1,Object.defineProperty(to,"__esModule",{value:!0});var e=(function(){function u(i,a){for(var f=0;f<a.length;f++){var d=a[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}return function(i,a,f){return a&&u(i.prototype,a),f&&u(i,f),i}})(),t=mi(),n=o(t),r=$x();function o(u){return u&&u.__esModule?u:{default:u}}function s(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}var c="http://www.w3.org/2000/svg",l=(function(){function u(i,a,f){s(this,u),this.svg=i,this.encodings=a,this.options=f,this.document=f.xmlDocument||document}return e(u,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var f=0;f<this.encodings.length;f++){var d=this.encodings[f],p=(0,n.default)(this.options,d.options),g=this.createGroup(a,p.marginTop,this.svg);this.setGroupOptions(g,p),this.drawSvgBarcode(g,p,d),this.drawSVGText(g,p,d),a+=d.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),f=(0,r.getMaximumHeightOfEncodings)(this.encodings),d=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(d,f),this.options.background&&this.drawRect(0,0,d,f,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,f,d){var p=d.data,g;f.textPosition=="top"?g=f.fontSize+f.textMargin:g=0;for(var m=0,x=0,y=0;y<p.length;y++)x=y*f.width+d.barcodePadding,p[y]==="1"?m++:m>0&&(this.drawRect(x-f.width*m,g,f.width*m,f.height,a),m=0);m>0&&this.drawRect(x-f.width*(m-1),g,f.width*m,f.height,a)}},{key:"drawSVGText",value:function(a,f,d){var p=this.document.createElementNS(c,"text");if(f.displayValue){var g,m;p.setAttribute("font-family",f.font),p.setAttribute("font-size",f.fontSize),f.fontOptions.includes("bold")&&p.setAttribute("font-weight","bold"),f.fontOptions.includes("italic")&&p.setAttribute("font-style","italic"),f.textPosition=="top"?m=f.fontSize-f.textMargin:m=f.height+f.textMargin+f.fontSize,f.textAlign=="left"||d.barcodePadding>0?(g=0,p.setAttribute("text-anchor","start")):f.textAlign=="right"?(g=d.width-1,p.setAttribute("text-anchor","end")):(g=d.width/2,p.setAttribute("text-anchor","middle")),p.setAttribute("x",g),p.setAttribute("y",m),p.appendChild(this.document.createTextNode(d.text)),a.appendChild(p)}}},{key:"setSvgAttributes",value:function(a,f){var d=this.svg;d.setAttribute("width",a+"px"),d.setAttribute("height",f+"px"),d.setAttribute("x","0px"),d.setAttribute("y","0px"),d.setAttribute("viewBox","0 0 "+a+" "+f),d.setAttribute("xmlns",c),d.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,f,d){var p=this.document.createElementNS(c,"g");return p.setAttribute("transform","translate("+a+", "+f+")"),d.appendChild(p),p}},{key:"setGroupOptions",value:function(a,f){a.setAttribute("fill",f.lineColor)}},{key:"drawRect",value:function(a,f,d,p,g){var m=this.document.createElementNS(c,"rect");return m.setAttribute("x",a),m.setAttribute("y",f),m.setAttribute("width",d),m.setAttribute("height",p),g.appendChild(m),m}}]),u})();return to.default=l,to}var no={},pf;function FA(){if(pf)return no;pf=1,Object.defineProperty(no,"__esModule",{value:!0});var e=(function(){function r(o,s){for(var c=0;c<s.length;c++){var l=s[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,s,c){return s&&r(o.prototype,s),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,s,c){t(this,r),this.object=o,this.encodings=s,this.options=c}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return no.default=n,no}var mf;function VA(){if(mf)return Jr;mf=1,Object.defineProperty(Jr,"__esModule",{value:!0});var e=kA(),t=c(e),n=LA(),r=c(n),o=FA(),s=c(o);function c(l){return l&&l.__esModule?l:{default:l}}return Jr.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:s.default},Jr}var Ft={},gf;function Ux(){if(gf)return Ft;gf=1,Object.defineProperty(Ft,"__esModule",{value:!0});function e(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function t(c,l){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:c}function n(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}var r=(function(c){n(l,c);function l(u,i){e(this,l);var a=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.name="InvalidInputException",a.symbology=u,a.input=i,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return l})(Error),o=(function(c){n(l,c);function l(){e(this,l);var u=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return u.name="InvalidElementException",u.message="Not supported type to render on",u}return l})(Error),s=(function(c){n(l,c);function l(){e(this,l);var u=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return u.name="NoElementException",u.message="No element to render on.",u}return l})(Error);return Ft.InvalidInputException=r,Ft.InvalidElementException=o,Ft.NoElementException=s,Ft}var xf;function BA(){if(xf)return Xr;xf=1,Object.defineProperty(Xr,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t=NA(),n=c(t),r=VA(),o=c(r),s=Ux();function c(a){return a&&a.__esModule?a:{default:a}}function l(a){if(typeof a=="string")return u(a);if(Array.isArray(a)){for(var f=[],d=0;d<a.length;d++)f.push(l(a[d]));return f}else{if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLImageElement)return i(a);if(a&&a.nodeName&&a.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&a instanceof SVGElement)return{element:a,options:(0,n.default)(a),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement)return{element:a,options:(0,n.default)(a),renderer:o.default.CanvasRenderer};if(a&&a.getContext)return{element:a,renderer:o.default.CanvasRenderer};if(a&&(typeof a>"u"?"undefined":e(a))==="object"&&!a.nodeName)return{element:a,renderer:o.default.ObjectRenderer};throw new s.InvalidElementException}}function u(a){var f=document.querySelectorAll(a);if(f.length!==0){for(var d=[],p=0;p<f.length;p++)d.push(l(f[p]));return d}}function i(a){var f=document.createElement("canvas");return{element:f,options:(0,n.default)(a),renderer:o.default.CanvasRenderer,afterRender:function(){a.setAttribute("src",f.toDataURL())}}}return Xr.default=l,Xr}var ro={},vf;function $A(){if(vf)return ro;vf=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=(function(){function r(o,s){for(var c=0;c<s.length;c++){var l=s[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,s,c){return s&&r(o.prototype,s),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(s){if(s.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw s.message;else throw s;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(s){try{var c=s.apply(void 0,arguments);return this.api._options.valid(!0),c}catch(l){return this.handleCatch(l),this.api}}}]),r})();return ro.default=n,ro}var Wi,yf;function UA(){if(yf)return Wi;yf=1;var e=MA(),t=y(e),n=mi(),r=y(n),o=IA(),s=y(o),c=DA(),l=y(c),u=BA(),i=y(u),a=Vx(),f=y(a),d=$A(),p=y(d),g=Ux(),m=Bx(),x=y(m);function y(M){return M&&M.__esModule?M:{default:M}}var E=function(){},b=function(j,A,I){var F=new E;if(typeof j>"u")throw Error("No element to render on was provided.");return F._renderProperties=(0,i.default)(j),F._encodings=[],F._options=x.default,F._errorHandler=new p.default(F),typeof A<"u"&&(I=I||{},I.format||(I.format=C()),F.options(I)[I.format](A,I).render()),F};b.getModule=function(M){return t.default[M]};for(var R in t.default)t.default.hasOwnProperty(R)&&w(t.default,R);function w(M,j){E.prototype[j]=E.prototype[j.toUpperCase()]=E.prototype[j.toLowerCase()]=function(A,I){var F=this;return F._errorHandler.wrapBarcodeCall(function(){I.text=typeof I.text>"u"?void 0:""+I.text;var B=(0,r.default)(F._options,I);B=(0,f.default)(B);var q=M[j],U=P(A,q,B);return F._encodings.push(U),F})}}function P(M,j,A){M=""+M;var I=new j(M,A);if(!I.valid())throw new g.InvalidInputException(I.constructor.name,M);var F=I.encode();F=(0,s.default)(F);for(var B=0;B<F.length;B++)F[B].options=(0,r.default)(A,F[B].options);return F}function C(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}E.prototype.options=function(M){return this._options=(0,r.default)(this._options,M),this},E.prototype.blank=function(M){var j=new Array(M+1).join("0");return this._encodings.push({data:j}),this},E.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var M;for(var j in this._renderProperties){M=this._renderProperties[j];var A=(0,r.default)(this._options,M.options);A.format=="auto"&&(A.format=C()),this._errorHandler.wrapBarcodeCall(function(){var I=A.value,F=t.default[A.format.toUpperCase()],B=P(I,F,A);_(M,B,A)})}}},E.prototype.render=function(){if(!this._renderProperties)throw new g.NoElementException;if(Array.isArray(this._renderProperties))for(var M=0;M<this._renderProperties.length;M++)_(this._renderProperties[M],this._encodings,this._options);else _(this._renderProperties,this._encodings,this._options);return this},E.prototype._defaults=x.default;function _(M,j,A){j=(0,s.default)(j);for(var I=0;I<j.length;I++)j[I].options=(0,r.default)(A,j[I].options),(0,l.default)(j[I].options);(0,l.default)(A);var F=M.renderer,B=new F(M.element,j,A);B.render(),M.afterRender&&M.afterRender()}return typeof window<"u"&&(window.JsBarcode=b),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(M,j){var A=[];return jQuery(this).each(function(){A.push(this)}),b(A,M,j)}),Wi=b,Wi}var oo={exports:{}},io={exports:{}},oe={};/** @license React v16.13.1
91
+ */var RA={L:qt.QrCode.Ecc.LOW,M:qt.QrCode.Ecc.MEDIUM,Q:qt.QrCode.Ecc.QUARTILE,H:qt.QrCode.Ecc.HIGH},Fx=128,Vx="L",Bx="#FFFFFF",$x="#000000",Ux=!1,Gx=1,SA=4,CA=0,_A=.1;function zx(e,t=0){const n=[];return e.forEach(function(r,o){let i=null;r.forEach(function(c,l){if(!c&&i!==null){n.push(`M${i+t} ${o+t}h${l-i}v1H${i+t}z`),i=null;return}if(l===r.length-1){if(!c)return;i===null?n.push(`M${l+t},${o+t} h1v1H${l+t}z`):n.push(`M${i+t},${o+t} h${l+1-i}v1H${i+t}z`);return}c&&i===null&&(i=l)})}),n.join("")}function Hx(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,i)=>i<t.x||i>=t.x+t.w?o:!1))}function jA(e,t,n,r){if(r==null)return null;const o=e.length+n*2,i=Math.floor(t*_A),c=o/t,l=(r.width||i)*c,u=(r.height||i)*c,s=r.x==null?e.length/2-l/2:r.x*c,a=r.y==null?e.length/2-u/2:r.y*c,d=r.opacity==null?1:r.opacity;let f=null;if(r.excavate){let m=Math.floor(s),g=Math.floor(a),x=Math.ceil(l+s-m),y=Math.ceil(u+a-g);f={x:m,y:g,w:x,h:y}}const p=r.crossOrigin;return{x:s,y:a,h:u,w:l,excavation:f,opacity:d,crossOrigin:p}}function PA(e,t){return t!=null?Math.max(Math.floor(t),0):e?SA:CA}function Wx({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:i,size:c,boostLevel:l}){let u=S.useMemo(()=>{const m=(Array.isArray(e)?e:[e]).reduce((g,x)=>(g.push(...qt.QrSegment.makeSegments(x)),g),[]);return qt.QrCode.encodeSegments(m,RA[t],n,void 0,void 0,l)},[e,t,n,l]);const{cells:s,margin:a,numCells:d,calculatedImageSettings:f}=S.useMemo(()=>{let p=u.getModules();const m=PA(r,o),g=p.length+m*2,x=jA(p,c,m,i);return{cells:p,margin:m,numCells:g,calculatedImageSettings:x}},[u,c,i,r,o]);return{qrcode:u,margin:a,cells:s,numCells:d,calculatedImageSettings:f}}var TA=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),AA=S.forwardRef(function(t,n){const r=t,{value:o,size:i=Fx,level:c=Vx,bgColor:l=Bx,fgColor:u=$x,includeMargin:s=Ux,minVersion:a=Gx,boostLevel:d,marginSize:f,imageSettings:p}=r,g=Qs(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:x}=g,y=Qs(g,["style"]),E=p==null?void 0:p.src,b=S.useRef(null),w=S.useRef(null),R=S.useCallback(B=>{b.current=B,typeof n=="function"?n(B):n&&(n.current=B)},[n]),[_,j]=S.useState(!1),{margin:P,cells:T,numCells:C,calculatedImageSettings:O}=Wx({value:o,level:c,minVersion:a,boostLevel:d,includeMargin:s,marginSize:f,imageSettings:p,size:i});S.useEffect(()=>{if(b.current!=null){const B=b.current,q=B.getContext("2d");if(!q)return;let U=T;const G=w.current,$=O!=null&&G!==null&&G.complete&&G.naturalHeight!==0&&G.naturalWidth!==0;$&&O.excavation!=null&&(U=Hx(T,O.excavation));const V=window.devicePixelRatio||1;B.height=B.width=i*V;const A=i/C*V;q.scale(A,A),q.fillStyle=l,q.fillRect(0,0,C,C),q.fillStyle=u,TA?q.fill(new Path2D(zx(U,P))):T.forEach(function(F,Y){F.forEach(function(Q,X){Q&&q.fillRect(X+P,Y+P,1,1)})}),O&&(q.globalAlpha=O.opacity),$&&q.drawImage(G,O.x+P,O.y+P,O.w,O.h)}}),S.useEffect(()=>{j(!1)},[E]);const I=Zs({height:i,width:i},x);let k=null;return E!=null&&(k=S.createElement("img",{src:E,key:E,style:{display:"none"},onLoad:()=>{j(!0)},ref:w,crossOrigin:O==null?void 0:O.crossOrigin})),S.createElement(S.Fragment,null,S.createElement("canvas",Zs({style:I,height:i,width:i,ref:R,role:"img"},y)),k)});AA.displayName="QRCodeCanvas";var qx=S.forwardRef(function(t,n){const r=t,{value:o,size:i=Fx,level:c=Vx,bgColor:l=Bx,fgColor:u=$x,includeMargin:s=Ux,minVersion:a=Gx,boostLevel:d,title:f,marginSize:p,imageSettings:m}=r,g=Qs(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:x,cells:y,numCells:E,calculatedImageSettings:b}=Wx({value:o,level:c,minVersion:a,boostLevel:d,includeMargin:s,marginSize:p,imageSettings:m,size:i});let w=y,R=null;m!=null&&b!=null&&(b.excavation!=null&&(w=Hx(y,b.excavation)),R=S.createElement("image",{href:m.src,height:b.h,width:b.w,x:b.x+x,y:b.y+x,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const _=zx(w,x);return S.createElement("svg",Zs({height:i,width:i,viewBox:`0 0 ${E} ${E}`,ref:n,role:"img"},g),!!f&&S.createElement("title",null,f),S.createElement("path",{fill:l,d:`M0,0 h${E}v${E}H0z`,shapeRendering:"crispEdges"}),S.createElement("path",{fill:u,d:_,shapeRendering:"crispEdges"}),R)});qx.displayName="QRCodeSVG";const OA=e=>{const{value:t,className:n="",size:r=200,bgColor:o="#FFFFFF",fgColor:i="#000000",level:c="M",marginSize:l=4,imageSettings:u,...s}=e,a=M.classNames("flex items-center justify-center",n);return h.jsxRuntimeExports.jsx("div",{className:a,...s,children:h.jsxRuntimeExports.jsx(qx,{value:t,size:r,bgColor:o,fgColor:i,level:c,marginSize:l,imageSettings:u})})};var Rr={},xn={},Sr={},Cl;function Te(){if(Cl)return Sr;Cl=1,Object.defineProperty(Sr,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return Sr.default=t,Sr}var _l;function MA(){if(_l)return xn;_l=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.CODE39=void 0;var e=(function(){function g(x,y){for(var E=0;E<y.length;E++){var b=y[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,y,E){return y&&g(x.prototype,y),E&&g(x,E),x}})(),t=Te(),n=r(t);function r(g){return g&&g.__esModule?g:{default:g}}function o(g,x){if(!(g instanceof x))throw new TypeError("Cannot call a class as a function")}function i(g,x){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:g}function c(g,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);g.prototype=Object.create(x&&x.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(g,x):g.__proto__=x)}var l=(function(g){c(x,g);function x(y,E){return o(this,x),y=y.toUpperCase(),E.mod43&&(y+=f(m(y))),i(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,y,E))}return e(x,[{key:"encode",value:function(){for(var E=a("*"),b=0;b<this.data.length;b++)E+=a(this.data[b])+"0";return E+=a("*"),{data:E,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),x})(n.default),u=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],s=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(g){return d(p(g))}function d(g){return s[g].toString(2)}function f(g){return u[g]}function p(g){return u.indexOf(g)}function m(g){for(var x=0,y=0;y<g.length;y++)x+=p(g[y]);return x=x%43,x}return xn.CODE39=l,xn}var Le={},Cr={},_r={},le={},jl;function ir(){if(jl)return le;jl=1,Object.defineProperty(le,"__esModule",{value:!0});var e;function t(u,s,a){return s in u?Object.defineProperty(u,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):u[s]=a,u}var n=le.SET_A=0,r=le.SET_B=1,o=le.SET_C=2;le.SHIFT=98;var i=le.START_A=103,c=le.START_B=104,l=le.START_C=105;return le.MODULO=103,le.STOP=106,le.FNC1=207,le.SET_BY_CODE=(e={},t(e,i,n),t(e,c,r),t(e,l,o),e),le.SWAP={101:n,100:r,99:o},le.A_START_CHAR="Ð",le.B_START_CHAR="Ñ",le.C_START_CHAR="Ò",le.A_CHARS="[\0-_È-Ï]",le.B_CHARS="[ -È-Ï]",le.C_CHARS="(Ï*[0-9]{2}Ï*)",le.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],le}var Pl;function xi(){if(Pl)return _r;Pl=1,Object.defineProperty(_r,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=Te(),n=o(t),r=ir();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(d,f){i(this,a);var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,d.substring(1),f));return p.bytes=d.split("").map(function(m){return m.charCodeAt(0)}),p}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var f=this.bytes,p=f.shift()-105,m=r.SET_BY_CODE[p];if(m===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&f.unshift(r.FNC1);var g=a.next(f,1,m);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(p)+g.result+a.getBar((g.checksum+p)%r.MODULO)+a.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var f=this.options.ean128||!1;return typeof f=="string"&&(f=f.toLowerCase()==="true"),f}}],[{key:"getBar",value:function(f){return r.BARS[f]?r.BARS[f].toString():""}},{key:"correctIndex",value:function(f,p){if(p===r.SET_A){var m=f.shift();return m<32?m+64:m-32}else return p===r.SET_B?f.shift()-32:(f.shift()-48)*10+f.shift()-48}},{key:"next",value:function(f,p,m){if(!f.length)return{result:"",checksum:0};var g=void 0,x=void 0;if(f[0]>=200){x=f.shift()-105;var y=r.SWAP[x];y!==void 0?g=a.next(f,p+1,y):((m===r.SET_A||m===r.SET_B)&&x===r.SHIFT&&(f[0]=m===r.SET_A?f[0]>95?f[0]-96:f[0]:f[0]<32?f[0]+96:f[0]),g=a.next(f,p+1,m))}else x=a.correctIndex(f,m),g=a.next(f,p+1,m);var E=a.getBar(x),b=x*p;return{result:E+g.result,checksum:b+g.checksum}}}]),a})(n.default);return _r.default=u,_r}var jr={},Tl;function IA(){if(Tl)return jr;Tl=1,Object.defineProperty(jr,"__esModule",{value:!0});var e=ir(),t=function(l){return l.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(l){return l.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(l){return l.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(c,l){var u=l?e.A_CHARS:e.B_CHARS,s=c.match(new RegExp("^("+u+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(s)return s[1]+"Ì"+i(c.substring(s[1].length));var a=c.match(new RegExp("^"+u+"+"))[0];return a.length===c.length?c:a+String.fromCharCode(l?205:206)+o(c.substring(a.length),!l)}function i(c){var l=r(c),u=l.length;if(u===c.length)return c;c=c.substring(u);var s=t(c)>=n(c);return l+String.fromCharCode(s?206:205)+o(c,s)}return jr.default=function(c){var l=void 0,u=r(c).length;if(u>=2)l=e.C_START_CHAR+i(c);else{var s=t(c)>n(c);l=(s?e.A_START_CHAR:e.B_START_CHAR)+o(c,s)}return l.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,d){return"Ë"+d})},jr}var Al;function DA(){if(Al)return Cr;Al=1,Object.defineProperty(Cr,"__esModule",{value:!0});var e=xi(),t=o(e),n=IA(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(d,f){if(i(this,a),/^[\x00-\x7F\xC8-\xD3]+$/.test(d))var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,(0,r.default)(d),f));else var p=c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,d,f));return c(p)}return a})(t.default);return Cr.default=u,Cr}var Pr={},Ol;function NA(){if(Ol)return Pr;Ol=1,Object.defineProperty(Pr,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=xi(),n=o(t),r=ir();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(d,f){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.A_START_CHAR+d,f))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),a})(n.default);return Pr.default=u,Pr}var Tr={},Ml;function kA(){if(Ml)return Tr;Ml=1,Object.defineProperty(Tr,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=xi(),n=o(t),r=ir();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(d,f){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.B_START_CHAR+d,f))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),a})(n.default);return Tr.default=u,Tr}var Ar={},Il;function LA(){if(Il)return Ar;Il=1,Object.defineProperty(Ar,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=xi(),n=o(t),r=ir();function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(d,f){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,r.C_START_CHAR+d,f))}return e(a,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),a})(n.default);return Ar.default=u,Ar}var Dl;function FA(){if(Dl)return Le;Dl=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.CODE128C=Le.CODE128B=Le.CODE128A=Le.CODE128=void 0;var e=DA(),t=u(e),n=NA(),r=u(n),o=kA(),i=u(o),c=LA(),l=u(c);function u(s){return s&&s.__esModule?s:{default:s}}return Le.CODE128=t.default,Le.CODE128A=r.default,Le.CODE128B=i.default,Le.CODE128C=l.default,Le}var Ee={},Or={},Je={},Nl;function sr(){return Nl||(Nl=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.SIDE_BIN="101",Je.MIDDLE_BIN="01010",Je.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Je.EAN2_STRUCTURE=["LL","LG","GL","GG"],Je.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Je.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),Je}var Mr={},Ir={},kl;function ar(){if(kl)return Ir;kl=1,Object.defineProperty(Ir,"__esModule",{value:!0});var e=sr(),t=function(r,o,i){var c=r.split("").map(function(u,s){return e.BINARIES[o[s]]}).map(function(u,s){return u?u[r[s]]:""});if(i){var l=r.length-1;c=c.map(function(u,s){return s<l?u+i:u})}return c.join("")};return Ir.default=t,Ir}var Ll;function Kx(){if(Ll)return Mr;Ll=1,Object.defineProperty(Mr,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var g=p[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(f,g.key,g)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})(),t=sr(),n=ar(),r=c(n),o=Te(),i=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function l(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function u(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function s(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var a=(function(d){s(f,d);function f(p,m){l(this,f);var g=u(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m));return g.fontSize=!m.flat&&m.fontSize>m.width*10?m.width*10:m.fontSize,g.guardHeight=m.height+g.fontSize/2+m.textMargin,g}return e(f,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(m,g){return this.text.substr(m,g)}},{key:"leftEncode",value:function(m,g){return(0,r.default)(m,g)}},{key:"rightText",value:function(m,g){return this.text.substr(m,g)}},{key:"rightEncode",value:function(m,g){return(0,r.default)(m,g)}},{key:"encodeGuarded",value:function(){var m={fontSize:this.fontSize},g={height:this.guardHeight};return[{data:t.SIDE_BIN,options:g},{data:this.leftEncode(),text:this.leftText(),options:m},{data:t.MIDDLE_BIN,options:g},{data:this.rightEncode(),text:this.rightText(),options:m},{data:t.SIDE_BIN,options:g}]}},{key:"encodeFlat",value:function(){var m=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:m.join(""),text:this.text}}}]),f})(i.default);return Mr.default=a,Mr}var Fl;function VA(){if(Fl)return Or;Fl=1,Object.defineProperty(Or,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var g=p[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(f,g.key,g)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})(),t=function d(f,p,m){f===null&&(f=Function.prototype);var g=Object.getOwnPropertyDescriptor(f,p);if(g===void 0){var x=Object.getPrototypeOf(f);return x===null?void 0:d(x,p,m)}else{if("value"in g)return g.value;var y=g.get;return y===void 0?void 0:y.call(m)}},n=sr(),r=Kx(),o=i(r);function i(d){return d&&d.__esModule?d:{default:d}}function c(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function l(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function u(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var s=function(f){var p=f.substr(0,12).split("").map(function(m){return+m}).reduce(function(m,g,x){return x%2?m+g*3:m+g},0);return(10-p%10)%10},a=(function(d){u(f,d);function f(p,m){c(this,f),p.search(/^[0-9]{12}$/)!==-1&&(p+=s(p));var g=l(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m));return g.lastChar=m.lastChar,g}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===s(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var m=this.data.substr(1,6),g=n.EAN13_STRUCTURE[this.data[0]];return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,m,g)}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var m=this.data.substr(7,6);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,m,"RRRRRR")}},{key:"encodeGuarded",value:function(){var m=t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(m.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(m.push({data:"00"}),m.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),m}}]),f})(o.default);return Or.default=a,Or}var Dr={},Vl;function BA(){if(Vl)return Dr;Vl=1,Object.defineProperty(Dr,"__esModule",{value:!0});var e=(function(){function a(d,f){for(var p=0;p<f.length;p++){var m=f[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,f,p){return f&&a(d.prototype,f),p&&a(d,p),d}})(),t=function a(d,f,p){d===null&&(d=Function.prototype);var m=Object.getOwnPropertyDescriptor(d,f);if(m===void 0){var g=Object.getPrototypeOf(d);return g===null?void 0:a(g,f,p)}else{if("value"in m)return m.value;var x=m.get;return x===void 0?void 0:x.call(p)}},n=Kx(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(a,d){if(!(a instanceof d))throw new TypeError("Cannot call a class as a function")}function c(a,d){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:a}function l(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(a,d):a.__proto__=d)}var u=function(d){var f=d.substr(0,7).split("").map(function(p){return+p}).reduce(function(p,m,g){return g%2?p+m:p+m*3},0);return(10-f%10)%10},s=(function(a){l(d,a);function d(f,p){return i(this,d),f.search(/^[0-9]{7}$/)!==-1&&(f+=u(f)),c(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,f,p))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===u(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var p=this.data.substr(0,4);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,p,"LLLL")}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var p=this.data.substr(4,4);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,p,"RRRR")}}]),d})(r.default);return Dr.default=s,Dr}var Nr={},Bl;function $A(){if(Bl)return Nr;Bl=1,Object.defineProperty(Nr,"__esModule",{value:!0});var e=(function(){function f(p,m){for(var g=0;g<m.length;g++){var x=m[g];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(p,x.key,x)}}return function(p,m,g){return m&&f(p.prototype,m),g&&f(p,g),p}})(),t=sr(),n=ar(),r=c(n),o=Te(),i=c(o);function c(f){return f&&f.__esModule?f:{default:f}}function l(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function u(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function s(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var a=function(p){var m=p.split("").map(function(g){return+g}).reduce(function(g,x,y){return y%2?g+x*9:g+x*3},0);return m%10},d=(function(f){s(p,f);function p(m,g){return l(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,m,g))}return e(p,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var g=t.EAN5_STRUCTURE[a(this.data)];return{data:"1011"+(0,r.default)(this.data,g,"01"),text:this.text}}}]),p})(i.default);return Nr.default=d,Nr}var kr={},$l;function UA(){if($l)return kr;$l=1,Object.defineProperty(kr,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var g=p[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(f,g.key,g)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})(),t=sr(),n=ar(),r=c(n),o=Te(),i=c(o);function c(d){return d&&d.__esModule?d:{default:d}}function l(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function u(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function s(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var a=(function(d){s(f,d);function f(p,m){return l(this,f),u(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),f})(i.default);return kr.default=a,kr}var vn={},Ul;function Xx(){if(Ul)return vn;Ul=1,Object.defineProperty(vn,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var g=p[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(f,g.key,g)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})();vn.checksum=a;var t=ar(),n=i(t),r=Te(),o=i(r);function i(d){return d&&d.__esModule?d:{default:d}}function c(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function l(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function u(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var s=(function(d){u(f,d);function f(p,m){c(this,f),p.search(/^[0-9]{11}$/)!==-1&&(p+=a(p));var g=l(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m));return g.displayValue=m.displayValue,m.fontSize>m.width*10?g.fontSize=m.width*10:g.fontSize=m.fontSize,g.guardHeight=m.height+g.fontSize/2+m.textMargin,g}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var m="";return m+="101",m+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),m+="01010",m+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),m+="101",{data:m,text:this.text}}},{key:"guardedEncoding",value:function(){var m=[];return this.displayValue&&m.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),m.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),m.push({data:"01010",options:{height:this.guardHeight}}),m.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),m.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&m.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),m}}]),f})(o.default);function a(d){var f=0,p;for(p=1;p<11;p+=2)f+=parseInt(d[p]);for(p=0;p<11;p+=2)f+=parseInt(d[p])*3;return(10-f%10)%10}return vn.default=s,vn}var Lr={},Gl;function GA(){if(Gl)return Lr;Gl=1,Object.defineProperty(Lr,"__esModule",{value:!0});var e=(function(){function m(g,x){for(var y=0;y<x.length;y++){var E=x[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(g,E.key,E)}}return function(g,x,y){return x&&m(g.prototype,x),y&&m(g,y),g}})(),t=ar(),n=c(t),r=Te(),o=c(r),i=Xx();function c(m){return m&&m.__esModule?m:{default:m}}function l(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function u(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function s(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],d=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=(function(m){s(g,m);function g(x,y){l(this,g);var E=u(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,x,y));if(E.isValid=!1,x.search(/^[0-9]{6}$/)!==-1)E.middleDigits=x,E.upcA=p(x,"0"),E.text=y.text||""+E.upcA[0]+x+E.upcA[E.upcA.length-1],E.isValid=!0;else if(x.search(/^[01][0-9]{7}$/)!==-1)if(E.middleDigits=x.substring(1,x.length-1),E.upcA=p(E.middleDigits,x[0]),E.upcA[E.upcA.length-1]===x[x.length-1])E.isValid=!0;else return u(E);else return u(E);return E.displayValue=y.displayValue,y.fontSize>y.width*10?E.fontSize=y.width*10:E.fontSize=y.fontSize,E.guardHeight=y.height+E.fontSize/2+y.textMargin,E}return e(g,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var y="";return y+="101",y+=this.encodeMiddleDigits(),y+="010101",{data:y,text:this.text}}},{key:"guardedEncoding",value:function(){var y=[];return this.displayValue&&y.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),y.push({data:"101",options:{height:this.guardHeight}}),y.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),y.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&y.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),y}},{key:"encodeMiddleDigits",value:function(){var y=this.upcA[0],E=this.upcA[this.upcA.length-1],b=d[parseInt(E)][parseInt(y)];return(0,n.default)(this.middleDigits,b)}}]),g})(o.default);function p(m,g){for(var x=parseInt(m[m.length-1]),y=a[x],E="",b=0,w=0;w<y.length;w++){var R=y[w];R==="X"?E+=m[b++]:E+=R}return E=""+g+E,""+E+(0,i.checksum)(E)}return Lr.default=f,Lr}var zl;function zA(){if(zl)return Ee;zl=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UPCE=Ee.UPC=Ee.EAN2=Ee.EAN5=Ee.EAN8=Ee.EAN13=void 0;var e=VA(),t=f(e),n=BA(),r=f(n),o=$A(),i=f(o),c=UA(),l=f(c),u=Xx(),s=f(u),a=GA(),d=f(a);function f(p){return p&&p.__esModule?p:{default:p}}return Ee.EAN13=t.default,Ee.EAN8=r.default,Ee.EAN5=i.default,Ee.EAN2=l.default,Ee.UPC=s.default,Ee.UPCE=d.default,Ee}var bt={},Fr={},Vt={},Hl;function HA(){return Hl||(Hl=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.START_BIN="1010",Vt.END_BIN="11101",Vt.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),Vt}var Wl;function Yx(){if(Wl)return Fr;Wl=1,Object.defineProperty(Fr,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=HA(),n=Te(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return e(a,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var f=this,p=this.data.match(/.{2}/g).map(function(m){return f.encodePair(m)}).join("");return{data:t.START_BIN+p+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(f){var p=t.BINARIES[f[1]];return t.BINARIES[f[0]].split("").map(function(m,g){return(m==="1"?"111":"1")+(p[g]==="1"?"000":"0")}).join("")}}]),a})(r.default);return Fr.default=u,Fr}var Vr={},ql;function WA(){if(ql)return Vr;ql=1,Object.defineProperty(Vr,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=Yx(),n=r(t);function r(s){return s&&s.__esModule?s:{default:s}}function o(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function i(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function c(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=function(a){var d=a.substr(0,13).split("").map(function(f){return parseInt(f,10)}).reduce(function(f,p,m){return f+p*(3-m%2*2)},0);return Math.ceil(d/10)*10-d},u=(function(s){c(a,s);function a(d,f){return o(this,a),d.search(/^[0-9]{13}$/)!==-1&&(d+=l(d)),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,d,f))}return e(a,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===l(this.data)}}]),a})(n.default);return Vr.default=u,Vr}var Kl;function qA(){if(Kl)return bt;Kl=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.ITF14=bt.ITF=void 0;var e=Yx(),t=o(e),n=WA(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return bt.ITF=t.default,bt.ITF14=r.default,bt}var Ce={},Br={},Xl;function cr(){if(Xl)return Br;Xl=1,Object.defineProperty(Br,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=Te(),n=r(t);function r(s){return s&&s.__esModule?s:{default:s}}function o(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function i(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function c(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var l=(function(s){c(a,s);function a(d,f){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,d,f))}return e(a,[{key:"encode",value:function(){for(var f="110",p=0;p<this.data.length;p++){var m=parseInt(this.data[p]),g=m.toString(2);g=u(g,4-g.length);for(var x=0;x<g.length;x++)f+=g[x]=="0"?"100":"110"}return f+="1001",{data:f,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),a})(n.default);function u(s,a){for(var d=0;d<a;d++)s="0"+s;return s}return Br.default=l,Br}var $r={},yn={},Yl;function vi(){if(Yl)return yn;Yl=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.mod10=e,yn.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var i=parseInt(n[o]);(o+n.length)%2===0?r+=i:r+=i*2%10+Math.floor(i*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],i=0;i<n.length;i++){var c=parseInt(n[n.length-1-i]);r+=o[i%o.length]*c}return(11-r%11)%11}return yn}var Zl;function KA(){if(Zl)return $r;Zl=1,Object.defineProperty($r,"__esModule",{value:!0});var e=cr(),t=r(e),n=vi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a+(0,n.mod10)(a),d))}return s})(t.default);return $r.default=l,$r}var Ur={},Ql;function XA(){if(Ql)return Ur;Ql=1,Object.defineProperty(Ur,"__esModule",{value:!0});var e=cr(),t=r(e),n=vi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a+(0,n.mod11)(a),d))}return s})(t.default);return Ur.default=l,Ur}var Gr={},Jl;function YA(){if(Jl)return Gr;Jl=1,Object.defineProperty(Gr,"__esModule",{value:!0});var e=cr(),t=r(e),n=vi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){return o(this,s),a+=(0,n.mod10)(a),a+=(0,n.mod10)(a),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,d))}return s})(t.default);return Gr.default=l,Gr}var zr={},ed;function ZA(){if(ed)return zr;ed=1,Object.defineProperty(zr,"__esModule",{value:!0});var e=cr(),t=r(e),n=vi();function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){return o(this,s),a+=(0,n.mod11)(a),a+=(0,n.mod10)(a),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,d))}return s})(t.default);return zr.default=l,zr}var td;function QA(){if(td)return Ce;td=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.MSI1110=Ce.MSI1010=Ce.MSI11=Ce.MSI10=Ce.MSI=void 0;var e=cr(),t=a(e),n=KA(),r=a(n),o=XA(),i=a(o),c=YA(),l=a(c),u=ZA(),s=a(u);function a(d){return d&&d.__esModule?d:{default:d}}return Ce.MSI=t.default,Ce.MSI10=r.default,Ce.MSI11=i.default,Ce.MSI1010=l.default,Ce.MSI1110=s.default,Ce}var En={},nd;function JA(){if(nd)return En;nd=1,Object.defineProperty(En,"__esModule",{value:!0}),En.pharmacode=void 0;var e=(function(){function u(s,a){for(var d=0;d<a.length;d++){var f=a[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,a,d){return a&&u(s.prototype,a),d&&u(s,d),s}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){o(this,s);var f=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,d));return f.number=parseInt(a,10),f}return e(s,[{key:"encode",value:function(){for(var d=this.number,f="";!isNaN(d)&&d!=0;)d%2===0?(f="11100"+f,d=(d-2)/2):(f="100"+f,d=(d-1)/2);return f=f.slice(0,-2),{data:f,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),s})(n.default);return En.pharmacode=l,En}var bn={},rd;function eO(){if(rd)return bn;rd=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.codabar=void 0;var e=(function(){function u(s,a){for(var d=0;d<a.length;d++){var f=a[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,a,d){return a&&u(s.prototype,a),d&&u(s,d),s}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){o(this,s),a.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(a="A"+a+"A");var f=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a.toUpperCase(),d));return f.text=f.options.text||f.text.replace(/[A-D]/g,""),f}return e(s,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var d=[],f=this.getEncodings(),p=0;p<this.data.length;p++)d.push(f[this.data.charAt(p)]),p!==this.data.length-1&&d.push("0");return{text:this.text,data:d.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),s})(n.default);return bn.codabar=l,bn}var wt={},Hr={},Bt={},od;function tO(){return od||(od=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Bt.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Bt.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),Bt}var id;function Zx(){if(id)return Hr;id=1,Object.defineProperty(Hr,"__esModule",{value:!0});var e=(function(){function s(a,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,p.key,p)}}return function(a,d,f){return d&&s(a.prototype,d),f&&s(a,f),a}})(),t=tO(),n=Te(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function c(s,a){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:s}function l(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(s,a):s.__proto__=a)}var u=(function(s){l(a,s);function a(d,f){return i(this,a),c(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,d,f))}return e(a,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var f=this.data.split("").flatMap(function(x){return t.MULTI_SYMBOLS[x]||x}),p=f.map(function(x){return a.getEncoding(x)}).join(""),m=a.checksum(f,20),g=a.checksum(f.concat(m),15);return{text:this.text,data:a.getEncoding("ÿ")+p+a.getEncoding(m)+a.getEncoding(g)+a.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(f){return t.BINARIES[a.symbolValue(f)]}},{key:"getSymbol",value:function(f){return t.SYMBOLS[f]}},{key:"symbolValue",value:function(f){return t.SYMBOLS.indexOf(f)}},{key:"checksum",value:function(f,p){var m=f.slice().reverse().reduce(function(g,x,y){var E=y%p+1;return g+a.symbolValue(x)*E},0);return a.getSymbol(m%47)}}]),a})(r.default);return Hr.default=u,Hr}var Wr={},sd;function nO(){if(sd)return Wr;sd=1,Object.defineProperty(Wr,"__esModule",{value:!0});var e=(function(){function u(s,a){for(var d=0;d<a.length;d++){var f=a[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,a,d){return a&&u(s.prototype,a),d&&u(s,d),s}})(),t=Zx(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,d))}return e(s,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),s})(n.default);return Wr.default=l,Wr}var ad;function rO(){if(ad)return wt;ad=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.CODE93FullASCII=wt.CODE93=void 0;var e=Zx(),t=o(e),n=nO(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return wt.CODE93=t.default,wt.CODE93FullASCII=r.default,wt}var wn={},cd;function oO(){if(cd)return wn;cd=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.GenericBarcode=void 0;var e=(function(){function u(s,a){for(var d=0;d<a.length;d++){var f=a[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,a,d){return a&&u(s.prototype,a),d&&u(s,d),s}})(),t=Te(),n=r(t);function r(u){return u&&u.__esModule?u:{default:u}}function o(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function i(u,s){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:u}function c(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(u,s):u.__proto__=s)}var l=(function(u){c(s,u);function s(a,d){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a,d))}return e(s,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),s})(n.default);return wn.GenericBarcode=l,wn}var ud;function iO(){if(ud)return Rr;ud=1,Object.defineProperty(Rr,"__esModule",{value:!0});var e=MA(),t=FA(),n=zA(),r=qA(),o=QA(),i=JA(),c=eO(),l=rO(),u=oO();return Rr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:i.pharmacode,codabar:c.codabar,CODE93:l.CODE93,CODE93FullASCII:l.CODE93FullASCII,GenericBarcode:u.GenericBarcode},Rr}var qr={},ld;function yi(){if(ld)return qr;ld=1,Object.defineProperty(qr,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return qr.default=function(t,n){return e({},t,n)},qr}var Kr={},dd;function sO(){if(dd)return Kr;dd=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var i=0;i<o.length;i++)r(o[i]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return Kr}var Xr={},fd;function aO(){if(fd)return Xr;fd=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return Xr}var Yr={},Zr={},Qr={},hd;function Qx(){if(hd)return Qr;hd=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return Qr}var Jr={},pd;function Jx(){if(pd)return Jr;pd=1,Object.defineProperty(Jr,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return Jr.default=e,Jr}var md;function cO(){if(md)return Zr;md=1,Object.defineProperty(Zr,"__esModule",{value:!0});var e=Qx(),t=o(e),n=Jx(),r=o(n);function o(c){return c&&c.__esModule?c:{default:c}}function i(c){var l={};for(var u in r.default)r.default.hasOwnProperty(u)&&(c.hasAttribute("jsbarcode-"+u.toLowerCase())&&(l[u]=c.getAttribute("jsbarcode-"+u.toLowerCase())),c.hasAttribute("data-"+u.toLowerCase())&&(l[u]=c.getAttribute("data-"+u.toLowerCase())));return l.value=c.getAttribute("jsbarcode-value")||c.getAttribute("data-value"),l=(0,t.default)(l),l}return Zr.default=i,Zr}var eo={},to={},_e={},gd;function ev(){if(gd)return _e;gd=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getTotalWidthOfEncodings=_e.calculateEncodingAttributes=_e.getBarcodePadding=_e.getEncodingHeight=_e.getMaximumHeightOfEncodings=void 0;var e=yi(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}function r(s,a){return a.height+(a.displayValue&&s.text.length>0?a.fontSize+a.textMargin:0)+a.marginTop+a.marginBottom}function o(s,a,d){if(d.displayValue&&a<s){if(d.textAlign=="center")return Math.floor((s-a)/2);if(d.textAlign=="left")return 0;if(d.textAlign=="right")return Math.floor(s-a)}return 0}function i(s,a,d){for(var f=0;f<s.length;f++){var p=s[f],m=(0,t.default)(a,p.options),g;m.displayValue?g=u(p.text,m,d):g=0;var x=p.data.length*m.width;p.width=Math.ceil(Math.max(g,x)),p.height=r(p,m),p.barcodePadding=o(g,x,m)}}function c(s){for(var a=0,d=0;d<s.length;d++)a+=s[d].width;return a}function l(s){for(var a=0,d=0;d<s.length;d++)s[d].height>a&&(a=s[d].height);return a}function u(s,a,d){var f;if(d)f=d;else if(typeof document<"u")f=document.createElement("canvas").getContext("2d");else return 0;f.font=a.fontOptions+" "+a.fontSize+"px "+a.font;var p=f.measureText(s);if(!p)return 0;var m=p.width;return m}return _e.getMaximumHeightOfEncodings=l,_e.getEncodingHeight=r,_e.getBarcodePadding=o,_e.calculateEncodingAttributes=i,_e.getTotalWidthOfEncodings=c,_e}var xd;function uO(){if(xd)return to;xd=1,Object.defineProperty(to,"__esModule",{value:!0});var e=(function(){function l(u,s){for(var a=0;a<s.length;a++){var d=s[a];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}return function(u,s,a){return s&&l(u.prototype,s),a&&l(u,a),u}})(),t=yi(),n=o(t),r=ev();function o(l){return l&&l.__esModule?l:{default:l}}function i(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var c=(function(){function l(u,s,a){i(this,l),this.canvas=u,this.encodings=s,this.options=a}return e(l,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var s=0;s<this.encodings.length;s++){var a=(0,n.default)(this.options,this.encodings[s].options);this.drawCanvasBarcode(a,this.encodings[s]),this.drawCanvasText(a,this.encodings[s]),this.moveCanvasDrawing(this.encodings[s])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var s=this.canvas.getContext("2d");s.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,s);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),d=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=d,s.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(s.fillStyle=this.options.background,s.fillRect(0,0,this.canvas.width,this.canvas.height)),s.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(s,a){var d=this.canvas.getContext("2d"),f=a.data,p;s.textPosition=="top"?p=s.marginTop+s.fontSize+s.textMargin:p=s.marginTop,d.fillStyle=s.lineColor;for(var m=0;m<f.length;m++){var g=m*s.width+a.barcodePadding;f[m]==="1"?d.fillRect(g,p,s.width,s.height):f[m]&&d.fillRect(g,p,s.width,s.height*f[m])}}},{key:"drawCanvasText",value:function(s,a){var d=this.canvas.getContext("2d"),f=s.fontOptions+" "+s.fontSize+"px "+s.font;if(s.displayValue){var p,m;s.textPosition=="top"?m=s.marginTop+s.fontSize-s.textMargin:m=s.height+s.textMargin+s.marginTop+s.fontSize,d.font=f,s.textAlign=="left"||a.barcodePadding>0?(p=0,d.textAlign="left"):s.textAlign=="right"?(p=a.width-1,d.textAlign="right"):(p=a.width/2,d.textAlign="center"),d.fillText(a.text,p,m)}}},{key:"moveCanvasDrawing",value:function(s){var a=this.canvas.getContext("2d");a.translate(s.width,0)}},{key:"restoreCanvas",value:function(){var s=this.canvas.getContext("2d");s.restore()}}]),l})();return to.default=c,to}var no={},vd;function lO(){if(vd)return no;vd=1,Object.defineProperty(no,"__esModule",{value:!0});var e=(function(){function u(s,a){for(var d=0;d<a.length;d++){var f=a[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,f.key,f)}}return function(s,a,d){return a&&u(s.prototype,a),d&&u(s,d),s}})(),t=yi(),n=o(t),r=ev();function o(u){return u&&u.__esModule?u:{default:u}}function i(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}var c="http://www.w3.org/2000/svg",l=(function(){function u(s,a,d){i(this,u),this.svg=s,this.encodings=a,this.options=d,this.document=d.xmlDocument||document}return e(u,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var d=0;d<this.encodings.length;d++){var f=this.encodings[d],p=(0,n.default)(this.options,f.options),m=this.createGroup(a,p.marginTop,this.svg);this.setGroupOptions(m,p),this.drawSvgBarcode(m,p,f),this.drawSVGText(m,p,f),a+=f.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),d=(0,r.getMaximumHeightOfEncodings)(this.encodings),f=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(f,d),this.options.background&&this.drawRect(0,0,f,d,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,d,f){var p=f.data,m;d.textPosition=="top"?m=d.fontSize+d.textMargin:m=0;for(var g=0,x=0,y=0;y<p.length;y++)x=y*d.width+f.barcodePadding,p[y]==="1"?g++:g>0&&(this.drawRect(x-d.width*g,m,d.width*g,d.height,a),g=0);g>0&&this.drawRect(x-d.width*(g-1),m,d.width*g,d.height,a)}},{key:"drawSVGText",value:function(a,d,f){var p=this.document.createElementNS(c,"text");if(d.displayValue){var m,g;p.setAttribute("font-family",d.font),p.setAttribute("font-size",d.fontSize),d.fontOptions.includes("bold")&&p.setAttribute("font-weight","bold"),d.fontOptions.includes("italic")&&p.setAttribute("font-style","italic"),d.textPosition=="top"?g=d.fontSize-d.textMargin:g=d.height+d.textMargin+d.fontSize,d.textAlign=="left"||f.barcodePadding>0?(m=0,p.setAttribute("text-anchor","start")):d.textAlign=="right"?(m=f.width-1,p.setAttribute("text-anchor","end")):(m=f.width/2,p.setAttribute("text-anchor","middle")),p.setAttribute("x",m),p.setAttribute("y",g),p.appendChild(this.document.createTextNode(f.text)),a.appendChild(p)}}},{key:"setSvgAttributes",value:function(a,d){var f=this.svg;f.setAttribute("width",a+"px"),f.setAttribute("height",d+"px"),f.setAttribute("x","0px"),f.setAttribute("y","0px"),f.setAttribute("viewBox","0 0 "+a+" "+d),f.setAttribute("xmlns",c),f.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,d,f){var p=this.document.createElementNS(c,"g");return p.setAttribute("transform","translate("+a+", "+d+")"),f.appendChild(p),p}},{key:"setGroupOptions",value:function(a,d){a.setAttribute("fill",d.lineColor)}},{key:"drawRect",value:function(a,d,f,p,m){var g=this.document.createElementNS(c,"rect");return g.setAttribute("x",a),g.setAttribute("y",d),g.setAttribute("width",f),g.setAttribute("height",p),m.appendChild(g),g}}]),u})();return no.default=l,no}var ro={},yd;function dO(){if(yd)return ro;yd=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var c=0;c<i.length;c++){var l=i[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,c){return i&&r(o.prototype,i),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,i,c){t(this,r),this.object=o,this.encodings=i,this.options=c}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return ro.default=n,ro}var Ed;function fO(){if(Ed)return eo;Ed=1,Object.defineProperty(eo,"__esModule",{value:!0});var e=uO(),t=c(e),n=lO(),r=c(n),o=dO(),i=c(o);function c(l){return l&&l.__esModule?l:{default:l}}return eo.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:i.default},eo}var $t={},bd;function tv(){if(bd)return $t;bd=1,Object.defineProperty($t,"__esModule",{value:!0});function e(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function t(c,l){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:c}function n(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}var r=(function(c){n(l,c);function l(u,s){e(this,l);var a=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.name="InvalidInputException",a.symbology=u,a.input=s,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return l})(Error),o=(function(c){n(l,c);function l(){e(this,l);var u=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return u.name="InvalidElementException",u.message="Not supported type to render on",u}return l})(Error),i=(function(c){n(l,c);function l(){e(this,l);var u=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return u.name="NoElementException",u.message="No element to render on.",u}return l})(Error);return $t.InvalidInputException=r,$t.InvalidElementException=o,$t.NoElementException=i,$t}var wd;function hO(){if(wd)return Yr;wd=1,Object.defineProperty(Yr,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t=cO(),n=c(t),r=fO(),o=c(r),i=tv();function c(a){return a&&a.__esModule?a:{default:a}}function l(a){if(typeof a=="string")return u(a);if(Array.isArray(a)){for(var d=[],f=0;f<a.length;f++)d.push(l(a[f]));return d}else{if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLImageElement)return s(a);if(a&&a.nodeName&&a.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&a instanceof SVGElement)return{element:a,options:(0,n.default)(a),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&a instanceof HTMLCanvasElement)return{element:a,options:(0,n.default)(a),renderer:o.default.CanvasRenderer};if(a&&a.getContext)return{element:a,renderer:o.default.CanvasRenderer};if(a&&(typeof a>"u"?"undefined":e(a))==="object"&&!a.nodeName)return{element:a,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}}function u(a){var d=document.querySelectorAll(a);if(d.length!==0){for(var f=[],p=0;p<d.length;p++)f.push(l(d[p]));return f}}function s(a){var d=document.createElement("canvas");return{element:d,options:(0,n.default)(a),renderer:o.default.CanvasRenderer,afterRender:function(){a.setAttribute("src",d.toDataURL())}}}return Yr.default=l,Yr}var oo={},Rd;function pO(){if(Rd)return oo;Rd=1,Object.defineProperty(oo,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var c=0;c<i.length;c++){var l=i[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,i,c){return i&&r(o.prototype,i),c&&r(o,c),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(i){if(i.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw i.message;else throw i;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(i){try{var c=i.apply(void 0,arguments);return this.api._options.valid(!0),c}catch(l){return this.handleCatch(l),this.api}}}]),r})();return oo.default=n,oo}var Zi,Sd;function mO(){if(Sd)return Zi;Sd=1;var e=iO(),t=y(e),n=yi(),r=y(n),o=sO(),i=y(o),c=aO(),l=y(c),u=hO(),s=y(u),a=Qx(),d=y(a),f=pO(),p=y(f),m=tv(),g=Jx(),x=y(g);function y(T){return T&&T.__esModule?T:{default:T}}var E=function(){},b=function(C,O,I){var k=new E;if(typeof C>"u")throw Error("No element to render on was provided.");return k._renderProperties=(0,s.default)(C),k._encodings=[],k._options=x.default,k._errorHandler=new p.default(k),typeof O<"u"&&(I=I||{},I.format||(I.format=j()),k.options(I)[I.format](O,I).render()),k};b.getModule=function(T){return t.default[T]};for(var w in t.default)t.default.hasOwnProperty(w)&&R(t.default,w);function R(T,C){E.prototype[C]=E.prototype[C.toUpperCase()]=E.prototype[C.toLowerCase()]=function(O,I){var k=this;return k._errorHandler.wrapBarcodeCall(function(){I.text=typeof I.text>"u"?void 0:""+I.text;var B=(0,r.default)(k._options,I);B=(0,d.default)(B);var q=T[C],U=_(O,q,B);return k._encodings.push(U),k})}}function _(T,C,O){T=""+T;var I=new C(T,O);if(!I.valid())throw new m.InvalidInputException(I.constructor.name,T);var k=I.encode();k=(0,i.default)(k);for(var B=0;B<k.length;B++)k[B].options=(0,r.default)(O,k[B].options);return k}function j(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}E.prototype.options=function(T){return this._options=(0,r.default)(this._options,T),this},E.prototype.blank=function(T){var C=new Array(T+1).join("0");return this._encodings.push({data:C}),this},E.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var T;for(var C in this._renderProperties){T=this._renderProperties[C];var O=(0,r.default)(this._options,T.options);O.format=="auto"&&(O.format=j()),this._errorHandler.wrapBarcodeCall(function(){var I=O.value,k=t.default[O.format.toUpperCase()],B=_(I,k,O);P(T,B,O)})}}},E.prototype.render=function(){if(!this._renderProperties)throw new m.NoElementException;if(Array.isArray(this._renderProperties))for(var T=0;T<this._renderProperties.length;T++)P(this._renderProperties[T],this._encodings,this._options);else P(this._renderProperties,this._encodings,this._options);return this},E.prototype._defaults=x.default;function P(T,C,O){C=(0,i.default)(C);for(var I=0;I<C.length;I++)C[I].options=(0,r.default)(O,C[I].options),(0,l.default)(C[I].options);(0,l.default)(O);var k=T.renderer,B=new k(T.element,C,O);B.render(),T.afterRender&&T.afterRender()}return typeof window<"u"&&(window.JsBarcode=b),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(T,C){var O=[];return jQuery(this).each(function(){O.push(this)}),b(O,T,C)}),Zi=b,Zi}var io={exports:{}},so={exports:{}},oe={};/** @license React v16.13.1
92
92
  * react-is.production.min.js
93
93
  *
94
94
  * Copyright (c) Facebook, Inc. and its affiliates.
95
95
  *
96
96
  * This source code is licensed under the MIT license found in the
97
97
  * LICENSE file in the root directory of this source tree.
98
- */var Ef;function GA(){if(Ef)return oe;Ef=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,i=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var P=w.$$typeof;switch(P){case t:switch(w=w.type,w){case u:case i:case r:case s:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case l:case a:case g:case p:case c:return w;default:return P}}case n:return P}}}function R(w){return b(w)===i}return oe.AsyncMode=u,oe.ConcurrentMode=i,oe.ContextConsumer=l,oe.ContextProvider=c,oe.Element=t,oe.ForwardRef=a,oe.Fragment=r,oe.Lazy=g,oe.Memo=p,oe.Portal=n,oe.Profiler=s,oe.StrictMode=o,oe.Suspense=f,oe.isAsyncMode=function(w){return R(w)||b(w)===u},oe.isConcurrentMode=R,oe.isContextConsumer=function(w){return b(w)===l},oe.isContextProvider=function(w){return b(w)===c},oe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},oe.isForwardRef=function(w){return b(w)===a},oe.isFragment=function(w){return b(w)===r},oe.isLazy=function(w){return b(w)===g},oe.isMemo=function(w){return b(w)===p},oe.isPortal=function(w){return b(w)===n},oe.isProfiler=function(w){return b(w)===s},oe.isStrictMode=function(w){return b(w)===o},oe.isSuspense=function(w){return b(w)===f},oe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===s||w===o||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===c||w.$$typeof===l||w.$$typeof===a||w.$$typeof===x||w.$$typeof===y||w.$$typeof===E||w.$$typeof===m)},oe.typeOf=b,oe}var ie={};/** @license React v16.13.1
98
+ */var Cd;function gO(){if(Cd)return oe;Cd=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(R){if(typeof R=="object"&&R!==null){var _=R.$$typeof;switch(_){case t:switch(R=R.type,R){case u:case s:case r:case i:case o:case d:return R;default:switch(R=R&&R.$$typeof,R){case l:case a:case m:case p:case c:return R;default:return _}}case n:return _}}}function w(R){return b(R)===s}return oe.AsyncMode=u,oe.ConcurrentMode=s,oe.ContextConsumer=l,oe.ContextProvider=c,oe.Element=t,oe.ForwardRef=a,oe.Fragment=r,oe.Lazy=m,oe.Memo=p,oe.Portal=n,oe.Profiler=i,oe.StrictMode=o,oe.Suspense=d,oe.isAsyncMode=function(R){return w(R)||b(R)===u},oe.isConcurrentMode=w,oe.isContextConsumer=function(R){return b(R)===l},oe.isContextProvider=function(R){return b(R)===c},oe.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===t},oe.isForwardRef=function(R){return b(R)===a},oe.isFragment=function(R){return b(R)===r},oe.isLazy=function(R){return b(R)===m},oe.isMemo=function(R){return b(R)===p},oe.isPortal=function(R){return b(R)===n},oe.isProfiler=function(R){return b(R)===i},oe.isStrictMode=function(R){return b(R)===o},oe.isSuspense=function(R){return b(R)===d},oe.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===r||R===s||R===i||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===m||R.$$typeof===p||R.$$typeof===c||R.$$typeof===l||R.$$typeof===a||R.$$typeof===x||R.$$typeof===y||R.$$typeof===E||R.$$typeof===g)},oe.typeOf=b,oe}var ie={};/** @license React v16.13.1
99
99
  * react-is.development.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var bf;function HA(){return bf||(bf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,i=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(D){return typeof D=="string"||typeof D=="function"||D===r||D===i||D===s||D===o||D===f||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===p||D.$$typeof===c||D.$$typeof===l||D.$$typeof===a||D.$$typeof===x||D.$$typeof===y||D.$$typeof===E||D.$$typeof===m)}function R(D){if(typeof D=="object"&&D!==null){var ae=D.$$typeof;switch(ae){case t:var ve=D.type;switch(ve){case u:case i:case r:case s:case o:case f:return ve;default:var rt=ve&&ve.$$typeof;switch(rt){case l:case a:case g:case p:case c:return rt;default:return ae}}case n:return ae}}}var w=u,P=i,C=l,_=c,M=t,j=a,A=r,I=g,F=p,B=n,q=s,U=o,G=f,$=!1;function V(D){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(D)||R(D)===u}function T(D){return R(D)===i}function L(D){return R(D)===l}function Y(D){return R(D)===c}function Q(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function X(D){return R(D)===a}function ee(D){return R(D)===r}function Z(D){return R(D)===g}function k(D){return R(D)===p}function W(D){return R(D)===n}function K(D){return R(D)===s}function z(D){return R(D)===o}function J(D){return R(D)===f}ie.AsyncMode=w,ie.ConcurrentMode=P,ie.ContextConsumer=C,ie.ContextProvider=_,ie.Element=M,ie.ForwardRef=j,ie.Fragment=A,ie.Lazy=I,ie.Memo=F,ie.Portal=B,ie.Profiler=q,ie.StrictMode=U,ie.Suspense=G,ie.isAsyncMode=V,ie.isConcurrentMode=T,ie.isContextConsumer=L,ie.isContextProvider=Y,ie.isElement=Q,ie.isForwardRef=X,ie.isFragment=ee,ie.isLazy=Z,ie.isMemo=k,ie.isPortal=W,ie.isProfiler=K,ie.isStrictMode=z,ie.isSuspense=J,ie.isValidElementType=b,ie.typeOf=R})()),ie}var wf;function Gx(){return wf||(wf=1,process.env.NODE_ENV==="production"?io.exports=GA():io.exports=HA()),io.exports}/*
105
+ */var _d;function xO(){return _d||(_d=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(D){return typeof D=="string"||typeof D=="function"||D===r||D===s||D===i||D===o||D===d||D===f||typeof D=="object"&&D!==null&&(D.$$typeof===m||D.$$typeof===p||D.$$typeof===c||D.$$typeof===l||D.$$typeof===a||D.$$typeof===x||D.$$typeof===y||D.$$typeof===E||D.$$typeof===g)}function w(D){if(typeof D=="object"&&D!==null){var ae=D.$$typeof;switch(ae){case t:var ye=D.type;switch(ye){case u:case s:case r:case i:case o:case d:return ye;default:var ot=ye&&ye.$$typeof;switch(ot){case l:case a:case m:case p:case c:return ot;default:return ae}}case n:return ae}}}var R=u,_=s,j=l,P=c,T=t,C=a,O=r,I=m,k=p,B=n,q=i,U=o,G=d,$=!1;function V(D){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(D)||w(D)===u}function A(D){return w(D)===s}function F(D){return w(D)===l}function Y(D){return w(D)===c}function Q(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function X(D){return w(D)===a}function ee(D){return w(D)===r}function Z(D){return w(D)===m}function L(D){return w(D)===p}function W(D){return w(D)===n}function K(D){return w(D)===i}function H(D){return w(D)===o}function J(D){return w(D)===d}ie.AsyncMode=R,ie.ConcurrentMode=_,ie.ContextConsumer=j,ie.ContextProvider=P,ie.Element=T,ie.ForwardRef=C,ie.Fragment=O,ie.Lazy=I,ie.Memo=k,ie.Portal=B,ie.Profiler=q,ie.StrictMode=U,ie.Suspense=G,ie.isAsyncMode=V,ie.isConcurrentMode=A,ie.isContextConsumer=F,ie.isContextProvider=Y,ie.isElement=Q,ie.isForwardRef=X,ie.isFragment=ee,ie.isLazy=Z,ie.isMemo=L,ie.isPortal=W,ie.isProfiler=K,ie.isStrictMode=H,ie.isSuspense=J,ie.isValidElementType=b,ie.typeOf=w})()),ie}var jd;function nv(){return jd||(jd=1,process.env.NODE_ENV==="production"?so.exports=gO():so.exports=xO()),so.exports}/*
106
106
  object-assign
107
107
  (c) Sindre Sorhus
108
108
  @license MIT
109
- */var qi,Rf;function zA(){if(Rf)return qi;Rf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var c={},l=0;l<10;l++)c["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(c).map(function(a){return c[a]});if(u.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qi=o()?Object.assign:function(s,c){for(var l,u=r(s),i,a=1;a<arguments.length;a++){l=Object(arguments[a]);for(var f in l)t.call(l,f)&&(u[f]=l[f]);if(e){i=e(l);for(var d=0;d<i.length;d++)n.call(l,i[d])&&(u[i[d]]=l[i[d]])}}return u},qi}var Ki,Sf;function xc(){if(Sf)return Ki;Sf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ki=e,Ki}var Xi,Cf;function Hx(){return Cf||(Cf=1,Xi=Function.call.bind(Object.prototype.hasOwnProperty)),Xi}var Yi,_f;function WA(){if(_f)return Yi;_f=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=xc(),n={},r=Hx();e=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(s,c,l,u,i){if(process.env.NODE_ENV!=="production"){for(var a in s)if(r(s,a)){var f;try{if(typeof s[a]!="function"){var d=Error((u||"React class")+": "+l+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[a](c,a,u,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=i?i():"";e("Failed "+l+" type: "+f.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yi=o,Yi}var Zi,jf;function qA(){if(jf)return Zi;jf=1;var e=Gx(),t=zA(),n=xc(),r=Hx(),o=WA(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function c(){return null}return Zi=function(l,u){var i=typeof Symbol=="function"&&Symbol.iterator,a="@@iterator";function f(T){var L=T&&(i&&T[i]||T[a]);if(typeof L=="function")return L}var d="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:b,element:R(),elementType:w(),instanceOf:P,node:j(),objectOf:_,oneOf:C,oneOfType:M,shape:I,exact:F};function g(T,L){return T===L?T!==0||1/T===1/L:T!==T&&L!==L}function m(T,L){this.message=T,this.data=L&&typeof L=="object"?L:{},this.stack=""}m.prototype=Error.prototype;function x(T){if(process.env.NODE_ENV!=="production")var L={},Y=0;function Q(ee,Z,k,W,K,z,J){if(W=W||d,z=z||k,J!==n){if(u){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=W+":"+k;!L[ae]&&Y<3&&(s("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ae]=!0,Y++)}}return Z[k]==null?ee?Z[k]===null?new m("The "+K+" `"+z+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+K+" `"+z+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:T(Z,k,W,K,z)}var X=Q.bind(null,!1);return X.isRequired=Q.bind(null,!0),X}function y(T){function L(Y,Q,X,ee,Z,k){var W=Y[Q],K=U(W);if(K!==T){var z=G(W);return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+z+"` supplied to `"+X+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return x(L)}function E(){return x(c)}function b(T){function L(Y,Q,X,ee,Z){if(typeof T!="function")return new m("Property `"+Z+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var k=Y[Q];if(!Array.isArray(k)){var W=U(k);return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an array."))}for(var K=0;K<k.length;K++){var z=T(k,K,X,ee,Z+"["+K+"]",n);if(z instanceof Error)return z}return null}return x(L)}function R(){function T(L,Y,Q,X,ee){var Z=L[Y];if(!l(Z)){var k=U(Z);return new m("Invalid "+X+" `"+ee+"` of type "+("`"+k+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return x(T)}function w(){function T(L,Y,Q,X,ee){var Z=L[Y];if(!e.isValidElementType(Z)){var k=U(Z);return new m("Invalid "+X+" `"+ee+"` of type "+("`"+k+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return x(T)}function P(T){function L(Y,Q,X,ee,Z){if(!(Y[Q]instanceof T)){var k=T.name||d,W=V(Y[Q]);return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected ")+("instance of `"+k+"`."))}return null}return x(L)}function C(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),c;function L(Y,Q,X,ee,Z){for(var k=Y[Q],W=0;W<T.length;W++)if(g(k,T[W]))return null;var K=JSON.stringify(T,function(J,D){var ae=G(D);return ae==="symbol"?String(D):D});return new m("Invalid "+ee+" `"+Z+"` of value `"+String(k)+"` "+("supplied to `"+X+"`, expected one of "+K+"."))}return x(L)}function _(T){function L(Y,Q,X,ee,Z){if(typeof T!="function")return new m("Property `"+Z+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var k=Y[Q],W=U(k);if(W!=="object")return new m("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an object."));for(var K in k)if(r(k,K)){var z=T(k,K,X,ee,Z+"."+K,n);if(z instanceof Error)return z}return null}return x(L)}function M(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var L=0;L<T.length;L++){var Y=T[L];if(typeof Y!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Y)+" at index "+L+"."),c}function Q(X,ee,Z,k,W){for(var K=[],z=0;z<T.length;z++){var J=T[z],D=J(X,ee,Z,k,W,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&K.push(D.data.expectedType)}var ae=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+k+" `"+W+"` supplied to "+("`"+Z+"`"+ae+"."))}return x(Q)}function j(){function T(L,Y,Q,X,ee){return B(L[Y])?null:new m("Invalid "+X+" `"+ee+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return x(T)}function A(T,L,Y,Q,X){return new m((T||"React class")+": "+L+" type `"+Y+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function I(T){function L(Y,Q,X,ee,Z){var k=Y[Q],W=U(k);if(W!=="object")return new m("Invalid "+ee+" `"+Z+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));for(var K in T){var z=T[K];if(typeof z!="function")return A(X,ee,Z,K,G(z));var J=z(k,K,X,ee,Z+"."+K,n);if(J)return J}return null}return x(L)}function F(T){function L(Y,Q,X,ee,Z){var k=Y[Q],W=U(k);if(W!=="object")return new m("Invalid "+ee+" `"+Z+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));var K=t({},Y[Q],T);for(var z in K){var J=T[z];if(r(T,z)&&typeof J!="function")return A(X,ee,Z,z,G(J));if(!J)return new m("Invalid "+ee+" `"+Z+"` key `"+z+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(Y[Q],null," ")+`
110
- Valid keys: `+JSON.stringify(Object.keys(T),null," "));var D=J(k,z,X,ee,Z+"."+z,n);if(D)return D}return null}return x(L)}function B(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(B);if(T===null||l(T))return!0;var L=f(T);if(L){var Y=L.call(T),Q;if(L!==T.entries){for(;!(Q=Y.next()).done;)if(!B(Q.value))return!1}else for(;!(Q=Y.next()).done;){var X=Q.value;if(X&&!B(X[1]))return!1}}else return!1;return!0;default:return!1}}function q(T,L){return T==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function U(T){var L=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":q(L,T)?"symbol":L}function G(T){if(typeof T>"u"||T===null)return""+T;var L=U(T);if(L==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return L}function $(T){var L=G(T);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function V(T){return!T.constructor||!T.constructor.name?d:T.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},Zi}var Qi,Pf;function KA(){if(Pf)return Qi;Pf=1;var e=xc();function t(){}function n(){}return n.resetWarningCache=t,Qi=function(){function r(c,l,u,i,a,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Qi}var Tf;function XA(){if(Tf)return oo.exports;if(Tf=1,process.env.NODE_ENV!=="production"){var e=Gx(),t=!0;oo.exports=qA()(e.isElement,t)}else oo.exports=KA()();return oo.exports}var Ji,Af;function YA(){if(Af)return Ji;Af=1;function e(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(E){return typeof E}:e=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},e(x)}var t=o(S),n=o(UA()),r=o(XA());function o(x){return x&&x.__esModule?x:{default:x}}function s(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function c(x,y){for(var E=0;E<y.length;E++){var b=y[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}function l(x,y,E){return y&&c(x.prototype,y),x}function u(x,y){return y&&(e(y)==="object"||typeof y=="function")?y:a(x)}function i(x){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},i(x)}function a(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function f(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),y&&d(x,y)}function d(x,y){return d=Object.setPrototypeOf||function(b,R){return b.__proto__=R,b},d(x,y)}var p,g=t.default.version.split(/[.-]/);g[0]==="0"&&(g[1]==="13"||g[1]==="12")?p=function(y){return y.getDOMNode()}:p=function(y){return y};var m=(function(x){f(y,x);function y(E){var b;return s(this,y),b=u(this,i(y).call(this,E)),b.renderElementRef=t.default.createRef(),b.update=b.update.bind(a(b)),b}return l(y,[{key:"shouldComponentUpdate",value:function(b){var R=this;return Object.keys(y.propTypes).some(function(w){return R.props[w]!==b[w]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var b=p(this.renderElementRef.current);try{new n.default(b,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(R){window.console.error(R)}}},{key:"render",value:function(){var b=this.props,R=b.id,w=b.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:R,className:w});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:R,className:w});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:R,className:w})}}]),y})(t.default.Component);return m.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},m.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},Ji=m,Ji}var ZA=YA();const QA=Ff(ZA),JA=e=>{const{value:t,className:n="",format:r="CODE128",width:o=2,height:s=100,displayValue:c=!0,fontSize:l=20,background:u="#FFFFFF",lineColor:i="#000000",margin:a=10,...f}=e,d=O.classNames("flex items-center justify-center",n);return h.jsxRuntimeExports.jsx("div",{className:d,...f,children:h.jsxRuntimeExports.jsx(QA,{value:t,format:r,width:o,height:s,displayValue:c,fontSize:l,background:u,lineColor:i,margin:a})})},eO=e=>{const{variant:t}=e;return t==="qr"?h.jsxRuntimeExports.jsx(oA,{...e}):t==="barcode"?h.jsxRuntimeExports.jsx(JA,{...e}):null},tO=({classNames:e,group:t=[],defaultValue:n="",ariaLabel:r="",onValueChange:o,...s})=>h.jsxRuntimeExports.jsx(Zb,{className:"flex flex-row gap-4",defaultValue:n,"aria-label":r,onValueChange:o,...s,children:t==null?void 0:t.map(({id:c,label:l,value:u,checked:i,disabled:a})=>h.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[h.jsxRuntimeExports.jsx(Qb,{className:O.classNames("size-4 cursor-pointer rounded-full bg-white outline-1 hover:outline-primary-blue focus:outline-primary-blue data-[state=checked]:outline-1 data-[state=checked]:outline-primary-blue outline-neutral-3",{"cursor-not-allowed outline-gray-5 bg-gray-3 hover:outline-neutral-3 data-[state=checked]:outline-neutral-3":a},e==null?void 0:e.item),disabled:a,defaultChecked:i,value:u,id:c,children:h.jsxRuntimeExports.jsx(Jb,{className:O.classNames("relative flex size-full items-center justify-center after:block after:size-2 after:rounded-full after:bg-primary-blue",{"after:bg-black/25":a},e==null?void 0:e.indicator)})}),h.jsxRuntimeExports.jsx("label",{className:O.classNames("pl-2 text-[15px] leading-none text-black cursor-pointer",{"cursor-not-allowed text-black/25":a},e==null?void 0:e.label),htmlFor:c,children:l})]},c))}),nO="relative flex bg-gray-100 rounded-xl p-1 md:w-fit",rO="relative text-grays-Macropay-07 z-10 inline-flex items-center gap-1 text-sm font-medium transition-colors duration-200 justify-center flex-1 whitespace-nowrap",oO="cursor-not-allowed bg-gray-3 text-gray-6 opacity-50",iO="text-primary-blue",sO="flex-col",aO={sm:"h-6 rounded-md",md:"h-8",lg:"h-10 rounded-lg",xl:"h-12 rounded-lg"},cO={sm:"w-6 rounded-md",md:"w-8",lg:"w-10 rounded-lg",xl:"w-12 rounded-lg"},uO={sm:"px-3 py-[3px]",md:"px-3 py-[3px]",lg:"px-3 py-[3px]",xl:"px-3 py-[3px]"},lO=(e,t=!1)=>(t?cO:aO)[e]||"",fO=(e,t,n,r)=>O.classNames(nO,lO(e,t),t&&sO,n&&"opacity-50 cursor-not-allowed",r),dO=(e,t,n)=>(r,o)=>{e||r.disabled||(t(o),n==null||n(r.value))},hO=(e,t)=>e??t,pO=e=>e.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t),mO=(e,t)=>{const[n,r]=S.useState(0),o=S.useMemo(()=>pO(e),[e]);return S.useEffect(()=>{const s=o.findIndex(c=>c.value===t);s!==-1&&r(s)},[t,o]),{activeIndex:n,setActiveIndex:r,normalizedOptions:o}},gO=(e,t,n,r)=>{const[o,s]=S.useState({width:0,height:0,x:0,y:0}),c=S.useCallback(()=>{if(e.current){const l=e.current.children[t+1];if(l){const u=e.current.getBoundingClientRect(),i=l.getBoundingClientRect();s({width:i.width,height:i.height,x:i.left-u.left,y:i.top-u.top})}}},[e,t]);return S.useEffect(()=>{c()},[c,n,r]),S.useEffect(()=>{if(!e.current)return;const l=new ResizeObserver(()=>{c()});return l.observe(e.current),()=>{l.disconnect()}},[c]),o},xO={sm:"rounded-md",lg:"rounded-lg",xl:"rounded-lg"},vO=({indicatorStyle:e,vertical:t,size:n})=>{const r=xO[n]||"rounded-lg";return h.jsxRuntimeExports.jsx(re.div,{className:O.classNames("absolute bg-white shadow-md",r,t?"left-1 right-1":"top-1 bottom-1"),animate:{left:t?4:e.x,top:t?e.y:4,width:t?"calc(100% - 8px)":e.width,height:t?e.height:"calc(100% - 8px)"},transition:{type:"spring",stiffness:500,damping:30}})},yO=(e,t,n)=>O.classNames(rO,uO[e],t&&oO,n?"w-full":"flex-shrink-0"),EO=({option:e,index:t,isActive:n,disabled:r,vertical:o,size:s,onClick:c})=>{const l=yO(s,e.disabled||r,o);return h.jsxRuntimeExports.jsxs("button",{type:"button",className:O.classNames(l,n&&iO),onClick:()=>c(e,t),disabled:r||e.disabled,children:[e.icon&&h.jsxRuntimeExports.jsx("span",{className:"text-base",children:e.icon}),e.label]},`${e.value}-${t}`)},bO={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"}},wO=({options:e,value:t,defaultValue:n,onChange:r,size:o="md",disabled:s=!1,vertical:c=!1,className:l,...u})=>{const i=S.useId(),a=S.useRef(null),{activeIndex:f,setActiveIndex:d,normalizedOptions:p}=mO(e,hO(t,n)),g=gO(a,f,o,c),m=dO(s,d,r),x=fO(o,c,s,l);return h.jsxRuntimeExports.jsxs(re.div,{ref:a,id:`${i}-segmented`,className:x,...bO,...u,children:[h.jsxRuntimeExports.jsx(vO,{indicatorStyle:g,vertical:c,size:o}),p.map((y,E)=>h.jsxRuntimeExports.jsx(EO,{option:y,index:E,isActive:E===f,disabled:s,vertical:c,size:o,onClick:m},`${y.value}-${E}`))]})},RO={sm:"h-6 text-sm py-px rounded-sm",md:"h-8 text-base py-[5px] rounded-md",lg:"h-10 text-lg py-2 rounded-lg",xl:"h-12 text-lg p-3 rounded-lg"},SO=({size:e,disabled:t,className:n,triggerRef:r,placeholder:o})=>h.jsxRuntimeExports.jsxs(jw,{ref:r,disabled:t,className:O.classNames("outline-1 outline-gray-7 px-3 py-[5px] bg-white flex justify-between items-center cursor-pointer h-auto!",n,RO[e],{"bg-gray-3 text-gray-6 outline-gray-5 cursor-not-allowed":t}),children:[h.jsxRuntimeExports.jsx(Pw,{className:O.classNames("text-black truncate flex-1",{"text-gray-6":t}),placeholder:o}),h.jsxRuntimeExports.jsx(Tw,{className:"flex items-center",children:h.jsxRuntimeExports.jsx(ne.SvgChevronLeft,{className:O.classNames("-rotate-90",{"text-gray-6":t})})})]}),zx=S.forwardRef(({children:e,className:t,disabled:n,...r},o)=>h.jsxRuntimeExports.jsx(Iw,{ref:o,disabled:n,className:O.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:h.jsxRuntimeExports.jsx(Dw,{className:"whitespace-nowrap",children:e})}));zx.displayName="SelectItem";const CO=({message:e="No hay elementos disponibles."})=>h.jsxRuntimeExports.jsx("div",{className:"w-full h-24 flex justify-center items-center text-gray-6 text-sm",children:e}),Wx=S.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>h.jsxRuntimeExports.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:s=>{s.stopPropagation()},children:h.jsxRuntimeExports.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:O.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:s=>{s.stopPropagation()},onMouseDown:s=>{s.stopPropagation()},onPointerDown:s=>{s.stopPropagation()}})}));Wx.displayName="SearchInput";const _O=({width:e,allItems:t,filteredItems:n,currentValue:r,emptyMessage:o,showSearch:s,searchValue:c="",onSearchChange:l,searchPlaceholder:u,disabled:i,notFoundContent:a,inputRef:f})=>{const d=(n==null?void 0:n.length)===0&&!r;let p;return c&&a?p=a:c?p="No results found":p=o||"No elements available.",h.jsxRuntimeExports.jsxs(Ow,{position:"popper",sideOffset:5,className:O.classNames("overflow-hidden rounded-lg bg-white shadow-lg border border-gray-4 min-w-[200px] max-w-[350px] w-auto"),style:e?{width:e}:{},children:[s&&l&&h.jsxRuntimeExports.jsx(Wx,{ref:f,value:c,onChange:l,placeholder:u,disabled:i}),h.jsxRuntimeExports.jsx(Mw,{className:"space-y-1",children:d?h.jsxRuntimeExports.jsx(CO,{message:p}):h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.map(g=>{const m=n.some(x=>x.value===g.value);return h.jsxRuntimeExports.jsx(zx,{value:g.value,disabled:g==null?void 0:g.disabled,className:m?"":"hidden",children:g.children},g.value)})})})]})},jO=e=>{const[t,n]=S.useState(0),r=S.useRef(null);return S.useEffect(()=>{r.current&&n(r.current.offsetWidth)},[e]),{triggerWidth:t,triggerRef:r}},PO=({showSearch:e,items:t,filterOption:n,onSearch:r})=>{const[o,s]=S.useState(""),[c,l]=S.useState(!1),u=S.useRef(null);S.useEffect(()=>{c||s("")},[c]),S.useEffect(()=>{c&&e&&u.current&&requestAnimationFrame(()=>{var d;(d=u.current)==null||d.focus()})},[c,e,o]);const i=(d,p)=>{if(!d)return!0;const g=d.toLowerCase(),m=typeof p.children=="string"?p.children.toLowerCase():"",x=p.value.toLowerCase();return m.includes(g)||x.includes(g)},a=e?t.filter(d=>(n||i)(o,d)):t;return{searchValue:o,open:c,setOpen:l,filteredItems:a,handleSearchChange:d=>{const p=d.target.value;s(p),r==null||r(p)},inputRef:u}},TO=({value:e,defaultValue:t,onValueChange:n})=>{const[r,o]=S.useState(t);return S.useEffect(()=>{e!==void 0&&o(e)},[e]),{currentValue:e??r,handleValueChange:l=>{e===void 0&&o(l),n==null||n(l)}}},AO=({disabled:e,className:t,value:n,defaultValue:r,size:o="md",items:s=[],placeholder:c="Selecciona un elemento...",emptyMessage:l="No hay elementos disponibles.",onValueChange:u,showSearch:i=!1,searchPlaceholder:a="Buscar...",onSearch:f,filterOption:d,notFoundContent:p})=>{const{currentValue:g,handleValueChange:m}=TO({value:n,defaultValue:r,onValueChange:u}),{triggerWidth:x,triggerRef:y}=jO(t),{searchValue:E,open:b,setOpen:R,filteredItems:w,handleSearchChange:P,inputRef:C}=PO({showSearch:i,items:s,filterOption:d,onSearch:f});return h.jsxRuntimeExports.jsxs(_w,{value:g,onValueChange:m,open:b,onOpenChange:R,children:[h.jsxRuntimeExports.jsx(SO,{size:o,disabled:e,className:t,triggerRef:y,placeholder:c}),h.jsxRuntimeExports.jsx(Aw,{children:h.jsxRuntimeExports.jsx(_O,{width:x,allItems:s,filteredItems:w,currentValue:g,emptyMessage:l,showSearch:i,searchValue:E,onSearchChange:P,searchPlaceholder:a,disabled:e,notFoundContent:p,inputRef:C})})]})},OO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"animate-pulse",children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center mt-4",children:[h.jsxRuntimeExports.jsx(ne.SvgSkeletonAvatar,{}),h.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[h.jsxRuntimeExports.jsx("div",{className:"w-20 h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 me-3"}),h.jsxRuntimeExports.jsx("div",{className:"w-24 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),qx=()=>h.jsxRuntimeExports.jsxs("div",{role:"status","aria-hidden":!0,className:"animate-pulse",children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 "}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),MO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[h.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:h.jsxRuntimeExports.jsx(ne.SvgSkeletonImage,{})}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),IO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[h.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:h.jsxRuntimeExports.jsx(ne.SvgSkeletonImage,{})}),h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[480px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[440px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),DO=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),NO={default:qx,avatar:OO,image:MO,"image-description":IO,list:DO},kO=({type:e="default"})=>{const t=NO[e]??qx;return h.jsxRuntimeExports.jsx(t,{})},LO={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},FO={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},VO={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},BO=({classNames:e,rangeColor:t="primary",customRangeClass:n,size:r="md",showLabels:o=!1,formatLabel:s,min:c=0,max:l=100,...u})=>{const i=a=>s?s(a):a.toString();return h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsxs(Yw,{className:O.classNames("relative flex items-center select-none touch-none w-full",e==null?void 0:e.root),min:c,max:l,...u,children:[h.jsxRuntimeExports.jsx(Zw,{className:O.classNames("relative grow rounded-full bg-gray-200",LO[r],e==null?void 0:e.track),children:h.jsxRuntimeExports.jsx(Qw,{className:O.classNames("absolute rounded-full h-full",n||FO[t],e==null?void 0:e.range)})}),h.jsxRuntimeExports.jsx(Jw,{className:O.classNames("block rounded-full bg-white border-2 border-primary-blue shadow-md hover:shadow-lg","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","transition-shadow cursor-pointer",VO[r],e==null?void 0:e.thumb)})]}),o&&h.jsxRuntimeExports.jsxs("div",{className:O.classNames("flex justify-between mt-2 text-sm text-gray-600",e==null?void 0:e.labels),children:[h.jsxRuntimeExports.jsx("span",{className:e==null?void 0:e.startLabelClass,children:i(c)}),h.jsxRuntimeExports.jsx("span",{className:e==null?void 0:e.endLabelClass,children:i(l)})]})]})},$O={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},UO={sm:"size-5",md:"size-6",lg:"size-7",xl:"size-8"},es={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},GO={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},HO={sm:2,md:4,lg:6,xl:8},Of=({disabled:e,onClick:t,arrow:n,size:r})=>{const o=`${e?"text-gray-6":"text-primary-blue"}`,s={right:h.jsxRuntimeExports.jsx(ne.SvgRight,{className:o}),left:h.jsxRuntimeExports.jsx(ne.SvgLeft,{className:o})},c=O.classNames("flex items-center justify-center rounded-md border disabled:border-zinc-300 disabled:bg-neutral-100 disabled:text-stone-300 shadow-none transition-colors duration-300 ease-linear bg-white border-gray-5 text-gray-4 transitions-all easy-out hover:text-blue-900 hover:border-blue-900",$O[r]);return h.jsxRuntimeExports.jsx("button",{"aria-label":`stepButton-${n}`,type:"button",className:c,disabled:e,onClick:t,children:s[n]})},zO=({id:e,name:t,status:n,href:r,size:o="md"})=>{const s=O.classNames("flex items-center justify-center rounded-full",UO[o],{"border border-primary-blue":n==="COMPLETE","bg-primary-blue":n==="CURRENT","border border-gray-6":n==="PENDING"}),c=O.classNames("font-medium",es[o],{"text-primary-blue":n==="CURRENT","text-gray-6":n==="PENDING"}),l=O.classNames("font-medium",es[o],{"text-white":n==="CURRENT","text-gray-6":n==="PENDING"});return h.jsxRuntimeExports.jsxs("a",{href:r,className:O.classNames("flex gap-2 font-medium items-center",es[o]),children:[h.jsxRuntimeExports.jsx("span",{className:s,children:n==="COMPLETE"?h.jsxRuntimeExports.jsx(ne.SvgDone,{className:O.classNames("text-primary-blue",GO[o]),"aria-hidden":"true"}):h.jsxRuntimeExports.jsx("span",{className:l,children:e})}),h.jsxRuntimeExports.jsx("span",{className:c,children:t})]})},WO=({visibleSteps:e,size:t})=>{const n=HO[t];return h.jsxRuntimeExports.jsx(De,{gap:n,justify:"center",children:e.map((r,o)=>h.jsxRuntimeExports.jsxs(De,{gap:n,align:"center",children:[h.jsxRuntimeExports.jsx(zO,{...r,size:t}),o+1!==e.length&&h.jsxRuntimeExports.jsx(ne.SvgRight,{className:"text-gray-5"})]},crypto.randomUUID()))})},ts=(e,t,n,r)=>e?4:t?3:n?2:r?1:3,qO=e=>{const t=e.find(n=>n.status==="CURRENT");return t?Number(t.id)-1:0},KO=e=>e===0,XO=(e,t,n)=>e>=t-n,YO=e=>e-1,ZO=e=>e+1,QO=({steps:e,size:t="md",className:n=""})=>{const{xs:r,sm:o,md:s,lg:c}=kf.useBreakpoint(),[l,u]=S.useState(()=>ts(c,s,o,r)),i=qO(e),[a,f]=S.useState(()=>{const E=ts(c,s,o,r),b=Math.max(0,e.length-E);return Math.min(i,b)}),[d,p]=S.useState([]);S.useEffect(()=>{u(ts(c,s,o,r))},[r,o,s,c]),S.useEffect(()=>{const E=Math.min(a+l,e.length);p(e.slice(a,E))},[a,e,l]);const g=()=>f(YO(a)),m=()=>f(ZO(a)),x=KO(a),y=XO(a,e.length,l);return h.jsxRuntimeExports.jsxs("div",{className:O.classNames("flex flex-row items-center w-full justify-between gap-4",{[n]:n}),children:[h.jsxRuntimeExports.jsx(Of,{arrow:"left",disabled:x,onClick:g,size:t}),h.jsxRuntimeExports.jsx(WO,{visibleSteps:d,size:t}),h.jsxRuntimeExports.jsx(Of,{arrow:"right",disabled:y,onClick:m,size:t})]})},vc={md:{root:"h-[22px] w-11",thumb:"size-[18px]",children:"h-4 w-4 text-xs"},sm:{root:"h-4 w-7",thumb:"size-3",children:"h-3 w-3 text-[10px]"}},Pn={root:"relative peer focus-visible:border-ring focus-visible:ring-ring/50 flex px-px shrink-0 items-center justify-start rounded-full border border-transparent shadow-xs outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-6 dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:justify-end transition-colors duration-200",thumb:"relative z-10 bg-white pointer-events-none block rounded-full ring-0 shadow-sm",children:"absolute flex items-center justify-center text-white/80 transition-opacity duration-200",unCheckedChildren:"left-1 data-[state=checked]:opacity-0 data-[state=checked]:invisible",checkedChildren:"right-1 data-[state=unchecked]:opacity-0 data-[state=unchecked]:invisible"},JO={default:"data-[state=checked]:bg-[#0047BA]",success:"data-[state=checked]:bg-green-500",danger:"data-[state=checked]:bg-red-500"},eM=(e,t,n,r)=>O.classNames(Pn.root,JO[e],vc[t].root,n&&"cursor-not-allowed",r),Mf=(e,t)=>{const n=t?Pn.checkedChildren:Pn.unCheckedChildren;return O.classNames(Pn.children,n,vc[e].children)},tM=e=>{const t=typeof e=="string"?e:e.text,n=typeof e=="string"?"right":e.position;return{labelText:t,labelPosition:n}},If=e=>O.classNames("text-sm text-foreground",e&&"opacity-50"),nM=e=>O.classNames("flex items-center gap-2",e&&"cursor-not-allowed"),rM={type:"spring",stiffness:500,damping:30,mass:1},oM=({className:e,label:t,type:n="default",size:r="md",checked:o,defaultChecked:s=!1,disabled:c=!1,onCheckedChange:l,checkedChildren:u,unCheckedChildren:i,...a})=>{const f=vc[r],d=h.jsxRuntimeExports.jsxs(oR,{className:eM(n,r,c,e),checked:o,defaultChecked:s,disabled:c,onCheckedChange:l,...a,children:[i&&h.jsxRuntimeExports.jsx("div",{className:Mf(r,!1),children:i}),h.jsxRuntimeExports.jsx(iR,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{className:O.classNames(Pn.thumb,f.thumb),layout:!0,transition:rM,whileTap:{scale:.95}})}),u&&h.jsxRuntimeExports.jsx("div",{className:Mf(r,!0),children:u})]});if(t){const{labelText:p,labelPosition:g}=tM(t);return h.jsxRuntimeExports.jsxs("div",{className:nM(c),children:[g==="left"&&h.jsxRuntimeExports.jsx("span",{className:If(c),children:p}),d,g==="right"&&h.jsxRuntimeExports.jsx("span",{className:If(c),children:p})]})}return d},iM={success:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconCheckCircle,{width:16,height:16}),bgColor:"bg-green-1",textColor:"text-green-6",borderColor:"border-green-3",closeButtonColor:"hover:bg-green-2"},info:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconInfoCircle,{width:16,height:16}),bgColor:"bg-blue-1",textColor:"text-blue-6",borderColor:"border-blue-3",closeButtonColor:"hover:bg-blue-2"},warning:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconWarningCircle,{width:16,height:16}),bgColor:"bg-gold-1",textColor:"text-gold-6",borderColor:"border-gold-3",closeButtonColor:"hover:bg-gold-2"},error:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconErrorCircle,{width:16,height:16}),bgColor:"bg-red-1",textColor:"text-red-6",borderColor:"border-red-3",closeButtonColor:"hover:bg-red-2"}},sM=({children:e,type:t="info",showIcon:n=!1,closable:r=!1,onClose:o,className:s="",icon:c,bgColor:l,textColor:u,borderColor:i,...a})=>{const f=!!(l||u||i),d=iM[t],p=c||(n?d.icon:null),g=O.classNames("inline-flex items-center gap-2 px-2 py-2 rounded border text-sm font-medium leading-none rounded-sm",{[d.bgColor]:!f,[d.textColor]:!f,[d.borderColor]:!f,[s]:s}),m=f?{backgroundColor:l,color:u,borderColor:i}:void 0,x=O.classNames("rounded transition-colors cursor-pointer text-black/[0.45]",{[d.closeButtonColor]:!f});return h.jsxRuntimeExports.jsxs("span",{className:g,style:m,...a,children:[p&&h.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:p}),h.jsxRuntimeExports.jsx("span",{className:"inline-flex items-center",children:e}),r&&h.jsxRuntimeExports.jsx("button",{onClick:o,className:x,"aria-label":"Remove tag",type:"button",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{width:16,height:16})})]})},aM={initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},cM=({type:e,items:t,currentActiveKey:n,contentClassName:r})=>{var o;if(e==="segmented"){const s=(o=t.find(c=>c.key===n))==null?void 0:o.content;return h.jsxRuntimeExports.jsx(Yc,{value:n,forceMount:!0,asChild:!0,children:h.jsxRuntimeExports.jsx(jt,{mode:"wait",initial:!1,children:h.jsxRuntimeExports.jsx(re.div,{className:O.classNames("min-w-full",r),variants:aM,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:"easeInOut"},children:s},n)})})}return h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:t.map(s=>h.jsxRuntimeExports.jsx(Yc,{value:s.key,className:O.classNames("min-w-full",r),children:s.content},s.key))})},uM=(e,t)=>O.classNames({"text-sm font-normal":e==="default"||e==="underline"||e==="pills","border-b border-gray-200":e==="underline","border-b border-gray-200 text-lg font-semibold":e==="with-icon","bg-gray-100 rounded-xl p-1 text-lg text-grays-Macropay-07 font-normal":e==="segmented"},t),lM=e=>O.classNames("select-none",{"flex flex-wrap text-center text-gray-500 border-b border-gray-200 font-normal":e==="default"||e==="pills","-mb-px":e==="underline","flex flex-wrap -mb-px font-normal text-sm text-center text-gray-500":e==="with-icon","grid grid-flow-col justify-stretch items-center text-lg font-normal text-center text-lg sm:w-full":e==="segmented"}),fM=e=>O.classNames({"inline-block p-3 py-3 rounded-t-lg active:text-gray-500 active:bg-gray-50":e==="default"||e==="pills","inline-block p-3 py-3 border-b-2 rounded-t-lg active:border-primary-blue":e==="underline","inline-flex items-center justify-center p-3 border-b-2 rounded-t-lg active:border-gray-300":e==="with-icon","md:inline-block px-2 py-3 rounded-lg min-w-full h-full items-center text-center flex justify-center text-sm":e==="segmented"}),dM=(e,t)=>O.classNames({[`font-bold text-${t} bg-white`]:e==="default"||e==="pills",[`text-${t} border-b-2 border-primary-blue`]:e==="underline"||e==="with-icon",[`font-bold text-${t} active:text-${t}`]:e==="segmented"}),hM=({type:e,items:t,currentActiveKey:n,activeColorTabs:r,className:o})=>h.jsxRuntimeExports.jsx("div",{className:uM(e,o),children:h.jsxRuntimeExports.jsx(uR,{className:lM(e),children:t.map(({key:s,label:c,disabled:l})=>h.jsxRuntimeExports.jsxs(lR,{value:s,disabled:l,className:O.classNames("h-full relative",fM(e),s===n&&dM(e,r),l&&"text-gray-300 cursor-not-allowed"),children:[e==="segmented"&&s===n&&h.jsxRuntimeExports.jsx(re.div,{layoutId:"segmented-indicator",className:"absolute inset-0 bg-white rounded-lg z-0","data-testid":"tab-indicator",initial:!1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}}),h.jsxRuntimeExports.jsx("span",{className:"relative z-10",children:c})]},s))})}),pM=({currentActiveKey:e,type:t="default",items:n,onChange:r,className:o,contentClassName:s,activeColorTabs:c="primary-blue"})=>h.jsxRuntimeExports.jsxs(cR,{value:e,onValueChange:r,className:"flex flex-col gap-4",children:[h.jsxRuntimeExports.jsx(hM,{type:t,items:n,currentActiveKey:e,activeColorTabs:c,className:o}),h.jsxRuntimeExports.jsx(cM,{type:t,items:n,currentActiveKey:e,contentClassName:s})]}),mM=({name:e,label:t,children:n})=>h.jsxRuntimeExports.jsxs(xb,{name:e,children:[t&&h.jsxRuntimeExports.jsx(vb,{children:t}),n]}),gM=({type:e,error:t,disabled:n,readOnly:r,inputSize:o,className:s="",classesNames:c})=>O.classNames("block w-full p-2 focus:outline-none text-black rounded-lg h-[150px] transition duration-200 ease-in-out",{"border border-gray-7 focus:border-tints-Blue-30 focus:shadow-[0px_0px_0px_2px_#E6EDF8]":e==="normal"&&!n&&!t,"bg-transparent border-b border-gray-7 rounded-none focus:border-b-tints-Blue-30":e==="underline"&&!t&&!n,"border-red-400 focus:shadow-[0px_0px_0px_2px_#FFCCC7]":t&&e!=="underline","border-b border-red-400 rounded-none":t&&e==="underline","cursor-not-allowed bg-gray-3 text-gray-6":n&&e==="normal","cursor-not-allowed text-gray-6":n&&e==="underline","cursor-not-allowed font-semibold text-primary-blue":r,"h-8 text-sm":o==="sm","h-9 text-base":o==="md","h-10 text-base":o==="lg","h-12 text-base":o==="xl",[s]:s,[(c==null?void 0:c.input)??""]:c==null?void 0:c.input}),xM=({type:e="normal",inputSize:t="xl",className:n,classesNames:r,clearOnFocus:o,onFocus:s,...c})=>h.jsxRuntimeExports.jsx(yb,{asChild:!0,children:h.jsxRuntimeExports.jsx("textarea",{...c,className:gM({type:e,inputSize:t,className:n,classesNames:r,disabled:c.disabled,readOnly:c.readOnly}),onFocus:l=>{o&&(l.currentTarget.value=""),s==null||s(l)}})}),vM=({footer:e,current:t=0,max:n})=>h.jsxRuntimeExports.jsxs("div",{className:"flex justify-between pt-1 text-sm text-gray-7",children:[h.jsxRuntimeExports.jsx("span",{children:e}),n&&h.jsxRuntimeExports.jsx("span",{children:`${t} / ${n}`})]}),yM=({name:e,label:t,labelFooter:n,error:r,maxLength:o,minLength:s,defaultValue:c="",classesNames:l,...u})=>{const[i,a]=S.useState(c);return h.jsxRuntimeExports.jsx(gb,{children:h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:l==null?void 0:l.container,children:[h.jsxRuntimeExports.jsx(mM,{name:e,label:t,children:h.jsxRuntimeExports.jsx(xM,{...u,maxLength:o,minLength:s,value:i,onChange:f=>{var d;a(f.target.value),(d=u.onChange)==null||d.call(u,f)}})}),h.jsxRuntimeExports.jsx(vM,{footer:n??`${s} caracteres requeridos`,current:i.length,max:o}),r&&h.jsxRuntimeExports.jsx(Eb,{className:l==null?void 0:l.messageError,children:r})]})})},EM=({className:e,content:t,children:n,...r})=>{const o=typeof t=="string";return h.jsxRuntimeExports.jsx(_R,{children:h.jsxRuntimeExports.jsxs(jR,{children:[h.jsxRuntimeExports.jsx(PR,{asChild:!0,children:n}),h.jsxRuntimeExports.jsx(TR,{children:h.jsxRuntimeExports.jsx(AR,{className:e,asChild:!0,...r,children:h.jsxRuntimeExports.jsxs(re.div,{className:O.classNames({"bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0":o&&!e}),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:[t,h.jsxRuntimeExports.jsx(OR,{className:"w-4 h-2"})]})})})]})})};var yc=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(yc||{});const{cols:bM,gap:wM,justifyItems:RM,alignContent:SM}=yc,CM=({cols:e,align:t,gap:n,justify:r,className:o="",...s})=>h.jsxRuntimeExports.jsx(re.div,{className:O.classNames("grid",{[o]:o},O.generateClasses(bM,e),O.generateClasses(wM,n),O.generateClasses(RM,r),O.generateClasses(SM,t)),...s}),{span:_M,start:jM,end:PM,justifySelf:TM,alignSelf:AM}=yc,OM=({align:e,end:t,justify:n,span:r,start:o,className:s="",...c})=>h.jsxRuntimeExports.jsx(re.div,{...c,className:O.classNames({[s]:s},O.generateClasses(_M,r),O.generateClasses(jM,o),O.generateClasses(PM,t),O.generateClasses(TM,n),O.generateClasses(AM,e))});exports.Accordion=gP;exports.Alert=bP;exports.Avatar=RP;exports.Button=Hs;exports.Card=TP;exports.Checkbox=mx;exports.Col=OM;exports.Divider=kP;exports.Drawer=VP;exports.Dropdown=WP;exports.Empty=qP;exports.Flex=De;exports.Input=iT;exports.List=bT;exports.Modal=PT;exports.Notification=kT;exports.Pagination=wx;exports.Popover=zT;exports.Portal=gx;exports.Progress=KT;exports.QRBarcode=eO;exports.RadioGroup=tO;exports.Row=CM;exports.Segmented=wO;exports.Select=AO;exports.Skeleton=kO;exports.Slider=BO;exports.Spinner=Xx;exports.SpinnerSizeMap=Vf;exports.Steps=QO;exports.Switch=oM;exports.Tabs=pM;exports.Tag=sM;exports.TextArea=yM;exports.Tooltip=EM;exports.Typography=un;
109
+ */var Qi,Pd;function vO(){if(Pd)return Qi;Pd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},l=0;l<10;l++)c["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(c).map(function(a){return c[a]});if(u.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(a){s[a]=a}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qi=o()?Object.assign:function(i,c){for(var l,u=r(i),s,a=1;a<arguments.length;a++){l=Object(arguments[a]);for(var d in l)t.call(l,d)&&(u[d]=l[d]);if(e){s=e(l);for(var f=0;f<s.length;f++)n.call(l,s[f])&&(u[s[f]]=l[s[f]])}}return u},Qi}var Ji,Td;function Rc(){if(Td)return Ji;Td=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ji=e,Ji}var es,Ad;function rv(){return Ad||(Ad=1,es=Function.call.bind(Object.prototype.hasOwnProperty)),es}var ts,Od;function yO(){if(Od)return ts;Od=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Rc(),n={},r=rv();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(i,c,l,u,s){if(process.env.NODE_ENV!=="production"){for(var a in i)if(r(i,a)){var d;try{if(typeof i[a]!="function"){var f=Error((u||"React class")+": "+l+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[a](c,a,u,l,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". 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 instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=s?s():"";e("Failed "+l+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ts=o,ts}var ns,Md;function EO(){if(Md)return ns;Md=1;var e=nv(),t=vO(),n=Rc(),r=rv(),o=yO(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function c(){return null}return ns=function(l,u){var s=typeof Symbol=="function"&&Symbol.iterator,a="@@iterator";function d(A){var F=A&&(s&&A[s]||A[a]);if(typeof F=="function")return F}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:b,element:w(),elementType:R(),instanceOf:_,node:C(),objectOf:P,oneOf:j,oneOfType:T,shape:I,exact:k};function m(A,F){return A===F?A!==0||1/A===1/F:A!==A&&F!==F}function g(A,F){this.message=A,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function x(A){if(process.env.NODE_ENV!=="production")var F={},Y=0;function Q(ee,Z,L,W,K,H,J){if(W=W||f,H=H||L,J!==n){if(u){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=W+":"+L;!F[ae]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[ae]=!0,Y++)}}return Z[L]==null?ee?Z[L]===null?new g("The "+K+" `"+H+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new g("The "+K+" `"+H+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:A(Z,L,W,K,H)}var X=Q.bind(null,!1);return X.isRequired=Q.bind(null,!0),X}function y(A){function F(Y,Q,X,ee,Z,L){var W=Y[Q],K=U(W);if(K!==A){var H=G(W);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+H+"` supplied to `"+X+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return x(F)}function E(){return x(c)}function b(A){function F(Y,Q,X,ee,Z){if(typeof A!="function")return new g("Property `"+Z+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var L=Y[Q];if(!Array.isArray(L)){var W=U(L);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an array."))}for(var K=0;K<L.length;K++){var H=A(L,K,X,ee,Z+"["+K+"]",n);if(H instanceof Error)return H}return null}return x(F)}function w(){function A(F,Y,Q,X,ee){var Z=F[Y];if(!l(Z)){var L=U(Z);return new g("Invalid "+X+" `"+ee+"` of type "+("`"+L+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return x(A)}function R(){function A(F,Y,Q,X,ee){var Z=F[Y];if(!e.isValidElementType(Z)){var L=U(Z);return new g("Invalid "+X+" `"+ee+"` of type "+("`"+L+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return x(A)}function _(A){function F(Y,Q,X,ee,Z){if(!(Y[Q]instanceof A)){var L=A.name||f,W=V(Y[Q]);return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected ")+("instance of `"+L+"`."))}return null}return x(F)}function j(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function F(Y,Q,X,ee,Z){for(var L=Y[Q],W=0;W<A.length;W++)if(m(L,A[W]))return null;var K=JSON.stringify(A,function(J,D){var ae=G(D);return ae==="symbol"?String(D):D});return new g("Invalid "+ee+" `"+Z+"` of value `"+String(L)+"` "+("supplied to `"+X+"`, expected one of "+K+"."))}return x(F)}function P(A){function F(Y,Q,X,ee,Z){if(typeof A!="function")return new g("Property `"+Z+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var L=Y[Q],W=U(L);if(W!=="object")return new g("Invalid "+ee+" `"+Z+"` of type "+("`"+W+"` supplied to `"+X+"`, expected an object."));for(var K in L)if(r(L,K)){var H=A(L,K,X,ee,Z+"."+K,n);if(H instanceof Error)return H}return null}return x(F)}function T(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var F=0;F<A.length;F++){var Y=A[F];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Y)+" at index "+F+"."),c}function Q(X,ee,Z,L,W){for(var K=[],H=0;H<A.length;H++){var J=A[H],D=J(X,ee,Z,L,W,n);if(D==null)return null;D.data&&r(D.data,"expectedType")&&K.push(D.data.expectedType)}var ae=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+L+" `"+W+"` supplied to "+("`"+Z+"`"+ae+"."))}return x(Q)}function C(){function A(F,Y,Q,X,ee){return B(F[Y])?null:new g("Invalid "+X+" `"+ee+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return x(A)}function O(A,F,Y,Q,X){return new g((A||"React class")+": "+F+" type `"+Y+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function I(A){function F(Y,Q,X,ee,Z){var L=Y[Q],W=U(L);if(W!=="object")return new g("Invalid "+ee+" `"+Z+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));for(var K in A){var H=A[K];if(typeof H!="function")return O(X,ee,Z,K,G(H));var J=H(L,K,X,ee,Z+"."+K,n);if(J)return J}return null}return x(F)}function k(A){function F(Y,Q,X,ee,Z){var L=Y[Q],W=U(L);if(W!=="object")return new g("Invalid "+ee+" `"+Z+"` of type `"+W+"` "+("supplied to `"+X+"`, expected `object`."));var K=t({},Y[Q],A);for(var H in K){var J=A[H];if(r(A,H)&&typeof J!="function")return O(X,ee,Z,H,G(J));if(!J)return new g("Invalid "+ee+" `"+Z+"` key `"+H+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(Y[Q],null," ")+`
110
+ Valid keys: `+JSON.stringify(Object.keys(A),null," "));var D=J(L,H,X,ee,Z+"."+H,n);if(D)return D}return null}return x(F)}function B(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(B);if(A===null||l(A))return!0;var F=d(A);if(F){var Y=F.call(A),Q;if(F!==A.entries){for(;!(Q=Y.next()).done;)if(!B(Q.value))return!1}else for(;!(Q=Y.next()).done;){var X=Q.value;if(X&&!B(X[1]))return!1}}else return!1;return!0;default:return!1}}function q(A,F){return A==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function U(A){var F=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":q(F,A)?"symbol":F}function G(A){if(typeof A>"u"||A===null)return""+A;var F=U(A);if(F==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return F}function $(A){var F=G(A);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function V(A){return!A.constructor||!A.constructor.name?f:A.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},ns}var rs,Id;function bO(){if(Id)return rs;Id=1;var e=Rc();function t(){}function n(){}return n.resetWarningCache=t,rs=function(){function r(c,l,u,s,a,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},rs}var Dd;function wO(){if(Dd)return io.exports;if(Dd=1,process.env.NODE_ENV!=="production"){var e=nv(),t=!0;io.exports=EO()(e.isElement,t)}else io.exports=bO()();return io.exports}var os,Nd;function RO(){if(Nd)return os;Nd=1;function e(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(E){return typeof E}:e=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},e(x)}var t=o(S),n=o(mO()),r=o(wO());function o(x){return x&&x.__esModule?x:{default:x}}function i(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function c(x,y){for(var E=0;E<y.length;E++){var b=y[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}function l(x,y,E){return y&&c(x.prototype,y),x}function u(x,y){return y&&(e(y)==="object"||typeof y=="function")?y:a(x)}function s(x){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},s(x)}function a(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function d(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),y&&f(x,y)}function f(x,y){return f=Object.setPrototypeOf||function(b,w){return b.__proto__=w,b},f(x,y)}var p,m=t.default.version.split(/[.-]/);m[0]==="0"&&(m[1]==="13"||m[1]==="12")?p=function(y){return y.getDOMNode()}:p=function(y){return y};var g=(function(x){d(y,x);function y(E){var b;return i(this,y),b=u(this,s(y).call(this,E)),b.renderElementRef=t.default.createRef(),b.update=b.update.bind(a(b)),b}return l(y,[{key:"shouldComponentUpdate",value:function(b){var w=this;return Object.keys(y.propTypes).some(function(R){return w.props[R]!==b[R]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var b=p(this.renderElementRef.current);try{new n.default(b,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(w){window.console.error(w)}}},{key:"render",value:function(){var b=this.props,w=b.id,R=b.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:w,className:R});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:w,className:R});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:w,className:R})}}]),y})(t.default.Component);return g.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},g.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},os=g,os}var SO=RO();const CO=Hd(SO),_O=e=>{const{value:t,className:n="",format:r="CODE128",width:o=2,height:i=100,displayValue:c=!0,fontSize:l=20,background:u="#FFFFFF",lineColor:s="#000000",margin:a=10,...d}=e,f=M.classNames("flex items-center justify-center",n);return h.jsxRuntimeExports.jsx("div",{className:f,...d,children:h.jsxRuntimeExports.jsx(CO,{value:t,format:r,width:o,height:i,displayValue:c,fontSize:l,background:u,lineColor:s,margin:a})})},jO=e=>{const{variant:t}=e;return t==="qr"?h.jsxRuntimeExports.jsx(OA,{...e}):t==="barcode"?h.jsxRuntimeExports.jsx(_O,{...e}):null},PO=({classNames:e,group:t=[],defaultValue:n="",ariaLabel:r="",onValueChange:o,...i})=>h.jsxRuntimeExports.jsx(pw,{className:"flex flex-row gap-4",defaultValue:n,"aria-label":r,onValueChange:o,...i,children:t==null?void 0:t.map(({id:c,label:l,value:u,checked:s,disabled:a})=>h.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[h.jsxRuntimeExports.jsx(mw,{className:M.classNames("size-4 cursor-pointer rounded-full bg-white outline-1 hover:outline-primary-blue focus:outline-primary-blue data-[state=checked]:outline-1 data-[state=checked]:outline-primary-blue outline-neutral-3",{"cursor-not-allowed outline-gray-5 bg-gray-3 hover:outline-neutral-3 data-[state=checked]:outline-neutral-3":a},e==null?void 0:e.item),disabled:a,defaultChecked:s,value:u,id:c,children:h.jsxRuntimeExports.jsx(gw,{className:M.classNames("relative flex size-full items-center justify-center after:block after:size-2 after:rounded-full after:bg-primary-blue",{"after:bg-black/25":a},e==null?void 0:e.indicator)})}),h.jsxRuntimeExports.jsx("label",{className:M.classNames("pl-2 text-[15px] leading-none text-black cursor-pointer",{"cursor-not-allowed text-black/25":a},e==null?void 0:e.label),htmlFor:c,children:l})]},c))}),TO="relative flex bg-gray-100 rounded-xl p-1 md:w-fit",AO="relative text-grays-Macropay-07 z-10 inline-flex items-center gap-1 text-sm font-medium transition-colors duration-200 justify-center flex-1 whitespace-nowrap",OO="cursor-not-allowed bg-gray-3 text-gray-6 opacity-50",MO="text-primary-blue",IO="flex-col",DO={sm:"h-6 rounded-md",md:"h-8",lg:"h-10 rounded-lg",xl:"h-12 rounded-lg"},NO={sm:"w-6 rounded-md",md:"w-8",lg:"w-10 rounded-lg",xl:"w-12 rounded-lg"},kO={sm:"px-3 py-[3px]",md:"px-3 py-[3px]",lg:"px-3 py-[3px]",xl:"px-3 py-[3px]"},LO=(e,t=!1)=>(t?NO:DO)[e]||"",FO=(e,t,n,r)=>M.classNames(TO,LO(e,t),t&&IO,n&&"opacity-50 cursor-not-allowed",r),VO=(e,t,n)=>(r,o)=>{e||r.disabled||(t(o),n==null||n(r.value))},BO=(e,t)=>e??t,$O=e=>e.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t),UO=(e,t)=>{const[n,r]=S.useState(0),o=S.useMemo(()=>$O(e),[e]);return S.useEffect(()=>{const i=o.findIndex(c=>c.value===t);i!==-1&&r(i)},[t,o]),{activeIndex:n,setActiveIndex:r,normalizedOptions:o}},GO=(e,t,n,r)=>{const[o,i]=S.useState({width:0,height:0,x:0,y:0}),c=S.useCallback(()=>{if(e.current){const l=e.current.children[t+1];if(l){const u=e.current.getBoundingClientRect(),s=l.getBoundingClientRect();i({width:s.width,height:s.height,x:s.left-u.left,y:s.top-u.top})}}},[e,t]);return S.useEffect(()=>{c()},[c,n,r]),S.useEffect(()=>{if(!e.current)return;const l=new ResizeObserver(()=>{c()});return l.observe(e.current),()=>{l.disconnect()}},[c]),o},zO={sm:"rounded-md",lg:"rounded-lg",xl:"rounded-lg"},HO=({indicatorStyle:e,vertical:t,size:n})=>{const r=zO[n]||"rounded-lg";return h.jsxRuntimeExports.jsx(re.div,{className:M.classNames("absolute bg-white shadow-md",r,t?"left-1 right-1":"top-1 bottom-1"),animate:{left:t?4:e.x,top:t?e.y:4,width:t?"calc(100% - 8px)":e.width,height:t?e.height:"calc(100% - 8px)"},transition:{type:"spring",stiffness:500,damping:30}})},WO=(e,t,n)=>M.classNames(AO,kO[e],t&&OO,n?"w-full":"flex-shrink-0"),qO=({option:e,index:t,isActive:n,disabled:r,vertical:o,size:i,onClick:c})=>{const l=WO(i,e.disabled||r,o);return h.jsxRuntimeExports.jsxs("button",{type:"button",className:M.classNames(l,n&&MO),onClick:()=>c(e,t),disabled:r||e.disabled,children:[e.icon&&h.jsxRuntimeExports.jsx("span",{className:"text-base",children:e.icon}),e.label]},`${e.value}-${t}`)},KO={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3,ease:"easeOut"}},XO=({options:e,value:t,defaultValue:n,onChange:r,size:o="md",disabled:i=!1,vertical:c=!1,className:l,...u})=>{const s=S.useId(),a=S.useRef(null),{activeIndex:d,setActiveIndex:f,normalizedOptions:p}=UO(e,BO(t,n)),m=GO(a,d,o,c),g=VO(i,f,r),x=FO(o,c,i,l);return h.jsxRuntimeExports.jsxs(re.div,{ref:a,id:`${s}-segmented`,className:x,...KO,...u,children:[h.jsxRuntimeExports.jsx(HO,{indicatorStyle:m,vertical:c,size:o}),p.map((y,E)=>h.jsxRuntimeExports.jsx(qO,{option:y,index:E,isActive:E===d,disabled:i,vertical:c,size:o,onClick:g},`${y.value}-${E}`))]})},YO={sm:"h-6 text-sm py-px rounded-sm",md:"h-8 text-base py-[5px] rounded-md",lg:"h-10 text-lg py-2 rounded-lg",xl:"h-12 text-lg p-3 rounded-lg"},ZO=({size:e,disabled:t,className:n,triggerRef:r,placeholder:o})=>h.jsxRuntimeExports.jsxs(zw,{ref:r,disabled:t,className:M.classNames("outline-1 outline-gray-7 px-3 py-[5px] bg-white flex justify-between items-center cursor-pointer h-auto!",n,YO[e],{"bg-gray-3 text-gray-6 outline-gray-5 cursor-not-allowed":t}),children:[h.jsxRuntimeExports.jsx(Hw,{className:M.classNames("text-black truncate flex-1",{"text-gray-6":t}),placeholder:o}),h.jsxRuntimeExports.jsx(Ww,{className:"flex items-center",children:h.jsxRuntimeExports.jsx(ne.SvgChevronLeft,{className:M.classNames("-rotate-90",{"text-gray-6":t})})})]}),ov=S.forwardRef(({children:e,className:t,disabled:n,...r},o)=>h.jsxRuntimeExports.jsx(Yw,{ref:o,disabled:n,className:M.classNames("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:h.jsxRuntimeExports.jsx(Zw,{className:"whitespace-nowrap",children:e})}));ov.displayName="SelectItem";const QO=({message:e="No hay elementos disponibles."})=>h.jsxRuntimeExports.jsx("div",{className:"w-full h-24 flex justify-center items-center text-gray-6 text-sm",children:e}),iv=S.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>h.jsxRuntimeExports.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:i=>{i.stopPropagation()},children:h.jsxRuntimeExports.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:M.classNames("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:i=>{i.stopPropagation()},onMouseDown:i=>{i.stopPropagation()},onPointerDown:i=>{i.stopPropagation()}})}));iv.displayName="SearchInput";const JO=({width:e,allItems:t,filteredItems:n,currentValue:r,emptyMessage:o,showSearch:i,searchValue:c="",onSearchChange:l,searchPlaceholder:u,disabled:s,notFoundContent:a,inputRef:d})=>{const f=(n==null?void 0:n.length)===0&&!r;let p;return c&&a?p=a:c?p="No results found":p=o||"No elements available.",h.jsxRuntimeExports.jsxs(Kw,{position:"popper",sideOffset:5,className:M.classNames("overflow-hidden rounded-lg bg-white shadow-lg border border-gray-4 min-w-[200px] max-w-[350px] w-auto"),style:e?{width:e}:{},children:[i&&l&&h.jsxRuntimeExports.jsx(iv,{ref:d,value:c,onChange:l,placeholder:u,disabled:s}),h.jsxRuntimeExports.jsx(Xw,{className:"space-y-1",children:f?h.jsxRuntimeExports.jsx(QO,{message:p}):h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:t==null?void 0:t.map(m=>{const g=n.some(x=>x.value===m.value);return h.jsxRuntimeExports.jsx(ov,{value:m.value,disabled:m==null?void 0:m.disabled,className:g?"":"hidden",children:m.children},m.value)})})})]})},eM=e=>{const[t,n]=S.useState(0),r=S.useRef(null);return S.useEffect(()=>{r.current&&n(r.current.offsetWidth)},[e]),{triggerWidth:t,triggerRef:r}},tM=({showSearch:e,items:t,filterOption:n,onSearch:r})=>{const[o,i]=S.useState(""),[c,l]=S.useState(!1),u=S.useRef(null);S.useEffect(()=>{c||i("")},[c]),S.useEffect(()=>{c&&e&&u.current&&requestAnimationFrame(()=>{var f;(f=u.current)==null||f.focus()})},[c,e,o]);const s=(f,p)=>{if(!f)return!0;const m=f.toLowerCase(),g=typeof p.children=="string"?p.children.toLowerCase():"",x=p.value.toLowerCase();return g.includes(m)||x.includes(m)},a=e?t.filter(f=>(n||s)(o,f)):t;return{searchValue:o,open:c,setOpen:l,filteredItems:a,handleSearchChange:f=>{const p=f.target.value;i(p),r==null||r(p)},inputRef:u}},nM=({value:e,defaultValue:t,onValueChange:n})=>{const[r,o]=S.useState(t);return S.useEffect(()=>{e!==void 0&&o(e)},[e]),{currentValue:e??r,handleValueChange:l=>{e===void 0&&o(l),n==null||n(l)}}},rM=({disabled:e,className:t,value:n,defaultValue:r,size:o="md",items:i=[],placeholder:c="Selecciona un elemento...",emptyMessage:l="No hay elementos disponibles.",onValueChange:u,showSearch:s=!1,searchPlaceholder:a="Buscar...",onSearch:d,filterOption:f,notFoundContent:p})=>{const{currentValue:m,handleValueChange:g}=nM({value:n,defaultValue:r,onValueChange:u}),{triggerWidth:x,triggerRef:y}=eM(t),{searchValue:E,open:b,setOpen:w,filteredItems:R,handleSearchChange:_,inputRef:j}=tM({showSearch:s,items:i,filterOption:f,onSearch:d});return h.jsxRuntimeExports.jsxs(Gw,{value:m,onValueChange:g,open:b,onOpenChange:w,children:[h.jsxRuntimeExports.jsx(ZO,{size:o,disabled:e,className:t,triggerRef:y,placeholder:c}),h.jsxRuntimeExports.jsx(qw,{children:h.jsxRuntimeExports.jsx(JO,{width:x,allItems:i,filteredItems:R,currentValue:m,emptyMessage:l,showSearch:s,searchValue:E,onSearchChange:_,searchPlaceholder:a,disabled:e,notFoundContent:p,inputRef:j})})]})},oM=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"animate-pulse",children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center mt-4",children:[h.jsxRuntimeExports.jsx(ne.SvgSkeletonAvatar,{}),h.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[h.jsxRuntimeExports.jsx("div",{className:"w-20 h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 me-3"}),h.jsxRuntimeExports.jsx("div",{className:"w-24 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),sv=()=>h.jsxRuntimeExports.jsxs("div",{role:"status","aria-hidden":!0,className:"animate-pulse",children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 "}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),iM=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[h.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:h.jsxRuntimeExports.jsx(ne.SvgSkeletonImage,{})}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),sM=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",children:[h.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center w-full h-48 bg-gray-300 rounded sm:w-96 dark:bg-gray-700",children:h.jsxRuntimeExports.jsx(ne.SvgSkeletonImage,{})}),h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[480px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[440px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[460px] mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"h-4 bg-gray-200 rounded-full dark:bg-gray-700 max-w-[360px]"})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),aM=()=>h.jsxRuntimeExports.jsxs("div",{role:"status",className:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",children:[h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between pt-4",children:[h.jsxRuntimeExports.jsxs("div",{children:[h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-2.5"}),h.jsxRuntimeExports.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded-full dark:bg-gray-700"})]}),h.jsxRuntimeExports.jsx("div",{className:"h-3.5 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]}),h.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Loading..."})]}),cM={default:sv,avatar:oM,image:iM,"image-description":sM,list:aM},uM=({type:e="default"})=>{const t=cM[e]??sv;return h.jsxRuntimeExports.jsx(t,{})},lM={sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4"},dM={primary:"bg-primary-blue",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500",info:"bg-blue-400"},fM={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},hM=({classNames:e,rangeColor:t="primary",customRangeClass:n,size:r="md",showLabels:o=!1,formatLabel:i,min:c=0,max:l=100,...u})=>{const s=a=>i?i(a):a.toString();return h.jsxRuntimeExports.jsxs("div",{className:"w-full",children:[h.jsxRuntimeExports.jsxs(hR,{className:M.classNames("relative flex items-center select-none touch-none w-full",e==null?void 0:e.root),min:c,max:l,...u,children:[h.jsxRuntimeExports.jsx(pR,{className:M.classNames("relative grow rounded-full bg-gray-200",lM[r],e==null?void 0:e.track),children:h.jsxRuntimeExports.jsx(mR,{className:M.classNames("absolute rounded-full h-full",n||dM[t],e==null?void 0:e.range)})}),h.jsxRuntimeExports.jsx(gR,{className:M.classNames("block rounded-full bg-white border-2 border-primary-blue shadow-md hover:shadow-lg","focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","transition-shadow cursor-pointer",fM[r],e==null?void 0:e.thumb)})]}),o&&h.jsxRuntimeExports.jsxs("div",{className:M.classNames("flex justify-between mt-2 text-sm text-gray-600",e==null?void 0:e.labels),children:[h.jsxRuntimeExports.jsx("span",{className:e==null?void 0:e.startLabelClass,children:s(c)}),h.jsxRuntimeExports.jsx("span",{className:e==null?void 0:e.endLabelClass,children:s(l)})]})]})},pM={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},mM={sm:"size-5",md:"size-6",lg:"size-7",xl:"size-8"},is={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},gM={sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},xM={sm:2,md:4,lg:6,xl:8},kd=({disabled:e,onClick:t,arrow:n,size:r})=>{const o=`${e?"text-gray-6":"text-primary-blue"}`,i={right:h.jsxRuntimeExports.jsx(ne.SvgRight,{className:o}),left:h.jsxRuntimeExports.jsx(ne.SvgLeft,{className:o})},c=M.classNames("flex items-center justify-center rounded-md border disabled:border-zinc-300 disabled:bg-neutral-100 disabled:text-stone-300 shadow-none transition-colors duration-300 ease-linear bg-white border-gray-5 text-gray-4 transitions-all easy-out hover:text-blue-900 hover:border-blue-900",pM[r]);return h.jsxRuntimeExports.jsx("button",{"aria-label":`stepButton-${n}`,type:"button",className:c,disabled:e,onClick:t,children:i[n]})},vM=({id:e,name:t,status:n,href:r,size:o="md"})=>{const i=M.classNames("flex items-center justify-center rounded-full",mM[o],{"border border-primary-blue":n==="COMPLETE","bg-primary-blue":n==="CURRENT","border border-gray-6":n==="PENDING"}),c=M.classNames("font-medium",is[o],{"text-primary-blue":n==="CURRENT","text-gray-6":n==="PENDING"}),l=M.classNames("font-medium",is[o],{"text-white":n==="CURRENT","text-gray-6":n==="PENDING"});return h.jsxRuntimeExports.jsxs("a",{href:r,className:M.classNames("flex gap-2 font-medium items-center",is[o]),children:[h.jsxRuntimeExports.jsx("span",{className:i,children:n==="COMPLETE"?h.jsxRuntimeExports.jsx(ne.SvgDone,{className:M.classNames("text-primary-blue",gM[o]),"aria-hidden":"true"}):h.jsxRuntimeExports.jsx("span",{className:l,children:e})}),h.jsxRuntimeExports.jsx("span",{className:c,children:t})]})},yM=({visibleSteps:e,size:t})=>{const n=xM[t];return h.jsxRuntimeExports.jsx(Ne,{gap:n,justify:"center",children:e.map((r,o)=>h.jsxRuntimeExports.jsxs(Ne,{gap:n,align:"center",children:[h.jsxRuntimeExports.jsx(vM,{...r,size:t}),o+1!==e.length&&h.jsxRuntimeExports.jsx(ne.SvgRight,{className:"text-gray-5"})]},crypto.randomUUID()))})},ss=(e,t,n,r)=>e?4:t?3:n?2:r?1:3,EM=e=>{const t=e.find(n=>n.status==="CURRENT");return t?Number(t.id)-1:0},bM=e=>e===0,wM=(e,t,n)=>e>=t-n,RM=e=>e-1,SM=e=>e+1,CM=({steps:e,size:t="md",className:n="",withNavigation:r=!0})=>{const{xs:o,sm:i,md:c,lg:l}=Gd.useBreakpoint(),[u,s]=S.useState(()=>ss(l,c,i,o)),a=EM(e),[d,f]=S.useState(()=>{const b=ss(l,c,i,o),w=Math.max(0,e.length-b);return Math.min(a,w)}),[p,m]=S.useState([]);S.useEffect(()=>{s(ss(l,c,i,o))},[o,i,c,l]),S.useEffect(()=>{const b=Math.min(d+u,e.length);m(e.slice(d,b))},[d,e,u]);const g=()=>f(RM(d)),x=()=>f(SM(d)),y=bM(d),E=wM(d,e.length,u);return h.jsxRuntimeExports.jsxs("div",{className:M.classNames("flex flex-row items-center w-full gap-4",{"justify-between":r,"justify-center":!r},{[n]:n}),children:[r&&h.jsxRuntimeExports.jsx(kd,{arrow:"left",disabled:y,onClick:g,size:t}),h.jsxRuntimeExports.jsx(yM,{visibleSteps:p,size:t}),r&&h.jsxRuntimeExports.jsx(kd,{arrow:"right",disabled:E,onClick:x,size:t})]})},Sc={md:{root:"h-[22px] w-11",thumb:"size-[18px]",children:"h-4 w-4 text-xs"},sm:{root:"h-4 w-7",thumb:"size-3",children:"h-3 w-3 text-[10px]"}},An={root:"relative peer focus-visible:border-ring focus-visible:ring-ring/50 flex px-px shrink-0 items-center justify-start rounded-full border border-transparent shadow-xs outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-6 dark:data-[state=unchecked]:bg-input/80 data-[state=checked]:justify-end transition-colors duration-200",thumb:"relative z-10 bg-white pointer-events-none block rounded-full ring-0 shadow-sm",children:"absolute flex items-center justify-center text-white/80 transition-opacity duration-200",unCheckedChildren:"left-1 data-[state=checked]:opacity-0 data-[state=checked]:invisible",checkedChildren:"right-1 data-[state=unchecked]:opacity-0 data-[state=unchecked]:invisible"},_M={default:"data-[state=checked]:bg-[#0047BA]",success:"data-[state=checked]:bg-green-500",danger:"data-[state=checked]:bg-red-500"},jM=(e,t,n,r)=>M.classNames(An.root,_M[e],Sc[t].root,n&&"cursor-not-allowed",r),Ld=(e,t)=>{const n=t?An.checkedChildren:An.unCheckedChildren;return M.classNames(An.children,n,Sc[e].children)},PM=e=>{const t=typeof e=="string"?e:e.text,n=typeof e=="string"?"right":e.position;return{labelText:t,labelPosition:n}},Fd=e=>M.classNames("text-sm text-foreground",e&&"opacity-50"),TM=e=>M.classNames("flex items-center gap-2",e&&"cursor-not-allowed"),AM={type:"spring",stiffness:500,damping:30,mass:1},OM=({className:e,label:t,type:n="default",size:r="md",checked:o,defaultChecked:i=!1,disabled:c=!1,onCheckedChange:l,checkedChildren:u,unCheckedChildren:s,...a})=>{const d=Sc[r],f=h.jsxRuntimeExports.jsxs(bR,{className:jM(n,r,c,e),checked:o,defaultChecked:i,disabled:c,onCheckedChange:l,...a,children:[s&&h.jsxRuntimeExports.jsx("div",{className:Ld(r,!1),children:s}),h.jsxRuntimeExports.jsx(wR,{asChild:!0,children:h.jsxRuntimeExports.jsx(re.div,{className:M.classNames(An.thumb,d.thumb),layout:!0,transition:AM,whileTap:{scale:.95}})}),u&&h.jsxRuntimeExports.jsx("div",{className:Ld(r,!0),children:u})]});if(t){const{labelText:p,labelPosition:m}=PM(t);return h.jsxRuntimeExports.jsxs("div",{className:TM(c),children:[m==="left"&&h.jsxRuntimeExports.jsx("span",{className:Fd(c),children:p}),f,m==="right"&&h.jsxRuntimeExports.jsx("span",{className:Fd(c),children:p})]})}return f},MM={success:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconCheckCircle,{width:16,height:16}),bgColor:"bg-green-1",textColor:"text-green-6",borderColor:"border-green-3",closeButtonColor:"hover:bg-green-2"},info:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconInfoCircle,{width:16,height:16}),bgColor:"bg-blue-1",textColor:"text-blue-6",borderColor:"border-blue-3",closeButtonColor:"hover:bg-blue-2"},warning:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconWarningCircle,{width:16,height:16}),bgColor:"bg-gold-1",textColor:"text-gold-6",borderColor:"border-gold-3",closeButtonColor:"hover:bg-gold-2"},error:{icon:h.jsxRuntimeExports.jsx(ne.SvgIconErrorCircle,{width:16,height:16}),bgColor:"bg-red-1",textColor:"text-red-6",borderColor:"border-red-3",closeButtonColor:"hover:bg-red-2"}},IM=({children:e,type:t="info",showIcon:n=!1,closable:r=!1,onClose:o,className:i="",icon:c,bgColor:l,textColor:u,borderColor:s,...a})=>{const d=!!(l||u||s),f=MM[t],p=c||(n?f.icon:null),m=M.classNames("inline-flex items-center gap-2 px-2 py-2 rounded border text-sm font-medium leading-none rounded-sm",{[f.bgColor]:!d,[f.textColor]:!d,[f.borderColor]:!d,[i]:i}),g=d?{backgroundColor:l,color:u,borderColor:s}:void 0,x=M.classNames("rounded transition-colors cursor-pointer text-black/[0.45]",{[f.closeButtonColor]:!d});return h.jsxRuntimeExports.jsxs("span",{className:m,style:g,...a,children:[p&&h.jsxRuntimeExports.jsx("span",{className:"inline-flex shrink-0",children:p}),h.jsxRuntimeExports.jsx("span",{className:"inline-flex items-center",children:e}),r&&h.jsxRuntimeExports.jsx("button",{onClick:o,className:x,"aria-label":"Remove tag",type:"button",children:h.jsxRuntimeExports.jsx(ne.SvgClose,{width:16,height:16})})]})},DM={initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},NM=({type:e,items:t,currentActiveKey:n,contentClassName:r})=>{var o;if(e==="segmented"){const i=(o=t.find(c=>c.key===n))==null?void 0:o.content;return h.jsxRuntimeExports.jsx(nu,{value:n,forceMount:!0,asChild:!0,children:h.jsxRuntimeExports.jsx(Ot,{mode:"wait",initial:!1,children:h.jsxRuntimeExports.jsx(re.div,{className:M.classNames("min-w-full",r),variants:DM,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:"easeInOut"},children:i},n)})})}return h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:t.map(i=>h.jsxRuntimeExports.jsx(nu,{value:i.key,className:M.classNames("min-w-full",r),children:i.content},i.key))})},kM=(e,t)=>M.classNames({"text-sm font-normal":e==="default"||e==="underline"||e==="pills","border-b border-gray-200":e==="underline","border-b border-gray-200 text-lg font-semibold":e==="with-icon","bg-gray-100 rounded-xl p-1 text-lg text-grays-Macropay-07 font-normal":e==="segmented"},t),LM=e=>M.classNames("select-none",{"flex flex-wrap text-center text-gray-500 border-b border-gray-200 font-normal":e==="default"||e==="pills","-mb-px":e==="underline","flex flex-wrap -mb-px font-normal text-sm text-center text-gray-500":e==="with-icon","grid grid-flow-col justify-stretch items-center text-lg font-normal text-center text-lg sm:w-full":e==="segmented"}),FM=e=>M.classNames({"inline-block p-3 py-3 rounded-t-lg active:text-gray-500 active:bg-gray-50":e==="default"||e==="pills","inline-block p-3 py-3 border-b-2 rounded-t-lg active:border-primary-blue":e==="underline","inline-flex items-center justify-center p-3 border-b-2 rounded-t-lg active:border-gray-300":e==="with-icon","md:inline-block px-2 py-3 rounded-lg min-w-full h-full items-center text-center flex justify-center text-sm":e==="segmented"}),VM=(e,t)=>M.classNames({[`font-bold text-${t} bg-white`]:e==="default"||e==="pills",[`text-${t} border-b-2 border-primary-blue`]:e==="underline"||e==="with-icon",[`font-bold text-${t} active:text-${t}`]:e==="segmented"}),BM=({type:e,items:t,currentActiveKey:n,activeColorTabs:r,className:o})=>h.jsxRuntimeExports.jsx("div",{className:kM(e,o),children:h.jsxRuntimeExports.jsx(_R,{className:LM(e),children:t.map(({key:i,label:c,disabled:l})=>h.jsxRuntimeExports.jsxs(jR,{value:i,disabled:l,className:M.classNames("h-full relative",FM(e),i===n&&VM(e,r),l&&"text-gray-300 cursor-not-allowed"),children:[e==="segmented"&&i===n&&h.jsxRuntimeExports.jsx(re.div,{layoutId:"segmented-indicator",className:"absolute inset-0 bg-white rounded-lg z-0","data-testid":"tab-indicator",initial:!1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}}),h.jsxRuntimeExports.jsx("span",{className:"relative z-10",children:c})]},i))})}),$M=({currentActiveKey:e,type:t="default",items:n,onChange:r,className:o,contentClassName:i,activeColorTabs:c="primary-blue"})=>h.jsxRuntimeExports.jsxs(CR,{value:e,onValueChange:r,className:"flex flex-col gap-4",children:[h.jsxRuntimeExports.jsx(BM,{type:t,items:n,currentActiveKey:e,activeColorTabs:c,className:o}),h.jsxRuntimeExports.jsx(NM,{type:t,items:n,currentActiveKey:e,contentClassName:i})]}),UM=({name:e,label:t,children:n})=>h.jsxRuntimeExports.jsxs(D1,{name:e,children:[t&&h.jsxRuntimeExports.jsx(N1,{children:t}),n]}),GM=({type:e,error:t,disabled:n,readOnly:r,inputSize:o,className:i="",classesNames:c})=>M.classNames("block w-full p-2 focus:outline-none text-black rounded-lg h-[150px] transition duration-200 ease-in-out",{"border border-gray-7 focus:border-tints-Blue-30 focus:shadow-[0px_0px_0px_2px_#E6EDF8]":e==="normal"&&!n&&!t,"bg-transparent border-b border-gray-7 rounded-none focus:border-b-tints-Blue-30":e==="underline"&&!t&&!n,"border-red-400 focus:shadow-[0px_0px_0px_2px_#FFCCC7]":t&&e!=="underline","border-b border-red-400 rounded-none":t&&e==="underline","cursor-not-allowed bg-gray-3 text-gray-6":n&&e==="normal","cursor-not-allowed text-gray-6":n&&e==="underline","cursor-not-allowed font-semibold text-primary-blue":r,"h-8 text-sm":o==="sm","h-9 text-base":o==="md","h-10 text-base":o==="lg","h-12 text-base":o==="xl",[i]:i,[(c==null?void 0:c.input)??""]:c==null?void 0:c.input}),zM=({type:e="normal",inputSize:t="xl",className:n,classesNames:r,clearOnFocus:o,onFocus:i,...c})=>h.jsxRuntimeExports.jsx(k1,{asChild:!0,children:h.jsxRuntimeExports.jsx("textarea",{...c,className:GM({type:e,inputSize:t,className:n,classesNames:r,disabled:c.disabled,readOnly:c.readOnly}),onFocus:l=>{o&&(l.currentTarget.value=""),i==null||i(l)}})}),HM=({footer:e,current:t=0,max:n})=>h.jsxRuntimeExports.jsxs("div",{className:"flex justify-between pt-1 text-sm text-gray-7",children:[h.jsxRuntimeExports.jsx("span",{children:e}),n&&h.jsxRuntimeExports.jsx("span",{children:`${t} / ${n}`})]}),WM=({name:e,label:t,labelFooter:n,error:r,maxLength:o,minLength:i,defaultValue:c="",classesNames:l,...u})=>{const[s,a]=S.useState(c);return h.jsxRuntimeExports.jsx(I1,{children:h.jsxRuntimeExports.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:l==null?void 0:l.container,children:[h.jsxRuntimeExports.jsx(UM,{name:e,label:t,children:h.jsxRuntimeExports.jsx(zM,{...u,maxLength:o,minLength:i,value:s,onChange:d=>{var f;a(d.target.value),(f=u.onChange)==null||f.call(u,d)}})}),h.jsxRuntimeExports.jsx(HM,{footer:n??`${i} caracteres requeridos`,current:s.length,max:o}),r&&h.jsxRuntimeExports.jsx(L1,{className:l==null?void 0:l.messageError,children:r})]})})},qM=({className:e,content:t,children:n,...r})=>{const o=typeof t=="string";return h.jsxRuntimeExports.jsx(YR,{children:h.jsxRuntimeExports.jsxs(ZR,{children:[h.jsxRuntimeExports.jsx(QR,{asChild:!0,children:n}),h.jsxRuntimeExports.jsx(JR,{children:h.jsxRuntimeExports.jsx(eS,{className:e,asChild:!0,...r,children:h.jsxRuntimeExports.jsxs(re.div,{className:M.classNames({"bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0":o&&!e}),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:[t,h.jsxRuntimeExports.jsx(tS,{className:"w-4 h-2"})]})})})]})})};var Cc=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(Cc||{});const{cols:KM,gap:XM,justifyItems:YM,alignContent:ZM}=Cc,QM=({cols:e,align:t,gap:n,justify:r,className:o="",...i})=>h.jsxRuntimeExports.jsx(re.div,{className:M.classNames("grid",{[o]:o},Oe.generateClasses(KM,e),Oe.generateClasses(XM,n),Oe.generateClasses(YM,r),Oe.generateClasses(ZM,t)),...i}),{span:JM,start:eI,end:tI,justifySelf:nI,alignSelf:rI}=Cc,oI=({align:e,end:t,justify:n,span:r,start:o,className:i="",...c})=>h.jsxRuntimeExports.jsx(re.div,{...c,className:M.classNames({[i]:i},Oe.generateClasses(JM,r),Oe.generateClasses(eI,o),Oe.generateClasses(tI,t),Oe.generateClasses(nI,n),Oe.generateClasses(rI,e))}),Vd=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bd=M.clsx,iI=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Bd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,c=Object.keys(o).map(s=>{const a=n==null?void 0:n[s],d=i==null?void 0:i[s];if(a===null)return null;const f=Vd(a)||Vd(d);return o[s][f]}),l=n&&Object.entries(n).reduce((s,a)=>{let[d,f]=a;return f===void 0||(s[d]=f),s},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((s,a)=>{let{class:d,className:f,...p}=a;return Object.entries(p).every(m=>{let[g,x]=m;return Array.isArray(x)?x.includes({...i,...l}[g]):{...i,...l}[g]===x})?[...s,d,f]:s},[]);return Bd(e,c,u,n==null?void 0:n.class,n==null?void 0:n.className)},av=iI("hover:text-white cursor-pointer aria-pressed:bg-primary-blue data-[state=on]:text-white focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-primary-blue gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-primary-blue inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border-gray-5 hover:bg-primary-blue border bg-transparent"},size:{default:"h-8 min-w-8 px-2",sm:"h-7 min-w-7 rounded-md px-1.5 text-[0.8rem]",lg:"h-9 min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}}),sI=({className:e,variant:t="default",size:n="default",...r})=>h.jsxRuntimeExports.jsx(PR,{"data-slot":"toggle",className:M.cn(av({variant:t,size:n,className:e})),...r}),cv=S.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"}),aI=({className:e,children:t,variant:n="default",size:r="default",...o})=>{const i=S.useContext(cv);return h.jsxRuntimeExports.jsx(DR,{"data-slot":"toggle-group-item","data-variant":i.variant||n,"data-size":i.size||r,"data-spacing":i.spacing,className:M.cn("group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",av({variant:i.variant||n,size:i.size||r}),e),...o,children:t})},uv=({className:e,variant:t,size:n,spacing:r=0,orientation:o="horizontal",children:i,...c})=>h.jsxRuntimeExports.jsx(IR,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":o,style:{"--gap":r},className:M.cn("rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",e),...c,children:h.jsxRuntimeExports.jsx(cv.Provider,{value:{variant:t,size:n,spacing:r,orientation:o},children:i})});uv.Item=aI;exports.Accordion=GP;exports.Alert=KP;exports.Avatar=YP;exports.Button=Ys;exports.Card=nT;exports.Checkbox=Px;exports.Col=oI;exports.Divider=uT;exports.Drawer=fT;exports.Dropdown=yT;exports.Empty=ET;exports.Flex=Ne;exports.Input=MT;exports.List=KT;exports.Modal=tA;exports.Notification=uA;exports.Pagination=Nx;exports.Popover=vA;exports.Portal=Tx;exports.Progress=bA;exports.QRBarcode=jO;exports.RadioGroup=PO;exports.Row=QM;exports.Segmented=XO;exports.Select=rM;exports.Skeleton=uM;exports.Slider=hM;exports.Spinner=dv;exports.SpinnerSizeMap=Wd;exports.Steps=CM;exports.Switch=OM;exports.Tabs=$M;exports.Tag=IM;exports.TextArea=WM;exports.Toggle=sI;exports.ToggleGroup=uv;exports.Tooltip=qM;exports.Typography=dn;