@isardsat/editorial-admin 6.13.2 → 6.15.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 (34) hide show
  1. package/build/client/assets/{clear-button-D8P7FXYU.js → clear-button-B9FEVwz_.js} +1 -1
  2. package/build/client/assets/dashboard._collection-iaZtNe1q.js +1 -0
  3. package/build/client/assets/dashboard._collection._document-CTeQZeVA.js +1 -0
  4. package/build/client/assets/dashboard._collection.new-MHMMy2v8.js +1 -0
  5. package/build/client/assets/dashboard._layout-CYfqEFBT.js +1 -0
  6. package/build/client/assets/date-picker-CRoXMswR.js +1 -0
  7. package/build/client/assets/datetime-picker-BpQhYvak.js +1 -0
  8. package/build/client/assets/{home-B_IEYn8i.js → home-cGpyicWm.js} +1 -1
  9. package/build/client/assets/index-CSxhbVIn.js +1 -0
  10. package/build/client/assets/{index-Cxe-PO-X.js → index-CYog0F9C.js} +1 -1
  11. package/build/client/assets/index-KAkY22zU.js +45 -0
  12. package/build/client/assets/index-dHuXonUr.js +1 -0
  13. package/build/client/assets/itemForm-BIdCIQK1.js +8 -0
  14. package/build/client/assets/manifest-2bc1ae41.js +1 -0
  15. package/build/client/assets/markdownEditor-C2b-b6HB.js +100 -0
  16. package/build/client/assets/root-40NKTO2H.css +1 -0
  17. package/build/client/assets/{schemas-UEZYZN9g.js → schemas-BoZMckka.js} +2 -2
  18. package/build/client/index.html +2 -2
  19. package/package.json +2 -2
  20. package/build/client/assets/dashboard._collection-CtVDeSsn.js +0 -1
  21. package/build/client/assets/dashboard._collection._document-BWSH9DF3.js +0 -1
  22. package/build/client/assets/dashboard._collection.new-D-_fvPhB.js +0 -1
  23. package/build/client/assets/dashboard._layout-Cd56BPh5.js +0 -1
  24. package/build/client/assets/date-picker-B4gEJFZ7.js +0 -1
  25. package/build/client/assets/datetime-picker-vpQoFZRp.js +0 -1
  26. package/build/client/assets/index-B45LLRRA.js +0 -1
  27. package/build/client/assets/index-BuuBEQuS.js +0 -1
  28. package/build/client/assets/index-C0hImMcN.js +0 -1
  29. package/build/client/assets/index-DgNySWwD.js +0 -45
  30. package/build/client/assets/itemForm-WlM0ABNB.js +0 -8
  31. package/build/client/assets/manifest-c1b2838f.js +0 -1
  32. package/build/client/assets/markdownEditor-Gw028d85.js +0 -100
  33. package/build/client/assets/root-DR_oZZHy.css +0 -1
  34. /package/build/client/assets/{root-6i8HcLlQ.js → root-DnO5pWRh.js} +0 -0
@@ -0,0 +1,45 @@
1
+ import{a as l,B as Xn,p as S}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{e as Pe,a as $,b as J,i as Kn,u as Gn,c as It,d as et,f as qn,j as Zn,h as Qn}from"./index-CYog0F9C.js";import{u as ne}from"./index-B-2LEQwB.js";import{R as Jn,a as er}from"./index-DLIEpuwL.js";import{_ as Q,a as Wt,b as tr}from"./tslib.es6-Dm3DwgL9.js";var nr=Xn[" useId ".trim().toString()]||(()=>{}),rr=0;function Be(e){const[t,n]=l.useState(nr());return Pe(()=>{n(r=>r??String(rr++))},[e]),e||(t?`radix-${t}`:"")}function ue(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function or(e,t=globalThis?.document){const n=ue(e);l.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 ir="DismissableLayer",Ge="dismissableLayer.update",sr="dismissableLayer.pointerDownOutside",ar="dismissableLayer.focusOutside",mt,Bt=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$t=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...d}=e,c=l.useContext(Bt),[u,h]=l.useState(null),p=u?.ownerDocument??globalThis?.document,[,m]=l.useState({}),v=ne(t,C=>h(C)),f=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=f.indexOf(g),w=u?f.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,x=w>=y,E=ur(C=>{const P=C.target,D=[...c.branches].some(O=>O.contains(P));!x||D||(o?.(C),s?.(C),C.defaultPrevented||a?.())},p),R=fr(C=>{const P=C.target;[...c.branches].some(O=>O.contains(P))||(i?.(C),s?.(C),C.defaultPrevented||a?.())},p);return or(C=>{w===c.layers.size-1&&(r?.(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},p),l.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(mt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),pt(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=mt)}},[u,p,n,c]),l.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),pt())},[u,c]),l.useEffect(()=>{const C=()=>m({});return document.addEventListener(Ge,C),()=>document.removeEventListener(Ge,C)},[]),S.jsx($.div,{...d,ref:v,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,R.onFocusCapture),onBlurCapture:J(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,E.onPointerDownCapture)})});$t.displayName=ir;var cr="DismissableLayerBranch",lr=l.forwardRef((e,t)=>{const n=l.useContext(Bt),r=l.useRef(null),o=ne(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),S.jsx($.div,{...e,ref:o})});lr.displayName=cr;function ur(e,t=globalThis?.document){const n=ue(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let d=function(){jt(sr,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fr(e,t=globalThis?.document){const n=ue(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&jt(ar,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 pt(){const e=new CustomEvent(Ge);document.dispatchEvent(e)}function jt(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?Kn(o,i):o.dispatchEvent(i)}var $e="focusScope.autoFocusOnMount",je="focusScope.autoFocusOnUnmount",gt={bubbles:!1,cancelable:!0},dr="FocusScope",Ht=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,d]=l.useState(null),c=ue(o),u=ue(i),h=l.useRef(null),p=ne(t,f=>d(f)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let f=function(b){if(m.paused||!a)return;const x=b.target;a.contains(x)?h.current=x:Z(h.current,{select:!0})},g=function(b){if(m.paused||!a)return;const x=b.relatedTarget;x!==null&&(a.contains(x)||Z(h.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&Z(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",g);const w=new MutationObserver(y);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",g),w.disconnect()}}},[r,a,m.paused]),l.useEffect(()=>{if(a){yt.add(m);const f=document.activeElement;if(!a.contains(f)){const y=new CustomEvent($e,gt);a.addEventListener($e,c),a.dispatchEvent(y),y.defaultPrevented||(hr(yr(Vt(a)),{select:!0}),document.activeElement===f&&Z(a))}return()=>{a.removeEventListener($e,c),setTimeout(()=>{const y=new CustomEvent(je,gt);a.addEventListener(je,u),a.dispatchEvent(y),y.defaultPrevented||Z(f??document.body,{select:!0}),a.removeEventListener(je,u),yt.remove(m)},0)}}},[a,c,u,m]);const v=l.useCallback(f=>{if(!n&&!r||m.paused)return;const g=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,y=document.activeElement;if(g&&y){const w=f.currentTarget,[b,x]=mr(w);b&&x?!f.shiftKey&&y===x?(f.preventDefault(),n&&Z(b,{select:!0})):f.shiftKey&&y===b&&(f.preventDefault(),n&&Z(x,{select:!0})):y===w&&f.preventDefault()}},[n,r,m.paused]);return S.jsx($.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})});Ht.displayName=dr;function hr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Z(r,{select:t}),document.activeElement!==n)return}function mr(e){const t=Vt(e),n=vt(t,e),r=vt(t.reverse(),e);return[n,r]}function Vt(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 vt(e,t){for(const n of e)if(!pr(n,{upTo:t}))return n}function pr(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 gr(e){return e instanceof HTMLInputElement&&"select"in e}function Z(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gr(e)&&t&&e.select()}}var yt=vr();function vr(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=wt(e,t),e.unshift(t)},remove(t){e=wt(e,t),e[0]?.resume()}}}function wt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yr(e){return e.filter(t=>t.tagName!=="A")}var wr="Portal",zt=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=l.useState(!1);Pe(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?Jn.createPortal(S.jsx($.div,{...r,ref:t}),s):null});zt.displayName=wr;var He=0;function xr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xt()),document.body.insertAdjacentElement("beforeend",e[1]??xt()),He++,()=>{He===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),He--}},[])}function xt(){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 Se="right-scroll-bar-position",Re="width-before-scroll-bar",br="with-scroll-bars-hidden",Er="--removed-body-scroll-bar-size";function Ve(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Cr(e,t){var n=l.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 Sr=typeof window<"u"?l.useLayoutEffect:l.useEffect,bt=new WeakMap;function Rr(e,t){var n=Cr(null,function(r){return e.forEach(function(o){return Ve(o,r)})});return Sr(function(){var r=bt.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ve(a,null)}),i.forEach(function(a){o.has(a)||Ve(a,s)})}bt.set(n,e)},[e]),n}function Ar(e){return e}function Pr(e,t){t===void 0&&(t=Ar);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 s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var d=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(d)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return o}function Or(e){e===void 0&&(e={});var t=Pr(null);return t.options=Q({async:!0,ssr:!1},e),t}var Yt=function(e){var t=e.sideCar,n=Wt(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 l.createElement(r,Q({},n))};Yt.isSideCarExport=!0;function Dr(e,t){return e.useMedium(t),Yt}var Ut=Or(),ze=function(){},Me=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:ze,onWheelCapture:ze,onTouchMoveCapture:ze}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,d=e.className,c=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,m=e.noRelative,v=e.noIsolation,f=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,x=Wt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=Rr([n,t]),C=Q(Q({},x),o);return l.createElement(l.Fragment,null,u&&l.createElement(E,{sideCar:Ut,removeScrollBar:c,shards:h,noRelative:m,noIsolation:v,inert:f,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),s?l.cloneElement(l.Children.only(a),Q(Q({},C),{ref:R})):l.createElement(w,Q({},C,{className:d,ref:R}),a))});Me.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Me.classNames={fullWidth:Re,zeroRight:Se};var Tr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tr();return t&&e.setAttribute("nonce",t),e}function Lr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nr())&&(Lr(t,n),Mr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kr=function(){var e=Fr();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xt=function(){var e=kr(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_r={left:0,top:0,right:0,gap:0},Ye=function(e){return parseInt(e||"",10)||0},Ir=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[Ye(n),Ye(r),Ye(o)]},Wr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _r;var t=Ir(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])}},Br=Xt(),ce="data-scroll-locked",$r=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(br,` {
3
+ overflow: hidden `).concat(r,`;
4
+ padding-right: `).concat(a,"px ").concat(r,`;
5
+ }
6
+ body[`).concat(ce,`] {
7
+ overflow: hidden `).concat(r,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(i,`px;
12
+ padding-right: `).concat(s,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(a,"px ").concat(r,`;
16
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(Se,` {
20
+ right: `).concat(a,"px ").concat(r,`;
21
+ }
22
+
23
+ .`).concat(Re,` {
24
+ margin-right: `).concat(a,"px ").concat(r,`;
25
+ }
26
+
27
+ .`).concat(Se," .").concat(Se,` {
28
+ right: 0 `).concat(r,`;
29
+ }
30
+
31
+ .`).concat(Re," .").concat(Re,` {
32
+ margin-right: 0 `).concat(r,`;
33
+ }
34
+
35
+ body[`).concat(ce,`] {
36
+ `).concat(Er,": ").concat(a,`px;
37
+ }
38
+ `)},Et=function(){var e=parseInt(document.body.getAttribute(ce)||"0",10);return isFinite(e)?e:0},jr=function(){l.useEffect(function(){return document.body.setAttribute(ce,(Et()+1).toString()),function(){var e=Et()-1;e<=0?document.body.removeAttribute(ce):document.body.setAttribute(ce,e.toString())}},[])},Hr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;jr();var i=l.useMemo(function(){return Wr(o)},[o]);return l.createElement(Br,{styles:$r(i,!t,o,n?"":"!important")})},qe=!1;if(typeof window<"u")try{var we=Object.defineProperty({},"passive",{get:function(){return qe=!0,!0}});window.addEventListener("test",we,we),window.removeEventListener("test",we,we)}catch{qe=!1}var ie=qe?{passive:!1}:!1,Vr=function(e){return e.tagName==="TEXTAREA"},Kt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vr(e)&&n[t]==="visible")},zr=function(e){return Kt(e,"overflowY")},Yr=function(e){return Kt(e,"overflowX")},Ct=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Gt(e,r);if(o){var i=qt(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ur=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Xr=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Gt=function(e,t){return e==="v"?zr(t):Yr(t)},qt=function(e,t){return e==="v"?Ur(t):Xr(t)},Kr=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gr=function(e,t,n,r,o){var i=Kr(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,d=t.contains(a),c=!1,u=s>0,h=0,p=0;do{if(!a)break;var m=qt(e,a),v=m[0],f=m[1],g=m[2],y=f-g-i*v;(v||y)&&Gt(e,a)&&(h+=y,p+=v);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(u&&Math.abs(h)<1||!u&&Math.abs(p)<1)&&(c=!0),c},xe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},St=function(e){return[e.deltaX,e.deltaY]},Rt=function(e){return e&&"current"in e?e.current:e},qr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zr=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},Qr=0,se=[];function Jr(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Qr++)[0],i=l.useState(Xt)[0],s=l.useRef(e);l.useEffect(function(){s.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=tr([e.lockRef.current],(e.shards||[]).map(Rt),!0).filter(Boolean);return f.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(f,g){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!s.current.allowPinchZoom;var y=xe(f),w=n.current,b="deltaX"in f?f.deltaX:w[0]-y[0],x="deltaY"in f?f.deltaY:w[1]-y[1],E,R=f.target,C=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in f&&C==="h"&&R.type==="range")return!1;var P=window.getSelection(),D=P&&P.anchorNode,O=D?D===R||D.contains(R):!1;if(O)return!1;var N=Ct(C,R);if(!N)return!0;if(N?E=C:(E=C==="v"?"h":"v",N=Ct(C,R)),!N)return!1;if(!r.current&&"changedTouches"in f&&(b||x)&&(r.current=E),!E)return!0;var k=r.current||E;return Gr(k,g,f,k==="h"?b:x)},[]),d=l.useCallback(function(f){var g=f;if(!(!se.length||se[se.length-1]!==i)){var y="deltaY"in g?St(g):xe(g),w=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&qr(E.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var b=(s.current.shards||[]).map(Rt).filter(Boolean).filter(function(E){return E.contains(g.target)}),x=b.length>0?a(g,b[0]):!s.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),c=l.useCallback(function(f,g,y,w){var b={name:f,delta:g,target:y,should:w,shadowParent:eo(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=l.useCallback(function(f){n.current=xe(f),r.current=void 0},[]),h=l.useCallback(function(f){c(f.type,St(f),f.target,a(f,e.lockRef.current))},[]),p=l.useCallback(function(f){c(f.type,xe(f),f.target,a(f,e.lockRef.current))},[]);l.useEffect(function(){return se.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",d,ie),document.addEventListener("touchmove",d,ie),document.addEventListener("touchstart",u,ie),function(){se=se.filter(function(f){return f!==i}),document.removeEventListener("wheel",d,ie),document.removeEventListener("touchmove",d,ie),document.removeEventListener("touchstart",u,ie)}},[]);var m=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(i,{styles:Zr(o)}):null,m?l.createElement(Hr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const to=Dr(Ut,Jr);var Zt=l.forwardRef(function(e,t){return l.createElement(Me,Q({},e,{ref:t,sideCar:to}))});Zt.classNames=Me.classNames;var no=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ae=new WeakMap,be=new WeakMap,Ee={},Ue=0,Qt=function(e){return e&&(e.host||Qt(e.parentNode))},ro=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qt(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})},oo=function(e,t,n,r){var o=ro(t,Array.isArray(e)?e:[e]);Ee[n]||(Ee[n]=new WeakMap);var i=Ee[n],s=[],a=new Set,d=new Set(o),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};o.forEach(c);var u=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var m=p.getAttribute(r),v=m!==null&&m!=="false",f=(ae.get(p)||0)+1,g=(i.get(p)||0)+1;ae.set(p,f),i.set(p,g),s.push(p),f===1&&v&&be.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return u(t),a.clear(),Ue++,function(){s.forEach(function(h){var p=ae.get(h)-1,m=i.get(h)-1;ae.set(h,p),i.set(h,m),p||(be.has(h)||h.removeAttribute(r),be.delete(h)),m||h.removeAttribute(n)}),Ue--,Ue||(ae=new WeakMap,ae=new WeakMap,be=new WeakMap,Ee={})}},io=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=no(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),oo(r,o,n,"aria-hidden")):function(){return null}},Fe="Dialog",[Jt,ji]=It(Fe),[so,V]=Jt(Fe),en=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=l.useRef(null),d=l.useRef(null),[c,u]=Gn({prop:r,defaultProp:o??!1,onChange:i,caller:Fe});return S.jsx(so,{scope:t,triggerRef:a,contentRef:d,contentId:Be(),titleId:Be(),descriptionId:Be(),open:c,onOpenChange:u,onOpenToggle:l.useCallback(()=>u(h=>!h),[u]),modal:s,children:n})};en.displayName=Fe;var tn="DialogTrigger",nn=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=V(tn,n),i=ne(t,o.triggerRef);return S.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rt(o.open),...r,ref:i,onClick:J(e.onClick,o.onOpenToggle)})});nn.displayName=tn;var tt="DialogPortal",[ao,rn]=Jt(tt,{forceMount:void 0}),on=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=V(tt,t);return S.jsx(ao,{scope:t,forceMount:n,children:l.Children.map(r,s=>S.jsx(et,{present:n||i.open,children:S.jsx(zt,{asChild:!0,container:o,children:s})}))})};on.displayName=tt;var Oe="DialogOverlay",sn=l.forwardRef((e,t)=>{const n=rn(Oe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=V(Oe,e.__scopeDialog);return i.modal?S.jsx(et,{present:r||i.open,children:S.jsx(lo,{...o,ref:t})}):null});sn.displayName=Oe;var co=qn("DialogOverlay.RemoveScroll"),lo=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=V(Oe,n);return S.jsx(Zt,{as:co,allowPinchZoom:!0,shards:[o.contentRef],children:S.jsx($.div,{"data-state":rt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),re="DialogContent",an=l.forwardRef((e,t)=>{const n=rn(re,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=V(re,e.__scopeDialog);return S.jsx(et,{present:r||i.open,children:i.modal?S.jsx(uo,{...o,ref:t}):S.jsx(fo,{...o,ref:t})})});an.displayName=re;var uo=l.forwardRef((e,t)=>{const n=V(re,e.__scopeDialog),r=l.useRef(null),o=ne(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return io(i)},[]),S.jsx(cn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:J(e.onFocusOutside,i=>i.preventDefault())})}),fo=l.forwardRef((e,t)=>{const n=V(re,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return S.jsx(cn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),cn=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=V(re,n),d=l.useRef(null),c=ne(t,d);return xr(),S.jsxs(S.Fragment,{children:[S.jsx(Ht,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:S.jsx($t,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":rt(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),S.jsxs(S.Fragment,{children:[S.jsx(ho,{titleId:a.titleId}),S.jsx(po,{contentRef:d,descriptionId:a.descriptionId})]})]})}),nt="DialogTitle",ln=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=V(nt,n);return S.jsx($.h2,{id:o.titleId,...r,ref:t})});ln.displayName=nt;var un="DialogDescription",fn=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=V(un,n);return S.jsx($.p,{id:o.descriptionId,...r,ref:t})});fn.displayName=un;var dn="DialogClose",hn=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=V(dn,n);return S.jsx($.button,{type:"button",...r,ref:t,onClick:J(e.onClick,()=>o.onOpenChange(!1))})});hn.displayName=dn;function rt(e){return e?"open":"closed"}var mn="DialogTitleWarning",[Hi,pn]=Zn(mn,{contentName:re,titleName:nt,docsSlug:"dialog"}),ho=({titleId:e})=>{const t=pn(mn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mo="DialogDescriptionWarning",po=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pn(mo).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vi=en,zi=nn,Yi=on,Ui=sn,Xi=an,Ki=ln,Gi=fn,qi=hn;const go=["top","right","bottom","left"],ee=Math.min,W=Math.max,De=Math.round,Ce=Math.floor,U=e=>({x:e,y:e}),vo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function Ze(e,t,n){return W(e,ee(t,n))}function G(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function ot(e){return e==="x"?"y":"x"}function it(e){return e==="y"?"height":"width"}const wo=new Set(["top","bottom"]);function Y(e){return wo.has(q(e))?"y":"x"}function st(e){return ot(Y(e))}function xo(e,t,n){n===void 0&&(n=!1);const r=de(e),o=st(e),i=it(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Te(s)),[s,Te(s)]}function bo(e){const t=Te(e);return[Qe(e),t,Qe(t)]}function Qe(e){return e.replace(/start|end/g,t=>yo[t])}const At=["left","right"],Pt=["right","left"],Eo=["top","bottom"],Co=["bottom","top"];function So(e,t,n){switch(e){case"top":case"bottom":return n?t?Pt:At:t?At:Pt;case"left":case"right":return t?Eo:Co;default:return[]}}function Ro(e,t,n,r){const o=de(e);let i=So(q(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Qe)))),i}function Te(e){return e.replace(/left|right|bottom|top/g,t=>vo[t])}function Ao(e){return{top:0,right:0,bottom:0,left:0,...e}}function gn(e){return typeof e!="number"?Ao(e):{top:e,right:e,bottom:e,left:e}}function Ne(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 Ot(e,t,n){let{reference:r,floating:o}=e;const i=Y(t),s=st(t),a=it(s),d=q(t),c=i==="y",u=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let m;switch(d){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(de(t)){case"start":m[s]-=p*(n&&c?-1:1);break;case"end":m[s]+=p*(n&&c?-1:1);break}return m}const Po=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:h}=Ot(c,r,d),p=r,m={},v=0;for(let f=0;f<a.length;f++){const{name:g,fn:y}=a[f],{x:w,y:b,data:x,reset:E}=await y({x:u,y:h,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,h=b??h,m={...m,[g]:{...m[g],...x}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:h}=Ot(c,p,d)),f=-1)}return{x:u,y:h,placement:p,strategy:o,middlewareData:m}};async function pe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=G(t,e),v=gn(m),g=a[p?h==="floating"?"reference":"floating":h],y=Ne(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),w=h==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=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},E=Ne(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:d}):w);return{top:(y.top-E.top+v.top)/x.y,bottom:(E.bottom-y.bottom+v.bottom)/x.y,left:(y.left-E.left+v.left)/x.x,right:(E.right-y.right+v.right)/x.x}}const Oo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:d}=t,{element:c,padding:u=0}=G(e,t)||{};if(c==null)return{};const h=gn(u),p={x:n,y:r},m=st(o),v=it(m),f=await s.getDimensions(c),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[m]-p[m]-i.floating[v],E=p[m]-i.reference[m],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let C=R?R[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(R)))&&(C=a.floating[b]||i.floating[v]);const P=x/2-E/2,D=C/2-f[v]/2-1,O=ee(h[y],D),N=ee(h[w],D),k=O,L=C-f[v]-N,T=C/2-f[v]/2+P,I=Ze(k,T,L),M=!d.arrow&&de(o)!=null&&T!==I&&i.reference[v]/2-(T<k?O:N)-f[v]/2<0,F=M?T<k?T-k:T-L:0;return{[m]:p[m]+F,data:{[m]:I,centerOffset:T-I-F,...M&&{alignmentOffset:F}},reset:M}}}),Do=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:d,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=G(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=q(o),w=Y(a),b=q(a)===a,x=await(d.isRTL==null?void 0:d.isRTL(c.floating)),E=p||(b||!f?[Te(a)]:bo(a)),R=v!=="none";!p&&R&&E.push(...Ro(a,f,v,x));const C=[a,...E],P=await pe(t,g),D=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&D.push(P[y]),h){const T=xo(o,s,x);D.push(P[T[0]],P[T[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(T=>T<=0)){var N,k;const T=(((N=i.flip)==null?void 0:N.index)||0)+1,I=C[T];if(I&&(!(h==="alignment"?w!==Y(I):!1)||O.every(A=>Y(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:T,overflows:O},reset:{placement:I}};let M=(k=O.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!M)switch(m){case"bestFit":{var L;const F=(L=O.filter(A=>{if(R){const _=Y(A.placement);return _===w||_==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((A,_)=>A[1]-_[1])[0])==null?void 0:L[0];F&&(M=F);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Dt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tt(e){return go.some(t=>e[t]>=0)}const To=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=G(e,t);switch(r){case"referenceHidden":{const i=await pe(t,{...o,elementContext:"reference"}),s=Dt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Tt(s)}}}case"escaped":{const i=await pe(t,{...o,altBoundary:!0}),s=Dt(i,n.floating);return{data:{escapedOffsets:s,escaped:Tt(s)}}}default:return{}}}}},vn=new Set(["left","top"]);async function No(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=q(n),a=de(n),d=Y(n)==="y",c=vn.has(s)?-1:1,u=i&&d?-1:1,h=G(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Lo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,d=await No(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:s}}}}},Mo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...d}=G(e,t),c={x:n,y:r},u=await pe(t,d),h=Y(q(o)),p=ot(h);let m=c[p],v=c[h];if(i){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=m+u[g],b=m-u[y];m=Ze(w,m,b)}if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=v+u[g],b=v-u[y];v=Ze(w,v,b)}const f=a.fn({...t,[p]:m,[h]:v});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[p]:i,[h]:s}}}}}},Fo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:d=!0,crossAxis:c=!0}=G(e,t),u={x:n,y:r},h=Y(o),p=ot(h);let m=u[p],v=u[h];const f=G(a,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(d){const b=p==="y"?"height":"width",x=i.reference[p]-i.floating[b]+g.mainAxis,E=i.reference[p]+i.reference[b]-g.mainAxis;m<x?m=x:m>E&&(m=E)}if(c){var y,w;const b=p==="y"?"width":"height",x=vn.has(q(o)),E=i.reference[h]-i.floating[b]+(x&&((y=s.offset)==null?void 0:y[h])||0)+(x?0:g.crossAxis),R=i.reference[h]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[h])||0)-(x?g.crossAxis:0);v<E?v=E:v>R&&(v=R)}return{[p]:m,[h]:v}}}},ko=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:d=()=>{},...c}=G(e,t),u=await pe(t,c),h=q(o),p=de(o),m=Y(o)==="y",{width:v,height:f}=i.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,g=p==="end"?"top":"bottom");const w=f-u.top-u.bottom,b=v-u.left-u.right,x=ee(f-u[g],w),E=ee(v-u[y],b),R=!t.middlewareData.shift;let C=x,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!p){const O=W(u.left,0),N=W(u.right,0),k=W(u.top,0),L=W(u.bottom,0);m?P=v-2*(O!==0||N!==0?O+N:W(u.left,u.right)):C=f-2*(k!==0||L!==0?k+L:W(u.top,u.bottom))}await d({...t,availableWidth:P,availableHeight:C});const D=await s.getDimensions(a.floating);return v!==D.width||f!==D.height?{reset:{rects:!0}}:{}}}};function ke(){return typeof window<"u"}function he(e){return yn(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(yn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yn(e){return ke()?e instanceof Node||e instanceof B(e).Node:!1}function j(e){return ke()?e instanceof Element||e instanceof B(e).Element:!1}function X(e){return ke()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function Nt(e){return!ke()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}const _o=new Set(["inline","contents"]);function ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!_o.has(o)}const Io=new Set(["table","td","th"]);function Wo(e){return Io.has(he(e))}const Bo=[":popover-open",":modal"];function _e(e){return Bo.some(t=>{try{return e.matches(t)}catch{return!1}})}const $o=["transform","translate","scale","rotate","perspective"],jo=["transform","translate","scale","rotate","perspective","filter"],Ho=["paint","layout","strict","content"];function at(e){const t=ct(),n=j(e)?H(e):e;return $o.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)||jo.some(r=>(n.willChange||"").includes(r))||Ho.some(r=>(n.contain||"").includes(r))}function Vo(e){let t=te(e);for(;X(t)&&!fe(t);){if(at(t))return t;if(_e(t))return null;t=te(t)}return null}function ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zo=new Set(["html","body","#document"]);function fe(e){return zo.has(he(e))}function H(e){return B(e).getComputedStyle(e)}function Ie(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function te(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nt(e)&&e.host||K(e);return Nt(t)?t.host:t}function wn(e){const t=te(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&ve(t)?t:wn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=B(o);if(i){const a=Je(s);return t.concat(s,s.visualViewport||[],ve(o)?o:[],a&&n?ge(a):[])}return t.concat(o,ge(o,[],n))}function Je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){const t=H(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=X(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=De(n)!==i||De(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function lt(e){return j(e)?e:e.contextElement}function le(e){const t=lt(e);if(!X(t))return U(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=xn(t);let s=(i?De(n.width):n.width)/r,a=(i?De(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Yo=U(0);function bn(e){const t=B(e);return!ct()||!t.visualViewport?Yo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=lt(e);let s=U(1);t&&(r?j(r)&&(s=le(r)):s=le(e));const a=Uo(i,n,r)?bn(i):U(0);let d=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(i){const p=B(i),m=r&&j(r)?B(r):r;let v=p,f=Je(v);for(;f&&r&&m!==v;){const g=le(f),y=f.getBoundingClientRect(),w=H(f),b=y.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,x=y.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;d*=g.x,c*=g.y,u*=g.x,h*=g.y,d+=b,c+=x,v=B(f),f=Je(v)}}return Ne({width:u,height:h,x:d,y:c})}function We(e,t){const n=Ie(e).scrollLeft;return t?t.left+n:oe(K(e)).left+n}function En(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-We(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=K(r),a=t?_e(t.floating):!1;if(r===s||a&&i)return n;let d={scrollLeft:0,scrollTop:0},c=U(1);const u=U(0),h=X(r);if((h||!h&&!i)&&((he(r)!=="body"||ve(s))&&(d=Ie(r)),X(r))){const m=oe(r);c=le(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const p=s&&!h&&!i?En(s,d):U(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-d.scrollTop*c.y+u.y+p.y}}function Ko(e){return Array.from(e.getClientRects())}function Go(e){const t=K(e),n=Ie(e),r=e.ownerDocument.body,o=W(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=W(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+We(e);const a=-n.scrollTop;return H(r).direction==="rtl"&&(s+=W(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Lt=25;function qo(e,t){const n=B(e),r=K(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,d=0;if(o){i=o.width,s=o.height;const u=ct();(!u||u&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const c=We(r);if(c<=0){const u=r.ownerDocument,h=u.body,p=getComputedStyle(h),m=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-h.clientWidth-m);v<=Lt&&(i-=v)}else c<=Lt&&(i+=c);return{width:i,height:s,x:a,y:d}}const Zo=new Set(["absolute","fixed"]);function Qo(e,t){const n=oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=X(e)?le(e):U(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,d=o*i.x,c=r*i.y;return{width:s,height:a,x:d,y:c}}function Mt(e,t,n){let r;if(t==="viewport")r=qo(e,n);else if(t==="document")r=Go(K(e));else if(j(t))r=Qo(t,n);else{const o=bn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ne(r)}function Cn(e,t){const n=te(e);return n===t||!j(n)||fe(n)?!1:H(n).position==="fixed"||Cn(n,t)}function Jo(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(a=>j(a)&&he(a)!=="body"),o=null;const i=H(e).position==="fixed";let s=i?te(e):e;for(;j(s)&&!fe(s);){const a=H(s),d=at(s);!d&&a.position==="fixed"&&(o=null),(i?!d&&!o:!d&&a.position==="static"&&!!o&&Zo.has(o.position)||ve(s)&&!d&&Cn(e,s))?r=r.filter(u=>u!==s):o=a,s=te(s)}return t.set(e,r),r}function ei(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_e(t)?[]:Jo(t,this._c):[].concat(n),r],a=s[0],d=s.reduce((c,u)=>{const h=Mt(t,u,o);return c.top=W(h.top,c.top),c.right=ee(h.right,c.right),c.bottom=ee(h.bottom,c.bottom),c.left=W(h.left,c.left),c},Mt(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ti(e){const{width:t,height:n}=xn(e);return{width:t,height:n}}function ni(e,t,n){const r=X(t),o=K(t),i=n==="fixed",s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const d=U(0);function c(){d.x=We(o)}if(r||!r&&!i)if((he(t)!=="body"||ve(o))&&(a=Ie(t)),r){const m=oe(t,!0,i,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?En(o,a):U(0),h=s.left+a.scrollLeft-d.x-u.x,p=s.top+a.scrollTop-d.y-u.y;return{x:h,y:p,width:s.width,height:s.height}}function Xe(e){return H(e).position==="static"}function Ft(e,t){if(!X(e)||H(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function Sn(e,t){const n=B(e);if(_e(e))return n;if(!X(e)){let o=te(e);for(;o&&!fe(o);){if(j(o)&&!Xe(o))return o;o=te(o)}return n}let r=Ft(e,t);for(;r&&Wo(r)&&Xe(r);)r=Ft(r,t);return r&&fe(r)&&Xe(r)&&!at(r)?n:r||Vo(e)||n}const ri=async function(e){const t=this.getOffsetParent||Sn,n=this.getDimensions,r=await n(e.floating);return{reference:ni(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oi(e){return H(e).direction==="rtl"}const ii={convertOffsetParentRelativeRectToViewportRelativeRect:Xo,getDocumentElement:K,getClippingRect:ei,getOffsetParent:Sn,getElementRects:ri,getClientRects:Ko,getDimensions:ti,getScale:le,isElement:j,isRTL:oi};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function si(e,t){let n=null,r;const o=K(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),i();const c=e.getBoundingClientRect(),{left:u,top:h,width:p,height:m}=c;if(a||t(),!p||!m)return;const v=Ce(h),f=Ce(o.clientWidth-(u+p)),g=Ce(o.clientHeight-(h+m)),y=Ce(u),b={rootMargin:-v+"px "+-f+"px "+-g+"px "+-y+"px",threshold:W(0,ee(1,d))||1};let x=!0;function E(R){const C=R[0].intersectionRatio;if(C!==d){if(!x)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Rn(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function ai(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,c=lt(e),u=o||i?[...c?ge(c):[],...ge(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=c&&a?si(c,n):null;let p=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),c&&!d&&m.observe(c),m.observe(t));let v,f=d?oe(e):null;d&&g();function g(){const y=oe(e);f&&!Rn(f,y)&&n(),f=y,v=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),h?.(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(v)}}const ci=Lo,li=Mo,ui=Do,fi=ko,di=To,kt=Oo,hi=Fo,mi=(e,t,n)=>{const r=new Map,o={platform:ii,...n},i={...o.platform,_c:r};return Po(e,t,{...o,platform:i})};var pi=typeof document<"u",gi=function(){},Ae=pi?l.useLayoutEffect:gi;function Le(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(!Le(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)&&!Le(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function An(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _t(e,t){const n=An(e);return Math.round(t*n)/n}function Ke(e){const t=l.useRef(e);return Ae(()=>{t.current=e}),t}function vi(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:c}=e,[u,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=l.useState(r);Le(p,r)||m(r);const[v,f]=l.useState(null),[g,y]=l.useState(null),w=l.useCallback(A=>{A!==R.current&&(R.current=A,f(A))},[]),b=l.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),x=i||v,E=s||g,R=l.useRef(null),C=l.useRef(null),P=l.useRef(u),D=d!=null,O=Ke(d),N=Ke(o),k=Ke(c),L=l.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:p};N.current&&(A.platform=N.current),mi(R.current,C.current,A).then(_=>{const z={..._,isPositioned:k.current!==!1};T.current&&!Le(P.current,z)&&(P.current=z,er.flushSync(()=>{h(z)}))})},[p,t,n,N,k]);Ae(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[c]);const T=l.useRef(!1);Ae(()=>(T.current=!0,()=>{T.current=!1}),[]),Ae(()=>{if(x&&(R.current=x),E&&(C.current=E),x&&E){if(O.current)return O.current(x,E,L);L()}},[x,E,L,O,D]);const I=l.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:b}),[w,b]),M=l.useMemo(()=>({reference:x,floating:E}),[x,E]),F=l.useMemo(()=>{const A={position:n,left:0,top:0};if(!M.floating)return A;const _=_t(M.floating,u.x),z=_t(M.floating,u.y);return a?{...A,transform:"translate("+_+"px, "+z+"px)",...An(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,a,M.floating,u.x,u.y]);return l.useMemo(()=>({...u,update:L,refs:I,elements:M,floatingStyles:F}),[u,L,I,M,F])}const yi=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?kt({element:r.current,padding:o}).fn(n):{}:r?kt({element:r,padding:o}).fn(n):{}}}},wi=(e,t)=>({...ci(e),options:[e,t]}),xi=(e,t)=>({...li(e),options:[e,t]}),bi=(e,t)=>({...hi(e),options:[e,t]}),Ei=(e,t)=>({...ui(e),options:[e,t]}),Ci=(e,t)=>({...fi(e),options:[e,t]}),Si=(e,t)=>({...di(e),options:[e,t]}),Ri=(e,t)=>({...yi(e),options:[e,t]});var Ai="Arrow",Pn=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return S.jsx($.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pn.displayName=Ai;var Pi=Pn,ut="Popper",[On,Zi]=It(ut),[Oi,Dn]=On(ut),Tn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return S.jsx(Oi,{scope:t,anchor:r,onAnchorChange:o,children:n})};Tn.displayName=ut;var Nn="PopperAnchor",Ln=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Dn(Nn,n),s=l.useRef(null),a=ne(t,s),d=l.useRef(null);return l.useEffect(()=>{const c=d.current;d.current=r?.current||s.current,c!==d.current&&i.onAnchorChange(d.current)}),r?null:S.jsx($.div,{...o,ref:a})});Ln.displayName=Nn;var ft="PopperContent",[Di,Ti]=On(ft),Mn=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:v,...f}=e,g=Dn(ft,n),[y,w]=l.useState(null),b=ne(t,me=>w(me)),[x,E]=l.useState(null),R=Qn(x),C=R?.width??0,P=R?.height??0,D=r+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(c)?c:[c],k=N.length>0,L={padding:O,boundary:N.filter(Li),altBoundary:k},{refs:T,floatingStyles:I,placement:M,isPositioned:F,middlewareData:A}=vi({strategy:"fixed",placement:D,whileElementsMounted:(...me)=>ai(...me,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[wi({mainAxis:o+P,alignmentAxis:s}),d&&xi({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?bi():void 0,...L}),d&&Ei({...L}),Ci({...L,apply:({elements:me,rects:ht,availableWidth:Vn,availableHeight:zn})=>{const{width:Yn,height:Un}=ht.reference,ye=me.floating.style;ye.setProperty("--radix-popper-available-width",`${Vn}px`),ye.setProperty("--radix-popper-available-height",`${zn}px`),ye.setProperty("--radix-popper-anchor-width",`${Yn}px`),ye.setProperty("--radix-popper-anchor-height",`${Un}px`)}}),x&&Ri({element:x,padding:a}),Mi({arrowWidth:C,arrowHeight:P}),p&&Si({strategy:"referenceHidden",...L})]}),[_,z]=_n(M),dt=ue(v);Pe(()=>{F&&dt?.()},[F,dt]);const Wn=A.arrow?.x,Bn=A.arrow?.y,$n=A.arrow?.centerOffset!==0,[jn,Hn]=l.useState();return Pe(()=>{y&&Hn(window.getComputedStyle(y).zIndex)},[y]),S.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:F?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:jn,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(Di,{scope:n,placedSide:_,onArrowChange:E,arrowX:Wn,arrowY:Bn,shouldHideArrow:$n,children:S.jsx($.div,{"data-side":_,"data-align":z,...f,ref:b,style:{...f.style,animation:F?void 0:"none"}})})})});Mn.displayName=ft;var Fn="PopperArrow",Ni={top:"bottom",right:"left",bottom:"top",left:"right"},kn=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ti(Fn,r),s=Ni[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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:S.jsx(Pi,{...o,ref:n,style:{...o.style,display:"block"}})})});kn.displayName=Fn;function Li(e){return e!==null}var Mi=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[c,u]=_n(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+d/2;let v="",f="";return c==="bottom"?(v=s?h:`${p}px`,f=`${-d}px`):c==="top"?(v=s?h:`${p}px`,f=`${r.floating.height+d}px`):c==="right"?(v=`${-d}px`,f=s?h:`${m}px`):c==="left"&&(v=`${r.floating.width+d}px`,f=s?h:`${m}px`),{data:{x:v,y:f}}}});function _n(e){const[t,n="center"]=e.split("-");return[t,n]}var Qi=Tn,Ji=Ln,es=Mn,ts=kn,Fi=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"}),ki="VisuallyHidden",In=l.forwardRef((e,t)=>S.jsx($.span,{...e,ref:t,style:{...Fi,...e.style}}));In.displayName=ki;var ns=In;export{Ji as A,Xi as C,Gi as D,Ht as F,Ui as O,Yi as P,Vi as R,Ki as T,Fi as V,Hi as W,qi as a,Qi as b,Zi as c,zt as d,ue as e,xr as f,Zt as g,io as h,$t as i,es as j,ts as k,ji as l,zi as m,ns as n,Be as u};
@@ -0,0 +1 @@
1
+ import{a as s,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{c as W,u as $,a as z,b as m,d as H,g as J}from"./index-CYog0F9C.js";import{u as N}from"./index-B-2LEQwB.js";import{c as S,u as Q,b as Z,A as ee,d as te,k as oe,i as re,j as ne,n as se}from"./index-KAkY22zU.js";var[O]=W("Tooltip",[S]),A=S(),G="TooltipProvider",ae=700,D="tooltip.open",[ie,L]=O(G),F=t=>{const{__scopeTooltip:o,delayDuration:e=ae,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:c}=t,i=s.useRef(!0),v=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{const d=a.current;return()=>window.clearTimeout(d)},[]),p.jsx(ie,{scope:o,isOpenDelayedRef:i,delayDuration:e,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:v,onPointerInTransitChange:s.useCallback(d=>{v.current=d},[]),disableHoverableContent:n,children:c})};F.displayName=G;var R="Tooltip",[ce,_]=O(R),B=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n,onOpenChange:c,disableHoverableContent:i,delayDuration:v}=t,a=L(R,t.__scopeTooltip),d=A(o),[l,f]=s.useState(null),h=Q(),u=s.useRef(0),x=i??a.disableHoverableContent,C=v??a.delayDuration,T=s.useRef(!1),[y,g]=$({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(D))):a.onClose(),c?.(I)},caller:R}),w=s.useMemo(()=>y?T.current?"delayed-open":"instant-open":"closed",[y]),P=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,T.current=!1,g(!0)},[g]),E=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,g(!1)},[g]),M=s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{T.current=!0,g(!0),u.current=0},C)},[C,g]);return s.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(Z,{...d,children:p.jsx(ce,{scope:o,contentId:h,open:y,stateAttribute:w,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?M():P()},[a.isOpenDelayedRef,M,P]),onTriggerLeave:s.useCallback(()=>{x?E():(window.clearTimeout(u.current),u.current=0)},[E,x]),onOpen:P,onClose:E,disableHoverableContent:x,children:e})})};B.displayName=R;var j="TooltipTrigger",U=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=_(j,e),c=L(j,e),i=A(e),v=s.useRef(null),a=N(o,v,n.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(ee,{asChild:!0,...i,children:p.jsx(z.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:m(t.onPointerMove,h=>{h.pointerType!=="touch"&&!l.current&&!c.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:m(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:m(t.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:m(t.onFocus,()=>{d.current||n.onOpen()}),onBlur:m(t.onBlur,n.onClose),onClick:m(t.onClick,n.onClose)})})});U.displayName=j;var k="TooltipPortal",[le,ue]=O(k,{forceMount:void 0}),V=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,c=_(k,o);return p.jsx(le,{scope:o,forceMount:e,children:p.jsx(H,{present:e||c.open,children:p.jsx(te,{asChild:!0,container:n,children:r})})})};V.displayName=k;var b="TooltipContent",Y=s.forwardRef((t,o)=>{const e=ue(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...c}=t,i=_(b,t.__scopeTooltip);return p.jsx(H,{present:r||i.open,children:i.disableHoverableContent?p.jsx(q,{side:n,...c,ref:o}):p.jsx(pe,{side:n,...c,ref:o})})}),pe=s.forwardRef((t,o)=>{const e=_(b,t.__scopeTooltip),r=L(b,t.__scopeTooltip),n=s.useRef(null),c=N(o,n),[i,v]=s.useState(null),{trigger:a,onClose:d}=e,l=n.current,{onPointerInTransitChange:f}=r,h=s.useCallback(()=>{v(null),f(!1)},[f]),u=s.useCallback((x,C)=>{const T=x.currentTarget,y={x:x.clientX,y:x.clientY},g=he(y,T.getBoundingClientRect()),w=xe(y,g),P=Te(C.getBoundingClientRect()),E=ge([...w,...P]);v(E),f(!0)},[f]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&l){const x=T=>u(T,l),C=T=>u(T,a);return a.addEventListener("pointerleave",x),l.addEventListener("pointerleave",C),()=>{a.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",C)}}},[a,l,u,h]),s.useEffect(()=>{if(i){const x=C=>{const T=C.target,y={x:C.clientX,y:C.clientY},g=a?.contains(T)||l?.contains(T),w=!Ce(y,i);g?h():w&&(h(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[a,l,i,d,h]),p.jsx(q,{...t,ref:c})}),[de,fe]=O(R,{isInside:!1}),ve=J("TooltipContent"),q=s.forwardRef((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:c,onPointerDownOutside:i,...v}=t,a=_(b,e),d=A(e),{onClose:l}=a;return s.useEffect(()=>(document.addEventListener(D,l),()=>document.removeEventListener(D,l)),[l]),s.useEffect(()=>{if(a.trigger){const f=h=>{h.target?.contains(a.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[a.trigger,l]),p.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:p.jsxs(ne,{"data-state":a.stateAttribute,...d,...v,ref:o,style:{...v.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:[p.jsx(ve,{children:r}),p.jsx(de,{scope:e,isInside:!0,children:p.jsx(se,{id:a.contentId,role:"tooltip",children:n||r})})]})})});Y.displayName=b;var X="TooltipArrow",K=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=A(e);return fe(X,e).isInside?null:p.jsx(oe,{...n,...r,ref:o})});K.displayName=X;function he(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),c=Math.abs(o.left-t.x);switch(Math.min(e,r,n,c)){case c:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Te(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function Ce(t,o){const{x:e,y:r}=t;let n=!1;for(let c=0,i=o.length-1;c<o.length;i=c++){const v=o[c],a=o[i],d=v.x,l=v.y,f=a.x,h=a.y;l>r!=h>r&&e<(f-d)*(r-l)/(h-l)+d&&(n=!n)}return n}function ge(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),ye(o)}function ye(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const c=o[o.length-1],i=o[o.length-2];if((c.x-i.x)*(n.y-i.y)>=(c.y-i.y)*(n.x-i.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const c=e[e.length-1],i=e[e.length-2];if((c.x-i.x)*(n.y-i.y)>=(c.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Ee=F,Re=B,_e=U,Oe=V,Ae=Y,De=K;export{De as A,Ae as C,Ee as P,Re as R,_e as T,Oe as a};