New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@twilio-paste/modal-dialog-primitive

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio-paste/modal-dialog-primitive - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

6

CHANGELOG.md
# Change Log
## 0.2.6
### Patch Changes
- [`73c596919`](https://github.com/twilio-labs/paste/commit/73c5969191c04b4721a059c9dee329126afc1a8e) [#2269](https://github.com/twilio-labs/paste/pull/2269) Thanks [@SiTaggart](https://github.com/SiTaggart)! - Fixed a regression with the compilation script that caused incompatible ESM module importing of JSON files.
## 0.2.5

@@ -4,0 +10,0 @@

26

dist/index.es.js

@@ -1,6 +0,6 @@

var Ft=Object.create;var ie=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var Lt=e=>ie(e,"__esModule",{value:!0});var Ce=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),mr=(e,r)=>{for(var t in r)ie(e,t,{get:r[t],enumerable:!0})},F=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of kt(r))!At.call(e,a)&&(t||a!=="default")&&ie(e,a,{get:()=>r[a],enumerable:!(n=Dt(r,a))||n.enumerable});return e},ue=(e,r)=>F(Lt(ie(e!=null?Ft(It(e)):{},"default",!r&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Rr=Ce((mo,Sr)=>{"use strict";var Wt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Sr.exports=Wt});var Pr=Ce((po,Cr)=>{"use strict";var Ut=Rr();function Er(){}function Or(){}Or.resetWarningCache=Er;Cr.exports=function(){function e(n,a,u,i,c,l){if(l!==Ut){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function r(){return e}var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:Or,resetWarningCache:Er};return t.PropTypes=t,t}});var $=Ce((yo,Nr)=>{Nr.exports=Pr()();var vo,ho});var o={};mr(o,{default:()=>ce});F(o,jn);import*as ce from"react";import*as jn from"react";function le(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var pr=le()?o.useLayoutEffect:o.useEffect;function vr(){var e=(0,o.useState)(Object.create(null)),r=e[1];return(0,o.useCallback)(function(){r(Object.create(null))},[])}var D={};mr(D,{default:()=>hr});F(D,qn);import*as hr from"react-dom";import*as qn from"react-dom";var yr=function(r){var t=r.children,n=r.type,a=n===void 0?"reach-portal":n,u=(0,o.useRef)(null),i=(0,o.useRef)(null),c=vr();return pr(function(){if(!!u.current){var l=u.current.ownerDocument;return i.current=l==null?void 0:l.createElement(a),l.body.appendChild(i.current),c(),function(){i.current&&i.current.ownerDocument&&i.current.ownerDocument.body.removeChild(i.current)}}},[a,c]),i.current?(0,D.createPortal)(t,i.current):(0,o.createElement)("span",{ref:u})};function gr(e){return le()?e?e.ownerDocument:document:null}function br(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function Pe(){}function xr(e){if(!1)var r}function wr(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Mt(e,r){if(!!e){if(typeof e=="string")return wr(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return wr(e,r)}}function Bt(e,r){var t;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(t=Mt(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return t=e[Symbol.iterator](),t.next.bind(t)}function jt(e,r){if(e!=null)if(br(e))e(r);else try{e.current=r}catch(t){throw new Error('Cannot assign value "'+r+'" to ref "'+e+'"')}}function _r(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,o.useCallback)(function(n){for(var a=Bt(r),u;!(u=a()).done;){var i=u.value;jt(i,n)}},r)}function H(e,r){return function(t){if(e&&e(t),!t.defaultPrevented)return r(t)}}function Ne(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,u;for(u=0;u<n.length;u++)a=n[u],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function P(){return P=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},P.apply(this,arguments)}var Ao=ue($());var q="data-focus-lock",fe="data-focus-lock-disabled",Tr="data-no-focus-lock",Fr="data-autofocus-inside";function Dr(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function kr(e,r){var t=(0,o.useState)(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var a=t.value;a!==n&&(t.value=n,t.callback(n,a))}}}})[0];return t.callback=r,t.facade}function Te(e,r){return kr(r,function(t){return e.forEach(function(n){return Dr(n,t)})})}var Oo=ue($()),M={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ir=function(r){var t=r.children;return o.createElement(o.Fragment,null,o.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:M}),t,t&&o.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:M}))};Ir.propTypes={};Ir.defaultProps={children:null};var se=function(){return se=Object.assign||function(r){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(r[u]=t[u])}return r},se.apply(this,arguments)};function Ar(e){return e}function Lr(e,r){r===void 0&&(r=Ar);var t=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(u){var i=r(u,n);return t.push(i),function(){t=t.filter(function(c){return c!==i})}},assignSyncMedium:function(u){for(n=!0;t.length;){var i=t;t=[],i.forEach(u)}t={push:function(c){return u(c)},filter:function(){return t}}},assignMedium:function(u){n=!0;var i=[];if(t.length){var c=t;t=[],c.forEach(u),i=t}var l=function(){var d=i;i=[],d.forEach(u)},f=function(){return Promise.resolve().then(l)};f(),t={push:function(d){i.push(d),f()},filter:function(d){return i=i.filter(d),t}}}};return a}function Y(e,r){return r===void 0&&(r=Ar),Lr(e,r)}function Fe(e){e===void 0&&(e={});var r=Lr(null);return r.options=se({async:!0,ssr:!1},e),r}var de=Y({},function(e){var r=e.target,t=e.currentTarget;return{target:r,currentTarget:t}}),me=Y(),Mr=Y(),Br=Fe({async:!0});var Ht=[],De=o.forwardRef(function(r,t){var n,a=o.useState(),u=a[0],i=a[1],c=o.useRef(),l=o.useRef(!1),f=o.useRef(null),d=r.children,m=r.disabled,v=r.noFocusGuards,h=r.persistentFocus,y=r.crossFrame,s=r.autoFocus,p=r.allowTextSelection,w=r.group,_=r.className,x=r.whiteList,b=r.shards,g=b===void 0?Ht:b,N=r.as,C=N===void 0?"div":N,O=r.lockProps,L=O===void 0?{}:O,E=r.sideCar,oe=r.returnFocus,Ee=r.onActivation,Oe=r.onDeactivation,xt=o.useState({}),wt=xt[0],_t=o.useCallback(function(){f.current=f.current||document&&document.activeElement,c.current&&Ee&&Ee(c.current),l.current=!0},[Ee]),St=o.useCallback(function(){l.current=!1,Oe&&Oe(c.current)},[Oe]),Rt=o.useCallback(function(T){var ae=f.current;if(Boolean(oe)&&ae&&ae.focus){var dr=typeof oe=="object"?oe:void 0;f.current=null,T?Promise.resolve().then(function(){return ae.focus(dr)}):ae.focus(dr)}},[oe]),Et=o.useCallback(function(T){l.current&&de.useMedium(T)},[]),Ot=me.useMedium,Ct=o.useCallback(function(T){c.current!==T&&(c.current=T,i(T))},[]),Pt=P((n={},n[fe]=m&&"disabled",n[q]=w,n),L),sr=v!==!0,Nt=sr&&v!=="tail",Tt=Te([t,Ct]);return o.createElement(o.Fragment,null,sr&&[o.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:m?-1:0,style:M}),o.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:m?-1:1,style:M})],!m&&o.createElement(E,{id:wt,sideCar:Br,observed:u,disabled:m,persistentFocus:h,crossFrame:y,autoFocus:s,whiteList:x,shards:g,onActivation:_t,onDeactivation:St,returnFocus:Rt}),o.createElement(C,P({ref:Tt},Pt,{className:_,onBlur:Ot,onFocus:Et}),d),Nt&&o.createElement("div",{"data-focus-guard":!0,tabIndex:m?-1:0,style:M}))});De.propTypes={};De.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var ke=De;var ri=ue($());function Z(e,r){return Z=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Z(e,r)}function Ie(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Z(e,r)}function Ae(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $t(e,r){function t(n){return n.displayName||n.name||"Component"}return function(a){var u=[],i;function c(){i=e(u.map(function(f){return f.props})),r(i)}var l=function(f){Ie(d,f);function d(){return f.apply(this,arguments)||this}d.peek=function(){return i};var m=d.prototype;return m.componentDidMount=function(){u.push(this),c()},m.componentDidUpdate=function(){c()},m.componentWillUnmount=function(){var h=u.indexOf(this);u.splice(h,1),c()},m.render=function(){return ce.createElement(a,this.props)},d}(o.PureComponent);return Ae(l,"displayName","SideEffect("+t(a)+")"),l}}var jr=$t;var S=function(e){for(var r=Array(e.length),t=0;t<e.length;++t)r[t]=e[t];return r},X=function(e){return Array.isArray(e)?e:[e]};var qt=function(e){for(var r=new Set,t=e.length,n=0;n<t;n+=1)for(var a=n+1;a<t;a+=1){var u=e[n].compareDocumentPosition(e[a]);(u&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&r.add(a),(u&Node.DOCUMENT_POSITION_CONTAINS)>0&&r.add(n)}return e.filter(function(i,c){return!r.has(c)})},Wr=function(e){return e.parentNode?Wr(e.parentNode):e},B=function(e){var r=X(e);return r.filter(Boolean).reduce(function(t,n){var a=n.getAttribute(q);return t.push.apply(t,a?qt(S(Wr(n).querySelectorAll("["+q+'="'+a+'"]:not(['+fe+'="disabled"])'))):[n]),t},[])};var Yt=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},Zt=function(e,r){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!Yt(window.getComputedStyle(e,null))&&r(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},Le=function(e,r){var t=e.get(r);if(t!==void 0)return t;var n=Zt(r,Le.bind(void 0,e));return e.set(r,n),n},Ur=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},K=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},j=function(e){return!K(e)},Vr=function(e){return Boolean(e)};var Xt=function(e,r){var t=e.tabIndex-r.tabIndex,n=e.index-r.index;if(t){if(!e.tabIndex)return 1;if(!r.tabIndex)return-1}return t||n},Me=function(e,r,t){return S(e).map(function(n,a){return{node:n,index:a,tabIndex:t&&n.tabIndex===-1?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}}).filter(function(n){return!r||n.tabIndex>=0}).sort(Xt)};var Gr=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"];var Be=Gr.join(","),Kt=Be+", [data-focus-guard]",pe=function(e,r){return e.reduce(function(t,n){return t.concat(S(n.querySelectorAll(r?Kt:Be)),n.parentNode?S(n.parentNode.querySelectorAll(Be)).filter(function(a){return a===n}):[])},[])},Hr=function(e){var r=e.querySelectorAll("["+Fr+"]");return S(r).map(function(t){return pe([t])}).reduce(function(t,n){return t.concat(n)},[])};var je=function(e,r){return S(e).filter(function(t){return Le(r,t)}).filter(function(t){return Ur(t)})},z=function(e,r,t){return Me(je(pe(e,t),r),!0,t)},We=function(e,r){return Me(je(pe(e),r),!1)},$r=function(e,r){return je(Hr(e),r)};var Ue=function(e,r){return r===void 0&&(r=[]),r.push(e),e.parentNode&&Ue(e.parentNode,r),r},Ve=function(e,r){for(var t=Ue(e),n=Ue(r),a=0;a<t.length;a+=1){var u=t[a];if(n.indexOf(u)>=0)return u}return!1},ve=function(e,r,t){var n=X(e),a=X(r),u=n[0],i=!1;return a.filter(Boolean).forEach(function(c){i=Ve(i||c,c)||i,t.filter(Boolean).forEach(function(l){var f=Ve(u,l);f&&(!i||f.contains(i)?i=f:i=Ve(f,i))})}),i},qr=function(e,r){return e.reduce(function(t,n){return t.concat($r(n,r))},[])};var Ge=function(e){var r=B(e).filter(j),t=ve(e,e,r),n=new Map,a=z([t],n,!0),u=z(r,n).filter(function(i){var c=i.node;return j(c)}).map(function(i){var c=i.node;return c});return a.map(function(i){var c=i.node,l=i.index;return{node:c,index:l,lockItem:u.indexOf(c)>=0,guard:K(c)}})};var zt=function(e){return e===document.activeElement},Qt=function(e){return Boolean(S(e.querySelectorAll("iframe")).some(function(r){return zt(r)}))},he=function(e){var r=document&&document.activeElement;return!r||r.dataset&&r.dataset.focusGuard?!1:B(e).reduce(function(t,n){return t||n.contains(r)||Qt(n)},!1)};var He=function(){return document&&S(document.querySelectorAll("["+Tr+"]")).some(function(e){return e.contains(document.activeElement)})};var Yr=function(e){return e.tagName==="INPUT"&&e.type==="radio"},Jt=function(e,r){return r.filter(Yr).filter(function(t){return t.name===e.name}).filter(function(t){return t.checked})[0]||e},ye=function(e,r){return Yr(e)&&e.name?Jt(e,r):e},Zr=function(e){var r=new Set;return e.forEach(function(t){return r.add(ye(t,e))}),e.filter(function(t){return r.has(t)})};var $e=function(e){return e[0]&&e.length>1?ye(e[0],e):e[0]},qe=function(e,r){return e.length>1?e.indexOf(ye(e[r],e)):r};var Ye="NEW_FOCUS",Xr=function(e,r,t,n){var a=e.length,u=e[0],i=e[a-1],c=K(t);if(!(e.indexOf(t)>=0)){var l=r.indexOf(t),f=n?r.indexOf(n):l,d=n?e.indexOf(n):-1,m=l-f,v=r.indexOf(u),h=r.indexOf(i),y=Zr(r),s=y.indexOf(t)-(n?y.indexOf(n):l),p=qe(e,0),w=qe(e,a-1);if(l===-1||d===-1)return Ye;if(!m&&d>=0)return d;if(l<=v&&c&&Math.abs(m)>1)return w;if(l>=h&&c&&Math.abs(m)>1)return p;if(m&&Math.abs(s)>1)return d;if(l<=v)return w;if(l>h)return p;if(m)return Math.abs(m)>1?d:(a+d+m)%a}};var en=function(e){return function(r){return r.autofocus||r.dataset&&!!r.dataset.autofocus||e.indexOf(r)>=0}},rn=function(e,r){var t=new Map;return r.forEach(function(n){return t.set(n.node,n)}),e.map(function(n){return t.get(n)}).filter(Vr)},Kr=function(e,r){var t=document&&document.activeElement,n=B(e).filter(j),a=ve(t||e,e,n),u=new Map,i=We(n,u),c=z(n,u).filter(function(h){var y=h.node;return j(y)});if(!(!c[0]&&(c=i,!c[0]))){var l=We([a],u).map(function(h){var y=h.node;return y}),f=rn(l,c),d=f.map(function(h){var y=h.node;return y}),m=Xr(d,l,t,r);if(m===Ye){var v=i.map(function(h){var y=h.node;return y}).filter(en(qr(n,u)));return{node:v&&v.length?$e(v):$e(d)}}return m===void 0?m:f[m]}};var tn=function(e){e.focus(),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Ze=0,Xe=!1,zr=function(e,r){var t=Kr(e,r);if(!Xe&&t){if(Ze>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Xe=!0,setTimeout(function(){Xe=!1},1);return}Ze++,tn(t.node),Ze--}};var Ke=zr;function ze(e){var r=window,t=r.setImmediate;typeof t!="undefined"?t(e):setTimeout(e,1)}var nn=function(){return document&&document.activeElement===document.body},on=function(){return nn()||He()},W=null,U=null,V=null,Q=!1,an=function(){return!0},un=function(r){return(W.whiteList||an)(r)},cn=function(r,t){V={observerNode:r,portaledElement:t}},ln=function(r){return V&&V.portaledElement===r};function Qr(e,r,t,n){var a=null,u=e;do{var i=n[u];if(i.guard)i.node.dataset.focusAutoGuard&&(a=i);else if(i.lockItem){if(u!==e)return;a=null}else break}while((u+=t)!==r);a&&(a.node.tabIndex=0)}var fn=function(r){return r&&"current"in r?r.current:r},sn=function(r){return r?Boolean(Q):Q==="meanwhile"},ge=function(){var r=!1;if(W){var t=W,n=t.observed,a=t.persistentFocus,u=t.autoFocus,i=t.shards,c=t.crossFrame,l=n||V&&V.portaledElement,f=document&&document.activeElement;if(l){var d=[l].concat(i.map(fn).filter(Boolean));if((!f||un(f))&&(a||sn(c)||!on()||!U&&u)&&(l&&!(he(d)||ln(f,l))&&(document&&!U&&f&&!u?(f.blur&&f.blur(),document.body.focus()):(r=Ke(d,U),V={})),Q=!1,U=document&&document.activeElement),document){var m=document&&document.activeElement,v=Ge(d),h=v.map(function(y){var s=y.node;return s}).indexOf(m);h>-1&&(v.filter(function(y){var s=y.guard,p=y.node;return s&&p.dataset.focusAutoGuard}).forEach(function(y){var s=y.node;return s.removeAttribute("tabIndex")}),Qr(h,v.length,1,v),Qr(h,-1,-1,v))}}}return r},Jr=function(r){ge()&&r&&(r.stopPropagation(),r.preventDefault())},be=function(){return ze(ge)},et=function(r){var t=r.target,n=r.currentTarget;n.contains(t)||cn(n,t)},dn=function(){return null},mn=function(r){var t=r.children;return o.createElement("div",{onBlur:be,onFocus:et},t)};mn.propTypes={};var rt=function(){Q="just",setTimeout(function(){Q="meanwhile"},0)},pn=function(){document.addEventListener("focusin",Jr,!0),document.addEventListener("focusout",be),window.addEventListener("blur",rt)},vn=function(){document.removeEventListener("focusin",Jr,!0),document.removeEventListener("focusout",be),window.removeEventListener("blur",rt)};function hn(e){return e.filter(function(r){var t=r.disabled;return!t})}function yn(e){var r=e.slice(-1)[0];r&&!W&&pn();var t=W,n=t&&r&&r.id===t.id;W=r,t&&!n&&(t.onDeactivation(),e.filter(function(a){var u=a.id;return u===t.id}).length||t.returnFocus(!r)),r?(U=null,(!n||t.observed!==r.observed)&&r.onActivation(),ge(!0),ze(ge)):(vn(),U=null)}de.assignSyncMedium(et);me.assignMedium(be);Mr.assignMedium(function(e){return e({moveFocusInside:Ke,focusInside:he})});var tt=jr(hn,yn)(dn);var nt=o.forwardRef(function(r,t){return o.createElement(ke,P({sideCar:tt,ref:t},r))}),ot=ke.propTypes||{},di=ot.sideCar,mi=Ne(ot,["sideCar"]);nt.propTypes={};var at=nt;var it=at;var R=function(){return R=Object.assign||function(r){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(r[u]=t[u])}return r},R.apply(this,arguments)};function xe(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t}var k="right-scroll-bar-position",I="width-before-scroll-bar",Qe="with-scroll-bars-hidden";function gn(e){return e}function bn(e,r){r===void 0&&(r=gn);var t=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(u){var i=r(u,n);return t.push(i),function(){t=t.filter(function(c){return c!==i})}},assignSyncMedium:function(u){for(n=!0;t.length;){var i=t;t=[],i.forEach(u)}t={push:function(c){return u(c)},filter:function(){return t}}},assignMedium:function(u){n=!0;var i=[];if(t.length){var c=t;t=[],c.forEach(u),i=t}var l=function(){var d=i;i=[],d.forEach(u)},f=function(){return Promise.resolve().then(l)};f(),t={push:function(d){i.push(d),f()},filter:function(d){return i=i.filter(d),t}}}};return a}function Je(e){e===void 0&&(e={});var r=bn(null);return r.options=R({async:!0,ssr:!1},e),r}var ut=function(e){var r=e.sideCar,t=xe(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return o.createElement(n,R({},t))};ut.isSideCarExport=!0;function er(e,r){return e.useMedium(r),ut}var _e=Je();function ct(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function lt(e,r){var t=(0,o.useState)(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var a=t.value;a!==n&&(t.value=n,t.callback(n,a))}}}})[0];return t.callback=r,t.facade}function rr(e,r){return lt(r,function(t){return e.forEach(function(n){return ct(n,t)})})}var tr=function(){},J=o.forwardRef(function(e,r){var t=o.useRef(null),n=o.useState({onScrollCapture:tr,onWheelCapture:tr,onTouchMoveCapture:tr}),a=n[0],u=n[1],i=e.forwardProps,c=e.children,l=e.className,f=e.removeScrollBar,d=e.enabled,m=e.shards,v=e.sideCar,h=e.noIsolation,y=e.inert,s=e.allowPinchZoom,p=e.as,w=p===void 0?"div":p,_=xe(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=v,b=rr([t,r]),g=R({},_,a);return o.createElement(o.Fragment,null,d&&o.createElement(x,{sideCar:_e,removeScrollBar:f,shards:m,noIsolation:h,inert:y,setCallbacks:u,allowPinchZoom:!!s,lockRef:t}),i?o.cloneElement(o.Children.only(c),R({},g,{ref:b})):o.createElement(w,R({},g,{className:l,ref:b}),c))});J.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};J.classNames={fullWidth:I,zeroRight:k};var ft;var st=function(){if(ft)return ft;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function xn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=st();return r&&e.setAttribute("nonce",r),e}function wn(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function _n(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var nr=function(){var e=0,r=null;return{add:function(t){e==0&&(r=xn())&&(wn(r,t),_n(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}};var or=function(){var e=nr();return function(r){o.useEffect(function(){return e.add(r),function(){e.remove()}},[])}};var ee=function(){var e=or(),r=function(t){var n=t.styles;return e(n),null};return r};var Sn={left:0,top:0,right:0,gap:0},ar=function(e){return parseInt(e||"",10)||0},Rn=function(e){var r=window.getComputedStyle(document.body),t=r[e==="padding"?"paddingLeft":"marginLeft"],n=r[e==="padding"?"paddingTop":"marginTop"],a=r[e==="padding"?"paddingRight":"marginRight"];return[ar(t),ar(n),ar(a)]},Se=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Sn;var r=Rn(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-t+r[2]-r[0])}};var En=ee(),On=function(e,r,t,n){var a=e.left,u=e.top,i=e.right,c=e.gap;return t===void 0&&(t="margin"),`
.`+Qe+` {
var Wt=Object.create;var Te=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var Gt=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty;var $t=e=>Te(e,"__esModule",{value:!0});var Fe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var qt=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Vt(r))!Ht.call(e,o)&&(t||o!=="default")&&Te(e,o,{get:()=>r[o],enumerable:!(n=Ut(r,o))||n.enumerable});return e},le=(e,r)=>qt($t(Te(e!=null?Wt(Gt(e)):{},"default",!r&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Pr=Fe((ko,Cr)=>{"use strict";var nn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Cr.exports=nn});var Dr=Fe((Io,Fr)=>{"use strict";var on=Pr();function Nr(){}function Tr(){}Tr.resetWarningCache=Nr;Fr.exports=function(){function e(n,o,i,a,u,c){if(c!==on){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function r(){return e}var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:Tr,resetWarningCache:Nr};return t.PropTypes=t,t}});var Z=Fe((Mo,kr)=>{kr.exports=Dr()();var Ao,Lo});import{forwardRef as pr,useEffect as Ct,createElement as q,useRef as Pt,useCallback as ro}from"react";import{useRef as xr,createElement as zt}from"react";import{useLayoutEffect as Yt,useEffect as Zt}from"react";function fe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var gr=fe()?Yt:Zt;import{useState as Xt,useCallback as Kt}from"react";function br(){var e=Xt(Object.create(null)),r=e[1];return Kt(function(){r(Object.create(null))},[])}import{createPortal as Qt}from"react-dom";var wr=function(r){var t=r.children,n=r.type,o=n===void 0?"reach-portal":n,i=xr(null),a=xr(null),u=br();return gr(function(){if(!!i.current){var c=i.current.ownerDocument;return a.current=c==null?void 0:c.createElement(o),c.body.appendChild(a.current),u(),function(){a.current&&a.current.ownerDocument&&a.current.ownerDocument.body.removeChild(a.current)}}},[o,u]),a.current?Qt(t,a.current):zt("span",{ref:i})};function _r(e){return fe()?e?e.ownerDocument:document:null}function Sr(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function De(){}import"react";function Rr(e){if(!1)var r}import{useCallback as Jt}from"react";function Er(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function en(e,r){if(!!e){if(typeof e=="string")return Er(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Er(e,r)}}function rn(e,r){var t;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(t=en(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return t=e[Symbol.iterator](),t.next.bind(t)}function tn(e,r){if(e!=null)if(Sr(e))e(r);else try{e.current=r}catch(t){throw new Error('Cannot assign value "'+r+'" to ref "'+e+'"')}}function Or(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return Jt(function(n){for(var o=rn(r),i;!(i=o()).done;){var a=i.value;tn(a,n)}},r)}function Y(e,r){return function(t){if(e&&e(t),!t.defaultPrevented)return r(t)}}function ke(e,r){if(e==null)return{};var t={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(r.indexOf(o)>=0)&&(t[o]=e[o]);return t}function T(){return T=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},T.apply(this,arguments)}import*as we from"react";var ra=le(Z());import*as y from"react";var X="data-focus-lock",se="data-focus-lock-disabled",Ir="data-no-focus-lock",Ar="data-autofocus-inside";function Lr(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}import{useState as un}from"react";function Mr(e,r){var t=un(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var o=t.value;o!==n&&(t.value=n,t.callback(n,o))}}}})[0];return t.callback=r,t.facade}function Ie(e,r){return Mr(r,function(t){return e.forEach(function(n){return Lr(n,t)})})}var qo=le(Z());import*as M from"react";var B={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Br=function(r){var t=r.children;return M.createElement(M.Fragment,null,M.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:B}),t,t&&M.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:B}))};Br.propTypes={};Br.defaultProps={children:null};var de=function(){return de=Object.assign||function(r){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},de.apply(this,arguments)};function jr(e){return e}function Wr(e,r){r===void 0&&(r=jr);var t=[],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 t.length?t[t.length-1]:e},useMedium:function(i){var a=r(i,n);return t.push(a),function(){t=t.filter(function(u){return u!==a})}},assignSyncMedium:function(i){for(n=!0;t.length;){var a=t;t=[],a.forEach(i)}t={push:function(u){return i(u)},filter:function(){return t}}},assignMedium:function(i){n=!0;var a=[];if(t.length){var u=t;t=[],u.forEach(i),a=t}var c=function(){var s=a;a=[],s.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),t={push:function(s){a.push(s),l()},filter:function(s){return a=a.filter(s),t}}}};return o}function K(e,r){return r===void 0&&(r=jr),Wr(e,r)}function Ae(e){e===void 0&&(e={});var r=Wr(null);return r.options=de({async:!0,ssr:!1},e),r}var me=K({},function(e){var r=e.target,t=e.currentTarget;return{target:r,currentTarget:t}}),pe=K(),Ur=K(),Vr=Ae({async:!0});var ln=[],Le=y.forwardRef(function(r,t){var n,o=y.useState(),i=o[0],a=o[1],u=y.useRef(),c=y.useRef(!1),l=y.useRef(null),s=r.children,d=r.disabled,p=r.noFocusGuards,v=r.persistentFocus,h=r.crossFrame,f=r.autoFocus,m=r.allowTextSelection,S=r.group,R=r.className,w=r.whiteList,x=r.shards,b=x===void 0?ln:x,F=r.as,N=F===void 0?"div":F,P=r.lockProps,L=P===void 0?{}:P,C=r.sideCar,ue=r.returnFocus,Pe=r.onActivation,Ne=r.onDeactivation,Nt=y.useState({}),Tt=Nt[0],Ft=y.useCallback(function(){l.current=l.current||document&&document.activeElement,u.current&&Pe&&Pe(u.current),c.current=!0},[Pe]),Dt=y.useCallback(function(){c.current=!1,Ne&&Ne(u.current)},[Ne]),kt=y.useCallback(function(D){var ce=l.current;if(Boolean(ue)&&ce&&ce.focus){var yr=typeof ue=="object"?ue:void 0;l.current=null,D?Promise.resolve().then(function(){return ce.focus(yr)}):ce.focus(yr)}},[ue]),It=y.useCallback(function(D){c.current&&me.useMedium(D)},[]),At=pe.useMedium,Lt=y.useCallback(function(D){u.current!==D&&(u.current=D,a(D))},[]),Mt=T((n={},n[se]=d&&"disabled",n[X]=S,n),L),hr=p!==!0,Bt=hr&&p!=="tail",jt=Ie([t,Lt]);return y.createElement(y.Fragment,null,hr&&[y.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:d?-1:0,style:B}),y.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:d?-1:1,style:B})],!d&&y.createElement(C,{id:Tt,sideCar:Vr,observed:i,disabled:d,persistentFocus:v,crossFrame:h,autoFocus:f,whiteList:w,shards:b,onActivation:Ft,onDeactivation:Dt,returnFocus:kt}),y.createElement(N,T({ref:jt},Mt,{className:R,onBlur:At,onFocus:It}),s),Bt&&y.createElement("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:B}))});Le.propTypes={};Le.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var Me=Le;var wi=le(Z());import*as tt from"react";function z(e,r){return z=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},z(e,r)}function Be(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,z(e,r)}function je(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}import fn,{PureComponent as sn}from"react";function dn(e,r){function t(n){return n.displayName||n.name||"Component"}return function(o){var i=[],a;function u(){a=e(i.map(function(l){return l.props})),r(a)}var c=function(l){Be(s,l);function s(){return l.apply(this,arguments)||this}s.peek=function(){return a};var d=s.prototype;return d.componentDidMount=function(){i.push(this),u()},d.componentDidUpdate=function(){u()},d.componentWillUnmount=function(){var v=i.indexOf(this);i.splice(v,1),u()},d.render=function(){return fn.createElement(o,this.props)},s}(sn);return je(c,"displayName","SideEffect("+t(o)+")"),c}}var Gr=dn;var E=function(e){for(var r=Array(e.length),t=0;t<e.length;++t)r[t]=e[t];return r},Q=function(e){return Array.isArray(e)?e:[e]};var mn=function(e){for(var r=new Set,t=e.length,n=0;n<t;n+=1)for(var o=n+1;o<t;o+=1){var i=e[n].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&r.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&r.add(n)}return e.filter(function(a,u){return!r.has(u)})},Hr=function(e){return e.parentNode?Hr(e.parentNode):e},j=function(e){var r=Q(e);return r.filter(Boolean).reduce(function(t,n){var o=n.getAttribute(X);return t.push.apply(t,o?mn(E(Hr(n).querySelectorAll("["+X+'="'+o+'"]:not(['+se+'="disabled"])'))):[n]),t},[])};var pn=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},vn=function(e,r){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!pn(window.getComputedStyle(e,null))&&r(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},We=function(e,r){var t=e.get(r);if(t!==void 0)return t;var n=vn(r,We.bind(void 0,e));return e.set(r,n),n},$r=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},J=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},W=function(e){return!J(e)},qr=function(e){return Boolean(e)};var hn=function(e,r){var t=e.tabIndex-r.tabIndex,n=e.index-r.index;if(t){if(!e.tabIndex)return 1;if(!r.tabIndex)return-1}return t||n},Ue=function(e,r,t){return E(e).map(function(n,o){return{node:n,index:o,tabIndex:t&&n.tabIndex===-1?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}}).filter(function(n){return!r||n.tabIndex>=0}).sort(hn)};var Yr=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"];var Ve=Yr.join(","),yn=Ve+", [data-focus-guard]",ve=function(e,r){return e.reduce(function(t,n){return t.concat(E(n.querySelectorAll(r?yn:Ve)),n.parentNode?E(n.parentNode.querySelectorAll(Ve)).filter(function(o){return o===n}):[])},[])},Zr=function(e){var r=e.querySelectorAll("["+Ar+"]");return E(r).map(function(t){return ve([t])}).reduce(function(t,n){return t.concat(n)},[])};var Ge=function(e,r){return E(e).filter(function(t){return We(r,t)}).filter(function(t){return $r(t)})},ee=function(e,r,t){return Ue(Ge(ve(e,t),r),!0,t)},He=function(e,r){return Ue(Ge(ve(e),r),!1)},Xr=function(e,r){return Ge(Zr(e),r)};var $e=function(e,r){return r===void 0&&(r=[]),r.push(e),e.parentNode&&$e(e.parentNode,r),r},qe=function(e,r){for(var t=$e(e),n=$e(r),o=0;o<t.length;o+=1){var i=t[o];if(n.indexOf(i)>=0)return i}return!1},he=function(e,r,t){var n=Q(e),o=Q(r),i=n[0],a=!1;return o.filter(Boolean).forEach(function(u){a=qe(a||u,u)||a,t.filter(Boolean).forEach(function(c){var l=qe(i,c);l&&(!a||l.contains(a)?a=l:a=qe(l,a))})}),a},Kr=function(e,r){return e.reduce(function(t,n){return t.concat(Xr(n,r))},[])};var Ye=function(e){var r=j(e).filter(W),t=he(e,e,r),n=new Map,o=ee([t],n,!0),i=ee(r,n).filter(function(a){var u=a.node;return W(u)}).map(function(a){var u=a.node;return u});return o.map(function(a){var u=a.node,c=a.index;return{node:u,index:c,lockItem:i.indexOf(u)>=0,guard:J(u)}})};var gn=function(e){return e===document.activeElement},bn=function(e){return Boolean(E(e.querySelectorAll("iframe")).some(function(r){return gn(r)}))},ye=function(e){var r=document&&document.activeElement;return!r||r.dataset&&r.dataset.focusGuard?!1:j(e).reduce(function(t,n){return t||n.contains(r)||bn(n)},!1)};var Ze=function(){return document&&E(document.querySelectorAll("["+Ir+"]")).some(function(e){return e.contains(document.activeElement)})};var zr=function(e){return e.tagName==="INPUT"&&e.type==="radio"},xn=function(e,r){return r.filter(zr).filter(function(t){return t.name===e.name}).filter(function(t){return t.checked})[0]||e},ge=function(e,r){return zr(e)&&e.name?xn(e,r):e},Qr=function(e){var r=new Set;return e.forEach(function(t){return r.add(ge(t,e))}),e.filter(function(t){return r.has(t)})};var Xe=function(e){return e[0]&&e.length>1?ge(e[0],e):e[0]},Ke=function(e,r){return e.length>1?e.indexOf(ge(e[r],e)):r};var ze="NEW_FOCUS",Jr=function(e,r,t,n){var o=e.length,i=e[0],a=e[o-1],u=J(t);if(!(e.indexOf(t)>=0)){var c=r.indexOf(t),l=n?r.indexOf(n):c,s=n?e.indexOf(n):-1,d=c-l,p=r.indexOf(i),v=r.indexOf(a),h=Qr(r),f=h.indexOf(t)-(n?h.indexOf(n):c),m=Ke(e,0),S=Ke(e,o-1);if(c===-1||s===-1)return ze;if(!d&&s>=0)return s;if(c<=p&&u&&Math.abs(d)>1)return S;if(c>=v&&u&&Math.abs(d)>1)return m;if(d&&Math.abs(f)>1)return s;if(c<=p)return S;if(c>v)return m;if(d)return Math.abs(d)>1?s:(o+s+d)%o}};var wn=function(e){return function(r){return r.autofocus||r.dataset&&!!r.dataset.autofocus||e.indexOf(r)>=0}},_n=function(e,r){var t=new Map;return r.forEach(function(n){return t.set(n.node,n)}),e.map(function(n){return t.get(n)}).filter(qr)},et=function(e,r){var t=document&&document.activeElement,n=j(e).filter(W),o=he(t||e,e,n),i=new Map,a=He(n,i),u=ee(n,i).filter(function(v){var h=v.node;return W(h)});if(!(!u[0]&&(u=a,!u[0]))){var c=He([o],i).map(function(v){var h=v.node;return h}),l=_n(c,u),s=l.map(function(v){var h=v.node;return h}),d=Jr(s,c,t,r);if(d===ze){var p=a.map(function(v){var h=v.node;return h}).filter(wn(Kr(n,i)));return{node:p&&p.length?Xe(p):Xe(s)}}return d===void 0?d:l[d]}};var Sn=function(e){e.focus(),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Qe=0,Je=!1,rt=function(e,r){var t=et(e,r);if(!Je&&t){if(Qe>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Je=!0,setTimeout(function(){Je=!1},1);return}Qe++,Sn(t.node),Qe--}};var er=rt;function rr(e){var r=window,t=r.setImmediate;typeof t!="undefined"?t(e):setTimeout(e,1)}var Rn=function(){return document&&document.activeElement===document.body},En=function(){return Rn()||Ze()},U=null,V=null,G=null,re=!1,On=function(){return!0},Cn=function(r){return(U.whiteList||On)(r)},Pn=function(r,t){G={observerNode:r,portaledElement:t}},Nn=function(r){return G&&G.portaledElement===r};function nt(e,r,t,n){var o=null,i=e;do{var a=n[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else if(a.lockItem){if(i!==e)return;o=null}else break}while((i+=t)!==r);o&&(o.node.tabIndex=0)}var Tn=function(r){return r&&"current"in r?r.current:r},Fn=function(r){return r?Boolean(re):re==="meanwhile"},be=function(){var r=!1;if(U){var t=U,n=t.observed,o=t.persistentFocus,i=t.autoFocus,a=t.shards,u=t.crossFrame,c=n||G&&G.portaledElement,l=document&&document.activeElement;if(c){var s=[c].concat(a.map(Tn).filter(Boolean));if((!l||Cn(l))&&(o||Fn(u)||!En()||!V&&i)&&(c&&!(ye(s)||Nn(l,c))&&(document&&!V&&l&&!i?(l.blur&&l.blur(),document.body.focus()):(r=er(s,V),G={})),re=!1,V=document&&document.activeElement),document){var d=document&&document.activeElement,p=Ye(s),v=p.map(function(h){var f=h.node;return f}).indexOf(d);v>-1&&(p.filter(function(h){var f=h.guard,m=h.node;return f&&m.dataset.focusAutoGuard}).forEach(function(h){var f=h.node;return f.removeAttribute("tabIndex")}),nt(v,p.length,1,p),nt(v,-1,-1,p))}}}return r},ot=function(r){be()&&r&&(r.stopPropagation(),r.preventDefault())},xe=function(){return rr(be)},at=function(r){var t=r.target,n=r.currentTarget;n.contains(t)||Pn(n,t)},Dn=function(){return null},kn=function(r){var t=r.children;return tt.createElement("div",{onBlur:xe,onFocus:at},t)};kn.propTypes={};var it=function(){re="just",setTimeout(function(){re="meanwhile"},0)},In=function(){document.addEventListener("focusin",ot,!0),document.addEventListener("focusout",xe),window.addEventListener("blur",it)},An=function(){document.removeEventListener("focusin",ot,!0),document.removeEventListener("focusout",xe),window.removeEventListener("blur",it)};function Ln(e){return e.filter(function(r){var t=r.disabled;return!t})}function Mn(e){var r=e.slice(-1)[0];r&&!U&&In();var t=U,n=t&&r&&r.id===t.id;U=r,t&&!n&&(t.onDeactivation(),e.filter(function(o){var i=o.id;return i===t.id}).length||t.returnFocus(!r)),r?(V=null,(!n||t.observed!==r.observed)&&r.onActivation(),be(!0),rr(be)):(An(),V=null)}me.assignSyncMedium(at);pe.assignMedium(xe);Ur.assignMedium(function(e){return e({moveFocusInside:er,focusInside:ye})});var ut=Gr(Ln,Mn)(Dn);var ct=we.forwardRef(function(r,t){return we.createElement(Me,T({sideCar:ut,ref:t},r))}),lt=Me.propTypes||{},Di=lt.sideCar,ki=ke(lt,["sideCar"]);ct.propTypes={};var ft=ct;var st=ft;var O=function(){return O=Object.assign||function(r){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},O.apply(this,arguments)};function _e(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}import*as Ce from"react";import*as _ from"react";var k="right-scroll-bar-position",I="width-before-scroll-bar",tr="with-scroll-bars-hidden";function Bn(e){return e}function jn(e,r){r===void 0&&(r=Bn);var t=[],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 t.length?t[t.length-1]:e},useMedium:function(i){var a=r(i,n);return t.push(a),function(){t=t.filter(function(u){return u!==a})}},assignSyncMedium:function(i){for(n=!0;t.length;){var a=t;t=[],a.forEach(i)}t={push:function(u){return i(u)},filter:function(){return t}}},assignMedium:function(i){n=!0;var a=[];if(t.length){var u=t;t=[],u.forEach(i),a=t}var c=function(){var s=a;a=[],s.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),t={push:function(s){a.push(s),l()},filter:function(s){return a=a.filter(s),t}}}};return o}function nr(e){e===void 0&&(e={});var r=jn(null);return r.options=O({async:!0,ssr:!1},e),r}import*as dt from"react";var mt=function(e){var r=e.sideCar,t=_e(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return dt.createElement(n,O({},t))};mt.isSideCarExport=!0;function or(e,r){return e.useMedium(r),mt}var Re=nr();function pt(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}import{useState as Wn}from"react";function vt(e,r){var t=Wn(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var o=t.value;o!==n&&(t.value=n,t.callback(n,o))}}}})[0];return t.callback=r,t.facade}function ar(e,r){return vt(r,function(t){return e.forEach(function(n){return pt(n,t)})})}var ir=function(){},te=_.forwardRef(function(e,r){var t=_.useRef(null),n=_.useState({onScrollCapture:ir,onWheelCapture:ir,onTouchMoveCapture:ir}),o=n[0],i=n[1],a=e.forwardProps,u=e.children,c=e.className,l=e.removeScrollBar,s=e.enabled,d=e.shards,p=e.sideCar,v=e.noIsolation,h=e.inert,f=e.allowPinchZoom,m=e.as,S=m===void 0?"div":m,R=_e(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,x=ar([t,r]),b=O({},R,o);return _.createElement(_.Fragment,null,s&&_.createElement(w,{sideCar:Re,removeScrollBar:l,shards:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!f,lockRef:t}),a?_.cloneElement(_.Children.only(u),O({},b,{ref:x})):_.createElement(S,O({},b,{className:c,ref:x}),u))});te.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};te.classNames={fullWidth:I,zeroRight:k};import*as g from"react";import*as H from"react";import*as gt from"react";var ht;var yt=function(){if(ht)return ht;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function Un(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=yt();return r&&e.setAttribute("nonce",r),e}function Vn(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function Gn(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var ur=function(){var e=0,r=null;return{add:function(t){e==0&&(r=Un())&&(Vn(r,t),Gn(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}};var cr=function(){var e=ur();return function(r){gt.useEffect(function(){return e.add(r),function(){e.remove()}},[])}};var ne=function(){var e=cr(),r=function(t){var n=t.styles;return e(n),null};return r};var Hn={left:0,top:0,right:0,gap:0},lr=function(e){return parseInt(e||"",10)||0},$n=function(e){var r=window.getComputedStyle(document.body),t=r[e==="padding"?"paddingLeft":"marginLeft"],n=r[e==="padding"?"paddingTop":"marginTop"],o=r[e==="padding"?"paddingRight":"marginRight"];return[lr(t),lr(n),lr(o)]},Ee=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Hn;var r=$n(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-t+r[2]-r[0])}};var qn=ne(),Yn=function(e,r,t,n){var o=e.left,i=e.top,a=e.right,u=e.gap;return t===void 0&&(t="margin"),`
.`+tr+` {
overflow: hidden `+n+`;
padding-right: `+c+"px "+n+`;
padding-right: `+u+"px "+n+`;
}

@@ -10,17 +10,17 @@ body {

`+[r&&"position: relative "+n+";",t==="margin"&&`
padding-left: `+a+`px;
padding-top: `+u+`px;
padding-right: `+i+`px;
padding-left: `+o+`px;
padding-top: `+i+`px;
padding-right: `+a+`px;
margin-left:0;
margin-top:0;
margin-right: `+c+"px "+n+`;
`,t==="padding"&&"padding-right: "+c+"px "+n+";"].filter(Boolean).join("")+`
margin-right: `+u+"px "+n+`;
`,t==="padding"&&"padding-right: "+u+"px "+n+";"].filter(Boolean).join("")+`
}
.`+k+` {
right: `+c+"px "+n+`;
right: `+u+"px "+n+`;
}
.`+I+` {
margin-right: `+c+"px "+n+`;
margin-right: `+u+"px "+n+`;
}

@@ -35,6 +35,6 @@

}
`},ir=function(e){var r=o.useState(Se(e.gapMode)),t=r[0],n=r[1];o.useEffect(function(){n(Se(e.gapMode))},[e.gapMode]);var a=e.noRelative,u=e.noImportant,i=e.gapMode,c=i===void 0?"margin":i;return o.createElement(En,{styles:On(t,!a,c,u?"":"!important")})};var Cn=function(e){var r=window.getComputedStyle(e);return r.overflowY!=="hidden"&&!(r.overflowY===r.overflowX&&r.overflowY==="visible")},Pn=function(e){var r=window.getComputedStyle(e);return e.type==="range"?!0:r.overflowX!=="hidden"&&!(r.overflowY===r.overflowX&&r.overflowX==="visible")},ur=function(e,r){var t=r;do{typeof ShadowRoot!="undefined"&&t instanceof ShadowRoot&&(t=t.host);var n=dt(e,t);if(n){var a=mt(e,t),u=a[1],i=a[2];if(u>i)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Nn=function(e){var r=e.scrollTop,t=e.scrollHeight,n=e.clientHeight;return[r,t,n]},Tn=function(e){var r=e.scrollLeft,t=e.scrollWidth,n=e.clientWidth;return[r,t,n]},dt=function(e,r){return e==="v"?Cn(r):Pn(r)},mt=function(e,r){return e==="v"?Nn(r):Tn(r)},pt=function(e,r,t,n,a){var u=n,i=t.target,c=r.contains(i),l=!1,f=u>0,d=0,m=0;do{var v=mt(e,i),h=v[0],y=v[1],s=v[2],p=y-s-h;(h||p)&&dt(e,i)&&(d+=p,m+=h),i=i.parentNode}while(!c&&i!==document.body||c&&(r.contains(i)||r===i));return(f&&(a&&d===0||!a&&u>d)||!f&&(a&&m===0||!a&&-u>m))&&(l=!0),l};var cr=!1;if(typeof window!="undefined")try{re=Object.defineProperty({},"passive",{get:function(){return cr=!0,!0}}),window.addEventListener("test",re,re),window.removeEventListener("test",re,re)}catch(e){cr=!1}var re,A=cr?{passive:!1}:!1;var Re=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vt=function(e){return[e.deltaX,e.deltaY]},ht=function(e){return e&&"current"in e?e.current:e},Fn=function(e,r){return e[0]===r[0]&&e[1]===r[1]},Dn=function(e){return`
`},fr=function(e){var r=H.useState(Ee(e.gapMode)),t=r[0],n=r[1];H.useEffect(function(){n(Ee(e.gapMode))},[e.gapMode]);var o=e.noRelative,i=e.noImportant,a=e.gapMode,u=a===void 0?"margin":a;return H.createElement(qn,{styles:Yn(t,!o,u,i?"":"!important")})};var Zn=function(e){var r=window.getComputedStyle(e);return r.overflowY!=="hidden"&&!(r.overflowY===r.overflowX&&r.overflowY==="visible")},Xn=function(e){var r=window.getComputedStyle(e);return e.type==="range"?!0:r.overflowX!=="hidden"&&!(r.overflowY===r.overflowX&&r.overflowX==="visible")},sr=function(e,r){var t=r;do{typeof ShadowRoot!="undefined"&&t instanceof ShadowRoot&&(t=t.host);var n=bt(e,t);if(n){var o=xt(e,t),i=o[1],a=o[2];if(i>a)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Kn=function(e){var r=e.scrollTop,t=e.scrollHeight,n=e.clientHeight;return[r,t,n]},zn=function(e){var r=e.scrollLeft,t=e.scrollWidth,n=e.clientWidth;return[r,t,n]},bt=function(e,r){return e==="v"?Zn(r):Xn(r)},xt=function(e,r){return e==="v"?Kn(r):zn(r)},wt=function(e,r,t,n,o){var i=n,a=t.target,u=r.contains(a),c=!1,l=i>0,s=0,d=0;do{var p=xt(e,a),v=p[0],h=p[1],f=p[2],m=h-f-v;(v||m)&&bt(e,a)&&(s+=m,d+=v),a=a.parentNode}while(!u&&a!==document.body||u&&(r.contains(a)||r===a));return(l&&(o&&s===0||!o&&i>s)||!l&&(o&&d===0||!o&&-i>d))&&(c=!0),c};var dr=!1;if(typeof window!="undefined")try{oe=Object.defineProperty({},"passive",{get:function(){return dr=!0,!0}}),window.addEventListener("test",oe,oe),window.removeEventListener("test",oe,oe)}catch(e){dr=!1}var oe,A=dr?{passive:!1}:!1;var Oe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_t=function(e){return[e.deltaX,e.deltaY]},St=function(e){return e&&"current"in e?e.current:e},Qn=function(e,r){return e[0]===r[0]&&e[1]===r[1]},Jn=function(e){return`
.block-interactivity-`+e+` {pointer-events: none;}
.allow-interactivity-`+e+` {pointer-events: all;}
`},kn=0,G=[];function yt(e){var r=o.useRef([]),t=o.useRef([0,0]),n=o.useRef(),a=o.useState(kn++)[0],u=o.useState(function(){return ee()})[0],i=o.useRef(e);o.useEffect(function(){i.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var s=[e.lockRef.current].concat((e.shards||[]).map(ht)).filter(Boolean);return s.forEach(function(p){return p.classList.add("allow-interactivity-"+a)}),function(){document.body.classList.remove("block-interactivity-"+a),s.forEach(function(p){return p.classList.remove("allow-interactivity-"+a)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(s,p){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var w=Re(s),_=t.current,x="deltaX"in s?s.deltaX:_[0]-w[0],b="deltaY"in s?s.deltaY:_[1]-w[1],g,N=s.target,C=Math.abs(x)>Math.abs(b)?"h":"v",O=ur(C,N);if(!O)return!0;if(O?g=C:(g=C==="v"?"h":"v",O=ur(C,N)),!O)return!1;if(!n.current&&"changedTouches"in s&&(x||b)&&(n.current=g),!g)return!0;var L=n.current||g;return pt(L,p,s,L==="h"?x:b,!0)},[]),l=o.useCallback(function(s){var p=s;if(!(!G.length||G[G.length-1]!==u)){var w="deltaY"in p?vt(p):Re(p),_=r.current.filter(function(g){return g.name===p.type&&g.target===p.target&&Fn(g.delta,w)})[0];if(_&&_.should){p.preventDefault();return}if(!_){var x=(i.current.shards||[]).map(ht).filter(Boolean).filter(function(g){return g.contains(p.target)}),b=x.length>0?c(p,x[0]):!i.current.noIsolation;b&&p.preventDefault()}}},[]),f=o.useCallback(function(s,p,w,_){var x={name:s,delta:p,target:w,should:_};r.current.push(x),setTimeout(function(){r.current=r.current.filter(function(b){return b!==x})},1)},[]),d=o.useCallback(function(s){t.current=Re(s),n.current=void 0},[]),m=o.useCallback(function(s){f(s.type,vt(s),s.target,c(s,e.lockRef.current))},[]),v=o.useCallback(function(s){f(s.type,Re(s),s.target,c(s,e.lockRef.current))},[]);o.useEffect(function(){return G.push(u),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",l,A),document.addEventListener("touchmove",l,A),document.addEventListener("touchstart",d,A),function(){G=G.filter(function(s){return s!==u}),document.removeEventListener("wheel",l,A),document.removeEventListener("touchmove",l,A),document.removeEventListener("touchstart",d,A)}},[]);var h=e.removeScrollBar,y=e.inert;return o.createElement(o.Fragment,null,y?o.createElement(u,{styles:Dn(a)}):null,h?o.createElement(ir,{gapMode:"margin"}):null)}var gt=er(_e,yt);var bt=o.forwardRef(function(e,r){return o.createElement(J,R({},e,{ref:r,sideCar:gt}))});bt.classNames=J.classNames;var lr=bt;var te=ue($());function ne(){return ne=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ne.apply(this,arguments)}function fr(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,u;for(u=0;u<n.length;u++)a=n[u],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}var Du={allowPinchZoom:te.default.bool,dangerouslyBypassFocusLock:te.default.bool,dangerouslyBypassScrollLock:te.default.bool,initialFocusRef:function(){return null},onDismiss:te.default.func},In=(0,o.forwardRef)(function(r,t){var n=r.as,a=n===void 0?"div":n,u=r.isOpen,i=u===void 0?!0:u,c=fr(r,["as","isOpen"]);return xr("dialog"),(0,o.useEffect)(function(){i?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[i]),i?(0,o.createElement)(yr,{"data-reach-dialog-wrapper":""},(0,o.createElement)(An,ne({ref:t,as:a},c))):null}),An=(0,o.forwardRef)(function(r,t){var n=r.allowPinchZoom,a=r.as,u=a===void 0?"div":a,i=r.dangerouslyBypassFocusLock,c=i===void 0?!1:i,l=r.dangerouslyBypassScrollLock,f=l===void 0?!1:l,d=r.initialFocusRef,m=r.onClick,v=r.onDismiss,h=v===void 0?Pe:v,y=r.onKeyDown,s=r.onMouseDown,p=r.unstable_lockFocusAcrossFrames,w=p===void 0?!0:p,_=fr(r,["allowPinchZoom","as","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),x=(0,o.useRef)(null),b=(0,o.useRef)(null),g=_r(b,t),N=(0,o.useCallback)(function(){d&&d.current&&d.current.focus()},[d]);function C(E){x.current===E.target&&(E.stopPropagation(),h(E))}function O(E){E.key==="Escape"&&(E.stopPropagation(),h(E))}function L(E){x.current=E.target}return(0,o.useEffect)(function(){return b.current?Mn(b.current):void 0},[]),(0,o.createElement)(it,{autoFocus:!0,returnFocus:!0,onActivation:N,disabled:c,crossFrame:w},(0,o.createElement)(lr,{allowPinchZoom:n,enabled:!f},(0,o.createElement)(u,ne({},_,{ref:g,"data-reach-dialog-overlay":"",onClick:H(m,C),onKeyDown:H(y,O),onMouseDown:H(s,L)}))))}),Ln=(0,o.forwardRef)(function(r,t){var n=r.as,a=n===void 0?"div":n,u=r.onClick;r.onKeyDown;var i=fr(r,["as","onClick","onKeyDown"]);return(0,o.createElement)(a,ne({"aria-modal":"true",role:"dialog",tabIndex:-1},i,{ref:t,"data-reach-dialog-content":"",onClick:H(u,function(c){c.stopPropagation()})}))});function Mn(e){var r=[],t=[],n=gr(e);return e?(Array.prototype.forEach.call(n.querySelectorAll("body > *"),function(a){var u,i,c=(u=e.parentNode)==null||(i=u.parentNode)==null?void 0:i.parentNode;if(a!==c){var l=a.getAttribute("aria-hidden"),f=l!==null&&l!=="false";f||(r.push(l),t.push(a),a.setAttribute("aria-hidden","true"))}}),function(){t.forEach(function(a,u){var i=r[u];i===null?a.removeAttribute("aria-hidden"):a.setAttribute("aria-hidden",i)})}):Pe}export{Ln as ModalDialogPrimitiveContent,In as ModalDialogPrimitiveOverlay};
`},eo=0,$=[];function Rt(e){var r=g.useRef([]),t=g.useRef([0,0]),n=g.useRef(),o=g.useState(eo++)[0],i=g.useState(function(){return ne()})[0],a=g.useRef(e);g.useEffect(function(){a.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var f=[e.lockRef.current].concat((e.shards||[]).map(St)).filter(Boolean);return f.forEach(function(m){return m.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),f.forEach(function(m){return m.classList.remove("allow-interactivity-"+o)})}}},[e.inert,e.lockRef.current,e.shards]);var u=g.useCallback(function(f,m){if("touches"in f&&f.touches.length===2)return!a.current.allowPinchZoom;var S=Oe(f),R=t.current,w="deltaX"in f?f.deltaX:R[0]-S[0],x="deltaY"in f?f.deltaY:R[1]-S[1],b,F=f.target,N=Math.abs(w)>Math.abs(x)?"h":"v",P=sr(N,F);if(!P)return!0;if(P?b=N:(b=N==="v"?"h":"v",P=sr(N,F)),!P)return!1;if(!n.current&&"changedTouches"in f&&(w||x)&&(n.current=b),!b)return!0;var L=n.current||b;return wt(L,m,f,L==="h"?w:x,!0)},[]),c=g.useCallback(function(f){var m=f;if(!(!$.length||$[$.length-1]!==i)){var S="deltaY"in m?_t(m):Oe(m),R=r.current.filter(function(b){return b.name===m.type&&b.target===m.target&&Qn(b.delta,S)})[0];if(R&&R.should){m.preventDefault();return}if(!R){var w=(a.current.shards||[]).map(St).filter(Boolean).filter(function(b){return b.contains(m.target)}),x=w.length>0?u(m,w[0]):!a.current.noIsolation;x&&m.preventDefault()}}},[]),l=g.useCallback(function(f,m,S,R){var w={name:f,delta:m,target:S,should:R};r.current.push(w),setTimeout(function(){r.current=r.current.filter(function(x){return x!==w})},1)},[]),s=g.useCallback(function(f){t.current=Oe(f),n.current=void 0},[]),d=g.useCallback(function(f){l(f.type,_t(f),f.target,u(f,e.lockRef.current))},[]),p=g.useCallback(function(f){l(f.type,Oe(f),f.target,u(f,e.lockRef.current))},[]);g.useEffect(function(){return $.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,A),document.addEventListener("touchmove",c,A),document.addEventListener("touchstart",s,A),function(){$=$.filter(function(f){return f!==i}),document.removeEventListener("wheel",c,A),document.removeEventListener("touchmove",c,A),document.removeEventListener("touchstart",s,A)}},[]);var v=e.removeScrollBar,h=e.inert;return g.createElement(g.Fragment,null,h?g.createElement(i,{styles:Jn(o)}):null,v?g.createElement(fr,{gapMode:"margin"}):null)}var Et=or(Re,Rt);var Ot=Ce.forwardRef(function(e,r){return Ce.createElement(te,O({},e,{ref:r,sideCar:Et}))});Ot.classNames=te.classNames;var mr=Ot;var ae=le(Z());function ie(){return ie=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ie.apply(this,arguments)}function vr(e,r){if(e==null)return{};var t={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(r.indexOf(o)>=0)&&(t[o]=e[o]);return t}var Qu={allowPinchZoom:ae.default.bool,dangerouslyBypassFocusLock:ae.default.bool,dangerouslyBypassScrollLock:ae.default.bool,initialFocusRef:function(){return null},onDismiss:ae.default.func},to=pr(function(r,t){var n=r.as,o=n===void 0?"div":n,i=r.isOpen,a=i===void 0?!0:i,u=vr(r,["as","isOpen"]);return Rr("dialog"),Ct(function(){a?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[a]),a?q(wr,{"data-reach-dialog-wrapper":""},q(no,ie({ref:t,as:o},u))):null}),no=pr(function(r,t){var n=r.allowPinchZoom,o=r.as,i=o===void 0?"div":o,a=r.dangerouslyBypassFocusLock,u=a===void 0?!1:a,c=r.dangerouslyBypassScrollLock,l=c===void 0?!1:c,s=r.initialFocusRef,d=r.onClick,p=r.onDismiss,v=p===void 0?De:p,h=r.onKeyDown,f=r.onMouseDown,m=r.unstable_lockFocusAcrossFrames,S=m===void 0?!0:m,R=vr(r,["allowPinchZoom","as","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),w=Pt(null),x=Pt(null),b=Or(x,t),F=ro(function(){s&&s.current&&s.current.focus()},[s]);function N(C){w.current===C.target&&(C.stopPropagation(),v(C))}function P(C){C.key==="Escape"&&(C.stopPropagation(),v(C))}function L(C){w.current=C.target}return Ct(function(){return x.current?ao(x.current):void 0},[]),q(st,{autoFocus:!0,returnFocus:!0,onActivation:F,disabled:u,crossFrame:S},q(mr,{allowPinchZoom:n,enabled:!l},q(i,ie({},R,{ref:b,"data-reach-dialog-overlay":"",onClick:Y(d,N),onKeyDown:Y(h,P),onMouseDown:Y(f,L)}))))}),oo=pr(function(r,t){var n=r.as,o=n===void 0?"div":n,i=r.onClick;r.onKeyDown;var a=vr(r,["as","onClick","onKeyDown"]);return q(o,ie({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:t,"data-reach-dialog-content":"",onClick:Y(i,function(u){u.stopPropagation()})}))});function ao(e){var r=[],t=[],n=_r(e);return e?(Array.prototype.forEach.call(n.querySelectorAll("body > *"),function(o){var i,a,u=(i=e.parentNode)==null||(a=i.parentNode)==null?void 0:a.parentNode;if(o!==u){var c=o.getAttribute("aria-hidden"),l=c!==null&&c!=="false";l||(r.push(c),t.push(o),o.setAttribute("aria-hidden","true"))}}),function(){t.forEach(function(o,i){var a=r[i];a===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",a)})}):De}export{oo as ModalDialogPrimitiveContent,to as ModalDialogPrimitiveOverlay};
/*! *****************************************************************************

@@ -41,0 +41,0 @@ Copyright (c) Microsoft Corporation. All rights reserved.

{
"name": "@twilio-paste/modal-dialog-primitive",
"version": "0.2.5",
"version": "0.2.6",
"category": "overlay",

@@ -5,0 +5,0 @@ "status": "production",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc