@qratilabs/qrati-connect 2.1.0 → 2.2.0

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 (62) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +19 -23
  3. package/element/{AuthLayout-3MSZD8ro.js → AuthLayout-CyO9f3yS.js} +1 -1
  4. package/element/ContentsPage-DTXin7QX.js +16 -0
  5. package/element/CuratePage-Da329OuY.js +1 -0
  6. package/element/{Dialog-Czt6Sflr.js → Dialog-DUE33ABe.js} +1 -1
  7. package/element/{DotLottiePlayer-KGhHUH8A.js → DotLottiePlayer-8MlLiMyZ.js} +1 -1
  8. package/element/{EventHeaderAdminButtons-Bf9mlo12.js → EventHeaderAdminButtons-ZWRtXY11.js} +1 -1
  9. package/element/{FolderBreadcrumb-DNV7iAX9.js → FolderBreadcrumb-CEs6rjY8.js} +1 -1
  10. package/element/{ForgotPasswordPage-DhJLbJss.js → ForgotPasswordPage-DcrSZb4Y.js} +1 -1
  11. package/element/{InputField-DUBquu2F.js → InputField-C89vrW2H.js} +1 -1
  12. package/element/{LazyLoadImage-mysq1kzg.js → LazyLoadImage-CCgs8tnO.js} +1 -1
  13. package/element/LeaderboardPage-CTDNDeXw.js +1 -0
  14. package/element/{LoginPage-CLi2iWgA.js → LoginPage-smlCb8hl.js} +1 -1
  15. package/element/{NCMVHL6D-BT50cfFq.js → NCMVHL6D-mctK8Nwg.js} +1 -1
  16. package/element/{PublicEvents-CDqFOpG_.js → PublicEvents-D2zm99Nv.js} +1 -1
  17. package/element/{RegisterPage-BvkXlBF7.js → RegisterPage-B6iFPEOf.js} +1 -1
  18. package/element/{SocialLoginButton-C6ifRxgk.js → SocialLoginButton-Bmw5w2Wo.js} +1 -1
  19. package/element/{UploadPage-D8sD6xou.js → UploadPage-CeUd2Ngw.js} +1 -1
  20. package/element/{VideoPlayer-DYZi3q89.js → VideoPlayer-D3O9yQy5.js} +1 -1
  21. package/element/element.es.js +1 -1
  22. package/element/{heic2any-BSfHO3L1.js → heic2any-ChkiLE0t.js} +1 -1
  23. package/element/{index-BPzTfirb.js → index-Dc66pO4G.js} +1 -1
  24. package/element/{index-DH-JBzym.js → index-eZDSy_OJ.js} +3 -3
  25. package/element/{index.esm-DkIaEEXH.js → index.esm-fgGipFtS.js} +1 -1
  26. package/element/{photoswipe-2NEQ5ums.js → photoswipe-CqOSmPl3.js} +1 -1
  27. package/element/styles.css +1 -1
  28. package/element/{tslib.es6-BxRwMfGT.js → tslib.es6-CrRFG_pJ.js} +1 -1
  29. package/element/{useOrgAccess-Ct-0TE_0.js → useOrgAccess-DwChBdHT.js} +1 -1
  30. package/element/web.es.js +1 -1
  31. package/package.json +1 -1
  32. package/react/{cfmNC4u4.js → 01YpbkrK.js} +1 -1
  33. package/react/{C19RNf1-.js → 3-7xITP8.js} +1 -1
  34. package/react/{B6Q07wSK.js → B-6zXxDr.js} +1 -1
  35. package/react/{DewCXsIG.js → BC4qG4vp.js} +1 -1
  36. package/react/BG98DA1v.js +16 -0
  37. package/react/{DZSBvFZj.js → Bhx5l06G.js} +1 -1
  38. package/react/{CnZDMows.js → C9K7NHY-.js} +1 -1
  39. package/react/{D13n_XMV.js → CQ_GAdf6.js} +1 -1
  40. package/react/{BNLiqqVu.js → CwHDgEUw.js} +1 -1
  41. package/react/{BAH-hCQv.js → Cwug7XlJ.js} +1 -1
  42. package/react/{Om2PJsaT.js → Cy0hl_vl.js} +1 -1
  43. package/react/{CEvQrL-L.js → D9rAIIEm.js} +1 -1
  44. package/react/{l6We_eoY.js → DBT304mv.js} +1 -1
  45. package/react/{DLmxhJVk.js → DDDUG6Th.js} +1 -1
  46. package/react/{DDTQHueT.js → DGbDKxZM.js} +1 -1
  47. package/react/{vr3m2X_d.js → DGrws0Ed.js} +1 -1
  48. package/react/{C_PorEjJ.js → DOyHX7jh.js} +1 -1
  49. package/react/{BtdEyRX5.js → DR9E1aMG.js} +3 -3
  50. package/react/DgG5NhsB.js +1 -0
  51. package/react/{Cmam44O7.js → DlRtYLod.js} +1 -1
  52. package/react/DtITAxUS.js +1 -0
  53. package/react/{Dr414MeD.js → HRRHpVRs.js} +1 -1
  54. package/react/{Dnp0ZDLi.js → YK1PgWHO.js} +1 -1
  55. package/react/index.es.js +2 -2
  56. package/umd/web.umd.js +43 -43
  57. package/element/ContentsPage-DEW0I2hK.js +0 -16
  58. package/element/CuratePage-B-4T8hoM.js +0 -1
  59. package/element/LeaderboardPage-DMRayt3X.js +0 -1
  60. package/react/1kKVsWzJ.js +0 -1
  61. package/react/D1IaUXEN.js +0 -16
  62. package/react/DSEmowWV.js +0 -1
@@ -1 +1 @@
1
- import{a as e,j as t,a3 as n,V as r,U as o,u as a,W as c,c as i}from"./index-DH-JBzym.js";import{r as s,R as u,a as l,b as d,c as f}from"./tslib.es6-BxRwMfGT.js";function p(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function m(n,r=[]){let o=[];const a=()=>{const t=o.map(t=>e.createContext(t));return function(r){const o=r?.[n]||t;return e.useMemo(()=>({[`__scope${n}`]:{...r,[n]:o}}),[r,o])}};return a.scopeName=n,[function(r,a){const c=e.createContext(a),i=o.length;o=[...o,a];const s=r=>{const{scope:o,children:a,...s}=r,u=o?.[n]?.[i]||c,l=e.useMemo(()=>s,Object.values(s));return t.jsx(u.Provider,{value:l,children:a})};return s.displayName=r+"Provider",[s,function(t,o){const s=o?.[n]?.[i]||c,u=e.useContext(s);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},v(a,...r)]}function v(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var h=globalThis?.document?e.useLayoutEffect:()=>{},g=n[" useId ".trim().toString()]||(()=>{}),y=0;function b(t){const[n,r]=e.useState(g());return h(()=>{r(e=>e??String(y++))},[t]),t||(n?`radix-${n}`:"")}var E=n[" useInsertionEffect ".trim().toString()]||h;function w({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[a,c,i]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),a=e.useRef(r),c=e.useRef(n);return E(()=>{c.current=n},[n]),e.useEffect(()=>{a.current!==r&&(c.current?.(r),a.current=r)},[r,a]),[r,o,c]}({defaultProp:n,onChange:r}),s=void 0!==t,u=s?t:a;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;e!==s&&console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${s?"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.`),n.current=s},[s,o])}return[u,e.useCallback(e=>{if(s){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&i.current?.(n)}else c(e)},[s,t,c,i])]}var N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((n,o)=>{const a=r(`Primitive.${o}`),c=e.forwardRef((e,n)=>{const{asChild:r,...c}=e,i=r?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),t.jsx(i,{...c,ref:n})});return c.displayName=`Primitive.${o}`,{...n,[o]:c}},{});function x(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var C,R="dismissableLayer.update",D="dismissableLayer.pointerDownOutside",S="dismissableLayer.focusOutside",q=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M=e.forwardRef((n,r)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:c,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...d}=n,f=e.useContext(q),[m,v]=e.useState(null),h=m?.ownerDocument??globalThis?.document,[,g]=e.useState({}),y=o(r,e=>v(e)),b=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(E),M=m?b.indexOf(m):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,L=M>=w,_=function(t,n=globalThis?.document){const r=x(t),o=e.useRef(!1),a=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){O(D,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...f.branches].some(e=>e.contains(t));!L||n||(i?.(e),u?.(e),e.defaultPrevented||l?.())},h),k=function(t,n=globalThis?.document){const r=x(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{e.target&&!o.current&&O(S,r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),u?.(e),e.defaultPrevented||l?.())},h);return function(t,n=globalThis?.document){const r=x(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{M===f.layers.size-1&&(c?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),e.useEffect(()=>{if(m)return a&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(C=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),T(),()=>{a&&1===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=C)}},[m,h,a,f]),e.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),T())},[m,f]),e.useEffect(()=>{const e=()=>g({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),t.jsx(N.div,{...d,ref:y,style:{pointerEvents:P?L?"auto":"none":void 0,...n.style},onFocusCapture:p(n.onFocusCapture,k.onFocusCapture),onBlurCapture:p(n.onBlurCapture,k.onBlurCapture),onPointerDownCapture:p(n.onPointerDownCapture,_.onPointerDownCapture)})});M.displayName="DismissableLayer";var P=e.forwardRef((n,r)=>{const a=e.useContext(q),c=e.useRef(null),i=o(r,c);return e.useEffect(()=>{const e=c.current;if(e)return a.branches.add(e),()=>{a.branches.delete(e)}},[a.branches]),t.jsx(N.div,{...n,ref:i})});function T(){const e=new CustomEvent(R);document.dispatchEvent(e)}function O(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}P.displayName="DismissableLayerBranch";var L="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},A=e.forwardRef((n,r)=>{const{loop:a=!1,trapped:c=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...u}=n,[l,d]=e.useState(null),f=x(i),p=x(s),m=e.useRef(null),v=o(r,e=>d(e)),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(c){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?m.current=t:W(m.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||W(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&W(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[c,l,h.paused]),e.useEffect(()=>{if(l){$.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(L,k);l.addEventListener(L,f),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(W(r,{select:t}),document.activeElement!==n)return}(function(e){return e.filter(e=>"A"!==e.tagName)}(j(l)),{select:!0}),document.activeElement===e&&W(l))}return()=>{l.removeEventListener(L,f),setTimeout(()=>{const t=new CustomEvent(_,k);l.addEventListener(_,p),l.dispatchEvent(t),t.defaultPrevented||W(e??document.body,{select:!0}),l.removeEventListener(_,p),$.remove(h)},0)}}},[l,f,p,h]);const g=e.useCallback(e=>{if(!a&&!c||h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,o]=function(e){const t=j(e),n=I(t,e),r=I(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),a&&W(o,{select:!0})):(e.preventDefault(),a&&W(r,{select:!0})):n===t&&e.preventDefault()}},[a,c,h.paused]);return t.jsx(N.div,{tabIndex:-1,...u,ref:v,onKeyDown:g})});function j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function I(e,t){for(const n of e)if(!F(n,{upTo:t}))return n}function F(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function W(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}A.displayName="FocusScope";var $=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=U(e,t),e.unshift(t)},remove(t){e=U(e,t),e[0]?.resume()}}}();function U(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var B=e.forwardRef((n,r)=>{const{container:o,...a}=n,[c,i]=e.useState(!1);h(()=>i(!0),[]);const s=o||c&&globalThis?.document?.body;return s?u.createPortal(t.jsx(N.div,{...a,ref:r}),s):null});B.displayName="Portal";var z=t=>{const{present:n,children:r}=t,a=function(t){const[n,r]=e.useState(),o=e.useRef(null),a=e.useRef(t),c=e.useRef("none"),i=t?"mounted":"unmounted",[s,u]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=K(o.current);c.current="mounted"===s?e:"none"},[s]),h(()=>{const e=o.current,n=a.current;if(n!==t){const r=c.current,o=K(e);u(t?"MOUNT":"none"===o||"none"===e?.display?"UNMOUNT":n&&r!==o?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,u]),h(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const c=K(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&c&&(u("ANIMATION_END"),!a.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},i=e=>{e.target===n&&(c.current=K(o.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),c="function"==typeof r?r({present:a.isPresent}):e.Children.only(r),i=o(a.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(c));return"function"==typeof r||a.isPresent?e.cloneElement(c,{ref:i}):null};function K(e){return e?.animationName||"none"}z.displayName="Presence";var X=0;function Y(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??H()),document.body.insertAdjacentElement("beforeend",e[1]??H()),X++,()=>{1===X&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),X--}},[])}function H(){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 Z="right-scroll-bar-position",V="width-before-scroll-bar";function G(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var J=typeof window<"u"?e.useLayoutEffect:e.useEffect,Q=new WeakMap;function ee(t,n){var r=function(t,n){var r=e.useState(function(){return{value:t,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}(null,function(e){return t.forEach(function(t){return G(t,e)})});return J(function(){var e=Q.get(r);if(e){var n=new Set(e),o=new Set(t),a=r.current;n.forEach(function(e){o.has(e)||G(e,null)}),o.forEach(function(e){n.has(e)||G(e,a)})}Q.set(r,t)},[t]),r}function te(e){return e}var ne=function(t){var n=t.sideCar,r=d(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,l({},r))};ne.isSideCarExport=!0;var re=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=te);var n=[],r=!1;return{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(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=l({async:!0,ssr:!1},e),t}(),oe=function(){},ae=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:oe,onWheelCapture:oe,onTouchMoveCapture:oe}),a=o[0],c=o[1],i=t.forwardProps,s=t.children,u=t.className,f=t.removeScrollBar,p=t.enabled,m=t.shards,v=t.sideCar,h=t.noRelative,g=t.noIsolation,y=t.inert,b=t.allowPinchZoom,E=t.as,w=void 0===E?"div":E,N=t.gapMode,x=d(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,R=ee([r,n]),D=l(l({},x),a);return e.createElement(e.Fragment,null,p&&e.createElement(C,{sideCar:re,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:c,allowPinchZoom:!!b,lockRef:r,gapMode:N}),i?e.cloneElement(e.Children.only(s),l(l({},D),{ref:R})):e.createElement(w,l({},D,{className:u,ref:R}),s))});ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ae.classNames={fullWidth:V,zeroRight:Z};function ce(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var ie=function(){var e=0,t=null;return{add:function(n){0==e&&(t=ce())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},se=function(){var t=function(){var t=ie();return function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])}}();return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},ue={left:0,top:0,right:0,gap:0},le=function(e){return parseInt(e||"",10)||0},de=function(e){if(void 0===e&&(e="margin"),typeof window>"u")return ue;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[le(n),le(r),le(o)]}(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])}},fe=se(),pe="data-scroll-locked",me=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(pe,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Z," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(V," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(Z," .").concat(Z," {\n right: 0 ").concat(r,";\n }\n \n .").concat(V," .").concat(V," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(pe,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},ve=function(){var e=parseInt(document.body.getAttribute(pe)||"0",10);return isFinite(e)?e:0},he=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(pe,(ve()+1).toString()),function(){var e=ve()-1;e<=0?document.body.removeAttribute(pe):document.body.setAttribute(pe,e.toString())}},[]);var c=e.useMemo(function(){return de(a)},[a]);return e.createElement(fe,{styles:me(c,!n,a,r?"":"!important")})},ge=!1;if(typeof window<"u")try{var ye=Object.defineProperty({},"passive",{get:function(){return ge=!0,!0}});window.addEventListener("test",ye,ye),window.removeEventListener("test",ye,ye)}catch{ge=!1}var be=!!ge&&{passive:!1},Ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},we=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),Ne(e,r)){var o=xe(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ne=function(e,t){return"v"===e?function(e){return Ee(e,"overflowY")}(t):function(e){return Ee(e,"overflowX")}(t)},xe=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Ce=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Re=function(e){return[e.deltaX,e.deltaY]},De=function(e){return e&&"current"in e?e.current:e},Se=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},qe=0,Me=[];function Pe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Te=(Oe=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(qe++)[0],c=e.useState(se)[0],i=e.useRef(t);e.useEffect(function(){i.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=f([t.lockRef.current],(t.shards||[]).map(De),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=Ce(e),c=r.current,s="deltaX"in e?e.deltaX:c[0]-a[0],u="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=we(d,l);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=we(d,l)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||u)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,c=n.target,i=t.contains(c),s=!1,u=a>0,l=0,d=0;do{if(!c)break;var f=xe(e,c),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Ne(e,c)&&(l+=m,d+=p);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!i&&c!==document.body||i&&(t.contains(c)||t===c));return(u&&Math.abs(l)<1||!u&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:u)},[]),u=e.useCallback(function(e){var t=e;if(Me.length&&Me[Me.length-1]===c){var r="deltaY"in t?Re(t):Ce(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)return void(t.cancelable&&t.preventDefault());if(!o){var a=(i.current.shards||[]).map(De).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?s(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),l=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:Pe(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=e.useCallback(function(e){r.current=Ce(e),o.current=void 0},[]),p=e.useCallback(function(e){l(e.type,Re(e),e.target,s(e,t.lockRef.current))},[]),m=e.useCallback(function(e){l(e.type,Ce(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return Me.push(c),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,be),document.addEventListener("touchmove",u,be),document.addEventListener("touchstart",d,be),function(){Me=Me.filter(function(e){return e!==c}),document.removeEventListener("wheel",u,be),document.removeEventListener("touchmove",u,be),document.removeEventListener("touchstart",d,be)}},[]);var v=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(c,{styles:Se(a)}):null,v?e.createElement(he,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},re.useMedium(Oe),ne);var Oe,Le=e.forwardRef(function(t,n){return e.createElement(ae,l({},t,{ref:n,sideCar:Te}))});Le.classNames=ae.classNames;var _e=new WeakMap,ke=new WeakMap,Ae={},je=0,Ie=function(e){return e&&(e.host||Ie(e.parentNode))},Fe=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ie(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})}(t,Array.isArray(e)?e:[e]);Ae[n]||(Ae[n]=new WeakMap);var a=Ae[n],c=[],i=new Set,s=new Set(o),u=function(e){!e||i.has(e)||(i.add(e),u(e.parentNode))};o.forEach(u);var l=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(_e.get(e)||0)+1,u=(a.get(e)||0)+1;_e.set(e,s),a.set(e,u),c.push(e),1===s&&o&&ke.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),je++,function(){c.forEach(function(e){var t=_e.get(e)-1,o=a.get(e)-1;_e.set(e,t),a.set(e,o),t||(ke.has(e)||e.removeAttribute(r),ke.delete(e)),o||e.removeAttribute(n)}),--je||(_e=new WeakMap,_e=new WeakMap,ke=new WeakMap,Ae={})}},We=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Fe(r,o,n,"aria-hidden")):function(){return null}},$e="Dialog",[Ue]=m($e),[Be,ze]=Ue($e),Ke=n=>{const{__scopeDialog:r,children:o,open:a,defaultOpen:c,onOpenChange:i,modal:s=!0}=n,u=e.useRef(null),l=e.useRef(null),[d,f]=w({prop:a,defaultProp:c??!1,onChange:i,caller:$e});return t.jsx(Be,{scope:r,triggerRef:u,contentRef:l,contentId:b(),titleId:b(),descriptionId:b(),open:d,onOpenChange:f,onOpenToggle:e.useCallback(()=>f(e=>!e),[f]),modal:s,children:o})};Ke.displayName=$e;var Xe="DialogTrigger",Ye=e.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,c=ze(Xe,r),i=o(n,c.triggerRef);return t.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":pt(c.open),...a,ref:i,onClick:p(e.onClick,c.onOpenToggle)})});Ye.displayName=Xe;var He="DialogPortal",[Ze,Ve]=Ue(He,{forceMount:void 0}),Ge=n=>{const{__scopeDialog:r,forceMount:o,children:a,container:c}=n,i=ze(He,r);return t.jsx(Ze,{scope:r,forceMount:o,children:e.Children.map(a,e=>t.jsx(z,{present:o||i.open,children:t.jsx(B,{asChild:!0,container:c,children:e})}))})};Ge.displayName=He;var Je="DialogOverlay",Qe=e.forwardRef((e,n)=>{const r=Ve(Je,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,c=ze(Je,e.__scopeDialog);return c.modal?t.jsx(z,{present:o||c.open,children:t.jsx(tt,{...a,ref:n})}):null});Qe.displayName=Je;var et=r("DialogOverlay.RemoveScroll"),tt=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(Je,r);return t.jsx(Le,{as:et,allowPinchZoom:!0,shards:[a.contentRef],children:t.jsx(N.div,{"data-state":pt(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),nt="DialogContent",rt=e.forwardRef((e,n)=>{const r=Ve(nt,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,c=ze(nt,e.__scopeDialog);return t.jsx(z,{present:o||c.open,children:c.modal?t.jsx(ot,{...a,ref:n}):t.jsx(at,{...a,ref:n})})});rt.displayName=nt;var ot=e.forwardRef((n,r)=>{const a=ze(nt,n.__scopeDialog),c=e.useRef(null),i=o(r,a.contentRef,c);return e.useEffect(()=>{const e=c.current;if(e)return We(e)},[]),t.jsx(ct,{...n,ref:i,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(n.onCloseAutoFocus,e=>{e.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:p(n.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:p(n.onFocusOutside,e=>e.preventDefault())})}),at=e.forwardRef((n,r)=>{const o=ze(nt,n.__scopeDialog),a=e.useRef(!1),c=e.useRef(!1);return t.jsx(ct,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{n.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||o.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,c.current=!1},onInteractOutside:e=>{n.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(c.current=!0));const t=e.target;o.triggerRef.current?.contains(t)&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&c.current&&e.preventDefault()}})}),ct=e.forwardRef((n,r)=>{const{__scopeDialog:a,trapFocus:c,onOpenAutoFocus:i,onCloseAutoFocus:s,...u}=n,l=ze(nt,a),d=e.useRef(null),f=o(r,d);return Y(),t.jsxs(t.Fragment,{children:[t.jsx(A,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:i,onUnmountAutoFocus:s,children:t.jsx(M,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pt(l.open),...u,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(gt,{titleId:l.titleId}),t.jsx(yt,{contentRef:d,descriptionId:l.descriptionId})]})]})}),it="DialogTitle",st=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(it,r);return t.jsx(N.h2,{id:a.titleId,...o,ref:n})});st.displayName=it;var ut="DialogDescription",lt=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(ut,r);return t.jsx(N.p,{id:a.descriptionId,...o,ref:n})});lt.displayName=ut;var dt="DialogClose",ft=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(dt,r);return t.jsx(N.button,{type:"button",...o,ref:n,onClick:p(e.onClick,()=>a.onOpenChange(!1))})});function pt(e){return e?"open":"closed"}ft.displayName=dt;var mt="DialogTitleWarning",[vt,ht]=function(n,r){const o=e.createContext(r),a=n=>{const{children:r,...a}=n,c=e.useMemo(()=>a,Object.values(a));return t.jsx(o.Provider,{value:c,children:r})};return a.displayName=n+"Provider",[a,function(t){const a=e.useContext(o);if(a)return a;if(void 0!==r)return r;throw new Error(`\`${t}\` must be used within \`${n}\``)}]}(mt,{contentName:nt,titleName:it,docsSlug:"dialog"}),gt=({titleId:t})=>{const n=ht(mt),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},yt=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ht("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");n&&e&&(document.getElementById(n)||console.warn(r))},[r,t,n]),null},bt=Qe,Et=rt,wt=st,Nt=lt,xt=ft;const Ct=Ke,Rt=Ge,Dt=e.forwardRef(({className:e,...n},r)=>t.jsx(bt,{ref:r,className:i("data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 qc:fixed qc:inset-0 qc:z-2001 qc:backdrop-blur-md",e),...n})),St=e.forwardRef(({className:e,children:n,...r},o)=>{const{organization:s,props:{fontClassName:u,textClassName:l}}=a();return t.jsxs(Rt,{children:[t.jsx(Dt,{}),t.jsxs(Et,{ref:o,className:i("qc:bg-background qc:shadow-outer qc:border-border qc:max-w-screen data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 data-[state=closed]:qc:zoom-out-95 data-[state=open]:qc:zoom-in-95 data-[state=closed]:qc:slide-out-to-left-1/2 data-[state=closed]:qc:slide-out-to-top-[48%] data-[state=open]:qc:slide-in-from-left-1/2 data-[state=open]:qc:slide-in-from-top-[48%] qc:fixed qc:left-[50%] qc:top-[50%] qc:z-2002 qc:w-auto qc:translate-x-[-50%] qc:translate-y-[-50%] qc:rounded qc:duration-300 qc:sm:rounded",u,l,e),style:c(s),...r,children:[n,t.jsx(xt,{className:"qc:ring-offset-background focus:qc:ring-ring data-[state=open]:qc:text-foreground qc:hover:opacity-100 qc:focus:outline-none qc:disabled:pointer-events-none qc:focus:qc:ring-2 qc:focus:qc:ring-offset-2 qc:absolute qc:right-3 qc:top-3 qc:rounded qc:opacity-70 qc:transition-opacity",children:t.jsx("span",{className:"qc:sr-only",children:"Close"})})]})]})}),qt=({className:e,...n})=>t.jsx("div",{className:i("qc:flex qc:flex-col qc:space-y-1 qc:p-3 qc:text-center qc:sm:text-left",e),...n}),Mt=e.forwardRef(({className:e,...n},r)=>t.jsx(wt,{ref:r,className:i("qc:text-foreground qc:text-center qc:text-lg qc:font-semibold",e),...n})),Pt=e.forwardRef(({className:e,...n},r)=>t.jsx(Nt,{ref:r,className:i("qc:text-muted qc:text-center qc:text-sm",e),...n}));export{Ct as D,A as F,N as P,Le as R,St as a,qt as b,Mt as c,Pt as d,m as e,x as f,z as g,B as h,We as i,p as j,Y as k,M as l,w as m,b as n,h as u};
1
+ import{a as e,j as t,a3 as n,V as r,U as o,u as a,W as c,c as i}from"./index-eZDSy_OJ.js";import{r as s,R as u,a as l,b as d,c as f}from"./tslib.es6-CrRFG_pJ.js";function p(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function m(n,r=[]){let o=[];const a=()=>{const t=o.map(t=>e.createContext(t));return function(r){const o=r?.[n]||t;return e.useMemo(()=>({[`__scope${n}`]:{...r,[n]:o}}),[r,o])}};return a.scopeName=n,[function(r,a){const c=e.createContext(a),i=o.length;o=[...o,a];const s=r=>{const{scope:o,children:a,...s}=r,u=o?.[n]?.[i]||c,l=e.useMemo(()=>s,Object.values(s));return t.jsx(u.Provider,{value:l,children:a})};return s.displayName=r+"Provider",[s,function(t,o){const s=o?.[n]?.[i]||c,u=e.useContext(s);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},v(a,...r)]}function v(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var h=globalThis?.document?e.useLayoutEffect:()=>{},g=n[" useId ".trim().toString()]||(()=>{}),y=0;function b(t){const[n,r]=e.useState(g());return h(()=>{r(e=>e??String(y++))},[t]),t||(n?`radix-${n}`:"")}var E=n[" useInsertionEffect ".trim().toString()]||h;function w({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[a,c,i]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),a=e.useRef(r),c=e.useRef(n);return E(()=>{c.current=n},[n]),e.useEffect(()=>{a.current!==r&&(c.current?.(r),a.current=r)},[r,a]),[r,o,c]}({defaultProp:n,onChange:r}),s=void 0!==t,u=s?t:a;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;e!==s&&console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${s?"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.`),n.current=s},[s,o])}return[u,e.useCallback(e=>{if(s){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&i.current?.(n)}else c(e)},[s,t,c,i])]}var N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((n,o)=>{const a=r(`Primitive.${o}`),c=e.forwardRef((e,n)=>{const{asChild:r,...c}=e,i=r?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),t.jsx(i,{...c,ref:n})});return c.displayName=`Primitive.${o}`,{...n,[o]:c}},{});function x(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var C,R="dismissableLayer.update",D="dismissableLayer.pointerDownOutside",S="dismissableLayer.focusOutside",q=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M=e.forwardRef((n,r)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:c,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...d}=n,f=e.useContext(q),[m,v]=e.useState(null),h=m?.ownerDocument??globalThis?.document,[,g]=e.useState({}),y=o(r,e=>v(e)),b=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(E),M=m?b.indexOf(m):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,L=M>=w,_=function(t,n=globalThis?.document){const r=x(t),o=e.useRef(!1),a=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){O(D,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...f.branches].some(e=>e.contains(t));!L||n||(i?.(e),u?.(e),e.defaultPrevented||l?.())},h),k=function(t,n=globalThis?.document){const r=x(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{e.target&&!o.current&&O(S,r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),u?.(e),e.defaultPrevented||l?.())},h);return function(t,n=globalThis?.document){const r=x(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{M===f.layers.size-1&&(c?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),e.useEffect(()=>{if(m)return a&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(C=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),T(),()=>{a&&1===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=C)}},[m,h,a,f]),e.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),T())},[m,f]),e.useEffect(()=>{const e=()=>g({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),t.jsx(N.div,{...d,ref:y,style:{pointerEvents:P?L?"auto":"none":void 0,...n.style},onFocusCapture:p(n.onFocusCapture,k.onFocusCapture),onBlurCapture:p(n.onBlurCapture,k.onBlurCapture),onPointerDownCapture:p(n.onPointerDownCapture,_.onPointerDownCapture)})});M.displayName="DismissableLayer";var P=e.forwardRef((n,r)=>{const a=e.useContext(q),c=e.useRef(null),i=o(r,c);return e.useEffect(()=>{const e=c.current;if(e)return a.branches.add(e),()=>{a.branches.delete(e)}},[a.branches]),t.jsx(N.div,{...n,ref:i})});function T(){const e=new CustomEvent(R);document.dispatchEvent(e)}function O(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}P.displayName="DismissableLayerBranch";var L="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",k={bubbles:!1,cancelable:!0},A=e.forwardRef((n,r)=>{const{loop:a=!1,trapped:c=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...u}=n,[l,d]=e.useState(null),f=x(i),p=x(s),m=e.useRef(null),v=o(r,e=>d(e)),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(c){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?m.current=t:W(m.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||W(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&W(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[c,l,h.paused]),e.useEffect(()=>{if(l){$.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(L,k);l.addEventListener(L,f),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(W(r,{select:t}),document.activeElement!==n)return}(function(e){return e.filter(e=>"A"!==e.tagName)}(j(l)),{select:!0}),document.activeElement===e&&W(l))}return()=>{l.removeEventListener(L,f),setTimeout(()=>{const t=new CustomEvent(_,k);l.addEventListener(_,p),l.dispatchEvent(t),t.defaultPrevented||W(e??document.body,{select:!0}),l.removeEventListener(_,p),$.remove(h)},0)}}},[l,f,p,h]);const g=e.useCallback(e=>{if(!a&&!c||h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,o]=function(e){const t=j(e),n=I(t,e),r=I(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),a&&W(o,{select:!0})):(e.preventDefault(),a&&W(r,{select:!0})):n===t&&e.preventDefault()}},[a,c,h.paused]);return t.jsx(N.div,{tabIndex:-1,...u,ref:v,onKeyDown:g})});function j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function I(e,t){for(const n of e)if(!F(n,{upTo:t}))return n}function F(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function W(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}A.displayName="FocusScope";var $=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=U(e,t),e.unshift(t)},remove(t){e=U(e,t),e[0]?.resume()}}}();function U(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var B=e.forwardRef((n,r)=>{const{container:o,...a}=n,[c,i]=e.useState(!1);h(()=>i(!0),[]);const s=o||c&&globalThis?.document?.body;return s?u.createPortal(t.jsx(N.div,{...a,ref:r}),s):null});B.displayName="Portal";var z=t=>{const{present:n,children:r}=t,a=function(t){const[n,r]=e.useState(),o=e.useRef(null),a=e.useRef(t),c=e.useRef("none"),i=t?"mounted":"unmounted",[s,u]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=K(o.current);c.current="mounted"===s?e:"none"},[s]),h(()=>{const e=o.current,n=a.current;if(n!==t){const r=c.current,o=K(e);u(t?"MOUNT":"none"===o||"none"===e?.display?"UNMOUNT":n&&r!==o?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,u]),h(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const c=K(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&c&&(u("ANIMATION_END"),!a.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},i=e=>{e.target===n&&(c.current=K(o.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),c="function"==typeof r?r({present:a.isPresent}):e.Children.only(r),i=o(a.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(c));return"function"==typeof r||a.isPresent?e.cloneElement(c,{ref:i}):null};function K(e){return e?.animationName||"none"}z.displayName="Presence";var X=0;function Y(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??H()),document.body.insertAdjacentElement("beforeend",e[1]??H()),X++,()=>{1===X&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),X--}},[])}function H(){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 Z="right-scroll-bar-position",V="width-before-scroll-bar";function G(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var J=typeof window<"u"?e.useLayoutEffect:e.useEffect,Q=new WeakMap;function ee(t,n){var r=function(t,n){var r=e.useState(function(){return{value:t,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}(null,function(e){return t.forEach(function(t){return G(t,e)})});return J(function(){var e=Q.get(r);if(e){var n=new Set(e),o=new Set(t),a=r.current;n.forEach(function(e){o.has(e)||G(e,null)}),o.forEach(function(e){n.has(e)||G(e,a)})}Q.set(r,t)},[t]),r}function te(e){return e}var ne=function(t){var n=t.sideCar,r=d(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,l({},r))};ne.isSideCarExport=!0;var re=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=te);var n=[],r=!1;return{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(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=l({async:!0,ssr:!1},e),t}(),oe=function(){},ae=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:oe,onWheelCapture:oe,onTouchMoveCapture:oe}),a=o[0],c=o[1],i=t.forwardProps,s=t.children,u=t.className,f=t.removeScrollBar,p=t.enabled,m=t.shards,v=t.sideCar,h=t.noRelative,g=t.noIsolation,y=t.inert,b=t.allowPinchZoom,E=t.as,w=void 0===E?"div":E,N=t.gapMode,x=d(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,R=ee([r,n]),D=l(l({},x),a);return e.createElement(e.Fragment,null,p&&e.createElement(C,{sideCar:re,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:c,allowPinchZoom:!!b,lockRef:r,gapMode:N}),i?e.cloneElement(e.Children.only(s),l(l({},D),{ref:R})):e.createElement(w,l({},D,{className:u,ref:R}),s))});ae.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ae.classNames={fullWidth:V,zeroRight:Z};function ce(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var ie=function(){var e=0,t=null;return{add:function(n){0==e&&(t=ce())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},se=function(){var t=function(){var t=ie();return function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])}}();return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},ue={left:0,top:0,right:0,gap:0},le=function(e){return parseInt(e||"",10)||0},de=function(e){if(void 0===e&&(e="margin"),typeof window>"u")return ue;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[le(n),le(r),le(o)]}(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])}},fe=se(),pe="data-scroll-locked",me=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(pe,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Z," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(V," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(Z," .").concat(Z," {\n right: 0 ").concat(r,";\n }\n \n .").concat(V," .").concat(V," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(pe,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},ve=function(){var e=parseInt(document.body.getAttribute(pe)||"0",10);return isFinite(e)?e:0},he=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(pe,(ve()+1).toString()),function(){var e=ve()-1;e<=0?document.body.removeAttribute(pe):document.body.setAttribute(pe,e.toString())}},[]);var c=e.useMemo(function(){return de(a)},[a]);return e.createElement(fe,{styles:me(c,!n,a,r?"":"!important")})},ge=!1;if(typeof window<"u")try{var ye=Object.defineProperty({},"passive",{get:function(){return ge=!0,!0}});window.addEventListener("test",ye,ye),window.removeEventListener("test",ye,ye)}catch{ge=!1}var be=!!ge&&{passive:!1},Ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},we=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),Ne(e,r)){var o=xe(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ne=function(e,t){return"v"===e?function(e){return Ee(e,"overflowY")}(t):function(e){return Ee(e,"overflowX")}(t)},xe=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Ce=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Re=function(e){return[e.deltaX,e.deltaY]},De=function(e){return e&&"current"in e?e.current:e},Se=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},qe=0,Me=[];function Pe(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Te=(Oe=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(qe++)[0],c=e.useState(se)[0],i=e.useRef(t);e.useEffect(function(){i.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=f([t.lockRef.current],(t.shards||[]).map(De),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=Ce(e),c=r.current,s="deltaX"in e?e.deltaX:c[0]-a[0],u="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=we(d,l);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=we(d,l)),!f)return!1;if(!o.current&&"changedTouches"in e&&(s||u)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,c=n.target,i=t.contains(c),s=!1,u=a>0,l=0,d=0;do{if(!c)break;var f=xe(e,c),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Ne(e,c)&&(l+=m,d+=p);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!i&&c!==document.body||i&&(t.contains(c)||t===c));return(u&&Math.abs(l)<1||!u&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:u)},[]),u=e.useCallback(function(e){var t=e;if(Me.length&&Me[Me.length-1]===c){var r="deltaY"in t?Re(t):Ce(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)return void(t.cancelable&&t.preventDefault());if(!o){var a=(i.current.shards||[]).map(De).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?s(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),l=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:Pe(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=e.useCallback(function(e){r.current=Ce(e),o.current=void 0},[]),p=e.useCallback(function(e){l(e.type,Re(e),e.target,s(e,t.lockRef.current))},[]),m=e.useCallback(function(e){l(e.type,Ce(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return Me.push(c),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,be),document.addEventListener("touchmove",u,be),document.addEventListener("touchstart",d,be),function(){Me=Me.filter(function(e){return e!==c}),document.removeEventListener("wheel",u,be),document.removeEventListener("touchmove",u,be),document.removeEventListener("touchstart",d,be)}},[]);var v=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(c,{styles:Se(a)}):null,v?e.createElement(he,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},re.useMedium(Oe),ne);var Oe,Le=e.forwardRef(function(t,n){return e.createElement(ae,l({},t,{ref:n,sideCar:Te}))});Le.classNames=ae.classNames;var _e=new WeakMap,ke=new WeakMap,Ae={},je=0,Ie=function(e){return e&&(e.host||Ie(e.parentNode))},Fe=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ie(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})}(t,Array.isArray(e)?e:[e]);Ae[n]||(Ae[n]=new WeakMap);var a=Ae[n],c=[],i=new Set,s=new Set(o),u=function(e){!e||i.has(e)||(i.add(e),u(e.parentNode))};o.forEach(u);var l=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(_e.get(e)||0)+1,u=(a.get(e)||0)+1;_e.set(e,s),a.set(e,u),c.push(e),1===s&&o&&ke.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),je++,function(){c.forEach(function(e){var t=_e.get(e)-1,o=a.get(e)-1;_e.set(e,t),a.set(e,o),t||(ke.has(e)||e.removeAttribute(r),ke.delete(e)),o||e.removeAttribute(n)}),--je||(_e=new WeakMap,_e=new WeakMap,ke=new WeakMap,Ae={})}},We=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Fe(r,o,n,"aria-hidden")):function(){return null}},$e="Dialog",[Ue]=m($e),[Be,ze]=Ue($e),Ke=n=>{const{__scopeDialog:r,children:o,open:a,defaultOpen:c,onOpenChange:i,modal:s=!0}=n,u=e.useRef(null),l=e.useRef(null),[d,f]=w({prop:a,defaultProp:c??!1,onChange:i,caller:$e});return t.jsx(Be,{scope:r,triggerRef:u,contentRef:l,contentId:b(),titleId:b(),descriptionId:b(),open:d,onOpenChange:f,onOpenToggle:e.useCallback(()=>f(e=>!e),[f]),modal:s,children:o})};Ke.displayName=$e;var Xe="DialogTrigger",Ye=e.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,c=ze(Xe,r),i=o(n,c.triggerRef);return t.jsx(N.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":pt(c.open),...a,ref:i,onClick:p(e.onClick,c.onOpenToggle)})});Ye.displayName=Xe;var He="DialogPortal",[Ze,Ve]=Ue(He,{forceMount:void 0}),Ge=n=>{const{__scopeDialog:r,forceMount:o,children:a,container:c}=n,i=ze(He,r);return t.jsx(Ze,{scope:r,forceMount:o,children:e.Children.map(a,e=>t.jsx(z,{present:o||i.open,children:t.jsx(B,{asChild:!0,container:c,children:e})}))})};Ge.displayName=He;var Je="DialogOverlay",Qe=e.forwardRef((e,n)=>{const r=Ve(Je,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,c=ze(Je,e.__scopeDialog);return c.modal?t.jsx(z,{present:o||c.open,children:t.jsx(tt,{...a,ref:n})}):null});Qe.displayName=Je;var et=r("DialogOverlay.RemoveScroll"),tt=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(Je,r);return t.jsx(Le,{as:et,allowPinchZoom:!0,shards:[a.contentRef],children:t.jsx(N.div,{"data-state":pt(a.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),nt="DialogContent",rt=e.forwardRef((e,n)=>{const r=Ve(nt,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,c=ze(nt,e.__scopeDialog);return t.jsx(z,{present:o||c.open,children:c.modal?t.jsx(ot,{...a,ref:n}):t.jsx(at,{...a,ref:n})})});rt.displayName=nt;var ot=e.forwardRef((n,r)=>{const a=ze(nt,n.__scopeDialog),c=e.useRef(null),i=o(r,a.contentRef,c);return e.useEffect(()=>{const e=c.current;if(e)return We(e)},[]),t.jsx(ct,{...n,ref:i,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(n.onCloseAutoFocus,e=>{e.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:p(n.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:p(n.onFocusOutside,e=>e.preventDefault())})}),at=e.forwardRef((n,r)=>{const o=ze(nt,n.__scopeDialog),a=e.useRef(!1),c=e.useRef(!1);return t.jsx(ct,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{n.onCloseAutoFocus?.(e),e.defaultPrevented||(a.current||o.triggerRef.current?.focus(),e.preventDefault()),a.current=!1,c.current=!1},onInteractOutside:e=>{n.onInteractOutside?.(e),e.defaultPrevented||(a.current=!0,"pointerdown"===e.detail.originalEvent.type&&(c.current=!0));const t=e.target;o.triggerRef.current?.contains(t)&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&c.current&&e.preventDefault()}})}),ct=e.forwardRef((n,r)=>{const{__scopeDialog:a,trapFocus:c,onOpenAutoFocus:i,onCloseAutoFocus:s,...u}=n,l=ze(nt,a),d=e.useRef(null),f=o(r,d);return Y(),t.jsxs(t.Fragment,{children:[t.jsx(A,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:i,onUnmountAutoFocus:s,children:t.jsx(M,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pt(l.open),...u,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(gt,{titleId:l.titleId}),t.jsx(yt,{contentRef:d,descriptionId:l.descriptionId})]})]})}),it="DialogTitle",st=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(it,r);return t.jsx(N.h2,{id:a.titleId,...o,ref:n})});st.displayName=it;var ut="DialogDescription",lt=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(ut,r);return t.jsx(N.p,{id:a.descriptionId,...o,ref:n})});lt.displayName=ut;var dt="DialogClose",ft=e.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,a=ze(dt,r);return t.jsx(N.button,{type:"button",...o,ref:n,onClick:p(e.onClick,()=>a.onOpenChange(!1))})});function pt(e){return e?"open":"closed"}ft.displayName=dt;var mt="DialogTitleWarning",[vt,ht]=function(n,r){const o=e.createContext(r),a=n=>{const{children:r,...a}=n,c=e.useMemo(()=>a,Object.values(a));return t.jsx(o.Provider,{value:c,children:r})};return a.displayName=n+"Provider",[a,function(t){const a=e.useContext(o);if(a)return a;if(void 0!==r)return r;throw new Error(`\`${t}\` must be used within \`${n}\``)}]}(mt,{contentName:nt,titleName:it,docsSlug:"dialog"}),gt=({titleId:t})=>{const n=ht(mt),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},yt=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ht("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");n&&e&&(document.getElementById(n)||console.warn(r))},[r,t,n]),null},bt=Qe,Et=rt,wt=st,Nt=lt,xt=ft;const Ct=Ke,Rt=Ge,Dt=e.forwardRef(({className:e,...n},r)=>t.jsx(bt,{ref:r,className:i("data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 qc:fixed qc:inset-0 qc:z-2001 qc:backdrop-blur-md",e),...n})),St=e.forwardRef(({className:e,children:n,...r},o)=>{const{organization:s,props:{fontClassName:u,textClassName:l}}=a();return t.jsxs(Rt,{children:[t.jsx(Dt,{}),t.jsxs(Et,{ref:o,className:i("qc:bg-background qc:shadow-outer qc:border-border qc:max-w-screen data-[state=open]:qc:animate-in data-[state=closed]:qc:animate-out data-[state=closed]:qc:fade-out-0 data-[state=open]:qc:fade-in-0 data-[state=closed]:qc:zoom-out-95 data-[state=open]:qc:zoom-in-95 data-[state=closed]:qc:slide-out-to-left-1/2 data-[state=closed]:qc:slide-out-to-top-[48%] data-[state=open]:qc:slide-in-from-left-1/2 data-[state=open]:qc:slide-in-from-top-[48%] qc:fixed qc:left-[50%] qc:top-[50%] qc:z-2002 qc:w-auto qc:translate-x-[-50%] qc:translate-y-[-50%] qc:rounded qc:duration-300 qc:sm:rounded",u,l,e),style:c(s),...r,children:[n,t.jsx(xt,{className:"qc:ring-offset-background focus:qc:ring-ring data-[state=open]:qc:text-foreground qc:hover:opacity-100 qc:focus:outline-none qc:disabled:pointer-events-none qc:focus:qc:ring-2 qc:focus:qc:ring-offset-2 qc:absolute qc:right-3 qc:top-3 qc:rounded qc:opacity-70 qc:transition-opacity",children:t.jsx("span",{className:"qc:sr-only",children:"Close"})})]})]})}),qt=({className:e,...n})=>t.jsx("div",{className:i("qc:flex qc:flex-col qc:space-y-1 qc:p-3 qc:text-center qc:sm:text-left",e),...n}),Mt=e.forwardRef(({className:e,...n},r)=>t.jsx(wt,{ref:r,className:i("qc:text-foreground qc:text-center qc:text-lg qc:font-semibold",e),...n})),Pt=e.forwardRef(({className:e,...n},r)=>t.jsx(Nt,{ref:r,className:i("qc:text-muted qc:text-center qc:text-sm",e),...n}));export{Ct as D,A as F,N as P,Le as R,St as a,qt as b,Mt as c,Pt as d,m as e,x as f,z as g,B as h,We as i,p as j,Y as k,M as l,w as m,b as n,h as u};