@ctlyst.id/voila-ui 1.31.1 → 1.32.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.js CHANGED
@@ -143,7 +143,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
143
143
  */var Am=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ba=Am.join(","),Dm=typeof Element>"u",Lr=Dm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!Dm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Wa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},EC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Nm=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ba));return n&&Lr.call(t,Ba)&&o.unshift(t),o=o.filter(r),o},km=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Wa(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,u=e(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var d=Lr.call(a,Ba);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&m){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},Mm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EC(t))&&!Mm(t)?0:t.tabIndex},xC=function(t,n){var r=Rr(t);return r<0&&n&&!Mm(t)?0:r},_C=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jm=function(t){return t.tagName==="INPUT"},SC=function(t){return jm(t)&&t.type==="hidden"},CC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$C=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TC=function(t){if(!t.name)return!0;var n=t.form||Ha(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=$C(o,t.form);return!i||i===t},IC=function(t){return jm(t)&&t.type==="radio"},RC=function(t){return IC(t)&&!TC(t)},OC=function(t){var n,r=t&&Ha(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,d,f;r=Ha(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},bh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},PC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,u=Ha(t);if(c&&!c.shadowRoot&&o(c)===!0)return bh(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(OC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bh(t);return!1},AC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Lr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},za=function(t,n){return!(n.disabled||Wa(n)||SC(n)||PC(n,t)||CC(n)||AC(n))},ru=function(t,n){return!(RC(n)||Rr(n)<0||!za(t,n))},DC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=xC(s,a),u=a?e(o.candidates):s;c===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),r.sort(_C).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},kC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=km([t],n.includeContainer,{filter:ru.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DC}):r=Nm(t,n.includeContainer,ru.bind(null,n)),NC(r)},MC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=km([t],n.includeContainer,{filter:za.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Nm(t,n.includeContainer,za.bind(null,n)),r},Qr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,Ba)===!1?!1:ru(n,t)},jC=Am.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,jC)===!1?!1:za(n,t)};/*!
144
144
  * focus-trap 7.5.2
145
145
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
146
- */function wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(n),!0).forEach(function(r){LC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LC(e,t,n){return t=VC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VC(e){var t=FC(e,"string");return typeof t=="symbol"?t:String(t)}var xh={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},BC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},HC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},WC=function(t){return Jo(t)&&!t.shiftKey},zC=function(t){return Jo(t)&&t.shiftKey},_h=function(t){return setTimeout(t,0)},Sh=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},UC=[],YC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||UC,i=Eh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:WC,isKeyBackward:zC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var w=a.tabbableGroups[0],p=w&&w.firstTabbableNode;R=p||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var w=kC(R,i.tabbableOptions),p=MC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[oe+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,BC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Sh(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Sh(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(HC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return xh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?_h(function(){h(f())}):h(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",E,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=Eh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),xh.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){_h(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function KC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=YC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function qC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function XC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function GC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var il=!1;if(typeof window<"u"){var Ch={get passive(){il=!0}};window.addEventListener("testPassive",null,Ch),window.removeEventListener("testPassive",null,Ch)}var Lm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],Ua=!1,Fm=-1,ei=void 0,ti=void 0,Vm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Vm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},ZC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},QC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},JC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},e$=function(t,n){var r=t.targetTouches[0].clientY-Fm;return Vm(t.target)?!1:n&&n.scrollTop===0&&r>0||JC(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},t$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(GC(fr),[r]),Lm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Fm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&e$(o,t)},Ua||(document.addEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!0)):ZC(n)}},n$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Lm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!1)):fr.length||QC()};function r$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,t$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,n$(o))}}},[t,e,n]),r}var Ar=[],o$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},i$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},$h="ResizeObserver loop completed with undelivered notifications.",a$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:$h}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=$h),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Dr=function(e){return Object.freeze(e)},s$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Bm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),al=function(e){return e instanceof SVGElement&&"getBBox"in e},Hm=function(e){if(al(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Th=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},c$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ia=new WeakMap,Ih=/auto|scroll/,u$=/^tb|vertical/,l$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new s$((n?t:e)||0,(n?e:t)||0)},Rh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Bm(0,0,0,0)}),Wm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Hm(e))return ia.set(e,Rh),Rh;var n=getComputedStyle(e),r=al(e)&&e.ownerSVGElement&&e.getBBox(),o=!l$&&n.boxSizing==="border-box",i=u$.test(n.writingMode||""),a=!r&&Ih.test(n.overflowY||""),s=!r&&Ih.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),h=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+h,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Bm(f,c,F,k)});return ia.set(e,w),w},zm=function(e,t,n){var r=Wm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},d$=function(){function e(t){var n=Wm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([n.devicePixelContentBoxSize])}return e}(),Um=function(e){if(Hm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},f$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new d$(u.target),f=Um(u.target);s.push(d),u.lastReportedSize=zm(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Oh=function(e){Ar.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Um(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},h$=function(){var e=0;for(Oh(e);o$();)e=f$(),Oh(e);return i$()&&a$(),e>0},dc,Ym=[],p$=function(){return Ym.splice(0).forEach(function(e){return e()})},v$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return p$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Ym.push(e),dc()},m$=function(e){v$(function(){requestAnimationFrame(e)})},xa=0,g$=function(){return!!xa},y$=250,b$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ph=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ah=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,w$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=y$),!fc){fc=!0;var r=Ah(t);m$(function(){var o=!1;try{o=h$()}finally{if(fc=!1,t=r-Ah(),!g$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,b$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ph.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ph.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new w$,Dh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},E$=function(e){return!al(e)&&!c$(e)&&getComputedStyle(e).display==="inline"},x$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=zm(this.target,this.observedBox,!0);return E$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,Nh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new _$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;Nh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new x$(n,r&&r.box)),Dh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=Nh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Dh(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),S$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");sa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Th(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Th(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function C$(e,t){const r=[].concat(e).map(Ka).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const $$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,T$={box:"border-box"};function hc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new S$(a);return s.observe(e.current,T$),()=>s.disconnect()},[e,a,n]),n?o:0}function I$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.85,[i,a]=l.useState(()=>Ka(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ka(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=I$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function O$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:h,minHeight:b,headerHeight:y,footerHeight:T}=R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=C$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function P$(){return yS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function A$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const D$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},kh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Mh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},N$=({initialState:e})=>e==="OPEN",k$=({initialState:e})=>e==="CLOSED",M$=Qx({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:{...kh,...Mh}}}},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:{...kh,...Mh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...D$},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:[Jx({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},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:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:k$,initiallyOpen:N$}}),{tension:j$,friction:ca}=sm.default,L$=["closed","opening","open","closing","dragging","snapping","resizing"];function F$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function V$({minHeight:e}){return e}const B$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=F$,snapPoints:h=V$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=qC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=P$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=XC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=r$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=wC({targetRef:K,enabled:j&&b}),ot=KC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=O$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ue=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ue,...kt,mass:1,tension:j$,friction:Math.max(ca,ca+(ca-ca*Ue))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=u_(M$,{devTools:$$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ue;return(Ue=H.current)==null?void 0:Ue.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"RESIZE",source:ie.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ue)=>{var kt;return(kt=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ue.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"RESIZE",source:ie.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{Y.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ue=Zt.current(he.y);Q.current=Ue,c.current=Ue,await tt({y:Ue,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&&gt(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&&gt("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ue=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ue,source:kt}})},get height(){return Q.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ue=At=>{re.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ue),he==null||he.addEventListener("touchmove",Ue),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ue),he==null||he.removeEventListener("touchmove",Ue),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const rn=yC(({args:[{closeOnTap:he=!1,isContentDragging:Ue=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!Y.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ue?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),re.current=Kt<je.current):re.current=!1,Ot&&gt("DRAG"),yn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=A$({spring:oe});return M.jsxs(PS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":L$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Pm,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),H$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(xv,{"data-rsbs-portal":!0,children:M.jsx(B$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const W$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},z$=W$;process.env.NODE_ENV;var U$=dt({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),Y$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},K$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},jh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var q$="p9dczu0";const sl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=z$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?$t.theme.colors.primary:Y$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:q$,style:{...i}},a))},vo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},h)=>{const b=l.useRef(null),y=sl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(U$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?K$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?jh[r||"primary"]:jh.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const Km="Checkbox",[X$,OP]=mn(Km),[G$,Z$]=X$(Km),Q$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,E=>m(E)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(G$,{scope:n,state:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":qm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(tT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),J$="CheckboxIndicator",eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Z$(J$,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ke.span,ae({"data-state":qm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),tT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function qm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const nT=Q$,rT=eT;var oT="glci2q0",Lh="glci2q3",iT="glci2q4",Fh={disabled:"glci2q1",enabled:"glci2q2"},aT=dt({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Xm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),M.jsxs("div",{className:oT,children:[M.jsx(nT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:aT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(rT,{className:iT,children:[u==="indeterminate"&&M.jsx(T0,{color:"white",className:Lh}),u===!0&&M.jsx(Eu,{color:"white",className:Lh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Fh.disabled:Fh.enabled,children:e})]})});Xm.defaultProps={"data-test-id":"base"};const sT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var cT=dt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),uT="_5046e76";const cl=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(cT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx(C0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:uT,isDisabled:c})]})});cl.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};cl.displayName="Chips";const Gm="Dialog",[Zm,PP]=mn(Gm),[lT,wr]=Zm(Gm),dT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(lT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},fT="DialogTrigger",hT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(fT,n),i=st(t,o.triggerRef);return l.createElement(Ke.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ul(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),pT="DialogPortal",[AP,Qm]=Zm(pT,{forceMount:void 0}),iu="DialogOverlay",vT=l.forwardRef((e,t)=>{const n=Qm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(mT,ae({},o,{ref:t}))):null}),mT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(lv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ke.div,ae({"data-state":ul(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",gT=l.forwardRef((e,t)=>{const n=Qm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(yT,ae({},o,{ref:t})):l.createElement(bT,ae({},o,{ref:t})))}),yT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return tv(i)},[]),l.createElement(Jm,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),bT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(Jm,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Jm=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=st(t,c);return Dp(),l.createElement(l.Fragment,null,l.createElement(Np,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ul(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),wT="DialogClose",ET=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(wT,n);return l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ul(e){return e?"open":"closed"}const xT=dT,_T=hT,ST=vT,CT=gT,$T=ET;var TT="_1jc0z8o4",IT="_1jc0z8o0",RT=dt({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),OT="_1jc0z8o1",PT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),AT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const eg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(CT,{"data-test-id":n,className:t,ref:o,...r,children:e}));eg.defaultProps={"data-test-id":void 0};const DT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(ST,{className:t,ref:r,...n,children:e})),NT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),kT=({children:e,...t})=>M.jsx(xT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(_T,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},h)=>!n&&i?null:M.jsx(kT,{open:n,onOpenChange:r,children:M.jsxs(NT,{children:[M.jsx(DT,{className:Ie(AT())}),M.jsxs(eg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(RT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx($T,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:TT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:IT,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:OT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:PT({bold:t}),...o,children:M.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var MT="ayjm8u0";const ll=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:MT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ll.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const dl=l.createContext({}),jT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(dl.Provider,{value:c,children:[M.jsx(ll,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},LT=()=>{const{openDialog:e}=l.useContext(dl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var FT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:VT}=$t.atoms,fl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=VT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(FT({variant:n}),u,r),style:o,...a,children:e})});fl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};fl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(_E({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(PE({state:Au({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1,className:""};const pl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:IE,children:[M.jsx("input",{ref:k,type:t,className:Ie(TE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(RE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:v,className:Ie(s&&!i&&!F&&$E),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.theme.colors.green1})]})})]})});pl.displayName="Input";pl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const vl=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(AE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});vl.displayName="Textarea";vl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var BT=dt({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Vh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const ml=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=sl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(BT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Vh[r||"primary"]:Vh.white}):M.jsxs(M.Fragment,{children:[m,o]})})});ml.displayName="Button";ml.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var HT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const WT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),gl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},h)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(WT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Ie(HT({fit:E})),...m})});gl.displayName="Image";gl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var tg=dt({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const ng=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Ie(t,tg({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var zT="_1cq2k9i0";const yl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(zT,n),...r,children:e})});yl.displayName="List";yl.defaultProps={"data-test-id":void 0,as:"ul"};var UT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Bh="xw6nfa2",YT="xw6nfa3";const bl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return M.jsx(u,{"data-test-id":s["data-test-id"],className:Ie(UT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:YT,children:[t,M.jsx("div",{className:Bh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Bh,children:e}),n]})})});bl.displayName="ListItem";bl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var rg={},og={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var h=m,b,y;h.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),q=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Ve,Ye){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ye),ye.compileShader(Ve),Ye=ye.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ye.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
146
+ */function wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(n),!0).forEach(function(r){LC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LC(e,t,n){return t=VC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VC(e){var t=FC(e,"string");return typeof t=="symbol"?t:String(t)}var xh={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},BC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},HC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},WC=function(t){return Jo(t)&&!t.shiftKey},zC=function(t){return Jo(t)&&t.shiftKey},_h=function(t){return setTimeout(t,0)},Sh=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},UC=[],YC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||UC,i=Eh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:WC,isKeyBackward:zC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var w=a.tabbableGroups[0],p=w&&w.firstTabbableNode;R=p||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var w=kC(R,i.tabbableOptions),p=MC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[oe+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,BC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Sh(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Sh(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(HC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return xh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?_h(function(){h(f())}):h(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",E,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=Eh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),xh.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){_h(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function KC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=YC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function qC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function XC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function GC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var il=!1;if(typeof window<"u"){var Ch={get passive(){il=!0}};window.addEventListener("testPassive",null,Ch),window.removeEventListener("testPassive",null,Ch)}var Lm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],Ua=!1,Fm=-1,ei=void 0,ti=void 0,Vm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Vm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},ZC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},QC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},JC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},e$=function(t,n){var r=t.targetTouches[0].clientY-Fm;return Vm(t.target)?!1:n&&n.scrollTop===0&&r>0||JC(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},t$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(GC(fr),[r]),Lm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Fm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&e$(o,t)},Ua||(document.addEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!0)):ZC(n)}},n$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Lm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!1)):fr.length||QC()};function r$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,t$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,n$(o))}}},[t,e,n]),r}var Ar=[],o$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},i$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},$h="ResizeObserver loop completed with undelivered notifications.",a$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:$h}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=$h),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Dr=function(e){return Object.freeze(e)},s$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Bm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),al=function(e){return e instanceof SVGElement&&"getBBox"in e},Hm=function(e){if(al(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Th=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},c$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ia=new WeakMap,Ih=/auto|scroll/,u$=/^tb|vertical/,l$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new s$((n?t:e)||0,(n?e:t)||0)},Rh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Bm(0,0,0,0)}),Wm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Hm(e))return ia.set(e,Rh),Rh;var n=getComputedStyle(e),r=al(e)&&e.ownerSVGElement&&e.getBBox(),o=!l$&&n.boxSizing==="border-box",i=u$.test(n.writingMode||""),a=!r&&Ih.test(n.overflowY||""),s=!r&&Ih.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),h=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+h,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Bm(f,c,F,k)});return ia.set(e,w),w},zm=function(e,t,n){var r=Wm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},d$=function(){function e(t){var n=Wm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([n.devicePixelContentBoxSize])}return e}(),Um=function(e){if(Hm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},f$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new d$(u.target),f=Um(u.target);s.push(d),u.lastReportedSize=zm(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Oh=function(e){Ar.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Um(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},h$=function(){var e=0;for(Oh(e);o$();)e=f$(),Oh(e);return i$()&&a$(),e>0},dc,Ym=[],p$=function(){return Ym.splice(0).forEach(function(e){return e()})},v$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return p$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Ym.push(e),dc()},m$=function(e){v$(function(){requestAnimationFrame(e)})},xa=0,g$=function(){return!!xa},y$=250,b$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ph=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ah=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,w$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=y$),!fc){fc=!0;var r=Ah(t);m$(function(){var o=!1;try{o=h$()}finally{if(fc=!1,t=r-Ah(),!g$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,b$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ph.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ph.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new w$,Dh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},E$=function(e){return!al(e)&&!c$(e)&&getComputedStyle(e).display==="inline"},x$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=zm(this.target,this.observedBox,!0);return E$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,Nh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new _$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;Nh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new x$(n,r&&r.box)),Dh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=Nh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Dh(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),S$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");sa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Th(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Th(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function C$(e,t){const r=[].concat(e).map(Ka).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const $$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,T$={box:"border-box"};function hc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new S$(a);return s.observe(e.current,T$),()=>s.disconnect()},[e,a,n]),n?o:0}function I$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.9,[i,a]=l.useState(()=>Ka(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ka(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=I$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function O$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:h,minHeight:b,headerHeight:y,footerHeight:T}=R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=C$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function P$(){return yS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function A$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const D$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},kh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Mh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},N$=({initialState:e})=>e==="OPEN",k$=({initialState:e})=>e==="CLOSED",M$=Qx({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:{...kh,...Mh}}}},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:{...kh,...Mh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...D$},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:[Jx({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},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:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:k$,initiallyOpen:N$}}),{tension:j$,friction:ca}=sm.default,L$=["closed","opening","open","closing","dragging","snapping","resizing"];function F$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function V$({minHeight:e}){return e}const B$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=F$,snapPoints:h=V$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=qC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=P$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=XC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=r$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=wC({targetRef:K,enabled:j&&b}),ot=KC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=O$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ue=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ue,...kt,mass:1,tension:j$,friction:Math.max(ca,ca+(ca-ca*Ue))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=u_(M$,{devTools:$$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ue;return(Ue=H.current)==null?void 0:Ue.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"RESIZE",source:ie.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ue)=>{var kt;return(kt=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ue.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"RESIZE",source:ie.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{Y.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ue=Zt.current(he.y);Q.current=Ue,c.current=Ue,await tt({y:Ue,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&&gt(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&&gt("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ue=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ue,source:kt}})},get height(){return Q.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ue=At=>{re.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ue),he==null||he.addEventListener("touchmove",Ue),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ue),he==null||he.removeEventListener("touchmove",Ue),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const rn=yC(({args:[{closeOnTap:he=!1,isContentDragging:Ue=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!Y.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ue?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),re.current=Kt<je.current):re.current=!1,Ot&&gt("DRAG"),yn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=A$({spring:oe});return M.jsxs(PS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":L$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Pm,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),H$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(xv,{"data-rsbs-portal":!0,children:M.jsx(B$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const W$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},z$=W$;process.env.NODE_ENV;var U$=dt({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),Y$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},K$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},jh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var q$="p9dczu0";const sl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=z$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?$t.theme.colors.primary:Y$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:q$,style:{...i}},a))},vo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},h)=>{const b=l.useRef(null),y=sl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(U$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?K$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?jh[r||"primary"]:jh.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const Km="Checkbox",[X$,OP]=mn(Km),[G$,Z$]=X$(Km),Q$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,E=>m(E)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(G$,{scope:n,state:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":qm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(tT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),J$="CheckboxIndicator",eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Z$(J$,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ke.span,ae({"data-state":qm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),tT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function qm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const nT=Q$,rT=eT;var oT="glci2q0",Lh="glci2q3",iT="glci2q4",Fh={disabled:"glci2q1",enabled:"glci2q2"},aT=dt({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Xm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),M.jsxs("div",{className:oT,children:[M.jsx(nT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:aT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(rT,{className:iT,children:[u==="indeterminate"&&M.jsx(T0,{color:"white",className:Lh}),u===!0&&M.jsx(Eu,{color:"white",className:Lh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Fh.disabled:Fh.enabled,children:e})]})});Xm.defaultProps={"data-test-id":"base"};const sT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var cT=dt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),uT="_5046e76";const cl=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(cT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx(C0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:uT,isDisabled:c})]})});cl.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};cl.displayName="Chips";const Gm="Dialog",[Zm,PP]=mn(Gm),[lT,wr]=Zm(Gm),dT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(lT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},fT="DialogTrigger",hT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(fT,n),i=st(t,o.triggerRef);return l.createElement(Ke.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ul(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),pT="DialogPortal",[AP,Qm]=Zm(pT,{forceMount:void 0}),iu="DialogOverlay",vT=l.forwardRef((e,t)=>{const n=Qm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(mT,ae({},o,{ref:t}))):null}),mT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(lv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ke.div,ae({"data-state":ul(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",gT=l.forwardRef((e,t)=>{const n=Qm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(yT,ae({},o,{ref:t})):l.createElement(bT,ae({},o,{ref:t})))}),yT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return tv(i)},[]),l.createElement(Jm,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),bT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(Jm,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Jm=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=st(t,c);return Dp(),l.createElement(l.Fragment,null,l.createElement(Np,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ul(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),wT="DialogClose",ET=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(wT,n);return l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ul(e){return e?"open":"closed"}const xT=dT,_T=hT,ST=vT,CT=gT,$T=ET;var TT="_1jc0z8o4",IT="_1jc0z8o0",RT=dt({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),OT="_1jc0z8o1",PT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),AT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const eg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(CT,{"data-test-id":n,className:t,ref:o,...r,children:e}));eg.defaultProps={"data-test-id":void 0};const DT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(ST,{className:t,ref:r,...n,children:e})),NT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),kT=({children:e,...t})=>M.jsx(xT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(_T,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},h)=>!n&&i?null:M.jsx(kT,{open:n,onOpenChange:r,children:M.jsxs(NT,{children:[M.jsx(DT,{className:Ie(AT())}),M.jsxs(eg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(RT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx($T,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:TT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:IT,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:OT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:PT({bold:t}),...o,children:M.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var MT="ayjm8u0";const ll=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:MT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ll.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const dl=l.createContext({}),jT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(dl.Provider,{value:c,children:[M.jsx(ll,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},LT=()=>{const{openDialog:e}=l.useContext(dl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var FT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:VT}=$t.atoms,fl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=VT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(FT({variant:n}),u,r),style:o,...a,children:e})});fl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};fl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(_E({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(PE({state:Au({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1,className:""};const pl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:IE,children:[M.jsx("input",{ref:k,type:t,className:Ie(TE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(RE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:v,className:Ie(s&&!i&&!F&&$E),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.theme.colors.green1})]})})]})});pl.displayName="Input";pl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const vl=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(AE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});vl.displayName="Textarea";vl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var BT=dt({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Vh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const ml=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=sl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(BT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Vh[r||"primary"]:Vh.white}):M.jsxs(M.Fragment,{children:[m,o]})})});ml.displayName="Button";ml.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var HT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const WT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),gl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},h)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(WT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Ie(HT({fit:E})),...m})});gl.displayName="Image";gl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var tg=dt({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const ng=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Ie(t,tg({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var zT="_1cq2k9i0";const yl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(zT,n),...r,children:e})});yl.displayName="List";yl.defaultProps={"data-test-id":void 0,as:"ul"};var UT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Bh="xw6nfa2",YT="xw6nfa3";const bl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return M.jsx(u,{"data-test-id":s["data-test-id"],className:Ie(UT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:YT,children:[t,M.jsx("div",{className:Bh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Bh,children:e}),n]})})});bl.displayName="ListItem";bl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var rg={},og={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var h=m,b,y;h.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),q=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Ve,Ye){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ye),ye.compileShader(Ve),Ye=ye.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ye.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
147
147
  attribute vec2 uv;
148
148
  uniform vec4 mat;
149
149
  uniform vec2 translate;
package/dist/index.mjs CHANGED
@@ -14337,7 +14337,7 @@ function Tc(e, {
14337
14337
  }, [e, a, n]), n ? o : 0;
14338
14338
  }
14339
14339
  function R$(e, t, n) {
14340
- const r = gt(() => t("maxHeight"), [t]), o = window.innerHeight * 0.85, [i, a] = Ce(
14340
+ const r = gt(() => t("maxHeight"), [t]), o = window.innerHeight * 0.9, [i, a] = Ce(
14341
14341
  () => cs(e) || typeof window < "u" ? o : 0
14342
14342
  ), s = i > 0, c = ae(0);
14343
14343
  return Tr(e ? "controlled" : "auto"), me(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctlyst.id/voila-ui",
3
- "version": "1.31.1",
3
+ "version": "1.32.0",
4
4
  "description": "UI library for voila user facing library.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -93,5 +93,5 @@
93
93
  "jest-environment-jsdom": "29.4.1",
94
94
  "polished": "^4.2.2"
95
95
  },
96
- "gitHead": "3f2953f985fbc8d826d0e9d74738602dd0b54cd0"
96
+ "gitHead": "59377c4d794ecdb9a138ef133f8073a58dc31a41"
97
97
  }