@worldresources/wri-design-systems 2.194.3 → 2.194.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -2461,9 +2461,9 @@
2461
2461
  display: flex;
2462
2462
  align-items: center;
2463
2463
  justify-content: center;
2464
- `,Uw=e.Table.Row,Kw=e.Table.Cell,Gw=i.css`
2464
+ `,Uw=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},Kw=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},Gw=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},Zw=e.Table.Row,Jw=e.Table.Cell,Xw=i.css`
2465
2465
  border: ${j(100)} solid ${w("neutral",300)};
2466
- `,Zw=i.css`
2466
+ `,Yw=i.css`
2467
2467
  padding: ${k(400)};
2468
2468
  cursor: pointer;
2469
2469
  &:focus-visible {
@@ -2478,9 +2478,9 @@
2478
2478
  transparent
2479
2479
  );
2480
2480
  }
2481
- `,Jw=i.css`
2481
+ `,Qw=i.css`
2482
2482
  border: ${j(100)} solid ${w("neutral",300)};
2483
- `,Xw=i.css`
2483
+ `,eC=i.css`
2484
2484
  padding: ${k(400)};
2485
2485
  cursor: pointer;
2486
2486
  border-bottom: ${j(100)} solid
@@ -2502,7 +2502,7 @@
2502
2502
  transparent
2503
2503
  );
2504
2504
  }
2505
- `,Yw=i.css`
2505
+ `,tC=i.css`
2506
2506
  .item-content-open > * {
2507
2507
  max-height: auto;
2508
2508
 
@@ -2523,10 +2523,10 @@
2523
2523
  padding-bottom 0.2s ease,
2524
2524
  padding-top 0.2s ease;
2525
2525
  }
2526
- `,Qw=i.css`
2526
+ `,nC=i.css`
2527
2527
  border-top: ${j(100)} solid
2528
2528
  ${w("neutral",300)};
2529
- `;var eC,tC={exports:{}},nC={},rC={exports:{}},oC={exports:{}},iC={};var sC,aC,lC,cC,dC,uC,hC,pC,fC,mC,gC,vC,bC,yC={};
2529
+ `;var rC,oC={exports:{}},iC={},sC={exports:{}},aC={exports:{}},lC={};var cC,dC,uC,hC,pC,fC,mC,gC,vC,bC,yC,xC,wC,CC={};
2530
2530
  /** @license React v16.13.1
2531
2531
  * react-is.development.js
2532
2532
  *
@@ -2534,7 +2534,7 @@
2534
2534
  *
2535
2535
  * This source code is licensed under the MIT license found in the
2536
2536
  * LICENSE file in the root directory of this source tree.
2537
- */function xC(){return aC||(aC=1,"production"===process.env.NODE_ENV?oC.exports=function(){if(eC)return iC;eC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return iC.AsyncMode=l,iC.ConcurrentMode=c,iC.ContextConsumer=a,iC.ContextProvider=s,iC.Element=t,iC.ForwardRef=d,iC.Fragment=r,iC.Lazy=f,iC.Memo=p,iC.Portal=n,iC.Profiler=i,iC.StrictMode=o,iC.Suspense=u,iC.isAsyncMode=function(e){return x(e)||y(e)===l},iC.isConcurrentMode=x,iC.isContextConsumer=function(e){return y(e)===a},iC.isContextProvider=function(e){return y(e)===s},iC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},iC.isForwardRef=function(e){return y(e)===d},iC.isFragment=function(e){return y(e)===r},iC.isLazy=function(e){return y(e)===f},iC.isMemo=function(e){return y(e)===p},iC.isPortal=function(e){return y(e)===n},iC.isProfiler=function(e){return y(e)===i},iC.isStrictMode=function(e){return y(e)===o},iC.isSuspense=function(e){return y(e)===u},iC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},iC.typeOf=y,iC}():oC.exports=(sC||(sC=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,E=f,M=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}yC.AsyncMode=x,yC.ConcurrentMode=w,yC.ContextConsumer=C,yC.ContextProvider=k,yC.Element=S,yC.ForwardRef=$,yC.Fragment=j,yC.Lazy=E,yC.Memo=M,yC.Portal=T,yC.Profiler=O,yC.StrictMode=L,yC.Suspense=A,yC.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},yC.isConcurrentMode=N,yC.isContextConsumer=function(e){return y(e)===a},yC.isContextProvider=function(e){return y(e)===s},yC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},yC.isForwardRef=function(e){return y(e)===d},yC.isFragment=function(e){return y(e)===r},yC.isLazy=function(e){return y(e)===f},yC.isMemo=function(e){return y(e)===p},yC.isPortal=function(e){return y(e)===n},yC.isProfiler=function(e){return y(e)===i},yC.isStrictMode=function(e){return y(e)===o},yC.isSuspense=function(e){return y(e)===u},yC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},yC.typeOf=y}()),yC)),oC.exports}function wC(){if(cC)return lC;cC=1;return lC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function CC(){return uC?dC:(uC=1,dC=Function.call.bind(Object.prototype.hasOwnProperty))}function kC(){if(mC)return fC;mC=1;var e=xC(),t=s,n=wC(),r=CC(),o=function(){if(pC)return hC;pC=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=wC(),n={},r=CC();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},hC=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),fC=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=b(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},fC}function SC(){if(bC)return rC.exports;if(bC=1,"production"!==process.env.NODE_ENV){var e=xC();rC.exports=kC()(e.isElement,!0)}else rC.exports=function(){if(vC)return gC;vC=1;var e=wC();function t(){}function n(){}return n.resetWarningCache=t,gC=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},gC}()();return rC.exports}var $C,jC={exports:{}};var EC,MC={},TC={};function OC(){if(EC)return TC;return EC=1,Object.defineProperty(TC,"__esModule",{value:!0}),TC.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},TC.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},TC.int=function(e){return parseInt(e,10)},TC.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},TC.isNum=function(e){return"number"==typeof e&&!isNaN(e)},TC}var LC,AC,RC={};function NC(){if(AC)return MC;AC=1,Object.defineProperty(MC,"__esModule",{value:!0}),MC.addClassName=s,MC.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},MC.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},MC.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},MC.createSVGTransform=function(e,t){return o(e,t,"")},MC.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},MC.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},MC.getTranslation=o,MC.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},MC.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},MC.matchesSelector=r,MC.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},MC.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},MC.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},MC.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},MC.removeClassName=a,MC.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},MC.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=OC(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(LC)return RC;LC=1,Object.defineProperty(RC,"__esModule",{value:!0}),RC.browserPrefixToKey=n,RC.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},RC.default=void 0,RC.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return RC.default=t(),RC}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return MC}var DC,IC={};function PC(){if(DC)return IC;DC=1,Object.defineProperty(IC,"__esModule",{value:!0}),IC.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},IC.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},IC.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},IC.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},IC.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},IC.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},IC.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=OC(),t=NC();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return IC}var zC,VC,HC,BC,_C={},FC={};function qC(){if(zC)return FC;return zC=1,Object.defineProperty(FC,"__esModule",{value:!0}),FC.default=function(){},FC}function WC(){if(VC)return _C;VC=1,Object.defineProperty(_C,"__esModule",{value:!0}),_C.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(SC()),r=c(o),i=NC(),s=PC(),a=OC(),l=c(qC());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return _C.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),_C}function UC(){return HC||(HC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(SC()),i=h(o),s=function(){if($C)return jC.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return $C=1,jC.exports=t,jC.exports.clsx=t,jC.exports}(),a=NC(),l=PC(),c=OC(),d=h(WC()),u=h(qC());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},b=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(w,f):v=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...v},transform:b}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(nC)),nC}var KC=function(){if(BC)return tC.exports;BC=1;const{default:e,DraggableCore:t}=UC();return tC.exports=e,tC.exports.default=e,tC.exports.DraggableCore=t,tC.exports}(),GC=lp(KC);const ZC=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
2537
+ */function kC(){return dC||(dC=1,"production"===process.env.NODE_ENV?aC.exports=function(){if(rC)return lC;rC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return lC.AsyncMode=l,lC.ConcurrentMode=c,lC.ContextConsumer=a,lC.ContextProvider=s,lC.Element=t,lC.ForwardRef=d,lC.Fragment=r,lC.Lazy=f,lC.Memo=p,lC.Portal=n,lC.Profiler=i,lC.StrictMode=o,lC.Suspense=u,lC.isAsyncMode=function(e){return x(e)||y(e)===l},lC.isConcurrentMode=x,lC.isContextConsumer=function(e){return y(e)===a},lC.isContextProvider=function(e){return y(e)===s},lC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},lC.isForwardRef=function(e){return y(e)===d},lC.isFragment=function(e){return y(e)===r},lC.isLazy=function(e){return y(e)===f},lC.isMemo=function(e){return y(e)===p},lC.isPortal=function(e){return y(e)===n},lC.isProfiler=function(e){return y(e)===i},lC.isStrictMode=function(e){return y(e)===o},lC.isSuspense=function(e){return y(e)===u},lC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},lC.typeOf=y,lC}():aC.exports=(cC||(cC=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,E=f,M=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}CC.AsyncMode=x,CC.ConcurrentMode=w,CC.ContextConsumer=C,CC.ContextProvider=k,CC.Element=S,CC.ForwardRef=$,CC.Fragment=j,CC.Lazy=E,CC.Memo=M,CC.Portal=T,CC.Profiler=O,CC.StrictMode=L,CC.Suspense=A,CC.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},CC.isConcurrentMode=N,CC.isContextConsumer=function(e){return y(e)===a},CC.isContextProvider=function(e){return y(e)===s},CC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},CC.isForwardRef=function(e){return y(e)===d},CC.isFragment=function(e){return y(e)===r},CC.isLazy=function(e){return y(e)===f},CC.isMemo=function(e){return y(e)===p},CC.isPortal=function(e){return y(e)===n},CC.isProfiler=function(e){return y(e)===i},CC.isStrictMode=function(e){return y(e)===o},CC.isSuspense=function(e){return y(e)===u},CC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},CC.typeOf=y}()),CC)),aC.exports}function SC(){if(hC)return uC;hC=1;return uC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function $C(){return fC?pC:(fC=1,pC=Function.call.bind(Object.prototype.hasOwnProperty))}function jC(){if(bC)return vC;bC=1;var e=kC(),t=s,n=SC(),r=$C(),o=function(){if(gC)return mC;gC=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=SC(),n={},r=$C();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},mC=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),vC=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=b(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},vC}function EC(){if(wC)return sC.exports;if(wC=1,"production"!==process.env.NODE_ENV){var e=kC();sC.exports=jC()(e.isElement,!0)}else sC.exports=function(){if(xC)return yC;xC=1;var e=SC();function t(){}function n(){}return n.resetWarningCache=t,yC=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yC}()();return sC.exports}var MC,TC={exports:{}};var OC,LC={},AC={};function RC(){if(OC)return AC;return OC=1,Object.defineProperty(AC,"__esModule",{value:!0}),AC.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},AC.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},AC.int=function(e){return parseInt(e,10)},AC.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},AC.isNum=function(e){return"number"==typeof e&&!isNaN(e)},AC}var NC,DC,IC={};function PC(){if(DC)return LC;DC=1,Object.defineProperty(LC,"__esModule",{value:!0}),LC.addClassName=s,LC.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},LC.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},LC.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},LC.createSVGTransform=function(e,t){return o(e,t,"")},LC.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},LC.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},LC.getTranslation=o,LC.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},LC.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},LC.matchesSelector=r,LC.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},LC.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},LC.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},LC.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},LC.removeClassName=a,LC.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},LC.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=RC(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(NC)return IC;NC=1,Object.defineProperty(IC,"__esModule",{value:!0}),IC.browserPrefixToKey=n,IC.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},IC.default=void 0,IC.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return IC.default=t(),IC}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return LC}var zC,VC={};function HC(){if(zC)return VC;zC=1,Object.defineProperty(VC,"__esModule",{value:!0}),VC.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},VC.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},VC.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},VC.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},VC.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},VC.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},VC.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=RC(),t=PC();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return VC}var BC,_C,FC,qC,WC={},UC={};function KC(){if(BC)return UC;return BC=1,Object.defineProperty(UC,"__esModule",{value:!0}),UC.default=function(){},UC}function GC(){if(_C)return WC;_C=1,Object.defineProperty(WC,"__esModule",{value:!0}),WC.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(EC()),r=c(o),i=PC(),s=HC(),a=RC(),l=c(KC());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return WC.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),WC}function ZC(){return FC||(FC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(EC()),i=h(o),s=function(){if(MC)return TC.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return MC=1,TC.exports=t,TC.exports.clsx=t,TC.exports}(),a=PC(),l=HC(),c=RC(),d=h(GC()),u=h(KC());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},b=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(w,f):v=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...v},transform:b}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(iC)),iC}var JC=function(){if(qC)return oC.exports;qC=1;const{default:e,DraggableCore:t}=ZC();return oC.exports=e,oC.exports.default=e,oC.exports.DraggableCore=t,oC.exports}(),XC=lp(JC);const YC=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
2538
2538
  max-width: 100%;
2539
2539
  width: ${o};
2540
2540
  height: ${l};
@@ -2544,7 +2544,7 @@
2544
2544
  border-radius: ${$(300)};
2545
2545
  box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
2546
2546
  box-shadow: 0 0.625rem 0.9375rem -0.1875rem #0000001a;
2547
- `},JC=i.css`
2547
+ `},QC=i.css`
2548
2548
  height: 100%;
2549
2549
  min-height: ${k(1e3)};
2550
2550
  display: flex;
@@ -2553,29 +2553,29 @@
2553
2553
  padding: ${k(200)};
2554
2554
  border-bottom: ${j(100)} solid
2555
2555
  ${w("neutral",300)};
2556
- `,XC=i.css`
2556
+ `,ek=i.css`
2557
2557
  top: ${k(300)};
2558
- `,YC=i.css`
2558
+ `,tk=i.css`
2559
2559
  padding: ${k(300)};
2560
- `,QC=e=>i.css`
2560
+ `,nk=e=>i.css`
2561
2561
  height: 100%;
2562
2562
  width: ${e||"20rem"};
2563
2563
  background-color: ${w("neutral",100)};
2564
2564
  box-shadow: 0 0.0625rem 0.125rem -0.0625rem #0000001a;
2565
2565
  box-shadow: 0 0.0625rem 0.1875rem 0 #0000001a;
2566
2566
  position: relative;
2567
- `,ek=i.css`
2567
+ `,rk=i.css`
2568
2568
  border-right: ${j(100)} solid
2569
2569
  ${w("neutral",300)};
2570
- `,tk=i.css`
2570
+ `,ok=i.css`
2571
2571
  border: ${j(100)} solid ${w("neutral",300)};
2572
2572
  border-radius: ${$(300)};
2573
- `,nk=i.css`
2573
+ `,ik=i.css`
2574
2574
  min-height: ${k(1200)};
2575
2575
  width: 100%;
2576
2576
  border-bottom: ${j(100)} solid
2577
2577
  ${w("neutral",300)};
2578
- `,rk=(e,t)=>i.css`
2578
+ `,sk=(e,t)=>i.css`
2579
2579
  height: ${((e,t)=>e&&t?`calc(100% - ${(e+t)/16}rem)`:e?`calc(100% - ${e/16}rem)`:t?`calc(100% - ${t/16}rem)`:"100%")(e,t)};
2580
2580
  width: 100%;
2581
2581
  overflow-y: auto;
@@ -2583,7 +2583,7 @@
2583
2583
  &:focus-visible {
2584
2584
  outline-color: ${w("primary",700)};
2585
2585
  }
2586
- `,ok=i.css`
2586
+ `,ak=i.css`
2587
2587
  min-height: ${k(1600)};
2588
2588
  width: 100%;
2589
2589
  display: flex;
@@ -2594,7 +2594,7 @@
2594
2594
  left: 0;
2595
2595
  border-top: ${j(100)} solid
2596
2596
  ${w("neutral",300)};
2597
- `;var ik,sk;!function(){if(sk)return ik;sk=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}ik=e}();var ak=lk()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function lk(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var ck=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return ak((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(ck.displayName="Portal");
2597
+ `;var lk,ck;!function(){if(ck)return lk;ck=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}lk=e}();var dk=uk()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function uk(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var hk=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return dk((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(hk.displayName="Portal");
2598
2598
  /*! *****************************************************************************
2599
2599
  Copyright (c) Microsoft Corporation.
2600
2600
 
@@ -2608,16 +2608,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2608
2608
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2609
2609
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2610
2610
  PERFORMANCE OF THIS SOFTWARE.
2611
- ***************************************************************************** */var dk,uk,hk=function(){return hk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hk.apply(this,arguments)};function pk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function fk(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function mk(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function gk(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(dk||(dk={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(uk||(uk={}));var vk=dk.Start,bk=dk.Stop,yk=dk.Raise,xk=dk.Send,wk=dk.Cancel,Ck=dk.NullEvent,kk=dk.Assign;dk.After,dk.DoneState;var Sk=dk.Log,$k=dk.Init,jk=dk.Invoke;dk.ErrorExecution;var Ek,Mk=dk.ErrorPlatform,Tk=dk.ErrorCustom,Ok=dk.Update,Lk=dk.Choose,Ak=dk.Pure,Rk={},Nk="xstate.guard",Dk="production"===process.env.NODE_ENV;function Ik(e,t,n){void 0===n&&(n=".");var r=Vk(e,n),o=Vk(t,n);return tS(o)?!!tS(r)&&o===r:tS(r)?r in o:Object.keys(r).every((function(e){return e in o&&Ik(r[e],o[e])}))}function Pk(e){try{return tS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function zk(e,t){try{return Qk(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Vk(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Qk(e)?Hk(e):"string"!=typeof e?e:Hk(zk(e,t));var n}function Hk(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Bk(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function _k(e,t,n){var r,o,i={};try{for(var s=fk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var Fk=function(e){return function(t){var n,r,o=t;try{for(var i=fk(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function qk(e){return e?tS(e)?[[e]]:Wk(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?qk(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Wk(e){var t;return(t=[]).concat.apply(t,gk([],mk(e),!1))}function Uk(e){return Qk(e)?e:[e]}function Kk(e){return void 0===e?[]:Uk(e)}function Gk(e,t,n){var r,o;if(eS(e))return e(t,n.data);var i={};try{for(var s=fk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];eS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function Zk(e){return e instanceof Promise||!(null===e||!eS(e)&&"object"!=typeof e||!eS(e.then))}function Jk(e,t){return Bk(e.states,(function(e,n){if(e){var r=(tS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Jk(e,r)}}}))}function Xk(e,t,n,r){Dk||Yk(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(eS(s))l=s(e,t.data,a);else try{for(var c=fk(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=eS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var Yk=function(){};function Qk(e){return Array.isArray(e)}function eS(e){return"function"==typeof e}function tS(e){return"string"==typeof e}function nS(e,t){if(e)return tS(e)?{type:Nk,name:e,predicate:t?t[e]:void 0}:eS(e)?{type:Nk,name:e.name,predicate:e}:e}Dk||(Yk=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var rS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function oS(e){return!!e&&"__xstatenode"in e}function iS(e,t){return tS(e)||"number"==typeof e?hk({type:e},t):e}function sS(e,t){if(!tS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=iS(e);return hk({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function aS(e,t){return Uk(t).map((function(t){return void 0===t||"string"==typeof t||oS(t)?{target:t,event:e}:hk(hk({},t),{event:e})}))}function lS(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===Nk)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function cS(e){return"string"==typeof e?{type:e}:e}function dS(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function uS(e,t){return"".concat(e,":invocation[").concat(t,"]")}function hS(e){return(e.type===yk||e.type===xk&&e.to===uk.Internal)&&"number"!=typeof e.delay}(Ek={})[rS]=function(){return this},Ek[Symbol.observable]=function(){return this};var pS=sS({type:$k});function fS(e,t){return t&&t[e]||void 0}function mS(e,t){var n;if(tS(e)||"number"==typeof e)n=eS(r=fS(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(eS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(eS(r=fS(e.type,t)))n=hk(hk({},e),{exec:r});else if(r){var o=r.type||e.type;n=hk(hk(hk({},r),e),{type:o})}else n=e}return n}var gS=function(e,t){return e?(Qk(e)?e:[e]).map((function(e){return mS(e,t)})):[]};function vS(e){var t=mS(e);return hk(hk({id:tS(e)?e:t.id},t),{type:t.type})}function bS(e,t){var n="".concat(dk.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function yS(e,t){var n="".concat(dk.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function xS(e,t){var n="".concat(dk.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function wS(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=fk(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==kk?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?Xk(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case yk:var h=function(e,t,n,r){var o,i={_event:n},s=sS(eS(e.event)?e.event(t,n.data,i):e.event);if(tS(e.delay)){var a=r&&r[e.delay];o=eS(a)?a(t,n.data,i):a}else o=eS(e.delay)?e.delay(t,n.data,i):e.delay;return hk(hk({},e),{type:yk,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case xk:var p=function(e,t,n,r){var o,i={_event:n},s=sS(eS(e.event)?e.event(t,n.data,i):e.event);if(tS(e.delay)){var a=r&&r[e.delay];o=eS(a)?a(t,n.data,i):a}else o=eS(e.delay)?e.delay(t,n.data,i):e.delay;var l=eS(e.to)?e.to(t,n.data,i):e.to;return hk(hk({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!Dk){var f=a.delay;Yk(!tS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==uk.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case Sk:var m=function(e,t,n){return hk(hk({},e),{value:tS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case Lk:if(!(y=null===(u=a.conds.find((function(n){var o=nS(n.cond,e.options.guards);return!o||lS(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=mk(wS(e,t,l,r,[{type:o,actions:gS(Kk(y),e.options.actions)}],i,s),2),v=g[0],b=g[1];return l=b,null==c||c.push(l),v;case Ak:var y;if(!(y=a.get(l,r.data)))return[];var x=mk(wS(e,t,l,r,[{type:o,actions:gS(Kk(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case bk:m=function(e,t,n){var r=eS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:dk.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case kk:l=Xk(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=mS(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=hk(hk({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,gk([c[$]],mk(t),!1))}});k=j}return k}}var h=Wk(o.map((function(e){var t,n,o=[];try{for(var s=fk(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var CS=function(e,t){return t(e)};function kS(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[rS]=function(){return this},t}function SS(e,t,n){var r=kS(t);if(r.deferred=!0,oS(e)){var o=r.state=CS(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var $S=function(e){return"atomic"===e.type||"final"===e.type};function jS(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function ES(e){return jS(e).filter((function(e){return"history"!==e.type}))}function MS(e){var t=[e];return $S(e)?t:t.concat(Wk(ES(e).map(MS)))}function TS(e,t){var n,r,o,i,s,a,l,c,d=LS(new Set(e)),u=new Set(t);try{for(var h=fk(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=LS(u);try{for(var g=fk(u),v=g.next();!v.done;v=g.next()){if("compound"!==(k=v.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var b=(s=void 0,fk(ES(k))),y=b.next();!y.done;y=b.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=fk(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function OS(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if($S(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=OS(e,t)})),o}function LS(e){var t,n,r=new Map;try{for(var o=fk(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function AS(e,t){return OS(e,LS(TS([e],t)))}function RS(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function NS(e,t){return"compound"===t.type?ES(t).some((function(t){return"final"===t.type&&RS(e,t)})):"parallel"===t.type&&ES(t).every((function(t){return NS(e,t)}))}function DS(e){return new Set(Wk(e.map((function(e){return e.tags}))))}function IS(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(tS(e)||tS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return IS(e[n],t[n])}))}var PS=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Rk,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Rk,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return gk([],mk(new Set(Wk(gk([],mk(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:pS,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=pS;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),tS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,gk([],mk(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=pk(e,["configuration","transitions","tags","machine"]);return hk(hk({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Ik(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Dk&&Yk(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),zS={deferEvents:!1},VS=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=hk(hk({},zS),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),HS=new Map,BS=0,_S=function(){return"x:".concat(BS++)},FS=function(e,t){return HS.set(e,t),e},qS=function(e){return HS.get(e)},WS=function(e){HS.delete(e)};function US(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Dk||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function KS(e){if(US()){var t=function(){var e=US();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function GS(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return hk(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[rS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=dS(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var ZS,JS={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(ZS||(ZS={}));var XS=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=ZS.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Qk(e))return r.batch(e),r.state;var n=sS(iS(e,t));if(r.status===ZS.Stopped)return Dk||Yk(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==ZS.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===uk.Parent||r.parent.id===t),s=i?r.parent:tS(t)?t===uk.Internal?r:r.children.get(t)||qS(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==ZS.Stopped||r.parent!==s||r.state.done){var a=hk(hk({},e),{name:e.name===Tk?"".concat(xS(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Dk||Yk(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||fS(e.type,o),s=eS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case yk:var a=e;r.defer(a);break;case xk:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===pS):r.send(l._event);break;case wk:r.cancel(e.sendId);break;case vk:if(r.status!==ZS.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===dk.Invoke){var d=cS(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;Dk||Yk(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(Dk||Yk(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?Gk(p,t,n):void 0;if("string"==typeof u)return;var g=eS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var v=void 0;oS(g)&&(g=m?g.withContext(m):g,v={autoForward:f}),r.spawn(g,h,v)}else r.spawnActivity(c);break;case bk:r.stopChild(e.activity.id);break;case Sk:var b=e,y=b.label,x=b.value;y?r.logger(y,x):r.logger(x);break;default:Dk||Yk(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=hk(hk({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new VS({deferEvents:this.options.deferEvents}),this.sessionId=_S()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:CS(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Dk||Yk(this.status!==ZS.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=fk(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==pS||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=fk(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=fk(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=fk(this.contextListeners),v=g.next();!v.done;v=g.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=b&&b.doneData?Gk(b.doneData,e.context,t):void 0;this._doneEvent=yS(this.id,y);try{for(var x=fk(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),WS(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===ZS.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=dS(e,t,n);this.listeners.add(o.next),this.status!==ZS.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===ZS.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===ZS.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===ZS.Running)return this;this.machine._init(),FS(this.sessionId,this),this.initialized=!0,this.status=ZS.Running;var n=void 0===e?this.initialState:CS(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(PS.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,pS)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){eS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=fk(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=fk(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=fk(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var v=fk(this.doneListeners),b=v.next();!b.done;b=v.next()){h=b.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=ZS.Stopped,this._initialState=void 0;try{for(var y=fk(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new VS({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=sS({type:"xstate.stop"}),r=CS(e,(function(){var t=Wk(gk([],mk(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return gS(t.onExit,e.machine.options.actions)}))),r=mk(wS(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new PS({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!hS(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),WS(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===ZS.NotStarted&&this.options.deferEvents)Dk||Yk(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==ZS.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=sS(e);t.forward(r),i=CS(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,gk([],mk(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return hk(hk({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=fk(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,sS(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=sS(e);if(0===r.name.indexOf(Mk)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Mk)})))throw r.data.data;return CS(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=fk(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),eS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==ZS.Running)return SS(e,t);if(Zk(e))return this.spawnPromise(Promise.resolve(e),t);if(eS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&eS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(oS(e))return this.spawnMachine(e,hk(hk({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,hk(hk({},this.options),{parent:this,id:n.id||t.id})),i=hk(hk({},JS),n);i.sync&&o.onTransition((function(e){r.send(Ok,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(sS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=GS(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(sS(yS(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=xS(t,e);try{o.send(sS(n,{origin:t}))}catch(r){!function(e,t,n){if(!Dk){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=dS(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[rS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(sS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(xS(t,e))}if(Zk(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=dS(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,eS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[rS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(sS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(sS(xS(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(sS(yS(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[rS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else Dk||Yk(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[rS]=function(){return this},n))},e.prototype.attachDev=function(){var e=US();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(hk(hk({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:hk({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}KS(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[rS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===ZS.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=YS,e}();function YS(e,t){return new XS(e,t)}function QS(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function e$(e){return hk(hk({type:jk},e),{toJSON:function(){e.onDone,e.onError;var t=pk(e,["onDone","onError"]);return hk(hk({},t),{type:jk,src:QS(e.src)})}})}var t$="",n$="*",r$={},o$=function(e){return"#"===e[0]},i$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||gk([this.machine.key],mk(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,Dk||Yk(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Bk(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,hk(((r={})[o.id]=o,r),o.idMap)),o})):r$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=fk(jS(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===t$})):t$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=Kk(this.config.entry||this.config.onEntry).map((function(e){return mS(e)})),this.onExit=Kk(this.config.exit||this.config.onExit).map((function(e){return mS(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Kk(this.config.invoke).map((function(e,t){var n,r;if(oS(e)){var o=uS(s.id,t);return s.machine.options.services=hk(((n={})[o]=e,n),s.machine.options.services),e$({src:o,id:o})}if(tS(e.src)){o=e.id||uS(s.id,t);return e$(hk(hk({},e),{id:o,src:e.src}))}if(oS(e.src)||eS(e.src)){o=e.id||uS(s.id,t);return s.machine.options.services=hk(((r={})[o]=e.src,r),s.machine.options.services),e$(hk(hk({id:o},e),{src:o}))}var i=e.src;return e$(hk(hk({id:uS(s.id,t)},e),{src:i}))})),this.activities=Kk(this.config.activities).concat(this.invoke).map((function(e){return vS(e)})),this.transition=this.transition.bind(this),this.tags=Kk(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||MS(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:hk(hk({},o),t.actions),activities:hk(hk({},i),t.activities),guards:hk(hk({},s),t.guards),services:hk(hk({},a),t.services),delays:hk(hk({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return eS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Bk(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===t$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===n$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(dk.After,"(").concat(e,")").concat(n)}(eS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:xk,event:eS(e)?e:iS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:eS(e)?e.name:Pk(e)}}(r,{delay:t})),e.onExit.push({type:wk,sendId:r}),r},r=Qk(t)?t.map((function(e,t){var r=n(e.delay,t);return hk(hk({},e),{event:r})})):Wk(Object.keys(t).map((function(e,r){var o=t[e],i=tS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return Kk(i).map((function(e){return hk(hk({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return hk(hk({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof PS?e.value:Vk(e,this.delimiter);if(tS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,gk([],mk(Wk(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=Pk(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof PS?e:PS.create(e),n=Array.from(TS([],this.getStateNodes(t.value)));return new PS(hk(hk({},t),{value:this.resolve(t.value),configuration:n,done:NS(n,this),tags:DS(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=fk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=Wk(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=Wk(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:Wk(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:Wk(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return tS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,sS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=fk(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(tS(p)&&o$(p)?e.matches(Vk(this.getStateNodeById(p).path,this.delimiter)):Ik(Vk(p,this.delimiter),Fk(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||lS(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,gk([],mk(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var v=Wk(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Wk(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?TS([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=fk(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!RS(h,b=m.value)||RS(n.exitSet,b)||b.parent&&p.has(b.parent))&&p.add(b)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=fk(h),v=g.next();!v.done;v=g.next()){var b;RS(e,b=v.value)&&!RS(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=Wk(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(bS(e.id,e.doneData),bS(i.id,e.doneData?Gk(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&ES(s).every((function(e){return NS(n.configuration,e)}))&&t.push(bS(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=vS(e);return{type:dk.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:gS(s?gk(gk([],mk(t),!1),mk(n),!1):gk(gk([],mk(n),!1),mk(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:yk,event:"function"==typeof e?e:iS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:gS(gk(gk([],mk(e.onExit),!1),mk(e.activities.map((function(e){return function(e){var t=eS(e)?e:vS(e);return{type:dk.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:gS(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=gS(Wk(gk([],mk(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!hS(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=sS(t);if(e instanceof PS)o=void 0===n?e:this.resolveState(PS.from(e,n));else{var a=tS(e)?this.resolve(Hk(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(PS.from(a,l))}if(!Dk&&s.name===n$)throw new Error("An event cannot have the wildcard type ('".concat(n$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=TS([],this.getStateNodes(o.value)),u=c.configuration.length?TS(d,c.configuration):d;return c.configuration=gk([],mk(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,gk([],mk(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=pS);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=NS(h,this),f=u?AS(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),v=t?hk({},t.activities):{};try{for(var b=fk(g),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,fk(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===vk?v[k.activity.id||k.activity.type]=k:k.type===bk&&(v[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}var S,$,j=mk(wS(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),E=j[0],M=j[1],T=mk(function(e,t){var n,r,o=mk([[],[]],2),i=o[0],s=o[1];try{for(var a=fk(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(E,hS),2),O=T[0],L=T[1],A=E.filter((function(e){var t;return e.type===vk&&(null===(t=e.activity)||void 0===t?void 0:t.type)===jk})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=cS(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?Gk(e.data,n,r):void 0,l=s?SS(s,e.id,a):kS(e.id);return l.meta=e,l}(t.activity,c.machine,M,o),e}),t?hk({},t.children):{}),N=new PS({value:f||t.value,context:M,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:Jk(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?v:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:DS(h),machine:this}),D=n!==M;N.changed=o.name===Ok||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==t$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:Ck},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var H=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!IS(z.value,I.value):void 0);return z.changed=H,z.history=I,z},e.prototype.getStateNode=function(e){if(o$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=o$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&o$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=zk(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||r$;switch(this.type){case"parallel":return Bk(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):r$}));case"compound":if(tS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Bk(e,(function(e,t){return e?n.getStateNode(t).resolve(e):r$})):this.initialStateValue||{};default:return e||r$}},e.prototype.getResolvedPath=function(e){if(o$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return zk(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=_k(this.states,(function(e){return e.initialStateValue||r$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=$S(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=tS(t.target)&&o$(t.target)?Hk(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return $S(this)?[this]:"compound"!==this.type||this.initial?Wk(qk(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Dk||Yk(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=mk(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:_k(this.states,(function(t,n){if(!e)return t.historyValue();var r=tS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Wk(qk(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=fk(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return tS(s)?[n.getStateNode(s)]:Wk(qk(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Wk(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=fk(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,fk(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!tS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Kk(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return tS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=hk(hk({},e),{actions:gS(Kk(e.actions)),cond:nS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return hk(hk({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=n$,s=o[i],a=void 0===s?[]:s,l=pk(o,["*"]);n=Wk(Object.keys(l).map((function(e){Dk||e!==t$||Yk(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=aS(e,l[e]);return Dk||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(tS(e.target)||oS(e.target))})),o=t===t$?"the transient event":"event '".concat(t,"'");Yk(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(aS(n$,a)))}else n=[];var c=this.config.always?aS("",this.config.always):[],d=this.config.onDone?aS(String(bS(this.id)),this.config.onDone):[];Dk||Yk(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Wk(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,gk([],mk(aS(String(yS(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,gk([],mk(aS(String(xS(e.id)),e.onError)),!1)),t}))),h=this.after,p=Wk(gk(gk(gk(gk([],mk(d),!1),mk(u),!1),mk(n),!1),mk(c),!1).map((function(e){return Kk(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=fk(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var s$,a$=function(e){return{type:kk,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(s$||(s$={}));var l$="undefined"!=typeof document?n.useLayoutEffect:function(){};function c$(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var d$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},u$=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var h$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},p$=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function f$(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function m$(e){var t=n.useRef([]),r=n.useRef([]);l$((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=h$(function(e,t){var n,r,o=d$([[],[]],2),i=o[0],s=o[1];try{for(var a=u$(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===s$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,p$([],h$(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,p$([],h$(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),l$((function(){for(;r.current.length;){var e=h$(r.current.shift(),2);f$(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=h$(t.current.shift(),2);f$(e[0],e[1])}}))}var g$=function(){return g$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g$.apply(this,arguments)},v$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},b$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var y$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function x$(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=c$((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=b$(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=v$(t,["context","guards","actions","activities","services","delays","state"]),f=c$((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return YS(o.withConfig(e,(function(){return g$(g$({},o.context),s)})),g$({deferEvents:!0},p))}));return l$((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),l$((function(){return f.start(h?PS.create(h):void 0),function(){f.stop()}}),[]),l$((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),m$(f),f}(e,t,r),i=y$(n.useState((function(){var e=o.machine.initialState;return t.state?PS.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function w$(){return w$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w$.apply(null,arguments)}function C$(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const k$={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(k$.str(e)||k$.num(e))return e===t;if(k$.obj(e)&&k$.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!k$.und(n)||e===t}};function S$(e,t){return k$.und(e)||k$.nul(e)?t:e}function $$(e){return k$.und(e)?[]:k$.arr(e)?e:[e]}function j$(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return k$.fun(e)?e(...n):e}function E$(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,C$(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(k$.und(t))return w$({to:t},e);const n=Object.keys(e).reduce(((n,r)=>k$.und(t[r])?w$({},n,{[r]:e[r]}):n),{});return w$({to:t},n)}class M${constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class T$ extends M${constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof M$&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof M$&&e.removeChild(this)))}}class O$ extends M${constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof M$&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof M$&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof M$)&&(t[n]=r instanceof M$?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let L$,A$;let R$,N$=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let D$,I$=()=>Date.now();class P$ extends O${constructor(e,t){super(),this.update=void 0,this.payload=e.style?w$({},e,{style:D$(e.style)}):e,this.update=t,this.attach()}}let z$=!1;const V$=new Set,H$=()=>{if(!z$)return!1;let e=I$();for(let t of V$){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof M$,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(V$.delete(t),t.stop(!0))}return V$.size?N$(H$):z$=!1,z$};function B$(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return B$({range:e,output:t,extrapolate:n});if(R$&&"string"==typeof e.output[0])return R$(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class _$ extends T${constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof T$&&!(e instanceof _$)?e.getPayload():Array.isArray(e)?e:[e],this.calc=B$(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=B$(e,t,n)}interpolate(e,t,n){return new _$(this,e,t,n)}}const F$=(e,t,n)=>e&&new _$(e,t,n);function q$(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>q$(e,t)))}class W$ extends M${constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&q$(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new _$(this,e,t,n)}}class U$ extends T${constructor(e){super(),this.payload=e.map((e=>new W$(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new _$(this,e,t)}}let K$=0,G$=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=K$++}update(e){if(!e)return this;const t=E$(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=C$(t,["delay","to"]);if(k$.arr(o)||k$.fun(o))this.queue.push(w$({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=w$({to:{[n]:o},delay:j$(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=w$({},e[s.delay],s,{to:w$({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;k$.obj(n)&&(this.merged=w$({},n,this.merged)),k$.obj(o)&&(this.merged=w$({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=C$(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=k$.arr(s.to)||k$.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else k$.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,V$.has(t)||V$.add(t),z$||(z$=!0,N$(H$));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,V$.has(t)&&V$.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=C$(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(k$.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=w$({},r,E$(r.to[t]));k$.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(k$.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=w$({},r,E$(n));if(k$.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=w$({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=w$({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=k$.num(o),l=k$.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!A$[o],c=k$.arr(o),h=!s&&!c&&!l;let f=k$.und(r[n])?o:r[n],m=s||c||l?o:1,g=j$(a,n);p&&(m=p.animations[n].parent);let v,b=i.parent,y=i.interpolation,x=$$(p?m.getPayload():m),w=o;h&&(w=R$({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!k$.und(b)&&i.animatedValues.some((e=>!e.done)),S=!k$.equ(w,C),$=!k$.equ(w,i.previous),j=!k$.equ(g,i.config);if(d||$&&S||j){if(s||l)b=y=i.parent||new W$(f);else if(c)b=y=i.parent||new U$(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(b=i.parent,b.setValue(0,!1)):b=new W$(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=b.interpolate(t)}return x=$$(p?m.getPayload():m),v=$$(b.getPayload()),d&&!h&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=I$(),e.done=!1,e.animatedStyles.clear()})),j$(u,n)&&b.setValue(h?m:o,!1),w$({},e,{[n]:w$({},i,{name:n,parent:b,interpolation:y,animatedValues:v,toValues:x,previous:w,config:g,fromValues:$$(b.getValue()),immediate:j$(u,n),initialVelocity:S$(g.velocity,0),clamp:S$(g.clamp,!1),precision:S$(g.precision,.01),tension:S$(g.tension,170),friction:S$(g.friction,26),mass:S$(g.mass,1),duration:g.duration,easing:S$(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(b.setValue(1,!1),y.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,w$({},e,{[n]:w$({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Z$=e=>{const t=k$.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=k$.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new G$,s=i?j$(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?j$(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class J$ extends O${constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof M$||(e=L$.transform(e)),this.payload=e}}const X$={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Y$="[-+]?\\d*\\.?\\d+",Q$=Y$+"%";function ej(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const tj=new RegExp("rgb"+ej(Y$,Y$,Y$)),nj=new RegExp("rgba"+ej(Y$,Y$,Y$,Y$)),rj=new RegExp("hsl"+ej(Y$,Q$,Q$)),oj=new RegExp("hsla"+ej(Y$,Q$,Q$,Y$)),ij=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,sj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,aj=/^#([0-9a-fA-F]{6})$/,lj=/^#([0-9a-fA-F]{8})$/;function cj(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dj(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=cj(o,r,e+1/3),s=cj(o,r,e),a=cj(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function uj(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function hj(e){return(parseFloat(e)%360+360)%360/360}function pj(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fj(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function mj(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=aj.exec(e))?parseInt(t[1]+"ff",16)>>>0:X$.hasOwnProperty(e)?X$[e]:(t=tj.exec(e))?(uj(t[1])<<24|uj(t[2])<<16|uj(t[3])<<8|255)>>>0:(t=nj.exec(e))?(uj(t[1])<<24|uj(t[2])<<16|uj(t[3])<<8|pj(t[4]))>>>0:(t=ij.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=lj.exec(e))?parseInt(t[1],16)>>>0:(t=sj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=rj.exec(e))?(255|dj(hj(t[1]),fj(t[2]),fj(t[3])))>>>0:(t=oj.exec(e))?(dj(hj(t[1]),fj(t[2]),fj(t[3]))|pj(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const gj=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,vj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,bj=new RegExp(`(${Object.keys(X$).join("|")})`,"g");let yj={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const xj=["Webkit","Ms","Moz","O"];function wj(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||yj.hasOwnProperty(e)&&yj[e]?(""+t).trim():t+"px"}yj=Object.keys(yj).reduce(((e,t)=>(xj.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),yj);const Cj={};var kj,Sj;kj=e=>new J$(e),D$=kj,Sj=e=>{const t=e.output.map((e=>e.replace(vj,mj))).map((e=>e.replace(bj,mj))),n=t[0].match(gj).map((()=>[]));t.forEach((e=>{e.match(gj).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(gj).map(((t,r)=>B$(w$({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(gj,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},R$=Sj,A$=X$,function(e,t){L$={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=C$(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=wj(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:Cj[t]||(Cj[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var $j;const jj=($j=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new P$(e,(()=>{let e=!1;a.current&&(e=L$.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=C$(c,["scrollTop","scrollLeft"]),u=(h=e,!k$.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(k$.fun(t)?t(e):k$.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,w$({},d,{ref:u}))})),e=>(k$.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=$j(n),e}),$j))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function Ej(e,t){return e.map((function(e,n){return e+t[n]}))}function Mj(e,t){return e.map((function(e,n){return e-t[n]}))}function Tj(e){return Math.hypot.apply(Math,e)}function Oj(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Lj(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function Aj(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Lj(t-e,n-t,r)+t:e>n?+Lj(e-n,n-t,r)+n:e}function Rj(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Nj(){return Nj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nj.apply(this,arguments)}function Dj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ij(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zj(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pj(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Vj(){}function Hj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Vj:1===t.length?t[0]:function(){for(var e,n,r=zj(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Bj(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function _j(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Fj(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=Fj(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var qj=Nj({},{threshold:function(e){return void 0===e&&(e=0),Bj(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Bj(.15);case!1:return Bj(0);default:return Bj(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Bj(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return qj.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),Wj="undefined"!=typeof window&&window.document&&window.document.createElement,Uj={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Wj?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},Kj=Nj({},qj,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=Bj(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Bj(e)},swipeDistance:function(e){return void 0===e&&(e=60),Bj(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Gj(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),Fj(e,Uj)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),Fj(e,Kj)}(i),s}function Zj(e){return Nj({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Vj,canceled:!1,memo:void 0,args:void 0},e)}function Jj(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Zj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Zj({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Zj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Zj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Zj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Xj=new Map,Yj=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=Nj({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?Qj(p[0],i[0]):d[0],m=!1===d[1]?Qj(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return Nj({},g,{_movement:p,delta:[0,0]});var v,b,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(b=_j(n,this.state),v=_j(r,this.state),l[0]=b[0],a[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(y=b)?y:_j(n,this.state),v=null!=(x=v)?x:_j(r,this.state),l[1]=b[1],a[1]=v[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=Ej(k,u),$=c?o:[0,0];return k=eE(a,Ej(k,l),$),Nj({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:eE(a,S,$),delta:Mj(k,h)})},t.clean=function(){this.clearTimeout()},Rj(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function Qj(e,t){return Math.abs(e)>=t&&Oj(e)*t}function eE(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[Aj(r,l,c,i),Aj(o,u,h,s)]}function tE(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function nE(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Nj({},t,{event:n})].concat(o))}}var rE=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=zj(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];sE(e,c[0],nE(c[1],Nj({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=iE(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;lE(o,oE(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,Hj.apply(void 0,d)])}aE(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=Hj.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=iE(t.config),n=t.config.eventOptions;e&&lE(e,oE(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){lE(n,o[i],r)}e.windowListeners={}}(t)},this.state=Jj(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function oE(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function iE(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function sE(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function aE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=zj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function lE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=zj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function cE(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(Xj.get("drag"));e.wheel&&t.add(Xj.get("wheel"));e.scroll&&t.add(Xj.get("scroll"));e.move&&t.add(Xj.get("move"));e.pinch&&t.add(Xj.get("pinch"));e.hover&&t.add(Xj.get("hover"));return t}(e),i=n.useMemo((function(){return new rE(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?dE:i.bind}function dE(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var uE=function(e){function t(){return e.apply(this,arguments)||this}Dj(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Mj(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Tj(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:Tj(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(Yj);function hE(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function pE(e){var t="buttons"in e?e.buttons:0,n=hE(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function fE(e){var t=hE(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var mE=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(lE(r.window,o[t],r.eventOptions),aE(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(Ij(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=pE(e);if(n.down){t.updateSharedState(n);var r=fE(e),o=t.getKinematics(r,e),i=tE(Ij(t),e),s=t.state._isTap,a=Tj(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(Nj({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],v=m[1],b=Nj({},tE(Ij(t),e),t.getMovement(t.state.values)),y=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=Oj(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>v&&(y[1]=Oj(i))),t.updateGestureState(Nj({},b,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Ij(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(lE(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}Dj(t,e);var n=t.prototype;return n.startDrag=function(e){var t=fE(e);this.updateSharedState(pE(e)),this.updateGestureState(Nj({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Nj({},Jj()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),tE(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(sE(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&sE(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(uE);function gE(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!gE(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!gE(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||gE(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function vE(e,t){try{return gE(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function bE(e,t){void 0===t&&(t={}),Xj.set("drag",mE);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Gj,vE)),cE({drag:e},r.current(t))}
2611
+ ***************************************************************************** */var pk,fk,mk=function(){return mk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mk.apply(this,arguments)};function gk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function vk(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function bk(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function yk(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(pk||(pk={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(fk||(fk={}));var xk=pk.Start,wk=pk.Stop,Ck=pk.Raise,kk=pk.Send,Sk=pk.Cancel,$k=pk.NullEvent,jk=pk.Assign;pk.After,pk.DoneState;var Ek=pk.Log,Mk=pk.Init,Tk=pk.Invoke;pk.ErrorExecution;var Ok,Lk=pk.ErrorPlatform,Ak=pk.ErrorCustom,Rk=pk.Update,Nk=pk.Choose,Dk=pk.Pure,Ik={},Pk="xstate.guard",zk="production"===process.env.NODE_ENV;function Vk(e,t,n){void 0===n&&(n=".");var r=_k(e,n),o=_k(t,n);return oS(o)?!!oS(r)&&o===r:oS(r)?r in o:Object.keys(r).every((function(e){return e in o&&Vk(r[e],o[e])}))}function Hk(e){try{return oS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function Bk(e,t){try{return nS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function _k(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:nS(e)?Fk(e):"string"!=typeof e?e:Fk(Bk(e,t));var n}function Fk(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function qk(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Wk(e,t,n){var r,o,i={};try{for(var s=vk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var Uk=function(e){return function(t){var n,r,o=t;try{for(var i=vk(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function Kk(e){return e?oS(e)?[[e]]:Gk(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Kk(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Gk(e){var t;return(t=[]).concat.apply(t,yk([],bk(e),!1))}function Zk(e){return nS(e)?e:[e]}function Jk(e){return void 0===e?[]:Zk(e)}function Xk(e,t,n){var r,o;if(rS(e))return e(t,n.data);var i={};try{for(var s=vk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];rS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function Yk(e){return e instanceof Promise||!(null===e||!rS(e)&&"object"!=typeof e||!rS(e.then))}function Qk(e,t){return qk(e.states,(function(e,n){if(e){var r=(oS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:Qk(e,r)}}}))}function eS(e,t,n,r){zk||tS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(rS(s))l=s(e,t.data,a);else try{for(var c=vk(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=rS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var tS=function(){};function nS(e){return Array.isArray(e)}function rS(e){return"function"==typeof e}function oS(e){return"string"==typeof e}function iS(e,t){if(e)return oS(e)?{type:Pk,name:e,predicate:t?t[e]:void 0}:rS(e)?{type:Pk,name:e.name,predicate:e}:e}zk||(tS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var sS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function aS(e){return!!e&&"__xstatenode"in e}function lS(e,t){return oS(e)||"number"==typeof e?mk({type:e},t):e}function cS(e,t){if(!oS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=lS(e);return mk({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function dS(e,t){return Zk(t).map((function(t){return void 0===t||"string"==typeof t||aS(t)?{target:t,event:e}:mk(mk({},t),{event:e})}))}function uS(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===Pk)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function hS(e){return"string"==typeof e?{type:e}:e}function pS(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function fS(e,t){return"".concat(e,":invocation[").concat(t,"]")}function mS(e){return(e.type===Ck||e.type===kk&&e.to===fk.Internal)&&"number"!=typeof e.delay}(Ok={})[sS]=function(){return this},Ok[Symbol.observable]=function(){return this};var gS=cS({type:Mk});function vS(e,t){return t&&t[e]||void 0}function bS(e,t){var n;if(oS(e)||"number"==typeof e)n=rS(r=vS(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(rS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(rS(r=vS(e.type,t)))n=mk(mk({},e),{exec:r});else if(r){var o=r.type||e.type;n=mk(mk(mk({},r),e),{type:o})}else n=e}return n}var yS=function(e,t){return e?(nS(e)?e:[e]).map((function(e){return bS(e,t)})):[]};function xS(e){var t=bS(e);return mk(mk({id:oS(e)?e:t.id},t),{type:t.type})}function wS(e,t){var n="".concat(pk.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function CS(e,t){var n="".concat(pk.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function kS(e,t){var n="".concat(pk.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function SS(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=vk(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==jk?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?eS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case Ck:var h=function(e,t,n,r){var o,i={_event:n},s=cS(rS(e.event)?e.event(t,n.data,i):e.event);if(oS(e.delay)){var a=r&&r[e.delay];o=rS(a)?a(t,n.data,i):a}else o=rS(e.delay)?e.delay(t,n.data,i):e.delay;return mk(mk({},e),{type:Ck,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case kk:var p=function(e,t,n,r){var o,i={_event:n},s=cS(rS(e.event)?e.event(t,n.data,i):e.event);if(oS(e.delay)){var a=r&&r[e.delay];o=rS(a)?a(t,n.data,i):a}else o=rS(e.delay)?e.delay(t,n.data,i):e.delay;var l=rS(e.to)?e.to(t,n.data,i):e.to;return mk(mk({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!zk){var f=a.delay;tS(!oS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==fk.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case Ek:var m=function(e,t,n){return mk(mk({},e),{value:oS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case Nk:if(!(y=null===(u=a.conds.find((function(n){var o=iS(n.cond,e.options.guards);return!o||uS(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=bk(SS(e,t,l,r,[{type:o,actions:yS(Jk(y),e.options.actions)}],i,s),2),v=g[0],b=g[1];return l=b,null==c||c.push(l),v;case Dk:var y;if(!(y=a.get(l,r.data)))return[];var x=bk(SS(e,t,l,r,[{type:o,actions:yS(Jk(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case wk:m=function(e,t,n){var r=rS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:pk.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case jk:l=eS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=bS(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=mk(mk({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,yk([c[$]],bk(t),!1))}});k=j}return k}}var h=Gk(o.map((function(e){var t,n,o=[];try{for(var s=vk(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var $S=function(e,t){return t(e)};function jS(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[sS]=function(){return this},t}function ES(e,t,n){var r=jS(t);if(r.deferred=!0,aS(e)){var o=r.state=$S(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var MS=function(e){return"atomic"===e.type||"final"===e.type};function TS(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function OS(e){return TS(e).filter((function(e){return"history"!==e.type}))}function LS(e){var t=[e];return MS(e)?t:t.concat(Gk(OS(e).map(LS)))}function AS(e,t){var n,r,o,i,s,a,l,c,d=NS(new Set(e)),u=new Set(t);try{for(var h=vk(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=NS(u);try{for(var g=vk(u),v=g.next();!v.done;v=g.next()){if("compound"!==(k=v.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var b=(s=void 0,vk(OS(k))),y=b.next();!y.done;y=b.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=vk(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function RS(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(MS(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=RS(e,t)})),o}function NS(e){var t,n,r=new Map;try{for(var o=vk(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function DS(e,t){return RS(e,NS(AS([e],t)))}function IS(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function PS(e,t){return"compound"===t.type?OS(t).some((function(t){return"final"===t.type&&IS(e,t)})):"parallel"===t.type&&OS(t).every((function(t){return PS(e,t)}))}function zS(e){return new Set(Gk(e.map((function(e){return e.tags}))))}function VS(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(oS(e)||oS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return VS(e[n],t[n])}))}var HS=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Ik,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Ik,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return yk([],bk(new Set(Gk(yk([],bk(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:gS,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=gS;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),oS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,yk([],bk(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=gk(e,["configuration","transitions","tags","machine"]);return mk(mk({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Vk(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;zk&&tS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),BS={deferEvents:!1},_S=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=mk(mk({},BS),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),FS=new Map,qS=0,WS=function(){return"x:".concat(qS++)},US=function(e,t){return FS.set(e,t),e},KS=function(e){return FS.get(e)},GS=function(e){FS.delete(e)};function ZS(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(zk||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function JS(e){if(ZS()){var t=function(){var e=ZS();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function XS(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return mk(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[sS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=pS(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var YS,QS={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(YS||(YS={}));var e$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=YS.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(nS(e))return r.batch(e),r.state;var n=cS(lS(e,t));if(r.status===YS.Stopped)return zk||tS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==YS.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===fk.Parent||r.parent.id===t),s=i?r.parent:oS(t)?t===fk.Internal?r:r.children.get(t)||KS(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==YS.Stopped||r.parent!==s||r.state.done){var a=mk(mk({},e),{name:e.name===Ak?"".concat(kS(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));zk||tS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||vS(e.type,o),s=rS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case Ck:var a=e;r.defer(a);break;case kk:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===gS):r.send(l._event);break;case Sk:r.cancel(e.sendId);break;case xk:if(r.status!==YS.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===pk.Invoke){var d=hS(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;zk||tS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(zk||tS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?Xk(p,t,n):void 0;if("string"==typeof u)return;var g=rS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var v=void 0;aS(g)&&(g=m?g.withContext(m):g,v={autoForward:f}),r.spawn(g,h,v)}else r.spawnActivity(c);break;case wk:r.stopChild(e.activity.id);break;case Ek:var b=e,y=b.label,x=b.value;y?r.logger(y,x):r.logger(x);break;default:zk||tS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=mk(mk({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new _S({deferEvents:this.options.deferEvents}),this.sessionId=WS()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:$S(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return zk||tS(this.status!==YS.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=vk(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==gS||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=vk(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=vk(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=vk(this.contextListeners),v=g.next();!v.done;v=g.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=b&&b.doneData?Xk(b.doneData,e.context,t):void 0;this._doneEvent=CS(this.id,y);try{for(var x=vk(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),GS(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===YS.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=pS(e,t,n);this.listeners.add(o.next),this.status!==YS.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===YS.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===YS.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===YS.Running)return this;this.machine._init(),US(this.sessionId,this),this.initialized=!0,this.status=YS.Running;var n=void 0===e?this.initialState:$S(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(HS.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,gS)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){rS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=vk(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=vk(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=vk(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var v=vk(this.doneListeners),b=v.next();!b.done;b=v.next()){h=b.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=YS.Stopped,this._initialState=void 0;try{for(var y=vk(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new _S({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=cS({type:"xstate.stop"}),r=$S(e,(function(){var t=Gk(yk([],bk(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return yS(t.onExit,e.machine.options.actions)}))),r=bk(SS(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new HS({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!mS(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),GS(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===YS.NotStarted&&this.options.deferEvents)zk||tS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==YS.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=cS(e);t.forward(r),i=$S(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,yk([],bk(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return mk(mk({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=vk(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,cS(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=cS(e);if(0===r.name.indexOf(Lk)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Lk)})))throw r.data.data;return $S(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=vk(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),rS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==YS.Running)return ES(e,t);if(Yk(e))return this.spawnPromise(Promise.resolve(e),t);if(rS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&rS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(aS(e))return this.spawnMachine(e,mk(mk({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,mk(mk({},this.options),{parent:this,id:n.id||t.id})),i=mk(mk({},QS),n);i.sync&&o.onTransition((function(e){r.send(Rk,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(cS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=XS(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(cS(CS(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=kS(t,e);try{o.send(cS(n,{origin:t}))}catch(r){!function(e,t,n){if(!zk){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=pS(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[sS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(cS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(kS(t,e))}if(Yk(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=pS(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,rS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[sS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(cS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(cS(kS(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(cS(CS(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[sS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else zk||tS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[sS]=function(){return this},n))},e.prototype.attachDev=function(){var e=ZS();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(mk(mk({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:mk({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}JS(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===YS.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=t$,e}();function t$(e,t){return new e$(e,t)}function n$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function r$(e){return mk(mk({type:Tk},e),{toJSON:function(){e.onDone,e.onError;var t=gk(e,["onDone","onError"]);return mk(mk({},t),{type:Tk,src:n$(e.src)})}})}var o$="",i$="*",s$={},a$=function(e){return"#"===e[0]},l$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||yk([this.machine.key],bk(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,zk||tS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?qk(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,mk(((r={})[o.id]=o,r),o.idMap)),o})):s$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=vk(TS(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===o$})):o$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=Jk(this.config.entry||this.config.onEntry).map((function(e){return bS(e)})),this.onExit=Jk(this.config.exit||this.config.onExit).map((function(e){return bS(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Jk(this.config.invoke).map((function(e,t){var n,r;if(aS(e)){var o=fS(s.id,t);return s.machine.options.services=mk(((n={})[o]=e,n),s.machine.options.services),r$({src:o,id:o})}if(oS(e.src)){o=e.id||fS(s.id,t);return r$(mk(mk({},e),{id:o,src:e.src}))}if(aS(e.src)||rS(e.src)){o=e.id||fS(s.id,t);return s.machine.options.services=mk(((r={})[o]=e.src,r),s.machine.options.services),r$(mk(mk({id:o},e),{src:o}))}var i=e.src;return r$(mk(mk({id:fS(s.id,t)},e),{src:i}))})),this.activities=Jk(this.config.activities).concat(this.invoke).map((function(e){return xS(e)})),this.transition=this.transition.bind(this),this.tags=Jk(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||LS(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:mk(mk({},o),t.actions),activities:mk(mk({},i),t.activities),guards:mk(mk({},s),t.guards),services:mk(mk({},a),t.services),delays:mk(mk({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return rS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:qk(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===o$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===i$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(pk.After,"(").concat(e,")").concat(n)}(rS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:kk,event:rS(e)?e:lS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:rS(e)?e.name:Hk(e)}}(r,{delay:t})),e.onExit.push({type:Sk,sendId:r}),r},r=nS(t)?t.map((function(e,t){var r=n(e.delay,t);return mk(mk({},e),{event:r})})):Gk(Object.keys(t).map((function(e,r){var o=t[e],i=oS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return Jk(i).map((function(e){return mk(mk({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return mk(mk({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof HS?e.value:_k(e,this.delimiter);if(oS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,yk([],bk(Gk(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=Hk(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof HS?e:HS.create(e),n=Array.from(AS([],this.getStateNodes(t.value)));return new HS(mk(mk({},t),{value:this.resolve(t.value),configuration:n,done:PS(n,this),tags:zS(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=vk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=Gk(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=Gk(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:Gk(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:Gk(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return oS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,cS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=vk(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(oS(p)&&a$(p)?e.matches(_k(this.getStateNodeById(p).path,this.delimiter)):Vk(_k(p,this.delimiter),Uk(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||uS(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,yk([],bk(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var v=Gk(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Gk(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?AS([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=vk(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!IS(h,b=m.value)||IS(n.exitSet,b)||b.parent&&p.has(b.parent))&&p.add(b)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=vk(h),v=g.next();!v.done;v=g.next()){var b;IS(e,b=v.value)&&!IS(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=Gk(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(wS(e.id,e.doneData),wS(i.id,e.doneData?Xk(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&OS(s).every((function(e){return PS(n.configuration,e)}))&&t.push(wS(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=xS(e);return{type:pk.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:yS(s?yk(yk([],bk(t),!1),bk(n),!1):yk(yk([],bk(n),!1),bk(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:Ck,event:"function"==typeof e?e:lS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:yS(yk(yk([],bk(e.onExit),!1),bk(e.activities.map((function(e){return function(e){var t=rS(e)?e:xS(e);return{type:pk.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:yS(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=yS(Gk(yk([],bk(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!mS(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=cS(t);if(e instanceof HS)o=void 0===n?e:this.resolveState(HS.from(e,n));else{var a=oS(e)?this.resolve(Fk(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(HS.from(a,l))}if(!zk&&s.name===i$)throw new Error("An event cannot have the wildcard type ('".concat(i$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=AS([],this.getStateNodes(o.value)),u=c.configuration.length?AS(d,c.configuration):d;return c.configuration=yk([],bk(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,yk([],bk(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=gS);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=PS(h,this),f=u?DS(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),v=t?mk({},t.activities):{};try{for(var b=vk(g),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,vk(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===xk?v[k.activity.id||k.activity.type]=k:k.type===wk&&(v[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}var S,$,j=bk(SS(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),E=j[0],M=j[1],T=bk(function(e,t){var n,r,o=bk([[],[]],2),i=o[0],s=o[1];try{for(var a=vk(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(E,mS),2),O=T[0],L=T[1],A=E.filter((function(e){var t;return e.type===xk&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Tk})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=hS(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?Xk(e.data,n,r):void 0,l=s?ES(s,e.id,a):jS(e.id);return l.meta=e,l}(t.activity,c.machine,M,o),e}),t?mk({},t.children):{}),N=new HS({value:f||t.value,context:M,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:Qk(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?v:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:zS(h),machine:this}),D=n!==M;N.changed=o.name===Rk||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==o$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:$k},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var H=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!VS(z.value,I.value):void 0);return z.changed=H,z.history=I,z},e.prototype.getStateNode=function(e){if(a$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=a$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&a$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Bk(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||s$;switch(this.type){case"parallel":return qk(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):s$}));case"compound":if(oS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?qk(e,(function(e,t){return e?n.getStateNode(t).resolve(e):s$})):this.initialStateValue||{};default:return e||s$}},e.prototype.getResolvedPath=function(e){if(a$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return Bk(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=Wk(this.states,(function(e){return e.initialStateValue||s$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=MS(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=oS(t.target)&&a$(t.target)?Fk(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return MS(this)?[this]:"compound"!==this.type||this.initial?Gk(Kk(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(zk||tS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=bk(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Wk(this.states,(function(t,n){if(!e)return t.historyValue();var r=oS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Gk(Kk(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=vk(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return oS(s)?[n.getStateNode(s)]:Gk(Kk(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Gk(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=vk(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,vk(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!oS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Jk(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return oS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=mk(mk({},e),{actions:yS(Jk(e.actions)),cond:iS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return mk(mk({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=i$,s=o[i],a=void 0===s?[]:s,l=gk(o,["*"]);n=Gk(Object.keys(l).map((function(e){zk||e!==o$||tS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=dS(e,l[e]);return zk||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(oS(e.target)||aS(e.target))})),o=t===o$?"the transient event":"event '".concat(t,"'");tS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(dS(i$,a)))}else n=[];var c=this.config.always?dS("",this.config.always):[],d=this.config.onDone?dS(String(wS(this.id)),this.config.onDone):[];zk||tS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Gk(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,yk([],bk(dS(String(CS(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,yk([],bk(dS(String(kS(e.id)),e.onError)),!1)),t}))),h=this.after,p=Gk(yk(yk(yk(yk([],bk(d),!1),bk(u),!1),bk(n),!1),bk(c),!1).map((function(e){return Jk(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=vk(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var c$,d$=function(e){return{type:jk,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(c$||(c$={}));var u$="undefined"!=typeof document?n.useLayoutEffect:function(){};function h$(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var p$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},f$=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var m$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},g$=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function v$(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function b$(e){var t=n.useRef([]),r=n.useRef([]);u$((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=m$(function(e,t){var n,r,o=p$([[],[]],2),i=o[0],s=o[1];try{for(var a=f$(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===c$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,g$([],m$(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,g$([],m$(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),u$((function(){for(;r.current.length;){var e=m$(r.current.shift(),2);v$(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=m$(t.current.shift(),2);v$(e[0],e[1])}}))}var y$=function(){return y$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},y$.apply(this,arguments)},x$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},w$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var C$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function k$(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=h$((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=w$(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=x$(t,["context","guards","actions","activities","services","delays","state"]),f=h$((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return t$(o.withConfig(e,(function(){return y$(y$({},o.context),s)})),y$({deferEvents:!0},p))}));return u$((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),u$((function(){return f.start(h?HS.create(h):void 0),function(){f.stop()}}),[]),u$((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),b$(f),f}(e,t,r),i=C$(n.useState((function(){var e=o.machine.initialState;return t.state?HS.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function S$(){return S$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S$.apply(null,arguments)}function $$(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const j$={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(j$.str(e)||j$.num(e))return e===t;if(j$.obj(e)&&j$.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!j$.und(n)||e===t}};function E$(e,t){return j$.und(e)||j$.nul(e)?t:e}function M$(e){return j$.und(e)?[]:j$.arr(e)?e:[e]}function T$(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return j$.fun(e)?e(...n):e}function O$(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,$$(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(j$.und(t))return S$({to:t},e);const n=Object.keys(e).reduce(((n,r)=>j$.und(t[r])?S$({},n,{[r]:e[r]}):n),{});return S$({to:t},n)}class L${constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class A$ extends L${constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof L$&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof L$&&e.removeChild(this)))}}class R$ extends L${constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof L$&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof L$&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof L$)&&(t[n]=r instanceof L$?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let N$,D$;let I$,P$=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let z$,V$=()=>Date.now();class H$ extends R${constructor(e,t){super(),this.update=void 0,this.payload=e.style?S$({},e,{style:z$(e.style)}):e,this.update=t,this.attach()}}let B$=!1;const _$=new Set,F$=()=>{if(!B$)return!1;let e=V$();for(let t of _$){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof L$,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(_$.delete(t),t.stop(!0))}return _$.size?P$(F$):B$=!1,B$};function q$(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return q$({range:e,output:t,extrapolate:n});if(I$&&"string"==typeof e.output[0])return I$(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class W$ extends A${constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof A$&&!(e instanceof W$)?e.getPayload():Array.isArray(e)?e:[e],this.calc=q$(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=q$(e,t,n)}interpolate(e,t,n){return new W$(this,e,t,n)}}const U$=(e,t,n)=>e&&new W$(e,t,n);function K$(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>K$(e,t)))}class G$ extends L${constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&K$(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new W$(this,e,t,n)}}class Z$ extends A${constructor(e){super(),this.payload=e.map((e=>new G$(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new W$(this,e,t)}}let J$=0,X$=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=J$++}update(e){if(!e)return this;const t=O$(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=$$(t,["delay","to"]);if(j$.arr(o)||j$.fun(o))this.queue.push(S$({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=S$({to:{[n]:o},delay:T$(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=S$({},e[s.delay],s,{to:S$({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;j$.obj(n)&&(this.merged=S$({},n,this.merged)),j$.obj(o)&&(this.merged=S$({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=$$(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=j$.arr(s.to)||j$.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else j$.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,_$.has(t)||_$.add(t),B$||(B$=!0,P$(F$));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,_$.has(t)&&_$.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=$$(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(j$.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=S$({},r,O$(r.to[t]));j$.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(j$.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=S$({},r,O$(n));if(j$.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=S$({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=S$({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=j$.num(o),l=j$.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!D$[o],c=j$.arr(o),h=!s&&!c&&!l;let f=j$.und(r[n])?o:r[n],m=s||c||l?o:1,g=T$(a,n);p&&(m=p.animations[n].parent);let v,b=i.parent,y=i.interpolation,x=M$(p?m.getPayload():m),w=o;h&&(w=I$({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!j$.und(b)&&i.animatedValues.some((e=>!e.done)),S=!j$.equ(w,C),$=!j$.equ(w,i.previous),j=!j$.equ(g,i.config);if(d||$&&S||j){if(s||l)b=y=i.parent||new G$(f);else if(c)b=y=i.parent||new Z$(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(b=i.parent,b.setValue(0,!1)):b=new G$(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=b.interpolate(t)}return x=M$(p?m.getPayload():m),v=M$(b.getPayload()),d&&!h&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=V$(),e.done=!1,e.animatedStyles.clear()})),T$(u,n)&&b.setValue(h?m:o,!1),S$({},e,{[n]:S$({},i,{name:n,parent:b,interpolation:y,animatedValues:v,toValues:x,previous:w,config:g,fromValues:M$(b.getValue()),immediate:T$(u,n),initialVelocity:E$(g.velocity,0),clamp:E$(g.clamp,!1),precision:E$(g.precision,.01),tension:E$(g.tension,170),friction:E$(g.friction,26),mass:E$(g.mass,1),duration:g.duration,easing:E$(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(b.setValue(1,!1),y.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,S$({},e,{[n]:S$({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Y$=e=>{const t=j$.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=j$.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new X$,s=i?T$(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?T$(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class Q$ extends R${constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof L$||(e=N$.transform(e)),this.payload=e}}const ej={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},tj="[-+]?\\d*\\.?\\d+",nj=tj+"%";function rj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const oj=new RegExp("rgb"+rj(tj,tj,tj)),ij=new RegExp("rgba"+rj(tj,tj,tj,tj)),sj=new RegExp("hsl"+rj(tj,nj,nj)),aj=new RegExp("hsla"+rj(tj,nj,nj,tj)),lj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dj=/^#([0-9a-fA-F]{6})$/,uj=/^#([0-9a-fA-F]{8})$/;function hj(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pj(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=hj(o,r,e+1/3),s=hj(o,r,e),a=hj(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function fj(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function mj(e){return(parseFloat(e)%360+360)%360/360}function gj(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function vj(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function bj(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=dj.exec(e))?parseInt(t[1]+"ff",16)>>>0:ej.hasOwnProperty(e)?ej[e]:(t=oj.exec(e))?(fj(t[1])<<24|fj(t[2])<<16|fj(t[3])<<8|255)>>>0:(t=ij.exec(e))?(fj(t[1])<<24|fj(t[2])<<16|fj(t[3])<<8|gj(t[4]))>>>0:(t=lj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=uj.exec(e))?parseInt(t[1],16)>>>0:(t=cj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=sj.exec(e))?(255|pj(mj(t[1]),vj(t[2]),vj(t[3])))>>>0:(t=aj.exec(e))?(pj(mj(t[1]),vj(t[2]),vj(t[3]))|gj(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const yj=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,xj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,wj=new RegExp(`(${Object.keys(ej).join("|")})`,"g");let Cj={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const kj=["Webkit","Ms","Moz","O"];function Sj(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Cj.hasOwnProperty(e)&&Cj[e]?(""+t).trim():t+"px"}Cj=Object.keys(Cj).reduce(((e,t)=>(kj.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Cj);const $j={};var jj,Ej;jj=e=>new Q$(e),z$=jj,Ej=e=>{const t=e.output.map((e=>e.replace(xj,bj))).map((e=>e.replace(wj,bj))),n=t[0].match(yj).map((()=>[]));t.forEach((e=>{e.match(yj).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(yj).map(((t,r)=>q$(S$({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(yj,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},I$=Ej,D$=ej,function(e,t){N$={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=$$(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=Sj(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:$j[t]||($j[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Mj;const Tj=(Mj=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new H$(e,(()=>{let e=!1;a.current&&(e=N$.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=$$(c,["scrollTop","scrollLeft"]),u=(h=e,!j$.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(j$.fun(t)?t(e):j$.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,S$({},d,{ref:u}))})),e=>(j$.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Mj(n),e}),Mj))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function Oj(e,t){return e.map((function(e,n){return e+t[n]}))}function Lj(e,t){return e.map((function(e,n){return e-t[n]}))}function Aj(e){return Math.hypot.apply(Math,e)}function Rj(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Nj(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function Dj(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Nj(t-e,n-t,r)+t:e>n?+Nj(e-n,n-t,r)+n:e}function Ij(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Pj(){return Pj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pj.apply(this,arguments)}function zj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Vj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bj(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Hj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hj(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _j(){}function Fj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?_j:1===t.length?t[0]:function(){for(var e,n,r=Bj(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function qj(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Wj(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Uj(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=Uj(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var Kj=Pj({},{threshold:function(e){return void 0===e&&(e=0),qj(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return qj(.15);case!1:return qj(0);default:return qj(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:qj(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Kj.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),Gj="undefined"!=typeof window&&window.document&&window.document.createElement,Zj={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Gj?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},Jj=Pj({},Kj,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=qj(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),qj(e)},swipeDistance:function(e){return void 0===e&&(e=60),qj(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Xj(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),Uj(e,Zj)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),Uj(e,Jj)}(i),s}function Yj(e){return Pj({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:_j,canceled:!1,memo:void 0,args:void 0},e)}function Qj(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Yj({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Yj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var eE=new Map,tE=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=Pj({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?nE(p[0],i[0]):d[0],m=!1===d[1]?nE(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return Pj({},g,{_movement:p,delta:[0,0]});var v,b,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(b=Wj(n,this.state),v=Wj(r,this.state),l[0]=b[0],a[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(y=b)?y:Wj(n,this.state),v=null!=(x=v)?x:Wj(r,this.state),l[1]=b[1],a[1]=v[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=Oj(k,u),$=c?o:[0,0];return k=rE(a,Oj(k,l),$),Pj({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:rE(a,S,$),delta:Lj(k,h)})},t.clean=function(){this.clearTimeout()},Ij(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function nE(e,t){return Math.abs(e)>=t&&Rj(e)*t}function rE(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[Dj(r,l,c,i),Dj(o,u,h,s)]}function oE(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function iE(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Pj({},t,{event:n})].concat(o))}}var sE=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=Bj(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];cE(e,c[0],iE(c[1],Pj({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=lE(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;uE(o,aE(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,Fj.apply(void 0,d)])}dE(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=Fj.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=lE(t.config),n=t.config.eventOptions;e&&uE(e,aE(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){uE(n,o[i],r)}e.windowListeners={}}(t)},this.state=Qj(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function aE(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function lE(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function cE(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function dE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Bj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function uE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Bj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function hE(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(eE.get("drag"));e.wheel&&t.add(eE.get("wheel"));e.scroll&&t.add(eE.get("scroll"));e.move&&t.add(eE.get("move"));e.pinch&&t.add(eE.get("pinch"));e.hover&&t.add(eE.get("hover"));return t}(e),i=n.useMemo((function(){return new sE(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?pE:i.bind}function pE(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var fE=function(e){function t(){return e.apply(this,arguments)||this}zj(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Lj(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Aj(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:Aj(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(tE);function mE(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function gE(e){var t="buttons"in e?e.buttons:0,n=mE(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function vE(e){var t=mE(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var bE=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(uE(r.window,o[t],r.eventOptions),dE(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(Vj(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=gE(e);if(n.down){t.updateSharedState(n);var r=vE(e),o=t.getKinematics(r,e),i=oE(Vj(t),e),s=t.state._isTap,a=Aj(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(Pj({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],v=m[1],b=Pj({},oE(Vj(t),e),t.getMovement(t.state.values)),y=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=Rj(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>v&&(y[1]=Rj(i))),t.updateGestureState(Pj({},b,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Vj(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(uE(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}zj(t,e);var n=t.prototype;return n.startDrag=function(e){var t=vE(e);this.updateSharedState(gE(e)),this.updateGestureState(Pj({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Pj({},Qj()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),oE(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(cE(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&cE(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(fE);function yE(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!yE(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!yE(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||yE(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function xE(e,t){try{return yE(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function wE(e,t){void 0===t&&(t={}),eE.set("drag",bE);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Xj,xE)),hE({drag:e},r.current(t))}
2612
2612
  /*!
2613
2613
  * tabbable 5.3.3
2614
2614
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
2615
- */var yE=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],xE=yE.join(","),wE="undefined"==typeof Element,CE=wE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,kE=!wE&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},SE=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(xE));return t&&CE.call(e,xE)&&r.unshift(e),r=r.filter(n)},$E=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{CE.call(s,xE)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},jE=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},EE=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ME=function(e){return"INPUT"===e.tagName},TE=function(e){return function(e){return ME(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||kE(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},OE=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},LE=function(e,t){return!(t.disabled||function(e){return ME(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=CE.call(e,"details>summary:first-of-type")?e.parentElement:e;if(CE.call(o,"details:not([open]) *"))return!0;var i=kE(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return OE(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=kE(e);if(l&&!l.shadowRoot&&!0===r(l))return OE(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!CE.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},AE=function(e,t){return!(TE(t)||jE(t)<0||!LE(e,t))},RE=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},NE=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=jE(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(EE).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},DE=function(e,t){var n;return n=(t=t||{}).getShadowRoot?$E([e],t.includeContainer,{filter:AE.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:RE}):SE(e,t.includeContainer,AE.bind(null,t)),NE(n)},IE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==CE.call(e,xE)&&AE(t,e)},PE=yE.concat("iframe").join(","),zE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==CE.call(e,PE)&&LE(t,e)};
2615
+ */var CE=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],kE=CE.join(","),SE="undefined"==typeof Element,$E=SE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jE=!SE&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},EE=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(kE));return t&&$E.call(e,kE)&&r.unshift(e),r=r.filter(n)},ME=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{$E.call(s,kE)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},TE=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},OE=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},LE=function(e){return"INPUT"===e.tagName},AE=function(e){return function(e){return LE(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||jE(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},RE=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},NE=function(e,t){return!(t.disabled||function(e){return LE(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$E.call(e,"details>summary:first-of-type")?e.parentElement:e;if($E.call(o,"details:not([open]) *"))return!0;var i=jE(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return RE(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=jE(e);if(l&&!l.shadowRoot&&!0===r(l))return RE(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!$E.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},DE=function(e,t){return!(AE(t)||TE(t)<0||!NE(e,t))},IE=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},PE=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=TE(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(OE).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},zE=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ME([e],t.includeContainer,{filter:DE.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:IE}):EE(e,t.includeContainer,DE.bind(null,t)),PE(n)},VE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$E.call(e,kE)&&DE(t,e)},HE=CE.concat("iframe").join(","),BE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$E.call(e,HE)&&NE(t,e)};
2616
2616
  /*!
2617
2617
  * focus-trap 6.9.4
2618
2618
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
2619
2619
  */
2620
- function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VE(Object(n),!0).forEach((function(t){BE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _E,FE=(_E=[],{activateTrap:function(e){if(_E.length>0){var t=_E[_E.length-1];t!==e&&t.pause()}var n=_E.indexOf(e);-1===n||_E.splice(n,1),_E.push(e)},deactivateTrap:function(e){var t=_E.indexOf(e);-1!==t&&_E.splice(t,1),_E.length>0&&_E[_E.length-1].unpause()}}),qE=function(e){return setTimeout(e,0)},WE=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},UE=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},KE=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},GE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=HE({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=DE(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?$E([t],n.includeContainer,{filter:LE.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):SE(t,n.includeContainer,LE.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return IE(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return IE(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=KE(e);a(t)>=0||(UE(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!zE(t,o.tabbableOptions)}):UE(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=KE(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==UE(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=KE(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=WE(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||zE(t,o.tabbableOptions)&&!IE(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=WE(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||zE(t,o.tabbableOptions)&&!IE(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=KE(e);a(t)>=0||UE(o.clickOutsideDeactivates,e)||UE(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return FE.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?qE((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=HE({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,FE.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){qE((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,b()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var ZE=!1;if("undefined"!=typeof window){var JE={get passive(){ZE=!0}};window.addEventListener("testPassive",null,JE),window.removeEventListener("testPassive",null,JE)}var XE,YE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),QE=[],eM=!1,tM=-1,nM=void 0,rM=void 0,oM=function(e){return QE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},iM=function(e){var t=e||window.event;return!!oM(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},sM=function(e,t){if(e){if(!QE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};QE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(QE),[n]),YE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(tM=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-tM;!oM(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?iM(e):e.stopPropagation())}(t,e)},eM||(document.addEventListener("touchmove",iM,ZE?{passive:!1}:void 0),eM=!0)):function(e){if(void 0===rM){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(rM=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===nM&&(nM=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},aM=function(e){e?(QE=QE.filter((function(t){return t.targetElement!==e})),YE?(e.ontouchstart=null,e.ontouchmove=null,eM&&0===QE.length&&(document.removeEventListener("touchmove",iM,ZE?{passive:!1}:void 0),eM=!1)):QE.length||(void 0!==rM&&(document.body.style.paddingRight=rM,rM=void 0),void 0!==nM&&(document.body.style.overflow=nM,nM=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},lM=[],cM="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(XE||(XE={}));var dM,uM=function(e){return Object.freeze(e)},hM=function(e,t){this.inlineSize=e,this.blockSize=t,uM(this)},pM=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,uM(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),fM=function(e){return e instanceof SVGElement&&"getBBox"in e},mM=function(e){if(fM(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},gM=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},vM="undefined"!=typeof window?window:{},bM=new WeakMap,yM=/auto|scroll/,xM=/^tb|vertical/,wM=/msie|trident/i.test(vM.navigator&&vM.navigator.userAgent),CM=function(e){return parseFloat(e||"0")},kM=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new hM((n?t:e)||0,(n?e:t)||0)},SM=uM({devicePixelContentBoxSize:kM(),borderBoxSize:kM(),contentBoxSize:kM(),contentRect:new pM(0,0,0,0)}),$M=function(e,t){if(void 0===t&&(t=!1),bM.has(e)&&!t)return bM.get(e);if(mM(e))return bM.set(e,SM),SM;var n=getComputedStyle(e),r=fM(e)&&e.ownerSVGElement&&e.getBBox(),o=!wM&&"border-box"===n.boxSizing,i=xM.test(n.writingMode||""),s=!r&&yM.test(n.overflowY||""),a=!r&&yM.test(n.overflowX||""),l=r?0:CM(n.paddingTop),c=r?0:CM(n.paddingRight),d=r?0:CM(n.paddingBottom),u=r?0:CM(n.paddingLeft),h=r?0:CM(n.borderTopWidth),p=r?0:CM(n.borderRightWidth),f=r?0:CM(n.borderBottomWidth),m=u+c,g=l+d,v=(r?0:CM(n.borderLeftWidth))+p,b=h+f,y=a?e.offsetHeight-b-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,w=o?m+v:0,C=o?g+b:0,k=r?r.width:CM(n.width)-w-x,S=r?r.height:CM(n.height)-C-y,$=k+m+x+v,j=S+g+y+b,E=uM({devicePixelContentBoxSize:kM(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:kM($,j,i),contentBoxSize:kM(k,S,i),contentRect:new pM(u,l,k,S)});return bM.set(e,E),E},jM=function(e,t,n){var r=$M(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case XE.DEVICE_PIXEL_CONTENT_BOX:return s;case XE.BORDER_BOX:return o;default:return i}},EM=function(e){var t=$M(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=uM([t.borderBoxSize]),this.contentBoxSize=uM([t.contentBoxSize]),this.devicePixelContentBoxSize=uM([t.devicePixelContentBoxSize])},MM=function(e){if(mM(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},TM=function(){var e=1/0,t=[];lM.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new EM(t.target),o=MM(t.target);r.push(n),t.lastReportedSize=jM(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},OM=function(e){lM.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(MM(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},LM=function(){var e=0;for(OM(e);lM.some((function(e){return e.activeTargets.length>0}));)e=TM(),OM(e);return lM.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:cM}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=cM),window.dispatchEvent(e)}(),e>0},AM=[],RM=function(e){if(!dM){var t=0,n=document.createTextNode("");new MutationObserver((function(){return AM.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),dM=function(){n.textContent="".concat(t?t--:t++)}}AM.push(e),dM()},NM=0,DM={attributes:!0,characterData:!0,childList:!0,subtree:!0},IM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],PM=function(e){return void 0===e&&(e=0),Date.now()+e},zM=!1,VM=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!zM){zM=!0;var n,r=PM(e);n=function(){var n=!1;try{n=LM()}finally{if(zM=!1,e=r-PM(),!NM)return;n?t.run(1e3):e>0?t.run(e):t.start()}},RM((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,DM)};document.body?t():vM.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),IM.forEach((function(t){return vM.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),IM.forEach((function(t){return vM.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),HM=function(e){!NM&&e>0&&VM.start(),!(NM+=e)&&VM.stop()},BM=function(){function e(e,t){this.target=e,this.observedBox=t||XE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=jM(this.target,this.observedBox,!0);return function(e){return!fM(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),_M=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},FM=new WeakMap,qM=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},WM=function(){function e(){}return e.connect=function(e,t){var n=new _M(e,t);FM.set(e,n)},e.observe=function(e,t,n){var r=FM.get(e),o=0===r.observationTargets.length;qM(r.observationTargets,t)<0&&(o&&lM.push(r),r.observationTargets.push(new BM(t,n&&n.box)),HM(1),VM.schedule())},e.unobserve=function(e,t){var n=FM.get(e),r=qM(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&lM.splice(lM.indexOf(n),1),n.observationTargets.splice(r,1),HM(-1))},e.disconnect=function(e){var t=this,n=FM.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),UM=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");WM.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!gM(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");WM.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!gM(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");WM.unobserve(this,e)},e.prototype.disconnect=function(){WM.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function KM(){return KM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KM.apply(this,arguments)}function GM(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var ZM="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function JM(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function XM(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var YM={box:"border-box"};function QM(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return ZM((function(){if(e.current&&o){var t=new UM(c);return t.observe(e.current,YM),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function eT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var tT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},nT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},rT=function(e,t,n){return void 0===n&&(n=e.context),new i$(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:KM({},tT,nT)}}},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:KM({},tT,nT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:KM({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[a$({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(eT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),oT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],iT=["velocity"],sT=["onRest","config"],aT={tension:170,friction:26},lT=aT.tension,cT=aT.friction,dT=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?hT:f,g=e.snapPoints,v=void 0===g?pT:g,b=e.blocking,y=void 0===b||b,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,E=void 0===j?y:j,M=e.expandOnContentDrag,T=void 0!==M&&M,O=GM(e,oT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return KM({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return KM({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,H=Z$((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=H[0],_=H[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,sM(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,aM(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=GE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return XM(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),ZM((function(){if(e)return a(XM(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=QM(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=QM(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=QM(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(XM).reduce((function(e,n){return e.add(JM(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=XM("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:v,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);ZM((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=GM(n,iT),s=GM(e,sT);return new Promise((function(e){return _(KM({},s,{config:KM({velocity:o},i,{mass:1,tension:lT,friction:Math.max(cT,cT+(cT-cT*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=x$(rT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),ZM((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=bE((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?B.y.getValue():p,m=e.tap,g=e.velocity,v=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var b=f+v,y=v*g,x=Math.max(le.current,Math.min(ce.current,b+2*y));if(!c&&h&&l>0&&b+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?Aj(b,h?0:le.current,ce.current,.55):b<le.current?Aj(b,le.current,2*ce.current,.55):Aj(b,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=F$([n.y,n.maxHeight],(function(e,t){return Math.round(JM(t-e,0,16))+"px"})),o=F$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return JM(e,t,n)+"px"})),i=F$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=F$([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=F$([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return JM((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=F$([n.y,n.minSnap],(function(e,t){return t?JM(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:B});return n.createElement(jj.div,KM({},O,{"data-rsbs-root":!0,"data-rsbs-state":uT.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:KM({},ve,C,{opacity:B.ready})}),o,y&&n.createElement("div",KM({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",KM({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",KM({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",KM({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),uT=["closed","opening","open","closing","dragging","snapping","resizing"];function hT(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function pT(e){return e.minHeight}var fT=["onSpringStart","onSpringEnd","skipInitialTransition"],mT=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=GM(e,fT),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");ZM((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(ck,{"data-rsbs-portal":!0},n.createElement(dT,KM({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const gT=i.css`
2620
+ function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_E(Object(n),!0).forEach((function(t){qE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var WE,UE=(WE=[],{activateTrap:function(e){if(WE.length>0){var t=WE[WE.length-1];t!==e&&t.pause()}var n=WE.indexOf(e);-1===n||WE.splice(n,1),WE.push(e)},deactivateTrap:function(e){var t=WE.indexOf(e);-1!==t&&WE.splice(t,1),WE.length>0&&WE[WE.length-1].unpause()}}),KE=function(e){return setTimeout(e,0)},GE=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},ZE=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},JE=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},XE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=FE({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=zE(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?ME([t],n.includeContainer,{filter:NE.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):EE(t,n.includeContainer,NE.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return VE(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return VE(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=JE(e);a(t)>=0||(ZE(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!BE(t,o.tabbableOptions)}):ZE(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=JE(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==ZE(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=JE(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=GE(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||BE(t,o.tabbableOptions)&&!VE(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=GE(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||BE(t,o.tabbableOptions)&&!VE(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=JE(e);a(t)>=0||ZE(o.clickOutsideDeactivates,e)||ZE(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return UE.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?KE((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=FE({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,UE.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){KE((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,b()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var YE=!1;if("undefined"!=typeof window){var QE={get passive(){YE=!0}};window.addEventListener("testPassive",null,QE),window.removeEventListener("testPassive",null,QE)}var eM,tM="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),nM=[],rM=!1,oM=-1,iM=void 0,sM=void 0,aM=function(e){return nM.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},lM=function(e){var t=e||window.event;return!!aM(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},cM=function(e,t){if(e){if(!nM.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};nM=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(nM),[n]),tM?(e.ontouchstart=function(e){1===e.targetTouches.length&&(oM=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-oM;!aM(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?lM(e):e.stopPropagation())}(t,e)},rM||(document.addEventListener("touchmove",lM,YE?{passive:!1}:void 0),rM=!0)):function(e){if(void 0===sM){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(sM=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===iM&&(iM=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},dM=function(e){e?(nM=nM.filter((function(t){return t.targetElement!==e})),tM?(e.ontouchstart=null,e.ontouchmove=null,rM&&0===nM.length&&(document.removeEventListener("touchmove",lM,YE?{passive:!1}:void 0),rM=!1)):nM.length||(void 0!==sM&&(document.body.style.paddingRight=sM,sM=void 0),void 0!==iM&&(document.body.style.overflow=iM,iM=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},uM=[],hM="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(eM||(eM={}));var pM,fM=function(e){return Object.freeze(e)},mM=function(e,t){this.inlineSize=e,this.blockSize=t,fM(this)},gM=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,fM(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),vM=function(e){return e instanceof SVGElement&&"getBBox"in e},bM=function(e){if(vM(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},yM=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},xM="undefined"!=typeof window?window:{},wM=new WeakMap,CM=/auto|scroll/,kM=/^tb|vertical/,SM=/msie|trident/i.test(xM.navigator&&xM.navigator.userAgent),$M=function(e){return parseFloat(e||"0")},jM=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new mM((n?t:e)||0,(n?e:t)||0)},EM=fM({devicePixelContentBoxSize:jM(),borderBoxSize:jM(),contentBoxSize:jM(),contentRect:new gM(0,0,0,0)}),MM=function(e,t){if(void 0===t&&(t=!1),wM.has(e)&&!t)return wM.get(e);if(bM(e))return wM.set(e,EM),EM;var n=getComputedStyle(e),r=vM(e)&&e.ownerSVGElement&&e.getBBox(),o=!SM&&"border-box"===n.boxSizing,i=kM.test(n.writingMode||""),s=!r&&CM.test(n.overflowY||""),a=!r&&CM.test(n.overflowX||""),l=r?0:$M(n.paddingTop),c=r?0:$M(n.paddingRight),d=r?0:$M(n.paddingBottom),u=r?0:$M(n.paddingLeft),h=r?0:$M(n.borderTopWidth),p=r?0:$M(n.borderRightWidth),f=r?0:$M(n.borderBottomWidth),m=u+c,g=l+d,v=(r?0:$M(n.borderLeftWidth))+p,b=h+f,y=a?e.offsetHeight-b-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,w=o?m+v:0,C=o?g+b:0,k=r?r.width:$M(n.width)-w-x,S=r?r.height:$M(n.height)-C-y,$=k+m+x+v,j=S+g+y+b,E=fM({devicePixelContentBoxSize:jM(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:jM($,j,i),contentBoxSize:jM(k,S,i),contentRect:new gM(u,l,k,S)});return wM.set(e,E),E},TM=function(e,t,n){var r=MM(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case eM.DEVICE_PIXEL_CONTENT_BOX:return s;case eM.BORDER_BOX:return o;default:return i}},OM=function(e){var t=MM(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=fM([t.borderBoxSize]),this.contentBoxSize=fM([t.contentBoxSize]),this.devicePixelContentBoxSize=fM([t.devicePixelContentBoxSize])},LM=function(e){if(bM(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},AM=function(){var e=1/0,t=[];uM.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new OM(t.target),o=LM(t.target);r.push(n),t.lastReportedSize=TM(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},RM=function(e){uM.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(LM(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},NM=function(){var e=0;for(RM(e);uM.some((function(e){return e.activeTargets.length>0}));)e=AM(),RM(e);return uM.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:hM}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=hM),window.dispatchEvent(e)}(),e>0},DM=[],IM=function(e){if(!pM){var t=0,n=document.createTextNode("");new MutationObserver((function(){return DM.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),pM=function(){n.textContent="".concat(t?t--:t++)}}DM.push(e),pM()},PM=0,zM={attributes:!0,characterData:!0,childList:!0,subtree:!0},VM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],HM=function(e){return void 0===e&&(e=0),Date.now()+e},BM=!1,_M=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!BM){BM=!0;var n,r=HM(e);n=function(){var n=!1;try{n=NM()}finally{if(BM=!1,e=r-HM(),!PM)return;n?t.run(1e3):e>0?t.run(e):t.start()}},IM((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,zM)};document.body?t():xM.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),VM.forEach((function(t){return xM.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),VM.forEach((function(t){return xM.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),FM=function(e){!PM&&e>0&&_M.start(),!(PM+=e)&&_M.stop()},qM=function(){function e(e,t){this.target=e,this.observedBox=t||eM.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=TM(this.target,this.observedBox,!0);return function(e){return!vM(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),WM=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},UM=new WeakMap,KM=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},GM=function(){function e(){}return e.connect=function(e,t){var n=new WM(e,t);UM.set(e,n)},e.observe=function(e,t,n){var r=UM.get(e),o=0===r.observationTargets.length;KM(r.observationTargets,t)<0&&(o&&uM.push(r),r.observationTargets.push(new qM(t,n&&n.box)),FM(1),_M.schedule())},e.unobserve=function(e,t){var n=UM.get(e),r=KM(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&uM.splice(uM.indexOf(n),1),n.observationTargets.splice(r,1),FM(-1))},e.disconnect=function(e){var t=this,n=UM.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),ZM=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");GM.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!yM(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");GM.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!yM(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");GM.unobserve(this,e)},e.prototype.disconnect=function(){GM.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function JM(){return JM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JM.apply(this,arguments)}function XM(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var YM="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function QM(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function eT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var tT={box:"border-box"};function nT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return YM((function(){if(e.current&&o){var t=new ZM(c);return t.observe(e.current,tT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function rT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var oT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},iT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},sT=function(e,t,n){return void 0===n&&(n=e.context),new l$(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:JM({},oT,iT)}}},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:JM({},oT,iT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:JM({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[d$({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(rT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),aT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],lT=["velocity"],cT=["onRest","config"],dT={tension:170,friction:26},uT=dT.tension,hT=dT.friction,pT=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?mT:f,g=e.snapPoints,v=void 0===g?gT:g,b=e.blocking,y=void 0===b||b,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,E=void 0===j?y:j,M=e.expandOnContentDrag,T=void 0!==M&&M,O=XM(e,aT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return JM({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return JM({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,H=Y$((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),B=H[0],_=H[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,cM(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,dM(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:E}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=XE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return eT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),YM((function(){if(e)return a(eT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=nT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=nT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=nT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(eT).reduce((function(e,n){return e.add(QM(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=eT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:v,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);YM((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=XM(n,lT),s=XM(e,cT);return new Promise((function(e){return _(JM({},s,{config:JM({velocity:o},i,{mass:1,tension:uT,friction:Math.max(hT,hT+(hT-hT*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=k$(sT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),YM((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=wE((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?B.y.getValue():p,m=e.tap,g=e.velocity,v=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var b=f+v,y=v*g,x=Math.max(le.current,Math.min(ce.current,b+2*y));if(!c&&h&&l>0&&b+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?Dj(b,h?0:le.current,ce.current,.55):b<le.current?Dj(b,le.current,2*ce.current,.55):Dj(b,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=U$([n.y,n.maxHeight],(function(e,t){return Math.round(QM(t-e,0,16))+"px"})),o=U$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return QM(e,t,n)+"px"})),i=U$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=U$([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=U$([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return QM((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=U$([n.y,n.minSnap],(function(e,t){return t?QM(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:B});return n.createElement(Tj.div,JM({},O,{"data-rsbs-root":!0,"data-rsbs-state":fT.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:JM({},ve,C,{opacity:B.ready})}),o,y&&n.createElement("div",JM({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",JM({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",JM({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",JM({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),fT=["closed","opening","open","closing","dragging","snapping","resizing"];function mT(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function gT(e){return e.minHeight}var vT=["onSpringStart","onSpringEnd","skipInitialTransition"],bT=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=XM(e,vT),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");YM((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(hk,{"data-rsbs-portal":!0},n.createElement(pT,JM({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const yT=i.css`
2621
2621
  width: ${k(1e3)};
2622
2622
  border-radius: ${$(300)};
2623
2623
  background: transparent;
@@ -2631,7 +2631,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2631
2631
  margin: 0;
2632
2632
  background: ${w("neutral",300)};
2633
2633
  }
2634
- `,vT=(e,t)=>i.css`
2634
+ `,xT=(e,t)=>i.css`
2635
2635
  [data-rsbs-overlay] {
2636
2636
  border-top-left-radius: ${$(500)};
2637
2637
  border-top-right-radius: ${$(500)};
@@ -2657,7 +2657,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2657
2657
  padding: 0;
2658
2658
  min-height: ${k(1600)};
2659
2659
  }
2660
- `;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const bT=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},yT=e=>i.css`
2660
+ `;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const wT=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},CT=e=>i.css`
2661
2661
  a,
2662
2662
  p {
2663
2663
  font-size: ${C("small"===e?200:400)};
@@ -2689,19 +2689,19 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2689
2689
  a:hover {
2690
2690
  text-decoration: underline;
2691
2691
  }
2692
- `,xT=e=>i.css`
2692
+ `,kT=e=>i.css`
2693
2693
  svg {
2694
2694
  height: ${k("small"===e?200:300)};
2695
2695
  width: ${k("small"===e?200:300)};
2696
2696
  color: ${w("neutral",600)};
2697
2697
  }
2698
- `,wT=i.css`
2698
+ `,ST=i.css`
2699
2699
  cursor: pointer;
2700
2700
  color: ${w("neutral",600)};
2701
2701
  display: flex;
2702
2702
  justify-content: center;
2703
2703
  align-items: center;
2704
- `,CT=(e,t)=>i.css`
2704
+ `,$T=(e,t)=>i.css`
2705
2705
  min-height: ${k(1400)};
2706
2706
  width: 100vw;
2707
2707
  position: ${e?"sticky":"absolute"};
@@ -2711,7 +2711,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2711
2711
  border-top: ${j(100)} solid
2712
2712
  ${w("neutral",400)};
2713
2713
  z-index: 101;
2714
- `,kT=e=>i.css`
2714
+ `,jT=e=>i.css`
2715
2715
  height: 100%;
2716
2716
  width: 100%;
2717
2717
  max-width: ${null!=e?u(e):"100%"};
@@ -2726,7 +2726,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2726
2726
  flex-direction: column;
2727
2727
  align-items: flex-start;
2728
2728
  }
2729
- `,ST=i.css`
2729
+ `,ET=i.css`
2730
2730
  display: flex;
2731
2731
  align-items: center;
2732
2732
  flex-wrap: wrap;
@@ -2739,7 +2739,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2739
2739
  color: ${w("neutral",700)};
2740
2740
  text-decoration: underline;
2741
2741
  }
2742
- `,$T=i.css`
2742
+ `,MT=i.css`
2743
2743
  width: 15rem;
2744
2744
  font-size: ${C(300)};
2745
2745
  line-height: ${S(500)};
@@ -2750,17 +2750,17 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2750
2750
  @media screen and (max-width: 48rem) {
2751
2751
  text-align: left;
2752
2752
  }
2753
- `,jT=i.css`
2753
+ `,TT=i.css`
2754
2754
  display: flex;
2755
2755
  align-items: center;
2756
2756
  gap: ${k(400)};
2757
- `,ET=i.css`
2757
+ `,OT=i.css`
2758
2758
  width: 100%;
2759
2759
  display: flex;
2760
2760
  align-items: center;
2761
2761
  height: ${k(1400)};
2762
2762
  background-color: ${w("neutral",200)};
2763
- `,MT=i.css`
2763
+ `,LT=i.css`
2764
2764
  height: ${k(1400)};
2765
2765
  width: 99%;
2766
2766
  background-color: ${w("neutral",200)};
@@ -2856,9 +2856,9 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2856
2856
  opacity: 1;
2857
2857
  }
2858
2858
  }
2859
- `,TT=i.css`
2859
+ `,AT=i.css`
2860
2860
  position: relative;
2861
- `,OT=i.css`
2861
+ `,RT=i.css`
2862
2862
  position: absolute;
2863
2863
  top: -0.3125rem;
2864
2864
  right: -0.3125rem;
@@ -2873,7 +2873,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2873
2873
  display: flex;
2874
2874
  justify-content: center;
2875
2875
  align-items: center;
2876
- `,LT=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),AT=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
2876
+ `,NT=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),DT=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
2877
2877
  max-height: ${s};
2878
2878
  width: 100%;
2879
2879
  background-color: ${n??w("neutral","dark"===r?800:100)};
@@ -2883,7 +2883,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2883
2883
  z-index: 102;
2884
2884
  border-bottom: ${j(100)} solid
2885
2885
  ${w("neutral",400)};
2886
- `},RT=(e,t)=>i.css`
2886
+ `},IT=(e,t)=>i.css`
2887
2887
  height: ${k(t?700:1200)};
2888
2888
  width: 100%;
2889
2889
  background-color: ${w("neutral","dark"===e?800:100)};
@@ -2894,7 +2894,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2894
2894
  justify-content: flex-start;
2895
2895
  gap: 0;
2896
2896
  padding: ${t?0:`${k(200)} ${k(400)}`};
2897
- `,NT=(e,t,n)=>i.css`
2897
+ `,PT=(e,t,n)=>i.css`
2898
2898
  height: ${k(n?700:1200)};
2899
2899
  width: 100%;
2900
2900
  max-width: ${t?u(t):"100%"};
@@ -2905,13 +2905,13 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2905
2905
  justify-content: space-between;
2906
2906
  margin: 0 auto;
2907
2907
  padding: ${n?0:`${k(200)} ${k(400)}`};
2908
- `,DT=(e,t)=>i.css`
2908
+ `,zT=(e,t)=>i.css`
2909
2909
  display: flex;
2910
2910
  margin: ${t?"-0.0625rem":"0rem"};
2911
2911
  justify-content: flex-start;
2912
2912
  gap: ${k(300)};
2913
2913
  color: ${w("neutral",e?100:900)};
2914
- `,IT=i.css`
2914
+ `,VT=i.css`
2915
2915
  outline: none;
2916
2916
 
2917
2917
  a {
@@ -2923,12 +2923,12 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2923
2923
  outline-width: ${k(50)};
2924
2924
  }
2925
2925
  }
2926
- `,PT=e=>i.css`
2926
+ `,HT=e=>i.css`
2927
2927
  display: ${e?"none":"flex"};
2928
2928
  align-items: center;
2929
2929
  justify-content: flex-start;
2930
2930
  gap: 0rem;
2931
- `,zT=(e,t,n)=>i.css`
2931
+ `,BT=(e,t,n)=>i.css`
2932
2932
  font-size: ${C(n?300:400)};
2933
2933
  line-height: ${S(600)};
2934
2934
  font-weight: 400;
@@ -2953,12 +2953,12 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2953
2953
  font-weight: 700;
2954
2954
  color: ${w("accessible","controls-on-neutral-lights")};
2955
2955
  `:""}
2956
- `,VT=e=>i.css`
2956
+ `,_T=e=>i.css`
2957
2957
  height: ${k(e?700:1200)};
2958
2958
  display: flex;
2959
2959
  align-items: center;
2960
2960
  justify-content: flex-end;
2961
- `,HT=e=>i.css`
2961
+ `,FT=e=>i.css`
2962
2962
  height: 100%;
2963
2963
  font-size: ${C(400)};
2964
2964
  line-height: ${S(600)};
@@ -2978,7 +2978,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2978
2978
  }
2979
2979
  }
2980
2980
  `:""}
2981
- `,BT=e=>i.css`
2981
+ `,qT=e=>i.css`
2982
2982
  height: 100%;
2983
2983
  display: flex;
2984
2984
  align-items: center;
@@ -2987,7 +2987,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2987
2987
  padding-left: ${k(400)};
2988
2988
  border-left: ${j(100)} solid
2989
2989
  ${w("neutral",e?700:300)};
2990
- `,_T=(e="light",t)=>i.css`
2990
+ `,WT=(e="light",t)=>i.css`
2991
2991
  background-color: none;
2992
2992
  border: none;
2993
2993
  cursor: pointer;
@@ -3013,7 +3013,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3013
3013
  outline-width: ${j(200)};
3014
3014
  background-color: ${w("neutral",200)};
3015
3015
  }
3016
- `,FT=(e,t)=>i.css`
3016
+ `,UT=(e,t)=>i.css`
3017
3017
  position: absolute;
3018
3018
  top: ${k(t?700:1200)};
3019
3019
  right: 0;
@@ -3028,10 +3028,10 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3028
3028
  justify-content: flex-start;
3029
3029
  gap: ${k(400)};
3030
3030
  transition: width 0.5s ease-in-out;
3031
- `,qT=i.css`
3031
+ `,KT=i.css`
3032
3032
  height: 100%;
3033
3033
  width: 100%;
3034
- `,WT=e=>i.css`
3034
+ `,GT=e=>i.css`
3035
3035
  background-color: ${w("neutral","dark"===e?800:200)};
3036
3036
  border-bottom: ${j(100)} solid
3037
3037
  ${w("neutral",300)};
@@ -3052,13 +3052,13 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3052
3052
  margin-left: -${k(300)};
3053
3053
  }
3054
3054
  }
3055
- `,UT=i.css`
3055
+ `,ZT=i.css`
3056
3056
  background-color: ${w("neutral",100)};
3057
- `,KT=i.css`
3057
+ `,JT=i.css`
3058
3058
  min-height: 100vh;
3059
3059
  width: 100%;
3060
3060
  overflow-y: scroll;
3061
- `;i.css``;const GT=e=>i.css`
3061
+ `;i.css``;const XT=e=>i.css`
3062
3062
  display: inline-block;
3063
3063
  width: 100%;
3064
3064
  padding: ${k(300)} ${k(400)};
@@ -3087,7 +3087,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3087
3087
  outline-width: ${j(200)};
3088
3088
  background-color: ${w("neutral",200)};
3089
3089
  }
3090
- `,ZT=i.css`
3090
+ `,YT=i.css`
3091
3091
  width: 100%;
3092
3092
  padding: ${k(300)} ${k(400)};
3093
3093
  display: flex;
@@ -3111,7 +3111,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3111
3111
  outline-width: ${j(200)};
3112
3112
  background-color: ${w("neutral",200)};
3113
3113
  }
3114
- `,JT=e=>i.css`
3114
+ `,QT=e=>i.css`
3115
3115
  position: absolute;
3116
3116
  top: 0rem;
3117
3117
  right: 0;
@@ -3123,7 +3123,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3123
3123
  align-items: flex-start;
3124
3124
  justify-content: flex-start;
3125
3125
  transition: width 0.5s ease-in-out;
3126
- `,XT=i.css`
3126
+ `,eO=i.css`
3127
3127
  height: ${k(1200)};
3128
3128
  width: 100%;
3129
3129
  display: flex;
@@ -3135,7 +3135,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3135
3135
  position: relative;
3136
3136
  top: 0;
3137
3137
  left: 0;
3138
- `,YT=i.css`
3138
+ `,tO=i.css`
3139
3139
  position: absolute;
3140
3140
  bottom: 0;
3141
3141
  left: 0;
@@ -3150,7 +3150,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3150
3150
  button {
3151
3151
  width: calc(48% - 1.5rem);
3152
3152
  }
3153
- `,QT=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),v=n.useRef(null),b=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:FT(l,h),children:l&&r.jsxs("div",{css:qT,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:WT(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:UT,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:GT(d===e.link),children:e.label},e.label):r.jsxs("button",{css:ZT,type:"button",ref:e=>{b.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{v.current?.focus()}),100))},children:[e.label,e.items?r.jsx(If,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:YT,children:s.map((e=>r.jsx(Mf,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:JT(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:XT,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),b.current[m]?.focus()},"aria-label":u.goBackLabel,css:_T(e),ref:v,children:[r.jsx(If,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:_T(e),children:[u.closeButtonText,r.jsx(zf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:KT,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:GT(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},eO=1023,tO=i.css`
3153
+ `,nO=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),v=n.useRef(null),b=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:UT(l,h),children:l&&r.jsxs("div",{css:KT,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:GT(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:ZT,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:XT(d===e.link),children:e.label},e.label):r.jsxs("button",{css:YT,type:"button",ref:e=>{b.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{v.current?.focus()}),100))},children:[e.label,e.items?r.jsx(If,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:tO,children:s.map((e=>r.jsx(Mf,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:QT(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:eO,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),b.current[m]?.focus()},"aria-label":u.goBackLabel,css:WT(e),ref:v,children:[r.jsx(If,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:WT(e),children:[u.closeButtonText,r.jsx(zf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:JT,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:XT(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},rO=1023,oO=i.css`
3154
3154
  width: ${k(1600)};
3155
3155
  height: 100%;
3156
3156
  z-index: 100;
@@ -3160,7 +3160,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3160
3160
  display: flex;
3161
3161
  flex-direction: column;
3162
3162
  justify-content: space-between;
3163
- `,nO=i.css`
3163
+ `,iO=i.css`
3164
3164
  width: ${k(1600)};
3165
3165
  height: ${k(1600)};
3166
3166
  background-color: ${w("neutral",200)};
@@ -3251,7 +3251,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3251
3251
  }
3252
3252
  }
3253
3253
  }
3254
- `,rO=i.css`
3254
+ `,sO=i.css`
3255
3255
  display: flex;
3256
3256
  justify-content: center;
3257
3257
  align-items: center;
@@ -3264,7 +3264,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3264
3264
  fill: ${w("neutral",600)};
3265
3265
  }
3266
3266
  }
3267
- `,oO=i.css`
3267
+ `,aO=i.css`
3268
3268
  width: ${k(1600)};
3269
3269
  height: ${k(1600)};
3270
3270
  background-color: ${w("neutral",200)};
@@ -3302,7 +3302,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3302
3302
  text-align: center;
3303
3303
  color: ${w("neutral",600)};
3304
3304
  }
3305
- `,iO=i.css`
3305
+ `,lO=i.css`
3306
3306
  width: 20rem;
3307
3307
  height: 100%;
3308
3308
  z-index: 100;
@@ -3312,7 +3312,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3312
3312
  overflow-x: hidden;
3313
3313
  border-right: ${j(100)} solid
3314
3314
  ${w("neutral",300)};
3315
- `,sO=e=>i.css`
3315
+ `,cO=e=>i.css`
3316
3316
  width: 100%;
3317
3317
  display: flex;
3318
3318
  align-items: center;
@@ -3321,7 +3321,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3321
3321
  ${"view"===e&&`\n border: ${j(100)} solid ${w("neutral",400)};\n background-color: ${w("neutral",200)};\n border-radius: ${$(300)};\n padding: ${k(100)};\n `}
3322
3322
 
3323
3323
  ${"transparent"===e&&`\n border: none;\n background-color: transparent;\n border-radius: ${$(300)};\n padding: 0 ${k(400)};\n\n .chakra-tabs__list {\n gap: ${k(800)};\n }\n `}
3324
- `,aO=i.css`
3324
+ `,dO=i.css`
3325
3325
  width: 99%;
3326
3326
  height: ${k(1e3)};
3327
3327
  padding: ${k(200)} ${k(400)};
@@ -3337,7 +3337,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3337
3337
  &:focus-visible {
3338
3338
  box-shadow: none;
3339
3339
  }
3340
- `,lO=i.css`
3340
+ `,uO=i.css`
3341
3341
  background-color: ${w("neutral",200)};
3342
3342
  color: ${w("neutral",700)};
3343
3343
 
@@ -3394,11 +3394,11 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3394
3394
  opacity: 1;
3395
3395
  }
3396
3396
  }
3397
- `,cO=i.css`
3397
+ `,hO=i.css`
3398
3398
  width: ${k(100)};
3399
3399
  height: ${k(600)};
3400
3400
  background-color: ${w("neutral",400)};
3401
- `,dO=i.css`
3401
+ `,pO=i.css`
3402
3402
  height: ${k(800)};
3403
3403
  border-radius: ${$(200)};
3404
3404
  background-color: ${w("neutral",200)};
@@ -3473,7 +3473,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3473
3473
  opacity: 1;
3474
3474
  }
3475
3475
  }
3476
- `,uO=i.css`
3476
+ `,fO=i.css`
3477
3477
  background-color: transparent;
3478
3478
  color: ${w("neutral",600)};
3479
3479
  width: auto;
@@ -3550,7 +3550,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3550
3550
  }
3551
3551
  }
3552
3552
  }
3553
- `,hO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),pO=e=>1===e?"none":2===e?"left":"right",fO=({text:e,query:n})=>{if(!n)return e;const r=new RegExp(`(${n})`,"ig"),o=e.split(r);return t.jsx(t.Fragment,{children:o.map((e=>r.test(e)?t.jsx("strong",{children:e},e):t.jsx("span",{children:e},e)))})},mO=({items:r,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),t.jsx(e.Box,{padding:"0.5rem",children:r.map(((n,r)=>t.jsx(e.Box,{ref:a,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:r===s?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(n.id||n.label),children:t.jsx(fO,{text:n.label,query:o})},n.id)))})},gO={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function vO(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&gO[e]?gO[e]:gO.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r??s,l=r&&n?"opacity: 0.7;":"",c=w("neutral",n?400:800);return i.css`
3553
+ `,mO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),gO=e=>1===e?"none":2===e?"left":"right",vO=({text:e,query:n})=>{if(!n)return e;const r=new RegExp(`(${n})`,"ig"),o=e.split(r);return t.jsx(t.Fragment,{children:o.map((e=>r.test(e)?t.jsx("strong",{children:e},e):t.jsx("span",{children:e},e)))})},bO=({items:r,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),t.jsx(e.Box,{padding:"0.5rem",children:r.map(((n,r)=>t.jsx(e.Box,{ref:a,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:r===s?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(n.id||n.label),children:t.jsx(vO,{text:n.label,query:o})},n.id)))})},yO={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function xO(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&yO[e]?yO[e]:yO.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r??s,l=r&&n?"opacity: 0.7;":"",c=w("neutral",n?400:800);return i.css`
3554
3554
  height: ${o};
3555
3555
  width: ${o};
3556
3556
  border-radius: 50%;
@@ -3585,17 +3585,17 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3585
3585
  background-color: ${w("primary",500)};
3586
3586
  }
3587
3587
  }
3588
- `}const bO=e=>i.css`
3588
+ `}const wO=e=>i.css`
3589
3589
  width: ${e||k(400)};
3590
3590
  position: absolute;
3591
3591
  top: -${k(200)};
3592
3592
  left: 0.9375rem;
3593
- `,yO=i.css`
3593
+ `,CO=i.css`
3594
3594
  font-size: ${C(200)};
3595
3595
  line-height: ${S(400)};
3596
3596
  font-weight: 700;
3597
3597
  color: ${w("primary",800)};
3598
- `,xO=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:s,src:a,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:h=""},p)=>{const f=()=>{u||c?.()},m=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let g="1rem";d&&d>99?g="1.75rem":d&&d>9&&(g="1.375rem");const v=!!a||!!l,b=c&&!u;return r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:p,css:vO(o,s,u,h),onClick:f,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),f())},role:b?"button":"img",tabIndex:b?0:void 0,"aria-disabled":b?u:void 0,children:[v&&r.jsx(e.Avatar.Image,{src:a,srcSet:l,alt:n||t||"Avatar image"}),!v&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:yO}),!v&&!t&&r.jsx(cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):void 0}}),m.length>0?r.jsx("div",{css:bO(g),children:r.jsx("div",{css:i.css`
3598
+ `,kO=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:s,src:a,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:h=""},p)=>{const f=()=>{u||c?.()},m=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let g="1rem";d&&d>99?g="1.75rem":d&&d>9&&(g="1.375rem");const v=!!a||!!l,b=c&&!u;return r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:p,css:xO(o,s,u,h),onClick:f,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),f())},role:b?"button":"img",tabIndex:b?0:void 0,"aria-disabled":b?u:void 0,children:[v&&r.jsx(e.Avatar.Image,{src:a,srcSet:l,alt:n||t||"Avatar image"}),!v&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:CO}),!v&&!t&&r.jsx(cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):void 0}}),m.length>0?r.jsx("div",{css:wO(g),children:r.jsx("div",{css:i.css`
3599
3599
  height: ${k(400)};
3600
3600
  width: auto;
3601
3601
  background-color: ${w("error",500)};
@@ -3608,16 +3608,16 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3608
3608
  line-height: ${S(400)};
3609
3609
  font-weight: 700;
3610
3610
  color: ${w("error",100)};
3611
- `,children:r.jsx("p",{"aria-label":`${d} unread message`,children:m})})}):null]})})),wO=i.css`
3611
+ `,children:r.jsx("p",{"aria-label":`${d} unread message`,children:m})})}):null]})})),SO=i.css`
3612
3612
  display: flex;
3613
3613
  justify-content: flex-start;
3614
3614
  align-items: center;
3615
3615
  gap: ${k(200)};
3616
- `,CO=e=>i.css`
3616
+ `,$O=e=>i.css`
3617
3617
  width: ${e||k(400)};
3618
3618
  position: relative;
3619
3619
  display: flex;
3620
- `,kO=i.css`
3620
+ `,jO=i.css`
3621
3621
  height: ${k(100)};
3622
3622
  width: ${k(100)};
3623
3623
  background-color: ${w("error",500)};
@@ -3625,7 +3625,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3625
3625
  position: absolute;
3626
3626
  top: 0rem;
3627
3627
  right: 0rem;
3628
- `,SO=i.css`
3628
+ `,EO=i.css`
3629
3629
  height: 0.625rem;
3630
3630
  background-color: ${w("error",500)};
3631
3631
  padding: 0 0.1875rem 0.0625rem 0.1875rem;
@@ -3636,12 +3636,12 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3636
3636
  position: absolute;
3637
3637
  top: -${k(50)};
3638
3638
  left: 0.5625rem;
3639
- `,$O=i.css`
3639
+ `,MO=i.css`
3640
3640
  font-size: ${C(200)};
3641
3641
  line-height: ${S(400)};
3642
3642
  font-weight: 700;
3643
3643
  color: ${w("error",100)};
3644
- `,jO=i.css`
3644
+ `,TO=i.css`
3645
3645
  height: ${k(400)};
3646
3646
  min-width: ${k(400)};
3647
3647
  background-color: ${w("error",500)};
@@ -3650,12 +3650,12 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3650
3650
  justify-content: center;
3651
3651
  align-items: center;
3652
3652
  padding: 0rem ${k(100)} 0.0625rem ${k(100)};
3653
- `,EO=i.css`
3653
+ `,OO=i.css`
3654
3654
  font-size: ${C(400)};
3655
3655
  line-height: ${S(600)};
3656
3656
  font-weight: 700;
3657
3657
  color: ${w("error",100)};
3658
- `,MO=(e,t)=>{let n="14.875rem";return"full-width"===e?n="100%":"large"===e&&(n="22.875rem"),i.css`
3658
+ `,LO=(e,t)=>{let n="14.875rem";return"full-width"===e?n="100%":"large"===e&&(n="22.875rem"),i.css`
3659
3659
  width: 100%;
3660
3660
  max-width: ${n};
3661
3661
  border-radius: ${$(300)};
@@ -3669,7 +3669,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3669
3669
  button {
3670
3670
  margin-left: ${t?0:k(600)};
3671
3671
  }
3672
- `},TO=i.css`
3672
+ `},AO=i.css`
3673
3673
  display: flex;
3674
3674
  align-items: flex-start;
3675
3675
  gap: ${k(200)};
@@ -3677,14 +3677,14 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3677
3677
  svg {
3678
3678
  margin-top: 0.1875rem;
3679
3679
  }
3680
- `,OO=e=>i.css`
3680
+ `,RO=e=>i.css`
3681
3681
  max-width: 45rem;
3682
3682
  color: ${w("neutral",800)};
3683
3683
  font-size: ${C("small"===e?300:500)};
3684
3684
  line-height: ${S("small"===e?500:700)};
3685
3685
  font-weight: 400;
3686
3686
  text-align: left;
3687
- `,LO=(e,t)=>i.css`
3687
+ `,NO=(e,t)=>i.css`
3688
3688
  max-width: 45rem;
3689
3689
  color: ${w("neutral",700)};
3690
3690
  font-size: ${C("small"===e?200:400)};
@@ -3692,7 +3692,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3692
3692
  font-weight: 400;
3693
3693
  margin-left: ${t?k(600):"0"};
3694
3694
  text-align: left;
3695
- `,AO=(e,t)=>i.css`
3695
+ `,DO=(e,t)=>i.css`
3696
3696
  max-width: 45rem;
3697
3697
  color: ${w("neutral",700)};
3698
3698
  font-size: ${C("small"===e?200:400)};
@@ -3700,15 +3700,15 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3700
3700
  font-weight: 400;
3701
3701
  margin-left: ${t?k(600):"0"};
3702
3702
  text-align: left;
3703
- `,RO=i.css`
3703
+ `,IO=i.css`
3704
3704
  background-color: ${w("neutral",100)};
3705
3705
  border: ${j(100)} solid ${w("neutral",300)};
3706
3706
  color: ${w("neutral",700)};
3707
- `,NO=i.css`
3707
+ `,PO=i.css`
3708
3708
  background-color: ${w("neutral",200)};
3709
3709
  border: ${j(100)} solid ${w("neutral",300)};
3710
3710
  color: ${w("neutral",700)};
3711
- `,DO=i.css`
3711
+ `,zO=i.css`
3712
3712
  background-color: ${w("success",100)};
3713
3713
  border: ${j(100)} solid ${w("success",300)};
3714
3714
  color: ${w("success",500)};
@@ -3716,7 +3716,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3716
3716
  p {
3717
3717
  color: ${w("success",900)};
3718
3718
  }
3719
- `,IO=i.css`
3719
+ `,VO=i.css`
3720
3720
  background-color: ${w("warning",100)};
3721
3721
  border: ${j(100)} solid ${w("warning",300)};
3722
3722
  color: ${w("warning",500)};
@@ -3724,7 +3724,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3724
3724
  p {
3725
3725
  color: ${w("warning",900)};
3726
3726
  }
3727
- `,PO=i.css`
3727
+ `,HO=i.css`
3728
3728
  background-color: ${w("error",100)};
3729
3729
  border: ${j(100)} solid ${w("error",300)};
3730
3730
  color: ${w("error",500)};
@@ -3732,39 +3732,39 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3732
3732
  p {
3733
3733
  color: ${w("error",900)};
3734
3734
  }
3735
- `,zO=e=>{let t="",n="",r="";return"success"===e?(t=w("success",100),n=w("success",500),r=w("success",300)):"warning"===e?(t=w("warning",100),n=w("warning",500),r=w("warning",300)):"error"===e?(t=w("error",100),n=w("error",500),r=w("error",300)):"information"===e?(t=w("secondary",100),n=w("secondary",500),r=w("secondary",200)):"general-grey"===e?(t=w("neutral",200),n=w("neutral",700),r=w("neutral",300)):(t=w("neutral",100),n=w("neutral",700),r=w("neutral",300)),i.css`
3735
+ `,BO=e=>{let t="",n="",r="";return"success"===e?(t=w("success",100),n=w("success",500),r=w("success",300)):"warning"===e?(t=w("warning",100),n=w("warning",500),r=w("warning",300)):"error"===e?(t=w("error",100),n=w("error",500),r=w("error",300)):"information"===e?(t=w("secondary",100),n=w("secondary",500),r=w("secondary",200)):"general-grey"===e?(t=w("neutral",200),n=w("neutral",700),r=w("neutral",300)):(t=w("neutral",100),n=w("neutral",700),r=w("neutral",300)),i.css`
3736
3736
  display: flex;
3737
3737
  color: ${n};
3738
3738
  align-items: center;
3739
3739
  background-color: ${t};
3740
3740
  border-bottom: ${j(100)} solid ${r};
3741
3741
  border-radius: 0;
3742
- `},VO=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s},a)=>{const[c,d]=l.useState(!0),u="success"===i?r.jsx(_f,{}):"warning"===i?r.jsx(Ff,{}):r.jsx(Df,{});return c?r.jsxs(e.Alert.Root,{css:zO(i),children:[r.jsx(e.Alert.Indicator,{children:o||u}),n?r.jsx(e.Alert.Content,{children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:"1",children:t}),r.jsx(e.CloseButton,{"aria-label":"Close alert",pos:"absolute",insetEnd:"2",_hover:{bg:"gray.200"},onClick:()=>{d(!1),s?.()}})]}):null})),HO=i.css`
3742
+ `},_O=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s},a)=>{const[c,d]=l.useState(!0),u="success"===i?r.jsx(_f,{}):"warning"===i?r.jsx(Ff,{}):r.jsx(Df,{});return c?r.jsxs(e.Alert.Root,{css:BO(i),children:[r.jsx(e.Alert.Indicator,{children:o||u}),n?r.jsx(e.Alert.Content,{children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:"1",children:t}),r.jsx(e.CloseButton,{"aria-label":"Close alert",pos:"absolute",insetEnd:"2",_hover:{bg:"gray.200"},onClick:()=>{d(!1),s?.()}})]}):null})),FO=i.css`
3743
3743
  height: ${k(200)};
3744
3744
  width: 100%;
3745
3745
  background-color: ${w("neutral",300)};
3746
3746
  display: flex;
3747
3747
  align-items: center;
3748
3748
  justify-content: flex-start;
3749
- `,BO=e=>i.css`
3749
+ `,qO=e=>i.css`
3750
3750
  height: 100%;
3751
3751
  width: ${e}%;
3752
3752
  background-color: ${w("primary",500)};
3753
3753
  transition: width 0.5s ease-in-out;
3754
- `,_O=i.css`
3754
+ `,WO=i.css`
3755
3755
  width: 100%;
3756
3756
  display: flex;
3757
3757
  align-items: center;
3758
3758
  justify-content: space-between;
3759
3759
  position: relative;
3760
- `,FO=i.css`
3760
+ `,UO=i.css`
3761
3761
  height: 3.75rem;
3762
3762
  width: ${k(2e3)};
3763
3763
  display: flex;
3764
3764
  flex-direction: column;
3765
3765
  align-items: center;
3766
3766
  justify-content: space-between;
3767
- `,qO=(e,t)=>i.css`
3767
+ `,KO=(e,t)=>i.css`
3768
3768
  height: ${k(800)};
3769
3769
  width: ${k(800)};
3770
3770
  display: flex;
@@ -3800,12 +3800,12 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3800
3800
  }
3801
3801
 
3802
3802
  ${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
3803
- `,WO=e=>i.css`
3803
+ `,GO=e=>i.css`
3804
3804
  color: ${w("neutral",e?800:600)};
3805
3805
  font-size: ${C(300)};
3806
3806
  line-height: ${S(500)};
3807
3807
  font-weight: 400;
3808
- `,UO=i.css`
3808
+ `,ZO=i.css`
3809
3809
  height: ${j(100)};
3810
3810
  width: 100%;
3811
3811
  padding: 0 1.875rem;
@@ -3813,11 +3813,11 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3813
3813
  top: ${k(400)};
3814
3814
  left: 0;
3815
3815
  z-index: -1;
3816
- `,KO=i.css`
3816
+ `,JO=i.css`
3817
3817
  height: ${j(100)};
3818
3818
  width: 100%;
3819
3819
  background-color: ${w("neutral",400)};
3820
- `,GO=i.css`
3820
+ `,XO=i.css`
3821
3821
  justify-content: space-between;
3822
3822
  align-items: center;
3823
3823
  gap: ${k(200)};
@@ -3860,21 +3860,21 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3860
3860
  color: ${w("error",900)};
3861
3861
  }
3862
3862
  }
3863
- `,ZO=i.css`
3863
+ `,YO=i.css`
3864
3864
  font-size: ${C(500)};
3865
3865
  line-height: ${S(700)};
3866
3866
  font-weight: 400;
3867
3867
  color: ${w("neutral",800)};
3868
- `,JO=i.css`
3868
+ `,QO=i.css`
3869
3869
  font-size: ${C(400)};
3870
3870
  line-height: ${S(600)};
3871
3871
  font-weight: 400;
3872
3872
  color: ${w("neutral",700)};
3873
- `,XO=i.css`
3873
+ `,eL=i.css`
3874
3874
  padding: 0.375rem;
3875
- `,YO=i.css`
3875
+ `,tL=i.css`
3876
3876
  padding: 0.375rem;
3877
- `,QO={pauseOnPageIdle:!0,offsets:"1.5rem"},eL={"top-start":e.createToaster({placement:"top-start",...QO}),top:e.createToaster({placement:"top",...QO}),"top-end":e.createToaster({placement:"top-end",...QO}),"bottom-start":e.createToaster({placement:"bottom-start",...QO}),bottom:e.createToaster({placement:"bottom",...QO}),"bottom-end":e.createToaster({placement:"bottom-end",...QO})};exports.AlertBanner=VO,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Ef("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:Jw,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:Yw,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:Xw,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Mf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(If,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:Qw,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:Qw,children:i})]})})},exports.Avatar=xO,exports.Badge=({hasNotification:e,notificationCount:t,label:o})=>{const[i,s]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?s(!0):s(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const a=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let l="1rem";return t&&t>99?l="1.75rem":t&&t>9&&(l="1.375rem"),i?r.jsxs("div",{css:wO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:CO(),children:[r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"}),!e||t||o?null:r.jsx("div",{css:kO,"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,a.length>0?r.jsx("div",{css:jO,children:r.jsx("p",{css:EO,"aria-label":`${t} unread message`,children:a})}):null]}):r.jsxs("div",{css:wO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:CO(l),children:[a.length>0?r.jsx("div",{css:SO,children:r.jsx("p",{css:$O,"aria-label":`${t} unread message`,children:a})}):null,e&&!t?r.jsx("div",{css:kO,"aria-hidden":!0}):null,r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Ef("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),r.jsx("div",{ref:p,css:lb(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:cb,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:db,children:[o?r.jsx("div",{css:ub,children:o.map((e=>r.jsxs("div",{children:[r.jsx(kg,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:hb,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:pb,children:s.map((e=>{return r.jsxs("div",{css:fb(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
3877
+ `,nL={pauseOnPageIdle:!0,offsets:"1.5rem"},rL={"top-start":e.createToaster({placement:"top-start",...nL}),top:e.createToaster({placement:"top",...nL}),"top-end":e.createToaster({placement:"top-end",...nL}),"bottom-start":e.createToaster({placement:"bottom-start",...nL}),bottom:e.createToaster({placement:"bottom",...nL}),"bottom-end":e.createToaster({placement:"bottom-end",...nL})};exports.AlertBanner=_O,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Ef("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:Qw,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:tC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:eC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Mf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(If,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:nC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:nC,children:i})]})})},exports.Avatar=kO,exports.Badge=({hasNotification:e,notificationCount:t,label:o})=>{const[i,s]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?s(!0):s(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const a=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let l="1rem";return t&&t>99?l="1.75rem":t&&t>9&&(l="1.375rem"),i?r.jsxs("div",{css:SO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:$O(),children:[r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"}),!e||t||o?null:r.jsx("div",{css:jO,"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,a.length>0?r.jsx("div",{css:TO,children:r.jsx("p",{css:OO,"aria-label":`${t} unread message`,children:a})}):null]}):r.jsxs("div",{css:SO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:$O(l),children:[a.length>0?r.jsx("div",{css:EO,children:r.jsx("p",{css:MO,"aria-label":`${t} unread message`,children:a})}):null,e&&!t?r.jsx("div",{css:jO,"aria-hidden":!0}):null,r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Ef("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),r.jsx("div",{ref:p,css:lb(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:cb,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:db,children:[o?r.jsx("div",{css:ub,children:o.map((e=>r.jsxs("div",{children:[r.jsx(kg,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:hb,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:pb,children:s.map((e=>{return r.jsxs("div",{css:fb(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
3878
3878
  height: ${k(800)};
3879
3879
  width: ${k(800)};
3880
3880
  border: ${j(100)} solid ${w("neutral",300)};
@@ -3882,7 +3882,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3882
3882
  background-image: url(${t});
3883
3883
  background-size: cover;
3884
3884
  background-position: center;
3885
- `)}),r.jsxs("div",{css:mb,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(Nv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Rf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:yT(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:xT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:wT,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:xT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:yT(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:yT(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:xT(a),children:o||r.jsx(If,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Mf,exports.Checkbox=kg,exports.CheckboxList=({label:t,caption:o,checkboxes:s,defaultValues:a,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:h=!1,hideExpandToggle:p=!1,labels:f})=>{const m=Ef("CheckboxList",f),g=Array.isArray(a)?a:[],v=n.useMemo((()=>new Set(g)),[g]),[b,y]=n.useState((()=>s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:v.has(n),e}),{}))),[x,w]=n.useState(!0);n.useEffect((()=>{y((e=>{const t=s.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??v.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[s,v]);const C="string"!=typeof t,k=s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!b[n],e}),{}),S=s.length>0&&s.every((e=>e.name&&k[e.name])),$=s.some((e=>e.name&&k[e.name]))&&!S,j=s.length,E=`${s.filter((e=>e?.name&&k[e.name])).length} / ${j}`,M=o?`${o}.`:"",T=u?m.requiredLabel:m.optionalLabel,O=c?`${m.errorPrefix} ${c}.`:"",L=`${C?t.label:t}. ${M} ${T} ${O} `;return r.jsxs(e.Group,{css:Yg,"aria-label":L,children:[c?r.jsx("div",{css:nv}):null,r.jsxs("div",{css:(A=!!c,i.css`
3885
+ `)}),r.jsxs("div",{css:mb,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(Nv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Rf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:CT(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:kT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:ST,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:kT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:CT(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:CT(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:kT(a),children:o||r.jsx(If,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Mf,exports.Checkbox=kg,exports.CheckboxList=({label:t,caption:o,checkboxes:s,defaultValues:a,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:h=!1,hideExpandToggle:p=!1,labels:f})=>{const m=Ef("CheckboxList",f),g=Array.isArray(a)?a:[],v=n.useMemo((()=>new Set(g)),[g]),[b,y]=n.useState((()=>s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:v.has(n),e}),{}))),[x,w]=n.useState(!0);n.useEffect((()=>{y((e=>{const t=s.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??v.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[s,v]);const C="string"!=typeof t,k=s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!b[n],e}),{}),S=s.length>0&&s.every((e=>e.name&&k[e.name])),$=s.some((e=>e.name&&k[e.name]))&&!S,j=s.length,E=`${s.filter((e=>e?.name&&k[e.name])).length} / ${j}`,M=o?`${o}.`:"",T=u?m.requiredLabel:m.optionalLabel,O=c?`${m.errorPrefix} ${c}.`:"",L=`${C?t.label:t}. ${M} ${T} ${O} `;return r.jsxs(e.Group,{css:Yg,"aria-label":L,children:[c?r.jsx("div",{css:nv}):null,r.jsxs("div",{css:(A=!!c,i.css`
3886
3886
  margin-left: ${A?"1.1875rem":"0"};
3887
3887
  width: 100%;
3888
3888
  `),children:[r.jsx("div",{css:Qg,children:"string"==typeof t?r.jsxs(r.Fragment,{children:[u&&r.jsx("span",{id:"required-symbol","aria-label":m.requiredSymbolLabel,children:"*"}),t]}):r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[r.jsxs(kg,{checked:S,indeterminate:$,onCheckedChange:e=>(e=>{const t=s.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});y(t),l?.(t)})(!!e.checked),children:[t.label," ",!h&&r.jsx("span",{"aria-hidden":"true",css:ov,children:E})]}),!p&&r.jsxs("button",{type:"button",onClick:()=>w((e=>!e)),"aria-expanded":x,"aria-controls":"checkbox-list",css:iv,children:[x?m.hideLabel:m.expandLabel,r.jsx("span",{"aria-hidden":"true",children:x?r.jsx(If,{style:{transform:"rotate(180deg)"}}):r.jsx(If,{})})]})]})}),r.jsx("p",{css:ev,"aria-label":o,children:o}),c?r.jsx("p",{css:rv,"aria-label":c,children:c}):null,r.jsx("div",{id:"checkbox-list",css:tv(d,x),children:s.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx(kg,{ms:C&&!d?"6":"",css:{},checked:!!e?.name&&!!k[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...b};t&&(n[t]=e,y(n)),l&&l(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})]})]});var A},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:Sg,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:$g,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
@@ -3898,7 +3898,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3898
3898
  padding: 0;
3899
3899
  padding-top: ${k(200)};
3900
3900
  color: ${o?w("neutral",500):"inherit"};
3901
- `),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:i,errorMessage:s,size:a,disabled:l,placeholder:c,labels:d,noMarginBottom:u,initialItems:h=[],multiple:p=!1,showSelectedItems:f=!1})=>{const[m,g]=n.useState([]),v=Ef("TextInput",d),{contains:b}=e.useFilter({sensitivity:"base"}),{collection:y,filter:x}=e.useListCollection({initialItems:h,filter:b});return r.jsxs("div",{css:Um(a,u),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Km}):null,r.jsxs(e.Field.Root,{required:o,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Gm(a,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":v.requiredSymbolLabel}),t,o?"":r.jsx("span",{children:v.optionalSuffix})]}):null,i?r.jsx(e.Field.HelperText,{css:Zm(a,l),"aria-label":i,children:i}):null,s?r.jsx(e.Field.ErrorText,{css:Jm(a),"aria-label":s,children:s}):null,r.jsxs(e.Combobox.Root,{multiple:p,onValueChange:e=>{g(e.items.map((e=>({label:e.label,value:e.value}))))},value:m.map((e=>e.value)),collection:y,onInputValueChange:e=>x(e.inputValue),width:"20rem",size:"small"===a?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:c,css:Xm(a),disabled:l,"aria-label":t||c||"Combobox input"}),r.jsxs(e.Combobox.IndicatorGroup,{children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":"Clear selection"}),r.jsx(e.Combobox.Trigger,{"aria-label":"Toggle options"})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{children:[r.jsx(e.Combobox.Empty,{children:"No items found"}),y.items.map((t=>r.jsxs(e.Combobox.Item,{item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:f&&m.map((e=>r.jsx(Nv,{label:e.label,variant:"info-white",onClose:()=>g((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))})]})]})]})},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(E.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:Gw,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Zw,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:CT(n,o),children:r.jsxs("div",{css:kT(i),children:[r.jsxs("div",{css:jT,children:[r.jsx(Wf,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:ST,children:e}),r.jsx("div",{children:r.jsxs("p",{css:$T,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:bg,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:xg}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:yg,children:e}):null,t?r.jsx("p",{id:a,css:wg,children:t}):null,o]})]})},exports.IconButton=Of,exports.InlineMessage=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Df,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=Ef("InlineMessage",u);let p=RO;"info-grey"===n?p=NO:"success"===n?p=DO:"warning"===n?p=IO:"error"===n&&(p=PO);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return r.jsxs("div",{css:[MO(o,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:TO,children:[i,r.jsx("p",{css:OO(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:LO(o,!!i),children:t}):t?r.jsx("div",{css:AO(o,!!i),children:t}):null]}),a?r.jsx(Mf,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:s,leftIcon:c,rightIcon:d}):null]})},exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),v=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsxs("div",{css:sv,children:[i?r.jsx("div",{css:cv}):null,r.jsxs("div",{style:{marginLeft:i?"1.1875rem":"0px"},children:[r.jsxs("p",{css:av(h),"aria-label":t,children:[u?r.jsx("span",{children:"*"}):null,t]}),r.jsx("p",{css:lv(h),"aria-label":o,children:o}),i?r.jsx("p",{css:dv,"aria-label":i,children:i}):null,r.jsxs(e.Group,{css:uv(!!i,a),attached:!0,children:["start"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null,r.jsx(Ym,{type:"number","aria-label":`${t} value`,value:p,disabled:h,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ww,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Ef("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Nx,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Dx,children:[t,r.jsx(Nv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:Ix,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Hg,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(_x,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Rx,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=_x,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Fx,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:qx,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Wx,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Ux,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Ef("LegendItem",d);return r.jsxs("div",{css:Kx,children:[r.jsx("div",{css:Gx,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(Of,{icon:r.jsx(If,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(Of,{icon:r.jsx(If,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Zx,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Jx,children:e}),r.jsx("p",{css:Xx,children:t})]}),r.jsx(Mf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(zf,{}),onClick:s})]}),a,r.jsxs("div",{css:Yx,children:[r.jsx(Mf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{}),onClick:l}),r.jsx(rw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=Ow,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Ef("MapControlsToolbar",h),f=[{icon:t.jsx(Kf,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(Gf,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(Zf,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(Jf,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(Xf,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(Yf,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(Qf,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(ug,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=vb,exports.MapMarkers=bb,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Ef("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:v,context:b,middlewareData:y,placement:x}=Sx({open:e,onOpenChange:t,placement:c,whileElementsMounted:Uy,middleware:[ox(d),(w={fallbackAxisSideDirection:"start"},{...Zy(w),options:[w,C]}),ix({padding:8}),sx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=yx(),v=$y("function"==typeof c?c:()=>!1),b="function"==typeof c?v:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Cx(f),{escapeKey:C,outsidePress:k}=Cx(m),S=l.useRef(!1),$=$y((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Cy(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),j=$y((e=>{var t;const n=()=>{var t;$(e),null==(t=yy(e))||t.removeEventListener("keydown",n)};null==(t=yy(e))||t.addEventListener("keydown",n)})),E=$y((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=yy(e),l="[data-floating-ui-inert]",c=wy(o.floating).querySelectorAll(l);let u=Sb(a)?a:null;for(;u&&!Vb(u);){const e=_b(u);if(Vb(e)||!Sb(e))break;u=e}if(c.length&&Sb(a)&&!a.matches("html,body")&&!by(a,o.floating)&&Array.from(c).every((e=>!by(u,e))))return;if($b(a)&&O){const t=Vb(a),n=Hb(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Cy(g.nodesRef.current,h).some((t=>{var n;return xy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(xy(e,o.floating)||xy(e,o.domReference)||p)return;const f=g?Cy(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),M=$y((e=>{var t;const n=()=>{var t;E(e),null==(t=yy(e))||t.removeEventListener(d,n)};null==(t=yy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),Pb()?5:0)}const u=wy(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),b&&u.addEventListener(d,k?M:E,k);let h=[];return p&&(Sb(o.domReference)&&(h=qb(o.domReference)),Sb(o.floating)&&(h=h.concat(qb(o.floating))),!Sb(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(qb(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(d,k?M:E,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,b,d,n,r,p,s,x,w,$,C,j,E,k,M]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,b,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[xx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[wx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(b,{escapeKey:u,outsidePress:h}),S=Ex(b,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>$x(t,e,"reference")),t),i=l.useCallback((t=>$x(t,e,"floating")),n),s=l.useCallback((t=>$x(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:j,y:E}=y.arrow??{x:null,y:null},M={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==M&&"right"!==M||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:v,"aria-label":"Map popup dialog","aria-modal":!0,...$(),css:Mx,children:[r.jsxs("div",{css:Tx,children:[i,r.jsx(sg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:Ox,children:s}),a?r.jsx("div",{css:Lx,children:a}):null,r.jsx("div",{ref:m,css:Ax(T,O,j,E,M,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=jm,exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual"})=>{const l=o.length,[c,d]=n.useState((()=>LT(o,t)));return r.jsx("div",{css:ET,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=LT(o,e);d(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":d,"aria-describedby":u,disabled:h,...p}=t,f=`${t.value}-str-status`,m=[`tab ${n+1} of ${l}`,c===n?"selected":"not selected"];h&&m.push("disabled");const g=[u,f].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:MT,"aria-label":d||o,"aria-disabled":!!h||void 0,"aria-describedby":g,disabled:h,...p,children:[r.jsxs("div",{css:TT,children:[i,a?r.jsx("div",{css:OT,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:f,children:m.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p})=>{const f=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(GC,{disabled:!d,nodeRef:f,children:r.jsx(e.Dialog.Positioner,{ref:f,children:r.jsxs(e.Dialog.Content,{"aria-label":"Modal dialog",css:ZC(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:JC,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:XC,asChild:!0,children:r.jsx(sg,{})})]}),r.jsx(e.Dialog.Body,{css:YC,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:mg,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Mf,{css:{},label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d,...u}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[r.jsx(e.Menu.Trigger,{css:pg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Mf,{style:gg,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(If,{"aria-hidden":"true",rotate:h?"180":"0",color:w("accessible","text-on-primary-mids")||w("primary",900)}),disabled:l})}),r.jsx(vg,{children:a.map((({label:t,value:n,onClick:i})=>r.jsx(e.Menu.Item,{css:fg(o),onClick:i,value:n,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Ef("Navbar",f),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=eO),[$,j]=n.useState(!1),E=i,M=n.useCallback((()=>{if(v.current&&g.current&&b.current){const e=g.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=b.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=eO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>eO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=eO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)})),[M]);const T="condensed"===e;return r.jsxs("nav",{css:AT(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:NT(y&&!k,d,T),children:[r.jsxs("div",{css:DT(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:b,css:IT,children:o}):null,r.jsx("div",{css:PT(y),children:a?.map((e=>e.link?r.jsx(E,{to:e.link,href:e.link,css:zT(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:VT(T),ref:v,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":m.openMenuLabel,css:_T(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(zf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(lm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:VT(T),children:l?.map(((e,t)=>r.jsx("div",{css:HT(y),children:e},t)))}),c?.length?r.jsx("div",{css:BT(y),children:c.map((e=>r.jsx(Mf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:RT(t,T),children:a?.map((e=>e.link?r.jsx(E,{to:e.link,href:e.link,css:zT(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(QT,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Ef("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:tO,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:nO,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:rO,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:oO,children:[r.jsx("div",{css:rO,children:d?r.jsx(Af,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:iO,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((t=>{return r.jsxs(e.RadioCard.Item,{css:Og,value:t.value,disabled:t.disabled,children:[r.jsx(e.RadioCard.ItemHiddenInput,{}),r.jsxs(e.RadioCard.ItemControl,{css:Lg,children:[r.jsxs("div",{css:(o=t.variant,i.css`
3901
+ `),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:i,errorMessage:s,size:a,disabled:l,placeholder:c,labels:d,noMarginBottom:u,initialItems:h=[],multiple:p=!1,showSelectedItems:f=!1})=>{const[m,g]=n.useState([]),v=Ef("TextInput",d),{contains:b}=e.useFilter({sensitivity:"base"}),{collection:y,filter:x}=e.useListCollection({initialItems:h,filter:b});return r.jsxs("div",{css:Um(a,u),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Km}):null,r.jsxs(e.Field.Root,{required:o,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Gm(a,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":v.requiredSymbolLabel}),t,o?"":r.jsx("span",{children:v.optionalSuffix})]}):null,i?r.jsx(e.Field.HelperText,{css:Zm(a,l),"aria-label":i,children:i}):null,s?r.jsx(e.Field.ErrorText,{css:Jm(a),"aria-label":s,children:s}):null,r.jsxs(e.Combobox.Root,{multiple:p,onValueChange:e=>{g(e.items.map((e=>({label:e.label,value:e.value}))))},value:m.map((e=>e.value)),collection:y,onInputValueChange:e=>x(e.inputValue),width:"20rem",size:"small"===a?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:c,css:Xm(a),disabled:l,"aria-label":t||c||"Combobox input"}),r.jsxs(e.Combobox.IndicatorGroup,{children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":"Clear selection"}),r.jsx(e.Combobox.Trigger,{"aria-label":"Toggle options"})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{children:[r.jsx(e.Combobox.Empty,{children:"No items found"}),y.items.map((t=>r.jsxs(e.Combobox.Item,{item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:f&&m.map((e=>r.jsx(Nv,{label:e.label,variant:"info-white",onClose:()=>g((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))})]})]})]})},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(E.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:Xw,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Yw,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:$T(n,o),children:r.jsxs("div",{css:jT(i),children:[r.jsxs("div",{css:TT,children:[r.jsx(Wf,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:ET,children:e}),r.jsx("div",{children:r.jsxs("p",{css:MT,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:bg,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:xg}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:yg,children:e}):null,t?r.jsx("p",{id:a,css:wg,children:t}):null,o]})]})},exports.IconButton=Of,exports.InlineMessage=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Df,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=Ef("InlineMessage",u);let p=IO;"info-grey"===n?p=PO:"success"===n?p=zO:"warning"===n?p=VO:"error"===n&&(p=HO);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return r.jsxs("div",{css:[LO(o,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:AO,children:[i,r.jsx("p",{css:RO(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:NO(o,!!i),children:t}):t?r.jsx("div",{css:DO(o,!!i),children:t}):null]}),a?r.jsx(Mf,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:s,leftIcon:c,rightIcon:d}):null]})},exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),v=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsxs("div",{css:sv,children:[i?r.jsx("div",{css:cv}):null,r.jsxs("div",{style:{marginLeft:i?"1.1875rem":"0px"},children:[r.jsxs("p",{css:av(h),"aria-label":t,children:[u?r.jsx("span",{children:"*"}):null,t]}),r.jsx("p",{css:lv(h),"aria-label":o,children:o}),i?r.jsx("p",{css:dv,"aria-label":i,children:i}):null,r.jsxs(e.Group,{css:uv(!!i,a),attached:!0,children:["start"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null,r.jsx(Ym,{type:"number","aria-label":`${t} value`,value:p,disabled:h,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ww,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Ef("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Nx,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Dx,children:[t,r.jsx(Nv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:Ix,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Hg,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(_x,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Rx,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=_x,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Fx,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:qx,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Wx,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Ux,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Ef("LegendItem",d);return r.jsxs("div",{css:Kx,children:[r.jsx("div",{css:Gx,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(Of,{icon:r.jsx(If,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(Of,{icon:r.jsx(If,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Zx,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Jx,children:e}),r.jsx("p",{css:Xx,children:t})]}),r.jsx(Mf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(zf,{}),onClick:s})]}),a,r.jsxs("div",{css:Yx,children:[r.jsx(Mf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{}),onClick:l}),r.jsx(rw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=Ow,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Ef("MapControlsToolbar",h),f=[{icon:t.jsx(Kf,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(Gf,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(Zf,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(Jf,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(Xf,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(Yf,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(Qf,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(ug,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=vb,exports.MapMarkers=bb,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Ef("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:v,context:b,middlewareData:y,placement:x}=Sx({open:e,onOpenChange:t,placement:c,whileElementsMounted:Uy,middleware:[ox(d),(w={fallbackAxisSideDirection:"start"},{...Zy(w),options:[w,C]}),ix({padding:8}),sx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=yx(),v=$y("function"==typeof c?c:()=>!1),b="function"==typeof c?v:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Cx(f),{escapeKey:C,outsidePress:k}=Cx(m),S=l.useRef(!1),$=$y((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Cy(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),j=$y((e=>{var t;const n=()=>{var t;$(e),null==(t=yy(e))||t.removeEventListener("keydown",n)};null==(t=yy(e))||t.addEventListener("keydown",n)})),E=$y((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=yy(e),l="[data-floating-ui-inert]",c=wy(o.floating).querySelectorAll(l);let u=Sb(a)?a:null;for(;u&&!Vb(u);){const e=_b(u);if(Vb(e)||!Sb(e))break;u=e}if(c.length&&Sb(a)&&!a.matches("html,body")&&!by(a,o.floating)&&Array.from(c).every((e=>!by(u,e))))return;if($b(a)&&O){const t=Vb(a),n=Hb(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Cy(g.nodesRef.current,h).some((t=>{var n;return xy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(xy(e,o.floating)||xy(e,o.domReference)||p)return;const f=g?Cy(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),M=$y((e=>{var t;const n=()=>{var t;E(e),null==(t=yy(e))||t.removeEventListener(d,n)};null==(t=yy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),Pb()?5:0)}const u=wy(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),b&&u.addEventListener(d,k?M:E,k);let h=[];return p&&(Sb(o.domReference)&&(h=qb(o.domReference)),Sb(o.floating)&&(h=h.concat(qb(o.floating))),!Sb(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(qb(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(d,k?M:E,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,b,d,n,r,p,s,x,w,$,C,j,E,k,M]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,b,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[xx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[wx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(b,{escapeKey:u,outsidePress:h}),S=Ex(b,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>$x(t,e,"reference")),t),i=l.useCallback((t=>$x(t,e,"floating")),n),s=l.useCallback((t=>$x(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:j,y:E}=y.arrow??{x:null,y:null},M={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==M&&"right"!==M||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:v,"aria-label":"Map popup dialog","aria-modal":!0,...$(),css:Mx,children:[r.jsxs("div",{css:Tx,children:[i,r.jsx(sg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:Ox,children:s}),a?r.jsx("div",{css:Lx,children:a}):null,r.jsx("div",{ref:m,css:Ax(T,O,j,E,M,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=jm,exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual"})=>{const l=o.length,[c,d]=n.useState((()=>NT(o,t)));return r.jsx("div",{css:OT,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=NT(o,e);d(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":d,"aria-describedby":u,disabled:h,...p}=t,f=`${t.value}-str-status`,m=[`tab ${n+1} of ${l}`,c===n?"selected":"not selected"];h&&m.push("disabled");const g=[u,f].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:LT,"aria-label":d||o,"aria-disabled":!!h||void 0,"aria-describedby":g,disabled:h,...p,children:[r.jsxs("div",{css:AT,children:[i,a?r.jsx("div",{css:RT,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:f,children:m.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p})=>{const f=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(XC,{disabled:!d,nodeRef:f,children:r.jsx(e.Dialog.Positioner,{ref:f,children:r.jsxs(e.Dialog.Content,{"aria-label":"Modal dialog",css:YC(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:QC,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:ek,asChild:!0,children:r.jsx(sg,{})})]}),r.jsx(e.Dialog.Body,{css:tk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:mg,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Mf,{css:{},label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d,...u}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[r.jsx(e.Menu.Trigger,{css:pg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Mf,{style:gg,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(If,{"aria-hidden":"true",rotate:h?"180":"0",color:w("accessible","text-on-primary-mids")||w("primary",900)}),disabled:l})}),r.jsx(vg,{children:a.map((({label:t,value:n,onClick:i})=>r.jsx(e.Menu.Item,{css:fg(o),onClick:i,value:n,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Ef("Navbar",f),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=rO),[$,j]=n.useState(!1),E=i,M=n.useCallback((()=>{if(v.current&&g.current&&b.current){const e=g.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=b.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=rO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>rO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=rO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)})),[M]);const T="condensed"===e;return r.jsxs("nav",{css:DT(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:PT(y&&!k,d,T),children:[r.jsxs("div",{css:zT(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:b,css:VT,children:o}):null,r.jsx("div",{css:HT(y),children:a?.map((e=>e.link?r.jsx(E,{to:e.link,href:e.link,css:BT(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:_T(T),ref:v,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":m.openMenuLabel,css:WT(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(zf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(lm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:_T(T),children:l?.map(((e,t)=>r.jsx("div",{css:FT(y),children:e},t)))}),c?.length?r.jsx("div",{css:qT(y),children:c.map((e=>r.jsx(Mf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:IT(t,T),children:a?.map((e=>e.link?r.jsx(E,{to:e.link,href:e.link,css:BT(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(nO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Ef("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:oO,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:iO,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:sO,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:aO,children:[r.jsx("div",{css:sO,children:d?r.jsx(Af,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:lO,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((t=>{return r.jsxs(e.RadioCard.Item,{css:Og,value:t.value,disabled:t.disabled,children:[r.jsx(e.RadioCard.ItemHiddenInput,{}),r.jsxs(e.RadioCard.ItemControl,{css:Lg,children:[r.jsxs("div",{css:(o=t.variant,i.css`
3902
3902
  width: 100%;
3903
3903
  display: flex;
3904
3904
  flex-direction: ${"centered"===o?"column":"row"};
@@ -3912,7 +3912,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3912
3912
  padding: 0;
3913
3913
  padding-top: ${k(200)};
3914
3914
  color: ${n?w("neutral",500):"inherit"};
3915
- `),children:t.children}):null]},`${t.label}-${t.value}`);var n,o}))})}),exports.Pagination=Dw,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId(),[l,c]=n.useState(void 0),[d,u]=n.useState(void 0),h=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{c(h?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,o]);return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[QC(s),"fixed"===i?ek:tk],children:[e?r.jsx("div",{id:a,css:nk,ref:h,children:e}):null,r.jsx("div",{css:rk(l,d),children:t}),o?r.jsx("div",{css:ok,ref:p,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Ef("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,v]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),b={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsxs("div",{css:zv,children:[r.jsxs("p",{css:Vv,"aria-label":e,children:[o?r.jsx("span",{children:"*"}):null,e]}),r.jsx("p",{css:Hv,"aria-label":t,children:t}),r.jsxs("div",{css:Bv,children:[r.jsx(Ym,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="very-weak",e.length>=4&&n>=2&&(t.strength="weak"),e.length>=6&&n>=3&&(t.strength="medium"),e.length>=l&&n>=4&&(t.strength="strong"),e.length>=l+2&&n>=5&&(t.strength="very-strong"),m(e),v(t),a&&a({...t,password:e})})(e.target.value)}),r.jsx(Mf,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(Bf,{}):r.jsx(Hf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:_v,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
3915
+ `),children:t.children}):null]},`${t.label}-${t.value}`);var n,o}))})}),exports.Pagination=Dw,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId(),[l,c]=n.useState(void 0),[d,u]=n.useState(void 0),h=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{c(h?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,o]);return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[nk(s),"fixed"===i?rk:ok],children:[e?r.jsx("div",{id:a,css:ik,ref:h,children:e}):null,r.jsx("div",{css:sk(l,d),children:t}),o?r.jsx("div",{css:ak,ref:p,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Ef("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,v]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),b={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsxs("div",{css:zv,children:[r.jsxs("p",{css:Vv,"aria-label":e,children:[o?r.jsx("span",{children:"*"}):null,e]}),r.jsx("p",{css:Hv,"aria-label":t,children:t}),r.jsxs("div",{css:Bv,children:[r.jsx(Ym,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="very-weak",e.length>=4&&n>=2&&(t.strength="weak"),e.length>=6&&n>=3&&(t.strength="medium"),e.length>=l&&n>=4&&(t.strength="strong"),e.length>=l+2&&n>=5&&(t.strength="very-strong"),m(e),v(t),a&&a({...t,password:e})})(e.target.value)}),r.jsx(Mf,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(Bf,{}):r.jsx(Hf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:_v,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
3916
3916
  font-size: ${C(400)};
3917
3917
  line-height: ${S(600)};
3918
3918
  font-weight: 400;
@@ -3923,7 +3923,7 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3923
3923
  font-weight: 700;
3924
3924
  color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
3925
3925
  }
3926
- `),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Fv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:qv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:qv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:qv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:qv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:qv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e})=>{let t=e;return t>100&&(t=100),t<0&&(t=0),r.jsx("div",{css:HO,role:"progressbar","aria-label":`Progress: ${t}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,children:r.jsx("div",{css:BO(t)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(em,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Ef("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,v="line"===e,b="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return v&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:aw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:lw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:ow(i)}),v&&r.jsx("div",{css:iw(i)}),b&&r.jsx("div",{css:sw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:cw,children:t}),o?r.jsx("p",{id:m,css:dw,children:o}):null]})]}),s&&a?r.jsx("div",{css:uw,children:r.jsx(Mf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Bf,{}):r.jsx(Hf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Vg,exports.RadioGroup=Hg,exports.RadioList=({label:t,caption:n,name:o,radios:s,defaultValue:a,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:h,labels:p})=>{const f=Ef("RadioList",p),m=`${t}. ${n?`${n}.`:""} ${h?f.requiredLabel:f.optionalLabel} ${c?`${f.errorPrefix} ${c}.`:""} `;return r.jsxs(e.Group,{css:Wv,"aria-roledescription":"group","aria-label":m,children:[c?r.jsx("div",{css:Zv}):null,r.jsxs("div",{css:(g=!!c,i.css`
3926
+ `),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Fv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:qv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:qv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:qv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:qv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:qv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e})=>{let t=e;return t>100&&(t=100),t<0&&(t=0),r.jsx("div",{css:FO,role:"progressbar","aria-label":`Progress: ${t}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,children:r.jsx("div",{css:qO(t)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(em,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Ef("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,v="line"===e,b="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return v&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:aw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:lw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:ow(i)}),v&&r.jsx("div",{css:iw(i)}),b&&r.jsx("div",{css:sw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:cw,children:t}),o?r.jsx("p",{id:m,css:dw,children:o}):null]})]}),s&&a?r.jsx("div",{css:uw,children:r.jsx(Mf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Bf,{}):r.jsx(Hf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Vg,exports.RadioGroup=Hg,exports.RadioList=({label:t,caption:n,name:o,radios:s,defaultValue:a,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:h,labels:p})=>{const f=Ef("RadioList",p),m=`${t}. ${n?`${n}.`:""} ${h?f.requiredLabel:f.optionalLabel} ${c?`${f.errorPrefix} ${c}.`:""} `;return r.jsxs(e.Group,{css:Wv,"aria-roledescription":"group","aria-label":m,children:[c?r.jsx("div",{css:Zv}):null,r.jsxs("div",{css:(g=!!c,i.css`
3927
3927
  margin-left: ${g?"1.1875rem":"0"};
3928
3928
  `),children:[r.jsxs("p",{css:Uv,"aria-label":t,children:[h&&r.jsx("span",{"aria-label":f.requiredSymbolLabel,children:"*"}),t]}),r.jsx("p",{css:Kv,"aria-label":n,children:n}),c?r.jsx("p",{css:Jv,"aria-label":c,children:c}):null,r.jsx("div",{css:Gv,children:r.jsx(Hg,{name:o,value:a,onChange:l,horizontal:d&&"card"!==u,children:s.map((e=>r.jsx(Vg,{css:"card"===u?Xv:{},...e},e.value)))})})]})]});var g},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=rg,onChange:a,labels:c})=>{const d=Ef("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!1,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(ng.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(ng.Toolbar,{children:r.jsxs(ng.ControlGroup,{children:[s.includes("undo")?r.jsx(_m,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(Fm,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Rm,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(Wm,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Nm,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Dm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Im,{label:d.italicTooltip}):null,s.includes("underline")?r.jsx(Pm,{label:d.underlineTooltip}):null,s.includes("strikethrough")?r.jsx(zm,{label:d.strikethroughTooltip}):null,s.includes("bulletList")?r.jsx(Vm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(Hm,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(Qm,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(Bm,{label:d.imageTooltip}):null]})}),r.jsx(ng.Content,{})]})},exports.SSOButtons=og,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:hw,children:[o?r.jsx("div",{css:(s=vw(e),i.css`
3929
3929
  height: ${k(500)};
@@ -3932,4 +3932,4 @@ function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3932
3932
  border: ${j(100)} solid ${w("neutral",300)};
3933
3933
  border-radius: ${$(300)};
3934
3934
  ${s?`background: ${s};`:""}
3935
- `)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Ef("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[E,M]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):E&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>M(!0),onBlur:()=>M(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(mO,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3})=>{const f=n.useRef(null),m=n.useRef([]),[g,v]=n.useState(null),b=window.innerWidth>768,y=m.current;let x="Expand sheet";if(null!=g){const e=bT(g,y);e>0&&e<y.length-1?x="Make full screen":e===y.length-1&&(x="Expanded sheet")}const w=!(null==g||!y.length||bT(g,y)!==y.length-1);return r.jsx(mT,{ref:f,css:vT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:w,"aria-label":x,css:gT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=y[y.length-1];if(b)return void f.current?.snapTo?.((()=>t));const n=g??y[0];let r=y.findIndex((e=>e>n));-1===r&&(r=y.length-1);const o=y[r];f.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:x}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return m.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Ef("StepProgressIndicator",n);return r.jsxs("div",{css:_O,children:[e.map(((e,n)=>r.jsxs("div",{css:FO,children:[r.jsx("button",{css:qO(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:WO(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:UO,children:r.jsx("div",{css:KO})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(hO(i,o)||0);return r.jsx("div",{css:sO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(hO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===pO(l)?r.jsx("div",{css:cO}):null,r.jsx(e.Tabs.Trigger,{css:[aO,"view"===t&&dO,"panel"===t&&lO,"transparent"===t&&uO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===pO(l)?r.jsx("div",{css:cO}):null]},o.label)))})})})},exports.Table=({columns:t,data:o=[],renderRow:i,striped:s,stickyHeader:a,pagination:l,selectable:c,selectedRows:d,variant:u="default",onSortColumn:h,onPageSizeChange:p,onPageChange:f,onAllItemsSelected:m,loading:g,height:v,labels:b})=>{const y=Ef("Table",b),[x,C]=n.useState({key:"",order:""}),k=n.useRef({}),[S,$]=n.useState({}),{totalItems:j=o.length,currentPage:E=1,pageSize:M=10,showItemCount:T,showItemCountText:O}=l||{},L=(e,t)=>{C({key:e,order:t}),h&&h({key:e,order:t})},A=d?.length===o?.length,R=d&&d.length>0&&!A,N=n.useMemo((()=>t.reduce(((e,t)=>(e[t.key]=t,e)),{})),[t]),D=t.filter((e=>e.sticky)).map((e=>e.key)),I=D.length>0?D[D.length-1]:void 0,P=n.useCallback((()=>{const e={};let n=0;t.filter((e=>e.sticky)).forEach((t=>{e[t.key]=n,n+=k.current[t.key]?.offsetWidth||0})),$(e)}),[t]);n.useEffect((()=>{P()}),[P,o.length]),n.useEffect((()=>{const e=()=>{P()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[P]);const z=e=>{const t=N[e]?.width;return t?{width:t,minWidth:t}:{}},V=e=>{const t=S[e.key];return void 0===t?{}:{"data-sticky":"start","data-sticky-last":e.key===I?"true":void 0,left:`${t}px`}},H=e=>{const t=z(e),n=S[e];return void 0===n?t:{...t,"data-sticky":"start","data-sticky-last":e===I?"true":void 0,left:`${n}px`}};return r.jsxs("div",{children:[r.jsx("div",{css:v?qw(v):void 0,children:r.jsxs(e.Table.Root,{css:Iw(u,a),striped:s,stickyHeader:a,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(u),children:r.jsxs(e.Table.Row,{children:[c?r.jsx(e.Table.ColumnHeader,{children:r.jsx(kg,{name:"header-checkbox","aria-label":"Select all rows",checked:A,indeterminate:R,onCheckedChange:({checked:e})=>{m&&m(e)}})}):null,t.map((t=>r.jsx(e.Table.ColumnHeader,{ref:e=>{k.current[t.key]=e},...z(t.key),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===x.order?"ascending":t.sortable&&"desc"===x.order?"descending":void 0,...V(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Hw(x.key===t.key&&"asc"===x.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>L(t.key,"asc"),"aria-label":y.ascendingLabel}),r.jsx(Of,{css:Hw(x.key===t.key&&"desc"===x.order),icon:r.jsx(If,{}),onClick:()=>L(t.key,"desc"),"aria-label":y.descendingLabel})]}):null]})},t.key)))]})}),r.jsx(e.Table.Body,{css:Fw,children:o.map((e=>r.jsx(n.Fragment,{children:i(e,{className:d?.some((t=>t.id===e.id))?"selected":void 0,getCellProps:H})},e.id)))})]})}),g?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Bw,children:[r.jsx("div",{children:T?r.jsx(ww,{pageSize:M,currentPage:E,totalItems:j,onPageSizeChange:p,showItemCountText:O}):null}),l?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:j,pageSize:M,currentPage:E,onPageChange:f})}):null]})]})},exports.TableCell=Kw,exports.TableRow=Uw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",defaultValue:d="",onChange:u,minLength:h,maxLength:p,labels:f,...m})=>{const g=Ef("Textarea",f),[v,b]=n.useState(d),[y,x]=n.useState(!1),[w,C]=n.useState(!1),[k,S]=n.useState(""),$=n.useId(),j=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=d;h&&e<h&&e>0?(x(e<h),C(!1),S(g.enterAtLeastChars(h-e))):h&&0===e&&S(g.minChars(h)),p&&e>0?(x(!1),C(e>p),S(g.charsRemaining(p-e))):p&&0===e&&S(g.maxChars(p))}),[]);const M=!!s||y||w,T=[o?$:null,M?j:null,k?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[M?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:M,gap:"0",style:{marginLeft:M?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":g.requiredSymbolLabel}),t,a?"":r.jsx("span",{children:g.optionalSuffix})]}):null,o?r.jsx(e.Field.HelperText,{id:$,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:j,css:sb,"aria-label":`${g.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,v,d),onChange:e=>{b(e.target.value);const{length:t}=e.target.value;h&&p?(x(t<h),C(t>p),S(g.charsRemaining(p-t))):h?(x(t<h),C(!1),S(t<h?g.enterAtLeastChars(h-t):"")):p&&(C(t>p),x(!1),S(g.charsRemaining(p-t))),u&&u(e)},value:v,"aria-label":t||i,"aria-describedby":T,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...m}),y&&h?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.needMoreChars(h-v.length)}):null,w&&p?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.tooManyChars(v.length-p)}):null,!k||w||y?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:k})]})]})},exports.Toast=({labels:t})=>{const n=Ef("Toast",t);return Object.keys(eL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:eL[t],insetInline:{mdDown:"4"},children:o=>r.jsxs(e.Toast.Root,{css:GO,width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:ZO,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:JO,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Mf,{css:XO,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),eL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Mf,{css:YO,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),eL[t].dismiss()}}):null]}):null]})})},t)))},exports.Toolbar=ug,exports.Tooltip=Tm,exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{eL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose},...e})};
3935
+ `)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Ef("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[E,M]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):E&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>M(!0),onBlur:()=>M(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(bO,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3})=>{const f=n.useRef(null),m=n.useRef([]),[g,v]=n.useState(null),b=window.innerWidth>768,y=m.current;let x="Expand sheet";if(null!=g){const e=wT(g,y);e>0&&e<y.length-1?x="Make full screen":e===y.length-1&&(x="Expanded sheet")}const w=!(null==g||!y.length||wT(g,y)!==y.length-1);return r.jsx(bT,{ref:f,css:xT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:w,"aria-label":x,css:yT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=y[y.length-1];if(b)return void f.current?.snapTo?.((()=>t));const n=g??y[0];let r=y.findIndex((e=>e>n));-1===r&&(r=y.length-1);const o=y[r];f.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:x}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return m.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Ef("StepProgressIndicator",n);return r.jsxs("div",{css:WO,children:[e.map(((e,n)=>r.jsxs("div",{css:UO,children:[r.jsx("button",{css:KO(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:GO(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:ZO,children:r.jsx("div",{css:JO})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(mO(i,o)||0);return r.jsx("div",{css:cO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(mO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===gO(l)?r.jsx("div",{css:hO}):null,r.jsx(e.Tabs.Trigger,{css:[dO,"view"===t&&pO,"panel"===t&&uO,"transparent"===t&&fO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===gO(l)?r.jsx("div",{css:hO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Ef("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),[j,E]=n.useState({}),[M,T]=n.useState([]),{totalItems:O=i.length,currentPage:L=1,pageSize:A=10,showItemCount:R,showItemCountText:N}=c||{},D=Boolean(p),I=n.useMemo((()=>Gw(i,k,D)),[i,D,k]),P=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},z=u??M,V=I.length>0&&z.length===I.length,H=z.length>0&&z.length<I.length,B=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),_=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),F=(e=>e.length>0?e[e.length-1]:void 0)(_),q=n.useCallback((()=>{const e=((e,t)=>{const n={};let r=0;return e.filter((e=>e.sticky)).forEach((e=>{n[e.key]=r,r+=t[e.key]?.offsetWidth||0})),n})(o,$.current);E(e)}),[o]);n.useEffect((()=>{q()}),[q,i.length]),n.useEffect((()=>{const e=()=>{q()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[q]),n.useEffect((()=>{void 0===u&&T((e=>((e,t)=>e.filter((e=>t.some((t=>t.id===e.id)))))(e,i)))}),[i,u]);const W=e=>Kw(j,e.key,F),U=e=>((e,t,n,r)=>({...Uw(e,n),...Kw(t,n,r)}))(B,j,e,F),K=e=>((e,t)=>e.some((e=>e.id===t.id)))(z,e),G=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i})=>(s,a)=>{const{id:l,name:c}=s;return t.jsxs(e.Table.Row,{className:a?.className,children:[r?t.jsx(e.Table.Cell,{children:t.jsx(kg,{name:`checkbox-${l}`,"aria-label":`Select row ${c||l}`,checked:o(s),onCheckedChange:({checked:e})=>{i(s,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...a?.getCellProps(n.key),children:n.cell?n.cell(s):s?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:K,onRowSelected:(e,t)=>{void 0===u&&T((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)}}),Z=s||G;return r.jsxs("div",{children:[r.jsx("div",{css:y?qw(y):void 0,children:r.jsxs(e.Table.Root,{css:Iw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{children:r.jsx(kg,{name:"header-checkbox","aria-label":"Select all rows",checked:V,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&T(e?I:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Uw(B,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...W(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Hw(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>P(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:Hw(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>P(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Fw,children:I.map((e=>r.jsx(n.Fragment,{children:Z(e,{className:K(e)?"selected":void 0,getCellProps:U})},e.id)))})]})}),b?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Bw,children:[r.jsx("div",{children:R?r.jsx(ww,{pageSize:A,currentPage:L,totalItems:O,onPageSizeChange:f,showItemCountText:N}):null}),c?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:O,pageSize:A,currentPage:L,onPageChange:m})}):null]})]})},exports.TableCell=Jw,exports.TableRow=Zw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",defaultValue:d="",onChange:u,minLength:h,maxLength:p,labels:f,...m})=>{const g=Ef("Textarea",f),[v,b]=n.useState(d),[y,x]=n.useState(!1),[w,C]=n.useState(!1),[k,S]=n.useState(""),$=n.useId(),j=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=d;h&&e<h&&e>0?(x(e<h),C(!1),S(g.enterAtLeastChars(h-e))):h&&0===e&&S(g.minChars(h)),p&&e>0?(x(!1),C(e>p),S(g.charsRemaining(p-e))):p&&0===e&&S(g.maxChars(p))}),[]);const M=!!s||y||w,T=[o?$:null,M?j:null,k?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[M?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:M,gap:"0",style:{marginLeft:M?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":g.requiredSymbolLabel}),t,a?"":r.jsx("span",{children:g.optionalSuffix})]}):null,o?r.jsx(e.Field.HelperText,{id:$,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:j,css:sb,"aria-label":`${g.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,v,d),onChange:e=>{b(e.target.value);const{length:t}=e.target.value;h&&p?(x(t<h),C(t>p),S(g.charsRemaining(p-t))):h?(x(t<h),C(!1),S(t<h?g.enterAtLeastChars(h-t):"")):p&&(C(t>p),x(!1),S(g.charsRemaining(p-t))),u&&u(e)},value:v,"aria-label":t||i,"aria-describedby":T,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...m}),y&&h?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.needMoreChars(h-v.length)}):null,w&&p?r.jsx(e.Field.ErrorText,{id:j,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:g.tooManyChars(v.length-p)}):null,!k||w||y?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:k})]})]})},exports.Toast=({labels:t})=>{const n=Ef("Toast",t);return Object.keys(rL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:rL[t],insetInline:{mdDown:"4"},children:o=>r.jsxs(e.Toast.Root,{css:XO,width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:YO,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:QO,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Mf,{css:eL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),rL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Mf,{css:tL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),rL[t].dismiss()}}):null]}):null]})})},t)))},exports.Toolbar=ug,exports.Tooltip=Tm,exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{rL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose},...e})};