@twilio-paste/modal-dialog-primitive
Advanced tools
# Change Log | ||
## 0.2.3 | ||
### Patch Changes | ||
- [`dd759feb`](https://github.com/twilio-labs/paste/commit/dd759febfa25e5d6823f280a1896635be2ba6376) [#1464](https://github.com/twilio-labs/paste/pull/1464) Thanks [@richbachman](https://github.com/richbachman)! - Bumped the version of Reach/Dialog to 0.15.0 | ||
## 0.2.2 | ||
@@ -4,0 +10,0 @@ |
@@ -1,3 +0,4 @@ | ||
var Ir=Object.create,Ee=Object.defineProperty,kr=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,Lr=Object.getOwnPropertyNames,Br=Object.getOwnPropertyDescriptor;var Wr=t=>Ee(t,"__esModule",{value:!0});var re=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var jr=(t,e,r)=>{if(Wr(t),e&&typeof e=="object"||typeof e=="function")for(let n of Lr(e))!Ar.call(t,n)&&n!=="default"&&Ee(t,n,{get:()=>e[n],enumerable:!(r=Br(e,n))||r.enumerable});return t},V=t=>t&&t.__esModule?t:jr(Ee(t!=null?Ir(kr(t)):{},"default",{value:t,enumerable:!0}),t);var ct=re((Oo,at)=>{"use strict";var Mr=!1,it=function(){};Mr&&(ut=function(e,r){var n=arguments.length;r=new Array(n>1?n-1:0);for(var o=1;o<n;o++)r[o-1]=arguments[o];var a=0,i="Warning: "+e.replace(/%s/g,function(){return r[a++]});typeof console!="undefined"&&console.error(i);try{throw new Error(i)}catch(u){}},it=function(t,e,r){var n=arguments.length;r=new Array(n>2?n-2:0);for(var o=2;o<n;o++)r[o-2]=arguments[o];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||ut.apply(null,[e].concat(r))});var ut;at.exports=it});var bt=re((Vo,gt)=>{"use strict";var Kr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";gt.exports=Kr});var Et=re((Go,wt)=>{"use strict";var zr=bt();function xt(){}function St(){}St.resetWarningCache=xt;wt.exports=function(){function t(n,o,a,i,u,c){if(c!==zr){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}}t.isRequired=t;function e(){return t}var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:St,resetWarningCache:xt};return r.PropTypes=r,r}});var U=re((qo,_t)=>{_t.exports=Et()();var Uo,Ho});import M,{forwardRef as et,useEffect as tt,useRef as br,useCallback as So}from"react";import Yr,{useRef as ht}from"react";var Hr=V(ct());import lt,{isValidElement as Fo,cloneElement as No,createContext as To,useRef as Do,useState as Vr,useCallback as Gr,useEffect as Io,useMemo as Ur}from"react";var ft=st()?lt.useLayoutEffect:lt.useEffect;var dt=ne;var ko=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();function $r(t,e){if(t!=null)if(qr(t))t(e);else try{t.current=e}catch(r){throw new Error('Cannot assign value "'+e+'" to ref "'+t+'"')}}function st(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function pt(t){return t&&t.ownerDocument?t.ownerDocument:st()?document:null}function qr(t){return!!(t&&{}.toString.call(t)=="[object Function]")}function ne(){}function mt(){var t=Vr(Object.create(null)),e=t[1];return Gr(function(){e(Object.create(null))},[])}function vt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Ur(function(){return e.every(function(n){return n==null})?null:function(n){e.forEach(function(o){$r(o,n)})}},[].concat(e))}function G(t,e){return function(r){if(t&&t(r),!r.defaultPrevented)return e(r)}}import{createPortal as Zr}from"react-dom";var Xr=function(e){var r=e.children,n=e.type,o=n===void 0?"reach-portal":n,a=ht(null),i=ht(null),u=mt();return ft(function(){if(!!a.current){var c=a.current.ownerDocument;return i.current=c==null?void 0:c.createElement(o),c.body.appendChild(i.current),u(),function(){i.current&&i.current.ownerDocument&&i.current.ownerDocument.body.removeChild(i.current)}}},[o,u]),i.current?Zr(r,i.current):Yr.createElement("span",{ref:a})},yt=Xr;function _e(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function R(){return R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},R.apply(this,arguments)}import{createElement as qn,forwardRef as $n}from"react";var va=V(U());import{Fragment as tn,createElement as k,forwardRef as rn,useCallback as q,useEffect as ma,useRef as Oe,useState as Bt}from"react";var H="data-focus-lock",oe="data-focus-lock-disabled",Rt="data-no-focus-lock",Ot="data-autofocus-inside";function Ct(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as Qr}from"react";function Pt(t,e){var r=Qr(function(){return{value:t,callback:e,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=e,r.facade}function ae(t,e){return Pt(e,function(r){return t.forEach(function(n){return Ct(n,r)})})}var ta=V(U());import{Fragment as Jr,createElement as Re}from"react";var D={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ft=function(e){var r=e.children;return Re(Jr,null,Re("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:D}),r,r&&Re("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:D}))};Ft.propTypes={};Ft.defaultProps={children:null};var I=function(){return I=Object.assign||function(e){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)&&(e[a]=r[a])}return e},I.apply(this,arguments)};function Nt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function Tt(t){return t}function Dt(t,e){e===void 0&&(e=Tt);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]:t},useMedium:function(a){var i=e(a,n);return r.push(i),function(){r=r.filter(function(u){return u!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(u){return a(u)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var u=r;r=[],u.forEach(a),i=r}var c=function(){var f=i;i=[],f.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),r}}}};return o}function ie(t,e){return e===void 0&&(e=Tt),Dt(t,e)}function ue(t){t===void 0&&(t={});var e=Dt(null);return e.options=I({async:!0,ssr:!1},t),e}import{createElement as en}from"react";var It=function(t){var e=t.sideCar,r=Nt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return en(n,I({},r))};It.isSideCarExport=!0;function kt(t,e){return t.useMedium(e),It}var ce=ie({},function(t){var e=t.target,r=t.currentTarget;return{target:e,currentTarget:r}}),le=ie(),At=ie(),Lt=ue({async:!0});var nn=[],Ce=rn(function(t,e){var r,n=Bt(),o=n[0],a=n[1],i=Oe(),u=Oe(!1),c=Oe(null),l=t.children,f=t.disabled,p=t.noFocusGuards,d=t.persistentFocus,v=t.crossFrame,h=t.autoFocus,s=t.allowTextSelection,m=t.group,b=t.className,y=t.whiteList,w=t.shards,S=w===void 0?nn:w,g=t.as,T=g===void 0?"div":g,_=t.lockProps,x=_===void 0?{}:_,J=t.sideCar,ee=t.returnFocus,xe=t.onActivation,Se=t.onDeactivation,Sr=Bt({}),Er=Sr[0],_r=q(function(){c.current=c.current||document&&document.activeElement,i.current&&xe&&xe(i.current),u.current=!0},[xe]),Rr=q(function(){u.current=!1,Se&&Se(i.current)},[Se]),Or=q(function(C){var te=c.current;if(Boolean(ee)&&te&&te.focus){var ot=typeof ee=="object"?ee:void 0;c.current=null,C?Promise.resolve().then(function(){return te.focus(ot)}):te.focus(ot)}},[ee]),Cr=q(function(C){u.current&&ce.useMedium(C)},[]),Pr=le.useMedium,Fr=q(function(C){i.current!==C&&(i.current=C,a(C))},[]),Nr=R((r={},r[oe]=f&&"disabled",r[H]=m,r),x),nt=p!==!0,Tr=nt&&p!=="tail",Dr=ae([e,Fr]);return k(tn,null,nt&&[k("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:D}),k("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:D})],!f&&k(J,{id:Er,sideCar:Lt,observed:o,disabled:f,persistentFocus:d,crossFrame:v,autoFocus:h,whiteList:y,shards:S,onActivation:_r,onDeactivation:Rr,returnFocus:Or}),k(T,R({ref:Dr},Nr,{className:b,onBlur:Pr,onFocus:Cr}),l),Tr&&k("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:D}))});Ce.propTypes={};Ce.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 Pe=Ce;var yi=V(U());import{createElement as Nn}from"react";function Fe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Ne(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}import on,{PureComponent as an}from"react";function un(t,e){function r(n){return n.displayName||n.name||"Component"}return function(o){var a=[],i;function u(){i=t(a.map(function(l){return l.props})),e(i)}var c=function(l){Fe(f,l);function f(){return l.apply(this,arguments)||this}f.peek=function(){return i};var p=f.prototype;return p.componentDidMount=function(){a.push(this),u()},p.componentDidUpdate=function(){u()},p.componentWillUnmount=function(){var v=a.indexOf(this);a.splice(v,1),u()},p.render=function(){return on.createElement(o,this.props)},f}(an);return Ne(c,"displayName","SideEffect("+r(o)+")"),c}}var Wt=un;var E=function(e){for(var r=Array(e.length),n=0;n<e.length;++n)r[n]=e[n];return r},jt=function(e,r){return e.filter(function(n){return n===r})[0]},$=function(e){return Array.isArray(e)?e:[e]};var cn=function(e,r){var n=e.tabIndex-r.tabIndex,o=e.index-r.index;if(n){if(!e.tabIndex)return 1;if(!r.tabIndex)return-1}return n||o},Te=function(e,r,n){return E(e).map(function(o,a){return{node:o,index:a,tabIndex:n&&o.tabIndex===-1?(o.dataset||{}).focusGuard?0:-1:o.tabIndex}}).filter(function(o){return!r||o.tabIndex>=0}).sort(cn)};var De=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"];var Mt=De.join(","),ln=Mt+", [data-focus-guard]",se=function(e,r){return e.reduce(function(n,o){return n.concat(E(o.querySelectorAll(r?ln:Mt)),o.parentNode?E(o.parentNode.querySelectorAll(De.join(","))).filter(function(a){return a===o}):[])},[])},Vt=function(e){var r=e.querySelectorAll("["+Ot+"]");return E(r).map(function(n){return se([n])}).reduce(function(n,o){return n.concat(o)},[])};var sn=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},fn=function t(e){return!e||e===document||e.nodeType===Node.DOCUMENT_NODE||!sn(window.getComputedStyle(e,null))&&t(e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},dn=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},Gt=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r.push(e),e.parentNode&&t(e.parentNode,r),r},fe=function(e,r){for(var n=Gt(e),o=Gt(r),a=0;a<n.length;a+=1){var i=n[a];if(o.indexOf(i)>=0)return i}return!1},Ie=function(e){return E(e).filter(function(r){return fn(r)}).filter(function(r){return dn(r)})},de=function(e,r){return Te(Ie(se(e,r)),!0,r)},ke=function(e){return Te(Ie(se(e)),!1)},Ut=function(e){return Ie(Vt(e))};var Ht=function(e){return e.tagName==="INPUT"&&e.type==="radio"},pn=function(e,r){return r.filter(Ht).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},pe=function(e,r){return Ht(e)&&e.name?pn(e,r):e},qt=function(e){var r=new Set;return e.forEach(function(n){return r.add(pe(n,e))}),e.filter(function(n){return r.has(n)})};var mn=function(e){return e[0]&&e.length>1?pe(e[0],e):e[0]},Ae=function(e,r){return e.length>1?e.indexOf(pe(e[r],e)):r},Le=mn;var vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn=function t(e){for(var r=e.length,n=0;n<r;n+=1)for(var o=function(c){if(n!==c&&e[n].contains(e[c]))return{v:t(e.filter(function(l){return l!==e[c]}))}},a=0;a<r;a+=1){var i=o(a);if((typeof i=="undefined"?"undefined":vn(i))==="object")return i.v}return e},yn=function t(e){return e.parentNode?t(e.parentNode):e},gn=function(e){var r=$(e);return r.filter(Boolean).reduce(function(n,o){var a=o.getAttribute(H);return n.push.apply(n,a?hn(E(yn(o).querySelectorAll("["+H+'="'+a+'"]:not(['+oe+'="disabled"])'))):[o]),n},[])},Y=gn;var bn=function(e){return function(r){return!!r.autofocus||r.dataset&&!!r.dataset.autofocus||e.indexOf(r)>=0}},Be=function(e){return e&&e.dataset&&e.dataset.focusGuard},me=function(e){return!Be(e)},wn="NEW_FOCUS",xn=function(e,r,n,o){var a=e.length,i=e[0],u=e[a-1],c=Be(n);if(!(e.indexOf(n)>=0)){var l=r.indexOf(n),f=r.indexOf(o||l),p=e.indexOf(o),d=l-f,v=r.indexOf(i),h=r.indexOf(u),s=qt(r),m=s.indexOf(n)-s.indexOf(o||l),b=Ae(e,0),y=Ae(e,a-1);if(l===-1||p===-1)return wn;if(!d&&p>=0)return p;if(l<=v&&c&&Math.abs(d)>1)return y;if(l>=h&&c&&Math.abs(d)>1)return b;if(d&&Math.abs(m)>1)return p;if(l<=v)return y;if(l>h)return b;if(d)return Math.abs(d)>1?p:(a+p+d)%a}},$t=function(e,r,n){var o=$(e),a=$(r),i=o[0],u=null;return a.filter(Boolean).forEach(function(c){u=fe(u||c,c)||u,n.filter(Boolean).forEach(function(l){var f=fe(i,l);f&&(!u||f.contains(u)?u=f:u=fe(f,u))})}),u},Sn=function(e){return e.reduce(function(r,n){return r.concat(Ut(n))},[])},En=function(e,r){var n=new Map;return r.forEach(function(o){return n.set(o.node,o)}),e.map(function(o){return n.get(o)}).filter(Boolean)},Yt=function(e){var r=Y(e).filter(me),n=$t(e,e,r),o=de([n],!0),a=de(r).filter(function(i){var u=i.node;return me(u)}).map(function(i){var u=i.node;return u});return o.map(function(i){var u=i.node,c=i.index;return{node:u,index:c,lockItem:a.indexOf(u)>=0,guard:Be(u)}})},_n=function(e,r){var n=document&&document.activeElement,o=Y(e).filter(me),a=$t(n||e,e,o),i=ke(o),u=de(o).filter(function(v){var h=v.node;return me(h)});if(!(!u[0]&&(u=i,!u[0]))){var c=ke([a]).map(function(v){var h=v.node;return h}),l=En(c,u),f=l.map(function(v){var h=v.node;return h}),p=xn(f,c,n,r);if(p==="NEW_FOCUS"){var d=i.map(function(v){var h=v.node;return h}).filter(bn(Sn(o)));return{node:d&&d.length?Le(d):Le(f)}}return p===void 0?p:l[p]}},Zt=_n;var Rn=function(e){return e===document.activeElement},On=function(e){return!!jt(E(e.querySelectorAll("iframe")),Rn)},Cn=function(e){var r=document&&document.activeElement;return!r||r.dataset&&r.dataset.focusGuard?!1:Y(e).reduce(function(n,o){return n||o.contains(r)||On(o)},!1)},We=Cn;var Pn=function(){return document&&E(document.querySelectorAll("["+Rt+"]")).some(function(e){return e.contains(document.activeElement)})},Xt=Pn;var Fn=function(e){e.focus(),e.contentWindow&&e.contentWindow.focus()},je=0,Me=!1,Kt=function(t,e){var r=Zt(t,e);if(!Me&&r){if(je>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Me=!0,setTimeout(function(){Me=!1},1);return}je++,Fn(r.node),je--}};var Ve=Kt;function Ge(t){var e=window,r=e.setImmediate;typeof r!="undefined"?r(t):setTimeout(t,1)}var Tn=function(){return document&&document.activeElement===document.body},Dn=function(){return Tn()||Xt()},A=null,L=null,B=null,Z=!1,In=function(){return!0},kn=function(e){return(A.whiteList||In)(e)},An=function(e,r){B={observerNode:e,portaledElement:r}},Ln=function(e){return B&&B.portaledElement===e};function zt(t,e,r,n){var o=null,a=t;do{var i=n[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(a!==t)return;o=null}else break}while((a+=r)!==e);o&&(o.node.tabIndex=0)}var Bn=function(e){return e&&"current"in e?e.current:e},Wn=function(e){return e?Boolean(Z):Z==="meanwhile"},ve=function(){var e=!1;if(A){var r=A,n=r.observed,o=r.persistentFocus,a=r.autoFocus,i=r.shards,u=r.crossFrame,c=n||B&&B.portaledElement,l=document&&document.activeElement;if(c){var f=[c].concat(i.map(Bn).filter(Boolean));if((!l||kn(l))&&(o||Wn(u)||!Dn()||!L&&a)&&(c&&!(We(f)||Ln(l,c))&&(document&&!L&&l&&!a?(l.blur&&l.blur(),document.body.focus()):(e=Ve(f,L),B={})),Z=!1,L=document&&document.activeElement),document){var p=document&&document.activeElement,d=Yt(f),v=d.map(function(h){var s=h.node;return s}).indexOf(p);v>-1&&(d.filter(function(h){var s=h.guard,m=h.node;return s&&m.dataset.focusAutoGuard}).forEach(function(h){var s=h.node;return s.removeAttribute("tabIndex")}),zt(v,d.length,1,d),zt(v,-1,-1,d))}}}return e},Qt=function(e){ve()&&e&&(e.stopPropagation(),e.preventDefault())},he=function(){return Ge(ve)},Jt=function(e){var r=e.target,n=e.currentTarget;n.contains(r)||An(n,r)},jn=function(){return null},Mn=function(e){var r=e.children;return Nn("div",{onBlur:he,onFocus:Jt},r)};Mn.propTypes={};var er=function(){Z="just",setTimeout(function(){Z="meanwhile"},0)},Vn=function(){document.addEventListener("focusin",Qt,!0),document.addEventListener("focusout",he),window.addEventListener("blur",er)},Gn=function(){document.removeEventListener("focusin",Qt,!0),document.removeEventListener("focusout",he),window.removeEventListener("blur",er)};function Un(t){return t.filter(function(e){var r=e.disabled;return!r})}function Hn(t){var e=t.slice(-1)[0];e&&!A&&Vn();var r=A,n=r&&e&&e.id===r.id;A=e,r&&!n&&(r.onDeactivation(),t.filter(function(o){var a=o.id;return a===r.id}).length||r.returnFocus(!e)),e?(L=null,(!n||r.observed!==e.observed)&&e.onActivation(),ve(!0),Ge(ve)):(Gn(),L=null)}ce.assignSyncMedium(Jt);le.assignMedium(he);At.assignMedium(function(t){return t({moveFocusInside:Ve,focusInside:We})});var tr=Wt(Un,Hn)(jn);var rr=$n(function(t,e){return qn(Pe,R({sideCar:tr,ref:e},t))}),nr=Pe.propTypes||{},Fi=nr.sideCar,Yn=_e(nr,["sideCar"]);rr.propTypes=Yn;var or=rr;var ar=or;var O=function(){return O=Object.assign||function(e){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)&&(e[a]=r[a])}return e},O.apply(this,arguments)};function ir(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}import{createElement as wo,forwardRef as xo}from"react";import{Children as Zn,Fragment as Xn,cloneElement as Kn,createElement as He,forwardRef as zn,useRef as Qn,useState as Jn}from"react";var P="right-scroll-bar-position",F="width-before-scroll-bar",Ue="with-scroll-bars-hidden";var ye=ue();var qe=function(){},X=zn(function(t,e){var r=Qn(null),n=Jn({onScrollCapture:qe,onWheelCapture:qe,onTouchMoveCapture:qe}),o=n[0],a=n[1],i=t.forwardProps,u=t.children,c=t.className,l=t.removeScrollBar,f=t.enabled,p=t.shards,d=t.sideCar,v=t.noIsolation,h=t.inert,s=t.allowPinchZoom,m=t.as,b=m===void 0?"div":m,y=ir(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=d,S=ae([r,e]),g=O({},y,o);return He(Xn,null,f&&He(w,{sideCar:ye,removeScrollBar:l,shards:p,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!s,lockRef:r}),i?Kn(Zn.only(u),O({},g,{ref:S})):He(b,O({},g,{className:c,ref:S}),u))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};X.classNames={fullWidth:F,zeroRight:P};import{Fragment as ho,createElement as Qe,useCallback as W,useEffect as Je,useRef as be,useState as dr}from"react";import{createElement as io,useEffect as uo,useState as co}from"react";import{useEffect as no}from"react";var ur;var cr=function(){if(ur)return ur;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function eo(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=cr();return e&&t.setAttribute("nonce",e),t}function to(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ro(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var $e=function(){var t=0,e=null;return{add:function(r){t==0&&(e=eo())&&(to(e,r),ro(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Ye=function(){var t=$e();return function(e){no(function(){return t.add(e),function(){t.remove()}},[])}};var K=function(){var t=Ye(),e=function(r){var n=r.styles;return t(n),null};return e};var oo={left:0,top:0,right:0,gap:0},Ze=function(t){return parseInt(t||"",10)||0},ao=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Ze(r),Ze(n),Ze(o)]},ge=function(t){if(t===void 0&&(t="margin"),typeof window=="undefined")return oo;var e=ao(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}};var lo=K(),so=function(t,e,r,n){var o=t.left,a=t.top,i=t.right,u=t.gap;return r===void 0&&(r="margin"),` | ||
.`+Ue+` { | ||
var Lr=Object.create,Oe=Object.defineProperty,Br=Object.getPrototypeOf,jr=Object.prototype.hasOwnProperty,Mr=Object.getOwnPropertyNames,Wr=Object.getOwnPropertyDescriptor;var Ur=e=>Oe(e,"__esModule",{value:!0});var Re=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports);var Gr=(e,t,r)=>{if(Ur(e),t&&typeof t=="object"||typeof t=="function")for(let n of Mr(t))!jr.call(e,n)&&n!=="default"&&Oe(e,n,{get:()=>t[n],enumerable:!(r=Wr(t,n))||r.enumerable});return e},ie=e=>e&&e.__esModule?e:Gr(Oe(e!=null?Lr(Br(e)):{},"default",{value:e,enumerable:!0}),e);var xt=Re((Ho,wt)=>{"use strict";var Jr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";wt.exports=Jr});var Ot=Re(($o,_t)=>{"use strict";var en=xt();function St(){}function Et(){}Et.resetWarningCache=St;_t.exports=function(){function e(n,o,i,a,u,c){if(c!==en){var s=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 s.name="Invariant Violation",s}}e.isRequired=e;function t(){return e}var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Et,resetWarningCache:St};return r.PropTypes=r,r}});var q=Re((Zo,Rt)=>{Rt.exports=Ot()();var qo,Yo});import{forwardRef as ut,useEffect as Sr,createElement as H,useRef as Er,useCallback as po}from"react";import{useRef as pt,createElement as Yr}from"react";import{useLayoutEffect as Vr,useEffect as Hr}from"react";function ue(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ft=ue()?Vr:Hr;import{useState as $r,useCallback as qr}from"react";function dt(){var e=$r(Object.create(null)),t=e[1];return qr(function(){t(Object.create(null))},[])}import{createPortal as Zr}from"react-dom";var mt=function(t){var r=t.children,n=t.type,o=n===void 0?"reach-portal":n,i=pt(null),a=pt(null),u=dt();return ft(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?Zr(r,a.current):Yr("span",{ref:i})};function vt(e){return ue()?e?e.ownerDocument:document:null}function ht(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function Ce(){}import"react";function yt(e){if(!1)var t}import{useCallback as Xr}from"react";function bt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kr(e,t){if(!!e){if(typeof e=="string")return bt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(e,t)}}function zr(e,t){var r;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=Kr(e))||t&&e&&typeof e.length=="number"){r&&(e=r);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 r=e[Symbol.iterator](),r.next.bind(r)}function Qr(e,t){if(e!=null)if(ht(e))e(t);else try{e.current=t}catch(r){throw new Error('Cannot assign value "'+t+'" to ref "'+e+'"')}}function gt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Xr(function(n){for(var o=zr(t),i;!(i=o()).done;){var a=i.value;Qr(a,n)}},t)}function $(e,t){return function(r){if(e&&e(r),!r.defaultPrevented)return t(r)}}function Pe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function R(){return R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},R.apply(this,arguments)}import{createElement as Bn,forwardRef as jn}from"react";var ba=ie(q());import{Fragment as on,createElement as L,forwardRef as an,useCallback as Z,useEffect as ya,useRef as Fe,useState as Mt}from"react";var Y="data-focus-lock",ce="data-focus-lock-disabled",Ct="data-no-focus-lock",Pt="data-autofocus-inside";function Nt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}import{useState as tn}from"react";function Ft(e,t){var r=tn(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 le(e,t){return Ft(t,function(r){return e.forEach(function(n){return Nt(n,r)})})}var oa=ie(q());import{Fragment as rn,createElement as Ne}from"react";var I={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Tt=function(t){var r=t.children;return Ne(rn,null,Ne("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:I}),r,r&&Ne("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:I}))};Tt.propTypes={};Tt.defaultProps={children:null};var A=function(){return A=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},A.apply(this,arguments)};function Dt(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 kt(e){return e}function It(e,t){t===void 0&&(t=kt);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(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(u){return u!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(u){return i(u)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var u=r;r=[],u.forEach(i),a=r}var c=function(){var f=a;a=[],f.forEach(i)},s=function(){return Promise.resolve().then(c)};s(),r={push:function(f){a.push(f),s()},filter:function(f){return a=a.filter(f),r}}}};return o}function se(e,t){return t===void 0&&(t=kt),It(e,t)}function fe(e){e===void 0&&(e={});var t=It(null);return t.options=A({async:!0,ssr:!1},e),t}import{createElement as nn}from"react";var At=function(e){var t=e.sideCar,r=Dt(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 nn(n,A({},r))};At.isSideCarExport=!0;function Lt(e,t){return e.useMedium(t),At}var de=se({},function(e){var t=e.target,r=e.currentTarget;return{target:t,currentTarget:r}}),pe=se(),Bt=se(),jt=fe({async:!0});var un=[],Te=an(function(t,r){var n,o=Mt(),i=o[0],a=o[1],u=Fe(),c=Fe(!1),s=Fe(null),f=t.children,d=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,h=t.crossFrame,l=t.autoFocus,p=t.allowTextSelection,w=t.group,x=t.className,g=t.whiteList,b=t.shards,y=b===void 0?un:b,P=t.as,O=P===void 0?"div":P,E=t.lockProps,k=E===void 0?{}:E,S=t.sideCar,oe=t.returnFocus,Se=t.onActivation,Ee=t.onDeactivation,Or=Mt({}),Rr=Or[0],Cr=Z(function(){s.current=s.current||document&&document.activeElement,u.current&&Se&&Se(u.current),c.current=!0},[Se]),Pr=Z(function(){c.current=!1,Ee&&Ee(u.current)},[Ee]),Nr=Z(function(N){var ae=s.current;if(Boolean(oe)&&ae&&ae.focus){var st=typeof oe=="object"?oe:void 0;s.current=null,N?Promise.resolve().then(function(){return ae.focus(st)}):ae.focus(st)}},[oe]),Fr=Z(function(N){c.current&&de.useMedium(N)},[]),Tr=pe.useMedium,Dr=Z(function(N){u.current!==N&&(u.current=N,a(N))},[]),kr=R((n={},n[ce]=d&&"disabled",n[Y]=w,n),k),lt=m!==!0,Ir=lt&&m!=="tail",Ar=le([r,Dr]);return L(on,null,lt&&[L("div",{key:"guard-first","data-focus-guard":!0,tabIndex:d?-1:0,style:I}),L("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:d?-1:1,style:I})],!d&&L(S,{id:Rr,sideCar:jt,observed:i,disabled:d,persistentFocus:v,crossFrame:h,autoFocus:l,whiteList:g,shards:y,onActivation:Cr,onDeactivation:Pr,returnFocus:Nr}),L(O,R({ref:Ar},kr,{className:x,onBlur:Tr,onFocus:Fr}),f),Ir&&L("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:I}))});Te.propTypes={};Te.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 De=Te;var Ai=ie(q());import{createElement as _n}from"react";function ke(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}import cn,{PureComponent as ln}from"react";function sn(e,t){function r(n){return n.displayName||n.name||"Component"}return function(o){var i=[],a;function u(){a=e(i.map(function(s){return s.props})),t(a)}var c=function(s){ke(f,s);function f(){return s.apply(this,arguments)||this}f.peek=function(){return a};var d=f.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 cn.createElement(o,this.props)},f}(ln);return Ie(c,"displayName","SideEffect("+r(o)+")"),c}}var Wt=sn;var _=function(e){for(var t=Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t},X=function(e){return Array.isArray(e)?e:[e]};var fn=function(e){for(var t=new Set,r=e.length,n=0;n<r;n+=1)for(var o=n+1;o<r;o+=1){var i=e[n].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter(function(a,u){return!t.has(u)})},Ut=function(e){return e.parentNode?Ut(e.parentNode):e},B=function(e){var t=X(e);return t.filter(Boolean).reduce(function(r,n){var o=n.getAttribute(Y);return r.push.apply(r,o?fn(_(Ut(n).querySelectorAll("["+Y+'="'+o+'"]:not(['+ce+'="disabled"])'))):[n]),r},[])};var dn=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},pn=function(e,t){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!dn(window.getComputedStyle(e,null))&&t(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},Ae=function(e,t){var r=e.get(t);if(r!==void 0)return r;var n=pn(t,Ae.bind(void 0,e));return e.set(t,n),n},Gt=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)},Vt=function(e){return Boolean(e)};var mn=function(e,t){var r=e.tabIndex-t.tabIndex,n=e.index-t.index;if(r){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return r||n},Le=function(e,t,r){return _(e).map(function(n,o){return{node:n,index:o,tabIndex:r&&n.tabIndex===-1?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}}).filter(function(n){return!t||n.tabIndex>=0}).sort(mn)};var Ht=["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=Ht.join(","),vn=Be+", [data-focus-guard]",me=function(e,t){return e.reduce(function(r,n){return r.concat(_(n.querySelectorAll(t?vn:Be)),n.parentNode?_(n.parentNode.querySelectorAll(Be)).filter(function(o){return o===n}):[])},[])},$t=function(e){var t=e.querySelectorAll("["+Pt+"]");return _(t).map(function(r){return me([r])}).reduce(function(r,n){return r.concat(n)},[])};var je=function(e,t){return _(e).filter(function(r){return Ae(t,r)}).filter(function(r){return Gt(r)})},z=function(e,t,r){return Le(je(me(e,r),t),!0,r)},Me=function(e,t){return Le(je(me(e),t),!1)},qt=function(e,t){return je($t(e),t)};var We=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&We(e.parentNode,t),t},Ue=function(e,t){for(var r=We(e),n=We(t),o=0;o<r.length;o+=1){var i=r[o];if(n.indexOf(i)>=0)return i}return!1},ve=function(e,t,r){var n=X(e),o=X(t),i=n[0],a=!1;return o.filter(Boolean).forEach(function(u){a=Ue(a||u,u)||a,r.filter(Boolean).forEach(function(c){var s=Ue(i,c);s&&(!a||s.contains(a)?a=s:a=Ue(s,a))})}),a},Yt=function(e,t){return e.reduce(function(r,n){return r.concat(qt(n,t))},[])};var Zt=function(e){var t=B(e).filter(j),r=ve(e,e,t),n=new Map,o=z([r],n,!0),i=z(t,n).filter(function(a){var u=a.node;return j(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:K(u)}})};var hn=function(e){return e===document.activeElement},yn=function(e){return Boolean(_(e.querySelectorAll("iframe")).some(function(t){return hn(t)}))},Ge=function(e){var t=document&&document.activeElement;return!t||t.dataset&&t.dataset.focusGuard?!1:B(e).reduce(function(r,n){return r||n.contains(t)||yn(n)},!1)};var Xt=function(){return document&&_(document.querySelectorAll("["+Ct+"]")).some(function(e){return e.contains(document.activeElement)})};var Kt=function(e){return e.tagName==="INPUT"&&e.type==="radio"},bn=function(e,t){return t.filter(Kt).filter(function(r){return r.name===e.name}).filter(function(r){return r.checked})[0]||e},he=function(e,t){return Kt(e)&&e.name?bn(e,t):e},zt=function(e){var t=new Set;return e.forEach(function(r){return t.add(he(r,e))}),e.filter(function(r){return t.has(r)})};var Ve=function(e){return e[0]&&e.length>1?he(e[0],e):e[0]},He=function(e,t){return e.length>1?e.indexOf(he(e[t],e)):t};var $e="NEW_FOCUS",Qt=function(e,t,r,n){var o=e.length,i=e[0],a=e[o-1],u=K(r);if(!(e.indexOf(r)>=0)){var c=t.indexOf(r),s=n?t.indexOf(n):c,f=n?e.indexOf(n):-1,d=c-s,m=t.indexOf(i),v=t.indexOf(a),h=zt(t),l=h.indexOf(r)-(n?h.indexOf(n):c),p=He(e,0),w=He(e,o-1);if(c===-1||f===-1)return $e;if(!d&&f>=0)return f;if(c<=m&&u&&Math.abs(d)>1)return w;if(c>=v&&u&&Math.abs(d)>1)return p;if(d&&Math.abs(l)>1)return f;if(c<=m)return w;if(c>v)return p;if(d)return Math.abs(d)>1?f:(o+f+d)%o}};var gn=function(e){return function(t){return t.autofocus||t.dataset&&!!t.dataset.autofocus||e.indexOf(t)>=0}},wn=function(e,t){var r=new Map;return t.forEach(function(n){return r.set(n.node,n)}),e.map(function(n){return r.get(n)}).filter(Vt)},Jt=function(e,t){var r=document&&document.activeElement,n=B(e).filter(j),o=ve(r||e,e,n),i=new Map,a=Me(n,i),u=z(n,i).filter(function(v){var h=v.node;return j(h)});if(!(!u[0]&&(u=a,!u[0]))){var c=Me([o],i).map(function(v){var h=v.node;return h}),s=wn(c,u),f=s.map(function(v){var h=v.node;return h}),d=Qt(f,c,r,t);if(d===$e){var m=a.map(function(v){var h=v.node;return h}).filter(gn(Yt(n,i)));return{node:m&&m.length?Ve(m):Ve(f)}}return d===void 0?d:s[d]}};var xn=function(e){e.focus(),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qe=0,Ye=!1,er=function(e,t){var r=Jt(e,t);if(!Ye&&r){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"),Ye=!0,setTimeout(function(){Ye=!1},1);return}qe++,xn(r.node),qe--}};var Ze=er;function Xe(e){var t=window,r=t.setImmediate;typeof r!="undefined"?r(e):setTimeout(e,1)}var Sn=function(){return document&&document.activeElement===document.body},En=function(){return Sn()||Xt()},M=null,W=null,U=null,Q=!1,On=function(){return!0},Rn=function(t){return(M.whiteList||On)(t)},Cn=function(t,r){U={observerNode:t,portaledElement:r}},Pn=function(t){return U&&U.portaledElement===t};function tr(e,t,r,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+=r)!==t);o&&(o.node.tabIndex=0)}var Nn=function(t){return t&&"current"in t?t.current:t},Fn=function(t){return t?Boolean(Q):Q==="meanwhile"},ye=function(){var t=!1;if(M){var r=M,n=r.observed,o=r.persistentFocus,i=r.autoFocus,a=r.shards,u=r.crossFrame,c=n||U&&U.portaledElement,s=document&&document.activeElement;if(c){var f=[c].concat(a.map(Nn).filter(Boolean));if((!s||Rn(s))&&(o||Fn(u)||!En()||!W&&i)&&(c&&!(Ge(f)||Pn(s,c))&&(document&&!W&&s&&!i?(s.blur&&s.blur(),document.body.focus()):(t=Ze(f,W),U={})),Q=!1,W=document&&document.activeElement),document){var d=document&&document.activeElement,m=Zt(f),v=m.map(function(h){var l=h.node;return l}).indexOf(d);v>-1&&(m.filter(function(h){var l=h.guard,p=h.node;return l&&p.dataset.focusAutoGuard}).forEach(function(h){var l=h.node;return l.removeAttribute("tabIndex")}),tr(v,m.length,1,m),tr(v,-1,-1,m))}}}return t},rr=function(t){ye()&&t&&(t.stopPropagation(),t.preventDefault())},be=function(){return Xe(ye)},nr=function(t){var r=t.target,n=t.currentTarget;n.contains(r)||Cn(n,r)},Tn=function(){return null},Dn=function(t){var r=t.children;return _n("div",{onBlur:be,onFocus:nr},r)};Dn.propTypes={};var or=function(){Q="just",setTimeout(function(){Q="meanwhile"},0)},kn=function(){document.addEventListener("focusin",rr,!0),document.addEventListener("focusout",be),window.addEventListener("blur",or)},In=function(){document.removeEventListener("focusin",rr,!0),document.removeEventListener("focusout",be),window.removeEventListener("blur",or)};function An(e){return e.filter(function(t){var r=t.disabled;return!r})}function Ln(e){var t=e.slice(-1)[0];t&&!M&&kn();var r=M,n=r&&t&&t.id===r.id;M=t,r&&!n&&(r.onDeactivation(),e.filter(function(o){var i=o.id;return i===r.id}).length||r.returnFocus(!t)),t?(W=null,(!n||r.observed!==t.observed)&&t.onActivation(),ye(!0),Xe(ye)):(In(),W=null)}de.assignSyncMedium(nr);pe.assignMedium(be);Bt.assignMedium(function(e){return e({moveFocusInside:Ze,focusInside:Ge})});var ar=Wt(An,Ln)(Tn);var ir=jn(function(t,r){return Bn(De,R({sideCar:ar,ref:r},t))}),ur=De.propTypes||{},Yi=ur.sideCar,Zi=Pe(ur,["sideCar"]);ir.propTypes={};var cr=ir;var lr=cr;var C=function(){return C=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},C.apply(this,arguments)};function sr(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}import{createElement as so,forwardRef as fo}from"react";import{Children as Mn,Fragment as Wn,cloneElement as Un,createElement as ze,forwardRef as Gn,useRef as Vn,useState as Hn}from"react";var F="right-scroll-bar-position",T="width-before-scroll-bar",Ke="with-scroll-bars-hidden";var ge=fe();var Qe=function(){},J=Gn(function(e,t){var r=Vn(null),n=Hn({onScrollCapture:Qe,onWheelCapture:Qe,onTouchMoveCapture:Qe}),o=n[0],i=n[1],a=e.forwardProps,u=e.children,c=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,h=e.inert,l=e.allowPinchZoom,p=e.as,w=p===void 0?"div":p,x=sr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),g=m,b=le([r,t]),y=C({},x,o);return ze(Wn,null,f&&ze(g,{sideCar:ge,removeScrollBar:s,shards:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!l,lockRef:r}),a?Un(Mn.only(u),C({},y,{ref:b})):ze(w,C({},y,{className:c,ref:b}),u))});J.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};J.classNames={fullWidth:T,zeroRight:F};import{Fragment as io,createElement as at,useCallback as G,useEffect as it,useRef as xe,useState as hr}from"react";import{createElement as zn,useEffect as Qn,useState as Jn}from"react";import{useEffect as Zn}from"react";var fr;var dr=function(){if(fr)return fr;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function $n(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dr();return t&&e.setAttribute("nonce",t),e}function qn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Yn(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Je=function(){var e=0,t=null;return{add:function(r){e==0&&(t=$n())&&(qn(t,r),Yn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var et=function(){var e=Je();return function(t){Zn(function(){return e.add(t),function(){e.remove()}},[])}};var ee=function(){var e=et(),t=function(r){var n=r.styles;return e(n),null};return t};var Xn={left:0,top:0,right:0,gap:0},tt=function(e){return parseInt(e||"",10)||0},Kn=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[tt(r),tt(n),tt(o)]},we=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Xn;var t=Kn(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])}};var eo=ee(),to=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,u=e.gap;return r===void 0&&(r="margin"),` | ||
.`+Ke+` { | ||
overflow: hidden `+n+`; | ||
@@ -8,6 +9,6 @@ padding-right: `+u+"px "+n+`; | ||
overflow: hidden `+n+`; | ||
`+[e&&"position: relative "+n+";",r==="margin"&&` | ||
`+[t&&"position: relative "+n+";",r==="margin"&&` | ||
padding-left: `+o+`px; | ||
padding-top: `+a+`px; | ||
padding-right: `+i+`px; | ||
padding-top: `+i+`px; | ||
padding-right: `+a+`px; | ||
margin-left:0; | ||
@@ -19,21 +20,21 @@ margin-top:0; | ||
.`+P+` { | ||
.`+F+` { | ||
right: `+u+"px "+n+`; | ||
} | ||
.`+F+` { | ||
.`+T+` { | ||
margin-right: `+u+"px "+n+`; | ||
} | ||
.`+P+" ."+P+` { | ||
.`+F+" ."+F+` { | ||
right: 0 `+n+`; | ||
} | ||
.`+F+" ."+F+` { | ||
.`+T+" ."+T+` { | ||
margin-right: 0 `+n+`; | ||
} | ||
`},Xe=function(t){var e=co(ge(t.gapMode)),r=e[0],n=e[1];uo(function(){n(ge(t.gapMode))},[t.gapMode]);var o=t.noRelative,a=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;return io(lo,{styles:so(r,!o,u,a?"":"!important")})};var fo=function(t){var e=window.getComputedStyle(t);return e.overflowY!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowY==="visible")},po=function(t){var e=window.getComputedStyle(t);return e.overflowX!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowX==="visible")},Ke=function(t,e){var r=e;do{var n=lr(t,r);if(n){var o=sr(t,r),a=o[1],i=o[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},mo=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},vo=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},lr=function(t,e){return t==="v"?fo(e):po(e)},sr=function(t,e){return t==="v"?mo(e):vo(e)},fr=function(t,e,r,n,o){var a=n,i=r.target,u=e.contains(i),c=!1,l=a>0,f=0,p=0;do{var d=sr(t,i),v=d[0],h=d[1],s=d[2],m=h-s-v;(v||m)&&lr(t,i)&&(f+=m,p+=v),i=i.parentNode}while(!u&&i!==document.body||u&&(e.contains(i)||e===i));return(l&&(o&&f===0||!o&&a>f)||!l&&(o&&p===0||!o&&-a>p))&&(c=!0),c};var ze=!1;if(typeof window!="undefined")try{z=Object.defineProperty({},"passive",{get:function(){return ze=!0,!0}}),window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch(t){ze=!1}var z,N=ze?{passive:!1}:!1;var we=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},pr=function(t){return[t.deltaX,t.deltaY]},mr=function(t){return t&&"current"in t?t.current:t},yo=function(t,e){return t[0]===e[0]&&t[1]===e[1]},go=function(t){return` | ||
.block-interactivity-`+t+` {pointer-events: none;} | ||
.allow-interactivity-`+t+` {pointer-events: all;} | ||
`},bo=0,j=[];function vr(t){var e=be([]),r=be([0,0]),n=be(),o=dr(bo++)[0],a=dr(function(){return K()})[0],i=be(t);Je(function(){i.current=t},[t]),Je(function(){if(t.inert){document.body.classList.add("block-interactivity-"+o);var s=[t.lockRef.current].concat((t.shards||[]).map(mr)).filter(Boolean);return s.forEach(function(m){return m.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),s.forEach(function(m){return m.classList.remove("allow-interactivity-"+o)})}}},[t.inert,t.lockRef.current,t.shards]);var u=W(function(s,m){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var b=we(s),y=r.current,w="deltaX"in s?s.deltaX:y[0]-b[0],S="deltaY"in s?s.deltaY:y[1]-b[1],g,T=s.target,_=Math.abs(w)>Math.abs(S)?"h":"v",x=Ke(_,T);if(!x)return!0;if(x?g=_:(g=_==="v"?"h":"v",x=Ke(_,T)),!x)return!1;if(!n.current&&"changedTouches"in s&&(w||S)&&(n.current=g),!g)return!0;var J=n.current||g;return fr(J,m,s,J==="h"?w:S,!0)},[]),c=W(function(s){var m=s;if(!(!j.length||j[j.length-1]!==a)){var b="deltaY"in m?pr(m):we(m),y=e.current.filter(function(g){return g.name===m.type&&g.target===m.target&&yo(g.delta,b)})[0];if(y&&y.should){m.preventDefault();return}if(!y){var w=(i.current.shards||[]).map(mr).filter(Boolean).filter(function(g){return g.contains(m.target)}),S=w.length>0?u(m,w[0]):!i.current.noIsolation;S&&m.preventDefault()}}},[]),l=W(function(s,m,b,y){var w={name:s,delta:m,target:b,should:y};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),f=W(function(s){r.current=we(s),n.current=void 0},[]),p=W(function(s){l(s.type,pr(s),s.target,u(s,t.lockRef.current))},[]),d=W(function(s){l(s.type,we(s),s.target,u(s,t.lockRef.current))},[]);Je(function(){return j.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:d}),document.addEventListener("wheel",c,N),document.addEventListener("touchmove",c,N),document.addEventListener("touchstart",f,N),function(){j=j.filter(function(s){return s!==a}),document.removeEventListener("wheel",c,N),document.removeEventListener("touchmove",c,N),document.removeEventListener("touchstart",f,N)}},[]);var v=t.removeScrollBar,h=t.inert;return Qe(ho,null,h?Qe(a,{styles:go(o)}):null,v?Qe(Xe,{gapMode:"margin"}):null)}var hr=kt(ye,vr);var yr=xo(function(t,e){return wo(X,O({},t,{ref:e,sideCar:hr}))});yr.classNames=X.classNames;var gr=yr;var Q=V(U());function rt(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}var Au={allowPinchZoom:Q.default.bool,dangerouslyBypassFocusLock:Q.default.bool,dangerouslyBypassScrollLock:Q.default.bool,initialFocusRef:function(){return null},onDismiss:Q.default.func},wr=et(function(e,r){var n=e.isOpen,o=n===void 0?!0:n,a=rt(e,["isOpen"]);return tt(function(){return dt("dialog")},[]),tt(function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[o]),o?M.createElement(yt,{"data-reach-dialog-wrapper":""},M.createElement(Eo,Object.assign({ref:r},a))):null}),Eo=et(function(e,r){var n=e.allowPinchZoom,o=e.dangerouslyBypassFocusLock,a=o===void 0?!1:o,i=e.dangerouslyBypassScrollLock,u=i===void 0?!1:i,c=e.initialFocusRef,l=e.onClick,f=e.onDismiss,p=f===void 0?ne:f,d=e.onKeyDown,v=e.onMouseDown,h=e.unstable_lockFocusAcrossFrames,s=h===void 0?!0:h,m=rt(e,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),b=br(null),y=br(null),w=vt(y,r),S=So(function(){c&&c.current&&c.current.focus()},[c]);function g(x){b.current===x.target&&(x.stopPropagation(),p(x))}function T(x){x.key==="Escape"&&(x.stopPropagation(),p(x))}function _(x){b.current=x.target}return tt(function(){return y.current?_o(y.current):void 0},[]),M.createElement(ar,{autoFocus:!0,returnFocus:!0,onActivation:S,disabled:a,crossFrame:s},M.createElement(gr,{allowPinchZoom:n,enabled:!u},M.createElement("div",Object.assign({},m,{ref:w,"data-reach-dialog-overlay":"",onClick:G(l,g),onKeyDown:G(d,T),onMouseDown:G(v,_)}))))}),xr=et(function(e,r){var n=e.onClick,o=e.onKeyDown,a=rt(e,["onClick","onKeyDown"]);return M.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:r,"data-reach-dialog-content":"",onClick:G(n,function(i){i.stopPropagation()})}))});function _o(t){var e=[],r=[],n=pt(t)||document;return t?(Array.prototype.forEach.call(n.querySelectorAll("body > *"),function(o){var a,i,u=(a=t.parentNode)===null||a===void 0||(i=a.parentNode)===null||i===void 0?void 0:i.parentNode;if(o!==u){var c=o.getAttribute("aria-hidden"),l=c!==null&&c!=="false";l||(e.push(c),r.push(o),o.setAttribute("aria-hidden","true"))}}),function(){r.forEach(function(o,a){var i=e[a];i===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i)})}):ne}export{xr as ModalDialogPrimitiveContent,wr as ModalDialogPrimitiveOverlay}; | ||
`},rt=function(e){var t=Jn(we(e.gapMode)),r=t[0],n=t[1];Qn(function(){n(we(e.gapMode))},[e.gapMode]);var o=e.noRelative,i=e.noImportant,a=e.gapMode,u=a===void 0?"margin":a;return zn(eo,{styles:to(r,!o,u,i?"":"!important")})};var ro=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},no=function(e){var t=window.getComputedStyle(e);return e.type==="range"?!0:t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},nt=function(e,t){var r=t;do{var n=pr(e,r);if(n){var o=mr(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},oo=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ao=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},pr=function(e,t){return e==="v"?ro(t):no(t)},mr=function(e,t){return e==="v"?oo(t):ao(t)},vr=function(e,t,r,n,o){var i=n,a=r.target,u=t.contains(a),c=!1,s=i>0,f=0,d=0;do{var m=mr(e,a),v=m[0],h=m[1],l=m[2],p=h-l-v;(v||p)&&pr(e,a)&&(f+=p,d+=v),a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(s&&(o&&f===0||!o&&i>f)||!s&&(o&&d===0||!o&&-i>d))&&(c=!0),c};var ot=!1;if(typeof window!="undefined")try{te=Object.defineProperty({},"passive",{get:function(){return ot=!0,!0}}),window.addEventListener("test",te,te),window.removeEventListener("test",te,te)}catch(e){ot=!1}var te,D=ot?{passive:!1}:!1;var _e=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yr=function(e){return[e.deltaX,e.deltaY]},br=function(e){return e&&"current"in e?e.current:e},uo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},co=function(e){return` | ||
.block-interactivity-`+e+` {pointer-events: none;} | ||
.allow-interactivity-`+e+` {pointer-events: all;} | ||
`},lo=0,V=[];function gr(e){var t=xe([]),r=xe([0,0]),n=xe(),o=hr(lo++)[0],i=hr(function(){return ee()})[0],a=xe(e);it(function(){a.current=e},[e]),it(function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var l=[e.lockRef.current].concat((e.shards||[]).map(br)).filter(Boolean);return l.forEach(function(p){return p.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),l.forEach(function(p){return p.classList.remove("allow-interactivity-"+o)})}}},[e.inert,e.lockRef.current,e.shards]);var u=G(function(l,p){if("touches"in l&&l.touches.length===2)return!a.current.allowPinchZoom;var w=_e(l),x=r.current,g="deltaX"in l?l.deltaX:x[0]-w[0],b="deltaY"in l?l.deltaY:x[1]-w[1],y,P=l.target,O=Math.abs(g)>Math.abs(b)?"h":"v",E=nt(O,P);if(!E)return!0;if(E?y=O:(y=O==="v"?"h":"v",E=nt(O,P)),!E)return!1;if(!n.current&&"changedTouches"in l&&(g||b)&&(n.current=y),!y)return!0;var k=n.current||y;return vr(k,p,l,k==="h"?g:b,!0)},[]),c=G(function(l){var p=l;if(!(!V.length||V[V.length-1]!==i)){var w="deltaY"in p?yr(p):_e(p),x=t.current.filter(function(y){return y.name===p.type&&y.target===p.target&&uo(y.delta,w)})[0];if(x&&x.should){p.preventDefault();return}if(!x){var g=(a.current.shards||[]).map(br).filter(Boolean).filter(function(y){return y.contains(p.target)}),b=g.length>0?u(p,g[0]):!a.current.noIsolation;b&&p.preventDefault()}}},[]),s=G(function(l,p,w,x){var g={name:l,delta:p,target:w,should:x};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(b){return b!==g})},1)},[]),f=G(function(l){r.current=_e(l),n.current=void 0},[]),d=G(function(l){s(l.type,yr(l),l.target,u(l,e.lockRef.current))},[]),m=G(function(l){s(l.type,_e(l),l.target,u(l,e.lockRef.current))},[]);it(function(){return V.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,D),document.addEventListener("touchmove",c,D),document.addEventListener("touchstart",f,D),function(){V=V.filter(function(l){return l!==i}),document.removeEventListener("wheel",c,D),document.removeEventListener("touchmove",c,D),document.removeEventListener("touchstart",f,D)}},[]);var v=e.removeScrollBar,h=e.inert;return at(io,null,h?at(i,{styles:co(o)}):null,v?at(rt,{gapMode:"margin"}):null)}var wr=Lt(ge,gr);var xr=fo(function(e,t){return so(J,C({},e,{ref:t,sideCar:wr}))});xr.classNames=J.classNames;var _r=xr;var re=ie(q());function ne(){return ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ne.apply(this,arguments)}function ct(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var ac={allowPinchZoom:re.default.bool,dangerouslyBypassFocusLock:re.default.bool,dangerouslyBypassScrollLock:re.default.bool,initialFocusRef:function(){return null},onDismiss:re.default.func},vo=ut(function(t,r){var n=t.as,o=n===void 0?"div":n,i=t.isOpen,a=i===void 0?!0:i,u=ct(t,["as","isOpen"]);return yt("dialog"),Sr(function(){a?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[a]),a?H(mt,{"data-reach-dialog-wrapper":""},H(mo,ne({ref:r,as:o},u))):null}),mo=ut(function(t,r){var n=t.allowPinchZoom,o=t.as,i=o===void 0?"div":o,a=t.dangerouslyBypassFocusLock,u=a===void 0?!1:a,c=t.dangerouslyBypassScrollLock,s=c===void 0?!1:c,f=t.initialFocusRef,d=t.onClick,m=t.onDismiss,v=m===void 0?Ce:m,h=t.onKeyDown,l=t.onMouseDown,p=t.unstable_lockFocusAcrossFrames,w=p===void 0?!0:p,x=ct(t,["allowPinchZoom","as","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),g=Er(null),b=Er(null),y=gt(b,r),P=po(function(){f&&f.current&&f.current.focus()},[f]);function O(S){g.current===S.target&&(S.stopPropagation(),v(S))}function E(S){S.key==="Escape"&&(S.stopPropagation(),v(S))}function k(S){g.current=S.target}return Sr(function(){return b.current?ho(b.current):void 0},[]),H(lr,{autoFocus:!0,returnFocus:!0,onActivation:P,disabled:u,crossFrame:w},H(_r,{allowPinchZoom:n,enabled:!s},H(i,ne({},x,{ref:y,"data-reach-dialog-overlay":"",onClick:$(d,O),onKeyDown:$(h,E),onMouseDown:$(l,k)}))))}),yo=ut(function(t,r){var n=t.as,o=n===void 0?"div":n,i=t.onClick;t.onKeyDown;var a=ct(t,["as","onClick","onKeyDown"]);return H(o,ne({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:r,"data-reach-dialog-content":"",onClick:$(i,function(u){u.stopPropagation()})}))});function ho(e){var t=[],r=[],n=vt(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"),s=c!==null&&c!=="false";s||(t.push(c),r.push(o),o.setAttribute("aria-hidden","true"))}}),function(){r.forEach(function(o,i){var a=t[i];a===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",a)})}):Ce}export{yo as ModalDialogPrimitiveContent,vo as ModalDialogPrimitiveOverlay}; | ||
/*! ***************************************************************************** | ||
@@ -40,0 +41,0 @@ Copyright (c) Microsoft Corporation. All rights reserved. |
@@ -1,3 +0,4 @@ | ||
var Ir=Object.create,ie=Object.defineProperty,kr=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,Lr=Object.getOwnPropertyNames,Br=Object.getOwnPropertyDescriptor;var ot=t=>ie(t,"__esModule",{value:!0});var ue=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Wr=(t,e)=>{ot(t);for(var r in e)ie(t,r,{get:e[r],enumerable:!0})},jr=(t,e,r)=>{if(ot(t),e&&typeof e=="object"||typeof e=="function")for(let n of Lr(e))!Ar.call(t,n)&&n!=="default"&&ie(t,n,{get:()=>e[n],enumerable:!(r=Br(e,n))||r.enumerable});return t},b=t=>t&&t.__esModule?t:jr(ie(t!=null?Ir(kr(t)):{},"default",{value:t,enumerable:!0}),t);var ct=ue((Kn,at)=>{"use strict";var Mr=!1,it=function(){};Mr&&(ut=function(e,r){var n=arguments.length;r=new Array(n>1?n-1:0);for(var o=1;o<n;o++)r[o-1]=arguments[o];var a=0,i="Warning: "+e.replace(/%s/g,function(){return r[a++]});typeof console!="undefined"&&console.error(i);try{throw new Error(i)}catch(u){}},it=function(t,e,r){var n=arguments.length;r=new Array(n>2?n-2:0);for(var o=2;o<n;o++)r[o-2]=arguments[o];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||ut.apply(null,[e].concat(r))});var ut;at.exports=it});var gt=ue((no,yt)=>{"use strict";var qr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";yt.exports=qr});var St=ue((oo,bt)=>{"use strict";var $r=gt();function wt(){}function xt(){}xt.resetWarningCache=wt;bt.exports=function(){function t(n,o,a,i,u,c){if(c!==$r){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}}t.isRequired=t;function e(){return t}var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:xt,resetWarningCache:wt};return r.PropTypes=r,r}});var Z=ue((uo,Et)=>{Et.exports=St()();var ao,io});Wr(exports,{ModalDialogPrimitiveContent:()=>xr,ModalDialogPrimitiveOverlay:()=>wr});var w=b(require("react"));var Y=b(require("react"));var P=b(require("react")),Vr=b(ct()),st=lt()?P.default.useLayoutEffect:P.default.useEffect;var ft=ce;var Qn=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();function Ur(t,e){if(t!=null)if(Gr(t))t(e);else try{t.current=e}catch(r){throw new Error('Cannot assign value "'+e+'" to ref "'+t+'"')}}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function dt(t){return t&&t.ownerDocument?t.ownerDocument:lt()?document:null}function Gr(t){return!!(t&&{}.toString.call(t)=="[object Function]")}function ce(){}function pt(){var t=P.useState(Object.create(null)),e=t[1];return P.useCallback(function(){e(Object.create(null))},[])}function mt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return P.useMemo(function(){return e.every(function(n){return n==null})?null:function(n){e.forEach(function(o){Ur(o,n)})}},[].concat(e))}function $(t,e){return function(r){if(t&&t(r),!r.defaultPrevented)return e(r)}}var vt=b(require("react-dom")),Hr=function(e){var r=e.children,n=e.type,o=n===void 0?"reach-portal":n,a=Y.useRef(null),i=Y.useRef(null),u=pt();return st(function(){if(!!a.current){var c=a.current.ownerDocument;return i.current=c==null?void 0:c.createElement(o),c.body.appendChild(i.current),u(),function(){i.current&&i.current.ownerDocument&&i.current.ownerDocument.body.removeChild(i.current)}}},[o,u]),i.current?vt.createPortal(r,i.current):Y.default.createElement("span",{ref:a})},ht=Hr;function Ne(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function T(){return T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)}var Ee=b(require("react"));var y=b(require("react")),Co=b(Z());var X="data-focus-lock",le="data-focus-lock-disabled",_t="data-no-focus-lock",Rt="data-autofocus-inside";function Ot(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}var Ct=b(require("react"));function Pt(t,e){var r=Ct.useState(function(){return{value:t,callback:e,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=e,r.facade}function se(t,e){return Pt(e,function(r){return t.forEach(function(n){return Ot(n,r)})})}var W=b(require("react")),ho=b(Z()),j={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ft=function(e){var r=e.children;return W.createElement(W.Fragment,null,W.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:j}),r,r&&W.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:j}))};Ft.propTypes={};Ft.defaultProps={children:null};var M=function(){return M=Object.assign||function(e){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)&&(e[a]=r[a])}return e},M.apply(this,arguments)};function Nt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function Tt(t){return t}function Dt(t,e){e===void 0&&(e=Tt);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]:t},useMedium:function(a){var i=e(a,n);return r.push(i),function(){r=r.filter(function(u){return u!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(u){return a(u)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var u=r;r=[],u.forEach(a),i=r}var c=function(){var f=i;i=[],f.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),r}}}};return o}function fe(t,e){return e===void 0&&(e=Tt),Dt(t,e)}function de(t){t===void 0&&(t={});var e=Dt(null);return e.options=M({async:!0,ssr:!1},t),e}var It=b(require("react")),kt=function(t){var e=t.sideCar,r=Nt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return It.createElement(n,M({},r))};kt.isSideCarExport=!0;function At(t,e){return t.useMedium(e),kt}var pe=fe({},function(t){var e=t.target,r=t.currentTarget;return{target:e,currentTarget:r}}),me=fe(),Lt=fe(),Bt=de({async:!0});var Yr=[],Te=y.forwardRef(function(t,e){var r,n=y.useState(),o=n[0],a=n[1],i=y.useRef(),u=y.useRef(!1),c=y.useRef(null),l=t.children,f=t.disabled,p=t.noFocusGuards,d=t.persistentFocus,v=t.crossFrame,h=t.autoFocus,s=t.allowTextSelection,m=t.group,E=t.className,x=t.whiteList,_=t.shards,C=_===void 0?Yr:_,S=t.as,B=S===void 0?"div":S,N=t.lockProps,R=N===void 0?{}:N,ne=t.sideCar,oe=t.returnFocus,Pe=t.onActivation,Fe=t.onDeactivation,Sr=y.useState({}),Er=Sr[0],_r=y.useCallback(function(){c.current=c.current||document&&document.activeElement,i.current&&Pe&&Pe(i.current),u.current=!0},[Pe]),Rr=y.useCallback(function(){u.current=!1,Fe&&Fe(i.current)},[Fe]),Or=y.useCallback(function(I){var ae=c.current;if(Boolean(oe)&&ae&&ae.focus){var nt=typeof oe=="object"?oe:void 0;c.current=null,I?Promise.resolve().then(function(){return ae.focus(nt)}):ae.focus(nt)}},[oe]),Cr=y.useCallback(function(I){u.current&&pe.useMedium(I)},[]),Pr=me.useMedium,Fr=y.useCallback(function(I){i.current!==I&&(i.current=I,a(I))},[]),Nr=T((r={},r[le]=f&&"disabled",r[X]=m,r),R),rt=p!==!0,Tr=rt&&p!=="tail",Dr=se([e,Fr]);return y.createElement(y.Fragment,null,rt&&[y.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:j}),y.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:j})],!f&&y.createElement(ne,{id:Er,sideCar:Bt,observed:o,disabled:f,persistentFocus:d,crossFrame:v,autoFocus:h,whiteList:x,shards:C,onActivation:_r,onDeactivation:Rr,returnFocus:Or}),y.createElement(B,T({ref:Dr},Nr,{className:E,onBlur:Pr,onFocus:Cr}),l),Tr&&y.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:j}))});Te.propTypes={};Te.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 De=Te;var zt=b(require("react")),Ca=b(Z());function Ie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ke(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ve=b(require("react"));function Zr(t,e){function r(n){return n.displayName||n.name||"Component"}return function(o){var a=[],i;function u(){i=t(a.map(function(l){return l.props})),e(i)}var c=function(l){Ie(f,l);function f(){return l.apply(this,arguments)||this}f.peek=function(){return i};var p=f.prototype;return p.componentDidMount=function(){a.push(this),u()},p.componentDidUpdate=function(){u()},p.componentWillUnmount=function(){var v=a.indexOf(this);a.splice(v,1),u()},p.render=function(){return ve.default.createElement(o,this.props)},f}(ve.PureComponent);return ke(c,"displayName","SideEffect("+r(o)+")"),c}}var Wt=Zr;var F=function(e){for(var r=Array(e.length),n=0;n<e.length;++n)r[n]=e[n];return r},jt=function(e,r){return e.filter(function(n){return n===r})[0]},K=function(e){return Array.isArray(e)?e:[e]};var Xr=function(e,r){var n=e.tabIndex-r.tabIndex,o=e.index-r.index;if(n){if(!e.tabIndex)return 1;if(!r.tabIndex)return-1}return n||o},Ae=function(e,r,n){return F(e).map(function(o,a){return{node:o,index:a,tabIndex:n&&o.tabIndex===-1?(o.dataset||{}).focusGuard?0:-1:o.tabIndex}}).filter(function(o){return!r||o.tabIndex>=0}).sort(Xr)};var Le=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"];var Mt=Le.join(","),Kr=Mt+", [data-focus-guard]",he=function(e,r){return e.reduce(function(n,o){return n.concat(F(o.querySelectorAll(r?Kr:Mt)),o.parentNode?F(o.parentNode.querySelectorAll(Le.join(","))).filter(function(a){return a===o}):[])},[])},Vt=function(e){var r=e.querySelectorAll("["+Rt+"]");return F(r).map(function(n){return he([n])}).reduce(function(n,o){return n.concat(o)},[])};var zr=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},Qr=function t(e){return!e||e===document||e.nodeType===Node.DOCUMENT_NODE||!zr(window.getComputedStyle(e,null))&&t(e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},Jr=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},Gt=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r.push(e),e.parentNode&&t(e.parentNode,r),r},ye=function(e,r){for(var n=Gt(e),o=Gt(r),a=0;a<n.length;a+=1){var i=n[a];if(o.indexOf(i)>=0)return i}return!1},Be=function(e){return F(e).filter(function(r){return Qr(r)}).filter(function(r){return Jr(r)})},ge=function(e,r){return Ae(Be(he(e,r)),!0,r)},We=function(e){return Ae(Be(he(e)),!1)},Ut=function(e){return Be(Vt(e))};var Ht=function(e){return e.tagName==="INPUT"&&e.type==="radio"},en=function(e,r){return r.filter(Ht).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},be=function(e,r){return Ht(e)&&e.name?en(e,r):e},qt=function(e){var r=new Set;return e.forEach(function(n){return r.add(be(n,e))}),e.filter(function(n){return r.has(n)})};var tn=function(e){return e[0]&&e.length>1?be(e[0],e):e[0]},je=function(e,r){return e.length>1?e.indexOf(be(e[r],e)):r},Me=tn;var rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nn=function t(e){for(var r=e.length,n=0;n<r;n+=1)for(var o=function(c){if(n!==c&&e[n].contains(e[c]))return{v:t(e.filter(function(l){return l!==e[c]}))}},a=0;a<r;a+=1){var i=o(a);if((typeof i=="undefined"?"undefined":rn(i))==="object")return i.v}return e},on=function t(e){return e.parentNode?t(e.parentNode):e},an=function(e){var r=K(e);return r.filter(Boolean).reduce(function(n,o){var a=o.getAttribute(X);return n.push.apply(n,a?nn(F(on(o).querySelectorAll("["+X+'="'+a+'"]:not(['+le+'="disabled"])'))):[o]),n},[])},z=an;var un=function(e){return function(r){return!!r.autofocus||r.dataset&&!!r.dataset.autofocus||e.indexOf(r)>=0}},Ve=function(e){return e&&e.dataset&&e.dataset.focusGuard},we=function(e){return!Ve(e)},cn="NEW_FOCUS",ln=function(e,r,n,o){var a=e.length,i=e[0],u=e[a-1],c=Ve(n);if(!(e.indexOf(n)>=0)){var l=r.indexOf(n),f=r.indexOf(o||l),p=e.indexOf(o),d=l-f,v=r.indexOf(i),h=r.indexOf(u),s=qt(r),m=s.indexOf(n)-s.indexOf(o||l),E=je(e,0),x=je(e,a-1);if(l===-1||p===-1)return cn;if(!d&&p>=0)return p;if(l<=v&&c&&Math.abs(d)>1)return x;if(l>=h&&c&&Math.abs(d)>1)return E;if(d&&Math.abs(m)>1)return p;if(l<=v)return x;if(l>h)return E;if(d)return Math.abs(d)>1?p:(a+p+d)%a}},$t=function(e,r,n){var o=K(e),a=K(r),i=o[0],u=null;return a.filter(Boolean).forEach(function(c){u=ye(u||c,c)||u,n.filter(Boolean).forEach(function(l){var f=ye(i,l);f&&(!u||f.contains(u)?u=f:u=ye(f,u))})}),u},sn=function(e){return e.reduce(function(r,n){return r.concat(Ut(n))},[])},fn=function(e,r){var n=new Map;return r.forEach(function(o){return n.set(o.node,o)}),e.map(function(o){return n.get(o)}).filter(Boolean)},Yt=function(e){var r=z(e).filter(we),n=$t(e,e,r),o=ge([n],!0),a=ge(r).filter(function(i){var u=i.node;return we(u)}).map(function(i){var u=i.node;return u});return o.map(function(i){var u=i.node,c=i.index;return{node:u,index:c,lockItem:a.indexOf(u)>=0,guard:Ve(u)}})},dn=function(e,r){var n=document&&document.activeElement,o=z(e).filter(we),a=$t(n||e,e,o),i=We(o),u=ge(o).filter(function(v){var h=v.node;return we(h)});if(!(!u[0]&&(u=i,!u[0]))){var c=We([a]).map(function(v){var h=v.node;return h}),l=fn(c,u),f=l.map(function(v){var h=v.node;return h}),p=ln(f,c,n,r);if(p==="NEW_FOCUS"){var d=i.map(function(v){var h=v.node;return h}).filter(un(sn(o)));return{node:d&&d.length?Me(d):Me(f)}}return p===void 0?p:l[p]}},Zt=dn;var pn=function(e){return e===document.activeElement},mn=function(e){return!!jt(F(e.querySelectorAll("iframe")),pn)},vn=function(e){var r=document&&document.activeElement;return!r||r.dataset&&r.dataset.focusGuard?!1:z(e).reduce(function(n,o){return n||o.contains(r)||mn(o)},!1)},Ge=vn;var hn=function(){return document&&F(document.querySelectorAll("["+_t+"]")).some(function(e){return e.contains(document.activeElement)})},Xt=hn;var yn=function(e){e.focus(),e.contentWindow&&e.contentWindow.focus()},Ue=0,He=!1,Kt=function(t,e){var r=Zt(t,e);if(!He&&r){if(Ue>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),He=!0,setTimeout(function(){He=!1},1);return}Ue++,yn(r.node),Ue--}};var qe=Kt;function $e(t){var e=window,r=e.setImmediate;typeof r!="undefined"?r(t):setTimeout(t,1)}var gn=function(){return document&&document.activeElement===document.body},bn=function(){return gn()||Xt()},V=null,G=null,U=null,Q=!1,wn=function(){return!0},xn=function(e){return(V.whiteList||wn)(e)},Sn=function(e,r){U={observerNode:e,portaledElement:r}},En=function(e){return U&&U.portaledElement===e};function Qt(t,e,r,n){var o=null,a=t;do{var i=n[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(a!==t)return;o=null}else break}while((a+=r)!==e);o&&(o.node.tabIndex=0)}var _n=function(e){return e&&"current"in e?e.current:e},Rn=function(e){return e?Boolean(Q):Q==="meanwhile"},xe=function(){var e=!1;if(V){var r=V,n=r.observed,o=r.persistentFocus,a=r.autoFocus,i=r.shards,u=r.crossFrame,c=n||U&&U.portaledElement,l=document&&document.activeElement;if(c){var f=[c].concat(i.map(_n).filter(Boolean));if((!l||xn(l))&&(o||Rn(u)||!bn()||!G&&a)&&(c&&!(Ge(f)||En(l,c))&&(document&&!G&&l&&!a?(l.blur&&l.blur(),document.body.focus()):(e=qe(f,G),U={})),Q=!1,G=document&&document.activeElement),document){var p=document&&document.activeElement,d=Yt(f),v=d.map(function(h){var s=h.node;return s}).indexOf(p);v>-1&&(d.filter(function(h){var s=h.guard,m=h.node;return s&&m.dataset.focusAutoGuard}).forEach(function(h){var s=h.node;return s.removeAttribute("tabIndex")}),Qt(v,d.length,1,d),Qt(v,-1,-1,d))}}}return e},Jt=function(e){xe()&&e&&(e.stopPropagation(),e.preventDefault())},Se=function(){return $e(xe)},er=function(e){var r=e.target,n=e.currentTarget;n.contains(r)||Sn(n,r)},On=function(){return null},Cn=function(e){var r=e.children;return zt.createElement("div",{onBlur:Se,onFocus:er},r)};Cn.propTypes={};var tr=function(){Q="just",setTimeout(function(){Q="meanwhile"},0)},Pn=function(){document.addEventListener("focusin",Jt,!0),document.addEventListener("focusout",Se),window.addEventListener("blur",tr)},Fn=function(){document.removeEventListener("focusin",Jt,!0),document.removeEventListener("focusout",Se),window.removeEventListener("blur",tr)};function Nn(t){return t.filter(function(e){var r=e.disabled;return!r})}function Tn(t){var e=t.slice(-1)[0];e&&!V&&Pn();var r=V,n=r&&e&&e.id===r.id;V=e,r&&!n&&(r.onDeactivation(),t.filter(function(o){var a=o.id;return a===r.id}).length||r.returnFocus(!e)),e?(G=null,(!n||r.observed!==e.observed)&&e.onActivation(),xe(!0),$e(xe)):(Fn(),G=null)}pe.assignSyncMedium(er);me.assignMedium(Se);Lt.assignMedium(function(t){return t({moveFocusInside:qe,focusInside:Ge})});var rr=Wt(Nn,Tn)(On);var nr=Ee.forwardRef(function(t,e){return Ee.createElement(De,T({sideCar:rr,ref:e},t))}),or=De.propTypes||{},Wa=or.sideCar,Dn=Ne(or,["sideCar"]);nr.propTypes=Dn;var ar=nr;var ir=ar;var D=function(){return D=Object.assign||function(e){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)&&(e[a]=r[a])}return e},D.apply(this,arguments)};function ur(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}var Ce=b(require("react"));var O=b(require("react"));var k="right-scroll-bar-position",A="width-before-scroll-bar",Ye="with-scroll-bars-hidden";var _e=de();var Ze=function(){},J=O.forwardRef(function(t,e){var r=O.useRef(null),n=O.useState({onScrollCapture:Ze,onWheelCapture:Ze,onTouchMoveCapture:Ze}),o=n[0],a=n[1],i=t.forwardProps,u=t.children,c=t.className,l=t.removeScrollBar,f=t.enabled,p=t.shards,d=t.sideCar,v=t.noIsolation,h=t.inert,s=t.allowPinchZoom,m=t.as,E=m===void 0?"div":m,x=ur(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=d,C=se([r,e]),S=D({},x,o);return O.createElement(O.Fragment,null,f&&O.createElement(_,{sideCar:_e,removeScrollBar:l,shards:p,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!s,lockRef:r}),i?O.cloneElement(O.Children.only(u),D({},S,{ref:C})):O.createElement(E,D({},S,{className:c,ref:C}),u))});J.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};J.classNames={fullWidth:A,zeroRight:k};var g=b(require("react"));var H=b(require("react"));var sr=b(require("react"));var cr;var lr=function(){if(cr)return cr;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function In(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=lr();return e&&t.setAttribute("nonce",e),t}function kn(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function An(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Xe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=In())&&(kn(e,r),An(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Ke=function(){var t=Xe();return function(e){sr.useEffect(function(){return t.add(e),function(){t.remove()}},[])}};var ee=function(){var t=Ke(),e=function(r){var n=r.styles;return t(n),null};return e};var Ln={left:0,top:0,right:0,gap:0},ze=function(t){return parseInt(t||"",10)||0},Bn=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[ze(r),ze(n),ze(o)]},Re=function(t){if(t===void 0&&(t="margin"),typeof window=="undefined")return Ln;var e=Bn(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}};var Wn=ee(),jn=function(t,e,r,n){var o=t.left,a=t.top,i=t.right,u=t.gap;return r===void 0&&(r="margin"),` | ||
.`+Ye+` { | ||
var Mr=Object.create,se=Object.defineProperty,Wr=Object.getPrototypeOf,Ur=Object.prototype.hasOwnProperty,Gr=Object.getOwnPropertyNames,Vr=Object.getOwnPropertyDescriptor;var dt=e=>se(e,"__esModule",{value:!0});var ke=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),Hr=(e,t)=>{dt(e);for(var r in t)se(e,r,{get:t[r],enumerable:!0})},$r=(e,t,r)=>{if(dt(e),t&&typeof t=="object"||typeof t=="function")for(let n of Gr(t))!Ur.call(e,n)&&n!=="default"&&se(e,n,{get:()=>t[n],enumerable:!(r=Vr(t,n))||r.enumerable});return e},g=e=>e&&e.__esModule?e:$r(se(e!=null?Mr(Wr(e)):{},"default",{value:e,enumerable:!0}),e);var Et=ke((so,St)=>{"use strict";var Xr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";St.exports=Xr});var Pt=ke((fo,Ot)=>{"use strict";var Kr=Et();function Rt(){}function Ct(){}Ct.resetWarningCache=Rt;Ot.exports=function(){function e(n,o,i,a,u,c){if(c!==Kr){var s=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 s.name="Invariant Violation",s}}e.isRequired=e;function t(){return e}var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ct,resetWarningCache:Rt};return r.PropTypes=r,r}});var z=ke((vo,Nt)=>{Nt.exports=Pt()();var po,mo});Hr(exports,{ModalDialogPrimitiveContent:()=>Gn,ModalDialogPrimitiveOverlay:()=>Wn});var w=g(require("react"));var X=g(require("react"));var de=g(require("react"));function fe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var pt=fe()?de.useLayoutEffect:de.useEffect;var pe=g(require("react"));function mt(){var e=pe.useState(Object.create(null)),t=e[1];return pe.useCallback(function(){t(Object.create(null))},[])}var vt=g(require("react-dom")),ht=function(t){var r=t.children,n=t.type,o=n===void 0?"reach-portal":n,i=X.useRef(null),a=X.useRef(null),u=mt();return pt(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?vt.createPortal(r,a.current):X.createElement("span",{ref:i})};function yt(e){return fe()?e?e.ownerDocument:document:null}function bt(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function Ie(){}var ro=g(require("react"));function gt(e){if(!1)var t}var wt=g(require("react"));function xt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qr(e,t){if(!!e){if(typeof e=="string")return xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xt(e,t)}}function Yr(e,t){var r;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=qr(e))||t&&e&&typeof e.length=="number"){r&&(e=r);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 r=e[Symbol.iterator](),r.next.bind(r)}function Zr(e,t){if(e!=null)if(bt(e))e(t);else try{e.current=t}catch(r){throw new Error('Cannot assign value "'+t+'" to ref "'+e+'"')}}function _t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return wt.useCallback(function(n){for(var o=Yr(t),i;!(i=o()).done;){var a=i.value;Zr(a,n)}},t)}function K(e,t){return function(r){if(e&&e(r),!r.defaultPrevented)return t(r)}}function Ae(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}var Re=g(require("react"));var y=g(require("react")),Io=g(z());var Q="data-focus-lock",me="data-focus-lock-disabled",Ft="data-no-focus-lock",Tt="data-autofocus-inside";function Dt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var kt=g(require("react"));function It(e,t){var r=kt.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 ve(e,t){return It(t,function(r){return e.forEach(function(n){return Dt(n,r)})})}var M=g(require("react")),So=g(z()),W={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},At=function(t){var r=t.children;return M.createElement(M.Fragment,null,M.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:W}),r,r&&M.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:W}))};At.propTypes={};At.defaultProps={children:null};var U=function(){return U=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},U.apply(this,arguments)};function Lt(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 Bt(e){return e}function jt(e,t){t===void 0&&(t=Bt);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(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(u){return u!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(u){return i(u)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var u=r;r=[],u.forEach(i),a=r}var c=function(){var f=a;a=[],f.forEach(i)},s=function(){return Promise.resolve().then(c)};s(),r={push:function(f){a.push(f),s()},filter:function(f){return a=a.filter(f),r}}}};return o}function he(e,t){return t===void 0&&(t=Bt),jt(e,t)}function ye(e){e===void 0&&(e={});var t=jt(null);return t.options=U({async:!0,ssr:!1},e),t}var Mt=g(require("react")),Wt=function(e){var t=e.sideCar,r=Lt(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 Mt.createElement(n,U({},r))};Wt.isSideCarExport=!0;function Ut(e,t){return e.useMedium(t),Wt}var be=he({},function(e){var t=e.target,r=e.currentTarget;return{target:t,currentTarget:r}}),ge=he(),Gt=he(),Vt=ye({async:!0});var zr=[],Le=y.forwardRef(function(t,r){var n,o=y.useState(),i=o[0],a=o[1],u=y.useRef(),c=y.useRef(!1),s=y.useRef(null),f=t.children,d=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,h=t.crossFrame,l=t.autoFocus,p=t.allowTextSelection,O=t.group,R=t.className,S=t.whiteList,_=t.shards,x=_===void 0?zr:_,k=t.as,F=k===void 0?"div":k,N=t.lockProps,j=N===void 0?{}:N,P=t.sideCar,ce=t.returnFocus,Te=t.onActivation,De=t.onDeactivation,Pr=y.useState({}),Nr=Pr[0],Fr=y.useCallback(function(){s.current=s.current||document&&document.activeElement,u.current&&Te&&Te(u.current),c.current=!0},[Te]),Tr=y.useCallback(function(){c.current=!1,De&&De(u.current)},[De]),Dr=y.useCallback(function(I){var le=s.current;if(Boolean(ce)&&le&&le.focus){var ft=typeof ce=="object"?ce:void 0;s.current=null,I?Promise.resolve().then(function(){return le.focus(ft)}):le.focus(ft)}},[ce]),kr=y.useCallback(function(I){c.current&&be.useMedium(I)},[]),Ir=ge.useMedium,Ar=y.useCallback(function(I){u.current!==I&&(u.current=I,a(I))},[]),Lr=T((n={},n[me]=d&&"disabled",n[Q]=O,n),j),st=m!==!0,Br=st&&m!=="tail",jr=ve([r,Ar]);return y.createElement(y.Fragment,null,st&&[y.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:d?-1:0,style:W}),y.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:d?-1:1,style:W})],!d&&y.createElement(P,{id:Nr,sideCar:Vt,observed:i,disabled:d,persistentFocus:v,crossFrame:h,autoFocus:l,whiteList:S,shards:x,onActivation:Fr,onDeactivation:Tr,returnFocus:Dr}),y.createElement(F,T({ref:jr},Lr,{className:R,onBlur:Ir,onFocus:kr}),f),Br&&y.createElement("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:W}))});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 Be=Le;var ar=g(require("react")),Xa=g(z());function je(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var we=g(require("react"));function Qr(e,t){function r(n){return n.displayName||n.name||"Component"}return function(o){var i=[],a;function u(){a=e(i.map(function(s){return s.props})),t(a)}var c=function(s){je(f,s);function f(){return s.apply(this,arguments)||this}f.peek=function(){return a};var d=f.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 we.default.createElement(o,this.props)},f}(we.PureComponent);return Me(c,"displayName","SideEffect("+r(o)+")"),c}}var Ht=Qr;var C=function(e){for(var t=Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t},J=function(e){return Array.isArray(e)?e:[e]};var Jr=function(e){for(var t=new Set,r=e.length,n=0;n<r;n+=1)for(var o=n+1;o<r;o+=1){var i=e[n].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter(function(a,u){return!t.has(u)})},$t=function(e){return e.parentNode?$t(e.parentNode):e},G=function(e){var t=J(e);return t.filter(Boolean).reduce(function(r,n){var o=n.getAttribute(Q);return r.push.apply(r,o?Jr(C($t(n).querySelectorAll("["+Q+'="'+o+'"]:not(['+me+'="disabled"])'))):[n]),r},[])};var en=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},tn=function(e,t){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!en(window.getComputedStyle(e,null))&&t(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},We=function(e,t){var r=e.get(t);if(r!==void 0)return r;var n=tn(t,We.bind(void 0,e));return e.set(t,n),n},qt=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},ee=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},V=function(e){return!ee(e)},Yt=function(e){return Boolean(e)};var rn=function(e,t){var r=e.tabIndex-t.tabIndex,n=e.index-t.index;if(r){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return r||n},Ue=function(e,t,r){return C(e).map(function(n,o){return{node:n,index:o,tabIndex:r&&n.tabIndex===-1?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}}).filter(function(n){return!t||n.tabIndex>=0}).sort(rn)};var Zt=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"];var Ge=Zt.join(","),nn=Ge+", [data-focus-guard]",xe=function(e,t){return e.reduce(function(r,n){return r.concat(C(n.querySelectorAll(t?nn:Ge)),n.parentNode?C(n.parentNode.querySelectorAll(Ge)).filter(function(o){return o===n}):[])},[])},Xt=function(e){var t=e.querySelectorAll("["+Tt+"]");return C(t).map(function(r){return xe([r])}).reduce(function(r,n){return r.concat(n)},[])};var Ve=function(e,t){return C(e).filter(function(r){return We(t,r)}).filter(function(r){return qt(r)})},te=function(e,t,r){return Ue(Ve(xe(e,r),t),!0,r)},He=function(e,t){return Ue(Ve(xe(e),t),!1)},Kt=function(e,t){return Ve(Xt(e),t)};var $e=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&$e(e.parentNode,t),t},qe=function(e,t){for(var r=$e(e),n=$e(t),o=0;o<r.length;o+=1){var i=r[o];if(n.indexOf(i)>=0)return i}return!1},_e=function(e,t,r){var n=J(e),o=J(t),i=n[0],a=!1;return o.filter(Boolean).forEach(function(u){a=qe(a||u,u)||a,r.filter(Boolean).forEach(function(c){var s=qe(i,c);s&&(!a||s.contains(a)?a=s:a=qe(s,a))})}),a},zt=function(e,t){return e.reduce(function(r,n){return r.concat(Kt(n,t))},[])};var Qt=function(e){var t=G(e).filter(V),r=_e(e,e,t),n=new Map,o=te([r],n,!0),i=te(t,n).filter(function(a){var u=a.node;return V(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:ee(u)}})};var on=function(e){return e===document.activeElement},an=function(e){return Boolean(C(e.querySelectorAll("iframe")).some(function(t){return on(t)}))},Ye=function(e){var t=document&&document.activeElement;return!t||t.dataset&&t.dataset.focusGuard?!1:G(e).reduce(function(r,n){return r||n.contains(t)||an(n)},!1)};var Jt=function(){return document&&C(document.querySelectorAll("["+Ft+"]")).some(function(e){return e.contains(document.activeElement)})};var er=function(e){return e.tagName==="INPUT"&&e.type==="radio"},un=function(e,t){return t.filter(er).filter(function(r){return r.name===e.name}).filter(function(r){return r.checked})[0]||e},Se=function(e,t){return er(e)&&e.name?un(e,t):e},tr=function(e){var t=new Set;return e.forEach(function(r){return t.add(Se(r,e))}),e.filter(function(r){return t.has(r)})};var Ze=function(e){return e[0]&&e.length>1?Se(e[0],e):e[0]},Xe=function(e,t){return e.length>1?e.indexOf(Se(e[t],e)):t};var Ke="NEW_FOCUS",rr=function(e,t,r,n){var o=e.length,i=e[0],a=e[o-1],u=ee(r);if(!(e.indexOf(r)>=0)){var c=t.indexOf(r),s=n?t.indexOf(n):c,f=n?e.indexOf(n):-1,d=c-s,m=t.indexOf(i),v=t.indexOf(a),h=tr(t),l=h.indexOf(r)-(n?h.indexOf(n):c),p=Xe(e,0),O=Xe(e,o-1);if(c===-1||f===-1)return Ke;if(!d&&f>=0)return f;if(c<=m&&u&&Math.abs(d)>1)return O;if(c>=v&&u&&Math.abs(d)>1)return p;if(d&&Math.abs(l)>1)return f;if(c<=m)return O;if(c>v)return p;if(d)return Math.abs(d)>1?f:(o+f+d)%o}};var cn=function(e){return function(t){return t.autofocus||t.dataset&&!!t.dataset.autofocus||e.indexOf(t)>=0}},ln=function(e,t){var r=new Map;return t.forEach(function(n){return r.set(n.node,n)}),e.map(function(n){return r.get(n)}).filter(Yt)},nr=function(e,t){var r=document&&document.activeElement,n=G(e).filter(V),o=_e(r||e,e,n),i=new Map,a=He(n,i),u=te(n,i).filter(function(v){var h=v.node;return V(h)});if(!(!u[0]&&(u=a,!u[0]))){var c=He([o],i).map(function(v){var h=v.node;return h}),s=ln(c,u),f=s.map(function(v){var h=v.node;return h}),d=rr(f,c,r,t);if(d===Ke){var m=a.map(function(v){var h=v.node;return h}).filter(cn(zt(n,i)));return{node:m&&m.length?Ze(m):Ze(f)}}return d===void 0?d:s[d]}};var sn=function(e){e.focus(),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},ze=0,Qe=!1,or=function(e,t){var r=nr(e,t);if(!Qe&&r){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"),Qe=!0,setTimeout(function(){Qe=!1},1);return}ze++,sn(r.node),ze--}};var Je=or;function et(e){var t=window,r=t.setImmediate;typeof r!="undefined"?r(e):setTimeout(e,1)}var fn=function(){return document&&document.activeElement===document.body},dn=function(){return fn()||Jt()},H=null,$=null,q=null,re=!1,pn=function(){return!0},mn=function(t){return(H.whiteList||pn)(t)},vn=function(t,r){q={observerNode:t,portaledElement:r}},hn=function(t){return q&&q.portaledElement===t};function ir(e,t,r,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+=r)!==t);o&&(o.node.tabIndex=0)}var yn=function(t){return t&&"current"in t?t.current:t},bn=function(t){return t?Boolean(re):re==="meanwhile"},Ee=function(){var t=!1;if(H){var r=H,n=r.observed,o=r.persistentFocus,i=r.autoFocus,a=r.shards,u=r.crossFrame,c=n||q&&q.portaledElement,s=document&&document.activeElement;if(c){var f=[c].concat(a.map(yn).filter(Boolean));if((!s||mn(s))&&(o||bn(u)||!dn()||!$&&i)&&(c&&!(Ye(f)||hn(s,c))&&(document&&!$&&s&&!i?(s.blur&&s.blur(),document.body.focus()):(t=Je(f,$),q={})),re=!1,$=document&&document.activeElement),document){var d=document&&document.activeElement,m=Qt(f),v=m.map(function(h){var l=h.node;return l}).indexOf(d);v>-1&&(m.filter(function(h){var l=h.guard,p=h.node;return l&&p.dataset.focusAutoGuard}).forEach(function(h){var l=h.node;return l.removeAttribute("tabIndex")}),ir(v,m.length,1,m),ir(v,-1,-1,m))}}}return t},ur=function(t){Ee()&&t&&(t.stopPropagation(),t.preventDefault())},Oe=function(){return et(Ee)},cr=function(t){var r=t.target,n=t.currentTarget;n.contains(r)||vn(n,r)},gn=function(){return null},wn=function(t){var r=t.children;return ar.createElement("div",{onBlur:Oe,onFocus:cr},r)};wn.propTypes={};var lr=function(){re="just",setTimeout(function(){re="meanwhile"},0)},xn=function(){document.addEventListener("focusin",ur,!0),document.addEventListener("focusout",Oe),window.addEventListener("blur",lr)},_n=function(){document.removeEventListener("focusin",ur,!0),document.removeEventListener("focusout",Oe),window.removeEventListener("blur",lr)};function Sn(e){return e.filter(function(t){var r=t.disabled;return!r})}function En(e){var t=e.slice(-1)[0];t&&!H&&xn();var r=H,n=r&&t&&t.id===r.id;H=t,r&&!n&&(r.onDeactivation(),e.filter(function(o){var i=o.id;return i===r.id}).length||r.returnFocus(!t)),t?($=null,(!n||r.observed!==t.observed)&&t.onActivation(),Ee(!0),et(Ee)):(_n(),$=null)}be.assignSyncMedium(cr);ge.assignMedium(Oe);Gt.assignMedium(function(e){return e({moveFocusInside:Je,focusInside:Ye})});var sr=Ht(Sn,En)(gn);var fr=Re.forwardRef(function(t,r){return Re.createElement(Be,T({sideCar:sr,ref:r},t))}),dr=Be.propTypes||{},ii=dr.sideCar,ui=Ae(dr,["sideCar"]);fr.propTypes={};var pr=fr;var mr=pr;var D=function(){return D=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},D.apply(this,arguments)};function vr(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}var Fe=g(require("react"));var E=g(require("react"));var A="right-scroll-bar-position",L="width-before-scroll-bar",tt="with-scroll-bars-hidden";var Ce=ye();var rt=function(){},ne=E.forwardRef(function(e,t){var r=E.useRef(null),n=E.useState({onScrollCapture:rt,onWheelCapture:rt,onTouchMoveCapture:rt}),o=n[0],i=n[1],a=e.forwardProps,u=e.children,c=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,h=e.inert,l=e.allowPinchZoom,p=e.as,O=p===void 0?"div":p,R=vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=m,_=ve([r,t]),x=D({},R,o);return E.createElement(E.Fragment,null,f&&E.createElement(S,{sideCar:Ce,removeScrollBar:s,shards:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!l,lockRef:r}),a?E.cloneElement(E.Children.only(u),D({},x,{ref:_})):E.createElement(O,D({},x,{className:c,ref:_}),u))});ne.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ne.classNames={fullWidth:L,zeroRight:A};var b=g(require("react"));var Y=g(require("react"));var br=g(require("react"));var hr;var yr=function(){if(hr)return hr;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function On(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yr();return t&&e.setAttribute("nonce",t),e}function Rn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cn(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nt=function(){var e=0,t=null;return{add:function(r){e==0&&(t=On())&&(Rn(t,r),Cn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var ot=function(){var e=nt();return function(t){br.useEffect(function(){return e.add(t),function(){e.remove()}},[])}};var oe=function(){var e=ot(),t=function(r){var n=r.styles;return e(n),null};return t};var Pn={left:0,top:0,right:0,gap:0},at=function(e){return parseInt(e||"",10)||0},Nn=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[at(r),at(n),at(o)]},Pe=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Pn;var t=Nn(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])}};var Fn=oe(),Tn=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,u=e.gap;return r===void 0&&(r="margin"),` | ||
.`+tt+` { | ||
overflow: hidden `+n+`; | ||
@@ -8,6 +9,6 @@ padding-right: `+u+"px "+n+`; | ||
overflow: hidden `+n+`; | ||
`+[e&&"position: relative "+n+";",r==="margin"&&` | ||
`+[t&&"position: relative "+n+";",r==="margin"&&` | ||
padding-left: `+o+`px; | ||
padding-top: `+a+`px; | ||
padding-right: `+i+`px; | ||
padding-top: `+i+`px; | ||
padding-right: `+a+`px; | ||
margin-left:0; | ||
@@ -19,21 +20,21 @@ margin-top:0; | ||
.`+k+` { | ||
.`+A+` { | ||
right: `+u+"px "+n+`; | ||
} | ||
.`+A+` { | ||
.`+L+` { | ||
margin-right: `+u+"px "+n+`; | ||
} | ||
.`+k+" ."+k+` { | ||
.`+A+" ."+A+` { | ||
right: 0 `+n+`; | ||
} | ||
.`+A+" ."+A+` { | ||
.`+L+" ."+L+` { | ||
margin-right: 0 `+n+`; | ||
} | ||
`},Qe=function(t){var e=H.useState(Re(t.gapMode)),r=e[0],n=e[1];H.useEffect(function(){n(Re(t.gapMode))},[t.gapMode]);var o=t.noRelative,a=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;return H.createElement(Wn,{styles:jn(r,!o,u,a?"":"!important")})};var Mn=function(t){var e=window.getComputedStyle(t);return e.overflowY!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowY==="visible")},Vn=function(t){var e=window.getComputedStyle(t);return e.overflowX!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowX==="visible")},Je=function(t,e){var r=e;do{var n=fr(t,r);if(n){var o=dr(t,r),a=o[1],i=o[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Gn=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Un=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},fr=function(t,e){return t==="v"?Mn(e):Vn(e)},dr=function(t,e){return t==="v"?Gn(e):Un(e)},pr=function(t,e,r,n,o){var a=n,i=r.target,u=e.contains(i),c=!1,l=a>0,f=0,p=0;do{var d=dr(t,i),v=d[0],h=d[1],s=d[2],m=h-s-v;(v||m)&&fr(t,i)&&(f+=m,p+=v),i=i.parentNode}while(!u&&i!==document.body||u&&(e.contains(i)||e===i));return(l&&(o&&f===0||!o&&a>f)||!l&&(o&&p===0||!o&&-a>p))&&(c=!0),c};var et=!1;if(typeof window!="undefined")try{te=Object.defineProperty({},"passive",{get:function(){return et=!0,!0}}),window.addEventListener("test",te,te),window.removeEventListener("test",te,te)}catch(t){et=!1}var te,L=et?{passive:!1}:!1;var Oe=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},mr=function(t){return[t.deltaX,t.deltaY]},vr=function(t){return t&&"current"in t?t.current:t},Hn=function(t,e){return t[0]===e[0]&&t[1]===e[1]},qn=function(t){return` | ||
.block-interactivity-`+t+` {pointer-events: none;} | ||
.allow-interactivity-`+t+` {pointer-events: all;} | ||
`},$n=0,q=[];function hr(t){var e=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),o=g.useState($n++)[0],a=g.useState(function(){return ee()})[0],i=g.useRef(t);g.useEffect(function(){i.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-"+o);var s=[t.lockRef.current].concat((t.shards||[]).map(vr)).filter(Boolean);return s.forEach(function(m){return m.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),s.forEach(function(m){return m.classList.remove("allow-interactivity-"+o)})}}},[t.inert,t.lockRef.current,t.shards]);var u=g.useCallback(function(s,m){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var E=Oe(s),x=r.current,_="deltaX"in s?s.deltaX:x[0]-E[0],C="deltaY"in s?s.deltaY:x[1]-E[1],S,B=s.target,N=Math.abs(_)>Math.abs(C)?"h":"v",R=Je(N,B);if(!R)return!0;if(R?S=N:(S=N==="v"?"h":"v",R=Je(N,B)),!R)return!1;if(!n.current&&"changedTouches"in s&&(_||C)&&(n.current=S),!S)return!0;var ne=n.current||S;return pr(ne,m,s,ne==="h"?_:C,!0)},[]),c=g.useCallback(function(s){var m=s;if(!(!q.length||q[q.length-1]!==a)){var E="deltaY"in m?mr(m):Oe(m),x=e.current.filter(function(S){return S.name===m.type&&S.target===m.target&&Hn(S.delta,E)})[0];if(x&&x.should){m.preventDefault();return}if(!x){var _=(i.current.shards||[]).map(vr).filter(Boolean).filter(function(S){return S.contains(m.target)}),C=_.length>0?u(m,_[0]):!i.current.noIsolation;C&&m.preventDefault()}}},[]),l=g.useCallback(function(s,m,E,x){var _={name:s,delta:m,target:E,should:x};e.current.push(_),setTimeout(function(){e.current=e.current.filter(function(C){return C!==_})},1)},[]),f=g.useCallback(function(s){r.current=Oe(s),n.current=void 0},[]),p=g.useCallback(function(s){l(s.type,mr(s),s.target,u(s,t.lockRef.current))},[]),d=g.useCallback(function(s){l(s.type,Oe(s),s.target,u(s,t.lockRef.current))},[]);g.useEffect(function(){return q.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:d}),document.addEventListener("wheel",c,L),document.addEventListener("touchmove",c,L),document.addEventListener("touchstart",f,L),function(){q=q.filter(function(s){return s!==a}),document.removeEventListener("wheel",c,L),document.removeEventListener("touchmove",c,L),document.removeEventListener("touchstart",f,L)}},[]);var v=t.removeScrollBar,h=t.inert;return g.createElement(g.Fragment,null,h?g.createElement(a,{styles:qn(o)}):null,v?g.createElement(Qe,{gapMode:"margin"}):null)}var yr=At(_e,hr);var gr=Ce.forwardRef(function(t,e){return Ce.createElement(J,D({},t,{ref:e,sideCar:yr}))});gr.classNames=J.classNames;var br=gr;var re=b(Z());function tt(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}var Wi={allowPinchZoom:re.default.bool,dangerouslyBypassFocusLock:re.default.bool,dangerouslyBypassScrollLock:re.default.bool,initialFocusRef:function(){return null},onDismiss:re.default.func},wr=w.forwardRef(function(e,r){var n=e.isOpen,o=n===void 0?!0:n,a=tt(e,["isOpen"]);return w.useEffect(function(){return ft("dialog")},[]),w.useEffect(function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[o]),o?w.default.createElement(ht,{"data-reach-dialog-wrapper":""},w.default.createElement(Yn,Object.assign({ref:r},a))):null}),Yn=w.forwardRef(function(e,r){var n=e.allowPinchZoom,o=e.dangerouslyBypassFocusLock,a=o===void 0?!1:o,i=e.dangerouslyBypassScrollLock,u=i===void 0?!1:i,c=e.initialFocusRef,l=e.onClick,f=e.onDismiss,p=f===void 0?ce:f,d=e.onKeyDown,v=e.onMouseDown,h=e.unstable_lockFocusAcrossFrames,s=h===void 0?!0:h,m=tt(e,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),E=w.useRef(null),x=w.useRef(null),_=mt(x,r),C=w.useCallback(function(){c&&c.current&&c.current.focus()},[c]);function S(R){E.current===R.target&&(R.stopPropagation(),p(R))}function B(R){R.key==="Escape"&&(R.stopPropagation(),p(R))}function N(R){E.current=R.target}return w.useEffect(function(){return x.current?Zn(x.current):void 0},[]),w.default.createElement(ir,{autoFocus:!0,returnFocus:!0,onActivation:C,disabled:a,crossFrame:s},w.default.createElement(br,{allowPinchZoom:n,enabled:!u},w.default.createElement("div",Object.assign({},m,{ref:_,"data-reach-dialog-overlay":"",onClick:$(l,S),onKeyDown:$(d,B),onMouseDown:$(v,N)}))))}),xr=w.forwardRef(function(e,r){var n=e.onClick,o=e.onKeyDown,a=tt(e,["onClick","onKeyDown"]);return w.default.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:r,"data-reach-dialog-content":"",onClick:$(n,function(i){i.stopPropagation()})}))});function Zn(t){var e=[],r=[],n=dt(t)||document;return t?(Array.prototype.forEach.call(n.querySelectorAll("body > *"),function(o){var a,i,u=(a=t.parentNode)===null||a===void 0||(i=a.parentNode)===null||i===void 0?void 0:i.parentNode;if(o!==u){var c=o.getAttribute("aria-hidden"),l=c!==null&&c!=="false";l||(e.push(c),r.push(o),o.setAttribute("aria-hidden","true"))}}),function(){r.forEach(function(o,a){var i=e[a];i===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i)})}):ce} | ||
`},it=function(e){var t=Y.useState(Pe(e.gapMode)),r=t[0],n=t[1];Y.useEffect(function(){n(Pe(e.gapMode))},[e.gapMode]);var o=e.noRelative,i=e.noImportant,a=e.gapMode,u=a===void 0?"margin":a;return Y.createElement(Fn,{styles:Tn(r,!o,u,i?"":"!important")})};var Dn=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},kn=function(e){var t=window.getComputedStyle(e);return e.type==="range"?!0:t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},ut=function(e,t){var r=t;do{var n=gr(e,r);if(n){var o=wr(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},In=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},An=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},gr=function(e,t){return e==="v"?Dn(t):kn(t)},wr=function(e,t){return e==="v"?In(t):An(t)},xr=function(e,t,r,n,o){var i=n,a=r.target,u=t.contains(a),c=!1,s=i>0,f=0,d=0;do{var m=wr(e,a),v=m[0],h=m[1],l=m[2],p=h-l-v;(v||p)&&gr(e,a)&&(f+=p,d+=v),a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(s&&(o&&f===0||!o&&i>f)||!s&&(o&&d===0||!o&&-i>d))&&(c=!0),c};var ct=!1;if(typeof window!="undefined")try{ae=Object.defineProperty({},"passive",{get:function(){return ct=!0,!0}}),window.addEventListener("test",ae,ae),window.removeEventListener("test",ae,ae)}catch(e){ct=!1}var ae,B=ct?{passive:!1}:!1;var Ne=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_r=function(e){return[e.deltaX,e.deltaY]},Sr=function(e){return e&&"current"in e?e.current:e},Ln=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bn=function(e){return` | ||
.block-interactivity-`+e+` {pointer-events: none;} | ||
.allow-interactivity-`+e+` {pointer-events: all;} | ||
`},jn=0,Z=[];function Er(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),o=b.useState(jn++)[0],i=b.useState(function(){return oe()})[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var l=[e.lockRef.current].concat((e.shards||[]).map(Sr)).filter(Boolean);return l.forEach(function(p){return p.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),l.forEach(function(p){return p.classList.remove("allow-interactivity-"+o)})}}},[e.inert,e.lockRef.current,e.shards]);var u=b.useCallback(function(l,p){if("touches"in l&&l.touches.length===2)return!a.current.allowPinchZoom;var O=Ne(l),R=r.current,S="deltaX"in l?l.deltaX:R[0]-O[0],_="deltaY"in l?l.deltaY:R[1]-O[1],x,k=l.target,F=Math.abs(S)>Math.abs(_)?"h":"v",N=ut(F,k);if(!N)return!0;if(N?x=F:(x=F==="v"?"h":"v",N=ut(F,k)),!N)return!1;if(!n.current&&"changedTouches"in l&&(S||_)&&(n.current=x),!x)return!0;var j=n.current||x;return xr(j,p,l,j==="h"?S:_,!0)},[]),c=b.useCallback(function(l){var p=l;if(!(!Z.length||Z[Z.length-1]!==i)){var O="deltaY"in p?_r(p):Ne(p),R=t.current.filter(function(x){return x.name===p.type&&x.target===p.target&&Ln(x.delta,O)})[0];if(R&&R.should){p.preventDefault();return}if(!R){var S=(a.current.shards||[]).map(Sr).filter(Boolean).filter(function(x){return x.contains(p.target)}),_=S.length>0?u(p,S[0]):!a.current.noIsolation;_&&p.preventDefault()}}},[]),s=b.useCallback(function(l,p,O,R){var S={name:l,delta:p,target:O,should:R};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),f=b.useCallback(function(l){r.current=Ne(l),n.current=void 0},[]),d=b.useCallback(function(l){s(l.type,_r(l),l.target,u(l,e.lockRef.current))},[]),m=b.useCallback(function(l){s(l.type,Ne(l),l.target,u(l,e.lockRef.current))},[]);b.useEffect(function(){return Z.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,B),document.addEventListener("touchmove",c,B),document.addEventListener("touchstart",f,B),function(){Z=Z.filter(function(l){return l!==i}),document.removeEventListener("wheel",c,B),document.removeEventListener("touchmove",c,B),document.removeEventListener("touchstart",f,B)}},[]);var v=e.removeScrollBar,h=e.inert;return b.createElement(b.Fragment,null,h?b.createElement(i,{styles:Bn(o)}):null,v?b.createElement(it,{gapMode:"margin"}):null)}var Or=Ut(Ce,Er);var Rr=Fe.forwardRef(function(e,t){return Fe.createElement(ne,D({},e,{ref:t,sideCar:Or}))});Rr.classNames=ne.classNames;var Cr=Rr;var ie=g(z());function ue(){return ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ue.apply(this,arguments)}function lt(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var du={allowPinchZoom:ie.default.bool,dangerouslyBypassFocusLock:ie.default.bool,dangerouslyBypassScrollLock:ie.default.bool,initialFocusRef:function(){return null},onDismiss:ie.default.func},Wn=w.forwardRef(function(t,r){var n=t.as,o=n===void 0?"div":n,i=t.isOpen,a=i===void 0?!0:i,u=lt(t,["as","isOpen"]);return gt("dialog"),w.useEffect(function(){a?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[a]),a?w.createElement(ht,{"data-reach-dialog-wrapper":""},w.createElement(Mn,ue({ref:r,as:o},u))):null}),Mn=w.forwardRef(function(t,r){var n=t.allowPinchZoom,o=t.as,i=o===void 0?"div":o,a=t.dangerouslyBypassFocusLock,u=a===void 0?!1:a,c=t.dangerouslyBypassScrollLock,s=c===void 0?!1:c,f=t.initialFocusRef,d=t.onClick,m=t.onDismiss,v=m===void 0?Ie:m,h=t.onKeyDown,l=t.onMouseDown,p=t.unstable_lockFocusAcrossFrames,O=p===void 0?!0:p,R=lt(t,["allowPinchZoom","as","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),S=w.useRef(null),_=w.useRef(null),x=_t(_,r),k=w.useCallback(function(){f&&f.current&&f.current.focus()},[f]);function F(P){S.current===P.target&&(P.stopPropagation(),v(P))}function N(P){P.key==="Escape"&&(P.stopPropagation(),v(P))}function j(P){S.current=P.target}return w.useEffect(function(){return _.current?Un(_.current):void 0},[]),w.createElement(mr,{autoFocus:!0,returnFocus:!0,onActivation:k,disabled:u,crossFrame:O},w.createElement(Cr,{allowPinchZoom:n,enabled:!s},w.createElement(i,ue({},R,{ref:x,"data-reach-dialog-overlay":"",onClick:K(d,F),onKeyDown:K(h,N),onMouseDown:K(l,j)}))))}),Gn=w.forwardRef(function(t,r){var n=t.as,o=n===void 0?"div":n,i=t.onClick;t.onKeyDown;var a=lt(t,["as","onClick","onKeyDown"]);return w.createElement(o,ue({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:r,"data-reach-dialog-content":"",onClick:K(i,function(u){u.stopPropagation()})}))});function Un(e){var t=[],r=[],n=yt(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"),s=c!==null&&c!=="false";s||(t.push(c),r.push(o),o.setAttribute("aria-hidden","true"))}}),function(){r.forEach(function(o,i){var a=t[i];a===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",a)})}):Ie} | ||
/*! ***************************************************************************** | ||
@@ -40,0 +41,0 @@ Copyright (c) Microsoft Corporation. All rights reserved. |
{ | ||
"name": "@twilio-paste/modal-dialog-primitive", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"category": "overlay", | ||
@@ -28,3 +28,3 @@ "status": "production", | ||
"dependencies": { | ||
"@reach/dialog": "0.11.2" | ||
"@reach/dialog": "0.15.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
359446
32.54%321
0.63%1
-50%