freemium-ui 1.0.214 → 1.0.217

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs.js CHANGED
@@ -945,7 +945,7 @@ object-assign
945
945
  border: unset;
946
946
  resize: none;
947
947
  ${({theme:{colors:{components:{input:e}},typography:t,layout:{radius:n}},isErrored:r})=>`\n font-size : ${t.input.textarea.fontSize};\n line-height: ${t.input.textarea.lineHeight};\n font-weight: ${t.input.textarea.fontWeight};\n border-radius: ${n};\n &::placeholder {\n color : ${e.primary.hoverBorderColor};\n }\n`}
948
- `,Ys=t.forwardRef(((e,t)=>{const{inputStyle:r,style:a,disabled:o,className:c,...i}=e;return n.createElement(Fs,{isRequired:e.isRequired,inline:e.inline,isErrored:e.isErrored,style:a},e.label&&n.createElement("label",{className:"input-label"},e.label),n.createElement("div",{className:"input-container"},e.startLabel&&n.createElement("div",{className:"start-label"},e.startLabel),n.createElement("div",{className:`input-basic ${c||""}`},e.startAdornment&&n.createElement("div",{className:"start-adornment"},e.startAdornment),n.createElement(js,Object.assign({autoComplete:"off"},i,{ref:t,disabled:o,style:r})),e.showCount&&e.maxLength&&e.maxLength>0&&n.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${e.maxLength}`),e.endAdornment&&n.createElement("div",{className:"end-adornment"},e.endAdornment)),e.endLabel&&n.createElement("div",{className:"end-label"},e.endLabel)),e.isErrored&&e.errorText&&n.createElement("span",{className:"input-helper"},e.errorText))})),$s=t.forwardRef(((e,t)=>{const{inputStyle:r,style:a,className:o,...c}=e;return n.createElement(Fs,{isRequired:e.isRequired,inline:e.inline,isErrored:e.isErrored,style:a},e.label&&n.createElement("label",{className:"input-label"},e.label),n.createElement("div",{className:"input-container"},e.startLabel&&n.createElement("div",{className:"start-label"},e.startLabel),n.createElement("div",{className:`input-basic ${o||""}`},e.startAdornment&&n.createElement("div",{className:"start-adornment"},e.startAdornment),n.createElement(Bs,Object.assign({autoComplete:"off"},c,{ref:t,style:r})),e.endAdornment&&n.createElement("div",{className:"end-adornment"},e.endAdornment)),e.endLabel&&n.createElement("div",{className:"end-label"},e.endLabel)),e.isErrored&&e.errorText&&n.createElement("span",{className:"input-helper"},e.errorText))})),Ws=ot(Ys,Ts),Us=ot($s,Ts);function Ks(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Gs=Ks()?t.useLayoutEffect:t.useEffect;var qs="production"===process.env.NODE_ENV;function Zs(e,t){if(!qs){if(e)return;var n="Warning: "+t;"undefined"!=typeof console&&console.warn(n);try{throw Error(n)}catch(e){}}}var Xs=function(e){var n,r=e.children,a=e.type,o=void 0===a?"reach-portal":a,i=e.containerRef,s=t.useRef(null),l=t.useRef(null),h=(n=t.useState(Object.create(null))[1],t.useCallback((function(){n(Object.create(null))}),[]));return"production"!==process.env.NODE_ENV&&t.useEffect((function(){null!=i&&("production"!==process.env.NODE_ENV&&Zs("object"==typeof i&&"current"in i,"@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."),"production"!==process.env.NODE_ENV&&Zs(!i||null!=i.current,"@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))}),[i]),Gs((function(){if(s.current){var e=s.current.ownerDocument,t=(null==i?void 0:i.current)||e.body;return l.current=null==e?void 0:e.createElement(o),t.appendChild(l.current),h(),function(){l.current&&t&&t.removeChild(l.current)}}}),[o,h,i]),l.current?c.createPortal(r,l.current):t.createElement("span",{ref:s})};"production"!==process.env.NODE_ENV&&(Xs.displayName="Portal");var Js,Qs=["bottom","height","left","right","top","width"],el=new Map,tl=function e(){var t=[];el.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),Qs.some((function(n){return e[n]!==t[n]}))})(r,e.rect)&&(e.rect=r,t.push(e))})),t.forEach((function(e){e.callbacks.forEach((function(t){return t(e.rect)}))})),Js=window.requestAnimationFrame(e)};function nl(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var rl=nl()?t.useLayoutEffect:t.useEffect;function al(e){return"boolean"==typeof e}function ol(e){return!(!e||"[object Function]"!={}.toString.call(e))}var cl=function(e){var n=e.onChange,r=e.observe,a=void 0===r||r,o=e.children,c=t.useRef(null);return o({ref:c,rect:il(c,{observe:a,onChange:n})})};function il(e,n,r){var a,o,c;al(n)?a=n:(a=null==(c=null==n?void 0:n.observe)||c,o=null==n?void 0:n.onChange);ol(r)&&(o=r),"production"!==process.env.NODE_ENV&&(t.useEffect((function(){"production"!==process.env.NODE_ENV&&Zs(!al(n),"Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")}),[n]),t.useEffect((function(){"production"!==process.env.NODE_ENV&&Zs(!ol(r),"Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")}),[r]));var i=t.useState(e.current),s=i[0],l=i[1],h=t.useRef(!1),u=t.useRef(!1),p=t.useState(null),d=p[0],m=p[1],v=t.useRef(o);return rl((function(){v.current=o,e.current!==s&&l(e.current)})),rl((function(){s&&!h.current&&(h.current=!0,m(s.getBoundingClientRect()))}),[s]),rl((function(){if(a){var t=s;if(u.current||(u.current=!0,t=e.current),t){var n,r,o=(n=t,r=function(e){null==v.current||v.current(e),m(e)},{observe:function(){var e=0===el.size;el.has(n)?el.get(n).callbacks.push(r):el.set(n,{rect:void 0,hasRectChanged:!1,callbacks:[r]}),e&&tl()},unobserve:function(){var e=el.get(n);if(e){var t=e.callbacks.indexOf(r);t>=0&&e.callbacks.splice(t,1),e.callbacks.length||el.delete(n),el.size||cancelAnimationFrame(Js)}}});return o.observe(),function(){o.unobserve()}}"production"!==process.env.NODE_ENV&&console.warn("You need to place the ref")}}),[a,s,e]),d}function sl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ll(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function hl(e,t){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(t);else try{e.current=t}catch(n){throw new Error('Cannot assign value "'+t+'" to ref "'+e+'"')}}"production"!==process.env.NODE_ENV&&(cl.displayName="Rect",cl.propTypes={children:ro.func.isRequired,observe:ro.bool,onChange:ro.func});var ul=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],pl=ul.join(","),dl="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function ml(e,t){t=t||{};var n,r,a,o=[],c=[],i=e.querySelectorAll(pl);for(t.includeContainer&&dl.call(e,pl)&&(i=Array.prototype.slice.apply(i)).unshift(e),n=0;n<i.length;n++)vl(r=i[n])&&(0===(a=bl(r))?o.push(r):c.push({documentOrder:n,tabIndex:a,node:r}));return c.sort(zl).map((function(e){return e.node})).concat(o)}function vl(e){return!(!fl(e)||function(e){return function(e){return yl(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||bl(e)<0)}function fl(e){return!(e.disabled||function(e){return yl(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}ml.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==dl.call(e,pl)&&vl(e)},ml.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==dl.call(e,gl)&&fl(e)};var gl=ul.concat("iframe").join(",");function bl(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function zl(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function yl(e){return"INPUT"===e.tagName}var Ml=ml;function xl(){return xl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xl.apply(this,arguments)}var wl=["as","targetRef","position","unstable_observableRefs"],Hl=t.forwardRef((function(e,n){return t.createElement(Xs,null,t.createElement(Cl,xl({ref:n},e)))}));"production"!==process.env.NODE_ENV&&(Hl.displayName="Popover");var Cl=t.forwardRef((function(e,n){var r=e.as,a=void 0===r?"div":r,o=e.targetRef,c=e.position,i=void 0===c?Ll:c,s=e.unstable_observableRefs,l=void 0===s?[]:s,h=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,wl),u=t.useRef(null),p=il(u,{observe:!h.hidden}),d=il(o,{observe:!h.hidden}),m=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.useCallback((function(e){for(var t,r=ll(n);!(t=r()).done;)hl(t.value,e)}),n)}(u,n);return function(e,n){var r=(a=e.current,Ks()?a?a.ownerDocument:document:null);var a;function o(e){"Tab"===e.key&&n.current&&0===Ml(n.current).length||("Tab"===e.key&&e.shiftKey?u(e)?p(e):d(e)?m(e):f(e)&&b():"Tab"===e.key&&(i()?s(e):l()?h(e):v(e)&&b()))}function c(){var t=Ml(r),a=t&&e.current?t.indexOf(e.current):-1,o=t&&t[a+1];return(!n.current||!n.current.contains(o||null))&&o}function i(){return!!e.current&&e.current===r.activeElement}function s(e){var t=n.current&&Ml(n.current);t&&t[0]&&(e.preventDefault(),t[0].focus())}function l(){if(!!n.current&&n.current.contains(r.activeElement||null)){var e=n.current&&Ml(n.current);return Boolean(e&&e[e.length-1]===r.activeElement)}return!1}function h(e){var t=c();t&&(e.preventDefault(),t.focus())}function u(e){if(e.shiftKey){var t=c();return e.target===t}}function p(e){var t=n.current&&Ml(n.current),r=t&&t[t.length-1];r&&(e.preventDefault(),r.focus())}function d(e){var t=n.current&&Ml(n.current);return!!t&&(0!==t.length&&e.target===t[0])}function m(t){var n;t.preventDefault(),null==(n=e.current)||n.focus()}function v(e){var t=n.current?Ml(r).filter((function(e){return!n.current.contains(e)})):null;return!!t&&e.target===t[t.length-1]}function f(e){return e.target===Ml(r)[0]}t.useEffect((function(){return r.addEventListener("keydown",o),function(){r.removeEventListener("keydown",o)}}),[]);var g=[];function b(){var e=n.current&&Ml(n.current);e&&(e.forEach((function(e){g.push([e,e.tabIndex]),e.tabIndex=-1})),r.addEventListener("focusin",z))}function z(){r.removeEventListener("focusin",z),g.forEach((function(e){var t=e[0],n=e[1];t.tabIndex=n}))}}(o,u),t.createElement(a,xl({"data-reach-popover":"",ref:m},h,{style:xl({position:"absolute"},Vl.apply(void 0,[i,d,p].concat(l)),h.style)}))}));function Vl(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];return n?e.apply(void 0,[t,n].concat(a.map((function(e){return e.current})))):{visibility:"hidden"}}function kl(e,t,n){return{top:n?e.top-t.height+window.pageYOffset+"px":e.top+e.height+window.pageYOffset+"px"}}"production"!==process.env.NODE_ENV&&(Cl.displayName="PopoverImpl");var Ll=function(e,t){if(!e||!t)return{};var n=Sl(e,t),r=n.directionRight,a=n.directionUp;return xl({left:r?e.right-t.width+window.pageXOffset+"px":e.left+window.pageXOffset+"px"},kl(e,t,a))},El=function(e,t){if(!e||!t)return{};var n=Sl(e,t).directionUp;return xl({width:e.width,left:e.left},kl(e,t,n))};function Sl(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var a={top:e.top-t.height<0,right:window.innerWidth<e.left+t.width-n,bottom:window.innerHeight<e.bottom+t.height-r,left:e.left+e.width-t.width<0};return{directionRight:a.right&&!a.left,directionLeft:a.left&&!a.right,directionUp:a.bottom&&!a.top,directionDown:a.top&&!a.bottom}}const _l={small:16,medium:32,big:40},Al=at`
948
+ `,Ys=t.forwardRef(((e,t)=>{const{inputStyle:r,style:a,disabled:o,className:c,...i}=e;return n.createElement(Fs,{isRequired:e.isRequired,inline:e.inline,isErrored:e.isErrored,style:a},e.label&&n.createElement("label",{className:"input-label"},e.label),n.createElement("div",{className:"input-container"},e.startLabel&&n.createElement("div",{className:"start-label"},e.startLabel),n.createElement("div",{className:`input-basic ${c||""}`},e.startAdornment&&n.createElement("div",{className:"start-adornment"},e.startAdornment),n.createElement(js,Object.assign({autoComplete:"off"},i,{ref:t,disabled:o,style:r})),e.showCount&&e.maxLength&&e.maxLength>0&&n.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${e.maxLength}`),e.endAdornment&&n.createElement("div",{className:"end-adornment"},e.endAdornment)),e.endLabel&&n.createElement("div",{className:"end-label"},e.endLabel)),e.isErrored&&e.errorText&&n.createElement("span",{className:"input-helper"},e.errorText))})),$s=t.forwardRef(((e,t)=>{const{inputStyle:r,style:a,className:o,...c}=e;return n.createElement(Fs,{isRequired:e.isRequired,inline:e.inline,isErrored:e.isErrored,style:a},e.label&&n.createElement("label",{className:"input-label"},e.label),n.createElement("div",{className:"input-container"},e.startLabel&&n.createElement("div",{className:"start-label"},e.startLabel),n.createElement("div",{className:`input-basic ${o||""}`,style:e.showCount?{flexDirection:"column"}:{}},e.startAdornment&&n.createElement("div",{className:"start-adornment"},e.startAdornment),n.createElement(Bs,Object.assign({autoComplete:"off"},c,{ref:t,style:e.showCount?{width:"100%",...r}:{...r}})),e.showCount&&e.maxLength&&e.maxLength>0&&n.createElement("div",{className:"end-max-length",style:{alignSelf:"flex-end",padding:"4px"}},`${e.value&&e.value.length||0}/${e.maxLength}`),e.endAdornment&&n.createElement("div",{className:"end-adornment"},e.endAdornment)),e.endLabel&&n.createElement("div",{className:"end-label"},e.endLabel)),e.isErrored&&e.errorText&&n.createElement("span",{className:"input-helper"},e.errorText))})),Ws=ot(Ys,Ts),Us=ot($s,Ts);function Ks(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Gs=Ks()?t.useLayoutEffect:t.useEffect;var qs="production"===process.env.NODE_ENV;function Zs(e,t){if(!qs){if(e)return;var n="Warning: "+t;"undefined"!=typeof console&&console.warn(n);try{throw Error(n)}catch(e){}}}var Xs=function(e){var n,r=e.children,a=e.type,o=void 0===a?"reach-portal":a,i=e.containerRef,s=t.useRef(null),l=t.useRef(null),h=(n=t.useState(Object.create(null))[1],t.useCallback((function(){n(Object.create(null))}),[]));return"production"!==process.env.NODE_ENV&&t.useEffect((function(){null!=i&&("production"!==process.env.NODE_ENV&&Zs("object"==typeof i&&"current"in i,"@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."),"production"!==process.env.NODE_ENV&&Zs(!i||null!=i.current,"@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))}),[i]),Gs((function(){if(s.current){var e=s.current.ownerDocument,t=(null==i?void 0:i.current)||e.body;return l.current=null==e?void 0:e.createElement(o),t.appendChild(l.current),h(),function(){l.current&&t&&t.removeChild(l.current)}}}),[o,h,i]),l.current?c.createPortal(r,l.current):t.createElement("span",{ref:s})};"production"!==process.env.NODE_ENV&&(Xs.displayName="Portal");var Js,Qs=["bottom","height","left","right","top","width"],el=new Map,tl=function e(){var t=[];el.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),Qs.some((function(n){return e[n]!==t[n]}))})(r,e.rect)&&(e.rect=r,t.push(e))})),t.forEach((function(e){e.callbacks.forEach((function(t){return t(e.rect)}))})),Js=window.requestAnimationFrame(e)};function nl(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var rl=nl()?t.useLayoutEffect:t.useEffect;function al(e){return"boolean"==typeof e}function ol(e){return!(!e||"[object Function]"!={}.toString.call(e))}var cl=function(e){var n=e.onChange,r=e.observe,a=void 0===r||r,o=e.children,c=t.useRef(null);return o({ref:c,rect:il(c,{observe:a,onChange:n})})};function il(e,n,r){var a,o,c;al(n)?a=n:(a=null==(c=null==n?void 0:n.observe)||c,o=null==n?void 0:n.onChange);ol(r)&&(o=r),"production"!==process.env.NODE_ENV&&(t.useEffect((function(){"production"!==process.env.NODE_ENV&&Zs(!al(n),"Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")}),[n]),t.useEffect((function(){"production"!==process.env.NODE_ENV&&Zs(!ol(r),"Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")}),[r]));var i=t.useState(e.current),s=i[0],l=i[1],h=t.useRef(!1),u=t.useRef(!1),p=t.useState(null),d=p[0],m=p[1],v=t.useRef(o);return rl((function(){v.current=o,e.current!==s&&l(e.current)})),rl((function(){s&&!h.current&&(h.current=!0,m(s.getBoundingClientRect()))}),[s]),rl((function(){if(a){var t=s;if(u.current||(u.current=!0,t=e.current),t){var n,r,o=(n=t,r=function(e){null==v.current||v.current(e),m(e)},{observe:function(){var e=0===el.size;el.has(n)?el.get(n).callbacks.push(r):el.set(n,{rect:void 0,hasRectChanged:!1,callbacks:[r]}),e&&tl()},unobserve:function(){var e=el.get(n);if(e){var t=e.callbacks.indexOf(r);t>=0&&e.callbacks.splice(t,1),e.callbacks.length||el.delete(n),el.size||cancelAnimationFrame(Js)}}});return o.observe(),function(){o.unobserve()}}"production"!==process.env.NODE_ENV&&console.warn("You need to place the ref")}}),[a,s,e]),d}function sl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ll(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function hl(e,t){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(t);else try{e.current=t}catch(n){throw new Error('Cannot assign value "'+t+'" to ref "'+e+'"')}}"production"!==process.env.NODE_ENV&&(cl.displayName="Rect",cl.propTypes={children:ro.func.isRequired,observe:ro.bool,onChange:ro.func});var ul=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],pl=ul.join(","),dl="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function ml(e,t){t=t||{};var n,r,a,o=[],c=[],i=e.querySelectorAll(pl);for(t.includeContainer&&dl.call(e,pl)&&(i=Array.prototype.slice.apply(i)).unshift(e),n=0;n<i.length;n++)vl(r=i[n])&&(0===(a=bl(r))?o.push(r):c.push({documentOrder:n,tabIndex:a,node:r}));return c.sort(zl).map((function(e){return e.node})).concat(o)}function vl(e){return!(!fl(e)||function(e){return function(e){return yl(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||bl(e)<0)}function fl(e){return!(e.disabled||function(e){return yl(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}ml.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==dl.call(e,pl)&&vl(e)},ml.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==dl.call(e,gl)&&fl(e)};var gl=ul.concat("iframe").join(",");function bl(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function zl(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function yl(e){return"INPUT"===e.tagName}var Ml=ml;function xl(){return xl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xl.apply(this,arguments)}var wl=["as","targetRef","position","unstable_observableRefs"],Hl=t.forwardRef((function(e,n){return t.createElement(Xs,null,t.createElement(Cl,xl({ref:n},e)))}));"production"!==process.env.NODE_ENV&&(Hl.displayName="Popover");var Cl=t.forwardRef((function(e,n){var r=e.as,a=void 0===r?"div":r,o=e.targetRef,c=e.position,i=void 0===c?Ll:c,s=e.unstable_observableRefs,l=void 0===s?[]:s,h=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,wl),u=t.useRef(null),p=il(u,{observe:!h.hidden}),d=il(o,{observe:!h.hidden}),m=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.useCallback((function(e){for(var t,r=ll(n);!(t=r()).done;)hl(t.value,e)}),n)}(u,n);return function(e,n){var r=(a=e.current,Ks()?a?a.ownerDocument:document:null);var a;function o(e){"Tab"===e.key&&n.current&&0===Ml(n.current).length||("Tab"===e.key&&e.shiftKey?u(e)?p(e):d(e)?m(e):f(e)&&b():"Tab"===e.key&&(i()?s(e):l()?h(e):v(e)&&b()))}function c(){var t=Ml(r),a=t&&e.current?t.indexOf(e.current):-1,o=t&&t[a+1];return(!n.current||!n.current.contains(o||null))&&o}function i(){return!!e.current&&e.current===r.activeElement}function s(e){var t=n.current&&Ml(n.current);t&&t[0]&&(e.preventDefault(),t[0].focus())}function l(){if(!!n.current&&n.current.contains(r.activeElement||null)){var e=n.current&&Ml(n.current);return Boolean(e&&e[e.length-1]===r.activeElement)}return!1}function h(e){var t=c();t&&(e.preventDefault(),t.focus())}function u(e){if(e.shiftKey){var t=c();return e.target===t}}function p(e){var t=n.current&&Ml(n.current),r=t&&t[t.length-1];r&&(e.preventDefault(),r.focus())}function d(e){var t=n.current&&Ml(n.current);return!!t&&(0!==t.length&&e.target===t[0])}function m(t){var n;t.preventDefault(),null==(n=e.current)||n.focus()}function v(e){var t=n.current?Ml(r).filter((function(e){return!n.current.contains(e)})):null;return!!t&&e.target===t[t.length-1]}function f(e){return e.target===Ml(r)[0]}t.useEffect((function(){return r.addEventListener("keydown",o),function(){r.removeEventListener("keydown",o)}}),[]);var g=[];function b(){var e=n.current&&Ml(n.current);e&&(e.forEach((function(e){g.push([e,e.tabIndex]),e.tabIndex=-1})),r.addEventListener("focusin",z))}function z(){r.removeEventListener("focusin",z),g.forEach((function(e){var t=e[0],n=e[1];t.tabIndex=n}))}}(o,u),t.createElement(a,xl({"data-reach-popover":"",ref:m},h,{style:xl({position:"absolute"},Vl.apply(void 0,[i,d,p].concat(l)),h.style)}))}));function Vl(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;o<r;o++)a[o-3]=arguments[o];return n?e.apply(void 0,[t,n].concat(a.map((function(e){return e.current})))):{visibility:"hidden"}}function kl(e,t,n){return{top:n?e.top-t.height+window.pageYOffset+"px":e.top+e.height+window.pageYOffset+"px"}}"production"!==process.env.NODE_ENV&&(Cl.displayName="PopoverImpl");var Ll=function(e,t){if(!e||!t)return{};var n=Sl(e,t),r=n.directionRight,a=n.directionUp;return xl({left:r?e.right-t.width+window.pageXOffset+"px":e.left+window.pageXOffset+"px"},kl(e,t,a))},El=function(e,t){if(!e||!t)return{};var n=Sl(e,t).directionUp;return xl({width:e.width,left:e.left},kl(e,t,n))};function Sl(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var a={top:e.top-t.height<0,right:window.innerWidth<e.left+t.width-n,bottom:window.innerHeight<e.bottom+t.height-r,left:e.left+e.width-t.width<0};return{directionRight:a.right&&!a.left,directionLeft:a.left&&!a.right,directionUp:a.bottom&&!a.top,directionDown:a.top&&!a.bottom}}const _l={small:16,medium:32,big:40},Al=at`
949
949
  to { transform: rotate(360deg); }
950
950
  `,Dl={small:3,medium:3,big:6},Ol=tt.div`
951
951
  position: relative;