react-md
Version:
This is the full react-md library bundled together for convenience.
14 lines • 403 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("crypto")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactMD={},e.React,e.ReactDOM,e.crypto)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i,a,l,s=o(t),c=o(n),u={exports:{}},d={};function p(){if(l)return d;l=1,function(){if(a)return i;a=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}i=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 t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(o,i){for(var a,l,s=n(o),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))t.call(a,u)&&(s[u]=a[u]);if(e){l=e(a);for(var d=0;d<l.length;d++)r.call(a,l[d])&&(s[l[d]]=a[l[d]])}}return s}}
/** @license React v17.0.2
* react-jsx-runtime.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.
*/();var e=s.default,t=60103;if(d.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;t=r("react.element"),d.Fragment=r("react.fragment")}var n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,r,i){var a,l={},s=null,u=null;for(a in void 0!==i&&(s=""+i),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(u=r.ref),r)o.call(r,a)&&!c.hasOwnProperty(a)&&(l[a]=r[a]);if(e&&e.defaultProps)for(a in r=e.defaultProps)void 0===l[a]&&(l[a]=r[a]);return{$$typeof:t,type:e,key:s,ref:u,props:l,_owner:n.current}}return d.jsx=u,d.jsxs=u,d}!function(e){e.exports=p()}(u);var f={exports:{}};
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=r.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(f);var v=f.exports;var y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function m(e){var n=e.into,o=e.intoId,i=e.children,a=y(t.useState(null),2),l=a[0],s=a[1];return t.useEffect((function(){var e=function(e,t){if("undefined"==typeof document)return null;var r=null;return void 0===e&&void 0===t?r=document.body:"string"==typeof t?r=document.getElementById(t):"string"==typeof e?r=document.querySelector(e):"function"==typeof e?r=e():e&&(r=e),r}(n,o);l!==e&&s(e)}),[n,o,l]),l?r.createPortal(i,l):null}var h=function(){return h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function b(e){var t=e.portal,r=e.portalInto,n=e.portalIntoId,o=e.children;return t||r||n?u.exports.jsx(m,h({into:r,intoId:n},{children:o})):u.exports.jsx(u.exports.Fragment,{children:o})}function g(e,t){t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e))}function O(e,t){if(!t)return e;var r=Object.prototype.hasOwnProperty;return Object.keys(t).reduce((function(n,o){return r.call(t,o)&&t[o]&&(n="".concat(n," ").concat(e,"--").concat(o)),n}),e)}function x(e){return function(t,r){return t?"string"!=typeof t?O(e,t):O("".concat(e,"__").concat(t),r):e}}var w=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,j=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;function P(e){e=e.replace(w,(function(e,t,r,n){return"".concat(t).concat(t).concat(r).concat(r).concat(n).concat(n)}));var t=e.match(j)||[];return[parseInt(t[1]||"",16)||0,parseInt(t[2]||"",16)||0,parseInt(t[3]||"",16)||0]}var S=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function E(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function C(e){var t=S(P(e),3),r=t[0],n=t[1],o=t[2];return.2126*E(r)+.7152*E(n)+.0722*E(o)}function N(e,t){var r=C(e)+.05,n=C(t)+.05;return Math.max(r,n)/Math.min(r,n)}var I=function(e){return function(e){return!!e&&void 0!==e.current}(e)?e.current:e};function T(e,t){return e=I(e),t=I(t),!!(e&&t&&e.contains(t))}var A=function(){return A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},A.apply(this,arguments)};function R(e,t){return Object.keys(t).reduce((function(e,r){return void 0===e[r]&&(e[r]=t[r]),e}),A({},e))}var k=function(){return k=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},k.apply(this,arguments)},M=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},L=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},D=t.createContext({root:!0,dir:"ltr",toggleDir:function(){throw new Error("Tried to toggle the current writing direction without initializing the `Dir` component.")}}),F=D.Provider;function _(){var e=t.useContext(D);return e.root,M(e,["root"])}var K=function(){var e="ltr";"undefined"!=typeof document&&(e="rtl"===document.documentElement.getAttribute("dir")?"rtl":"ltr");return e};function B(e){var r=e.children,n=e.defaultDir,o=void 0===n?K:n,i=t.useContext(D).root,a=L(t.useState(o),2),l=a[0],s=a[1];t.useEffect((function(){if(i&&"undefined"!=typeof document)return document.documentElement.setAttribute("dir",l),function(){document.documentElement.removeAttribute("dir")}}),[l,i]);var c=t.useCallback((function(){s((function(e){return"ltr"===e?"rtl":"ltr"}))}),[]),d=t.useMemo((function(){return{root:!1,dir:l,toggleDir:c}}),[l,c]),p=t.Children.only(r);return i||(p=t.cloneElement(p,{dir:l})),u.exports.jsx(F,k({value:d},{children:p}))}function H(e){var r=t.useRef(e);return t.useEffect((function(){r.current=e})),r}var V=[];function z(e,t,r,n){void 0===t&&(t=window),void 0===r&&(r=!1);var o=[],i=function(e,t){var r=!1,n=function(e){return function(){for(var n=0;n<t.length;n+=1)t[n](e);r=!1}};return function(t){e?r||(r=!0,window.requestAnimationFrame(n(t))):n(t)()}}(r,o);return{add:function(r){o.length||t.addEventListener(e,i,n),-1===o.indexOf(r)&&o.push(r)},remove:function(r){var a=o.indexOf(r);a>=0&&(o.splice(a,1),o.length||t.removeEventListener(e,i,n))}}}function W(e,t,r,n){void 0===t&&(t=window),void 0===r&&(r="resize"===e||"scroll"===e);var o=V.findIndex((function(o){return o.type===e&&o.target===t&&o.options===n&&o.throttle===r}));return-1===o&&(V.push({type:e,target:t,options:n,throttle:r,handler:z(e,t,r,n)}),o=V.length-1),V[o].handler}function U(e){var r=e.once,n=e.passive,o=void 0===n||n,i=e.signal,a=e.capture,l=e.enabled,s=void 0===l||l,c=H(e.onScroll);t.useEffect((function(){if(s){var e=W("scroll",window,!0,{once:r,passive:o,signal:i,capture:a}),t=c.current;return e.add(t),function(){e.remove(t)}}}),[a,s,r,o,c,i])}function q(e){var t=e.min,r=e.max,n=e.value,o=e.validate;if(void 0===o||o){if(t>=r)throw new RangeError("A range must have the min value less than the max value");if(n>r||n<t)throw new RangeError("A value must be between the min and max values")}var i=(n-t)/(r-t);return Math.max(0,Math.min(Math.abs(i),1))}var G=1e3;function Y(e){var r=t.useRef(e);return t.useEffect((function(){r.current=e})),t.useEffect((function(){return function(){return r.current()}}),[])}var X=function(){},J=t.createContext({visibleInTime:G,enableHoverMode:X,disableHoverMode:X,startDisableTimer:X}),Q=J.Provider;function Z(){return t.useContext(J)}var $=function(){return $=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$.apply(this,arguments)},ee=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function te(e){var r=e.children,n=e.disabled,o=void 0!==n&&n,i=e.defaultVisibleInTime,a=void 0===i?G:i,l=e.deactivateTime,s=void 0===l?1e3:l,c=ee(t.useState(a),2),d=c[0],p=c[1],f=t.useRef(),v=t.useCallback((function(){o||(window.clearTimeout(f.current),p(0))}),[o]),y=t.useCallback((function(){window.clearTimeout(f.current),p(a)}),[a]),m=t.useCallback((function(){window.clearTimeout(f.current),f.current=window.setTimeout((function(){p(a)}),s)}),[a,s]);t.useEffect((function(){o&&(window.clearTimeout(f.current),p(a))}),[o,a]),Y((function(){window.clearTimeout(f.current)}));var h=t.useMemo((function(){return{visibleInTime:d,enableHoverMode:v,disableHoverMode:y,startDisableTimer:m}}),[y,v,m,d]);return u.exports.jsx(Q,$({value:h},{children:r}))}var re="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,ne=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};var oe=function(){return oe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oe.apply(this,arguments)},ie=t.createContext("mouse"),ae=t.createContext(!1),le=ie.Provider,se=ae.Provider;function ce(){return t.useContext(ie)}function ue(e){return ce()===e}function de(e){var r=e.children,n=function(){var e=ne(t.useState("mouse"),2),r=e[0],n=e[1],o=t.useRef(0),i=t.useRef(!1);return re((function(){var e=function(){return n("mouse")},t=function(){return n("keyboard")},a=function(){o.current=Date.now(),i.current=!1,n("touch")},l=function(){i.current||Date.now()-o.current<1200?i.current=!1:e()},s=function(){i.current=!0},c="rmd-utils--".concat(r);return document.body.classList.add(c),window.addEventListener("touchstart",a,!0),"mouse"===r?window.addEventListener("keydown",t,!0):"keyboard"===r?window.addEventListener("mousedown",e,!0):(window.addEventListener("mousemove",l,!0),window.addEventListener("contextmenu",s,!0)),function(){document.body.classList.remove(c),window.removeEventListener("touchstart",a,!0),"mouse"===r?window.removeEventListener("keydown",t,!0):"keyboard"===r?window.removeEventListener("mousedown",e,!0):(window.removeEventListener("mousemove",l,!0),window.removeEventListener("contextmenu",s,!0))}}),[r]),r}();if(t.useContext(ae))throw new Error("Mounted multiple `UserInteractionModeListener` components.");return u.exports.jsx(le,oe({value:n},{children:u.exports.jsx(se,oe({value:!0},{children:r}))}))}var pe=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function fe(e){var r=void 0===e?{}:e,n=r.disabled,o=void 0!==n&&n,i=r.defaultVisible,a=void 0!==i&&i,l=r.exitVisibilityDelay,s=void 0===l?300:l,c="touch"===ce(),u=pe(t.useState(a),2),d=u[0],p=u[1],f=pe(t.useState(!1),2),v=f[0],y=f[1],m=t.useRef(),h=Z(),b=h.visibleInTime,g=h.enableHoverMode,O=h.disableHoverMode,x=h.startDisableTimer,w=0===b;t.useEffect((function(){d||y(!1)}),[d]),Y((function(){window.clearTimeout(m.current)}));var j=t.useCallback((function(){window.clearTimeout(m.current)}),[]),P=t.useCallback((function(e){if(!(v||o||c||e.isPropagationStopped())){if(j(),0===b)return g(),void p(!0);m.current=window.setTimeout((function(){g(),p(!0)}),b)}}),[j,o,g,c,v,b]),S=t.useCallback((function(e){v||o||c||e.isPropagationStopped()||(x(),j(),0!==s?m.current=window.setTimeout((function(){p(!1)}),s):p(!1))}),[j,o,s,c,x,v]),E=t.useCallback((function(e){e.isPropagationStopped()||(v||o?(y(!1),p((function(e){return!e}))):(y(!0),p(!0)))}),[o,v]);return{active:w,stuck:v,visible:d,setVisible:p,onClick:E,onMouseEnter:P,onMouseLeave:S,enableHoverMode:g,disableHoverMode:O,startDisableTimer:x,clearHoverTimeout:j,handlers:{onClick:E,onMouseEnter:P,onMouseLeave:S},hoverHandlers:{onMouseEnter:P,onMouseLeave:S}}}var ve=t.createContext({activeId:"",setActiveId:function(){throw new Error("ActiveDescendantMovementProvider must be a parent component.")}});ve.displayName="ActiveDescendant";var ye=ve.Provider;function me(){return t.useContext(ve)}var he=function(){return he=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},he.apply(this,arguments)};var be=function(){},ge={incrementKeys:["ArrowDown"],decrementKeys:["ArrowUp"],jumpToFirstKeys:["Home"],jumpToLastKeys:["End"]},Oe={incrementKeys:["ArrowRight"],decrementKeys:["ArrowLeft"],jumpToFirstKeys:["Home"],jumpToLastKeys:["End"]},xe={incrementKeys:["ArrowLeft"],decrementKeys:["ArrowRight"],jumpToFirstKeys:["Home"],jumpToLastKeys:["End"]},we=t.createContext({attach:be,detach:be,watching:{current:[]},loopable:!1,searchable:!1,horizontal:!1,includeDisabled:!1,config:{current:ge}});we.displayName="KeyboardMovement";var je=we.Provider;function Pe(){return t.useContext(we)}function Se(e){var t=e.value,r=e.min,n=void 0===r?0:r,o=e.max,i=e.increment,a=e.minmax,l=t+(i?1:-1);return void 0!==a&&a?l=Math.min(o,Math.max(n,l)):l>o?l=n:l<n&&(l=o),l}var Ee=function(e){e.focus()},Ce=function(e,t){return!e||!t&&(null!==e.getAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))},Ne=function(e,t){if(!e.length)return-1;for(var r=0;r<e.length-1&&Ce(e[r].element,t);)r+=1;return Ce(e[r].element,t)?-1:r},Ie=function(e,t){if(!e.length)return-1;for(var r=e.length-1;r>0&&Ce(e[r].element,t);)r-=1;return Ce(e[r].element,t)?-1:r},Te=function(e){for(var t=e.loopable,r=e.watching,n=e.increment,o=e.includeDisabled,i=e.currentFocusIndex,a=Ne(r,o),l=Ie(r,o),s=Se({min:a,max:l,value:i,minmax:!t,increment:n});Ce(r[s].element,o)&&(t||s!==(n?l:a));)s=Se({min:a,max:l,value:s,minmax:!t,increment:n});return s};function Ae(e,t){if(!t)return"";var r=e.cloneNode(!0);return r.querySelectorAll(".rmd-icon--font,[aria-hidden=true],[hidden]").forEach((function(e){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),(r.textContent||"").substring(0,1).toUpperCase()}var Re=function(){return Re=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Re.apply(this,arguments)};function ke(e){var r,n=e.children,o=e.loopable,i=void 0!==o&&o,a=e.searchable,l=void 0!==a&&a,s=e.horizontal,c=void 0!==s&&s,d=e.includeDisabled,p=void 0!==d&&d,f=e.incrementKeys,v=e.decrementKeys,y=e.jumpToFirstKeys,m=e.jumpToLastKeys,h="rtl"===_().dir;r=c?h?xe:Oe:ge;var b=f||r.incrementKeys,g=v||r.decrementKeys,O=y||r.jumpToFirstKeys,x=m||r.jumpToLastKeys,w=t.useRef([]),j={incrementKeys:b,decrementKeys:g,jumpToFirstKeys:O,jumpToLastKeys:x},P=t.useRef(j);P.current=j;var S=t.useMemo((function(){return{attach:function(e){w.current.push({element:e,content:Ae(e,l)})},detach:function(e){w.current=w.current.filter((function(t){return t.element!==e}))},watching:w,config:P,loopable:i,searchable:l,horizontal:c,includeDisabled:p}}),[c,p,i,l]);return u.exports.jsx(je,Re({value:S},{children:n}))}function Me(e){var r=Pe(),n=r.attach,o=r.detach,i=t.useRef(null);return t.useCallback((function(t){g(t,e),t?n(t):i.current&&o(i.current),i.current=t}),[n,o,e])}function Le(e,t,r,n){e=e.toUpperCase();for(var o=r;o<n;o+=1){if(0===t[o].toUpperCase().indexOf(e))return o}return-1}function De(e,t,r,n){void 0===n&&(n=!0);var o=Le(e,t,r+1,t.length);-1===o&&(o=Le(e,t,0,r+(n?1:0)));return o}var Fe=function(){};function _e(e){void 0===e&&(e={});var r=e.onFocus,n=void 0===r?Fe:r,o=e.onKeyDown,i=void 0===o?Fe:o,a=e.onSearch,l=void 0===a?Fe:a,s=e.onIncrement,c=void 0===s?Fe:s,u=e.onDecrement,d=void 0===u?Fe:u,p=e.onJumpToFirst,f=void 0===p?Fe:p,v=e.onJumpToLast,y=void 0===v?Fe:v,m=e.onFocusChange,h=void 0===m?Ee:m,b=e.getDefaultFocusIndex,g=ce(),O=t.useRef(-1),x=Pe(),w=x.config,j=x.loopable,P=x.searchable,S=x.watching,E=x.includeDisabled;return{focusIndex:O,onFocus:function(e){var t;if(n(e),!e.isPropagationStopped())if(e.target===e.currentTarget){var r;if(r=b?b(S.current.map((function(e){return e.element})),e.currentTarget):Ne(S.current,E),-1!==r&&"keyboard"===g){O.current=r;var o=null===(t=S.current[O.current])||void 0===t?void 0:t.element;o&&h(o,O.current)}}else{var i=S.current.findIndex((function(t){return t.element===e.target}));-1!==i&&(O.current=i)}},onKeyDown:function(e){if(i(e),!e.isPropagationStopped()){var t=e.key,r=e.altKey,n=e.ctrlKey,o=e.metaKey,a=e.shiftKey,s=w.current,u=s.incrementKeys,p=s.decrementKeys,v=s.jumpToFirstKeys,m=s.jumpToLastKeys,b=function(t){var r;if(e.preventDefault(),e.stopPropagation(),O.current!==t){O.current=t;var n=null===(r=S.current[t])||void 0===r?void 0:r.element;n&&h(n,O.current)}};if(!P||1!==t.length||" "===t||r||n||o||a){if(v.includes(t)){if(f({key:t,event:e}),e.isPropagationStopped())return;b(Ne(S.current,E))}else if(m.includes(t)){if(y({key:t,event:e}),e.isPropagationStopped())return;b(Ie(S.current,E))}else if(u.includes(t)){if(c({key:t,event:e}),e.isPropagationStopped())return;b(Te({loopable:j,watching:S.current,increment:!0,includeDisabled:E,currentFocusIndex:O.current}))}else if(p.includes(t)){if(d({key:t,event:e}),e.isPropagationStopped())return;b(Te({loopable:j,watching:S.current,increment:!1,includeDisabled:E,currentFocusIndex:O.current}))}}else{if(l({key:t,event:e}),e.isPropagationStopped())return;var g=S.current.map((function(e){var t=e.content,r=e.element;return Ce(r,E)?"":t}));b(De(t,g,O.current))}}}}}var Ke=function(){return Ke=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ke.apply(this,arguments)},Be=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},He=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};var Ve="".concat(64.0625,"em"),ze="".concat(48,"em"),We="".concat(64,"em"),Ue="".concat(767/16,"em"),qe="".concat(80,"em"),Ge=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Ye=function(){var e,t=null===(e=window.screen.orientation)||void 0===e?void 0:e.type;if("string"==typeof t)return t;var r=window.screen;return r.availHeight>r.availWidth?"portrait-primary":"landscape-primary"};function Xe(e){var r=Ge(t.useState((function(){return e||("undefined"!=typeof window?Ye():"landscape-primary")})),2),n=r[0],o=r[1];return t.useEffect((function(){if("undefined"!=typeof window){var e=function(){o(Ye())};return window.addEventListener("orientationchange",e),function(){return window.removeEventListener("orientationchange",e)}}}),[]),n}var Je=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function Qe(e,r,n,o){void 0===n&&(n=!1),void 0===o&&(o="undefined"!=typeof window);var i=Je(t.useState((function(){return void 0!==r?r:!(n||!o||"undefined"==typeof window)&&window.matchMedia(e).matches})),2),a=i[0],l=i[1];return t.useEffect((function(){if("undefined"!=typeof window&&!n){var t=window.matchMedia(e),r=function(e){var t=e.matches;return l(t)};return t.addEventListener("change",r),t.matches!==a&&l(t.matches),function(){t.removeEventListener("change",r)}}}),[n,a,e]),a}var Ze=function(e,t){var r=typeof e;if("undefined"===r)return"";var n="number"===r?"".concat(e,"px"):e;return"(".concat(t,"-width: ").concat(n,")")};function $e(e){var r=e.min,n=e.max;return Qe(t.useMemo((function(){var e=[Ze(r,"min"),Ze(n,"max")].filter(Boolean).join(" and ");return"screen and ".concat(e)}),[r,n]))}var et=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tt={isPhone:!1,isTablet:!1,isDesktop:!0,isLargeDesktop:!1,isLandscape:!0};function rt(e){var r=void 0===e?{}:e,n=r.phoneMaxWidth,o=void 0===n?Ue:n,i=r.tabletMinWidth,a=void 0===i?ze:i,l=r.tabletMaxWidth,s=void 0===l?We:l,c=r.desktopMinWidth,u=void 0===c?Ve:c,d=r.desktopLargeMinWidth,p=void 0===d?qe:d,f=r.defaultSize,v=void 0===f?tt:f;if("undefined"==typeof window)return v;var y=$e({min:u}),m=$e({min:p}),h=$e({min:a,max:s}),b=$e({max:o}),g=y,O=!y&&h,x=!O&&!g&&b,w=Xe().includes("landscape"),j=m,P=et(t.useState(v),2),S=P[0],E=P[1];return t.useEffect((function(){S.isPhone===x&&S.isTablet===O&&S.isDesktop===g&&S.isLargeDesktop===j&&S.isLandscape===w||(x||O||g||j)&&E({isPhone:x,isTablet:O,isDesktop:g,isLargeDesktop:j,isLandscape:w})}),[x,O,g,j,w,S]),S}var nt=function(){return nt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},nt.apply(this,arguments)},ot=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},it=t.createContext(nt(nt({},tt),{__initialized:!1}));function at(){var e=t.useContext(it),r=e.__initialized,n=ot(e,["__initialized"]);if(!r)throw new Error("Unable to get the current `AppSize` from `react-md` because the `AppSizeListener` could not be found when using the `useAppSize` hook. To fix this error, either initialize the `AppSizeListener` component from `@react-md/utils` or the `Configuration` component from `@react-md/layout` near the root of your app.");return n}var lt,st=function(){return st=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},st.apply(this,arguments)},ct=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},ut=x("rmd-grid"),dt=t.forwardRef((function(e,r){var n,o,i,a,l,s,c,d=e.style,p=e.className,f=e.clone,y=e.children,m=e.colSpan,h=e.colStart,b=e.colEnd,g=e.rowSpan,O=e.rowStart,x=e.rowEnd,w=e.phone,j=e.tablet,P=e.desktop,S=e.largeDesktop,E=ct(e,["style","className","clone","children","colSpan","colStart","colEnd","rowSpan","rowStart","rowEnd","phone","tablet","desktop","largeDesktop"]),C=at(),N=C.isPhone,I=C.isTablet,T=C.isDesktop,A=C.isLargeDesktop,R=m,k=h,M=b,L=g,D=O,F=x,_=N&&w||I&&j||A&&S||T&&P;_&&(L=void 0===(n=_.rowSpan)?g:n,D=void 0===(o=_.rowStart)?O:o,F=void 0===(i=_.rowEnd)?x:i,R=void 0===(a=_.colSpan)?m:a,k=void 0===(l=_.colStart)?h:l,M=void 0===(s=_.colEnd)?b:s);var K=st({gridColumnStart:k,gridColumnEnd:M,gridRowStart:D,gridRowEnd:L?"span ".concat(L):F},d),B=v(ut("cell",((c={})["".concat(R)]=R,c)),p);if(f&&t.isValidElement(y)){var H=t.Children.only(y);return t.cloneElement(H,{style:st(st({},H.props.style),K),className:v(B,H.props.className)})}return u.exports.jsx("div",st({},E,{ref:r,style:K,className:B},{children:y}))})),pt=function(){return pt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pt.apply(this,arguments)},ft=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},vt="--rmd-grid-cols",yt="--rmd-grid-gutter",mt=x("rmd-grid"),ht=t.forwardRef((function(e,r){var n,o=e.style,i=e.className,a=e.children,l=e.clone,s=void 0!==l&&l,c=e.cloneStyles,d=void 0!==c&&c,p=e.wrapOnly,f=void 0!==p&&p,y=e.columns,m=e.phoneColumns,h=e.tabletColumns,b=e.desktopColumns,g=e.largeDesktopColumns,O=e.padding,x=e.gutter,w=e.minCellWidth,j=ft(e,["style","className","children","clone","cloneStyles","wrapOnly","columns","phoneColumns","tabletColumns","desktopColumns","largeDesktopColumns","padding","gutter","minCellWidth"]),P=at(),S=P.isPhone,E=P.isTablet,C=P.isDesktop,N=P.isLargeDesktop,I=pt(pt({padding:0!==O&&O||void 0,gridTemplateColumns:w?"repeat(auto-fill, minmax(".concat(w,", 1fr))"):void 0},o),((n={})[vt]=S&&m||E&&h||N&&g||C&&b||y,n[yt]=x,n)),T=v(mt({"no-padding":0===O}),i);if(d&&t.isValidElement(a)){var A=t.Children.only(a);return t.cloneElement(A,{style:pt(pt({},I),A.props.style),className:v(T,A.props.className)})}var R=a;return(s||f)&&(R=t.Children.map(a,(function(e){return e&&u.exports.jsx(dt,pt({clone:s},{children:e}))}))),u.exports.jsx("div",pt({},j,{ref:r,style:I,className:T},{children:R}))})),bt=function(){return bt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bt.apply(this,arguments)},gt=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},Ot=x("rmd-grid-list"),xt=t.forwardRef((function(e,r){var n=e.className,o=e.children,i=e.square,a=void 0!==i&&i,l=e.clone,s=void 0!==l&&l,c=gt(e,["className","children","square","clone"]),d=v(Ot("cell",{square:a}),n);if(s&&t.isValidElement(o)){var p=t.Children.only(o);return t.cloneElement(p,{className:v(d,p.props.className)})}return u.exports.jsx("div",bt({},c,{ref:r,className:d},{children:o}))})),wt=[],jt="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(lt||(lt={}));var Pt,St=function(e){return Object.freeze(e)},Et=function(e,t){this.inlineSize=e,this.blockSize=t,St(this)},Ct=function(){function e(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,St(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Nt=function(e){return e instanceof SVGElement&&"getBBox"in e},It=function(e){if(Nt(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Tt=function(e){var t,r;if(e instanceof Element)return!0;var n=null===(r=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===r?void 0:r.defaultView;return!!(n&&e instanceof n.Element)},At="undefined"!=typeof window?window:{},Rt=new WeakMap,kt=/auto|scroll/,Mt=/^tb|vertical/,Lt=/msie|trident/i.test(At.navigator&&At.navigator.userAgent),Dt=function(e){return parseFloat(e||"0")},Ft=function(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=!1),new Et((r?t:e)||0,(r?e:t)||0)},_t=St({devicePixelContentBoxSize:Ft(),borderBoxSize:Ft(),contentBoxSize:Ft(),contentRect:new Ct(0,0,0,0)}),Kt=function(e,t){if(void 0===t&&(t=!1),Rt.has(e)&&!t)return Rt.get(e);if(It(e))return Rt.set(e,_t),_t;var r=getComputedStyle(e),n=Nt(e)&&e.ownerSVGElement&&e.getBBox(),o=!Lt&&"border-box"===r.boxSizing,i=Mt.test(r.writingMode||""),a=!n&&kt.test(r.overflowY||""),l=!n&&kt.test(r.overflowX||""),s=n?0:Dt(r.paddingTop),c=n?0:Dt(r.paddingRight),u=n?0:Dt(r.paddingBottom),d=n?0:Dt(r.paddingLeft),p=n?0:Dt(r.borderTopWidth),f=n?0:Dt(r.borderRightWidth),v=n?0:Dt(r.borderBottomWidth),y=d+c,m=s+u,h=(n?0:Dt(r.borderLeftWidth))+f,b=p+v,g=l?e.offsetHeight-b-e.clientHeight:0,O=a?e.offsetWidth-h-e.clientWidth:0,x=o?y+h:0,w=o?m+b:0,j=n?n.width:Dt(r.width)-x-O,P=n?n.height:Dt(r.height)-w-g,S=j+y+O+h,E=P+m+g+b,C=St({devicePixelContentBoxSize:Ft(Math.round(j*devicePixelRatio),Math.round(P*devicePixelRatio),i),borderBoxSize:Ft(S,E,i),contentBoxSize:Ft(j,P,i),contentRect:new Ct(d,s,j,P)});return Rt.set(e,C),C},Bt=function(e,t,r){var n=Kt(e,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case lt.DEVICE_PIXEL_CONTENT_BOX:return a;case lt.BORDER_BOX:return o;default:return i}},Ht=function(e){var t=Kt(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=St([t.borderBoxSize]),this.contentBoxSize=St([t.contentBoxSize]),this.devicePixelContentBoxSize=St([t.devicePixelContentBoxSize])},Vt=function(e){if(It(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},zt=function(){var e=1/0,t=[];wt.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(t){var r=new Ht(t.target),o=Vt(t.target);n.push(r),t.lastReportedSize=Bt(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){r.callback.call(r.observer,n,r.observer)})),r.activeTargets.splice(0,r.activeTargets.length)}}));for(var r=0,n=t;r<n.length;r++){(0,n[r])()}return e},Wt=function(e){wt.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(r){r.isActive()&&(Vt(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))}))}))},Ut=function(){var e,t=0;for(Wt(t);wt.some((function(e){return e.activeTargets.length>0}));)t=zt(),Wt(t);return wt.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:jt}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=jt),window.dispatchEvent(e)),t>0},qt=[],Gt=function(e){if(!Pt){var t=0,r=document.createTextNode("");new MutationObserver((function(){return qt.splice(0).forEach((function(e){return e()}))})).observe(r,{characterData:!0}),Pt=function(){r.textContent=""+(t?t--:t++)}}qt.push(e),Pt()},Yt=0,Xt={attributes:!0,characterData:!0,childList:!0,subtree:!0},Jt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Qt=function(e){return void 0===e&&(e=0),Date.now()+e},Zt=!1,$t=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Zt){Zt=!0;var r,n=Qt(e);r=function(){var r=!1;try{r=Ut()}finally{if(Zt=!1,e=n-Qt(),!Yt)return;r?t.run(1e3):e>0?t.run(e):t.start()}},Gt((function(){requestAnimationFrame(r)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Xt)};document.body?t():At.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Jt.forEach((function(t){return At.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Jt.forEach((function(t){return At.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),er=function(e){!Yt&&e>0&&$t.start(),!(Yt+=e)&&$t.stop()},tr=function(){function e(e,t){this.target=e,this.observedBox=t||lt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Bt(this.target,this.observedBox,!0);return e=this.target,Nt(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),rr=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},nr=new WeakMap,or=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},ir=function(){function e(){}return e.connect=function(e,t){var r=new rr(e,t);nr.set(e,r)},e.observe=function(e,t,r){var n=nr.get(e),o=0===n.observationTargets.length;or(n.observationTargets,t)<0&&(o&&wt.push(n),n.observationTargets.push(new tr(t,r&&r.box)),er(1),$t.schedule())},e.unobserve=function(e,t){var r=nr.get(e),n=or(r.observationTargets,t),o=1===r.observationTargets.length;n>=0&&(o&&wt.splice(wt.indexOf(r),1),r.observationTargets.splice(n,1),er(-1))},e.disconnect=function(e){var t=this,r=nr.get(e);r.observationTargets.slice().forEach((function(r){return t.unobserve(e,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},e}(),ar=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ir.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Tt(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ir.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Tt(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ir.unobserve(this,e)},e.prototype.disconnect=function(){ir.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function lr(e){var r=t.useRef(null),n=t.useCallback((function(t){g(t,e),r.current=t}),[e]);return[r,n]}var sr,cr=function(){return cr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cr.apply(this,arguments)},ur=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function dr(e,t){return!e||e.height!==t.height||e.scrollHeight!==t.scrollHeight}function pr(e,t){return!e||e.width!==t.width||e.scrollWidth!==t.scrollWidth}var fr=[];function vr(e,t){void 0===t&&(t={});var r=t.ref,n=t.disableWidth,o=void 0!==n&&n,i=t.disableHeight,a=void 0!==i&&i,l=ur(lr(r),2),s=l[0],c=l[1];return re((function(){var t=s.current;if(!(a&&o||!t))return sr||"undefined"==typeof document||(sr=new ar((function(e){for(var t=function(t){var r=e[t],n=fr.filter((function(e){return e.target===r.target}));if(!n.length)return{value:void 0};for(var o=r.contentRect,i=o.height,a=o.width,l=r.target,s={height:i,width:a,scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth},c=0;c<n.length;c+=1){var u=n[c],d=u.handler,p=u.prevSize,f=u.disableHeight,v=u.disableWidth,y=dr(p,s),m=pr(p,s);(y&&!f||m&&!v)&&(u.prevSize=s,d(cr(cr({},s),{element:r.target})))}},r=0;r<e.length;r+=1){var n=t(r);if("object"==typeof n)return n.value}}))),function(e,t,r,n){var o=fr.find((function(t){return t.target===e}));fr.push({target:e,handler:t,disableWidth:n,disableHeight:r,prevSize:void 0}),o||null==sr||sr.observe(e)}(t,e,a,o),function(){!function(e,t,r,n){var o=fr.findIndex((function(o){return o.target===e&&o.handler===t&&o.disableWidth===n&&o.disableHeight===r}));-1!==o&&fr.splice(o,1),fr.some((function(t){return t.target===e}))||null==sr||sr.unobserve(e)}(t,e,a,o)}}),[a,o,e]),[s,c]}var yr={height:void 0,width:void 0};function mr(e,t){if(void 0===e&&(e="width"),void 0===t&&(t=!1),"undefined"==typeof window)return-1;var r=yr[e];if(!t&&"number"==typeof r)return r;var n=document.createElement("div");n.style.visibility="hidden",n.style.overflow="scroll",document.body.appendChild(n);var o=document.createElement("div");n.appendChild(o);var i="width"===e?"offsetWidth":"offsetHeight";return r=n[i]-o[i],yr[e]=r,document.body.removeChild(n),r}var hr=function(){return hr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hr.apply(this,arguments)},br=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},gr="--rmd-cell-size",Or="--rmd-cell-margin",xr=t.createContext({columns:-1,cellWidth:-1}),wr=xr.Provider;function jr(e){var r,n=void 0===e?{}:e,o=n.ref,i=n.style,a=n.className,l=n.cellMargin,s=n.defaultSize,c=n.maxCellSize,u=void 0===c?150:c,d=n.disableHeight,p=void 0!==d&&d,f=n.disableWidth,y=void 0!==f&&f,m=n.containerPadding,h=void 0===m?16:m,b=br(lr(o),2),g=b[0],O=b[1],x=br(t.useState(s||{columns:-1,cellWidth:u}),2),w=x[0],j=x[1],P=t.useCallback((function(){var e=g.current;if(e){var t=e.getBoundingClientRect().width;t-=h,e.offsetHeight<e.scrollHeight&&(t-=mr("width"));var r=Math.ceil(t/u);j({cellWidth:t/r,columns:r})}}),[h,u,g]),S=br(vr(P,{ref:O,disableHeight:p,disableWidth:y}),2)[1],E=hr(hr({},i),((r={})[gr]="".concat(w.cellWidth,"px"),r));return l&&(E[Or]=l),[{ref:S,style:E,className:v("rmd-grid-list",a)},w]}var Pr=function(){return Pr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pr.apply(this,arguments)},Sr=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},Er=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Cr=t.forwardRef((function(e,r){var n=e.style,o=e.className,i=e.children,a=e.clone,l=void 0!==a&&a,s=e.wrapOnly,c=void 0!==s&&s,d=e.cellMargin,p=e.defaultSize,f=e.maxCellSize,v=void 0===f?150:f,y=e.containerPadding,m=void 0===y?16:y,h=e.disableHeightObserver,b=void 0!==h&&h,g=e.disableWidthObserver,O=void 0!==g&&g,x=Sr(e,["style","className","children","clone","wrapOnly","cellMargin","defaultSize","maxCellSize","containerPadding","disableHeightObserver","disableWidthObserver"]),w=Er(jr({ref:r,style:n,className:o,cellMargin:d,defaultSize:p,maxCellSize:v,containerPadding:m,disableHeight:b,disableWidth:O}),2),j=w[0],P=w[1],S=null;return S=function(e){return"function"==typeof e}(i)?i(P):l||c?t.Children.map(i,(function(e){return e&&u.exports.jsx(xt,Pr({clone:l},{children:e}))})):i,u.exports.jsx(wr,Pr({value:P},{children:u.exports.jsx("div",Pr({},x,j,{children:S}))}))}));function Nr(e,t,r,n,o){void 0===o&&(o=r-t);var i=Math.round((e-t)*n/o)/n,a=Math.min(Math.max(i,0),1),l=o/n,s=Number.isInteger(l)?o%n:l.toString().split(".")[1].length;return Math.min(r,Math.max(t,parseFloat((a*o+t).toFixed(s))))}function Ir(e,t){if(!t.length)return e;var r={};for(var n in e)t.includes(n)||(r[n]=e[n]);return r}function Tr(e){if(!e)return null;if(/(tree|list)item/.test(e.getAttribute("role")||"")){if(r=e.querySelector(".rmd-tree-item__content, .rmd-item-text"))return r}else if("file"===e.getAttribute("type")){var t=document.querySelector('[for="'.concat(e.id,'"]'));if(t)return t}var r,n=e.getAttribute("data-sizing-selector");if(n&&(r=e.querySelector(n)))return r;return e}function Ar(e){var t=document.documentElement||{clientHeight:0,clientWidth:0};return"width"===e?window.innerWidth||t.clientWidth:window.innerHeight||t.clientHeight}function Rr(e){return"number"==typeof e?"".concat(e,"px"):""}function kr(e,t){void 0===t&&(t={});var r=e.cloneNode(!0);r.removeAttribute("id"),r.removeAttribute("role"),r.style.position="fixed",r.style.visibility="hidden",r.style.left=Rr(t.left),r.style.top=Rr(t.top),r.style.right=Rr(t.right),r.style.bottom=Rr(t.bottom),r.style.webkitTransform="none",r.style.transform="none";var n=e.parentElement||document.body;n.appendChild(r);var o=r.getBoundingClientRect();return n.removeChild(r),o}var Mr={x:"center",y:"above"},Lr={x:"inner-left",y:"top"},Dr={x:"inner-right",y:"top"},Fr={x:"right",y:"top"},_r={x:"left",y:"center"},Kr={x:"right",y:"center"},Br={x:"inner-left",y:"bottom"},Hr={x:"inner-right",y:"bottom"},Vr={x:"inner-left",y:"below"},zr={x:"center",y:"below"};function Wr(e){var t=e.xMargin,r=e.elWidth,n=e.initialX,o=e.containerRect;return(null!=n?n:o.left)-r-t}function Ur(e){var t=e.xMargin,r=e.initialX,n=e.containerRect;return(null!=r?r:n.left)+t}function qr(e){var t=e.xMargin,r=e.elWidth,n=e.initialX,o=e.containerRect;return(null!=n?n:o.left+o.width)-r-t}function Gr(e){var t=e.xMargin,r=e.initialX,n=e.containerRect;return(null!=r?r:n.left+n.width)+t}function Yr(e){var t=e.yMargin,r=e.initialY,n=e.elHeight,o=e.containerRect;return(null!=r?r:o.top)-n-t}function Xr(e){var t=e.yMargin,r=e.initialY,n=e.containerRect;return(null!=r?r:n.top)+t}function Jr(e){var t=e.yMargin,r=e.initialY,n=e.elHeight,o=e.containerRect;return(null!=r?r:o.top+o.height)-n-t}function Qr(e){var t=e.yMargin,r=e.initialY,n=e.containerRect;return(null!=r?r:n.top+n.height)+t}function Zr(e){var t=e.x,r=e.vw,n=e.vwMargin,o=e.xMargin,i=e.width,a=e.elWidth,l=e.initialX,s=e.containerRect,c=e.disableSwapping,u=r-n;if("min"===i||"equal"===i)return function(e){var t,r,n=e.x,o=e.elWidth,i=e.xMargin,a=e.vwMargin,l=e.initialX,s=e.containerRect,c=e.screenRight,u=e.isMinWidth,d=null!=l?l:s.left+i,p=s.width-2*i;if(u){t=p,o>p&&(d-=(o-p)/2,t=o),p=void 0;var f=d+o;f>c&&(d-=f-c,r=a),d=Math.max(a,d)}return{left:d,right:r,width:p,minWidth:t,actualX:n}}({x:t,vwMargin:n,xMargin:o,elWidth:a,initialX:l,containerRect:s,screenRight:u,isMinWidth:"min"===i});if(a>r-2*n)return{left:n,right:n,actualX:t};var d={vwMargin:n,xMargin:o,elWidth:a,initialX:l,screenRight:u,containerRect:s,disableSwapping:c};switch(t){case"left":return function(e){var t=e.vwMargin,r=e.screenRight,n=e.elWidth,o=e.disableSwapping,i=Wr(e),a="left";if(i>=t)return{actualX:a,left:i};var l=Gr(e);return o||l+n>r?i=t:(i=l,a="right"),{actualX:a,left:i}}(d);case"inner-left":return function(e){var t=e.vwMargin,r=e.screenRight,n=e.elWidth,o=e.disableSwapping,i=Ur(e),a="inner-left";if(i+n<=r&&i>=t)return{actualX:a,left:i};if(o)return{actualX:a,left:i=i+n>r?r-n:t};var l=qr(e);return l<t?i=t:l+n>r?(i=r-n,a="inner-right"):(i=l,a="inner-right"),{actualX:a,left:i}}(d);case"center":return function(e){var t=e.vwMargin,r=e.screenRight,n=e.elWidth,o=function(e){var t=e.elWidth,r=e.initialX,n=e.containerRect,o=n.width/2,i=t/2;return(null!=r?r:n.left+o)-i}(e);return o<t?o=t:(o+n>r||o<t)&&(o=r-n),{actualX:"center",left:o}}(d);case"inner-right":return function(e){var t=e.screenRight,r=e.vwMargin,n=e.elWidth,o=e.disableSwapping,i=qr(e),a="inner-right";if(i>=r)return{actualX:a,left:Math.min(i,t-n)};var l=Ur(e);return o||l+n>t?i=r:(i=Math.max(l,r),a="inner-left"),{actualX:a,left:i}}(d);case"right":return function(e){var t=e.screenRight,r=e.vwMargin,n=e.elWidth,o=e.disableSwapping,i=Gr(e),a="right";if(i+n<=t)return{actualX:a,left:i};var l=Wr(e);return o||l<r?i=t-n:(i=l,a="left"),{actualX:a,left:i}}(d)}}function $r(e){var t=e.y,r=e.vh,n=e.vhMargin,o=e.yMargin,i=e.elHeight,a=e.initialY,l=e.containerRect,s=e.disableSwapping,c=e.preventOverlap,u=e.disableVHBounds;if(!u&&!c&&i>r-2*n)return{top:n,bottom:n,actualY:"center",transformOriginY:l.top};var d={vhMargin:n,yMargin:o,elHeight:i,initialY:a,containerRect:l,screenBottom:r-n,preventOverlap:c,disableSwapping:s,disableVHBounds:u};switch(t){case"above":return function(e){var t=e.yMargin,r=e.vhMargin,n=e.screenBottom,o=e.elHeight,i=e.containerRect,a=e.preventOverlap,l=e.disableSwapping,s=e.disableVHBounds,c=Yr(e),u="above";if(s)return{actualY:u,top:Math.max(0,c)};if(c>r)return{actualY:u,top:c};var d,p=Qr(e);return l||p+o>n?c=Math.min(c,r):(u="below",c=p),a&&"above"===u&&c+o>i.top&&(d=n-i.top+t),{actualY:u,top:c,bottom:d}}(d);case"top":return function(e){var t=e.vhMargin,r=e.screenBottom,n=e.elHeight,o=e.disableSwapping,i=e.disableVHBounds,a=Xr(e),l="top";if(i||a+n<=r)return{actualY:l,top:a};var s=Jr(e);return o||s<t?a=Math.max(a,t):(l="bottom",a=s),{actualY:l,top:a}}(d);case"center":return function(e){var t=e.vhMargin,r=e.screenBottom,n=e.elHeight,o=e.disableVHBounds,i=function(e){var t=e.yMargin,r=e.elHeight,n=e.initialY,o=e.containerRect,i=o.height/2,a=r/2;return(null!=n?n:o.top+i+t)-a}(e),a="center";return o?{actualY:a,top:Math.max(0,i)}:((i=Math.max(t,i))+n>r&&(i=r-n),{actualY:a,top:i})}(d);case"bottom":return function(e){var t=e.vhMargin,r=e.screenBottom,n=e.elHeight,o=e.disableSwapping,i=e.disableVHBounds,a=Jr(e),l="bottom";if(i||a>t)return{actualY:l,top:a};var s=Xr(e);return o||s+n>r?a=Math.min(a,r-n):(l="top",a=s),{actualY:l,top:a}}(d);case"below":return function(e){var t=e.yMargin,r=e.vhMargin,n=e.elHeight,o=e.screenBottom,i=e.containerRect,a=e.preventOverlap,l=e.disableSwapping,s=e.disableVHBounds,c=Qr(e),u="below";if(s||c+n<=o)return{actualY:u,top:c};if(a){var d=i.top-t;return l||d<o-c?{actualY:u,top:c,bottom:r}:{actualY:"above",top:Math.max(r,d-n),bottom:window.innerHeight-d}}var p=Yr(e);return l||p<r?c=Math.min(c,o-n):(u="above",c=p),{actualY:u,top:c}}(d)}}function en(e){var t=e.transformOriginY,r="0";switch(e.x){case"right":case"inner-left":default:r="0";break;case"center":r="50%";break;case"left":case"inner-right":r="100%"}var n="0";if("number"==typeof t)n="".concat(t,"px");else switch(e.y){case"above":case"bottom":n="100%";break;case"center":n="50%";break;default:n="0"}return"".concat(r," ").concat(n)}var tn={x:0,y:0,height:0,width:0,left:0,right:0,top:0,bottom:0,toJSON:function(){}};function rn(e){var t,r=e.element,n=e.anchor,o=void 0===n?zr:n,i=e.initialX,a=e.vwMargin,l=void 0===a?16:a,s=e.vhMargin,c=void 0===s?16:s,u=e.xMargin,d=void 0===u?0:u,p=e.yMargin,f=void 0===p?0:p,v=e.width,y=void 0===v?"auto":v,m=e.preventOverlap,h=void 0!==m&&m,b=e.transformOrigin,g=void 0!==b&&b,O=e.disableSwapping,x=void 0!==O&&O,w=e.disableVHBounds,j=void 0!==w&&w,P=e.initialY,S=Tr(e.container);if(!r)return{actualX:o.x,actualY:o.y,style:{left:i,top:P,position:j?"absolute":"fixed",transformOrigin:g?en({x:o.x,y:o.y}):void 0}};var E=null!==(t=null==S?void 0:S.getBoundingClientRect())&&void 0!==t?t:tn,C=window.innerHeight,N=window.innerWidth,I=r.style.minWidth;"min"===y&&(r.style.overflow="visible",r.style.minWidth="");var T=kr(r),A=T.height,R=T.width;("min"===y&&(R+=mr(),r.style.overflow="",r.style.minWidth=I),j)&&