@worldresources/wri-design-systems 2.138.7 → 2.139.0
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/dist/index.cjs.js +101 -101
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +71 -71
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2236,7 +2236,36 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
2236
2236
|
* focus-trap 6.9.4
|
|
2237
2237
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2238
2238
|
*/
|
|
2239
|
-
function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yc(Object(n),!0).forEach((function(t){wc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jc,kc=(jc=[],{activateTrap:function(e){if(jc.length>0){var t=jc[jc.length-1];t!==e&&t.pause()}var n=jc.indexOf(e);-1===n||jc.splice(n,1),jc.push(e)},deactivateTrap:function(e){var t=jc.indexOf(e);-1!==t&&jc.splice(t,1),jc.length>0&&jc[jc.length-1].unpause()}}),Sc=function(e){return setTimeout(e,0)},$c=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},Ec=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Oc=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Rc=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=Cc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},s=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=gc(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?ac([t],n.includeContainer,{filter:pc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):oc(t,n.includeContainer,pc.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return vc(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return vc(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Oc(e);s(t)>=0||(Ec(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!bc(t,i.tabbableOptions)}):Ec(i.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Oc(e),n=s(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==Ec(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Oc(e);u();var n=null;if(o.tabbableGroups.length>0){var r=s(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=$c(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||bc(t,i.tabbableOptions)&&!vc(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?o.tabbableGroups.length-1:c-1;n=o.tabbableGroups[p].lastTabbableNode}}else{var h=$c(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||bc(t,i.tabbableOptions)&&!vc(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===o.tabbableGroups.length-1?0:h+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=Oc(e);s(t)>=0||Ec(i.clickOutsideDeactivates,e)||Ec(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(o.active)return kc.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Sc((function(){d(c())})):d(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",x,{capture:!0,passive:!1}),n},m=function(){if(o.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",x,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||u(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){i&&u(),v(),n&&n()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!o.active)return this;var t=Cc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,m(),o.active=!1,o.paused=!1,kc.deactivateTrap(n);var r=a(t,"onDeactivate"),s=a(t,"onPostDeactivate"),l=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var u=function(){Sc((function(){c&&d(p(o.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(o.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,m()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&u(),this}}).updateContainerElements(e),n};var Lc=!1;if("undefined"!=typeof window){var Tc={get passive(){Lc=!0}};window.addEventListener("testPassive",null,Tc),window.removeEventListener("testPassive",null,Tc)}var _c,Pc="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Mc=[],Dc=!1,Ic=-1,Nc=void 0,Vc=void 0,zc=function(e){return Mc.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Ac=function(e){var t=e||window.event;return!!zc(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Bc=function(e,t){if(e){if(!Mc.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Mc=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Mc),[n]),Pc?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Ic=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Ic;!zc(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Ac(e):e.stopPropagation())}(t,e)},Dc||(document.addEventListener("touchmove",Ac,Lc?{passive:!1}:void 0),Dc=!0)):function(e){if(void 0===Vc){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Vc=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Nc&&(Nc=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Hc=function(e){e?(Mc=Mc.filter((function(t){return t.targetElement!==e})),Pc?(e.ontouchstart=null,e.ontouchmove=null,Dc&&0===Mc.length&&(document.removeEventListener("touchmove",Ac,Lc?{passive:!1}:void 0),Dc=!1)):Mc.length||(void 0!==Vc&&(document.body.style.paddingRight=Vc,Vc=void 0),void 0!==Nc&&(document.body.style.overflow=Nc,Nc=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},Fc=[],Zc="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"}(_c||(_c={}));var Gc,qc=function(e){return Object.freeze(e)},Wc=function(e,t){this.inlineSize=e,this.blockSize=t,qc(this)},Uc=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,qc(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}(),Xc=function(e){return e instanceof SVGElement&&"getBBox"in e},Yc=function(e){if(Xc(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},Kc=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Jc="undefined"!=typeof window?window:{},Qc=new WeakMap,eu=/auto|scroll/,tu=/^tb|vertical/,nu=/msie|trident/i.test(Jc.navigator&&Jc.navigator.userAgent),ru=function(e){return parseFloat(e||"0")},iu=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Wc((n?t:e)||0,(n?e:t)||0)},ou=qc({devicePixelContentBoxSize:iu(),borderBoxSize:iu(),contentBoxSize:iu(),contentRect:new Uc(0,0,0,0)}),au=function(e,t){if(void 0===t&&(t=!1),Qc.has(e)&&!t)return Qc.get(e);if(Yc(e))return Qc.set(e,ou),ou;var n=getComputedStyle(e),r=Xc(e)&&e.ownerSVGElement&&e.getBBox(),i=!nu&&"border-box"===n.boxSizing,o=tu.test(n.writingMode||""),a=!r&&eu.test(n.overflowY||""),s=!r&&eu.test(n.overflowX||""),l=r?0:ru(n.paddingTop),c=r?0:ru(n.paddingRight),u=r?0:ru(n.paddingBottom),d=r?0:ru(n.paddingLeft),p=r?0:ru(n.borderTopWidth),h=r?0:ru(n.borderRightWidth),f=r?0:ru(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:ru(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,C=i?x+v:0,w=i?g+m:0,j=r?r.width:ru(n.width)-C-y,k=r?r.height:ru(n.height)-w-b,S=j+x+y+v,$=k+g+b+m,E=qc({devicePixelContentBoxSize:iu(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:iu(S,$,o),contentBoxSize:iu(j,k,o),contentRect:new Uc(d,l,j,k)});return Qc.set(e,E),E},su=function(e,t,n){var r=au(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case _c.DEVICE_PIXEL_CONTENT_BOX:return a;case _c.BORDER_BOX:return i;default:return o}},lu=function(e){var t=au(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=qc([t.borderBoxSize]),this.contentBoxSize=qc([t.contentBoxSize]),this.devicePixelContentBoxSize=qc([t.devicePixelContentBoxSize])},cu=function(e){if(Yc(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},uu=function(){var e=1/0,t=[];Fc.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new lu(t.target),i=cu(t.target);r.push(n),t.lastReportedSize=su(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},du=function(e){Fc.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(cu(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},pu=function(){var e=0;for(du(e);Fc.some((function(e){return e.activeTargets.length>0}));)e=uu(),du(e);return Fc.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Zc}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Zc),window.dispatchEvent(e)}(),e>0},hu=[],fu=function(e){if(!Gc){var t=0,n=document.createTextNode("");new MutationObserver((function(){return hu.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Gc=function(){n.textContent="".concat(t?t--:t++)}}hu.push(e),Gc()},xu=0,gu={attributes:!0,characterData:!0,childList:!0,subtree:!0},vu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],mu=function(e){return void 0===e&&(e=0),Date.now()+e},bu=!1,yu=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),!bu){bu=!0;var n,r=mu(e);n=function(){var n=!1;try{n=pu()}finally{if(bu=!1,e=r-mu(),!xu)return;n?t.run(1e3):e>0?t.run(e):t.start()}},fu((function(){requestAnimationFrame(n)}))}},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,gu)};document.body?t():Jc.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),vu.forEach((function(t){return Jc.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),vu.forEach((function(t){return Jc.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Cu=function(e){!xu&&e>0&&yu.start(),!(xu+=e)&&yu.stop()},wu=function(){function e(e,t){this.target=e,this.observedBox=t||_c.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=su(this.target,this.observedBox,!0);return function(e){return!Xc(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.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),ju=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ku=new WeakMap,Su=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},$u=function(){function e(){}return e.connect=function(e,t){var n=new ju(e,t);ku.set(e,n)},e.observe=function(e,t,n){var r=ku.get(e),i=0===r.observationTargets.length;Su(r.observationTargets,t)<0&&(i&&Fc.push(r),r.observationTargets.push(new wu(t,n&&n.box)),Cu(1),yu.schedule())},e.unobserve=function(e,t){var n=ku.get(e),r=Su(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&Fc.splice(Fc.indexOf(n),1),n.observationTargets.splice(r,1),Cu(-1))},e.disconnect=function(e){var t=this,n=ku.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Eu=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.");$u.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(!Kc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");$u.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(!Kc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");$u.unobserve(this,e)},e.prototype.disconnect=function(){$u.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Ou(){return Ou=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},Ou.apply(this,arguments)}function Ru(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Lu="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Tu(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function _u(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Pu={box:"border-box"};function Mu(e,t){var r=t.label,i=t.enabled,o=t.resizeSourceRef,a=n.useState(0),s=a[0],l=a[1];n.useDebugValue(r+": "+s);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return Lu((function(){if(e.current&&i){var t=new Eu(c);return t.observe(e.current,Pu),function(){t.disconnect()}}}),[e,c,i]),i?s:0}function Du(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Iu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Nu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Vu=function(e,t,n){return void 0===n&&(n=e.context),new Ha(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:Ou({},Iu,Nu)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:Ou({},Iu,Nu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:Ou({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Za({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),zu=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Au=["velocity"],Bu=["onRest","config"],Hu={tension:170,friction:26},Fu=Hu.tension,Zu=Hu.friction,Gu=n.forwardRef((function(e,t){var r=e.children,i=e.sibling,o=e.className,a=e.footer,s=e.header,l=e.open,c=e.initialState,u=e.lastSnapRef,d=e.initialFocusRef,p=e.onDismiss,h=e.maxHeight,f=e.defaultSnap,x=void 0===f?Wu:f,g=e.snapPoints,v=void 0===g?Uu:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,C=void 0===y||y,w=e.style,j=e.onSpringStart,k=e.onSpringCancel,S=e.onSpringEnd,$=e.reserveScrollBarGap,E=void 0===$?b:$,O=e.expandOnContentDrag,R=void 0!==O&&O,L=Ru(e,zu),T=function(){var e=n.useState(!1),t=e[0],r=e[1],i=n.useState({}),o=i[0],a=i[1],s=n.useCallback((function(e){return a((function(t){var n;return Ou({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return Ou({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&r(!0)}),[o]),{ready:t,registerReady:s}}(),_=T.ready,P=T.registerReady,M=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),N=n.useRef(S);n.useEffect((function(){D.current=j,I.current=k,N.current=S}),[k,j,S]);var V,z,A=_s((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=A[0],H=A[1],F=n.useRef(null),Z=n.useRef(null),G=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(V=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),z=n.useRef(null==V?void 0:V.matches),n.useDebugValue(z.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){z.current=e.matches};return null==V||V.addListener(e),function(){return null==V?void 0:V.removeListener(e)}}),[V]),z),Q=function(e){var t=e.targetRef,r=e.enabled,i=e.reserveScrollBarGap,o=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;o.current={activate:function(){n||(n=!0,Bc(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:i}))},deactivate:function(){n&&(n=!1,Hc(e))}}}),[r,t,i]),o}({targetRef:Z,enabled:_&&C,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,i=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,o=[],a=[];i.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(o.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=o[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),o=[],a=[])}}}),[t,r]),i}({targetRef:F,enabled:_&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,i=e.initialFocusRef,o=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(o?"Enabled":"Disabled"),n.useEffect((function(){if(!o)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=Rc(t.current,{onActivate:void 0,initialFocus:i?function(){return(null==i?void 0:i.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),s=!1;a.current={activate:function(){try{return s?Promise.resolve():(s=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){s&&(s=!1,n.deactivate())}}}),[o,r,i,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:_&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,i=e.lastSnapRef,o=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,i=e.footerEnabled,o=e.footerRef,a=e.headerEnabled,s=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,u=n.useMemo((function(){return l("contentHeight")}),[l]),d=function(e,t,r){var i=n.useMemo((function(){return t("maxHeight")}),[t]),o=n.useState((function(){return _u(e)||"undefined"!=typeof window?window.innerHeight:0})),a=o[0],s=o[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&i()}),[l,i]),Lu((function(){if(e)return s(_u(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){s(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),s(window.innerHeight),r.current="window",i(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,i,r]),a}(r,l,c),p=Mu(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=Mu(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=Mu(o,{label:"footerHeight",enabled:i,resizeSourceRef:c}),x=Math.min(d-p-f,h)+p+f;n.useDebugValue("minHeight: "+x);var g=h>0;return n.useEffect((function(){g&&u()}),[g,u]),{maxHeight:d,minHeight:x,headerHeight:p,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),s=a.maxHeight,l=a.minHeight,c=a.headerHeight,u=a.footerHeight,d=function(e,t){var n=[].concat(e).map(_u).reduce((function(e,n){return e.add(Tu(n,0,t)),e}),new Set),r=Array.from(n),i=Math.min.apply(Math,r);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");var o=Math.max.apply(Math,r);if(Number.isNaN(o))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:i,maxSnap:o}}(o?t({height:r.current,footerHeight:u,headerHeight:c,minHeight:l,maxHeight:s}):[0],s),p=d.snapPoints,h=d.minSnap,f=d.maxSnap;return n.useDebugValue("minSnap: "+h+", maxSnap:"+f),{minSnap:h,maxSnap:f,findSnap:function(e){var t=_u("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:i.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:G,controlledMaxHeight:h,footerEnabled:!!a,footerRef:W,getSnapPoints:v,headerEnabled:!1!==s,headerRef:q,heightRef:X,lastSnapRef:u,ready:_,registerReady:P,resizeSourceRef:Y}),re=ne.minSnap,ie=ne.maxSnap,oe=ne.maxHeight,ae=ne.findSnap,se=n.useRef(oe),le=n.useRef(re),ce=n.useRef(ie),ue=n.useRef(ae),de=n.useRef(0);Lu((function(){se.current=oe,ce.current=ie,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,oe,ie,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,i=void 0===r?1:r,o=Ru(n,Au),a=Ru(e,Bu);return new Promise((function(e){return H(Ou({},a,{config:Ou({velocity:i},o,{mass:1,tension:Fu,friction:Math.max(Zu,Zu+(Zu-Zu*i))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=rs(Vu,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:Y.current})}),[]),onOpenEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:Y.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(pe({y:de.current,ready:0,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),activate:n.useCallback((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(pe({y:0,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:J.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J]),snapSmoothly:n.useCallback((function(e,t){try{var n=ue.current(e.y);return X.current=n,u.current=n,Promise.resolve(pe({y:n,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:J.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),resizeSmoothly:n.useCallback((function(){try{var e=ue.current(X.current);return X.current=e,u.current=e,Promise.resolve(pe({y:e,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==Y.current||J.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),closeSmoothly:n.useCallback((function(e,t){try{return pe({minSnap:X.current,immediate:!0}),X.current=0,Promise.resolve(pe({y:0,maxHeight:se.current,maxSnap:ce.current,immediate:J.current})).then((function(){return Promise.resolve(pe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J])}}),fe=he[0],xe=he[1];n.useEffect((function(){_&&xe(l?"OPEN":"CLOSE")}),[l,xe,_]),Lu((function(){(oe||ie||re)&&xe("RESIZE")}),[oe,ie,re,xe]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,i=void 0===r?1:r,o=n.source,a=void 0===o?"custom":o;xe("SNAP",{payload:{y:ue.current(e),velocity:i,source:a}})},get height(){return X.current}}}),[xe]),n.useEffect((function(){var e=Z.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,Z]);var ge=Ql((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,i=void 0!==r&&r,o=n.isContentDragging,a=void 0!==o&&o,s=e.cancel,l=e.direction[1],c=e.down,u=e.first,d=e.last,h=e.memo,f=void 0===h?B.y.getValue():h,x=e.tap,g=e.velocity,v=-1*e.movement[1];if(!M.current)return s(),f;if(p&&i&&x)return s(),setTimeout((function(){return p()}),0),f;if(x)return f;var m=f+v,b=v*g,y=Math.max(le.current,Math.min(ce.current,m+2*b));if(!c&&p&&l>0&&m+b<le.current/2)return s(),p(),f;var C=c?p||le.current!==ce.current?fl(m,p?0:le.current,ce.current,.55):m<le.current?fl(m,le.current,2*ce.current,.55):fl(m,le.current/2,ce.current,.55):y;return R&&a?(C>=ce.current&&(C=ce.current),f===ce.current&&Z.current.scrollTop>0&&(C=ce.current),K.current=C<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:C,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:C,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=$s([n.y,n.maxHeight],(function(e,t){return Math.round(Tu(t-e,0,16))+"px"})),i=$s([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Tu(e,t,n)+"px"})),o=$s([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=$s([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=$s([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Tu((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=$s([n.y,n.minSnap],(function(e,t){return t?Tu(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=s,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=o,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=i,t}({spring:B});return n.createElement(ll.div,Ou({},L,{"data-rsbs-root":!0,"data-rsbs-state":qu.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:o,ref:F,style:Ou({},ve,w,{opacity:B.ready})}),i,b&&n.createElement("div",Ou({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:U,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),p&&p())}},!1!==s&&n.createElement("div",Ou({key:"header","data-rsbs-header":!0,ref:q},ge()),s),n.createElement("div",Ou({key:"scroll","data-rsbs-scroll":!0,ref:Z},R?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:G},r)),a&&n.createElement("div",Ou({key:"footer",ref:W,"data-rsbs-footer":!0},ge()),a)))})),qu=["closed","opening","open","closing","dragging","snapping","resizing"];function Wu(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Uu(e){return e.minHeight}var Xu=["onSpringStart","onSpringEnd","skipInitialTransition"],Yu=n.forwardRef((function(e,t){var r=e.onSpringStart,i=e.onSpringEnd,o=e.skipInitialTransition,a=Ru(e,Xu),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(o&&a.open?"OPEN":"CLOSED");Lu((function(){if(a.open)return cancelAnimationFrame(u.current),c(!0),function(){p.current="CLOSED"}}),[a.open]);var h=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(u.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==i?void 0:i(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[i]);return l?n.createElement(Gi,{"data-rsbs-portal":!0},n.createElement(Gu,Ou({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const Ku=r.css`
|
|
2239
|
+
function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yc(Object(n),!0).forEach((function(t){wc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jc,kc=(jc=[],{activateTrap:function(e){if(jc.length>0){var t=jc[jc.length-1];t!==e&&t.pause()}var n=jc.indexOf(e);-1===n||jc.splice(n,1),jc.push(e)},deactivateTrap:function(e){var t=jc.indexOf(e);-1!==t&&jc.splice(t,1),jc.length>0&&jc[jc.length-1].unpause()}}),Sc=function(e){return setTimeout(e,0)},$c=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},Ec=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},Oc=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},Rc=function(e,t){var n,r=(null==t?void 0:t.document)||document,i=Cc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:i[n||t]},s=function(e){return o.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=i[e];if("function"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t=t.apply(void 0,o)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if("string"==typeof t&&!(s=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return s},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=o.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},u=function(){if(o.containerGroups=o.containers.map((function(e){var t,n,r=gc(e,i.tabbableOptions),o=(t=e,(n=(n=i.tabbableOptions)||{}).getShadowRoot?ac([t],n.includeContainer,{filter:pc.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):oc(t,n.includeContainer,pc.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(t){return t===e}));if(!(n<0))return t?o.slice(n+1).find((function(e){return vc(e,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(e){return vc(e,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},p=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=Oc(e);s(t)>=0||(Ec(i.clickOutsideDeactivates,e)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!bc(t,i.tabbableOptions)}):Ec(i.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=Oc(e),n=s(t)>=0;n||t instanceof Document?n&&(o.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||c()))},x=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==Ec(i.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=Oc(e);u();var n=null;if(o.tabbableGroups.length>0){var r=s(t),a=r>=0?o.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=$c(o.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||bc(t,i.tabbableOptions)&&!vc(t,i.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?o.tabbableGroups.length-1:c-1;n=o.tabbableGroups[p].lastTabbableNode}}else{var h=$c(o.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||bc(t,i.tabbableOptions)&&!vc(t,i.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===o.tabbableGroups.length-1?0:h+1;n=o.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),d(n))}(e)},g=function(e){var t=Oc(e);s(t)>=0||Ec(i.clickOutsideDeactivates,e)||Ec(i.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(o.active)return kc.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Sc((function(){d(c())})):d(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",x,{capture:!0,passive:!1}),n},m=function(){if(o.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",x,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(e){if(o.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),i=a(e,"checkCanFocusTrap");i||u(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,t&&t();var s=function(){i&&u(),v(),n&&n()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!o.active)return this;var t=Cc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,m(),o.active=!1,o.paused=!1,kc.deactivateTrap(n);var r=a(t,"onDeactivate"),s=a(t,"onPostDeactivate"),l=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var u=function(){Sc((function(){c&&d(p(o.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(p(o.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,m()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,u(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return o.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),o.active&&u(),this}}).updateContainerElements(e),n};var Lc=!1;if("undefined"!=typeof window){var Tc={get passive(){Lc=!0}};window.addEventListener("testPassive",null,Tc),window.removeEventListener("testPassive",null,Tc)}var _c,Pc="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Mc=[],Dc=!1,Ic=-1,Nc=void 0,Vc=void 0,zc=function(e){return Mc.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Ac=function(e){var t=e||window.event;return!!zc(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Bc=function(e,t){if(e){if(!Mc.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Mc=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Mc),[n]),Pc?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Ic=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Ic;!zc(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Ac(e):e.stopPropagation())}(t,e)},Dc||(document.addEventListener("touchmove",Ac,Lc?{passive:!1}:void 0),Dc=!0)):function(e){if(void 0===Vc){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Vc=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Nc&&(Nc=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Hc=function(e){e?(Mc=Mc.filter((function(t){return t.targetElement!==e})),Pc?(e.ontouchstart=null,e.ontouchmove=null,Dc&&0===Mc.length&&(document.removeEventListener("touchmove",Ac,Lc?{passive:!1}:void 0),Dc=!1)):Mc.length||(void 0!==Vc&&(document.body.style.paddingRight=Vc,Vc=void 0),void 0!==Nc&&(document.body.style.overflow=Nc,Nc=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},Fc=[],Zc="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"}(_c||(_c={}));var Gc,qc=function(e){return Object.freeze(e)},Wc=function(e,t){this.inlineSize=e,this.blockSize=t,qc(this)},Uc=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,qc(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}(),Xc=function(e){return e instanceof SVGElement&&"getBBox"in e},Yc=function(e){if(Xc(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},Kc=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Jc="undefined"!=typeof window?window:{},Qc=new WeakMap,eu=/auto|scroll/,tu=/^tb|vertical/,nu=/msie|trident/i.test(Jc.navigator&&Jc.navigator.userAgent),ru=function(e){return parseFloat(e||"0")},iu=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Wc((n?t:e)||0,(n?e:t)||0)},ou=qc({devicePixelContentBoxSize:iu(),borderBoxSize:iu(),contentBoxSize:iu(),contentRect:new Uc(0,0,0,0)}),au=function(e,t){if(void 0===t&&(t=!1),Qc.has(e)&&!t)return Qc.get(e);if(Yc(e))return Qc.set(e,ou),ou;var n=getComputedStyle(e),r=Xc(e)&&e.ownerSVGElement&&e.getBBox(),i=!nu&&"border-box"===n.boxSizing,o=tu.test(n.writingMode||""),a=!r&&eu.test(n.overflowY||""),s=!r&&eu.test(n.overflowX||""),l=r?0:ru(n.paddingTop),c=r?0:ru(n.paddingRight),u=r?0:ru(n.paddingBottom),d=r?0:ru(n.paddingLeft),p=r?0:ru(n.borderTopWidth),h=r?0:ru(n.borderRightWidth),f=r?0:ru(n.borderBottomWidth),x=d+c,g=l+u,v=(r?0:ru(n.borderLeftWidth))+h,m=p+f,b=s?e.offsetHeight-m-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,C=i?x+v:0,w=i?g+m:0,j=r?r.width:ru(n.width)-C-y,k=r?r.height:ru(n.height)-w-b,S=j+x+y+v,$=k+g+b+m,E=qc({devicePixelContentBoxSize:iu(Math.round(j*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:iu(S,$,o),contentBoxSize:iu(j,k,o),contentRect:new Uc(d,l,j,k)});return Qc.set(e,E),E},su=function(e,t,n){var r=au(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case _c.DEVICE_PIXEL_CONTENT_BOX:return a;case _c.BORDER_BOX:return i;default:return o}},lu=function(e){var t=au(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=qc([t.borderBoxSize]),this.contentBoxSize=qc([t.contentBoxSize]),this.devicePixelContentBoxSize=qc([t.devicePixelContentBoxSize])},cu=function(e){if(Yc(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},uu=function(){var e=1/0,t=[];Fc.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new lu(t.target),i=cu(t.target);r.push(n),t.lastReportedSize=su(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},du=function(e){Fc.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(cu(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},pu=function(){var e=0;for(du(e);Fc.some((function(e){return e.activeTargets.length>0}));)e=uu(),du(e);return Fc.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Zc}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Zc),window.dispatchEvent(e)}(),e>0},hu=[],fu=function(e){if(!Gc){var t=0,n=document.createTextNode("");new MutationObserver((function(){return hu.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Gc=function(){n.textContent="".concat(t?t--:t++)}}hu.push(e),Gc()},xu=0,gu={attributes:!0,characterData:!0,childList:!0,subtree:!0},vu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],mu=function(e){return void 0===e&&(e=0),Date.now()+e},bu=!1,yu=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),!bu){bu=!0;var n,r=mu(e);n=function(){var n=!1;try{n=pu()}finally{if(bu=!1,e=r-mu(),!xu)return;n?t.run(1e3):e>0?t.run(e):t.start()}},fu((function(){requestAnimationFrame(n)}))}},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,gu)};document.body?t():Jc.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),vu.forEach((function(t){return Jc.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),vu.forEach((function(t){return Jc.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Cu=function(e){!xu&&e>0&&yu.start(),!(xu+=e)&&yu.stop()},wu=function(){function e(e,t){this.target=e,this.observedBox=t||_c.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=su(this.target,this.observedBox,!0);return function(e){return!Xc(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.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),ju=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ku=new WeakMap,Su=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},$u=function(){function e(){}return e.connect=function(e,t){var n=new ju(e,t);ku.set(e,n)},e.observe=function(e,t,n){var r=ku.get(e),i=0===r.observationTargets.length;Su(r.observationTargets,t)<0&&(i&&Fc.push(r),r.observationTargets.push(new wu(t,n&&n.box)),Cu(1),yu.schedule())},e.unobserve=function(e,t){var n=ku.get(e),r=Su(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&Fc.splice(Fc.indexOf(n),1),n.observationTargets.splice(r,1),Cu(-1))},e.disconnect=function(e){var t=this,n=ku.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Eu=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.");$u.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(!Kc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");$u.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(!Kc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");$u.unobserve(this,e)},e.prototype.disconnect=function(){$u.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Ou(){return Ou=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},Ou.apply(this,arguments)}function Ru(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Lu="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function Tu(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function _u(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var Pu={box:"border-box"};function Mu(e,t){var r=t.label,i=t.enabled,o=t.resizeSourceRef,a=n.useState(0),s=a[0],l=a[1];n.useDebugValue(r+": "+s);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return Lu((function(){if(e.current&&i){var t=new Eu(c);return t.observe(e.current,Pu),function(){t.disconnect()}}}),[e,c,i]),i?s:0}function Du(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var Iu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Nu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Vu=function(e,t,n){return void 0===n&&(n=e.context),new Ha(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:Ou({},Iu,Nu)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:Ou({},Iu,Nu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:Ou({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Za({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(Du()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),zu=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Au=["velocity"],Bu=["onRest","config"],Hu={tension:170,friction:26},Fu=Hu.tension,Zu=Hu.friction,Gu=n.forwardRef((function(e,t){var r=e.children,i=e.sibling,o=e.className,a=e.footer,s=e.header,l=e.open,c=e.initialState,u=e.lastSnapRef,d=e.initialFocusRef,p=e.onDismiss,h=e.maxHeight,f=e.defaultSnap,x=void 0===f?Wu:f,g=e.snapPoints,v=void 0===g?Uu:g,m=e.blocking,b=void 0===m||m,y=e.scrollLocking,C=void 0===y||y,w=e.style,j=e.onSpringStart,k=e.onSpringCancel,S=e.onSpringEnd,$=e.reserveScrollBarGap,E=void 0===$?b:$,O=e.expandOnContentDrag,R=void 0!==O&&O,L=Ru(e,zu),T=function(){var e=n.useState(!1),t=e[0],r=e[1],i=n.useState({}),o=i[0],a=i[1],s=n.useCallback((function(e){return a((function(t){var n;return Ou({},t,((n={})[e]=!1,n))})),function(){a((function(t){var n;return Ou({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&r(!0)}),[o]),{ready:t,registerReady:s}}(),_=T.ready,P=T.registerReady,M=n.useRef(!1),D=n.useRef(j),I=n.useRef(k),N=n.useRef(S);n.useEffect((function(){D.current=j,I.current=k,N.current=S}),[k,j,S]);var V,z,A=_s((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=A[0],H=A[1],F=n.useRef(null),Z=n.useRef(null),G=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),X=n.useRef(0),Y=n.useRef(),K=n.useRef(!1),J=(V=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),z=n.useRef(null==V?void 0:V.matches),n.useDebugValue(z.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){z.current=e.matches};return null==V||V.addListener(e),function(){return null==V?void 0:V.removeListener(e)}}),[V]),z),Q=function(e){var t=e.targetRef,r=e.enabled,i=e.reserveScrollBarGap,o=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;o.current={activate:function(){n||(n=!0,Bc(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:i}))},deactivate:function(){n&&(n=!1,Hc(e))}}}),[r,t,i]),o}({targetRef:Z,enabled:_&&C,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,i=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,o=[],a=[];i.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(o.push(n),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,a.forEach((function(e,t){var n=o[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),o=[],a=[])}}}),[t,r]),i}({targetRef:F,enabled:_&&b}),te=function(e){var t=e.targetRef,r=e.fallbackRef,i=e.initialFocusRef,o=e.enabled,a=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(o?"Enabled":"Disabled"),n.useEffect((function(){if(!o)return a.current.deactivate(),void(a.current={activate:function(){},deactivate:function(){}});var e=r.current,n=Rc(t.current,{onActivate:void 0,initialFocus:i?function(){return(null==i?void 0:i.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),s=!1;a.current={activate:function(){try{return s?Promise.resolve():(s=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){s&&(s=!1,n.deactivate())}}}),[o,r,i,t]),a}({targetRef:F,fallbackRef:U,initialFocusRef:d||void 0,enabled:_&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,i=e.lastSnapRef,o=e.ready,a=function(e){var t=e.contentRef,r=e.controlledMaxHeight,i=e.footerEnabled,o=e.footerRef,a=e.headerEnabled,s=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,u=n.useMemo((function(){return l("contentHeight")}),[l]),d=function(e,t,r){var i=n.useMemo((function(){return t("maxHeight")}),[t]),o=n.useState((function(){return _u(e)||"undefined"!=typeof window?window.innerHeight:0})),a=o[0],s=o[1],l=a>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&i()}),[l,i]),Lu((function(){if(e)return s(_u(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){s(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),s(window.innerHeight),r.current="window",i(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,i,r]),a}(r,l,c),p=Mu(s,{label:"headerHeight",enabled:a,resizeSourceRef:c}),h=Mu(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=Mu(o,{label:"footerHeight",enabled:i,resizeSourceRef:c}),x=Math.min(d-p-f,h)+p+f;n.useDebugValue("minHeight: "+x);var g=h>0;return n.useEffect((function(){g&&u()}),[g,u]),{maxHeight:d,minHeight:x,headerHeight:p,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),s=a.maxHeight,l=a.minHeight,c=a.headerHeight,u=a.footerHeight,d=function(e,t){var n=[].concat(e).map(_u).reduce((function(e,n){return e.add(Tu(n,0,t)),e}),new Set),r=Array.from(n),i=Math.min.apply(Math,r);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");var o=Math.max.apply(Math,r);if(Number.isNaN(o))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:i,maxSnap:o}}(o?t({height:r.current,footerHeight:u,headerHeight:c,minHeight:l,maxHeight:s}):[0],s),p=d.snapPoints,h=d.minSnap,f=d.maxSnap;return n.useDebugValue("minSnap: "+h+", maxSnap:"+f),{minSnap:h,maxSnap:f,findSnap:function(e){var t=_u("function"==typeof e?e({footerHeight:u,headerHeight:c,height:r.current,minHeight:l,maxHeight:s,snapPoints:p,lastSnap:i.current}):e);return p.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),h)},maxHeight:s}}({contentRef:G,controlledMaxHeight:h,footerEnabled:!!a,footerRef:W,getSnapPoints:v,headerEnabled:!1!==s,headerRef:q,heightRef:X,lastSnapRef:u,ready:_,registerReady:P,resizeSourceRef:Y}),re=ne.minSnap,ie=ne.maxSnap,oe=ne.maxHeight,ae=ne.findSnap,se=n.useRef(oe),le=n.useRef(re),ce=n.useRef(ie),ue=n.useRef(ae),de=n.useRef(0);Lu((function(){se.current=oe,ce.current=ie,le.current=re,ue.current=ae,de.current=ae(x)}),[ae,x,oe,ie,re]);var pe=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,i=void 0===r?1:r,o=Ru(n,Au),a=Ru(e,Bu);return new Promise((function(e){return H(Ou({},a,{config:Ou({velocity:i},o,{mass:1,tension:Fu,friction:Math.max(Zu,Zu+(Zu-Zu*i))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),he=rs(Vu,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:Y.current})}),[]),onOpenEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:Y.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==N.current?void 0:N.current({type:"RESIZE",source:Y.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(pe({y:de.current,ready:0,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),activate:n.useCallback((function(e,t){try{return M.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),M.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(pe({y:0,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:!0})).then((function(){return X.current=de.current,Promise.resolve(pe({y:de.current,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:de.current,immediate:J.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J]),snapSmoothly:n.useCallback((function(e,t){try{var n=ue.current(e.y);return X.current=n,u.current=n,Promise.resolve(pe({y:n,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:J.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),resizeSmoothly:n.useCallback((function(){try{var e=ue.current(X.current);return X.current=e,u.current=e,Promise.resolve(pe({y:e,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==Y.current||J.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[pe,u,J]),closeSmoothly:n.useCallback((function(e,t){try{return pe({minSnap:X.current,immediate:!0}),X.current=0,Promise.resolve(pe({y:0,maxHeight:se.current,maxSnap:ce.current,immediate:J.current})).then((function(){return Promise.resolve(pe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[pe,J])}}),fe=he[0],xe=he[1];n.useEffect((function(){_&&xe(l?"OPEN":"CLOSE")}),[l,xe,_]),Lu((function(){(oe||ie||re)&&xe("RESIZE")}),[oe,ie,re,xe]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,i=void 0===r?1:r,o=n.source,a=void 0===o?"custom":o;xe("SNAP",{payload:{y:ue.current(e),velocity:i,source:a}})},get height(){return X.current}}}),[xe]),n.useEffect((function(){var e=Z.current,t=function(e){K.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,Z]);var ge=Ql((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,i=void 0!==r&&r,o=n.isContentDragging,a=void 0!==o&&o,s=e.cancel,l=e.direction[1],c=e.down,u=e.first,d=e.last,h=e.memo,f=void 0===h?B.y.getValue():h,x=e.tap,g=e.velocity,v=-1*e.movement[1];if(!M.current)return s(),f;if(p&&i&&x)return s(),setTimeout((function(){return p()}),0),f;if(x)return f;var m=f+v,b=v*g,y=Math.max(le.current,Math.min(ce.current,m+2*b));if(!c&&p&&l>0&&m+b<le.current/2)return s(),p(),f;var C=c?p||le.current!==ce.current?fl(m,p?0:le.current,ce.current,.55):m<le.current?fl(m,le.current,2*ce.current,.55):fl(m,le.current/2,ce.current,.55):y;return R&&a?(C>=ce.current&&(C=ce.current),f===ce.current&&Z.current.scrollTop>0&&(C=ce.current),K.current=C<ce.current):K.current=!1,u&&xe("DRAG"),d?(xe("SNAP",{payload:{y:C,velocity:g>.05?g:1,source:"dragging"}}),f):(H({y:C,ready:1,maxHeight:se.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=$s([n.y,n.maxHeight],(function(e,t){return Math.round(Tu(t-e,0,16))+"px"})),i=$s([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return Tu(e,t,n)+"px"})),o=$s([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=$s([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),s=$s([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return Tu((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=$s([n.y,n.minSnap],(function(e,t){return t?Tu(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=s,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=o,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=i,t}({spring:B});return n.createElement(ll.div,Ou({},L,{"data-rsbs-root":!0,"data-rsbs-state":qu.find(fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!p,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!a,className:o,ref:F,style:Ou({},ve,w,{opacity:B.ready})}),i,b&&n.createElement("div",Ou({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:U,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),p&&p())}},!1!==s&&n.createElement("div",Ou({key:"header","data-rsbs-header":!0,ref:q},ge()),s),n.createElement("div",Ou({key:"scroll","data-rsbs-scroll":!0,ref:Z},R?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:G},r)),a&&n.createElement("div",Ou({key:"footer",ref:W,"data-rsbs-footer":!0},ge()),a)))})),qu=["closed","opening","open","closing","dragging","snapping","resizing"];function Wu(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function Uu(e){return e.minHeight}var Xu=["onSpringStart","onSpringEnd","skipInitialTransition"],Yu=n.forwardRef((function(e,t){var r=e.onSpringStart,i=e.onSpringEnd,o=e.skipInitialTransition,a=Ru(e,Xu),s=n.useState(!1),l=s[0],c=s[1],u=n.useRef(),d=n.useRef(null),p=n.useRef(o&&a.open?"OPEN":"CLOSED");Lu((function(){if(a.open)return cancelAnimationFrame(u.current),c(!0),function(){p.current="CLOSED"}}),[a.open]);var h=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(u.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==i?void 0:i(e)).then((function(){"CLOSE"===e.type&&(u.current=requestAnimationFrame((function(){return c(!1)})))}))}),[i]);return l?n.createElement(Gi,{"data-rsbs-portal":!0},n.createElement(Gu,Ou({},a,{lastSnapRef:d,ref:t,initialState:p.current,onSpringStart:h,onSpringEnd:f}))):null}));const Ku=(e,t)=>r.css`
|
|
2240
|
+
[data-rsbs-overlay] {
|
|
2241
|
+
border-top-left-radius: 16px;
|
|
2242
|
+
border-top-right-radius: 16px;
|
|
2243
|
+
overflow: hidden;
|
|
2244
|
+
z-index: ${t};
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
[data-rsbs-overlay],
|
|
2248
|
+
[data-rsbs-root]:after {
|
|
2249
|
+
max-width: 100%;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
[data-rsbs-header] {
|
|
2253
|
+
padding: 0px;
|
|
2254
|
+
min-height: ${e?"50px":"20px"};
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
[data-rsbs-header]:before {
|
|
2258
|
+
height: 2px;
|
|
2259
|
+
width: 32px;
|
|
2260
|
+
background-color: ${d("neutral",300)};
|
|
2261
|
+
cursor: pointer;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
[data-rsbs-footer] {
|
|
2265
|
+
padding: 0px;
|
|
2266
|
+
min-height: 64px;
|
|
2267
|
+
}
|
|
2268
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const Ju=r.css`
|
|
2240
2269
|
a,
|
|
2241
2270
|
p {
|
|
2242
2271
|
font-size: 16px;
|
|
@@ -2268,19 +2297,19 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2268
2297
|
a:hover {
|
|
2269
2298
|
text-decoration: underline;
|
|
2270
2299
|
}
|
|
2271
|
-
`,
|
|
2300
|
+
`,Qu=r.css`
|
|
2272
2301
|
svg {
|
|
2273
2302
|
height: 12px;
|
|
2274
2303
|
width: 12px;
|
|
2275
2304
|
color: ${d("neutral",600)};
|
|
2276
2305
|
}
|
|
2277
|
-
`,
|
|
2306
|
+
`,ed=r.css`
|
|
2278
2307
|
cursor: pointer;
|
|
2279
2308
|
color: ${d("neutral",600)};
|
|
2280
2309
|
display: flex;
|
|
2281
2310
|
justify-content: center;
|
|
2282
2311
|
align-items: center;
|
|
2283
|
-
`,
|
|
2312
|
+
`,td=(e,t)=>r.css`
|
|
2284
2313
|
min-height: 56px;
|
|
2285
2314
|
width: 100vw;
|
|
2286
2315
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2290,7 +2319,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2290
2319
|
background-color: ${d("neutral",t?200:100)};
|
|
2291
2320
|
border-top: 1px solid ${d("neutral",400)};
|
|
2292
2321
|
z-index: 101;
|
|
2293
|
-
`,
|
|
2322
|
+
`,nd=e=>r.css`
|
|
2294
2323
|
height: 100%;
|
|
2295
2324
|
width: 100%;
|
|
2296
2325
|
max-width: ${e?`${e}px`:"100%"};
|
|
@@ -2305,7 +2334,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2305
2334
|
flex-direction: column;
|
|
2306
2335
|
align-items: flex-start;
|
|
2307
2336
|
}
|
|
2308
|
-
`,
|
|
2337
|
+
`,rd=r.css`
|
|
2309
2338
|
display: flex;
|
|
2310
2339
|
align-items: center;
|
|
2311
2340
|
flex-wrap: wrap;
|
|
@@ -2318,7 +2347,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2318
2347
|
color: ${d("neutral",700)};
|
|
2319
2348
|
text-decoration: underline;
|
|
2320
2349
|
}
|
|
2321
|
-
`,
|
|
2350
|
+
`,id=r.css`
|
|
2322
2351
|
width: 240px;
|
|
2323
2352
|
font-size: 14px;
|
|
2324
2353
|
line-height: 20px;
|
|
@@ -2329,7 +2358,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2329
2358
|
@media screen and (max-width: 768px) {
|
|
2330
2359
|
text-align: left;
|
|
2331
2360
|
}
|
|
2332
|
-
`,
|
|
2361
|
+
`,od=(e,t)=>r.css`
|
|
2333
2362
|
height: ${e?"96px":"48px"};
|
|
2334
2363
|
width: 100%;
|
|
2335
2364
|
background-color: ${d("neutral",100)};
|
|
@@ -2338,7 +2367,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2338
2367
|
left: 0;
|
|
2339
2368
|
z-index: 102;
|
|
2340
2369
|
border-bottom: 1px solid ${d("neutral",400)};
|
|
2341
|
-
`,
|
|
2370
|
+
`,ad=r.css`
|
|
2342
2371
|
height: 48px;
|
|
2343
2372
|
width: 100%;
|
|
2344
2373
|
background-color: ${d("neutral",100)};
|
|
@@ -2348,7 +2377,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2348
2377
|
justify-content: flex-start;
|
|
2349
2378
|
gap: 0px;
|
|
2350
2379
|
padding: 8px 16px;
|
|
2351
|
-
`,
|
|
2380
|
+
`,sd=(e,t)=>r.css`
|
|
2352
2381
|
height: 48px;
|
|
2353
2382
|
width: 100%;
|
|
2354
2383
|
max-width: ${t?`${t}px`:"100%"};
|
|
@@ -2358,7 +2387,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2358
2387
|
justify-content: space-between;
|
|
2359
2388
|
margin: 0 auto;
|
|
2360
2389
|
padding: 8px 16px;
|
|
2361
|
-
`,
|
|
2390
|
+
`,ld=r.css`
|
|
2362
2391
|
outline: none;
|
|
2363
2392
|
a {
|
|
2364
2393
|
&:focus-visible {
|
|
@@ -2369,12 +2398,12 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2369
2398
|
outline-width: 2px;
|
|
2370
2399
|
}
|
|
2371
2400
|
}
|
|
2372
|
-
`,
|
|
2401
|
+
`,cd=e=>r.css`
|
|
2373
2402
|
display: ${e?"none":"flex"};
|
|
2374
2403
|
align-items: center;
|
|
2375
2404
|
justify-content: flex-start;
|
|
2376
2405
|
gap: 0px;
|
|
2377
|
-
`,
|
|
2406
|
+
`,ud=e=>r.css`
|
|
2378
2407
|
font-size: 16px;
|
|
2379
2408
|
line-height: 24px;
|
|
2380
2409
|
font-weight: 400;
|
|
@@ -2399,12 +2428,12 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2399
2428
|
font-weight: 700;
|
|
2400
2429
|
color: ${d("accessible","controls-on-neutral-lights")};
|
|
2401
2430
|
`:""}
|
|
2402
|
-
`,
|
|
2431
|
+
`,dd=r.css`
|
|
2403
2432
|
height: 48px;
|
|
2404
2433
|
display: flex;
|
|
2405
2434
|
align-items: center;
|
|
2406
2435
|
justify-content: flex-end;
|
|
2407
|
-
`,
|
|
2436
|
+
`,pd=e=>r.css`
|
|
2408
2437
|
height: 100%;
|
|
2409
2438
|
font-size: 16px;
|
|
2410
2439
|
line-height: 24px;
|
|
@@ -2423,7 +2452,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2423
2452
|
}
|
|
2424
2453
|
}
|
|
2425
2454
|
`:""}
|
|
2426
|
-
`,
|
|
2455
|
+
`,hd=e=>r.css`
|
|
2427
2456
|
height: 100%;
|
|
2428
2457
|
display: flex;
|
|
2429
2458
|
align-items: center;
|
|
@@ -2431,7 +2460,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2431
2460
|
gap: 20px;
|
|
2432
2461
|
padding-left: 16px;
|
|
2433
2462
|
border-left: 1px solid ${d("neutral",e?700:300)};
|
|
2434
|
-
`,
|
|
2463
|
+
`,fd=r.css`
|
|
2435
2464
|
background-color: none;
|
|
2436
2465
|
border: none;
|
|
2437
2466
|
cursor: pointer;
|
|
@@ -2456,7 +2485,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2456
2485
|
outline-width: 2px;
|
|
2457
2486
|
background-color: ${d("neutral",200)};
|
|
2458
2487
|
}
|
|
2459
|
-
`,
|
|
2488
|
+
`,xd=e=>r.css`
|
|
2460
2489
|
position: absolute;
|
|
2461
2490
|
top: 48px;
|
|
2462
2491
|
right: 0;
|
|
@@ -2469,10 +2498,10 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2469
2498
|
justify-content: flex-start;
|
|
2470
2499
|
gap: 16px;
|
|
2471
2500
|
transition: width 0.5s ease-in-out;
|
|
2472
|
-
`,
|
|
2501
|
+
`,gd=r.css`
|
|
2473
2502
|
height: 100%;
|
|
2474
2503
|
width: 100%;
|
|
2475
|
-
`,
|
|
2504
|
+
`,vd=r.css`
|
|
2476
2505
|
background-color: ${d("neutral",200)};
|
|
2477
2506
|
border-bottom: 1px solid ${d("neutral",300)};
|
|
2478
2507
|
|
|
@@ -2492,13 +2521,13 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2492
2521
|
margin-left: -12px;
|
|
2493
2522
|
}
|
|
2494
2523
|
}
|
|
2495
|
-
`,vd=r.css`
|
|
2496
|
-
background-color: ${d("neutral",100)};
|
|
2497
2524
|
`,md=r.css`
|
|
2525
|
+
background-color: ${d("neutral",100)};
|
|
2526
|
+
`,bd=r.css`
|
|
2498
2527
|
min-height: 100vh;
|
|
2499
2528
|
width: 100%;
|
|
2500
2529
|
overflow-y: scroll;
|
|
2501
|
-
`;r.css``;const
|
|
2530
|
+
`;r.css``;const yd=e=>r.css`
|
|
2502
2531
|
display: inline-block;
|
|
2503
2532
|
width: 100%;
|
|
2504
2533
|
padding: 12px 16px;
|
|
@@ -2527,7 +2556,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2527
2556
|
outline-width: 2px;
|
|
2528
2557
|
background-color: ${d("neutral",200)};
|
|
2529
2558
|
}
|
|
2530
|
-
`,
|
|
2559
|
+
`,Cd=r.css`
|
|
2531
2560
|
width: 100%;
|
|
2532
2561
|
padding: 12px 16px;
|
|
2533
2562
|
display: flex;
|
|
@@ -2551,7 +2580,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2551
2580
|
outline-width: 2px;
|
|
2552
2581
|
background-color: ${d("neutral",200)};
|
|
2553
2582
|
}
|
|
2554
|
-
`,
|
|
2583
|
+
`,wd=e=>r.css`
|
|
2555
2584
|
position: absolute;
|
|
2556
2585
|
top: 0px;
|
|
2557
2586
|
right: 0;
|
|
@@ -2563,7 +2592,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2563
2592
|
align-items: flex-start;
|
|
2564
2593
|
justify-content: flex-start;
|
|
2565
2594
|
transition: width 0.5s ease-in-out;
|
|
2566
|
-
`,
|
|
2595
|
+
`,jd=r.css`
|
|
2567
2596
|
height: 48px;
|
|
2568
2597
|
width: 100%;
|
|
2569
2598
|
display: flex;
|
|
@@ -2574,7 +2603,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2574
2603
|
position: relative;
|
|
2575
2604
|
top: 0;
|
|
2576
2605
|
left: 0;
|
|
2577
|
-
`,
|
|
2606
|
+
`,kd=r.css`
|
|
2578
2607
|
position: absolute;
|
|
2579
2608
|
bottom: 0;
|
|
2580
2609
|
left: 0;
|
|
@@ -2589,7 +2618,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2589
2618
|
button {
|
|
2590
2619
|
width: calc(48% - 24px);
|
|
2591
2620
|
}
|
|
2592
|
-
`,
|
|
2621
|
+
`,Sd=({navigationSection:e,utilitySection:r,actionsSection:i,linkRouter:o,isOpen:a,setIsOpen:s,pathname:l})=>{const[c,u]=n.useState(void 0),[d,p]=n.useState(-1),h=n.useRef(null),f=n.useRef([]),x=o;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:xd(a),children:a&&t.jsxs("div",{css:gd,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:vd,children:r?.map((e=>t.jsx("div",{className:"utility-item",children:e})))}):null,e?t.jsx("div",{css:md,children:e.map(((e,n)=>e.link?t.jsx(x,{to:e.link,href:e.link,onClick:()=>{u(void 0),p(-1),s(!1)},css:yd(l===e.link),children:e.label},e.label):t.jsxs("button",{css:Cd,type:"button",ref:e=>f.current[n]=e,onClick:()=>{e.items&&(u(e),p(n),setTimeout((()=>{h.current?.focus()}),100))},children:[e.label,e.items?t.jsx(j,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),i?t.jsx("div",{css:kd,children:i.map((e=>t.jsx(v,{label:e.label,onClick:()=>{e?.onClick?.(),u(void 0),p(-1),s(!1)}},e.label)))}):null]})}),t.jsx("div",{css:wd(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:jd,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:fd,ref:h,children:[t.jsx(j,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),s(!1)},"aria-label":"Close menu",css:fd,children:["Close",t.jsx(S,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:bd,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:yd(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},$d=1023,Ed=r.css`
|
|
2593
2622
|
width: 64px;
|
|
2594
2623
|
height: 100%;
|
|
2595
2624
|
z-index: 100;
|
|
@@ -2598,7 +2627,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2598
2627
|
display: flex;
|
|
2599
2628
|
flex-direction: column;
|
|
2600
2629
|
justify-content: space-between;
|
|
2601
|
-
`,
|
|
2630
|
+
`,Od=r.css`
|
|
2602
2631
|
width: 64px;
|
|
2603
2632
|
height: 64px;
|
|
2604
2633
|
background-color: ${d("neutral",200)};
|
|
@@ -2688,7 +2717,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2688
2717
|
}
|
|
2689
2718
|
}
|
|
2690
2719
|
}
|
|
2691
|
-
`,
|
|
2720
|
+
`,Rd=r.css`
|
|
2692
2721
|
display: flex;
|
|
2693
2722
|
justify-content: center;
|
|
2694
2723
|
align-items: center;
|
|
@@ -2701,7 +2730,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2701
2730
|
fill: ${d("neutral",600)};
|
|
2702
2731
|
}
|
|
2703
2732
|
}
|
|
2704
|
-
`,
|
|
2733
|
+
`,Ld=r.css`
|
|
2705
2734
|
width: 64px;
|
|
2706
2735
|
height: 64px;
|
|
2707
2736
|
background-color: ${d("neutral",200)};
|
|
@@ -2739,7 +2768,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2739
2768
|
text-align: center;
|
|
2740
2769
|
color: ${d("neutral",600)};
|
|
2741
2770
|
}
|
|
2742
|
-
`,
|
|
2771
|
+
`,Td=r.css`
|
|
2743
2772
|
width: 320px;
|
|
2744
2773
|
height: 100%;
|
|
2745
2774
|
z-index: 100;
|
|
@@ -2747,14 +2776,14 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2747
2776
|
background-color: ${d("neutral",100)};
|
|
2748
2777
|
overflow-y: auto;
|
|
2749
2778
|
overflow-x: hidden;
|
|
2750
|
-
`,
|
|
2779
|
+
`,_d=e=>r.css`
|
|
2751
2780
|
width: 100%;
|
|
2752
2781
|
display: flex;
|
|
2753
2782
|
align-items: center;
|
|
2754
2783
|
height: 40px;
|
|
2755
2784
|
|
|
2756
2785
|
${"view"===e&&`\n border: 1px solid ${d("neutral",400)};\n background-color: ${d("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
|
|
2757
|
-
`,
|
|
2786
|
+
`,Pd=r.css`
|
|
2758
2787
|
width: 99%;
|
|
2759
2788
|
height: 40px;
|
|
2760
2789
|
padding: 8px 16px;
|
|
@@ -2770,7 +2799,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2770
2799
|
&:focus-visible {
|
|
2771
2800
|
box-shadow: none;
|
|
2772
2801
|
}
|
|
2773
|
-
`,
|
|
2802
|
+
`,Md=r.css`
|
|
2774
2803
|
background-color: ${d("neutral",200)};
|
|
2775
2804
|
color: ${d("neutral",700)};
|
|
2776
2805
|
|
|
@@ -2827,11 +2856,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2827
2856
|
opacity: 1;
|
|
2828
2857
|
}
|
|
2829
2858
|
}
|
|
2830
|
-
`,
|
|
2859
|
+
`,Dd=r.css`
|
|
2831
2860
|
width: 4px;
|
|
2832
2861
|
height: 24px;
|
|
2833
2862
|
background-color: ${d("neutral",400)};
|
|
2834
|
-
`,
|
|
2863
|
+
`,Id=r.css`
|
|
2835
2864
|
height: 32px;
|
|
2836
2865
|
border-radius: 2px;
|
|
2837
2866
|
background-color: ${d("neutral",200)};
|
|
@@ -2904,16 +2933,16 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2904
2933
|
opacity: 1;
|
|
2905
2934
|
}
|
|
2906
2935
|
}
|
|
2907
|
-
`,
|
|
2936
|
+
`,Nd=(e,t)=>e.findIndex((e=>e.value===t)),Vd=e=>1===e?"none":2===e?"left":"right",zd=r.css`
|
|
2908
2937
|
display: flex;
|
|
2909
2938
|
justify-content: flex-start;
|
|
2910
2939
|
align-items: center;
|
|
2911
2940
|
gap: 8px;
|
|
2912
|
-
`,
|
|
2941
|
+
`,Ad=e=>r.css`
|
|
2913
2942
|
width: ${e||"16px"};
|
|
2914
2943
|
position: relative;
|
|
2915
2944
|
display: flex;
|
|
2916
|
-
`,
|
|
2945
|
+
`,Bd=r.css`
|
|
2917
2946
|
height: 4px;
|
|
2918
2947
|
width: 4px;
|
|
2919
2948
|
background-color: ${d("error",500)};
|
|
@@ -2921,7 +2950,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2921
2950
|
position: absolute;
|
|
2922
2951
|
top: 0px;
|
|
2923
2952
|
right: 0px;
|
|
2924
|
-
`,
|
|
2953
|
+
`,Hd=r.css`
|
|
2925
2954
|
height: 10px;
|
|
2926
2955
|
background-color: ${d("error",500)};
|
|
2927
2956
|
padding: 0 3px 1px 3px;
|
|
@@ -2932,11 +2961,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2932
2961
|
position: absolute;
|
|
2933
2962
|
top: -2px;
|
|
2934
2963
|
left: 9px;
|
|
2935
|
-
`,
|
|
2964
|
+
`,Fd=r.css`
|
|
2936
2965
|
font-size: 9px;
|
|
2937
2966
|
font-weight: 700;
|
|
2938
2967
|
color: ${d("error",100)};
|
|
2939
|
-
`,
|
|
2968
|
+
`,Zd=r.css`
|
|
2940
2969
|
height: 16px;
|
|
2941
2970
|
min-width: 16px;
|
|
2942
2971
|
background-color: ${d("error",500)};
|
|
@@ -2945,11 +2974,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2945
2974
|
justify-content: center;
|
|
2946
2975
|
align-items: center;
|
|
2947
2976
|
padding: 0px 4px 1px 4px;
|
|
2948
|
-
`,
|
|
2977
|
+
`,Gd=r.css`
|
|
2949
2978
|
font-size: 16px;
|
|
2950
2979
|
font-weight: 700;
|
|
2951
2980
|
color: ${d("error",100)};
|
|
2952
|
-
`,
|
|
2981
|
+
`,qd=(e,t)=>r.css`
|
|
2953
2982
|
width: 100%;
|
|
2954
2983
|
min-width: ${"small"===e?"234px":"320px"};
|
|
2955
2984
|
border-radius: 4px;
|
|
@@ -2964,7 +2993,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2964
2993
|
button {
|
|
2965
2994
|
margin-left: ${t?0:"24px"};
|
|
2966
2995
|
}
|
|
2967
|
-
`,
|
|
2996
|
+
`,Wd=r.css`
|
|
2968
2997
|
display: flex;
|
|
2969
2998
|
align-items: flex-start;
|
|
2970
2999
|
gap: 8px;
|
|
@@ -2972,28 +3001,28 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2972
3001
|
svg {
|
|
2973
3002
|
margin-top: 6px;
|
|
2974
3003
|
}
|
|
2975
|
-
`,
|
|
3004
|
+
`,Ud=e=>r.css`
|
|
2976
3005
|
color: ${d("neutral",800)};
|
|
2977
3006
|
font-size: ${"small"===e?"14px":"18px"};
|
|
2978
3007
|
line-height: ${"small"===e?"20px":"28px"};
|
|
2979
3008
|
font-weight: 400;
|
|
2980
3009
|
text-align: left;
|
|
2981
|
-
`,
|
|
3010
|
+
`,Xd=e=>r.css`
|
|
2982
3011
|
color: ${d("neutral",700)};
|
|
2983
3012
|
font-size: ${"small"===e?"12px":"16px"};
|
|
2984
3013
|
line-height: ${"small"===e?"16px":"24px"};
|
|
2985
3014
|
font-weight: 400;
|
|
2986
3015
|
margin-left: 24px;
|
|
2987
3016
|
text-align: left;
|
|
2988
|
-
`,
|
|
3017
|
+
`,Yd=r.css`
|
|
2989
3018
|
background-color: ${d("neutral",100)};
|
|
2990
3019
|
border: 1px solid ${d("neutral",300)};
|
|
2991
3020
|
color: ${d("neutral",700)};
|
|
2992
|
-
`,
|
|
3021
|
+
`,Kd=r.css`
|
|
2993
3022
|
background-color: ${d("neutral",200)};
|
|
2994
3023
|
border: 1px solid ${d("neutral",300)};
|
|
2995
3024
|
color: ${d("neutral",700)};
|
|
2996
|
-
`,
|
|
3025
|
+
`,Jd=r.css`
|
|
2997
3026
|
background-color: ${d("success",100)};
|
|
2998
3027
|
border: 1px solid ${d("success",300)};
|
|
2999
3028
|
color: ${d("success",500)};
|
|
@@ -3001,7 +3030,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3001
3030
|
p {
|
|
3002
3031
|
color: ${d("success",900)};
|
|
3003
3032
|
}
|
|
3004
|
-
`,
|
|
3033
|
+
`,Qd=r.css`
|
|
3005
3034
|
background-color: ${d("warning",100)};
|
|
3006
3035
|
border: 1px solid ${d("warning",300)};
|
|
3007
3036
|
color: ${d("warning",500)};
|
|
@@ -3009,7 +3038,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3009
3038
|
p {
|
|
3010
3039
|
color: ${d("warning",900)};
|
|
3011
3040
|
}
|
|
3012
|
-
`,
|
|
3041
|
+
`,ep=r.css`
|
|
3013
3042
|
background-color: ${d("error",100)};
|
|
3014
3043
|
border: 1px solid ${d("error",300)};
|
|
3015
3044
|
color: ${d("error",500)};
|
|
@@ -3017,32 +3046,32 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3017
3046
|
p {
|
|
3018
3047
|
color: ${d("error",900)};
|
|
3019
3048
|
}
|
|
3020
|
-
`,
|
|
3049
|
+
`,tp=r.css`
|
|
3021
3050
|
height: 8px;
|
|
3022
3051
|
width: 100%;
|
|
3023
3052
|
background-color: ${d("neutral",300)};
|
|
3024
3053
|
display: flex;
|
|
3025
3054
|
align-items: center;
|
|
3026
3055
|
justify-content: flex-start;
|
|
3027
|
-
`,
|
|
3056
|
+
`,np=e=>r.css`
|
|
3028
3057
|
height: 100%;
|
|
3029
3058
|
width: ${e}%;
|
|
3030
3059
|
background-color: ${d("primary",500)};
|
|
3031
3060
|
transition: width 0.5s ease-in-out;
|
|
3032
|
-
`,
|
|
3061
|
+
`,rp=r.css`
|
|
3033
3062
|
width: 100%;
|
|
3034
3063
|
display: flex;
|
|
3035
3064
|
align-items: center;
|
|
3036
3065
|
justify-content: space-between;
|
|
3037
3066
|
position: relative;
|
|
3038
|
-
`,
|
|
3067
|
+
`,ip=r.css`
|
|
3039
3068
|
height: 60px;
|
|
3040
3069
|
width: 80px;
|
|
3041
3070
|
display: flex;
|
|
3042
3071
|
flex-direction: column;
|
|
3043
3072
|
align-items: center;
|
|
3044
3073
|
justify-content: space-between;
|
|
3045
|
-
`,
|
|
3074
|
+
`,op=(e,t)=>r.css`
|
|
3046
3075
|
height: 32px;
|
|
3047
3076
|
width: 32px;
|
|
3048
3077
|
display: flex;
|
|
@@ -3078,12 +3107,12 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3078
3107
|
}
|
|
3079
3108
|
|
|
3080
3109
|
${t?`\n background-color: ${d("neutral",300)};\n \n &:hover {\n background-color: ${d("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3081
|
-
`,
|
|
3110
|
+
`,ap=e=>r.css`
|
|
3082
3111
|
color: ${d("neutral",e?800:600)};
|
|
3083
3112
|
font-size: 14px;
|
|
3084
3113
|
line-height: 20px;
|
|
3085
3114
|
font-weight: 400;
|
|
3086
|
-
`,
|
|
3115
|
+
`,sp=r.css`
|
|
3087
3116
|
height: 1px;
|
|
3088
3117
|
width: 100%;
|
|
3089
3118
|
padding: 0 30px;
|
|
@@ -3091,11 +3120,11 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3091
3120
|
top: 16px;
|
|
3092
3121
|
left: 0;
|
|
3093
3122
|
z-index: -1;
|
|
3094
|
-
`,
|
|
3123
|
+
`,lp=r.css`
|
|
3095
3124
|
height: 1px;
|
|
3096
3125
|
width: 100%;
|
|
3097
3126
|
background-color: ${d("neutral",400)};
|
|
3098
|
-
`,
|
|
3127
|
+
`,cp=r.css`
|
|
3099
3128
|
justify-content: space-between;
|
|
3100
3129
|
align-items: center;
|
|
3101
3130
|
gap: 8px;
|
|
@@ -3138,21 +3167,21 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3138
3167
|
color: ${d("error",900)};
|
|
3139
3168
|
}
|
|
3140
3169
|
}
|
|
3141
|
-
`,
|
|
3170
|
+
`,up=r.css`
|
|
3142
3171
|
font-size: 18px;
|
|
3143
3172
|
line-height: 28px;
|
|
3144
3173
|
font-weight: 400;
|
|
3145
3174
|
color: ${d("neutral",800)};
|
|
3146
|
-
`,
|
|
3175
|
+
`,dp=r.css`
|
|
3147
3176
|
font-size: 16px;
|
|
3148
3177
|
line-height: 24px;
|
|
3149
3178
|
font-weight: 400;
|
|
3150
3179
|
color: ${d("neutral",700)};
|
|
3151
|
-
`,dp=r.css`
|
|
3152
|
-
padding: 6px;
|
|
3153
3180
|
`,pp=r.css`
|
|
3154
3181
|
padding: 6px;
|
|
3155
|
-
`,hp=
|
|
3182
|
+
`,hp=r.css`
|
|
3183
|
+
padding: 6px;
|
|
3184
|
+
`,fp={pauseOnPageIdle:!0,offsets:"24px"},xp={"top-start":e.createToaster({placement:"top-start",...fp}),"top-end":e.createToaster({placement:"top-end",...fp}),"bottom-start":e.createToaster({placement:"bottom-start",...fp}),"bottom-end":e.createToaster({placement:"bottom-end",...fp})};exports.Badge=({hasNotification:e,notificationCount:r,label:i})=>{const[o,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),o?t.jsxs("div",{css:zd,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Ad(),children:[t.jsx(P,{color:"currentColor",height:"16px",width:"16px"}),!e||r||i?null:t.jsx("div",{css:Bd,"aria-hidden":!0})]}),i?t.jsx("p",{children:i}):null,s.length>0?t.jsx("div",{css:Zd,children:t.jsx("p",{css:Gd,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:zd,role:"status","aria-live":"polite",children:[i?t.jsx("p",{children:i}):null,t.jsxs("div",{css:Ad(l),children:[s.length>0?t.jsx("div",{css:Hd,children:t.jsx("p",{css:Fd,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Bd,"aria-hidden":!0}):null,t.jsx(P,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:n,additionalSettings:i,options:o,onOptionSelected:a,maxHeight:s="400px",maxWidth:l="260px"})=>t.jsx("div",{css:dn(s,l),children:t.jsxs("div",{className:"base-map-scroll-content",children:[t.jsxs("div",{css:pn,children:[t.jsx("p",{className:"base-map-header-title",children:e}),t.jsx("p",{className:"base-map-header-caption",children:n})]}),t.jsxs("div",{css:hn,children:[i?t.jsx("div",{css:fn,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Ce,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:xn,children:e.children}):null]},e.label)))}):null,o?t.jsx("div",{css:gn,children:o.map((e=>{return t.jsxs("div",{css:vn(e.active),role:"button",onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"===t.key&&a?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
|
|
3156
3185
|
height: 32px;
|
|
3157
3186
|
width: 32px;
|
|
3158
3187
|
border: 1px solid ${d("neutral",300)};
|
|
@@ -3160,7 +3189,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3160
3189
|
background-image: url(${n});
|
|
3161
3190
|
background-size: cover;
|
|
3162
3191
|
background-position: center;
|
|
3163
|
-
`)}),t.jsxs("div",{css:mn,children:[t.jsxs("div",{className:"base-map-title-container",children:[t.jsx("p",{className:"base-map-title",children:e.label}),e.active?t.jsx(It,{label:"Active",variant:"warning",size:"small",icon:t.jsx(y,{})}):null]}),t.jsx("p",{className:"base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})}),exports.Breadcrumb=({links:r,separator:i,maxItems:o=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>o);n.useEffect((()=>{l(r.length>o)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:
|
|
3192
|
+
`)}),t.jsxs("div",{css:mn,children:[t.jsxs("div",{className:"base-map-title-container",children:[t.jsx("p",{className:"base-map-title",children:e.label}),e.active?t.jsx(It,{label:"Active",variant:"warning",size:"small",icon:t.jsx(y,{})}):null]}),t.jsx("p",{className:"base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})}),exports.Breadcrumb=({links:r,separator:i,maxItems:o=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>o);n.useEffect((()=>{l(r.length>o)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Ju,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Qu,children:i||t.jsx(j,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:ed,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Qu,children:i||t.jsx(j,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Ju,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((o,a)=>o?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Ju,children:a<r.length-1?t.jsxs(c,{to:o.link,href:o.link,children:[o.icon,o.label]}):t.jsxs("p",{"aria-current":"page","aria-label":o.label,children:[o.label&&o.icon?o.icon:"",o.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Qu,children:i||t.jsx(j,{rotate:"270"})}):null]},o.label):null))})})},exports.Button=v,exports.Checkbox=Ce,exports.CheckboxList=({label:i,caption:o,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${i}. ${o?`${o}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:Xe,tabIndex:0,"aria-label":f,children:[c?t.jsx("div",{css:Qe}):null,t.jsxs("div",{css:(x=!!c,r.css`
|
|
3164
3193
|
margin-left: ${x?"19px":"0px"};
|
|
3165
3194
|
`),children:[t.jsxs("p",{css:Ye,"aria-label":i,children:[d&&t.jsx("span",{"aria-label":"required",children:"*"}),i]}),t.jsx("p",{css:Ke,"aria-label":o,children:o}),c?t.jsx("p",{css:et,"aria-label":c,children:c}):null,t.jsx("div",{css:Je(u),children:a.map((e=>t.jsx(Ce,{css:{},defaultChecked:s===e.value,onCheckedChange:({checked:t})=>((e,t)=>{const n={...p};t&&(n[t]=e,h(n)),l&&l(n)})(t,e.name),...e},e.name)))})]})]});var x},exports.CheckboxOptionCard=({defaultValue:n,items:i,onValueChange:o})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:o,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:i.map((i=>{return t.jsxs(e.CheckboxCard.Root,{css:we,defaultChecked:-1!==n?.indexOf(i.value),disabled:i.disabled,value:i.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:je,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=i.variant,r.css`
|
|
3166
3195
|
width: 100%;
|
|
@@ -3175,13 +3204,13 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3175
3204
|
padding: 0px;
|
|
3176
3205
|
padding-top: 8px;
|
|
3177
3206
|
color: ${o?d("neutral",500):"inherit"};
|
|
3178
|
-
`),children:i.children}):null]},`${i.label}-${i.value}`);var o,a}))})}),exports.CloseButton=ee,exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:i,maxWidth:o})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:
|
|
3207
|
+
`),children:i.children}):null]},`${i.label}-${i.value}`);var o,a}))})}),exports.CloseButton=ee,exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:i,maxWidth:o})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:td(r,i),children:t.jsxs("div",{css:nd(o),children:[t.jsx("div",{children:t.jsx(_,{height:"32px",width:"91px"})}),t.jsx("div",{css:rd,children:e}),t.jsx("div",{children:t.jsxs("p",{css:id,children:[n," ",a]})})]})})},exports.IconButton=Q,exports.IconMarker=yn,exports.IconMarkers=Cn,exports.InlineMessage=({label:e,caption:n,variant:r,size:i="large",icon:o=t.jsx(w,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Yd;return"info-grey"===r?c=Kd:"success"===r?c=Jd:"warning"===r?c=Qd:"error"===r&&(c=ep),t.jsxs("div",{css:[qd(i,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Wd,children:[o,t.jsx("p",{css:Ud(i),children:e})]}),t.jsx("p",{css:Xd(i),children:n})]}),s?t.jsx(v,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===i?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:i,errorMessage:o,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:tt,children:[o?t.jsx("div",{css:it}):null,t.jsxs("div",{style:{marginLeft:o?"19px":"0px"},children:[t.jsxs("p",{css:nt(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:rt(p),"aria-label":i,children:i}),o?t.jsx("p",{css:ot,"aria-label":o,children:o}):null,t.jsxs(e.Group,{css:at(!!o,s),attached:!0,children:["start"===s?t.jsx(zt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(ht,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(zt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ur,exports.LayerGroup=({label:r,caption:i,value:o,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const i={...l,[e]:t};c(i),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${i?`, ${i}`:""}`;return t.jsxs(e.Accordion.Item,{value:o,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:jn,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:kn,children:[r,t.jsx(It,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Sn,children:i})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Ne,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Tn,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...i})=>t.jsx("div",{css:wn,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...i,children:n})}),exports.LayerItem=Tn,exports.LayerParameters=({label:r,children:i,openedByDefault:o})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:o?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:_n,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Pn,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Mn,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Dn,children:n.Children.map(i,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:i,onDownClick:o,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:In,children:[t.jsxs("div",{css:Nn,children:[t.jsx(Q,{icon:t.jsx(O,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(Q,{icon:t.jsx(j,{rotate:"180"}),"aria-label":"Up",onClick:i}),t.jsx(Q,{icon:t.jsx(j,{}),"aria-label":"Down",onClick:o})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:Vn,children:[t.jsxs("div",{children:[t.jsx("h3",{css:zn,children:e}),t.jsx("p",{css:An,children:n})]}),t.jsx(v,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(S,{}),onClick:a})]}),s,t.jsxs("div",{css:Bn,children:[t.jsx(v,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(w,{}),onClick:l}),t.jsx(qn,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n})=>t.jsx(e.Box,{css:dr,children:n.map((e=>t.jsx(mr,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControl=oe,exports.MapControls=ae,exports.Menu=fe,exports.Modal=({header:n,content:r,footer:i,size:o="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(Li,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:Ti(o),children:[t.jsxs(e.Dialog.Header,{css:_i,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:Pi,asChild:!0,children:t.jsx(ee,{})})]}),t.jsx(e.Dialog.Body,{css:Mi,children:r}),i?t.jsx(e.Dialog.Footer,{padding:"12px",children:i}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:i="default",mainActionLabel:o,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,p]=n.useState(!1),h=l?`${o} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(v,{css:{},label:o,variant:r,size:i,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(v,{variant:r,size:i,leftIcon:t.jsx(j,{rotate:u?"180":"0",color:d("accessible","text-on-primary-mids")||d("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:o})=>t.jsx(e.Menu.Item,{css:ve(i),onClick:o,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:i,pathname:o,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:p})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,m]=n.useState(!1),[b,y]=n.useState(-1),[C,w]=n.useState("undefined"!=typeof window&&window?.innerWidth<=$d),[j,k]=n.useState(!1),$=i,E=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=$d||window.innerWidth<=b?(p?.(96),m(!0)):window.innerWidth>$d&&window.innerWidth<=1440?e.right>=t.left?(p?.(96),m(!0),y(window.innerWidth)):window.innerWidth>b&&(p?.(48),m(!1),y(-1)):(p?.(48),m(!1),y(-1)),g&&(window.innerWidth<=$d||n.right>=t.left?(w(!0),p?.(48)):(w(!1),p?.(96)))}}),[b,g]);return n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]),t.jsxs("nav",{css:od(g&&!C,u),children:[t.jsxs("div",{css:sd(g&&!C,c),children:[t.jsxs("div",{css:(O=g&&!C,r.css`
|
|
3179
3208
|
display: flex;
|
|
3180
3209
|
align-items: center;
|
|
3181
3210
|
justify-content: flex-start;
|
|
3182
3211
|
gap: 12px;
|
|
3183
3212
|
color: ${d("neutral",O?100:900)};
|
|
3184
|
-
`),ref:h,children:[e?t.jsx("div",{ref:x,css:
|
|
3213
|
+
`),ref:h,children:[e?t.jsx("div",{ref:x,css:ld,children:e}):null,t.jsx("div",{css:cd(g),children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:ud(o===e.link),children:e.label},e.label):t.jsx(fe,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:dd,ref:f,children:C?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:fd,children:[j?"Close":"Menu",j?t.jsx(S,{height:"16px",width:"16px"}):t.jsx(X,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:dd,children:s?.map(((e,n)=>t.jsx("div",{css:pd(g),children:e},n)))}),l?t.jsx("div",{css:hd(g),children:l.map((e=>t.jsx(v,{...e},e.label)))}):null]})})]}),g&&!C?t.jsx("div",{css:ad,children:a?.map((e=>e.link?t.jsx($,{to:e.link,href:e.link,css:ud(o===e.link),children:e.label},e.label):t.jsx(fe,{label:e.label,items:e.items||[]},e.label)))}):null,C?t.jsx(Sd,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:i,isOpen:j,setIsOpen:k,pathname:o}):null]});var O},exports.NavigationRail=({tabs:r=[],defaultValue:i,onTabClick:o,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(i||r?.[0]?.value);return t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:Ed,children:[t.jsx(e.Tabs.Root,{defaultValue:i||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{var t;d(t=e),o&&o(t)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:Od,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"tab-label",children:[n.icon?t.jsx("div",{css:Rd,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:Ld,children:[t.jsx("div",{css:Rd,children:l?t.jsx(b,{}):t.jsx(m,{})}),t.jsxs("div",{className:"tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:Td,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:i,onValueChange:o})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:o,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:i.map((n=>{return t.jsxs(e.RadioCard.Item,{css:Oe,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Re,children:[t.jsxs("div",{css:(o=n.variant,r.css`
|
|
3185
3214
|
width: 100%;
|
|
3186
3215
|
display: flex;
|
|
3187
3216
|
flex-direction: ${"centered"===o?"column":"row"};
|
|
@@ -3205,7 +3234,7 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3205
3234
|
font-weight: 700;
|
|
3206
3235
|
color: ${d("Medium"===m?"warning":"Strong"===m||"Very Strong"===m?"success":"error",900)};
|
|
3207
3236
|
}
|
|
3208
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Gt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:qt(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:qt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:qt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:qt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:qt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var m},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:
|
|
3237
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Gt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:qt(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:qt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:qt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:qt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:qt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(y,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(S,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var m},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:tp,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:np(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:i,color:o,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(B,{color:"#006D2C"})})=>{const[c,u]=n.useState(!0),d=n.useId(),p=n.useId(),h="raster"===e,f="line"===e,x="point"===e,g=c?"Hide":"Show",m=i?`${d} ${p}`:d;return t.jsxs("div",{css:Yn,children:[t.jsxs("div",{css:Kn,children:[t.jsxs("div",{children:[h&&t.jsx("div",{css:Wn(o)}),f&&t.jsx("div",{css:Un(o)}),x&&t.jsx("div",{css:Xn(o),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:d,css:Jn,children:r}),i?t.jsx("p",{id:p,css:Qn,children:i}):null]})]}),a&&s?t.jsx("div",{css:er,children:t.jsx(v,{type:"button",variant:"borderless",label:g,rightIcon:c?t.jsx(E,{}):t.jsx($,{}),"aria-pressed":c,"aria-describedby":m,"aria-label":`${g} ${r}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=Ie,exports.RadioGroup=Ne,exports.RadioList=({label:n,caption:i,name:o,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${i?`${i}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{tabIndex:0,css:Wt,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:Kt}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3209
3238
|
margin-left: ${f?"19px":"0px"};
|
|
3210
3239
|
`),children:[t.jsxs("p",{css:Ut,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:Xt,"aria-label":i,children:i}),c?t.jsx("p",{css:Jt,"aria-label":c,children:c}):null,t.jsx("div",{css:Yt,children:t.jsx(Ne,{name:o,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ie,{css:"card"===d?Qt:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=Y,exports.ScaleBar=({colors:e,values:n,subLabels:i,isGradient:o})=>{return t.jsxs("div",{css:tr,children:[o?t.jsx("div",{css:(a=ar(e),r.css`
|
|
3211
3240
|
height: 20px;
|
|
@@ -3214,33 +3243,4 @@ function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3214
3243
|
border: 1px solid ${d("neutral",300)};
|
|
3215
3244
|
border-radius: 4px;
|
|
3216
3245
|
${a?`background: ${a};`:""}
|
|
3217
|
-
`)}):t.jsx("div",{css:nr,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:rr,children:n?.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:ir,children:e})},e)))}),i&&i.length?t.jsx("div",{css:rr,children:i.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:or,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=zt,exports.Sheet=({header:e,content:n,footer:
|
|
3218
|
-
[data-rsbs-overlay] {
|
|
3219
|
-
border-top-left-radius: 16px;
|
|
3220
|
-
border-top-right-radius: 16px;
|
|
3221
|
-
overflow: hidden;
|
|
3222
|
-
z-index: 1000;
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
|
-
[data-rsbs-overlay],
|
|
3226
|
-
[data-rsbs-root]:after {
|
|
3227
|
-
max-width: 100%;
|
|
3228
|
-
}
|
|
3229
|
-
|
|
3230
|
-
[data-rsbs-header] {
|
|
3231
|
-
padding: 0px;
|
|
3232
|
-
min-height: ${h?"50px":"20px"};
|
|
3233
|
-
}
|
|
3234
|
-
|
|
3235
|
-
[data-rsbs-header]:before {
|
|
3236
|
-
height: 2px;
|
|
3237
|
-
width: 32px;
|
|
3238
|
-
background-color: ${d("neutral",300)};
|
|
3239
|
-
cursor: pointer;
|
|
3240
|
-
}
|
|
3241
|
-
|
|
3242
|
-
[data-rsbs-footer] {
|
|
3243
|
-
padding: 0px;
|
|
3244
|
-
min-height: 64px;
|
|
3245
|
-
}
|
|
3246
|
-
`),className:p,open:o,onDismiss:a,header:e,footer:i,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,s||e,l+(i?n:0),c||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(i?n:0):"full"===u&&(r=c||t-t/6),r},children:n});var h},exports.Slider=qe,exports.SliderInput=({label:e,caption:r,size:i="default",sliderItem:o,required:a,onChange:s})=>{const[l,c]=n.useState(o.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let i=n?parseInt(n,10):n;const a=o.min||0,s=o.max||100;i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>s?s:i,r[t]=i,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let i=parseInt(n,10);const a=o.min||0,u=o.max||100;if(i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>u?u:i,2===l?.length){i=Number.isNaN(i)?a:i;const e=l[0],n=l[1];0===t?(i=i<a?a:i,i=i>n?n:i):1===t&&(i=i<e?e:i,i=i>u?u:i)}r[t]=i,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:en(i),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:tn(i),"aria-label":r,children:r}):null,t.jsxs("div",{css:nn,children:[o.step&&o.marks?t.jsx(zt,{items:o.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(qe,{css:{},...o,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:np,children:[e.map(((e,r)=>t.jsxs("div",{css:rp,children:[t.jsx("button",{css:ip(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(y,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:op(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:ap,children:t.jsx("div",{css:sp})})]}),exports.Switch=Ue,exports.TabBar=({variant:r="panel",defaultValue:i,tabs:o,onTabClick:a})=>{const[s,l]=n.useState(Id(o,i)||0),c="view"===r;return t.jsx("div",{css:Td(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:i||o?.[0]?.value,onValueChange:({value:e})=>{return l(Id(o,t=e)),void(a&&a(t));var t},children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((r,i)=>t.jsxs(n.Fragment,{children:[c&&1===i&&"left"===Nd(s)?t.jsx("div",{css:Md}):null,t.jsx(e.Tabs.Trigger,{css:[_d,c?Dd:Pd],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),c&&1===i&&"right"===Nd(s)?t.jsx("div",{css:Md}):null]},r.label)))})})})},exports.Table=({columns:r,data:i,renderRow:o,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=i.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:C}=l||{},w=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},k=u?.length===i?.length,S=u&&u.length>0&&!k;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:kr,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Sr,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Ce,{name:"header-checkbox",checked:k,indeterminate:S,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:$r,children:[n.label,n.sortable?t.jsxs("div",{css:Er,children:[t.jsx(Q,{css:Or(x.key===n.key&&"asc"===x.order),icon:t.jsx(j,{style:{transform:"rotate(180deg)"}}),onClick:()=>w(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(Q,{css:Or(x.key===n.key&&"desc"===x.order),icon:t.jsx(j,{}),onClick:()=>w(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:i.map((e=>t.jsx(n.Fragment,{children:o(e)},e.id)))})]}),t.jsxs("div",{css:Rr,children:[t.jsx("div",{children:y?t.jsx(ur,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:C}):null}),l?t.jsx("div",{css:Lr,children:t.jsx(jr,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=_r,exports.TableRow=Tr,exports.Tag=It,exports.TextInput=ht,exports.Textarea=({label:r,caption:i,placeholder:o,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[C,w]=n.useState(""),j=n.useId(),k=n.useId(),S=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),w(`Enter at least ${p-e} characters`)):p&&0===e&&w(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),w(`You have ${h-e} characters remaining`)):h&&0===e&&w(`Max ${h} characters`)}),[]);const $=!!a||v||b,E=[i?j:null,$?k:null,C?S:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:rn(c),children:[$?t.jsx("div",{css:on}):null,t.jsxs(e.Field.Root,{required:s,invalid:$,gap:"0",style:{marginLeft:$?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:an(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,i?t.jsx(e.Field.HelperText,{id:j,css:sn(c,l),children:i}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:cn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:o,disabled:l,css:un(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),w(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),w(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),w(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!C||b||v?null:t.jsx(e.Field.HelperText,{id:S,css:ln,"aria-live":"polite",children:C})]})]})},exports.Toast=()=>Object.keys(fp).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:fp[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:lp,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(w,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(R,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(L,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(T,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:cp,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:up,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(v,{css:dp,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),fp[n].dismiss()}}):null,r.meta?.closable?t.jsx(v,{css:pp,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(S,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>fp[n].dismiss()}):null]}):null]})})},n))),exports.designSystemStyles=u,exports.getThemedColor=d,exports.showToast=e=>{fp[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|
|
3246
|
+
`)}):t.jsx("div",{css:nr,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:rr,children:n?.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:ir,children:e})},e)))}),i&&i.length?t.jsx("div",{css:rr,children:i.map((e=>t.jsx("div",{style:{width:o?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:or,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=zt,exports.Sheet=({header:e,content:n,footer:r,open:i=!1,onClose:o,minimizedHeight:a,midHeight:s=200,maxFullHeight:l,defaultSnap:c="minimized",className:u,blocking:d,zIndex:p=1e3})=>t.jsx(Yu,{css:Ku(!!e,p),className:u,open:i,onDismiss:o,header:e,footer:r,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,a||e,s+(r?n:0),l||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let i=20;return"minimized"===c?i=a||e:"mid"===c?i=s+(r?n:0):"full"===c&&(i=l||t-t/6),i},blocking:d,children:n}),exports.Slider=qe,exports.SliderInput=({label:e,caption:r,size:i="default",sliderItem:o,required:a,onChange:s})=>{const[l,c]=n.useState(o.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let i=n?parseInt(n,10):n;const a=o.min||0,s=o.max||100;i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>s?s:i,r[t]=i,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let i=parseInt(n,10);const a=o.min||0,u=o.max||100;if(i=Number.isNaN(i)?a:i,i=i<a?a:i,i=i>u?u:i,2===l?.length){i=Number.isNaN(i)?a:i;const e=l[0],n=l[1];0===t?(i=i<a?a:i,i=i>n?n:i):1===t&&(i=i<e?e:i,i=i>u?u:i)}r[t]=i,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:en(i),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:tn(i),"aria-label":r,children:r}):null,t.jsxs("div",{css:nn,children:[o.step&&o.marks?t.jsx(zt,{items:o.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(qe,{css:{},...o,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(ht,{"aria-label":e,min:o.min,max:o.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:rp,children:[e.map(((e,r)=>t.jsxs("div",{css:ip,children:[t.jsx("button",{css:op(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(y,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:ap(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:sp,children:t.jsx("div",{css:lp})})]}),exports.Switch=Ue,exports.TabBar=({variant:r="panel",defaultValue:i,tabs:o,onTabClick:a})=>{const[s,l]=n.useState(Nd(o,i)||0),c="view"===r;return t.jsx("div",{css:_d(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:i||o?.[0]?.value,onValueChange:({value:e})=>{return l(Nd(o,t=e)),void(a&&a(t));var t},children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((r,i)=>t.jsxs(n.Fragment,{children:[c&&1===i&&"left"===Vd(s)?t.jsx("div",{css:Dd}):null,t.jsx(e.Tabs.Trigger,{css:[Pd,c?Id:Md],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),c&&1===i&&"right"===Vd(s)?t.jsx("div",{css:Dd}):null]},r.label)))})})})},exports.Table=({columns:r,data:i,renderRow:o,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=i.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:C}=l||{},w=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},k=u?.length===i?.length,S=u&&u.length>0&&!k;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:kr,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Sr,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Ce,{name:"header-checkbox",checked:k,indeterminate:S,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:$r,children:[n.label,n.sortable?t.jsxs("div",{css:Er,children:[t.jsx(Q,{css:Or(x.key===n.key&&"asc"===x.order),icon:t.jsx(j,{style:{transform:"rotate(180deg)"}}),onClick:()=>w(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(Q,{css:Or(x.key===n.key&&"desc"===x.order),icon:t.jsx(j,{}),onClick:()=>w(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:i.map((e=>t.jsx(n.Fragment,{children:o(e)},e.id)))})]}),t.jsxs("div",{css:Rr,children:[t.jsx("div",{children:y?t.jsx(ur,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:C}):null}),l?t.jsx("div",{css:Lr,children:t.jsx(jr,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=_r,exports.TableRow=Tr,exports.Tag=It,exports.TextInput=ht,exports.Textarea=({label:r,caption:i,placeholder:o,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[C,w]=n.useState(""),j=n.useId(),k=n.useId(),S=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),w(`Enter at least ${p-e} characters`)):p&&0===e&&w(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),w(`You have ${h-e} characters remaining`)):h&&0===e&&w(`Max ${h} characters`)}),[]);const $=!!a||v||b,E=[i?j:null,$?k:null,C?S:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:rn(c),children:[$?t.jsx("div",{css:on}):null,t.jsxs(e.Field.Root,{required:s,invalid:$,gap:"0",style:{marginLeft:$?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:an(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,i?t.jsx(e.Field.HelperText,{id:j,css:sn(c,l),children:i}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:cn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:o,disabled:l,css:un(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),w(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),w(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),w(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!C||b||v?null:t.jsx(e.Field.HelperText,{id:S,css:ln,"aria-live":"polite",children:C})]})]})},exports.Toast=()=>Object.keys(xp).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:xp[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:cp,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(w,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(R,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(L,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(T,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:up,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:dp,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(v,{css:pp,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),xp[n].dismiss()}}):null,r.meta?.closable?t.jsx(v,{css:hp,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(S,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>xp[n].dismiss()}):null]}):null]})})},n))),exports.designSystemStyles=u,exports.getThemedColor=d,exports.showToast=e=>{xp[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|