@twilio-paste/modal-dialog-primitive
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.2](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.1...@twilio-paste/modal-dialog-primitive@0.1.2) (2020-03-17) | ||
**Note:** Version bump only for package @twilio-paste/modal-dialog-primitive | ||
## [0.1.1](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.0...@twilio-paste/modal-dialog-primitive@0.1.1) (2020-02-26) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,10 @@ | ||
import e,{useRef as n,useState as t,useLayoutEffect as r,useMemo as o,createElement as i,useCallback as a,PureComponent as u,forwardRef as c,Fragment as l,cloneElement as s,Children as f,useEffect as d}from"react";import{createPortal as p}from"react-dom";var v=function(o){var i=o.children,a=o.type,u=void 0===a?"reach-portal":a,c=n(null),l=n(null),s=t()[1];return r((function(){var e=c.current.ownerDocument;return l.current=null==e?void 0:e.createElement(u),e.body.appendChild(l.current),s({}),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}),[u]),l.current?p(i,l.current):e.createElement("span",{ref:c})};"production"!==process.env.NODE_ENV&&(v.displayName="Portal");process.env.NODE_ENV,g()?e.useLayoutEffect:e.useEffect;var y={},m=function(e){};if("production"!==process.env.NODE_ENV){var h=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;m=function(e){y[e]||(y[e]=!0,"test"!==h.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function b(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function g(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function w(){}function E(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x(e,n){return e(n={exports:{}},n.exports),n.exports}var N=x((function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var t="function"==typeof Symbol&&Symbol.for,r=t?Symbol.for("react.element"):60103,o=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,u=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,v=t?Symbol.for("react.suspense_list"):60120,y=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,g=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case r:switch(e=e.type){case s:case f:case i:case u:case a:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case y:case c:return e;default:return n}}case o:return n}}}function E(e){return w(e)===f}n.typeOf=w,n.AsyncMode=s,n.ConcurrentMode=f,n.ContextConsumer=l,n.ContextProvider=c,n.Element=r,n.ForwardRef=d,n.Fragment=i,n.Lazy=m,n.Memo=y,n.Portal=o,n.Profiler=u,n.StrictMode=a,n.Suspense=p,n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===u||e===a||e===p||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g)},n.isAsyncMode=function(e){return E(e)||w(e)===s},n.isConcurrentMode=E,n.isContextConsumer=function(e){return w(e)===l},n.isContextProvider=function(e){return w(e)===c},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return w(e)===d},n.isFragment=function(e){return w(e)===i},n.isLazy=function(e){return w(e)===m},n.isMemo=function(e){return w(e)===y},n.isPortal=function(e){return w(e)===o},n.isProfiler=function(e){return w(e)===u},n.isStrictMode=function(e){return w(e)===a},n.isSuspense=function(e){return w(e)===p}}));S(N);N.typeOf,N.AsyncMode,N.ConcurrentMode,N.ContextConsumer,N.ContextProvider,N.Element,N.ForwardRef,N.Fragment,N.Lazy,N.Memo,N.Portal,N.Profiler,N.StrictMode,N.Suspense,N.isValidElementType,N.isAsyncMode,N.isConcurrentMode,N.isContextConsumer,N.isContextProvider,N.isElement,N.isForwardRef,N.isFragment,N.isLazy,N.isMemo,N.isPortal,N.isProfiler,N.isStrictMode,N.isSuspense;var P=x((function(e,n){"production"!==process.env.NODE_ENV&&function(){Object.defineProperty(n,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;var g=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}},w=function(e,n){if(void 0===n)throw new Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!e){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];g.apply(void 0,[n].concat(r))}};function E(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var O=l,S=s,x=c,N=u,P=t,C=f,T=o,j=y,k=v,D=r,M=a,I=i,_=d,A=!1;function F(e){return E(e)===s}n.typeOf=E,n.AsyncMode=O,n.ConcurrentMode=S,n.ContextConsumer=x,n.ContextProvider=N,n.Element=P,n.ForwardRef=C,n.Fragment=T,n.Lazy=j,n.Memo=k,n.Portal=D,n.Profiler=M,n.StrictMode=I,n.Suspense=_,n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===m||e.$$typeof===h||e.$$typeof===b)},n.isAsyncMode=function(e){return A||(A=!0,w(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||E(e)===l},n.isConcurrentMode=F,n.isContextConsumer=function(e){return E(e)===c},n.isContextProvider=function(e){return E(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return E(e)===f},n.isFragment=function(e){return E(e)===o},n.isLazy=function(e){return E(e)===y},n.isMemo=function(e){return E(e)===v},n.isPortal=function(e){return E(e)===r},n.isProfiler=function(e){return E(e)===a},n.isStrictMode=function(e){return E(e)===i},n.isSuspense=function(e){return E(e)===d}}()}));S(P);P.typeOf,P.AsyncMode,P.ConcurrentMode,P.ContextConsumer,P.ContextProvider,P.Element,P.ForwardRef,P.Fragment,P.Lazy,P.Memo,P.Portal,P.Profiler,P.StrictMode,P.Suspense,P.isValidElementType,P.isAsyncMode,P.isConcurrentMode,P.isContextConsumer,P.isContextProvider,P.isElement,P.isForwardRef,P.isFragment,P.isLazy,P.isMemo,P.isPortal,P.isProfiler,P.isStrictMode,P.isSuspense;var C=x((function(e){"production"===process.env.NODE_ENV?e.exports=N:e.exports=P})),T=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;function D(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var M=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=D(e),i=1;i<arguments.length;i++){for(var a in t=Object(arguments[i]))j.call(t,a)&&(o[a]=t[a]);if(T){r=T(t);for(var u=0;u<r.length;u++)k.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},I="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_=function(){};if("production"!==process.env.NODE_ENV){var A=I,F={},R=Function.call.bind(Object.prototype.hasOwnProperty);_=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function $(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(R(e,i)){var a;try{if("function"!=typeof e[i]){var u=Error((r||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw u.name="Invariant Violation",u}a=e[i](n,i,r,t,null,A)}catch(e){a=e}if(!a||a instanceof Error||_((r||"React class")+": type specification of "+t+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in F)){F[a.message]=!0;var c=o?o():"";_("Failed "+t+" type: "+a.message+(null!=c?c:""))}}}$.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(F={})};var L=$,V=Function.call.bind(Object.prototype.hasOwnProperty),W=function(){};function B(){return null}"production"!==process.env.NODE_ENV&&(W=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var q=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(B),arrayOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,a+"["+c+"]",I);if(s instanceof Error)return s}return null}))},element:a((function(n,t,r,o,a){var u=n[t];return e(u)?null:new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(e,n,t,r,o){var a=e[n];return C.isValidElementType(a)?null:new i("Invalid "+r+" `"+o+"` of type `"+l(a)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return a((function(n,t,r,o,a){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new i("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(e,n,t,r,o){return c(e[n])?null:new i("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(V(u,s)){var f=e(u,s,r,o,a+"."+s,I);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?W("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):W("Invalid argument supplied to oneOf, expected an array.")),B;function n(n,t,r,a,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new i("Invalid "+a+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&W("Invalid argument supplied to oneOfType, expected an instance of array."),B;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return W("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),B}return a((function(n,t,r,o,a){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,a,I))return null}return new i("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,a+"."+s,I);if(d)return d}}return null}))},exact:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=M({},n[t],e);for(var f in s){var d=e[f];if(!d)return new i("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,a+"."+f,I);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function i(e){this.message=e,this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==I){if(n){var d=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 d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(W("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==a[u]?o?null===a[u]?new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,u,c,l,s)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function u(e){return a((function(n,t,r,o,a,u){var c=n[t];return l(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,i=r.call(n);if(r!==n.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return i.prototype=Error.prototype,r.checkPropTypes=L,r.resetWarningCache=L.resetWarningCache,r.PropTypes=r,r};function Y(){}function z(){}z.resetWarningCache=Y;var U=x((function(e){if("production"!==process.env.NODE_ENV){var n=C;e.exports=q(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,i){if(i!==I){var a=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 a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:z,resetWarningCache:Y};return t.PropTypes=t,t}()})),G=(U.array,U.bool),X=U.func,Z=(U.number,U.object),H=U.string,K=(U.symbol,U.any),J=U.node,Q=(U.element,U.elementType,U.instanceOf,U.oneOf,U.oneOfType),ee=U.arrayOf;U.objectOf,U.shape,U.exact;function ne(e,n){return r=n,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):null!=e&&(e.current=n),e}(e,n)}))},(i=t((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var n=i.value;n!==e&&(i.value=e,i.callback(e,n))}}}}))[0]).callback=o,i.facade;var r,o,i}var te={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},re=function(n){var t=n.children;return e.createElement(e.Fragment,null,e.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:te}),t,t&&e.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:te}))};re.propTypes="production"!==process.env.NODE_ENV?{children:U.node}:{},re.defaultProps={children:null}; | ||
import e,{useMemo as n,useRef as t,useState as r,createElement as o,useCallback as i,PureComponent as a,forwardRef as u,Fragment as c,cloneElement as l,Children as s,useEffect as f}from"react";import{createPortal as d}from"react-dom";process.env.NODE_ENV;var p=b()?e.useLayoutEffect:e.useEffect,v={},y=function(e){};if("production"!==process.env.NODE_ENV){var m=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;y=function(e){v[e]||(v[e]=!0,"test"!==m.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function h(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function b(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function g(){}function w(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var E=function(n){var o=n.children,i=n.type,a=void 0===i?"reach-portal":i,u=t(null),c=t(null),l=r()[1];return p((function(){var e=u.current.ownerDocument;return c.current=null==e?void 0:e.createElement(a),e.body.appendChild(c.current),l({}),function(){c.current&&c.current.ownerDocument&&c.current.ownerDocument.body.removeChild(c.current)}}),[a]),c.current?d(o,c.current):e.createElement("span",{ref:u})};function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function S(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.0 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/}"production"!==process.env.NODE_ENV&&(E.displayName="Portal");var x="function"==typeof Symbol&&Symbol.for,N=x?Symbol.for("react.element"):60103,P=x?Symbol.for("react.portal"):60106,C=x?Symbol.for("react.fragment"):60107,T=x?Symbol.for("react.strict_mode"):60108,k=x?Symbol.for("react.profiler"):60114,j=x?Symbol.for("react.provider"):60109,D=x?Symbol.for("react.context"):60110,I=x?Symbol.for("react.async_mode"):60111,M=x?Symbol.for("react.concurrent_mode"):60111,_=x?Symbol.for("react.forward_ref"):60112,F=x?Symbol.for("react.suspense"):60113,A=x?Symbol.for("react.suspense_list"):60120,$=x?Symbol.for("react.memo"):60115,R=x?Symbol.for("react.lazy"):60116,L=x?Symbol.for("react.block"):60121,V=x?Symbol.for("react.fundamental"):60117,B=x?Symbol.for("react.responder"):60118,W=x?Symbol.for("react.scope"):60119;function q(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case N:switch(e=e.type){case I:case M:case C:case k:case T:case F:return e;default:switch(e=e&&e.$$typeof){case D:case _:case R:case $:case j:return e;default:return n}}case P:return n}}}function Y(e){return q(e)===M}var z={AsyncMode:I,ConcurrentMode:M,ContextConsumer:D,ContextProvider:j,Element:N,ForwardRef:_,Fragment:C,Lazy:R,Memo:$,Portal:P,Profiler:k,StrictMode:T,Suspense:F,isAsyncMode:function(e){return Y(e)||q(e)===I},isConcurrentMode:Y,isContextConsumer:function(e){return q(e)===D},isContextProvider:function(e){return q(e)===j},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===N},isForwardRef:function(e){return q(e)===_},isFragment:function(e){return q(e)===C},isLazy:function(e){return q(e)===R},isMemo:function(e){return q(e)===$},isPortal:function(e){return q(e)===P},isProfiler:function(e){return q(e)===k},isStrictMode:function(e){return q(e)===T},isSuspense:function(e){return q(e)===F},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===C||e===M||e===k||e===T||e===F||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===R||e.$$typeof===$||e.$$typeof===j||e.$$typeof===D||e.$$typeof===_||e.$$typeof===V||e.$$typeof===B||e.$$typeof===W||e.$$typeof===L)},typeOf:q},U=S((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,P=f,C=o,T=y,k=v,j=r,D=a,I=i,M=d,_=!1;function F(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=P,n.Fragment=C,n.Lazy=T,n.Memo=k,n.Portal=j,n.Profiler=D,n.StrictMode=I,n.Suspense=M,n.isAsyncMode=function(e){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||w(e)===l},n.isConcurrentMode=F,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===y},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===a},n.isStrictMode=function(e){return w(e)===i},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},n.typeOf=w}()})),G=(U.AsyncMode,U.ConcurrentMode,U.ContextConsumer,U.ContextProvider,U.Element,U.ForwardRef,U.Fragment,U.Lazy,U.Memo,U.Portal,U.Profiler,U.StrictMode,U.Suspense,U.isAsyncMode,U.isConcurrentMode,U.isContextConsumer,U.isContextProvider,U.isElement,U.isForwardRef,U.isFragment,U.isLazy,U.isMemo,U.isPortal,U.isProfiler,U.isStrictMode,U.isSuspense,U.isValidElementType,U.typeOf,S((function(e){"production"===process.env.NODE_ENV?e.exports=z:e.exports=U}))),X=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;function K(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var J=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=K(e),i=1;i<arguments.length;i++){for(var a in t=Object(arguments[i]))Z.call(t,a)&&(o[a]=t[a]);if(X){r=X(t);for(var u=0;u<r.length;u++)H.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ee=function(){};if("production"!==process.env.NODE_ENV){var ne=Q,te={},re=Function.call.bind(Object.prototype.hasOwnProperty);ee=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function oe(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(re(e,i)){var a;try{if("function"!=typeof e[i]){var u=Error((r||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw u.name="Invariant Violation",u}a=e[i](n,i,r,t,null,ne)}catch(e){a=e}if(!a||a instanceof Error||ee((r||"React class")+": type specification of "+t+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in te)){te[a.message]=!0;var c=o?o():"";ee("Failed "+t+" type: "+a.message+(null!=c?c:""))}}}oe.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(te={})};var ie=oe,ae=Function.call.bind(Object.prototype.hasOwnProperty),ue=function(){};function ce(){return null}"production"!==process.env.NODE_ENV&&(ue=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var le=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(ce),arrayOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,a+"["+c+"]",Q);if(s instanceof Error)return s}return null}))},element:a((function(n,t,r,o,a){var u=n[t];return e(u)?null:new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(e,n,t,r,o){var a=e[n];return G.isValidElementType(a)?null:new i("Invalid "+r+" `"+o+"` of type `"+l(a)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return a((function(n,t,r,o,a){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new i("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(e,n,t,r,o){return c(e[n])?null:new i("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(ae(u,s)){var f=e(u,s,r,o,a+"."+s,Q);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?ue("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ue("Invalid argument supplied to oneOf, expected an array.")),ce;function n(n,t,r,a,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new i("Invalid "+a+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ue("Invalid argument supplied to oneOfType, expected an instance of array."),ce;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return ue("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),ce}return a((function(n,t,r,o,a){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,a,Q))return null}return new i("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,a+"."+s,Q);if(d)return d}}return null}))},exact:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=J({},n[t],e);for(var f in s){var d=e[f];if(!d)return new i("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,a+"."+f,Q);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function i(e){this.message=e,this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Q){if(n){var d=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 d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(ue("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==a[u]?o?null===a[u]?new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,u,c,l,s)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function u(e){return a((function(n,t,r,o,a,u){var c=n[t];return l(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,i=r.call(n);if(r!==n.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return i.prototype=Error.prototype,r.checkPropTypes=ie,r.resetWarningCache=ie.resetWarningCache,r.PropTypes=r,r};function se(){}function fe(){}fe.resetWarningCache=se;var de=S((function(e){if("production"!==process.env.NODE_ENV){var n=G;e.exports=le(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,i){if(i!==Q){var a=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 a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:fe,resetWarningCache:se};return t.PropTypes=t,t}()})),pe=(de.array,de.bool),ve=de.func,ye=(de.number,de.object),me=de.string,he=(de.symbol,de.any),be=de.node,ge=(de.element,de.elementType,de.instanceOf,de.oneOf,de.oneOfType),we=de.arrayOf;de.objectOf,de.shape,de.exact;function Ee(e,n){return t=n,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):null!=e&&(e.current=n),e}(e,n)}))},(i=r((function(){return{value:t,callback:o,facade:{get current(){return i.value},set current(e){var n=i.value;n!==e&&(i.value=e,i.callback(e,n))}}}}))[0]).callback=o,i.facade;var t,o,i}var Oe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Se=function(n){var t=n.children;return e.createElement(e.Fragment,null,e.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}),t,t&&e.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}))};Se.propTypes="production"!==process.env.NODE_ENV?{children:de.node}:{},Se.defaultProps={children:null}; | ||
/*! ***************************************************************************** | ||
@@ -16,2 +24,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var oe=function(){return(oe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ie(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function ae(e){return e}function ue(e,n){void 0===n&&(n=ae);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var i=function(){var t=n;n=[],t.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),t={push:function(e){n.push(e),a()},filter:function(e){return n=n.filter(e),t}}}}}function ce(e,n){return void 0===n&&(n=ae),ue(e,n)}function le(e){void 0===e&&(e={});var n=ue(null);return n.options=oe({async:!0,ssr:!1},e),n}var se=function(e){var n=e.sideCar,t=ie(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return i(r,oe({},t))};se.isSideCarExport=!0;var fe=ce({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),de=ce(),pe=ce(),ve=le({async:!0}),ye=[],me=e.forwardRef((function(r,o){var i,u=t(),c=u[0],l=u[1],s=n(),f=n(!1),d=n(null),p=r.children,v=r.disabled,y=r.noFocusGuards,m=r.persistentFocus,h=r.autoFocus,b=r.allowTextSelection,g=r.group,w=r.className,E=r.whiteList,S=r.shards,x=void 0===S?ye:S,N=r.as,P=void 0===N?"div":N,C=r.lockProps,T=void 0===C?{}:C,j=r.sideCar,k=r.returnFocus,D=r.onActivation,M=r.onDeactivation,I=t({})[0],_=a((function(){d.current=d.current||document&&document.activeElement,s.current&&D&&D(s.current),f.current=!0}),[D]),A=a((function(){f.current=!1,M&&M(s.current)}),[M]),F=a((function(e){var n=d.current;if(Boolean(k)&&n&&n.focus){var t="object"==typeof k?k:void 0;d.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[k]),R=a((function(e){f.current&&fe.useMedium(e)}),[]),$=de.useMedium,L=a((function(e){s.current!==e&&(s.current=e,l(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==b&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),e.useEffect((function(){s.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var V=O(((i={})["data-focus-lock-disabled"]=v&&"disabled",i["data-focus-lock"]=g,i),T),W=!0!==y,B=W&&"tail"!==y,q=ne([o,L]);return e.createElement(e.Fragment,null,W&&[e.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:v?-1:0,style:te}),e.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:v?-1:1,style:te})],!v&&e.createElement(j,{id:I,sideCar:ve,observed:c,disabled:v,persistentFocus:m,autoFocus:h,whiteList:E,shards:x,onActivation:_,onDeactivation:A,returnFocus:F}),e.createElement(P,O({ref:q},V,{className:w,onBlur:$,onFocus:R}),p),B&&e.createElement("div",{"data-focus-guard":!0,tabIndex:v?-1:0,style:te}))}));me.propTypes="production"!==process.env.NODE_ENV?{children:J,disabled:G,returnFocus:Q([G,Z]),noFocusGuards:G,allowTextSelection:G,autoFocus:G,persistentFocus:G,group:H,className:H,whiteList:X,shards:ee(K),as:Q([H,X,Z]),lockProps:Z,onActivation:X,onDeactivation:X,sideCar:K.isRequired}:{},me.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,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 he=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},be=function(e){return Array.isArray(e)?e:[e]},ge=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},we=function(e,n,t){return he(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(ge)},Ee=["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]"],Oe=Ee.join(","),Se=Oe+", [data-focus-guard]",xe=function(e,n){return e.reduce((function(e,t){return e.concat(he(t.querySelectorAll(n?Se:Oe)),t.parentNode?he(t.parentNode.querySelectorAll(Ee.join(","))).filter((function(e){return e===t})):[])}),[])},Ne=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Pe=function(e,n){for(var t=Ne(e),r=Ne(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},Ce=function(e){return he(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Te=function(e,n){return we(Ce(xe(e,n)),!0,n)},je=function(e){return Ce((n=e.querySelectorAll("[data-autofocus-inside]"),he(n).map((function(e){return xe([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},ke=function(e){return"INPUT"===e.tagName&&"radio"===e.type},De=function(e){return e[0]&&e.length>1&&ke(e[0])&&e[0].name?function(e,n){return n.filter(ke).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e[0],e):e[0]},Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie=function(e){return be(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},i=0;i<t;i+=1){var a=o(i);if("object"===(void 0===a?"undefined":Me(a)))return a.v}return n}(he(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},_e=function(e){return e.dataset&&e.dataset.focusGuard},Ae=function(e){return!_e(e)},Fe=function(e,n,t){var r=be(e),o=be(n),i=r[0],a=null;return o.filter(Boolean).forEach((function(e){a=Pe(a||e,e)||a,t.filter(Boolean).forEach((function(e){var n=Pe(i,e);n&&(a=!a||n.contains(a)?n:Pe(n,a))}))})),a},Re=function(e,n){var t=document&&document.activeElement,r=Ie(e).filter(Ae),o=Fe(t||e,e,r),i=Te(r).filter((function(e){var n=e.node;return Ae(n)}));if(i[0]||(i=(a=r,we(Ce(xe(a)),!1)).filter((function(e){var n=e.node;return Ae(n)})))[0]){var a,u,c,l,s,f=Te([o]).map((function(e){return e.node})),d=(u=f,c=i,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var i=e.length,a=e[0],u=e[i-1];if(!(e.indexOf(t)>=0)){var c=n.indexOf(t),l=n.indexOf(r||c),s=e.indexOf(r),f=c-l,d=n.indexOf(a),p=n.indexOf(u);return-1===c||-1===s?e.indexOf(o.length?De(o):De(e)):!f&&s>=0?s:c<=d&&_e(t)&&Math.abs(f)>1?0:f&&Math.abs(f)>1?s:c<=d?i-1:c>p?0:f?Math.abs(f)>1?s:(i+s+f)%i:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(je(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},$e=function(e){return e===document.activeElement},Le=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Ie(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=he(e.querySelectorAll("iframe")),t=$e,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},Ve=0,We=!1,Be=function(e,n){var t,r=Re(e,n);if(!We&&r){if(Ve>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),We=!0,void setTimeout((function(){We=!1}),1);Ve++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),Ve--}};function qe(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var Ye=function(){return document&&document.activeElement===document.body||document&&he(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},ze=null,Ue=null,Ge=null,Xe=!1,Ze=function(){return!0};function He(e,n,t,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=t)!==n);o&&(o.node.tabIndex=0)}var Ke=function(e){return e&&"current"in e?e.current:e},Je=function(){var e,n,t,r,o,i,a=!1;if(ze){var u=ze,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=c||Ge&&Ge.portaledElement,p=document&&document.activeElement;if(d){var v=[d].concat(f.map(Ke).filter(Boolean));if(p&&!function(e){return(ze.whiteList||Ze)(e)}(p)||(l||Xe||!Ye()||!Ue&&s)&&(!d||Le(v)||(i=p,Ge&&Ge.portaledElement===i)||(document&&!Ue&&p&&!s?(p.blur(),document.body.focus()):(a=Be(v,Ue),Ge={})),Xe=!1,Ue=document&&document.activeElement),document){var y=document&&document.activeElement,m=(n=Ie(e=v).filter(Ae),t=Fe(e,e,n),r=Te([t],!0),o=Te(n).filter((function(e){var n=e.node;return Ae(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:_e(n)}}))),h=m.find((function(e){return e.node===y}));if(h){m.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var b=m.indexOf(h);He(b,m.length,1,m),He(b,-1,-1,m)}}}}return a},Qe=function(e){Je()&&e&&(e.stopPropagation(),e.preventDefault())},en=function(){return qe(Je)},nn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(Ge={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&U.node.isRequired;var tn=function(){Xe=!0};fe.assignSyncMedium(nn),de.assignMedium(en),pe.assignMedium((function(e){return e({moveFocusInside:Be,focusInside:Le})}));var rn=function(n,t){if("production"!==process.env.NODE_ENV){if("function"!=typeof n)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(r){if("production"!==process.env.NODE_ENV&&"function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var o,i=[];function a(){o=n(i.map((function(e){return e.props}))),t(o)}var c,l,s,f=function(n){var t,u;function c(){return n.apply(this,arguments)||this}u=n,(t=c).prototype=Object.create(u.prototype),t.prototype.constructor=t,t.__proto__=u,c.peek=function(){return o};var l=c.prototype;return l.componentDidMount=function(){i.push(this),a()},l.componentDidUpdate=function(){a()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),a()},l.render=function(){return e.createElement(r,this.props)},c}(u);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!ze&&(document.addEventListener("focusin",Qe,!0),document.addEventListener("focusout",en),window.addEventListener("blur",tn));var t=ze,r=t&&n&&n.id===t.id;ze=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(Ue=null,r&&t.observed===n.observed||n.onActivation(),Je(),qe(Je)):(document.removeEventListener("focusin",Qe,!0),document.removeEventListener("focusout",en),window.removeEventListener("blur",tn),Ue=null)}))((function(){return null})),on=e.forwardRef((function(n,t){return e.createElement(me,O({sideCar:rn,ref:t},n))})),an=me.propTypes||{},un=(an.sideCar,function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(an,["sideCar"]));on.propTypes=un;var cn=le(),ln=function(){},sn=c((function(e,r){var o=n(null),a=t({onScrollCapture:ln,onWheelCapture:ln,onTouchMoveCapture:ln}),u=a[0],c=a[1],d=e.forwardProps,p=e.children,v=e.className,y=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=ie(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),S=b,x=oe({ref:ne([o,r])},O,u);return i(l,null,m&&i(S,{sideCar:cn,removeScrollBar:y,shards:h,noIsolation:g,inert:w,setCallbacks:c,allowPinchZoom:!!E,lockRef:o}),d?s(f.only(p),x):i("div",oe({},x,{className:v}),p))}));sn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var fn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");return e.type="text/css",e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},dn=function(){var e,n=(e=fn(),function(n){d((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},pn={left:0,top:0,right:0,gap:0},vn=function(e){return parseInt(e||"",10)||0},yn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return pn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[vn(t),vn(r),vn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},mn=dn(),hn=function(e,n,t,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},bn=function(e){var n=t(yn(e.gapMode)),r=n[0],o=n[1];d((function(){o(yn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,c=e.gapMode;return i(mn,{styles:hn(r,!a,void 0===c?"margin":c,u?"":"!important")})},gn=function(e,n){var t=n;do{if(wn(e,t)){var r=En(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},wn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},En=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},On=!1;if("undefined"!=typeof window)try{var Sn=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch(e){On=!1}var xn=!!On&&{passive:!1},Nn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pn=function(e){return[e.deltaX,e.deltaY]},Cn=function(e){return e&&"current"in e?e.current:e},Tn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},jn=0,kn=[];var Dn,Mn=(Dn=function(e){var r=n([]),o=n([0,0]),u=n(),c=t(jn++)[0],s=t((function(){return dn()}))[0],f=n(e);d((function(){f.current=e}),[e]),d((function(){if(e.inert){document.body.classList.add("block-interactivity-"+c);var n=[e.lockRef.current].concat((e.shards||[]).map(Cn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+c)})),function(){document.body.classList.remove("block-interactivity-"+c),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+c)}))}}}),[e.inert,e.lockRef.current,e.shards]);var p=a((function(e,n){if("touches"in e&&2===e.touches.length)return!f.current.allowPinchZoom;var t,r=Nn(e),i=o.current,a="deltaX"in e?e.deltaX:i[0]-r[0],c="deltaY"in e?e.deltaY:i[1]-r[1],l=e.target,s=Math.abs(a)>Math.abs(c)?"h":"v",d=gn(s,l);if(!d)return!0;if(d?t=s:(t="v"===s?"h":"v",d=gn(s,l)),!d)return!1;if(!u.current&&"changedTouches"in e&&(a||c)&&(u.current=t),!t)return!0;var p=u.current||t;return function(e,n,t,r,o){var i=r,a=t.target,u=n.contains(a),c=!1,l=i>0,s=0,f=0;do{var d=En(e,a),p=d[0],v=d[1]-d[2]-p;(p||v)&&wn(e,a)&&(s+=v,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(n.contains(a)||n===a));return(l&&(o&&0===s||!o&&i>s)||!l&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,n,e,"h"==p?a:c,!0)}),[]),v=a((function(e){var n=e;if(kn.length&&kn[kn.length-1]===s){var t="deltaY"in n?Pn(n):Nn(n),o=r.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(r=e.delta,o=t,r[0]===o[0]&&r[1]===o[1]);var r,o}))[0];if(o&&o.should)n.preventDefault();else if(!o){var i=(f.current.shards||[]).map(Cn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?p(n,i[0]):!f.current.noIsolation)&&n.preventDefault()}}}),[]),y=a((function(e,n,t,o){var i={name:e,delta:n,target:t,should:o};r.current.push(i),setTimeout((function(){r.current=r.current.filter((function(e){return e!==i}))}),1)}),[]),m=a((function(e){o.current=Nn(e),u.current=void 0}),[]),h=a((function(n){y(n.type,Pn(n),n.target,p(n,e.lockRef.current))}),[]),b=a((function(n){y(n.type,Nn(n),n.target,p(n,e.lockRef.current))}),[]);d((function(){return kn.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",v,xn),document.addEventListener("touchmove",v,xn),document.addEventListener("touchstart",m,xn),function(){kn=kn.filter((function(e){return e!==s})),document.removeEventListener("wheel",v,xn),document.removeEventListener("touchmove",v,xn),document.removeEventListener("touchstart",m,xn)}}),[]);var g=e.removeScrollBar,w=e.inert;return i(l,null,w?i(s,{styles:Tn(c)}):null,g?i(bn,{gapMode:"margin"}):null)},cn.useMedium(Dn),se),In=c((function(e,n){return i(sn,oe({},e,{ref:n,sideCar:Mn}))}));function _n(){return(_n=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function An(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}In.classNames=sn.classNames;var Fn={initialFocusRef:function(){return null},allowPinchZoom:U.bool,onDismiss:U.func},Rn=c((function(n,t){var r=n.isOpen,o=void 0===r||r,i=An(n,["isOpen"]);return d((function(){return m("dialog")}),[]),o?e.createElement(v,{"data-reach-dialog-wrapper":""},e.createElement($n,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(Rn.displayName="DialogOverlay",Rn.propTypes=_n({},Fn,{isOpen:U.bool}));var $n=c((function(t,r){var i=t.allowPinchZoom,u=t.initialFocusRef,c=t.onClick,l=t.onDismiss,s=void 0===l?w:l,f=t.onMouseDown,p=t.onKeyDown,v=An(t,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=n(null),m=n(null),h=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return o((function(){return n.every((function(e){return null==e}))?null:function(e){n.forEach((function(n){b(n,e)}))}}),n)}(m,r),O=a((function(){u&&u.current&&u.current.focus()}),[u]);return d((function(){return m.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:g()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),w;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,i;if(r!==(null===(o=e.parentNode)||void 0===o||null===(i=o.parentNode)||void 0===i?void 0:i.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(n.push(a),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(m.current):void 0}),[]),e.createElement(on,{autoFocus:!0,returnFocus:!0,onActivation:O},e.createElement(In,{allowPinchZoom:i},e.createElement("div",Object.assign({},v,{ref:h,"data-reach-dialog-overlay":"",onClick:E(c,(function(e){y.current===e.target&&(e.stopPropagation(),s(e))})),onKeyDown:E(p,(function(e){"Escape"===e.key&&(e.stopPropagation(),s(e))})),onMouseDown:E(f,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Rn.displayName="DialogOverlay",Rn.propTypes=_n({},Fn));var Ln=c((function(n,t){var r=n.onClick,o=An(n,["onClick","onKeyDown"]);return e.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:E(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(Ln.displayName="DialogContent",Ln.propTypes={"aria-label":Wn,"aria-labelledby":Wn});var Vn=c((function(n,t){var r=n.isOpen,o=n.onDismiss,i=void 0===o?w:o,a=n.initialFocusRef,u=An(n,["isOpen","onDismiss","initialFocusRef"]);return e.createElement(Rn,{initialFocusRef:a,isOpen:r,onDismiss:i},e.createElement(Ln,Object.assign({ref:t},u)))}));function Wn(e,n,t,r,o){var i="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+i):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+i)}"production"!==process.env.NODE_ENV&&(Vn.displayName="Dialog",Vn.propTypes={isOpen:U.bool,onDismiss:U.func,"aria-label":Wn,"aria-labelledby":Wn});export{Ln as ModalDialogPrimitiveContent,Rn as ModalDialogPrimitiveOverlay}; | ||
var xe=function(){return(xe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function Ne(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function Pe(e){return e}function Ce(e,n){void 0===n&&(n=Pe);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var i=function(){var t=n;n=[],t.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),t={push:function(e){n.push(e),a()},filter:function(e){return n=n.filter(e),t}}}}}function Te(e,n){return void 0===n&&(n=Pe),Ce(e,n)}function ke(e){void 0===e&&(e={});var n=Ce(null);return n.options=xe({async:!0,ssr:!1},e),n}var je=function(e){var n=e.sideCar,t=Ne(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return o(r,xe({},t))};je.isSideCarExport=!0;var De=Te({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Ie=Te(),Me=Te(),_e=ke({async:!0}),Fe=[],Ae=e.forwardRef((function(n,o){var a,u=r(),c=u[0],l=u[1],s=t(),f=t(!1),d=t(null),p=n.children,v=n.disabled,y=n.noFocusGuards,m=n.persistentFocus,h=n.autoFocus,b=n.allowTextSelection,g=n.group,w=n.className,E=n.whiteList,S=n.shards,x=void 0===S?Fe:S,N=n.as,P=void 0===N?"div":N,C=n.lockProps,T=void 0===C?{}:C,k=n.sideCar,j=n.returnFocus,D=n.onActivation,I=n.onDeactivation,M=r({})[0],_=i((function(){d.current=d.current||document&&document.activeElement,s.current&&D&&D(s.current),f.current=!0}),[D]),F=i((function(){f.current=!1,I&&I(s.current)}),[I]),A=i((function(e){var n=d.current;if(Boolean(j)&&n&&n.focus){var t="object"==typeof j?j:void 0;d.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[j]),$=i((function(e){f.current&&De.useMedium(e)}),[]),R=Ie.useMedium,L=i((function(e){s.current!==e&&(s.current=e,l(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==b&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),e.useEffect((function(){s.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var V=O(((a={})["data-focus-lock-disabled"]=v&&"disabled",a["data-focus-lock"]=g,a),T),B=!0!==y,W=B&&"tail"!==y,q=Ee([o,L]);return e.createElement(e.Fragment,null,B&&[e.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:v?-1:0,style:Oe}),e.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:v?-1:1,style:Oe})],!v&&e.createElement(k,{id:M,sideCar:_e,observed:c,disabled:v,persistentFocus:m,autoFocus:h,whiteList:E,shards:x,onActivation:_,onDeactivation:F,returnFocus:A}),e.createElement(P,O({ref:q},V,{className:w,onBlur:R,onFocus:$}),p),W&&e.createElement("div",{"data-focus-guard":!0,tabIndex:v?-1:0,style:Oe}))}));Ae.propTypes="production"!==process.env.NODE_ENV?{children:be,disabled:pe,returnFocus:ge([pe,ye]),noFocusGuards:pe,allowTextSelection:pe,autoFocus:pe,persistentFocus:pe,group:me,className:me,whiteList:ve,shards:we(he),as:ge([me,ve,ye]),lockProps:ye,onActivation:ve,onDeactivation:ve,sideCar:he.isRequired}:{},Ae.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,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 $e=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Re=function(e){return Array.isArray(e)?e:[e]},Le=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},Ve=function(e,n,t){return $e(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(Le)},Be=["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]"],We=Be.join(","),qe=We+", [data-focus-guard]",Ye=function(e,n){return e.reduce((function(e,t){return e.concat($e(t.querySelectorAll(n?qe:We)),t.parentNode?$e(t.parentNode.querySelectorAll(Be.join(","))).filter((function(e){return e===t})):[])}),[])},ze=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ue=function(e,n){for(var t=ze(e),r=ze(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},Ge=function(e){return $e(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Xe=function(e,n){return Ve(Ge(Ye(e,n)),!0,n)},Ze=function(e){return Ge((n=e.querySelectorAll("[data-autofocus-inside]"),$e(n).map((function(e){return Ye([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},He=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Ke=function(e){return e[0]&&e.length>1&&He(e[0])&&e[0].name?function(e,n){return n.filter(He).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e[0],e):e[0]},Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe=function(e){return Re(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},i=0;i<t;i+=1){var a=o(i);if("object"===(void 0===a?"undefined":Je(a)))return a.v}return n}($e(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},en=function(e){return e.dataset&&e.dataset.focusGuard},nn=function(e){return!en(e)},tn=function(e,n,t){var r=Re(e),o=Re(n),i=r[0],a=null;return o.filter(Boolean).forEach((function(e){a=Ue(a||e,e)||a,t.filter(Boolean).forEach((function(e){var n=Ue(i,e);n&&(a=!a||n.contains(a)?n:Ue(n,a))}))})),a},rn=function(e,n){var t=document&&document.activeElement,r=Qe(e).filter(nn),o=tn(t||e,e,r),i=Xe(r).filter((function(e){var n=e.node;return nn(n)}));if(i[0]||(i=(a=r,Ve(Ge(Ye(a)),!1)).filter((function(e){var n=e.node;return nn(n)})))[0]){var a,u,c,l,s,f=Xe([o]).map((function(e){return e.node})),d=(u=f,c=i,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var i=e.length,a=e[0],u=e[i-1];if(!(e.indexOf(t)>=0)){var c=n.indexOf(t),l=n.indexOf(r||c),s=e.indexOf(r),f=c-l,d=n.indexOf(a),p=n.indexOf(u);return-1===c||-1===s?e.indexOf(o.length?Ke(o):Ke(e)):!f&&s>=0?s:c<=d&&en(t)&&Math.abs(f)>1?0:f&&Math.abs(f)>1?s:c<=d?i-1:c>p?0:f?Math.abs(f)>1?s:(i+s+f)%i:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ze(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},on=function(e){return e===document.activeElement},an=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Qe(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=$e(e.querySelectorAll("iframe")),t=on,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},un=0,cn=!1,ln=function(e,n){var t,r=rn(e,n);if(!cn&&r){if(un>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),cn=!0,void setTimeout((function(){cn=!1}),1);un++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),un--}};function sn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var fn=function(){return document&&document.activeElement===document.body||document&&$e(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},dn=null,pn=null,vn=null,yn=!1,mn=function(){return!0};function hn(e,n,t,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=t)!==n);o&&(o.node.tabIndex=0)}var bn=function(e){return e&&"current"in e?e.current:e},gn=function(){var e,n,t,r,o,i,a=!1;if(dn){var u=dn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=c||vn&&vn.portaledElement,p=document&&document.activeElement;if(d){var v=[d].concat(f.map(bn).filter(Boolean));if(p&&!function(e){return(dn.whiteList||mn)(e)}(p)||(l||yn||!fn()||!pn&&s)&&(!d||an(v)||(i=p,vn&&vn.portaledElement===i)||(document&&!pn&&p&&!s?(p.blur(),document.body.focus()):(a=ln(v,pn),vn={})),yn=!1,pn=document&&document.activeElement),document){var y=document&&document.activeElement,m=(n=Qe(e=v).filter(nn),t=tn(e,e,n),r=Xe([t],!0),o=Xe(n).filter((function(e){var n=e.node;return nn(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:en(n)}}))),h=m.find((function(e){return e.node===y}));if(h){m.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var b=m.indexOf(h);hn(b,m.length,1,m),hn(b,-1,-1,m)}}}}return a},wn=function(e){gn()&&e&&(e.stopPropagation(),e.preventDefault())},En=function(){return sn(gn)},On=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(vn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&de.node.isRequired;var Sn=function(){yn=!0};De.assignSyncMedium(On),Ie.assignMedium(En),Me.assignMedium((function(e){return e({moveFocusInside:ln,focusInside:an})}));var xn=function(n,t){if("production"!==process.env.NODE_ENV){if("function"!=typeof n)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(r){if("production"!==process.env.NODE_ENV&&"function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var o,i=[];function u(){o=n(i.map((function(e){return e.props}))),t(o)}var c,l,s,f=function(n){var t,a;function c(){return n.apply(this,arguments)||this}a=n,(t=c).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,c.peek=function(){return o};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return e.createElement(r,this.props)},c}(a);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!dn&&(document.addEventListener("focusin",wn,!0),document.addEventListener("focusout",En),window.addEventListener("blur",Sn));var t=dn,r=t&&n&&n.id===t.id;dn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(pn=null,r&&t.observed===n.observed||n.onActivation(),gn(),sn(gn)):(document.removeEventListener("focusin",wn,!0),document.removeEventListener("focusout",En),window.removeEventListener("blur",Sn),pn=null)}))((function(){return null})),Nn=e.forwardRef((function(n,t){return e.createElement(Ae,O({sideCar:xn,ref:t},n))})),Pn=Ae.propTypes||{},Cn=(Pn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(Pn,["sideCar"]));Nn.propTypes=Cn;var Tn=ke(),kn=function(){},jn=u((function(e,n){var i=t(null),a=r({onScrollCapture:kn,onWheelCapture:kn,onTouchMoveCapture:kn}),u=a[0],f=a[1],d=e.forwardProps,p=e.children,v=e.className,y=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=Ne(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),S=b,x=xe({ref:Ee([i,n])},O,u);return o(c,null,m&&o(S,{sideCar:Tn,removeScrollBar:y,shards:h,noIsolation:g,inert:w,setCallbacks:f,allowPinchZoom:!!E,lockRef:i}),d?l(s.only(p),x):o("div",xe({},x,{className:v}),p))}));jn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var Dn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");return e.type="text/css",e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},In=function(){var e,n=(e=Dn(),function(n){f((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},Mn={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},Fn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Mn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[_n(t),_n(r),_n(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},An=In(),$n=function(e,n,t,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Rn=function(e){var n=r(Fn(e.gapMode)),t=n[0],i=n[1];f((function(){i(Fn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,c=e.gapMode;return o(An,{styles:$n(t,!a,void 0===c?"margin":c,u?"":"!important")})},Ln=function(e,n){var t=n;do{if(Vn(e,t)){var r=Bn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Vn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Bn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},Wn=!1;if("undefined"!=typeof window)try{var qn=Object.defineProperty({},"passive",{get:function(){return Wn=!0,!0}});window.addEventListener("test",qn,qn),window.removeEventListener("test",qn,qn)}catch(e){Wn=!1}var Yn=!!Wn&&{passive:!1},zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Un=function(e){return[e.deltaX,e.deltaY]},Gn=function(e){return e&&"current"in e?e.current:e},Xn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Zn=0,Hn=[];var Kn,Jn=(Kn=function(e){var n=t([]),a=t([0,0]),u=t(),l=r(Zn++)[0],s=r((function(){return In()}))[0],d=t(e);f((function(){d.current=e}),[e]),f((function(){if(e.inert){document.body.classList.add("block-interactivity-"+l);var n=[e.lockRef.current].concat((e.shards||[]).map(Gn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+l)})),function(){document.body.classList.remove("block-interactivity-"+l),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+l)}))}}}),[e.inert,e.lockRef.current,e.shards]);var p=i((function(e,n){if("touches"in e&&2===e.touches.length)return!d.current.allowPinchZoom;var t,r=zn(e),o=a.current,i="deltaX"in e?e.deltaX:o[0]-r[0],c="deltaY"in e?e.deltaY:o[1]-r[1],l=e.target,s=Math.abs(i)>Math.abs(c)?"h":"v",f=Ln(s,l);if(!f)return!0;if(f?t=s:(t="v"===s?"h":"v",f=Ln(s,l)),!f)return!1;if(!u.current&&"changedTouches"in e&&(i||c)&&(u.current=t),!t)return!0;var p=u.current||t;return function(e,n,t,r,o){var i=r,a=t.target,u=n.contains(a),c=!1,l=i>0,s=0,f=0;do{var d=Bn(e,a),p=d[0],v=d[1]-d[2]-p;(p||v)&&Vn(e,a)&&(s+=v,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(n.contains(a)||n===a));return(l&&(o&&0===s||!o&&i>s)||!l&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,n,e,"h"==p?i:c,!0)}),[]),v=i((function(e){var t=e;if(Hn.length&&Hn[Hn.length-1]===s){var r="deltaY"in t?Un(t):zn(t),o=n.current.filter((function(e){return e.name===t.type&&e.target===t.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)t.preventDefault();else if(!o){var i=(d.current.shards||[]).map(Gn).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?p(t,i[0]):!d.current.noIsolation)&&t.preventDefault()}}}),[]),y=i((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),m=i((function(e){a.current=zn(e),u.current=void 0}),[]),h=i((function(n){y(n.type,Un(n),n.target,p(n,e.lockRef.current))}),[]),b=i((function(n){y(n.type,zn(n),n.target,p(n,e.lockRef.current))}),[]);f((function(){return Hn.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",v,Yn),document.addEventListener("touchmove",v,Yn),document.addEventListener("touchstart",m,Yn),function(){Hn=Hn.filter((function(e){return e!==s})),document.removeEventListener("wheel",v,Yn),document.removeEventListener("touchmove",v,Yn),document.removeEventListener("touchstart",m,Yn)}}),[]);var g=e.removeScrollBar,w=e.inert;return o(c,null,w?o(s,{styles:Xn(l)}):null,g?o(Rn,{gapMode:"margin"}):null)},Tn.useMedium(Kn),je),Qn=u((function(e,n){return o(jn,xe({},e,{ref:n,sideCar:Jn}))}));function et(){return(et=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function nt(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Qn.classNames=jn.classNames;var tt={initialFocusRef:function(){return null},allowPinchZoom:de.bool,onDismiss:de.func},rt=u((function(n,t){var r=n.isOpen,o=void 0===r||r,i=nt(n,["isOpen"]);return f((function(){return y("dialog")}),[]),o?e.createElement(E,{"data-reach-dialog-wrapper":""},e.createElement(ot,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(rt.displayName="DialogOverlay",rt.propTypes=et({},tt,{isOpen:de.bool}));var ot=u((function(r,o){var a=r.allowPinchZoom,u=r.initialFocusRef,c=r.onClick,l=r.onDismiss,s=void 0===l?g:l,d=r.onMouseDown,p=r.onKeyDown,v=nt(r,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=t(null),m=t(null),E=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){h(n,e)}))}}),t)}(m,o),O=i((function(){u&&u.current&&u.current.focus()}),[u]);return f((function(){return m.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:b()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),g;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,i;if(r!==(null===(o=e.parentNode)||void 0===o||null===(i=o.parentNode)||void 0===i?void 0:i.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(n.push(a),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(m.current):void 0}),[]),e.createElement(Nn,{autoFocus:!0,returnFocus:!0,onActivation:O},e.createElement(Qn,{allowPinchZoom:a},e.createElement("div",Object.assign({},v,{ref:E,"data-reach-dialog-overlay":"",onClick:w(c,(function(e){y.current===e.target&&(e.stopPropagation(),s(e))})),onKeyDown:w(p,(function(e){"Escape"===e.key&&(e.stopPropagation(),s(e))})),onMouseDown:w(d,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(rt.displayName="DialogOverlay",rt.propTypes=et({},tt));var it=u((function(n,t){var r=n.onClick,o=nt(n,["onClick","onKeyDown"]);return e.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:w(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(it.displayName="DialogContent",it.propTypes={"aria-label":ut,"aria-labelledby":ut});var at=u((function(n,t){var r=n.isOpen,o=n.onDismiss,i=void 0===o?g:o,a=n.initialFocusRef,u=nt(n,["isOpen","onDismiss","initialFocusRef"]);return e.createElement(rt,{initialFocusRef:a,isOpen:r,onDismiss:i},e.createElement(it,Object.assign({ref:t},u)))}));function ut(e,n,t,r,o){var i="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+i):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+i)}"production"!==process.env.NODE_ENV&&(at.displayName="Dialog",at.propTypes={isOpen:de.bool,onDismiss:de.func,"aria-label":ut,"aria-labelledby":ut});export{it as ModalDialogPrimitiveContent,rt as ModalDialogPrimitiveOverlay}; |
@@ -1,2 +0,10 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=function(e){var o=e.children,a=e.type,i=void 0===a?"reach-portal":a,u=n.useRef(null),c=n.useRef(null),l=n.useState()[1];return n.useLayoutEffect((function(){var e=u.current.ownerDocument;return c.current=null==e?void 0:e.createElement(i),e.body.appendChild(c.current),l({}),function(){c.current&&c.current.ownerDocument&&c.current.ownerDocument.body.removeChild(c.current)}}),[i]),c.current?r.createPortal(o,c.current):t.createElement("span",{ref:u})};"production"!==process.env.NODE_ENV&&(o.displayName="Portal");process.env.NODE_ENV,l()?t.useLayoutEffect:t.useEffect;var a={},i=function(e){};if("production"!==process.env.NODE_ENV){var u=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;i=function(e){a[e]||(a[e]=!0,"test"!==u.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function c(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function l(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function s(){}function f(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}function d(){return(d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(e,n){return e(n={exports:{}},n.exports),n.exports}var y=v((function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var t="function"==typeof Symbol&&Symbol.for,r=t?Symbol.for("react.element"):60103,o=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,u=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,v=t?Symbol.for("react.suspense_list"):60120,y=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,g=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case r:switch(e=e.type){case s:case f:case a:case u:case i:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case y:case c:return e;default:return n}}case o:return n}}}function E(e){return w(e)===f}n.typeOf=w,n.AsyncMode=s,n.ConcurrentMode=f,n.ContextConsumer=l,n.ContextProvider=c,n.Element=r,n.ForwardRef=d,n.Fragment=a,n.Lazy=m,n.Memo=y,n.Portal=o,n.Profiler=u,n.StrictMode=i,n.Suspense=p,n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===u||e===i||e===p||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g)},n.isAsyncMode=function(e){return E(e)||w(e)===s},n.isConcurrentMode=E,n.isContextConsumer=function(e){return w(e)===l},n.isContextProvider=function(e){return w(e)===c},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return w(e)===d},n.isFragment=function(e){return w(e)===a},n.isLazy=function(e){return w(e)===m},n.isMemo=function(e){return w(e)===y},n.isPortal=function(e){return w(e)===o},n.isProfiler=function(e){return w(e)===u},n.isStrictMode=function(e){return w(e)===i},n.isSuspense=function(e){return w(e)===p}}));p(y);y.typeOf,y.AsyncMode,y.ConcurrentMode,y.ContextConsumer,y.ContextProvider,y.Element,y.ForwardRef,y.Fragment,y.Lazy,y.Memo,y.Portal,y.Profiler,y.StrictMode,y.Suspense,y.isValidElementType,y.isAsyncMode,y.isConcurrentMode,y.isContextConsumer,y.isContextProvider,y.isElement,y.isForwardRef,y.isFragment,y.isLazy,y.isMemo,y.isPortal,y.isProfiler,y.isStrictMode,y.isSuspense;var m=v((function(e,n){"production"!==process.env.NODE_ENV&&function(){Object.defineProperty(n,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;var g=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var o=0,a="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}},w=function(e,n){if(void 0===n)throw new Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!e){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];g.apply(void 0,[n].concat(r))}};function E(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case i:case a:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var O=l,S=s,x=c,N=u,C=t,P=f,k=o,j=y,T=v,M=r,D=i,R=a,I=d,_=!1;function F(e){return E(e)===s}n.typeOf=E,n.AsyncMode=O,n.ConcurrentMode=S,n.ContextConsumer=x,n.ContextProvider=N,n.Element=C,n.ForwardRef=P,n.Fragment=k,n.Lazy=j,n.Memo=T,n.Portal=M,n.Profiler=D,n.StrictMode=R,n.Suspense=I,n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===m||e.$$typeof===h||e.$$typeof===b)},n.isAsyncMode=function(e){return _||(_=!0,w(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||E(e)===l},n.isConcurrentMode=F,n.isContextConsumer=function(e){return E(e)===c},n.isContextProvider=function(e){return E(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return E(e)===f},n.isFragment=function(e){return E(e)===o},n.isLazy=function(e){return E(e)===y},n.isMemo=function(e){return E(e)===v},n.isPortal=function(e){return E(e)===r},n.isProfiler=function(e){return E(e)===i},n.isStrictMode=function(e){return E(e)===a},n.isSuspense=function(e){return E(e)===d}}()}));p(m);m.typeOf,m.AsyncMode,m.ConcurrentMode,m.ContextConsumer,m.ContextProvider,m.Element,m.ForwardRef,m.Fragment,m.Lazy,m.Memo,m.Portal,m.Profiler,m.StrictMode,m.Suspense,m.isValidElementType,m.isAsyncMode,m.isConcurrentMode,m.isContextConsumer,m.isContextProvider,m.isElement,m.isForwardRef,m.isFragment,m.isLazy,m.isMemo,m.isPortal,m.isProfiler,m.isStrictMode,m.isSuspense;var h=v((function(e){"production"===process.env.NODE_ENV?e.exports=y:e.exports=m})),b=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;function E(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var O=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=E(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))g.call(t,i)&&(o[i]=t[i]);if(b){r=b(t);for(var u=0;u<r.length;u++)w.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},S="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",x=function(){};if("production"!==process.env.NODE_ENV){var N=S,C={},P=Function.call.bind(Object.prototype.hasOwnProperty);x=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function k(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(P(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](n,a,r,t,null,N)}catch(e){i=e}if(!i||i instanceof Error||x((r||"React class")+": type specification of "+t+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in C)){C[i.message]=!0;var c=o?o():"";x("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}k.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(C={})};var j=k,T=Function.call.bind(Object.prototype.hasOwnProperty),M=function(){};function D(){return null}"production"!==process.env.NODE_ENV&&(M=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var R=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:i(D),arrayOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,i+"["+c+"]",S);if(s instanceof Error)return s}return null}))},element:i((function(n,t,r,o,i){var u=n[t];return e(u)?null:new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:i((function(e,n,t,r,o){var i=e[n];return h.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+l(i)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return i((function(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new a("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:i((function(e,n,t,r,o){return c(e[n])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(T(u,s)){var f=e(u,s,r,o,i+"."+s,S);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?M("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):M("Invalid argument supplied to oneOf, expected an array.")),D;function n(n,t,r,i,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new a("Invalid "+i+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return i(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&M("Invalid argument supplied to oneOfType, expected an instance of array."),D;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return M("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),D}return i((function(n,t,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,i,S))return null}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,i+"."+s,S);if(d)return d}}return null}))},exact:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=O({},n[t],e);for(var f in s){var d=e[f];if(!d)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,i+"."+f,S);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){this.message=e,this.stack=""}function i(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==S){if(n){var d=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 d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(M("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==i[u]?o?null===i[u]?new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,u,c,l,s)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function u(e){return i((function(n,t,r,o,i,u){var c=n[t];return l(c)!==e?new a("Invalid "+o+" `"+i+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,a=r.call(n);if(r!==n.entries){for(;!(o=a.next()).done;)if(!c(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!c(i[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return a.prototype=Error.prototype,r.checkPropTypes=j,r.resetWarningCache=j.resetWarningCache,r.PropTypes=r,r};function I(){}function _(){}_.resetWarningCache=I;var F=v((function(e){if("production"!==process.env.NODE_ENV){var n=h;e.exports=R(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,a){if(a!==S){var i=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 i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:_,resetWarningCache:I};return t.PropTypes=t,t}()})),A=(F.array,F.bool),$=F.func,L=(F.number,F.object),V=F.string,W=(F.symbol,F.any),q=F.node,B=(F.element,F.elementType,F.instanceOf,F.oneOf,F.oneOfType),Y=F.arrayOf;F.objectOf,F.shape,F.exact;function z(e,t){return r=t,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):null!=e&&(e.current=n),e}(e,n)}))},(a=n.useState((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var n=a.value;n!==e&&(a.value=e,a.callback(e,n))}}}}))[0]).callback=o,a.facade;var r,o,a}var U={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},G=function(e){var n=e.children;return t.createElement(t.Fragment,null,t.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:U}),n,n&&t.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:U}))};G.propTypes="production"!==process.env.NODE_ENV?{children:F.node}:{},G.defaultProps={children:null}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=(process.env.NODE_ENV,l()?t.useLayoutEffect:t.useEffect),a={},i=function(e){};if("production"!==process.env.NODE_ENV){var u=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;i=function(e){a[e]||(a[e]=!0,"test"!==u.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function c(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function l(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function s(){}function f(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var d=function(e){var a=e.children,i=e.type,u=void 0===i?"reach-portal":i,c=n.useRef(null),l=n.useRef(null),s=n.useState()[1];return o((function(){var e=c.current.ownerDocument;return l.current=null==e?void 0:e.createElement(u),e.body.appendChild(l.current),s({}),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}),[u]),l.current?r.createPortal(a,l.current):t.createElement("span",{ref:c})};function p(){return(p=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function v(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.0 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/}"production"!==process.env.NODE_ENV&&(d.displayName="Portal");var m="function"==typeof Symbol&&Symbol.for,y=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,b=m?Symbol.for("react.fragment"):60107,g=m?Symbol.for("react.strict_mode"):60108,w=m?Symbol.for("react.profiler"):60114,E=m?Symbol.for("react.provider"):60109,O=m?Symbol.for("react.context"):60110,S=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,N=m?Symbol.for("react.forward_ref"):60112,C=m?Symbol.for("react.suspense"):60113,P=m?Symbol.for("react.suspense_list"):60120,k=m?Symbol.for("react.memo"):60115,T=m?Symbol.for("react.lazy"):60116,j=m?Symbol.for("react.block"):60121,D=m?Symbol.for("react.fundamental"):60117,R=m?Symbol.for("react.responder"):60118,I=m?Symbol.for("react.scope"):60119;function M(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case y:switch(e=e.type){case S:case x:case b:case w:case g:case C:return e;default:switch(e=e&&e.$$typeof){case O:case N:case T:case k:case E:return e;default:return n}}case h:return n}}}function _(e){return M(e)===x}var F={AsyncMode:S,ConcurrentMode:x,ContextConsumer:O,ContextProvider:E,Element:y,ForwardRef:N,Fragment:b,Lazy:T,Memo:k,Portal:h,Profiler:w,StrictMode:g,Suspense:C,isAsyncMode:function(e){return _(e)||M(e)===S},isConcurrentMode:_,isContextConsumer:function(e){return M(e)===O},isContextProvider:function(e){return M(e)===E},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===y},isForwardRef:function(e){return M(e)===N},isFragment:function(e){return M(e)===b},isLazy:function(e){return M(e)===T},isMemo:function(e){return M(e)===k},isPortal:function(e){return M(e)===h},isProfiler:function(e){return M(e)===w},isStrictMode:function(e){return M(e)===g},isSuspense:function(e){return M(e)===C},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===b||e===x||e===w||e===g||e===C||e===P||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===k||e.$$typeof===E||e.$$typeof===O||e.$$typeof===N||e.$$typeof===D||e.$$typeof===R||e.$$typeof===I||e.$$typeof===j)},typeOf:M},A=v((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case i:case a:case d:return p;default:var y=p&&p.$$typeof;switch(y){case c:case f:case m:case v:case u:return y;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,C=f,P=o,k=m,T=v,j=r,D=i,R=a,I=d,M=!1;function _(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=C,n.Fragment=P,n.Lazy=k,n.Memo=T,n.Portal=j,n.Profiler=D,n.StrictMode=R,n.Suspense=I,n.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(e)||w(e)===l},n.isConcurrentMode=_,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===m},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===i},n.isStrictMode=function(e){return w(e)===a},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===y)},n.typeOf=w}()})),$=(A.AsyncMode,A.ConcurrentMode,A.ContextConsumer,A.ContextProvider,A.Element,A.ForwardRef,A.Fragment,A.Lazy,A.Memo,A.Portal,A.Profiler,A.StrictMode,A.Suspense,A.isAsyncMode,A.isConcurrentMode,A.isContextConsumer,A.isContextProvider,A.isElement,A.isForwardRef,A.isFragment,A.isLazy,A.isMemo,A.isPortal,A.isProfiler,A.isStrictMode,A.isSuspense,A.isValidElementType,A.typeOf,v((function(e){"production"===process.env.NODE_ENV?e.exports=F:e.exports=A}))),L=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;function B(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var W=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=B(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))V.call(t,i)&&(o[i]=t[i]);if(L){r=L(t);for(var u=0;u<r.length;u++)q.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",z=function(){};if("production"!==process.env.NODE_ENV){var U=Y,G={},X=Function.call.bind(Object.prototype.hasOwnProperty);z=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function Z(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(X(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](n,a,r,t,null,U)}catch(e){i=e}if(!i||i instanceof Error||z((r||"React class")+": type specification of "+t+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in G)){G[i.message]=!0;var c=o?o():"";z("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}Z.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(G={})};var H=Z,K=Function.call.bind(Object.prototype.hasOwnProperty),J=function(){};function Q(){return null}"production"!==process.env.NODE_ENV&&(J=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var ee=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:i(Q),arrayOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,i+"["+c+"]",Y);if(s instanceof Error)return s}return null}))},element:i((function(n,t,r,o,i){var u=n[t];return e(u)?null:new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:i((function(e,n,t,r,o){var i=e[n];return $.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+l(i)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return i((function(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new a("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:i((function(e,n,t,r,o){return c(e[n])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(K(u,s)){var f=e(u,s,r,o,i+"."+s,Y);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?J("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):J("Invalid argument supplied to oneOf, expected an array.")),Q;function n(n,t,r,i,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new a("Invalid "+i+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return i(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&J("Invalid argument supplied to oneOfType, expected an instance of array."),Q;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return J("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),Q}return i((function(n,t,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,i,Y))return null}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,i+"."+s,Y);if(d)return d}}return null}))},exact:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=W({},n[t],e);for(var f in s){var d=e[f];if(!d)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,i+"."+f,Y);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){this.message=e,this.stack=""}function i(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Y){if(n){var d=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 d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(J("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==i[u]?o?null===i[u]?new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,u,c,l,s)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function u(e){return i((function(n,t,r,o,i,u){var c=n[t];return l(c)!==e?new a("Invalid "+o+" `"+i+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,a=r.call(n);if(r!==n.entries){for(;!(o=a.next()).done;)if(!c(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!c(i[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return a.prototype=Error.prototype,r.checkPropTypes=H,r.resetWarningCache=H.resetWarningCache,r.PropTypes=r,r};function ne(){}function te(){}te.resetWarningCache=ne;var re=v((function(e){if("production"!==process.env.NODE_ENV){var n=$;e.exports=ee(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,a){if(a!==Y){var i=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 i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:te,resetWarningCache:ne};return t.PropTypes=t,t}()})),oe=(re.array,re.bool),ae=re.func,ie=(re.number,re.object),ue=re.string,ce=(re.symbol,re.any),le=re.node,se=(re.element,re.elementType,re.instanceOf,re.oneOf,re.oneOfType),fe=re.arrayOf;re.objectOf,re.shape,re.exact;function de(e,t){return r=t,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):null!=e&&(e.current=n),e}(e,n)}))},(a=n.useState((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var n=a.value;n!==e&&(a.value=e,a.callback(e,n))}}}}))[0]).callback=o,a.facade;var r,o,a}var pe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},ve=function(e){var n=e.children;return t.createElement(t.Fragment,null,t.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}),n,n&&t.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}))};ve.propTypes="production"!==process.env.NODE_ENV?{children:re.node}:{},ve.defaultProps={children:null}; | ||
/*! ***************************************************************************** | ||
@@ -16,2 +24,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var X=function(){return(X=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function Z(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function H(e){return e}function K(e,n){void 0===n&&(n=H);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),t={push:function(e){n.push(e),i()},filter:function(e){return n=n.filter(e),t}}}}}function J(e,n){return void 0===n&&(n=H),K(e,n)}function Q(e){void 0===e&&(e={});var n=K(null);return n.options=X({async:!0,ssr:!1},e),n}var ee=function(e){var t=e.sideCar,r=Z(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,X({},r))};ee.isSideCarExport=!0;var ne=J({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),te=J(),re=J(),oe=Q({async:!0}),ae=[],ie=t.forwardRef((function(e,r){var o,a=n.useState(),i=a[0],u=a[1],c=n.useRef(),l=n.useRef(!1),s=n.useRef(null),f=e.children,p=e.disabled,v=e.noFocusGuards,y=e.persistentFocus,m=e.autoFocus,h=e.allowTextSelection,b=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?ae:E,S=e.as,x=void 0===S?"div":S,N=e.lockProps,C=void 0===N?{}:N,P=e.sideCar,k=e.returnFocus,j=e.onActivation,T=e.onDeactivation,M=n.useState({})[0],D=n.useCallback((function(){s.current=s.current||document&&document.activeElement,c.current&&j&&j(c.current),l.current=!0}),[j]),R=n.useCallback((function(){l.current=!1,T&&T(c.current)}),[T]),I=n.useCallback((function(e){var n=s.current;if(Boolean(k)&&n&&n.focus){var t="object"==typeof k?k:void 0;s.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[k]),_=n.useCallback((function(e){l.current&&ne.useMedium(e)}),[]),F=te.useMedium,A=n.useCallback((function(e){c.current!==e&&(c.current=e,u(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==h&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),t.useEffect((function(){c.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var $=d(((o={})["data-focus-lock-disabled"]=p&&"disabled",o["data-focus-lock"]=b,o),C),L=!0!==v,V=L&&"tail"!==v,W=z([r,A]);return t.createElement(t.Fragment,null,L&&[t.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:p?-1:0,style:U}),t.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:p?-1:1,style:U})],!p&&t.createElement(P,{id:M,sideCar:oe,observed:i,disabled:p,persistentFocus:y,autoFocus:m,whiteList:w,shards:O,onActivation:D,onDeactivation:R,returnFocus:I}),t.createElement(x,d({ref:W},$,{className:g,onBlur:F,onFocus:_}),f),V&&t.createElement("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:U}))}));ie.propTypes="production"!==process.env.NODE_ENV?{children:q,disabled:A,returnFocus:B([A,L]),noFocusGuards:A,allowTextSelection:A,autoFocus:A,persistentFocus:A,group:V,className:V,whiteList:$,shards:Y(W),as:B([V,$,L]),lockProps:L,onActivation:$,onDeactivation:$,sideCar:W.isRequired}:{},ie.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,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 ue=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},ce=function(e){return Array.isArray(e)?e:[e]},le=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},se=function(e,n,t){return ue(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(le)},fe=["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]"],de=fe.join(","),pe=de+", [data-focus-guard]",ve=function(e,n){return e.reduce((function(e,t){return e.concat(ue(t.querySelectorAll(n?pe:de)),t.parentNode?ue(t.parentNode.querySelectorAll(fe.join(","))).filter((function(e){return e===t})):[])}),[])},ye=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},me=function(e,n){for(var t=ye(e),r=ye(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},he=function(e){return ue(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},be=function(e,n){return se(he(ve(e,n)),!0,n)},ge=function(e){return he((n=e.querySelectorAll("[data-autofocus-inside]"),ue(n).map((function(e){return ve([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},we=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Ee=function(e){return e[0]&&e.length>1&&we(e[0])&&e[0].name?function(e,n){return n.filter(we).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e[0],e):e[0]},Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se=function(e){return ce(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},a=0;a<t;a+=1){var i=o(a);if("object"===(void 0===i?"undefined":Oe(i)))return i.v}return n}(ue(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},xe=function(e){return e.dataset&&e.dataset.focusGuard},Ne=function(e){return!xe(e)},Ce=function(e,n,t){var r=ce(e),o=ce(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=me(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=me(a,e);n&&(i=!i||n.contains(i)?n:me(n,i))}))})),i},Pe=function(e,n){var t=document&&document.activeElement,r=Se(e).filter(Ne),o=Ce(t||e,e,r),a=be(r).filter((function(e){var n=e.node;return Ne(n)}));if(a[0]||(a=(i=r,se(he(ve(i)),!1)).filter((function(e){var n=e.node;return Ne(n)})))[0]){var i,u,c,l,s,f=be([o]).map((function(e){return e.node})),d=(u=f,c=a,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var a=e.length,i=e[0],u=e[a-1];if(!(e.indexOf(t)>=0)){var c=n.indexOf(t),l=n.indexOf(r||c),s=e.indexOf(r),f=c-l,d=n.indexOf(i),p=n.indexOf(u);return-1===c||-1===s?e.indexOf(o.length?Ee(o):Ee(e)):!f&&s>=0?s:c<=d&&xe(t)&&Math.abs(f)>1?0:f&&Math.abs(f)>1?s:c<=d?a-1:c>p?0:f?Math.abs(f)>1?s:(a+s+f)%a:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(ge(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},ke=function(e){return e===document.activeElement},je=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Se(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=ue(e.querySelectorAll("iframe")),t=ke,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},Te=0,Me=!1,De=function(e,n){var t,r=Pe(e,n);if(!Me&&r){if(Te>2)return 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,void setTimeout((function(){Me=!1}),1);Te++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),Te--}};function Re(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var Ie=function(){return document&&document.activeElement===document.body||document&&ue(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},_e=null,Fe=null,Ae=null,$e=!1,Le=function(){return!0};function Ve(e,n,t,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=t)!==n);o&&(o.node.tabIndex=0)}var We=function(e){return e&&"current"in e?e.current:e},qe=function(){var e,n,t,r,o,a,i=!1;if(_e){var u=_e,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=c||Ae&&Ae.portaledElement,p=document&&document.activeElement;if(d){var v=[d].concat(f.map(We).filter(Boolean));if(p&&!function(e){return(_e.whiteList||Le)(e)}(p)||(l||$e||!Ie()||!Fe&&s)&&(!d||je(v)||(a=p,Ae&&Ae.portaledElement===a)||(document&&!Fe&&p&&!s?(p.blur(),document.body.focus()):(i=De(v,Fe),Ae={})),$e=!1,Fe=document&&document.activeElement),document){var y=document&&document.activeElement,m=(n=Se(e=v).filter(Ne),t=Ce(e,e,n),r=be([t],!0),o=be(n).filter((function(e){var n=e.node;return Ne(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:xe(n)}}))),h=m.find((function(e){return e.node===y}));if(h){m.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var b=m.indexOf(h);Ve(b,m.length,1,m),Ve(b,-1,-1,m)}}}}return i},Be=function(e){qe()&&e&&(e.stopPropagation(),e.preventDefault())},Ye=function(){return Re(qe)},ze=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(Ae={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&F.node.isRequired;var Ue=function(){$e=!0};ne.assignSyncMedium(ze),te.assignMedium(Ye),re.assignMedium((function(e){return e({moveFocusInside:De,focusInside:je})}));var Ge=function(e,r){if("production"!==process.env.NODE_ENV){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof r)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(o){if("production"!==process.env.NODE_ENV&&"function"!=typeof o)throw new Error("Expected WrappedComponent to be a React component.");var a,i=[];function u(){a=e(i.map((function(e){return e.props}))),r(a)}var c,l,s,f=function(e){var n,r;function c(){return e.apply(this,arguments)||this}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.peek=function(){return a};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return t.createElement(o,this.props)},c}(n.PureComponent);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(o)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!_e&&(document.addEventListener("focusin",Be,!0),document.addEventListener("focusout",Ye),window.addEventListener("blur",Ue));var t=_e,r=t&&n&&n.id===t.id;_e=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(Fe=null,r&&t.observed===n.observed||n.onActivation(),qe(),Re(qe)):(document.removeEventListener("focusin",Be,!0),document.removeEventListener("focusout",Ye),window.removeEventListener("blur",Ue),Fe=null)}))((function(){return null})),Xe=t.forwardRef((function(e,n){return t.createElement(ie,d({sideCar:Ge,ref:n},e))})),Ze=ie.propTypes||{},He=(Ze.sideCar,function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(Ze,["sideCar"]));Xe.propTypes=He;var Ke=Q(),Je=function(){},Qe=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Je,onWheelCapture:Je,onTouchMoveCapture:Je}),a=o[0],i=o[1],u=e.forwardProps,c=e.children,l=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,v=e.noIsolation,y=e.inert,m=e.allowPinchZoom,h=Z(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),b=p,g=X({ref:z([r,t])},h,a);return n.createElement(n.Fragment,null,f&&n.createElement(b,{sideCar:Ke,removeScrollBar:s,shards:d,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!m,lockRef:r}),u?n.cloneElement(n.Children.only(c),g):n.createElement("div",X({},g,{className:l}),c))}));Qe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qe.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var en=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");return e.type="text/css",e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},nn=function(){var e,t=(e=en(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},tn={left:0,top:0,right:0,gap:0},rn=function(e){return parseInt(e||"",10)||0},on=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return tn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[rn(t),rn(r),rn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},an=nn(),un=function(e,n,t,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+a+"px;\n padding-right: "+i+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},cn=function(e){var t=n.useState(on(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(on(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(an,{styles:un(r,!a,c,i?"":"!important")})},ln=function(e,n){var t=n;do{if(sn(e,t)){var r=fn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},sn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},fn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},dn=!1;if("undefined"!=typeof window)try{var pn=Object.defineProperty({},"passive",{get:function(){return dn=!0,!0}});window.addEventListener("test",pn,pn),window.removeEventListener("test",pn,pn)}catch(e){dn=!1}var vn=!!dn&&{passive:!1},yn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mn=function(e){return[e.deltaX,e.deltaY]},hn=function(e){return e&&"current"in e?e.current:e},bn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},gn=0,wn=[];var En,On=(En=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(gn++)[0],i=n.useState((function(){return nn()}))[0],u=n.useRef(e);n.useEffect((function(){u.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var n=[e.lockRef.current].concat((e.shards||[]).map(hn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+a)})),function(){document.body.classList.remove("block-interactivity-"+a),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+a)}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=n.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var t,a=yn(e),i=r.current,c="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],s=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v",d=ln(f,s);if(!d)return!0;if(d?t=f:(t="v"===f?"h":"v",d=ln(f,s)),!d)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=t),!t)return!0;var p=o.current||t;return function(e,n,t,r,o){var a=r,i=t.target,u=n.contains(i),c=!1,l=a>0,s=0,f=0;do{var d=fn(e,i),p=d[0],v=d[1]-d[2]-p;(p||v)&&sn(e,i)&&(s+=v,f+=p),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(l&&(o&&0===s||!o&&a>s)||!l&&(o&&0===f||!o&&-a>f))&&(c=!0),c}(p,n,e,"h"==p?c:l,!0)}),[]),l=n.useCallback((function(e){var n=e;if(wn.length&&wn[wn.length-1]===i){var r="deltaY"in n?mn(n):yn(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.preventDefault();else if(!o){var a=(u.current.shards||[]).map(hn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?c(n,a[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=n.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=n.useCallback((function(e){r.current=yn(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,mn(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,yn(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return wn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,vn),document.addEventListener("touchmove",l,vn),document.addEventListener("touchstart",f,vn),function(){wn=wn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,vn),document.removeEventListener("touchmove",l,vn),document.removeEventListener("touchstart",f,vn)}}),[]);var v=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(i,{styles:bn(a)}):null,v?n.createElement(cn,{gapMode:"margin"}):null)},Ke.useMedium(En),ee),Sn=n.forwardRef((function(e,t){return n.createElement(Qe,X({},e,{ref:t,sideCar:On}))}));function xn(){return(xn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Nn(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Sn.classNames=Qe.classNames;var Cn={initialFocusRef:function(){return null},allowPinchZoom:F.bool,onDismiss:F.func},Pn=n.forwardRef((function(e,r){var a=e.isOpen,u=void 0===a||a,c=Nn(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),u?t.createElement(o,{"data-reach-dialog-wrapper":""},t.createElement(kn,Object.assign({ref:r},c))):null}));"production"!==process.env.NODE_ENV&&(Pn.displayName="DialogOverlay",Pn.propTypes=xn({},Cn,{isOpen:F.bool}));var kn=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.initialFocusRef,i=e.onClick,u=e.onDismiss,d=void 0===u?s:u,p=e.onMouseDown,v=e.onKeyDown,y=Nn(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),m=n.useRef(null),h=n.useRef(null),b=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useMemo((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){c(n,e)}))}}),t)}(h,r),g=n.useCallback((function(){a&&a.current&&a.current.focus()}),[a]);return n.useEffect((function(){return h.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:l()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),s;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,a;if(r!==(null===(o=e.parentNode)||void 0===o||null===(a=o.parentNode)||void 0===a?void 0:a.parentNode)){var i=r.getAttribute("aria-hidden");null!==i&&"false"!==i||(n.push(i),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(h.current):void 0}),[]),t.createElement(Xe,{autoFocus:!0,returnFocus:!0,onActivation:g},t.createElement(Sn,{allowPinchZoom:o},t.createElement("div",Object.assign({},y,{ref:b,"data-reach-dialog-overlay":"",onClick:f(i,(function(e){m.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:f(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:f(p,(function(e){m.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Pn.displayName="DialogOverlay",Pn.propTypes=xn({},Cn));var jn=n.forwardRef((function(e,n){var r=e.onClick,o=Nn(e,["onClick","onKeyDown"]);return t.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:n,"data-reach-dialog-content":"",onClick:f(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(jn.displayName="DialogContent",jn.propTypes={"aria-label":Mn,"aria-labelledby":Mn});var Tn=n.forwardRef((function(e,n){var r=e.isOpen,o=e.onDismiss,a=void 0===o?s:o,i=e.initialFocusRef,u=Nn(e,["isOpen","onDismiss","initialFocusRef"]);return t.createElement(Pn,{initialFocusRef:i,isOpen:r,onDismiss:a},t.createElement(jn,Object.assign({ref:n},u)))}));function Mn(e,n,t,r,o){var a="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+a):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+a)}"production"!==process.env.NODE_ENV&&(Tn.displayName="Dialog",Tn.propTypes={isOpen:F.bool,onDismiss:F.func,"aria-label":Mn,"aria-labelledby":Mn}),exports.ModalDialogPrimitiveContent=jn,exports.ModalDialogPrimitiveOverlay=Pn; | ||
var me=function(){return(me=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ye(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function he(e){return e}function be(e,n){void 0===n&&(n=he);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),t={push:function(e){n.push(e),i()},filter:function(e){return n=n.filter(e),t}}}}}function ge(e,n){return void 0===n&&(n=he),be(e,n)}function we(e){void 0===e&&(e={});var n=be(null);return n.options=me({async:!0,ssr:!1},e),n}var Ee=function(e){var t=e.sideCar,r=ye(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,me({},r))};Ee.isSideCarExport=!0;var Oe=ge({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Se=ge(),xe=ge(),Ne=we({async:!0}),Ce=[],Pe=t.forwardRef((function(e,r){var o,a=n.useState(),i=a[0],u=a[1],c=n.useRef(),l=n.useRef(!1),s=n.useRef(null),f=e.children,d=e.disabled,v=e.noFocusGuards,m=e.persistentFocus,y=e.autoFocus,h=e.allowTextSelection,b=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?Ce:E,S=e.as,x=void 0===S?"div":S,N=e.lockProps,C=void 0===N?{}:N,P=e.sideCar,k=e.returnFocus,T=e.onActivation,j=e.onDeactivation,D=n.useState({})[0],R=n.useCallback((function(){s.current=s.current||document&&document.activeElement,c.current&&T&&T(c.current),l.current=!0}),[T]),I=n.useCallback((function(){l.current=!1,j&&j(c.current)}),[j]),M=n.useCallback((function(e){var n=s.current;if(Boolean(k)&&n&&n.focus){var t="object"==typeof k?k:void 0;s.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[k]),_=n.useCallback((function(e){l.current&&Oe.useMedium(e)}),[]),F=Se.useMedium,A=n.useCallback((function(e){c.current!==e&&(c.current=e,u(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==h&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),t.useEffect((function(){c.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var $=p(((o={})["data-focus-lock-disabled"]=d&&"disabled",o["data-focus-lock"]=b,o),C),L=!0!==v,V=L&&"tail"!==v,q=de([r,A]);return t.createElement(t.Fragment,null,L&&[t.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:d?-1:0,style:pe}),t.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:d?-1:1,style:pe})],!d&&t.createElement(P,{id:D,sideCar:Ne,observed:i,disabled:d,persistentFocus:m,autoFocus:y,whiteList:w,shards:O,onActivation:R,onDeactivation:I,returnFocus:M}),t.createElement(x,p({ref:q},$,{className:g,onBlur:F,onFocus:_}),f),V&&t.createElement("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:pe}))}));Pe.propTypes="production"!==process.env.NODE_ENV?{children:le,disabled:oe,returnFocus:se([oe,ie]),noFocusGuards:oe,allowTextSelection:oe,autoFocus:oe,persistentFocus:oe,group:ue,className:ue,whiteList:ae,shards:fe(ce),as:se([ue,ae,ie]),lockProps:ie,onActivation:ae,onDeactivation:ae,sideCar:ce.isRequired}:{},Pe.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var ke=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Te=function(e){return Array.isArray(e)?e:[e]},je=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},De=function(e,n,t){return ke(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(je)},Re=["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]"],Ie=Re.join(","),Me=Ie+", [data-focus-guard]",_e=function(e,n){return e.reduce((function(e,t){return e.concat(ke(t.querySelectorAll(n?Me:Ie)),t.parentNode?ke(t.parentNode.querySelectorAll(Re.join(","))).filter((function(e){return e===t})):[])}),[])},Fe=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ae=function(e,n){for(var t=Fe(e),r=Fe(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},$e=function(e){return ke(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Le=function(e,n){return De($e(_e(e,n)),!0,n)},Ve=function(e){return $e((n=e.querySelectorAll("[data-autofocus-inside]"),ke(n).map((function(e){return _e([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},qe=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Be=function(e){return e[0]&&e.length>1&&qe(e[0])&&e[0].name?function(e,n){return n.filter(qe).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e[0],e):e[0]},We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye=function(e){return Te(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},a=0;a<t;a+=1){var i=o(a);if("object"===(void 0===i?"undefined":We(i)))return i.v}return n}(ke(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},ze=function(e){return e.dataset&&e.dataset.focusGuard},Ue=function(e){return!ze(e)},Ge=function(e,n,t){var r=Te(e),o=Te(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=Ae(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=Ae(a,e);n&&(i=!i||n.contains(i)?n:Ae(n,i))}))})),i},Xe=function(e,n){var t=document&&document.activeElement,r=Ye(e).filter(Ue),o=Ge(t||e,e,r),a=Le(r).filter((function(e){var n=e.node;return Ue(n)}));if(a[0]||(a=(i=r,De($e(_e(i)),!1)).filter((function(e){var n=e.node;return Ue(n)})))[0]){var i,u,c,l,s,f=Le([o]).map((function(e){return e.node})),d=(u=f,c=a,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var a=e.length,i=e[0],u=e[a-1];if(!(e.indexOf(t)>=0)){var c=n.indexOf(t),l=n.indexOf(r||c),s=e.indexOf(r),f=c-l,d=n.indexOf(i),p=n.indexOf(u);return-1===c||-1===s?e.indexOf(o.length?Be(o):Be(e)):!f&&s>=0?s:c<=d&&ze(t)&&Math.abs(f)>1?0:f&&Math.abs(f)>1?s:c<=d?a-1:c>p?0:f?Math.abs(f)>1?s:(a+s+f)%a:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ve(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},Ze=function(e){return e===document.activeElement},He=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Ye(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=ke(e.querySelectorAll("iframe")),t=Ze,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},Ke=0,Je=!1,Qe=function(e,n){var t,r=Xe(e,n);if(!Je&&r){if(Ke>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Je=!0,void setTimeout((function(){Je=!1}),1);Ke++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),Ke--}};function en(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var nn=function(){return document&&document.activeElement===document.body||document&&ke(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},tn=null,rn=null,on=null,an=!1,un=function(){return!0};function cn(e,n,t,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=t)!==n);o&&(o.node.tabIndex=0)}var ln=function(e){return e&&"current"in e?e.current:e},sn=function(){var e,n,t,r,o,a,i=!1;if(tn){var u=tn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=c||on&&on.portaledElement,p=document&&document.activeElement;if(d){var v=[d].concat(f.map(ln).filter(Boolean));if(p&&!function(e){return(tn.whiteList||un)(e)}(p)||(l||an||!nn()||!rn&&s)&&(!d||He(v)||(a=p,on&&on.portaledElement===a)||(document&&!rn&&p&&!s?(p.blur(),document.body.focus()):(i=Qe(v,rn),on={})),an=!1,rn=document&&document.activeElement),document){var m=document&&document.activeElement,y=(n=Ye(e=v).filter(Ue),t=Ge(e,e,n),r=Le([t],!0),o=Le(n).filter((function(e){var n=e.node;return Ue(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:ze(n)}}))),h=y.find((function(e){return e.node===m}));if(h){y.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var b=y.indexOf(h);cn(b,y.length,1,y),cn(b,-1,-1,y)}}}}return i},fn=function(e){sn()&&e&&(e.stopPropagation(),e.preventDefault())},dn=function(){return en(sn)},pn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(on={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&re.node.isRequired;var vn=function(){an=!0};Oe.assignSyncMedium(pn),Se.assignMedium(dn),xe.assignMedium((function(e){return e({moveFocusInside:Qe,focusInside:He})}));var mn=function(e,r){if("production"!==process.env.NODE_ENV){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof r)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(o){if("production"!==process.env.NODE_ENV&&"function"!=typeof o)throw new Error("Expected WrappedComponent to be a React component.");var a,i=[];function u(){a=e(i.map((function(e){return e.props}))),r(a)}var c,l,s,f=function(e){var n,r;function c(){return e.apply(this,arguments)||this}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.peek=function(){return a};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return t.createElement(o,this.props)},c}(n.PureComponent);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(o)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!tn&&(document.addEventListener("focusin",fn,!0),document.addEventListener("focusout",dn),window.addEventListener("blur",vn));var t=tn,r=t&&n&&n.id===t.id;tn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(rn=null,r&&t.observed===n.observed||n.onActivation(),sn(),en(sn)):(document.removeEventListener("focusin",fn,!0),document.removeEventListener("focusout",dn),window.removeEventListener("blur",vn),rn=null)}))((function(){return null})),yn=t.forwardRef((function(e,n){return t.createElement(Pe,p({sideCar:mn,ref:n},e))})),hn=Pe.propTypes||{},bn=(hn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(hn,["sideCar"]));yn.propTypes=bn;var gn=we(),wn=function(){},En=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),a=o[0],i=o[1],u=e.forwardProps,c=e.children,l=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,h=ye(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),b=p,g=me({ref:de([r,t])},h,a);return n.createElement(n.Fragment,null,f&&n.createElement(b,{sideCar:gn,removeScrollBar:s,shards:d,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),u?n.cloneElement(n.Children.only(c),g):n.createElement("div",me({},g,{className:l}),c))}));En.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},En.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var On=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");return e.type="text/css",e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Sn=function(){var e,t=(e=On(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},xn={left:0,top:0,right:0,gap:0},Nn=function(e){return parseInt(e||"",10)||0},Cn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return xn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[Nn(t),Nn(r),Nn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Pn=Sn(),kn=function(e,n,t,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+a+"px;\n padding-right: "+i+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Tn=function(e){var t=n.useState(Cn(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(Cn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(Pn,{styles:kn(r,!a,c,i?"":"!important")})},jn=function(e,n){var t=n;do{if(Dn(e,t)){var r=Rn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Dn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Rn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},In=!1;if("undefined"!=typeof window)try{var Mn=Object.defineProperty({},"passive",{get:function(){return In=!0,!0}});window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch(e){In=!1}var _n=!!In&&{passive:!1},Fn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},An=function(e){return[e.deltaX,e.deltaY]},$n=function(e){return e&&"current"in e?e.current:e},Ln=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Vn=0,qn=[];var Bn,Wn=(Bn=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(Vn++)[0],i=n.useState((function(){return Sn()}))[0],u=n.useRef(e);n.useEffect((function(){u.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var n=[e.lockRef.current].concat((e.shards||[]).map($n)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+a)})),function(){document.body.classList.remove("block-interactivity-"+a),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+a)}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=n.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var t,a=Fn(e),i=r.current,c="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],s=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v",d=jn(f,s);if(!d)return!0;if(d?t=f:(t="v"===f?"h":"v",d=jn(f,s)),!d)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=t),!t)return!0;var p=o.current||t;return function(e,n,t,r,o){var a=r,i=t.target,u=n.contains(i),c=!1,l=a>0,s=0,f=0;do{var d=Rn(e,i),p=d[0],v=d[1]-d[2]-p;(p||v)&&Dn(e,i)&&(s+=v,f+=p),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(l&&(o&&0===s||!o&&a>s)||!l&&(o&&0===f||!o&&-a>f))&&(c=!0),c}(p,n,e,"h"==p?c:l,!0)}),[]),l=n.useCallback((function(e){var n=e;if(qn.length&&qn[qn.length-1]===i){var r="deltaY"in n?An(n):Fn(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var a=(u.current.shards||[]).map($n).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?c(n,a[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=n.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=n.useCallback((function(e){r.current=Fn(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,An(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,Fn(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return qn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,_n),document.addEventListener("touchmove",l,_n),document.addEventListener("touchstart",f,_n),function(){qn=qn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,_n),document.removeEventListener("touchmove",l,_n),document.removeEventListener("touchstart",f,_n)}}),[]);var v=e.removeScrollBar,m=e.inert;return n.createElement(n.Fragment,null,m?n.createElement(i,{styles:Ln(a)}):null,v?n.createElement(Tn,{gapMode:"margin"}):null)},gn.useMedium(Bn),Ee),Yn=n.forwardRef((function(e,t){return n.createElement(En,me({},e,{ref:t,sideCar:Wn}))}));function zn(){return(zn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Un(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Yn.classNames=En.classNames;var Gn={initialFocusRef:function(){return null},allowPinchZoom:re.bool,onDismiss:re.func},Xn=n.forwardRef((function(e,r){var o=e.isOpen,a=void 0===o||o,u=Un(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),a?t.createElement(d,{"data-reach-dialog-wrapper":""},t.createElement(Zn,Object.assign({ref:r},u))):null}));"production"!==process.env.NODE_ENV&&(Xn.displayName="DialogOverlay",Xn.propTypes=zn({},Gn,{isOpen:re.bool}));var Zn=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.initialFocusRef,i=e.onClick,u=e.onDismiss,d=void 0===u?s:u,p=e.onMouseDown,v=e.onKeyDown,m=Un(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=n.useRef(null),h=n.useRef(null),b=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useMemo((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){c(n,e)}))}}),t)}(h,r),g=n.useCallback((function(){a&&a.current&&a.current.focus()}),[a]);return n.useEffect((function(){return h.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:l()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),s;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,a;if(r!==(null===(o=e.parentNode)||void 0===o||null===(a=o.parentNode)||void 0===a?void 0:a.parentNode)){var i=r.getAttribute("aria-hidden");null!==i&&"false"!==i||(n.push(i),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(h.current):void 0}),[]),t.createElement(yn,{autoFocus:!0,returnFocus:!0,onActivation:g},t.createElement(Yn,{allowPinchZoom:o},t.createElement("div",Object.assign({},m,{ref:b,"data-reach-dialog-overlay":"",onClick:f(i,(function(e){y.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:f(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:f(p,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Xn.displayName="DialogOverlay",Xn.propTypes=zn({},Gn));var Hn=n.forwardRef((function(e,n){var r=e.onClick,o=Un(e,["onClick","onKeyDown"]);return t.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:n,"data-reach-dialog-content":"",onClick:f(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(Hn.displayName="DialogContent",Hn.propTypes={"aria-label":Jn,"aria-labelledby":Jn});var Kn=n.forwardRef((function(e,n){var r=e.isOpen,o=e.onDismiss,a=void 0===o?s:o,i=e.initialFocusRef,u=Un(e,["isOpen","onDismiss","initialFocusRef"]);return t.createElement(Xn,{initialFocusRef:i,isOpen:r,onDismiss:a},t.createElement(Hn,Object.assign({ref:n},u)))}));function Jn(e,n,t,r,o){var a="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+a):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+a)}"production"!==process.env.NODE_ENV&&(Kn.displayName="Dialog",Kn.propTypes={isOpen:re.bool,onDismiss:re.func,"aria-label":Jn,"aria-labelledby":Jn}),exports.ModalDialogPrimitiveContent=Hn,exports.ModalDialogPrimitiveOverlay=Xn; |
{ | ||
"name": "@twilio-paste/modal-dialog-primitive", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"category": "overlay", | ||
@@ -21,4 +21,5 @@ "status": "beta", | ||
"scripts": { | ||
"build": "yarn clean && yarn compile && yarn props-gen", | ||
"build": "yarn clean && yarn compile", | ||
"build:dev": "yarn clean && yarn compile:dev", | ||
"build:props": "typedoc --tsconfig ./tsconfig.json --json ./dist/prop-types.json", | ||
"clean": "rm -rf ./dist && rm -rf tsconfig.build.tsbuildinfo && rm -rf .rpt2_cache", | ||
@@ -28,3 +29,2 @@ "compile": "rollup -c --environment NODE_ENV:production", | ||
"prepublishOnly": "yarn build", | ||
"props-gen": "typedoc --tsconfig ./tsconfig.json --json ./dist/prop-types.json", | ||
"type-check": "tsc --noEmit" | ||
@@ -50,3 +50,3 @@ }, | ||
}, | ||
"gitHead": "2cf3ec5e09466356561b22bb22d4402d93ebaabd" | ||
"gitHead": "16be21f00814952f3e8f816fff75437a7390d15f" | ||
} |
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
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
90307
7
359