@theroutingcompany/components 0.0.61-alpha.1 → 0.0.61-alpha.2
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.
|
@@ -155,7 +155,7 @@ object-assign
|
|
|
155
155
|
animation: ${PP} 300ms cubic-bezier(0.87, 0, 0.13, 1); // todo: use tokens
|
|
156
156
|
transform: translateZ(0);
|
|
157
157
|
}
|
|
158
|
-
`,mp=()=>w(Xf,{children:w(Jf,{})}),dn=({children:e,type:t,...r})=>w(kP,{type:t,...r,children:e});dn.displayName="Accordion",dn.Item=pp,dn.Header=fp,dn.Content=OP,dn.Trigger=mp;const MP=dn;function FP(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const gs="dismissableLayer.update",NP="dismissableLayer.pointerDownOutside",LP="dismissableLayer.focusOutside";let hp;const bp=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),un=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...d}=e,u=c.useContext(bp),[p,m]=c.useState(null),h=(r=p==null?void 0:p.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,b]=c.useState({}),g=he(t,x=>m(x)),v=Array.from(u.layers),[$]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf($),_=p?v.indexOf(p):-1,D=u.layersWithOutsidePointerEventsDisabled.size>0,P=_>=y,L=RP(x=>{const I=x.target,z=[...u.branches].some(E=>E.contains(I));!P||z||(a==null||a(x),l==null||l(x),x.defaultPrevented||s==null||s())},h),T=KP(x=>{const I=x.target;[...u.branches].some(E=>E.contains(I))||(i==null||i(x),l==null||l(x),x.defaultPrevented||s==null||s())},h);return FP(x=>{_===u.layers.size-1&&(o==null||o(x),!x.defaultPrevented&&s&&(x.preventDefault(),s()))},h),c.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),gp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hp)}},[p,h,n,u]),c.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),gp())},[p,u]),c.useEffect(()=>{const x=()=>b({});return document.addEventListener(gs,x),()=>document.removeEventListener(gs,x)},[]),c.createElement(se.div,C({},d,{ref:g,style:{pointerEvents:D?P?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,L.onPointerDownCapture)}))}),zP=c.forwardRef((e,t)=>{const r=c.useContext(bp),n=c.useRef(null),o=he(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),c.createElement(se.div,C({},e,{ref:o}))});function RP(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){vp(NP,r,s,{discrete:!0})};const s={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function KP(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&vp(LP,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function gp(){const e=new CustomEvent(gs);document.dispatchEvent(e)}function vp(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?es(o,a):o.dispatchEvent(a)}const VP=un,BP=zP,vs="focusScope.autoFocusOnMount",ys="focusScope.autoFocusOnUnmount",yp={bubbles:!1,cancelable:!0},Ta=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=c.useState(null),d=ze(o),u=ze(a),p=c.useRef(null),m=he(t,g=>s(g)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let g=function(_){if(h.paused||!l)return;const D=_.target;l.contains(D)?p.current=D:dr(p.current,{select:!0})},v=function(_){if(h.paused||!l)return;const D=_.relatedTarget;D!==null&&(l.contains(D)||dr(p.current,{select:!0}))},$=function(_){const D=document.activeElement;for(const P of _)P.removedNodes.length>0&&(l!=null&&l.contains(D)||dr(l))};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const y=new MutationObserver($);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),y.disconnect()}}},[n,l,h.paused]),c.useEffect(()=>{if(l){xp.add(h);const g=document.activeElement;if(!l.contains(g)){const $=new CustomEvent(vs,yp);l.addEventListener(vs,d),l.dispatchEvent($),$.defaultPrevented||(jP(YP($p(l)),{select:!0}),document.activeElement===g&&dr(l))}return()=>{l.removeEventListener(vs,d),setTimeout(()=>{const $=new CustomEvent(ys,yp);l.addEventListener(ys,u),l.dispatchEvent($),$.defaultPrevented||dr(g??document.body,{select:!0}),l.removeEventListener(ys,u),xp.remove(h)},0)}}},[l,d,u,h]);const b=c.useCallback(g=>{if(!r&&!n||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,$=document.activeElement;if(v&&$){const y=g.currentTarget,[_,D]=UP(y);_&&D?!g.shiftKey&&$===D?(g.preventDefault(),r&&dr(_,{select:!0})):g.shiftKey&&$===_&&(g.preventDefault(),r&&dr(D,{select:!0})):$===y&&g.preventDefault()}},[r,n,h.paused]);return c.createElement(se.div,C({tabIndex:-1},i,{ref:m,onKeyDown:b}))});function jP(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(dr(n,{select:t}),document.activeElement!==r)return}function UP(e){const t=$p(e),r=_p(t,e),n=_p(t.reverse(),e);return[r,n]}function $p(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _p(e,t){for(const r of e)if(!WP(r,{upTo:t}))return r}function WP(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 HP(e){return e instanceof HTMLInputElement&&"select"in e}function dr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&HP(e)&&t&&e.select()}}const xp=GP();function GP(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=wp(e,t),e.unshift(t)},remove(t){var r;e=wp(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function wp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function YP(e){return e.filter(t=>t.tagName!=="A")}const fn=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?zt.default.createPortal(c.createElement(se.div,C({},o,{ref:t})),n):null});let $s=0;function Ca(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Dp()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Dp()),$s++,()=>{$s===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),$s--}},[])}function Dp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Tt=function(){return Tt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Tt.apply(this,arguments)};function Sp(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function qP(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ia="right-scroll-bar-position",Aa="width-before-scroll-bar",ZP="with-scroll-bars-hidden",XP="--removed-body-scroll-bar-size";function JP(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function QP(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Ep(e,t){return QP(t||null,function(r){return e.forEach(function(n){return JP(n,r)})})}function Pp(e){return e}function kp(e,t){t===void 0&&(t=Pp);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var s=function(){var u=i;i=[],u.forEach(a)},d=function(){return Promise.resolve().then(s)};d(),r={push:function(u){i.push(u),d()},filter:function(u){return i=i.filter(u),r}}}};return o}function _s(e,t){return t===void 0&&(t=Pp),kp(e,t)}function Tp(e){e===void 0&&(e={});var t=kp(null);return t.options=Tt({async:!0,ssr:!1},e),t}var Cp=function(e){var t=e.sideCar,r=Sp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,Tt({},r))};Cp.isSideCarExport=!0;function ek(e,t){return e.useMedium(t),Cp}var Ip=Tp(),xs=function(){},Oa=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:xs,onWheelCapture:xs,onTouchMoveCapture:xs}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,s=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,b=e.inert,g=e.allowPinchZoom,v=e.as,$=v===void 0?"div":v,y=Sp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=m,D=Ep([r,t]),P=Tt(Tt({},y),o);return S.createElement(S.Fragment,null,u&&S.createElement(_,{sideCar:Ip,removeScrollBar:d,shards:p,noIsolation:h,inert:b,setCallbacks:a,allowPinchZoom:!!g,lockRef:r}),i?S.cloneElement(S.Children.only(l),Tt(Tt({},P),{ref:D})):S.createElement($,Tt({},P,{className:s,ref:D}),l))});Oa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Oa.classNames={fullWidth:Aa,zeroRight:Ia};var Ap,tk=function(){if(Ap)return Ap;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tk();return t&&e.setAttribute("nonce",t),e}function nk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ok(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ak=function(){var e=0,t=null;return{add:function(r){e==0&&(t=rk())&&(nk(t,r),ok(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ik=function(){var e=ak();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Op=function(){var e=ik(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},lk={left:0,top:0,right:0,gap:0},ws=function(e){return parseInt(e||"",10)||0},sk=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ws(r),ws(n),ws(o)]},ck=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lk;var t=sk(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dk=Op(),uk=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
158
|
+
`,mp=({children:e})=>w(Xf,{children:w(Jf,{children:e})}),dn=({children:e,type:t,...r})=>w(kP,{type:t,...r,children:e});dn.displayName="Accordion",dn.Item=pp,dn.Header=fp,dn.Content=OP,dn.Trigger=mp;const MP=dn;function FP(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const gs="dismissableLayer.update",NP="dismissableLayer.pointerDownOutside",LP="dismissableLayer.focusOutside";let hp;const bp=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),un=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...d}=e,u=c.useContext(bp),[p,m]=c.useState(null),h=(r=p==null?void 0:p.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,b]=c.useState({}),g=he(t,x=>m(x)),v=Array.from(u.layers),[$]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf($),_=p?v.indexOf(p):-1,D=u.layersWithOutsidePointerEventsDisabled.size>0,P=_>=y,L=RP(x=>{const I=x.target,z=[...u.branches].some(E=>E.contains(I));!P||z||(a==null||a(x),l==null||l(x),x.defaultPrevented||s==null||s())},h),T=KP(x=>{const I=x.target;[...u.branches].some(E=>E.contains(I))||(i==null||i(x),l==null||l(x),x.defaultPrevented||s==null||s())},h);return FP(x=>{_===u.layers.size-1&&(o==null||o(x),!x.defaultPrevented&&s&&(x.preventDefault(),s()))},h),c.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),gp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hp)}},[p,h,n,u]),c.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),gp())},[p,u]),c.useEffect(()=>{const x=()=>b({});return document.addEventListener(gs,x),()=>document.removeEventListener(gs,x)},[]),c.createElement(se.div,C({},d,{ref:g,style:{pointerEvents:D?P?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,L.onPointerDownCapture)}))}),zP=c.forwardRef((e,t)=>{const r=c.useContext(bp),n=c.useRef(null),o=he(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),c.createElement(se.div,C({},e,{ref:o}))});function RP(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){vp(NP,r,s,{discrete:!0})};const s={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function KP(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&vp(LP,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function gp(){const e=new CustomEvent(gs);document.dispatchEvent(e)}function vp(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?es(o,a):o.dispatchEvent(a)}const VP=un,BP=zP,vs="focusScope.autoFocusOnMount",ys="focusScope.autoFocusOnUnmount",yp={bubbles:!1,cancelable:!0},Ta=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=c.useState(null),d=ze(o),u=ze(a),p=c.useRef(null),m=he(t,g=>s(g)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let g=function(_){if(h.paused||!l)return;const D=_.target;l.contains(D)?p.current=D:dr(p.current,{select:!0})},v=function(_){if(h.paused||!l)return;const D=_.relatedTarget;D!==null&&(l.contains(D)||dr(p.current,{select:!0}))},$=function(_){const D=document.activeElement;for(const P of _)P.removedNodes.length>0&&(l!=null&&l.contains(D)||dr(l))};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const y=new MutationObserver($);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),y.disconnect()}}},[n,l,h.paused]),c.useEffect(()=>{if(l){xp.add(h);const g=document.activeElement;if(!l.contains(g)){const $=new CustomEvent(vs,yp);l.addEventListener(vs,d),l.dispatchEvent($),$.defaultPrevented||(jP(YP($p(l)),{select:!0}),document.activeElement===g&&dr(l))}return()=>{l.removeEventListener(vs,d),setTimeout(()=>{const $=new CustomEvent(ys,yp);l.addEventListener(ys,u),l.dispatchEvent($),$.defaultPrevented||dr(g??document.body,{select:!0}),l.removeEventListener(ys,u),xp.remove(h)},0)}}},[l,d,u,h]);const b=c.useCallback(g=>{if(!r&&!n||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,$=document.activeElement;if(v&&$){const y=g.currentTarget,[_,D]=UP(y);_&&D?!g.shiftKey&&$===D?(g.preventDefault(),r&&dr(_,{select:!0})):g.shiftKey&&$===_&&(g.preventDefault(),r&&dr(D,{select:!0})):$===y&&g.preventDefault()}},[r,n,h.paused]);return c.createElement(se.div,C({tabIndex:-1},i,{ref:m,onKeyDown:b}))});function jP(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(dr(n,{select:t}),document.activeElement!==r)return}function UP(e){const t=$p(e),r=_p(t,e),n=_p(t.reverse(),e);return[r,n]}function $p(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _p(e,t){for(const r of e)if(!WP(r,{upTo:t}))return r}function WP(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 HP(e){return e instanceof HTMLInputElement&&"select"in e}function dr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&HP(e)&&t&&e.select()}}const xp=GP();function GP(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=wp(e,t),e.unshift(t)},remove(t){var r;e=wp(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function wp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function YP(e){return e.filter(t=>t.tagName!=="A")}const fn=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?zt.default.createPortal(c.createElement(se.div,C({},o,{ref:t})),n):null});let $s=0;function Ca(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Dp()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Dp()),$s++,()=>{$s===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),$s--}},[])}function Dp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Tt=function(){return Tt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Tt.apply(this,arguments)};function Sp(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function qP(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ia="right-scroll-bar-position",Aa="width-before-scroll-bar",ZP="with-scroll-bars-hidden",XP="--removed-body-scroll-bar-size";function JP(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function QP(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Ep(e,t){return QP(t||null,function(r){return e.forEach(function(n){return JP(n,r)})})}function Pp(e){return e}function kp(e,t){t===void 0&&(t=Pp);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var s=function(){var u=i;i=[],u.forEach(a)},d=function(){return Promise.resolve().then(s)};d(),r={push:function(u){i.push(u),d()},filter:function(u){return i=i.filter(u),r}}}};return o}function _s(e,t){return t===void 0&&(t=Pp),kp(e,t)}function Tp(e){e===void 0&&(e={});var t=kp(null);return t.options=Tt({async:!0,ssr:!1},e),t}var Cp=function(e){var t=e.sideCar,r=Sp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,Tt({},r))};Cp.isSideCarExport=!0;function ek(e,t){return e.useMedium(t),Cp}var Ip=Tp(),xs=function(){},Oa=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:xs,onWheelCapture:xs,onTouchMoveCapture:xs}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,s=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,m=e.sideCar,h=e.noIsolation,b=e.inert,g=e.allowPinchZoom,v=e.as,$=v===void 0?"div":v,y=Sp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=m,D=Ep([r,t]),P=Tt(Tt({},y),o);return S.createElement(S.Fragment,null,u&&S.createElement(_,{sideCar:Ip,removeScrollBar:d,shards:p,noIsolation:h,inert:b,setCallbacks:a,allowPinchZoom:!!g,lockRef:r}),i?S.cloneElement(S.Children.only(l),Tt(Tt({},P),{ref:D})):S.createElement($,Tt({},P,{className:s,ref:D}),l))});Oa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Oa.classNames={fullWidth:Aa,zeroRight:Ia};var Ap,tk=function(){if(Ap)return Ap;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tk();return t&&e.setAttribute("nonce",t),e}function nk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ok(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ak=function(){var e=0,t=null;return{add:function(r){e==0&&(t=rk())&&(nk(t,r),ok(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ik=function(){var e=ak();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Op=function(){var e=ik(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},lk={left:0,top:0,right:0,gap:0},ws=function(e){return parseInt(e||"",10)||0},sk=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ws(r),ws(n),ws(o)]},ck=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lk;var t=sk(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dk=Op(),uk=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
159
159
|
.`.concat(ZP,` {
|
|
160
160
|
overflow: hidden `).concat(n,`;
|
|
161
161
|
padding-right: `).concat(l,"px ").concat(n,`;
|