@worldresources/wri-design-systems 2.191.1 → 2.191.3
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 +60 -55
- package/dist/index.d.ts +6 -6
- package/dist/index.esm.js +62 -57
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2282,6 +2282,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2282
2282
|
background-color: ${Re("neutral",200)};
|
|
2283
2283
|
}
|
|
2284
2284
|
`,Nl=({id:e,label:t,caption:n,icon:o,value:a,variant:l="data",onItemClick:s,isExpanded:c=!1,ariaLabel:d,disabled:u=!1,isHighlighted:p=!1})=>{const h=("navigation"===l||"select"===l)&&!!s,f=h?T.button:T.div,g=d||("data"===l&&a?`${t}, ${a}`:t);return ve(f,{id:e,css:["data"===l?_l:Dl,p&&{backgroundColor:Re("neutral",200)}],onClick:h?s:void 0,tabIndex:h?0:void 0,onKeyDown:e=>{h&&("Enter"!==e.key&&" "!==e.key||s?.())},role:h?"button":void 0,"aria-expanded":h?c:void 0,"aria-label":g,disabled:u,"aria-selected":p,children:[ve(P,{gap:3,flex:"1",overflow:"hidden",children:[o,ve(r,{flex:"1",minWidth:0,children:[be(M,{fontWeight:"data"===l?"400":"700",css:Ol(u),children:t}),n&&be(M,{css:Tl,children:n})]})]}),"data"===l&&a&&be(M,{css:Pl,children:a}),"navigation"===l&&be(i,{as:Ze,boxSize:4,"aria-hidden":"true",css:Ml(u)})]})},Il=({items:e,noBorder:t,highlightedIndex:n})=>be(r,{css:Rl(t),children:e.map(((e,t)=>be(Nl,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick,isHighlighted:t===n},e.id??e.label)))}),Vl=ye`
|
|
2285
|
+
background: transparent;
|
|
2285
2286
|
svg {
|
|
2286
2287
|
path {
|
|
2287
2288
|
fill: ${Re("primary",500)};
|
|
@@ -2307,7 +2308,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2307
2308
|
line-height: 1.5rem;
|
|
2308
2309
|
font-weight: 400;
|
|
2309
2310
|
color: ${Re("neutral",700)};
|
|
2310
|
-
|
|
2311
|
+
background: transparent;
|
|
2311
2312
|
&[data-selected] {
|
|
2312
2313
|
color: ${Re("neutral",900)};
|
|
2313
2314
|
font-weight: 700;
|
|
@@ -2356,7 +2357,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2356
2357
|
`,Wl=e=>ye`
|
|
2357
2358
|
svg {
|
|
2358
2359
|
path {
|
|
2359
|
-
fill: ${
|
|
2360
|
+
fill: ${Re("accessible",e?"controls-on-neutral-lights":100)} !important;
|
|
2360
2361
|
}
|
|
2361
2362
|
}
|
|
2362
2363
|
`,Gl=ye`
|
|
@@ -2376,13 +2377,17 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2376
2377
|
:hover {
|
|
2377
2378
|
background-color: ${Re("neutral",200)};
|
|
2378
2379
|
}
|
|
2380
|
+
|
|
2381
|
+
&.selected {
|
|
2382
|
+
background-color: ${Re("primary",100)} !important;
|
|
2383
|
+
}
|
|
2379
2384
|
}
|
|
2380
2385
|
`,Yl=ye`
|
|
2381
2386
|
height: 480px;
|
|
2382
2387
|
display: flex;
|
|
2383
2388
|
align-items: center;
|
|
2384
2389
|
justify-content: center;
|
|
2385
|
-
`,Kl=({columns:e,data:t=[],renderRow:n,striped:r,stickyHeader:i,pagination:a,selectable:l,selectedRows:s,variant:c="default",onSortColumn:d,onPageSizeChange:u,onPageChange:p,onAllItemsSelected:h,loading:f,labels:g})=>{const m=Ve("Table",g),[v,b]=ae({key:"",order:""}),{totalItems:x=t.length,currentPage:y=1,pageSize:w=10,showItemCount:C,showItemCountText:$}=a||{},k=(e,t)=>{b({key:e,order:t}),d&&d({key:e,order:t})},S=s?.length===t?.length,E=s&&s.length>0&&!S;return ve("div",{children:[ve(N.Root,{css:Bl(c),striped:r,stickyHeader:i,interactive:!0,children:[be(N.Header,{css:Fl(c),children:ve(N.Row,{children:[l?be(N.ColumnHeader,{children:be(tn,{name:"header-checkbox",checked:S,indeterminate:E,onCheckedChange:({checked:e})=>{h&&h(e)}})}):null,e.map((e=>be(N.ColumnHeader,{role:e.sortable?"columnheader":void 0,"aria-sort":e.sortable&&"asc"===v.order?"ascending":e.sortable&&"desc"===v.order?"descending":void 0,children:ve("div",{css:ql,children:[e.label,e.sortable?ve("div",{css:Zl,children:[be(St,{css:Wl(v.key===e.key&&"asc"===v.order),icon:be(qe,{style:{transform:"rotate(180deg)"}}),onClick:()=>k(e.key,"asc"),"aria-label":m.ascendingLabel}),be(St,{css:Wl(v.key===e.key&&"desc"===v.order),icon:be(qe,{}),onClick:()=>k(e.key,"desc"),"aria-label":m.descendingLabel})]}):null]})},e.key)))]})}),be(N.Body,{css:Xl,children:t.map((e=>be(te.Fragment,{children:n(e)},e.id)))})]}),f?be("div",{css:Yl,children:be(o,{size:"lg",color:Re("primary",500)})}):null,ve("div",{css:Gl,children:[be("div",{children:C?be(Ll,{pageSize:w,currentPage:y,totalItems:x,onPageSizeChange:u,showItemCountText:$}):null}),a?be("div",{css:Ul,children:be(Hl,{totalItems:x,pageSize:w,currentPage:y,onPageChange:p})}):null]})]})},Jl=N.Row,Ql=N.Cell,es=ye`
|
|
2390
|
+
`,Kl=({columns:e,data:t=[],renderRow:n,striped:r,stickyHeader:i,pagination:a,selectable:l,selectedRows:s,variant:c="default",onSortColumn:d,onPageSizeChange:u,onPageChange:p,onAllItemsSelected:h,loading:f,labels:g})=>{const m=Ve("Table",g),[v,b]=ae({key:"",order:""}),{totalItems:x=t.length,currentPage:y=1,pageSize:w=10,showItemCount:C,showItemCountText:$}=a||{},k=(e,t)=>{b({key:e,order:t}),d&&d({key:e,order:t})},S=s?.length===t?.length,E=s&&s.length>0&&!S;return ve("div",{children:[ve(N.Root,{css:Bl(c),striped:r,stickyHeader:i,interactive:!0,children:[be(N.Header,{css:Fl(c),children:ve(N.Row,{children:[l?be(N.ColumnHeader,{children:be(tn,{name:"header-checkbox",checked:S,indeterminate:E,onCheckedChange:({checked:e})=>{h&&h(e)}})}):null,e.map((e=>be(N.ColumnHeader,{role:e.sortable?"columnheader":void 0,"aria-sort":e.sortable&&"asc"===v.order?"ascending":e.sortable&&"desc"===v.order?"descending":void 0,children:ve("div",{css:ql,children:[e.label,e.sortable?ve("div",{css:Zl,children:[be(St,{css:Wl(v.key===e.key&&"asc"===v.order),icon:be(qe,{style:{transform:"rotate(180deg)"}}),onClick:()=>k(e.key,"asc"),"aria-label":m.ascendingLabel}),be(St,{css:Wl(v.key===e.key&&"desc"===v.order),icon:be(qe,{}),onClick:()=>k(e.key,"desc"),"aria-label":m.descendingLabel})]}):null]})},e.key)))]})}),be(N.Body,{css:Xl,children:t.map((e=>be(te.Fragment,{children:n(e,{className:s?.some((t=>t.id===e.id))?"selected":void 0})},e.id)))})]}),f?be("div",{css:Yl,children:be(o,{size:"lg",color:Re("primary",500)})}):null,ve("div",{css:Gl,children:[be("div",{children:C?be(Ll,{pageSize:w,currentPage:y,totalItems:x,onPageSizeChange:u,showItemCountText:$}):null}),a?be("div",{css:Ul,children:be(Hl,{totalItems:x,pageSize:w,currentPage:y,onPageChange:p})}):null]})]})},Jl=N.Row,Ql=N.Cell,es=ye`
|
|
2386
2391
|
border: 1px solid ${Re("neutral",300)};
|
|
2387
2392
|
`,ts=ye`
|
|
2388
2393
|
padding: 16px;
|
|
@@ -2452,54 +2457,54 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2452
2457
|
*
|
|
2453
2458
|
* This source code is licensed under the MIT license found in the
|
|
2454
2459
|
* LICENSE file in the root directory of this source tree.
|
|
2455
|
-
*/function Os(){return ms||(ms=1,"production"===process.env.NODE_ENV?hs.exports=function(){if(cs)return fs;cs=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,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case l:case d:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return x(e)===c}return fs.AsyncMode=s,fs.ConcurrentMode=c,fs.ContextConsumer=l,fs.ContextProvider=a,fs.Element=t,fs.ForwardRef=d,fs.Fragment=r,fs.Lazy=f,fs.Memo=h,fs.Portal=n,fs.Profiler=i,fs.StrictMode=o,fs.Suspense=u,fs.isAsyncMode=function(e){return y(e)||x(e)===s},fs.isConcurrentMode=y,fs.isContextConsumer=function(e){return x(e)===l},fs.isContextProvider=function(e){return x(e)===a},fs.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},fs.isForwardRef=function(e){return x(e)===d},fs.isFragment=function(e){return x(e)===r},fs.isLazy=function(e){return x(e)===f},fs.isMemo=function(e){return x(e)===h},fs.isPortal=function(e){return x(e)===n},fs.isProfiler=function(e){return x(e)===i},fs.isStrictMode=function(e){return x(e)===o},fs.isSuspense=function(e){return x(e)===u},fs.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},fs.typeOf=x,fs}():hs.exports=(gs||(gs=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,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var g=e.type;switch(g){case s:case c:case r:case i:case o:case u:return g;default:var m=g&&g.$$typeof;switch(m){case l:case d:case f:case h:case a:return m;default:return p}}case n:return p}}}var y=s,w=c,C=l,$=a,k=t,S=d,E=r,L=f,R=h,O=n,T=i,P=o,M=u,_=!1;function D(e){return x(e)===c}Rs.AsyncMode=y,Rs.ConcurrentMode=w,Rs.ContextConsumer=C,Rs.ContextProvider=$,Rs.Element=k,Rs.ForwardRef=S,Rs.Fragment=E,Rs.Lazy=L,Rs.Memo=R,Rs.Portal=O,Rs.Profiler=T,Rs.StrictMode=P,Rs.Suspense=M,Rs.isAsyncMode=function(e){return _||(_=!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.")),D(e)||x(e)===s},Rs.isConcurrentMode=D,Rs.isContextConsumer=function(e){return x(e)===l},Rs.isContextProvider=function(e){return x(e)===a},Rs.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Rs.isForwardRef=function(e){return x(e)===d},Rs.isFragment=function(e){return x(e)===r},Rs.isLazy=function(e){return x(e)===f},Rs.isMemo=function(e){return x(e)===h},Rs.isPortal=function(e){return x(e)===n},Rs.isProfiler=function(e){return x(e)===i},Rs.isStrictMode=function(e){return x(e)===o},Rs.isSuspense=function(e){return x(e)===u},Rs.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},Rs.typeOf=x}()),Rs)),hs.exports}function Ts(){if(bs)return vs;bs=1;return vs="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Ps(){return ys?xs:(ys=1,xs=Function.call.bind(Object.prototype.hasOwnProperty))}function Ms(){if(ks)return $s;ks=1;var e=Os(),t=ke,n=Ts(),r=Ps(),o=function(){if(Cs)return ws;Cs=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ts(),n={},r=Ps();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,l,s){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((l||"React class")+": "+a+" 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,l,a,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+a+" `"+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 p=s?s():"";e("Failed "+a+" type: "+d.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},ws=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){}}),$s=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+i+" `"+a+"` of type `"+b(l)+"` supplied to `"+o+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,o,i,a+"["+s+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return l(i)?null:new h("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+b(a)+"` 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 a=e.name||d;return new h("Invalid "+o+" `"+i+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var l;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,a,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[o],c=b(s);if("object"!==c)return new h("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,i,a,l+"."+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 a=t[n],l=0;l<e.length;l++)if(p(a,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===x(t)?String(t):t}));return new h("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}))},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 "+y(o)+" at index "+t+"."),a}return f((function(t,o,i,a,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,a,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+a+" `"+l+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,a){var l=t[r],s=b(l);if("object"!==s)return new h("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return m(o,i,a,c,x(d));var u=d(l,c,o,i,a+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,a,l,s){var c=o[i],d=b(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},o[i],e);for(var p in u){var f=e[p];if(r(e,p)&&"function"!=typeof f)return m(a,l,s,p,x(f));if(!f)return new h("Invalid "+l+" `"+s+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(c,p,a,l,s+"."+p,n);if(g)return g}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(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,a,l,c,u,p,f){if(c=c||d,p=p||l,f!==n){if(s){var g=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 g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=c+":"+l;!t[m]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` 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[m]=!0,r++)}}return null==a[l]?o?null===a[l]?new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function g(e){return f((function(t,n,r,o,i,a){var l=t[n];return b(l)!==e?new h("Invalid "+o+" `"+i+"` of type `"+x(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function m(e,t,n,r,o){return new h((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||l(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 x(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 y(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},$s}function _s(){if(Ls)return ps.exports;if(Ls=1,"production"!==process.env.NODE_ENV){var e=Os();ps.exports=Ms()(e.isElement,!0)}else ps.exports=function(){if(Es)return Ss;Es=1;var e=Ts();function t(){}function n(){}return n.resetWarningCache=t,Ss=function(){function r(t,n,r,o,i,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}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}}()();return ps.exports}var Ds,Ns={exports:{}};var Is,Vs={},As={};function js(){if(Is)return As;return Is=1,Object.defineProperty(As,"__esModule",{value:!0}),As.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.`)},As.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]},As.int=function(e){return parseInt(e,10)},As.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},As.isNum=function(e){return"number"==typeof e&&!isNaN(e)},As}var zs,Hs,Bs={};function Fs(){if(Hs)return Vs;Hs=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.addClassName=a,Vs.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},Vs.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&&a(e.body,"react-draggable-transparent-selection")},Vs.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},Vs.createSVGTransform=function(e,t){return o(e,t,"")},Vs.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))},Vs.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},Vs.getTranslation=o,Vs.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},Vs.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},Vs.matchesSelector=r,Vs.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},Vs.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}},Vs.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},Vs.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},Vs.removeClassName=l,Vs.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},Vs.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=js(),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,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(a,t,i):a[t]=e[t]);return a}(e,t)}(function(){if(zs)return Bs;zs=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.browserPrefixToKey=n,Bs.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Bs.default=void 0,Bs.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 Bs.default=t(),Bs}());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&&l(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 a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function l(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Vs}var qs,Zs={};function Ws(){if(qs)return Zs;qs=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Zs.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Zs.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Zs.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}},Zs.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const l=n(r);if("string"==typeof a){const{ownerDocument:n}=l,r=n.defaultView;let o;if("parent"===a)o=l.parentNode;else{o=l.getRootNode().querySelector(a)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,s=r.getComputedStyle(l),c=r.getComputedStyle(i);a={left:-l.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(s.marginLeft),top:-l.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(s.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(l)-l.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(s.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(l)-l.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(s.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},Zs.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),l=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,l,o.props.scale)},Zs.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=js(),t=Fs();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Zs}var Gs,Us,Xs,Ys,Ks={},Js={};function Qs(){if(Gs)return Js;return Gs=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=function(){},Js}function ec(){if(Us)return Ks;Us=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.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,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(a,t,i):a[t]=e[t]);return a}(e,t)}(te),t=l(_s()),n=l(Ce),r=Fs(),o=Ws(),i=js(),a=l(Qs());function l(e){return e&&e.__esModule?e:{default:e}}function s(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 c={start:"touchstart",move:"touchmove",stop:"touchend"},d={start:"mousedown",move:"mousemove",stop:"mouseup"};let u=d,p=class extends e.Component{constructor(){super(...arguments),s(this,"dragging",!1),s(this,"lastX",NaN),s(this,"lastY",NaN),s(this,"touchIdentifier",null),s(this,"mounted",!1),s(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,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const i=(0,r.getTouchIdentifier)(e);this.touchIdentifier=i;const l=(0,o.getControlPosition)(e,i,this);if(null==l)return;const{x:s,y:c}=l,d=(0,o.createCoreData)(this,s,c);(0,a.default)("DraggableCore: handleDragStart: %j",d),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,r.addEvent)(n,u.move,this.handleDrag),(0,r.addEvent)(n,u.stop,this.handleDragStop))})),s(this,"handleDrag",(e=>{const t=(0,o.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,o.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const i=(0,o.createCoreData)(this,n,r);(0,a.default)("DraggableCore: handleDrag: %j",i);if(!1!==this.props.onDrag(e,i)&&!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)}})),s(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,o.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=i-this.lastY||0;[e,t]=(0,o.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,i=this.lastY+t}const l=(0,o.createCoreData)(this,n,i);if(!1===this.props.onStop(e,l)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(s.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(s.ownerDocument,u.move,this.handleDrag),(0,r.removeEvent)(s.ownerDocument,u.stop,this.handleDragStop))})),s(this,"onMouseDown",(e=>(u=d,this.handleDragStart(e)))),s(this,"onMouseUp",(e=>(u=d,this.handleDragStop(e)))),s(this,"onTouchStart",(e=>(u=c,this.handleDragStart(e)))),s(this,"onTouchEnd",(e=>(u=c,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,c.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,c.move,this.handleDrag),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(t,c.stop,this.handleDragStop),(0,r.removeEvent)(e,c.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ks.default=p,s(p,"displayName","DraggableCore"),s(p,"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:i.dontSetMe,style:i.dontSetMe,transform:i.dontSetMe}),s(p,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ks}function tc(){return Xs||(Xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return s.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,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(a,t,i):a[t]=e[t]);return a}(e,t)}(te),n=d(_s()),r=d(Ce),o=function(){if(Ds)return Ns.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 Ds=1,Ns.exports=t,Ns.exports.clsx=t,Ns.exports}(),i=Fs(),a=Ws(),l=js(),s=d(ec()),c=d(Qs());function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=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},u.apply(null,arguments)}function p(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 h 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,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),p(this,"onDragStart",((e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),p(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.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,a.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)})),p(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.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??r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:l,defaultClassName:c,defaultClassNameDragging:d,defaultClassNameDragged:p,position:h,positionOffset:f,scale:g,...m}=this.props;let v={},b=null;const x=!Boolean(h)||this.state.dragging,y=h||l,w={x:(0,a.canDragX)(this)&&x?this.state.x:y.x,y:(0,a.canDragY)(this)&&x?this.state.y:y.y};this.state.isElementSVG?b=(0,i.createSVGTransform)(w,f):v=(0,i.createCSSTransform)(w,f);const C=(0,o.clsx)(r.props.className||"",c,{[d]:this.state.dragging,[p]:this.state.dragged});return t.createElement(s.default,u({},m,{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=h,p(h,"displayName","Draggable"),p(h,"propTypes",{...s.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),p(h,"defaultProps",{...s.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(us)),us}var nc=function(){if(Ys)return ds.exports;Ys=1;const{default:e,DraggableCore:t}=tc();return ds.exports=e,ds.exports.default=e,ds.exports.DraggableCore=t,ds.exports}(),rc=ss(nc);const oc=(e="medium",t,n,r)=>{const o=r||{xsmall:"560px",small:"720px",medium:"720px",large:"720px",xlarge:"720px","full-width":"unset"}[e]||"560px";let i="auto";return n?i=n:"full-width"===e&&(i="90%"),ye`
|
|
2460
|
+
*/function Os(){return ms||(ms=1,"production"===process.env.NODE_ENV?hs.exports=function(){if(cs)return fs;cs=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,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case s:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case l:case d:case f:case h:case a:return e;default:return p}}case n:return p}}}function y(e){return x(e)===c}return fs.AsyncMode=s,fs.ConcurrentMode=c,fs.ContextConsumer=l,fs.ContextProvider=a,fs.Element=t,fs.ForwardRef=d,fs.Fragment=r,fs.Lazy=f,fs.Memo=h,fs.Portal=n,fs.Profiler=i,fs.StrictMode=o,fs.Suspense=u,fs.isAsyncMode=function(e){return y(e)||x(e)===s},fs.isConcurrentMode=y,fs.isContextConsumer=function(e){return x(e)===l},fs.isContextProvider=function(e){return x(e)===a},fs.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},fs.isForwardRef=function(e){return x(e)===d},fs.isFragment=function(e){return x(e)===r},fs.isLazy=function(e){return x(e)===f},fs.isMemo=function(e){return x(e)===h},fs.isPortal=function(e){return x(e)===n},fs.isProfiler=function(e){return x(e)===i},fs.isStrictMode=function(e){return x(e)===o},fs.isSuspense=function(e){return x(e)===u},fs.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},fs.typeOf=x,fs}():hs.exports=(gs||(gs=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,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=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,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var g=e.type;switch(g){case s:case c:case r:case i:case o:case u:return g;default:var m=g&&g.$$typeof;switch(m){case l:case d:case f:case h:case a:return m;default:return p}}case n:return p}}}var y=s,w=c,C=l,$=a,k=t,S=d,E=r,L=f,R=h,O=n,T=i,P=o,M=u,_=!1;function D(e){return x(e)===c}Rs.AsyncMode=y,Rs.ConcurrentMode=w,Rs.ContextConsumer=C,Rs.ContextProvider=$,Rs.Element=k,Rs.ForwardRef=S,Rs.Fragment=E,Rs.Lazy=L,Rs.Memo=R,Rs.Portal=O,Rs.Profiler=T,Rs.StrictMode=P,Rs.Suspense=M,Rs.isAsyncMode=function(e){return _||(_=!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.")),D(e)||x(e)===s},Rs.isConcurrentMode=D,Rs.isContextConsumer=function(e){return x(e)===l},Rs.isContextProvider=function(e){return x(e)===a},Rs.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Rs.isForwardRef=function(e){return x(e)===d},Rs.isFragment=function(e){return x(e)===r},Rs.isLazy=function(e){return x(e)===f},Rs.isMemo=function(e){return x(e)===h},Rs.isPortal=function(e){return x(e)===n},Rs.isProfiler=function(e){return x(e)===i},Rs.isStrictMode=function(e){return x(e)===o},Rs.isSuspense=function(e){return x(e)===u},Rs.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===m||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},Rs.typeOf=x}()),Rs)),hs.exports}function Ts(){if(bs)return vs;bs=1;return vs="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Ps(){return ys?xs:(ys=1,xs=Function.call.bind(Object.prototype.hasOwnProperty))}function Ms(){if(ks)return $s;ks=1;var e=Os(),t=ke,n=Ts(),r=Ps(),o=function(){if(Cs)return ws;Cs=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Ts(),n={},r=Ps();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,l,s){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((l||"React class")+": "+a+" 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,l,a,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((l||"React class")+": type specification of "+a+" `"+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 p=s?s():"";e("Failed "+a+" type: "+d.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},ws=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){}}),$s=function(l,s){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var l=t[r];if(!Array.isArray(l))return new h("Invalid "+i+" `"+a+"` of type `"+b(l)+"` supplied to `"+o+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,o,i,a+"["+s+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return l(i)?null:new h("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new h("Invalid "+o+" `"+i+"` of type `"+b(a)+"` 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 a=e.name||d;return new h("Invalid "+o+" `"+i+"` of type `"+(((l=t[n]).constructor&&l.constructor.name?l.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var l;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,a,l){if("function"!=typeof e)return new h("Property `"+l+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[o],c=b(s);if("object"!==c)return new h("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in s)if(r(s,d)){var u=e(s,d,i,a,l+"."+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 a=t[n],l=0;l<e.length;l++)if(p(a,e[l]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===x(t)?String(t):t}));return new h("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}))},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 "+y(o)+" at index "+t+"."),a}return f((function(t,o,i,a,l){for(var s=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,a,l,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&s.push(d.data.expectedType)}return new h("Invalid "+a+" `"+l+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,a){var l=t[r],s=b(l);if("object"!==s)return new h("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return m(o,i,a,c,x(d));var u=d(l,c,o,i,a+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,a,l,s){var c=o[i],d=b(c);if("object"!==d)return new h("Invalid "+l+" `"+s+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},o[i],e);for(var p in u){var f=e[p];if(r(e,p)&&"function"!=typeof f)return m(a,l,s,p,x(f));if(!f)return new h("Invalid "+l+" `"+s+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(c,p,a,l,s+"."+p,n);if(g)return g}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(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,a,l,c,u,p,f){if(c=c||d,p=p||l,f!==n){if(s){var g=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 g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=c+":"+l;!t[m]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` 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[m]=!0,r++)}}return null==a[l]?o?null===a[l]?new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,l,c,u,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function g(e){return f((function(t,n,r,o,i,a){var l=t[n];return b(l)!==e?new h("Invalid "+o+" `"+i+"` of type `"+x(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function m(e,t,n,r,o){return new h((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||l(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 x(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 y(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},$s}function _s(){if(Ls)return ps.exports;if(Ls=1,"production"!==process.env.NODE_ENV){var e=Os();ps.exports=Ms()(e.isElement,!0)}else ps.exports=function(){if(Es)return Ss;Es=1;var e=Ts();function t(){}function n(){}return n.resetWarningCache=t,Ss=function(){function r(t,n,r,o,i,a){if(a!==e){var l=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 l.name="Invariant Violation",l}}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}}()();return ps.exports}var Ds,Ns={exports:{}};var Is,Vs={},As={};function js(){if(Is)return As;return Is=1,Object.defineProperty(As,"__esModule",{value:!0}),As.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.`)},As.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]},As.int=function(e){return parseInt(e,10)},As.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},As.isNum=function(e){return"number"==typeof e&&!isNaN(e)},As}var zs,Hs,Bs={};function Fs(){if(Hs)return Vs;Hs=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.addClassName=a,Vs.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},Vs.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&&a(e.body,"react-draggable-transparent-selection")},Vs.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},Vs.createSVGTransform=function(e,t){return o(e,t,"")},Vs.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))},Vs.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},Vs.getTranslation=o,Vs.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},Vs.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},Vs.matchesSelector=r,Vs.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},Vs.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}},Vs.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},Vs.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},Vs.removeClassName=l,Vs.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},Vs.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=js(),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,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(a,t,i):a[t]=e[t]);return a}(e,t)}(function(){if(zs)return Bs;zs=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.browserPrefixToKey=n,Bs.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Bs.default=void 0,Bs.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 Bs.default=t(),Bs}());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&&l(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 a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function l(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Vs}var qs,Zs={};function Ws(){if(qs)return Zs;qs=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Zs.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Zs.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Zs.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}},Zs.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const l=n(r);if("string"==typeof a){const{ownerDocument:n}=l,r=n.defaultView;let o;if("parent"===a)o=l.parentNode;else{o=l.getRootNode().querySelector(a)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,s=r.getComputedStyle(l),c=r.getComputedStyle(i);a={left:-l.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(s.marginLeft),top:-l.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(s.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(l)-l.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(s.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(l)-l.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(s.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},Zs.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),l=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,l,o.props.scale)},Zs.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=js(),t=Fs();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Zs}var Gs,Us,Xs,Ys,Ks={},Js={};function Qs(){if(Gs)return Js;return Gs=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=function(){},Js}function ec(){if(Us)return Ks;Us=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.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,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(a,t,i):a[t]=e[t]);return a}(e,t)}(te),t=l(_s()),n=l(Ce),r=Fs(),o=Ws(),i=js(),a=l(Qs());function l(e){return e&&e.__esModule?e:{default:e}}function s(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 c={start:"touchstart",move:"touchmove",stop:"touchend"},d={start:"mousedown",move:"mousemove",stop:"mouseup"};let u=d,p=class extends e.Component{constructor(){super(...arguments),s(this,"dragging",!1),s(this,"lastX",NaN),s(this,"lastY",NaN),s(this,"touchIdentifier",null),s(this,"mounted",!1),s(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,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const i=(0,r.getTouchIdentifier)(e);this.touchIdentifier=i;const l=(0,o.getControlPosition)(e,i,this);if(null==l)return;const{x:s,y:c}=l,d=(0,o.createCoreData)(this,s,c);(0,a.default)("DraggableCore: handleDragStart: %j",d),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=c,(0,r.addEvent)(n,u.move,this.handleDrag),(0,r.addEvent)(n,u.stop,this.handleDragStop))})),s(this,"handleDrag",(e=>{const t=(0,o.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,o.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const i=(0,o.createCoreData)(this,n,r);(0,a.default)("DraggableCore: handleDrag: %j",i);if(!1!==this.props.onDrag(e,i)&&!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)}})),s(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,o.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=i-this.lastY||0;[e,t]=(0,o.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,i=this.lastY+t}const l=(0,o.createCoreData)(this,n,i);if(!1===this.props.onStop(e,l)||!1===this.mounted)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(s.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(s.ownerDocument,u.move,this.handleDrag),(0,r.removeEvent)(s.ownerDocument,u.stop,this.handleDragStop))})),s(this,"onMouseDown",(e=>(u=d,this.handleDragStart(e)))),s(this,"onMouseUp",(e=>(u=d,this.handleDragStop(e)))),s(this,"onTouchStart",(e=>(u=c,this.handleDragStart(e)))),s(this,"onTouchEnd",(e=>(u=c,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,c.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,c.move,this.handleDrag),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(t,c.stop,this.handleDragStop),(0,r.removeEvent)(e,c.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ks.default=p,s(p,"displayName","DraggableCore"),s(p,"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:i.dontSetMe,style:i.dontSetMe,transform:i.dontSetMe}),s(p,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ks}function tc(){return Xs||(Xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return s.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,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(a,t,i):a[t]=e[t]);return a}(e,t)}(te),n=d(_s()),r=d(Ce),o=function(){if(Ds)return Ns.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 Ds=1,Ns.exports=t,Ns.exports.clsx=t,Ns.exports}(),i=Fs(),a=Ws(),l=js(),s=d(ec()),c=d(Qs());function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=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},u.apply(null,arguments)}function p(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 h 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,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),p(this,"onDragStart",((e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),p(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.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,a.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)})),p(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.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??r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:l,defaultClassName:c,defaultClassNameDragging:d,defaultClassNameDragged:p,position:h,positionOffset:f,scale:g,...m}=this.props;let v={},b=null;const x=!Boolean(h)||this.state.dragging,y=h||l,w={x:(0,a.canDragX)(this)&&x?this.state.x:y.x,y:(0,a.canDragY)(this)&&x?this.state.y:y.y};this.state.isElementSVG?b=(0,i.createSVGTransform)(w,f):v=(0,i.createCSSTransform)(w,f);const C=(0,o.clsx)(r.props.className||"",c,{[d]:this.state.dragging,[p]:this.state.dragged});return t.createElement(s.default,u({},m,{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=h,p(h,"displayName","Draggable"),p(h,"propTypes",{...s.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),p(h,"defaultProps",{...s.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(us)),us}var nc=function(){if(Ys)return ds.exports;Ys=1;const{default:e,DraggableCore:t}=tc();return ds.exports=e,ds.exports.default=e,ds.exports.DraggableCore=t,ds.exports}(),rc=ss(nc);const oc=e=>"number"==typeof e?`${(e=>parseFloat(e.toFixed(4)).toString())(.25*e)}rem`:e,ic=(e="medium",t,n,r)=>{const o=t?oc(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",i=r?oc(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===i?"80vh":`min(${i}, 80vh)`;let l="auto";return n?l=oc(n):"full-width"===e&&(l="90%"),ye`
|
|
2456
2461
|
max-width: 100%;
|
|
2457
|
-
width: ${
|
|
2458
|
-
height: ${
|
|
2459
|
-
max-height: ${
|
|
2462
|
+
width: ${o};
|
|
2463
|
+
height: ${l};
|
|
2464
|
+
max-height: ${a};
|
|
2460
2465
|
background-color: ${Re("neutral",100)};
|
|
2461
|
-
border:
|
|
2462
|
-
border-radius:
|
|
2463
|
-
box-shadow:
|
|
2464
|
-
box-shadow:
|
|
2465
|
-
`},
|
|
2466
|
+
border: 0.0625rem solid ${Re("neutral",300)};
|
|
2467
|
+
border-radius: 0.25rem;
|
|
2468
|
+
box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
|
|
2469
|
+
box-shadow: 0 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
2470
|
+
`},ac=ye`
|
|
2466
2471
|
height: 100%;
|
|
2467
|
-
min-height:
|
|
2472
|
+
min-height: 2.5rem;
|
|
2468
2473
|
display: flex;
|
|
2469
2474
|
align-items: center;
|
|
2470
2475
|
justify-content: space-between;
|
|
2471
|
-
padding:
|
|
2472
|
-
border-bottom:
|
|
2473
|
-
`,ac=ye`
|
|
2474
|
-
top: 10px;
|
|
2476
|
+
padding: 0.5rem;
|
|
2477
|
+
border-bottom: 0.0625rem solid ${Re("neutral",300)};
|
|
2475
2478
|
`,lc=ye`
|
|
2476
|
-
|
|
2477
|
-
`,sc=
|
|
2479
|
+
top: 0.625rem;
|
|
2480
|
+
`,sc=ye`
|
|
2481
|
+
padding: 0.75rem;
|
|
2482
|
+
`,cc=({header:e,content:t,footer:n,size:r="medium",width:o,height:i,maxHeight:a,draggable:s,blocking:c,open:d,onClose:u})=>{const p=le(null);return d?be(I.Root,{open:d,onOpenChange:u,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!s&&!c,preventScroll:!s&&!c,closeOnEscape:!c,defaultOpen:!0,children:ve(l,{children:[s?null:be(I.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),be(rc,{disabled:!s,nodeRef:p,children:be(I.Positioner,{ref:p,children:ve(I.Content,{css:ic(r,o,i,a),children:[ve(I.Header,{css:ac,children:[e,c?null:be(I.CloseTrigger,{css:lc,asChild:!0,children:be(Et,{})})]}),be(I.Body,{css:sc,children:t}),n?be(I.Footer,{padding:"0.75rem",children:n}):null]})})})]})}):null},dc=e=>ye`
|
|
2478
2483
|
height: 100%;
|
|
2479
|
-
width: ${e||"
|
|
2484
|
+
width: ${e||"20rem"};
|
|
2480
2485
|
background-color: ${Re("neutral",100)};
|
|
2481
|
-
box-shadow:
|
|
2482
|
-
box-shadow:
|
|
2486
|
+
box-shadow: 0 0.0625rem 0.125rem -0.0625rem #0000001a;
|
|
2487
|
+
box-shadow: 0 0.0625rem 0.1875rem 0 #0000001a;
|
|
2483
2488
|
position: relative;
|
|
2484
|
-
`,dc=ye`
|
|
2485
|
-
border-right: 1px solid ${Re("neutral",300)};
|
|
2486
2489
|
`,uc=ye`
|
|
2487
|
-
border:
|
|
2488
|
-
border-radius: 4px;
|
|
2490
|
+
border-right: 0.0625rem solid ${Re("neutral",300)};
|
|
2489
2491
|
`,pc=ye`
|
|
2490
|
-
|
|
2492
|
+
border: 0.0625rem solid ${Re("neutral",300)};
|
|
2493
|
+
border-radius: 0.25rem;
|
|
2494
|
+
`,hc=ye`
|
|
2495
|
+
min-height: 3rem;
|
|
2491
2496
|
width: 100%;
|
|
2492
|
-
border-bottom:
|
|
2493
|
-
`,
|
|
2494
|
-
height: ${((e,t)=>e&&t?`calc(100% - ${e+t}
|
|
2497
|
+
border-bottom: 0.0625rem solid ${Re("neutral",300)};
|
|
2498
|
+
`,fc=(e,t)=>ye`
|
|
2499
|
+
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)};
|
|
2495
2500
|
width: 100%;
|
|
2496
2501
|
overflow-y: auto;
|
|
2497
2502
|
|
|
2498
2503
|
&:focus-visible {
|
|
2499
2504
|
outline-color: ${Re("primary",700)};
|
|
2500
2505
|
}
|
|
2501
|
-
`,
|
|
2502
|
-
min-height:
|
|
2506
|
+
`,gc=ye`
|
|
2507
|
+
min-height: 4rem;
|
|
2503
2508
|
width: 100%;
|
|
2504
2509
|
display: flex;
|
|
2505
2510
|
align-items: center;
|
|
@@ -2507,8 +2512,8 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2507
2512
|
position: absolute;
|
|
2508
2513
|
bottom: 0;
|
|
2509
2514
|
left: 0;
|
|
2510
|
-
border-top:
|
|
2511
|
-
`,
|
|
2515
|
+
border-top: 0.0625rem solid ${Re("neutral",300)};
|
|
2516
|
+
`,mc=({header:e,content:t,footer:n,variant:r="fixed",width:o})=>{const[i,a]=ae(void 0),[l,s]=ae(void 0),c=le(null),d=le(null);se((()=>{a(c?.current?.getBoundingClientRect()?.height),s(d?.current?.getBoundingClientRect()?.height)}),[e,n]);return ve("div",{css:[dc(o),"fixed"===r?uc:pc],children:[e?be("div",{css:hc,ref:c,children:e}):null,be("div",{css:fc(i,l),children:t}),n?be("div",{css:gc,ref:d,children:n}):null]})};var vc,bc;!function(){if(bc)return vc;bc=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))}}vc=e}();var xc=yc()?de:se;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function yc(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var wc=function(e){var t,n=e.children,r=e.type,o=void 0===r?"reach-portal":r,i=le(null),a=le(null),l=(t=ae(Object.create(null))[1],pe((function(){t(Object.create(null))}),[]));return xc((function(){if(i.current){var e=i.current.ownerDocument;return a.current=null==e?void 0:e.createElement(o),e.body.appendChild(a.current),l(),function(){a.current&&a.current.ownerDocument&&a.current.ownerDocument.body.removeChild(a.current)}}}),[o,l]),a.current?$e(n,a.current):he("span",{ref:i})};"production"!==process.env.NODE_ENV&&(wc.displayName="Portal");
|
|
2512
2517
|
/*! *****************************************************************************
|
|
2513
2518
|
Copyright (c) Microsoft Corporation.
|
|
2514
2519
|
|
|
@@ -2522,33 +2527,33 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
2522
2527
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2523
2528
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2524
2529
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2525
|
-
***************************************************************************** */var wc,Cc,$c=function(){return $c=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},$c.apply(this,arguments)};function kc(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 Sc(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 Ec(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a}function Lc(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"}(wc||(wc={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(Cc||(Cc={}));var Rc=wc.Start,Oc=wc.Stop,Tc=wc.Raise,Pc=wc.Send,Mc=wc.Cancel,_c=wc.NullEvent,Dc=wc.Assign;wc.After,wc.DoneState;var Nc=wc.Log,Ic=wc.Init,Vc=wc.Invoke;wc.ErrorExecution;var Ac,jc=wc.ErrorPlatform,zc=wc.ErrorCustom,Hc=wc.Update,Bc=wc.Choose,Fc=wc.Pure,qc={},Zc="xstate.guard",Wc="production"===process.env.NODE_ENV;function Gc(e,t,n){void 0===n&&(n=".");var r=Yc(e,n),o=Yc(t,n);return pd(o)?!!pd(r)&&o===r:pd(r)?r in o:Object.keys(r).every((function(e){return e in o&&Gc(r[e],o[e])}))}function Uc(e){try{return pd(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 Xc(e,t){try{return dd(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Yc(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:dd(e)?Kc(e):"string"!=typeof e?e:Kc(Xc(e,t));var n}function Kc(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 Jc(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 Qc(e,t,n){var r,o,i={};try{for(var a=Sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];n(c)&&(i[s]=t(c,s,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var ed=function(e){return function(t){var n,r,o=t;try{for(var i=Sc(e),a=i.next();!a.done;a=i.next()){o=o[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function td(e){return e?pd(e)?[[e]]:nd(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?td(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function nd(e){var t;return(t=[]).concat.apply(t,Lc([],Ec(e),!1))}function rd(e){return dd(e)?e:[e]}function od(e){return void 0===e?[]:rd(e)}function id(e,t,n){var r,o;if(ud(e))return e(t,n.data);var i={};try{for(var a=Sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];ud(c)?i[s]=c(t,n.data):i[s]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function ad(e){return e instanceof Promise||!(null===e||!ud(e)&&"object"!=typeof e||!ud(e.then))}function ld(e,t){return Jc(e.states,(function(e,n){if(e){var r=(pd(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:ld(e,r)}}}))}function sd(e,t,n,r){Wc||cd(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,a=n.assignment,l={state:r,action:n,_event:t},s={};if(ud(a))s=a(e,t.data,l);else try{for(var c=Sc(Object.keys(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=a[u];s[u]=ud(p)?p(e,t.data,l):p}}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,s)}),e):e;return o}var cd=function(){};function dd(e){return Array.isArray(e)}function ud(e){return"function"==typeof e}function pd(e){return"string"==typeof e}function hd(e,t){if(e)return pd(e)?{type:Zc,name:e,predicate:t?t[e]:void 0}:ud(e)?{type:Zc,name:e.name,predicate:e}:e}Wc||(cd=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 fd=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function gd(e){return!!e&&"__xstatenode"in e}function md(e,t){return pd(e)||"number"==typeof e?$c({type:e},t):e}function vd(e,t){if(!pd(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=md(e);return $c({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function bd(e,t){return rd(t).map((function(t){return void 0===t||"string"==typeof t||gd(t)?{target:t,event:e}:$c($c({},t),{event:e})}))}function xd(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Zc)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,a);var l=null==i?void 0:i[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,a)}function yd(e){return"string"==typeof e?{type:e}:e}function wd(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 Cd(e,t){return"".concat(e,":invocation[").concat(t,"]")}function $d(e){return(e.type===Tc||e.type===Pc&&e.to===Cc.Internal)&&"number"!=typeof e.delay}(Ac={})[fd]=function(){return this},Ac[Symbol.observable]=function(){return this};var kd=vd({type:Ic});function Sd(e,t){return t&&t[e]||void 0}function Ed(e,t){var n;if(pd(e)||"number"==typeof e)n=ud(r=Sd(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(ud(e))n={type:e.name||e.toString(),exec:e};else{var r;if(ud(r=Sd(e.type,t)))n=$c($c({},e),{exec:r});else if(r){var o=r.type||e.type;n=$c($c($c({},r),e),{type:o})}else n=e}return n}var Ld=function(e,t){return e?(dd(e)?e:[e]).map((function(e){return Ed(e,t)})):[]};function Rd(e){var t=Ed(e);return $c($c({id:pd(e)?e:t.id},t),{type:t.type})}function Od(e,t){var n="".concat(wc.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Td(e,t){var n="".concat(wc.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Pd(e,t){var n="".concat(wc.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Md(e,t,n,r,o,i,a){void 0===a&&(a=!1);var l=a?[]:function(e){var t,n,r=[];try{for(var o=Sc(e),i=o.next();!i.done;i=o.next())for(var a=i.value,l=0;l<a.actions.length;)a.actions[l].type!==Dc?l++:(r.push(a.actions[l]),a.actions.splice(l,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),s=l.length?sd(n,r,l,t):n,c=a?[n]:void 0,d=[];function u(o,l){var u;switch(l.type){case Tc:var p=function(e,t,n,r){var o,i={_event:n},a=vd(ud(e.event)?e.event(t,n.data,i):e.event);if(pd(e.delay)){var l=r&&r[e.delay];o=ud(l)?l(t,n.data,i):l}else o=ud(e.delay)?e.delay(t,n.data,i):e.delay;return $c($c({},e),{type:Tc,_event:a,delay:o})}(l,s,r,e.options.delays);return i&&"number"==typeof p.delay&&i(p,s,r),p;case Pc:var h=function(e,t,n,r){var o,i={_event:n},a=vd(ud(e.event)?e.event(t,n.data,i):e.event);if(pd(e.delay)){var l=r&&r[e.delay];o=ud(l)?l(t,n.data,i):l}else o=ud(e.delay)?e.delay(t,n.data,i):e.delay;var s=ud(e.to)?e.to(t,n.data,i):e.to;return $c($c({},e),{to:s,_event:a,event:a.data,delay:o})}(l,s,r,e.options.delays);if(!Wc){var f=l.delay;cd(!pd(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&h.to!==Cc.Internal&&("entry"===o?d.push(h):i(h,s,r)),h;case Nc:var g=function(e,t,n){return $c($c({},e),{value:pd(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(l,s,r);return null==i||i(g,s,r),g;case Bc:if(!(x=null===(u=l.conds.find((function(n){var o=hd(n.cond,e.options.guards);return!o||xd(e,o,s,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var m=Ec(Md(e,t,s,r,[{type:o,actions:Ld(od(x),e.options.actions)}],i,a),2),v=m[0],b=m[1];return s=b,null==c||c.push(s),v;case Fc:var x;if(!(x=l.get(s,r.data)))return[];var y=Ec(Md(e,t,s,r,[{type:o,actions:Ld(od(x),e.options.actions)}],i,a),2),w=y[0],C=y[1];return s=C,null==c||c.push(s),w;case Oc:g=function(e,t,n){var r=ud(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:wc.Stop,activity:o}}(l,s,r);return null==i||i(g,n,r),g;case Dc:s=sd(s,r,[l],i?void 0:t),null==c||c.push(s);break;default:var $=Ed(l,e.options.actions),k=$.exec;if(i)i($,s,r);else if(k&&c){var S=c.length-1,E=$c($c({},$),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,Lc([c[S]],Ec(t),!1))}});$=E}return $}}var p=nd(o.map((function(e){var t,n,o=[];try{for(var a=Sc(e.actions),l=a.next();!l.done;l=a.next()){var c=l.value,p=u(e.type,c);p&&(o=o.concat(p))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,s,r)})),d.length=0,o})));return[p,s]}var _d=function(e,t){return t(e)};function Dd(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[fd]=function(){return this},t}function Nd(e,t,n){var r=Dd(t);if(r.deferred=!0,gd(e)){var o=r.state=_d(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var Id=function(e){return"atomic"===e.type||"final"===e.type};function Vd(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function Ad(e){return Vd(e).filter((function(e){return"history"!==e.type}))}function jd(e){var t=[e];return Id(e)?t:t.concat(nd(Ad(e).map(jd)))}function zd(e,t){var n,r,o,i,a,l,s,c,d=Bd(new Set(e)),u=new Set(t);try{for(var p=Sc(u),h=p.next();!h.done;h=p.next())for(var f=($=h.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Bd(u);try{for(var m=Sc(u),v=m.next();!v.done;v=m.next()){if("compound"!==($=v.value).type||g.get($)&&g.get($).length){if("parallel"===$.type)try{for(var b=(a=void 0,Sc(Ad($))),x=b.next();!x.done;x=b.next()){var y=x.value;u.has(y)||(u.add(y),d.get(y)?d.get(y).forEach((function(e){return u.add(e)})):y.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}}else d.get($)?d.get($).forEach((function(e){return u.add(e)})):$.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var w=Sc(u),C=w.next();!C.done;C=w.next()){var $;for(f=($=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return u}function Hd(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Id(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=Hd(e,t)})),o}function Bd(e){var t,n,r=new Map;try{for(var o=Sc(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}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 Fd(e,t){return Hd(e,Bd(zd([e],t)))}function qd(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Zd(e,t){return"compound"===t.type?Ad(t).some((function(t){return"final"===t.type&&qd(e,t)})):"parallel"===t.type&&Ad(t).every((function(t){return Zd(e,t)}))}function Wd(e){return new Set(nd(e.map((function(e){return e.tags}))))}function Gd(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(pd(e)||pd(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Gd(e[n],t[n])}))}var Ud=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=qc,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||qc,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 Lc([],Ec(new Set(nd(Lc([],Ec(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:kd,_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=kd;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="."),pd(e))return[e];var r=Object.keys(e);return r.concat.apply(r,Lc([],Ec(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=kc(e,["configuration","transitions","tags","machine"]);return $c($c({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Gc(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Wc&&cd(!!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}(),Xd={deferEvents:!1},Yd=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=$c($c({},Xd),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}(),Kd=new Map,Jd=0,Qd=function(){return"x:".concat(Jd++)},eu=function(e,t){return Kd.set(e,t),e},tu=function(e){return Kd.get(e)},nu=function(e){Kd.delete(e)};function ru(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Wc||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 ou(e){if(ru()){var t=function(){var e=ru();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function iu(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(e){var t;return $c(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[fd]=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,l),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=wd(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),l={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,a}var au,lu={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(au||(au={}));var su=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=au.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(dd(e))return r.batch(e),r.state;var n=vd(md(e,t));if(r.status===au.Stopped)return Wc||cd(!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!==au.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===Cc.Parent||r.parent.id===t),a=i?r.parent:pd(t)?t===Cc.Internal?r:r.children.get(t)||tu(t):(o=t)&&"function"==typeof o.send?t:void 0;if(a)if("machine"in a){if(r.status!==au.Stopped||r.parent!==a||r.state.done){var l=$c($c({},e),{name:e.name===zc?"".concat(Pd(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,l]):a.send(l)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Wc||cd(!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||Sd(e.type,o),a=ud(i)?i:i?i.exec:e.exec;if(a)try{return a(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 Tc:var l=e;r.defer(l);break;case Pc:var s=e;if("number"==typeof s.delay)return void r.defer(s);s.to?r.sendTo(s._event,s.to,n===kd):r.send(s._event);break;case Mc:r.cancel(e.sendId);break;case Rc:if(r.status!==au.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===wc.Invoke){var d=yd(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,p=c.id,h=c.data;Wc||cd(!("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(Wc||cd(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var g=h?id(h,t,n):void 0;if("string"==typeof u)return;var m=ud(u)?u(t,n.data,{data:g,src:d,meta:c.meta}):u;if(!m)return;var v=void 0;gd(m)&&(m=g?m.withContext(g):m,v={autoForward:f}),r.spawn(m,p,v)}else r.spawnActivity(c);break;case Oc:r.stopChild(e.activity.id);break;case Nc:var b=e,x=b.label,y=b.value;x?r.logger(x,y):r.logger(y);break;default:Wc||cd(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=$c($c({},e.defaultOptions),n),i=o.clock,a=o.logger,l=o.parent,s=o.id,c=void 0!==s?s:t.id;this.id=c,this.logger=a,this.clock=i,this.parent=l,this.options=o,this.scheduler=new Yd({deferEvents:this.options.deferEvents}),this.sessionId=Qd()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:_d(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Wc||cd(this.status!==au.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=Sc(e.actions),i=o.next();!i.done;i=o.next()){var a=i.value;this.exec(a,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,a,l,s,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==kd||!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 p=Sc(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=Sc(this.listeners),g=f.next();!g.done;g=f.next()){(0,g.value)(e,e.event)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var m=Sc(this.contextListeners),v=m.next();!v.done;v=m.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{v&&!v.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),x=b&&b.doneData?id(b.doneData,e.context,t):void 0;this._doneEvent=Td(this.id,x);try{for(var y=Sc(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}this._stop(),this._stopChildren(),nu(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===au.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=wd(e,t,n);this.listeners.add(o.next),this.status!==au.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===au.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===au.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===au.Running)return this;this.machine._init(),eu(this.sessionId,this),this.initialized=!0,this.status=au.Running;var n=void 0===e?this.initialState:_d(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(Ud.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,kd)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){ud(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,a,l,s,c;try{for(var d=Sc(this.listeners),u=d.next();!u.done;u=d.next()){var p=u.value;this.listeners.delete(p)}}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 h=Sc(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=Sc(this.contextListeners),m=g.next();!m.done;m=g.next()){p=m.value;this.contextListeners.delete(p)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var v=Sc(this.doneListeners),b=v.next();!b.done;b=v.next()){p=b.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=au.Stopped,this._initialState=void 0;try{for(var x=Sc(Object.keys(this.delayedEventsMap)),y=x.next();!y.done;y=x.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=x.return)&&c.call(x)}finally{if(s)throw s.error}}this.scheduler.clear(),this.scheduler=new Yd({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=vd({type:"xstate.stop"}),r=_d(e,(function(){var t=nd(Lc([],Ec(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return Ld(t.onExit,e.machine.options.actions)}))),r=Ec(Md(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],a=new Ud({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!$d(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),nu(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===au.NotStarted&&this.options.deferEvents)Wc||cd(!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!==au.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,a=!1,l=[],s=function(e){var r=vd(e);t.forward(r),i=_d(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),l.push.apply(l,Lc([],Ec(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return $c($c({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),a=a||!!i.changed};try{for(var c=Sc(e),d=c.next();!d.done;d=c.next()){s(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=a,i.actions=l,t.update(i,vd(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=vd(e);if(0===r.name.indexOf(jc)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(jc)})))throw r.data.data;return _d(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=Sc(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,a=this.children.get(i);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));a.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),ud(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==au.Running)return Nd(e,t);if(ad(e))return this.spawnPromise(Promise.resolve(e),t);if(ud(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&&ud(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(gd(e))return this.spawnMachine(e,$c($c({},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,$c($c({},this.options),{parent:this,id:n.id||t.id})),i=$c($c({},lu),n);i.sync&&o.onTransition((function(e){r.send(Hc,{state:e,id:o.id})}));var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(vd(e,{origin:o.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=iu(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(vd(Td(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=Pd(t,e);try{o.send(vd(n,{origin:t}))}catch(r){!function(e,t,n){if(!Wc){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 a=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=wd(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}})[fd]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,a=!1,l=new Set,s=new Set;try{o=e((function(e){r=e,s.forEach((function(t){return t(e)})),a||i.send(vd(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send(Pd(t,e))}if(ad(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=wd(e);return s.add(t.next),{unsubscribe:function(){s.delete(t.next)}}},stop:function(){a=!0,ud(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[fd]=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(vd(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(vd(Pd(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(vd(Td(t),{origin:t}))})),a=((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}}})[fd]=function(){return this},n);return this.children.set(t,a),a},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 Wc||cd(!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}}})[fd]=function(){return this},n))},e.prototype.attachDev=function(){var e=ru();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($c($c({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:$c({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}ou(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[fd]=function(){return this},e.prototype.getSnapshot=function(){return this.status===au.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=cu,e}();function cu(e,t){return new su(e,t)}function du(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function uu(e){return $c($c({type:Vc},e),{toJSON:function(){e.onDone,e.onError;var t=kc(e,["onDone","onError"]);return $c($c({},t),{type:Vc,src:du(e.src)})}})}var pu="",hu="*",fu={},gu=function(e){return"#"===e[0]},mu=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,a=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||Lc([this.machine.key],Ec(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,Wc||cd(!("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?Jc(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,$c(((r={})[o.id]=o,r),o.idMap)),o})):fu;var l=0;!function e(t){var n,r;t.order=l++;try{for(var o=Sc(Vd(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===pu})):pu in this.config.on),this.strict=!!this.config.strict,this.onEntry=od(this.config.entry||this.config.onEntry).map((function(e){return Ed(e)})),this.onExit=od(this.config.exit||this.config.onExit).map((function(e){return Ed(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=od(this.config.invoke).map((function(e,t){var n,r;if(gd(e)){var o=Cd(a.id,t);return a.machine.options.services=$c(((n={})[o]=e,n),a.machine.options.services),uu({src:o,id:o})}if(pd(e.src)){o=e.id||Cd(a.id,t);return uu($c($c({},e),{id:o,src:e.src}))}if(gd(e.src)||ud(e.src)){o=e.id||Cd(a.id,t);return a.machine.options.services=$c(((r={})[o]=e.src,r),a.machine.options.services),uu($c($c({id:o},e),{src:o}))}var i=e.src;return uu($c($c({id:Cd(a.id,t)},e),{src:i}))})),this.activities=od(this.config.activities).concat(this.invoke).map((function(e){return Rd(e)})),this.transition=this.transition.bind(this),this.tags=od(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||jd(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,l=r.services,s=r.delays;return new e(this.config,{actions:$c($c({},o),t.actions),activities:$c($c({},i),t.activities),guards:$c($c({},a),t.guards),services:$c($c({},l),t.services),delays:$c($c({},s),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 ud(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:Jc(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===pu,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===hu}));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(wc.After,"(").concat(e,")").concat(n)}(ud(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:Pc,event:ud(e)?e:md(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:ud(e)?e.name:Uc(e)}}(r,{delay:t})),e.onExit.push({type:Mc,sendId:r}),r},r=dd(t)?t.map((function(e,t){var r=n(e.delay,t);return $c($c({},e),{event:r})})):nd(Object.keys(t).map((function(e,r){var o=t[e],i=pd(o)?{target:o}:o,a=isNaN(+e)?e:+e,l=n(a,r);return od(i).map((function(e){return $c($c({},e),{event:l,delay:a})}))})));return r.map((function(t){var n=t.delay;return $c($c({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Ud?e.value:Yc(e,this.delimiter);if(pd(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),a=[this];return a.push.apply(a,Lc([],Ec(nd(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=Uc(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Ud?e:Ud.create(e),n=Array.from(zd([],this.getStateNodes(t.value)));return new Ud($c($c({},t),{value:this.resolve(t.value),configuration:n,done:Zd(n,this),tags:Wd(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 a=Sc(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];if(c){var d=this.getStateNode(s)._transition(c,t,n);d&&(i[s]=d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),p=nd(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=nd(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:p,exitSet:nd(u.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:nd(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return pd(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,vd(t))},e.prototype.next=function(e,t){var n,r,o,i=this,a=t.name,l=[],s=[];try{for(var c=Sc(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=u.cond,h=u.in,f=e.context,g=!h||(pd(h)&&gu(h)?e.matches(Yc(this.getStateNodeById(h).path,this.delimiter)):Gc(Yc(h,this.delimiter),ed(this.path.slice(0,-2))(e.value))),m=!1;try{m=!p||xd(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(m&&g){void 0!==u.target&&(s=u.target),l.push.apply(l,Lc([],Ec(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(!s.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:l};var v=nd(s.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:nd(s.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:l}}},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,a){var l,s,c,d,u=this,p=i?zd([],this.getStateNodes(i.value)):[],h=new Set;try{for(var f=Sc(Array.from(e).sort((function(e,t){return e.order-t.order}))),g=f.next();!g.done;g=f.next()){(!qd(p,b=g.value)||qd(n.exitSet,b)||b.parent&&h.has(b.parent))&&h.add(b)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}try{for(var m=Sc(p),v=m.next();!v.done;v=m.next()){var b;qd(e,b=v.value)&&!qd(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=m.return)&&d.call(m)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var x=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),w=nd(x.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(Od(e.id,e.doneData),Od(i.id,e.doneData?id(e.doneData,r,o):void 0));var a=i.parent;return"parallel"===a.type&&Ad(a).every((function(e){return Zd(n.configuration,e)}))&&t.push(Od(a.id)),t}))),C=x.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=Rd(e);return{type:wc.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:Ld(a?Lc(Lc([],Ec(t),!1),Ec(n),!1):Lc(Lc([],Ec(n),!1),Ec(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:Tc,event:"function"==typeof e?e:md(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),$=Array.from(y).map((function(e){return{type:"exit",actions:Ld(Lc(Lc([],Ec(e.onExit),!1),Ec(e.activities.map((function(e){return function(e){var t=ud(e)?e:Rd(e);return{type:wc.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:Ld(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=Ld(nd(Lc([],Ec(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!$d(e)}));return $.concat({type:"stop",actions:k})}return $},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,a=vd(t);if(e instanceof Ud)o=void 0===n?e:this.resolveState(Ud.from(e,n));else{var l=pd(e)?this.resolve(Kc(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;o=this.resolveState(Ud.from(l,s))}if(!Wc&&a.name===hu)throw new Error("An event cannot have the wildcard type ('".concat(hu,"')"));if(this.strict&&!this.events.includes(a.name)&&(i=a.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=zd([],this.getStateNodes(o.value)),u=c.configuration.length?zd(d,c.configuration):d;return c.configuration=Lc([],Ec(u),!1),this.resolveTransition(c,o,o.context,r,a)},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,Lc([],Ec(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,a,l,s,c=this;void 0===o&&(o=kd);var d=e.configuration,u=!t||e.transitions.length>0,p=u?e.configuration:t?t.configuration:[],h=Zd(p,this),f=u?Fd(this.machine,d):void 0,g=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,m=this.getActions(new Set(p),h,e,n,o,t,r),v=t?$c({},t.activities):{};try{for(var b=Sc(m),x=b.next();!x.done;x=b.next()){var y=x.value;try{for(var w=(l=void 0,Sc(y.actions)),C=w.next();!C.done;C=w.next()){var $=C.value;$.type===Rc?v[$.activity.id||$.activity.type]=$:$.type===Oc&&(v[$.activity.id||$.activity.type]=!1)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}}}catch(e){i={error:e}}finally{try{x&&!x.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}var k,S,E=Ec(Md(this,t,n,o,m,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=E[0],R=E[1],O=Ec(function(e,t){var n,r,o=Ec([[],[]],2),i=o[0],a=o[1];try{for(var l=Sc(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(L,$d),2),T=O[0],P=O[1],M=L.filter((function(e){var t;return e.type===Rc&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Vc})),_=M.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=yd(e.src),a=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],l=e.data?id(e.data,n,r):void 0,s=a?Nd(a,e.id,l):Dd(e.id);return s.meta=e,s}(t.activity,c.machine,R,o),e}),t?$c({},t.children):{}),D=new Ud({value:f||t.value,context:R,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?g?(k=g,S=f,{current:S,states:ld(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?P:[],activities:f?v:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:_,done:h,tags:Wd(p),machine:this}),N=n!==R;D.changed=o.name===Hc||N;var I=D.history;I&&delete I.history;var V=!h&&(this._transient||d.some((function(e){return e._transient})));if(!(u||V&&o.name!==pu))return D;var A=D;if(!h)for(V&&(A=this.resolveRaisedTransition(A,{type:_c},o,r));T.length;){var j=T.shift();A=this.resolveRaisedTransition(A,j._event,o,r)}var z=A.changed||(I?!!A.actions.length||N||typeof I.value!=typeof A.value||!Gd(A.value,I.value):void 0);return A.changed=z,A.history=I,A},e.prototype.getStateNode=function(e){if(gu(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=gu(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&&gu(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Xc(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||fu;switch(this.type){case"parallel":return Jc(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):fu}));case"compound":if(pd(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Jc(e,(function(e,t){return e?n.getStateNode(t).resolve(e):fu})):this.initialStateValue||{};default:return e||fu}},e.prototype.getResolvedPath=function(e){if(gu(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 Xc(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=Qc(this.states,(function(e){return e.initialStateValue||fu}),(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=Id(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=pd(t.target)&&gu(t.target)?Kc(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 Id(this)?[this]:"compound"!==this.type||this.initial?nd(td(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Wc||cd(!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=Ec(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:Qc(this.states,(function(t,n){if(!e)return t.historyValue();var r=pd(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?nd(td(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,a=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var a=Sc(o),l=a.next();!l.done;l=a.next()){var s=l.value;r=r[i][s]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return pd(a)?[n.getStateNode(a)]:nd(td(a).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=nd(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 a=Sc(Object.keys(o)),l=a.next();!l.done;l=a.next()){var s=o[l.value];if(s.states)try{for(var c=(n=void 0,Sc(s.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{l&&!l.done&&(t=a.return)&&t.call(a)}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(!pd(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 od(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return pd(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),a=$c($c({},e),{actions:Ld(od(e.actions)),cond:hd(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return $c($c({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},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=hu,a=o[i],l=void 0===a?[]:a,s=kc(o,["*"]);n=nd(Object.keys(s).map((function(e){Wc||e!==pu||cd(!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=bd(e,s[e]);return Wc||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(pd(e.target)||gd(e.target))})),o=t===pu?"the transient event":"event '".concat(t,"'");cd(!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(bd(hu,l)))}else n=[];var c=this.config.always?bd("",this.config.always):[],d=this.config.onDone?bd(String(Od(this.id)),this.config.onDone):[];Wc||cd(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=nd(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,Lc([],Ec(bd(String(Td(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,Lc([],Ec(bd(String(Pd(e.id)),e.onError)),!1)),t}))),p=this.after,h=nd(Lc(Lc(Lc(Lc([],Ec(d),!1),Ec(u),!1),Ec(n),!1),Ec(c),!1).map((function(e){return od(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=Sc(p),g=f.next();!g.done;g=f.next()){var m=g.value;h.push(m)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var vu,bu=function(e){return{type:Dc,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(vu||(vu={}));var xu="undefined"!=typeof document?de:function(){};function yu(e){var t=ee.useRef();return t.current||(t.current={v:e()}),t.current.v}var wu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a},Cu=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 $u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a},ku=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 Su(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function Eu(e){var t=le([]),n=le([]);xu((function(){var r=e.subscribe((function(e){var r,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=$u(function(e,t){var n,r,o=wu([[],[]],2),i=o[0],a=o[1];try{for(var l=Cu(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(i,(function(e){return e.exec.__effect===vu.Effect})),2),l=a[0],s=a[1];(r=t.current).push.apply(r,ku([],$u(l.map((function(t){return[t,e]}))),!1)),(o=n.current).push.apply(o,ku([],$u(s.map((function(t){return[t,e]}))),!1))}}));return function(){r.unsubscribe()}}),[]),xu((function(){for(;n.current.length;){var e=$u(n.current.shift(),2);Su(e[0],e[1])}})),se((function(){for(;t.current.length;){var e=$u(t.current.shift(),2);Su(e[0],e[1])}}))}var Lu=function(){return Lu=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},Lu.apply(this,arguments)},Ru=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},Ou=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a};var Tu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a};function Pu(e,t){void 0===t&&(t={});var n=pe((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),r=function(e,t,n){void 0===t&&(t={});var r=yu((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var o=Ou(ae(r),1)[0];e!==o&&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 i=t.context,a=t.guards,l=t.actions,s=t.activities,c=t.services,d=t.delays,u=t.state,p=Ru(t,["context","guards","actions","activities","services","delays","state"]),h=yu((function(){var e={context:i,guards:a,actions:l,activities:s,services:c,delays:d};return cu(r.withConfig(e,(function(){return Lu(Lu({},r.context),i)})),Lu({deferEvents:!0},p))}));return xu((function(){var e;return n&&(e=h.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(n))),function(){null==e||e.unsubscribe()}}),[n]),xu((function(){return h.start(u?Ud.create(u):void 0),function(){h.stop()}}),[]),xu((function(){Object.assign(h.machine.options.actions,l),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,s),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,d)}),[l,a,s,c,d]),Eu(h),h}(e,t,n),o=Tu(ae((function(){var e=r.machine.initialState;return t.state?Ud.create(t.state):e})),2),i=o[0],a=o[1];return[i,r.send,r]}function Mu(){return Mu=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},Mu.apply(null,arguments)}function _u(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 Du={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(Du.str(e)||Du.num(e))return e===t;if(Du.obj(e)&&Du.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!Du.und(n)||e===t}};function Nu(e,t){return Du.und(e)||Du.nul(e)?t:e}function Iu(e){return Du.und(e)?[]:Du.arr(e)?e:[e]}function Vu(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 Du.fun(e)?e(...n):e}function Au(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,_u(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(Du.und(t))return Mu({to:t},e);const n=Object.keys(e).reduce(((n,r)=>Du.und(t[r])?Mu({},n,{[r]:e[r]}):n),{});return Mu({to:t},n)}class ju{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 zu extends ju{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof ju&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof ju&&e.removeChild(this)))}}class Hu extends ju{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof ju&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof ju&&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 ju)&&(t[n]=r instanceof ju?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Bu,Fu;let qu,Zu=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Wu,Gu=()=>Date.now();class Uu extends Hu{constructor(e,t){super(),this.update=void 0,this.payload=e.style?Mu({},e,{style:Wu(e.style)}):e,this.update=t,this.attach()}}let Xu=!1;const Yu=new Set,Ku=()=>{if(!Xu)return!1;let e=Gu();for(let t of Yu){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let l=a.fromValues[t],s=a.toValues[t],c=r.lastPosition,d=s instanceof ju,u=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(d&&(s=s.getValue()),a.immediate)r.setValue(s),r.done=!0;else if("string"!=typeof l&&"string"!=typeof s){if(void 0!==a.duration)c=l+a.easing((e-r.startTime)/a.duration)*(s-l),o=e>=r.startTime+a.duration;else if(a.decay)c=l+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(s=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-a.tension*(c-s)+-a.friction*u)/a.mass)/1e3,c+=1*u/1e3}let n=!(!a.clamp||0===a.tension)&&(l<s?c>s:c<s),d=Math.abs(u)<=a.precision,p=0===a.tension||Math.abs(s-c)<=a.precision;o=n||d&&p,r.lastVelocity=u,r.lastTime=e}d&&!a.toValues[t].done&&(o=!1),o?(r.value!==s&&(c=s),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(s),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Yu.delete(t),t.stop(!0))}return Yu.size?Zu(Ku):Xu=!1,Xu};function Ju(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Ju({range:e,output:t,extrapolate:n});if(qu&&"string"==typeof e.output[0])return qu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=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,a,l,s){let c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(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],s,a,l,r.map)}}class Qu extends zu{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof zu&&!(e instanceof Qu)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Ju(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Ju(e,t,n)}interpolate(e,t,n){return new Qu(this,e,t,n)}}const ep=(e,t,n)=>e&&new Qu(e,t,n);function tp(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>tp(e,t)))}class np extends ju{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&&tp(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Qu(this,e,t,n)}}class rp extends zu{constructor(e){super(),this.payload=e.map((e=>new np(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 Qu(this,e,t)}}let op=0,ip=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=op++}update(e){if(!e)return this;const t=Au(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=_u(t,["delay","to"]);if(Du.arr(o)||Du.fun(o))this.queue.push(Mu({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const a=Mu({to:{[n]:o},delay:Vu(r,n)},i),l=e[a.delay]&&e[a.delay].to;e[a.delay]=Mu({},e[a.delay],a,{to:Mu({},l,a.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;Du.obj(n)&&(this.merged=Mu({},n,this.merged)),Du.obj(o)&&(this.merged=Mu({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,a=_u(r,["delay"]);const l=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let s=Du.arr(a.to)||Du.fun(a.to);i?setTimeout((()=>{t===this.guid&&(s?this.runAsync(a,l):this.diff(a).start(l))}),i):s?this.runAsync(a,l):this.diff(a).start(l)}))}else Du.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Yu.has(t)||Yu.add(t),Xu||(Xu=!0,Zu(Ku));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,Yu.has(t)&&Yu.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=_u(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(Du.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=Mu({},r,Au(r.to[t]));Du.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(Du.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=Mu({},r,Au(n));if(Du.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=Mu({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,a=t.config,l=void 0===a?{}:a,s=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(s){var p=[i,r];r=p[0],i=p[1]}this.merged=Mu({},r,this.merged,i),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const a=Du.num(o),s=Du.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Fu[o],c=Du.arr(o),p=!a&&!c&&!s;let f=Du.und(r[n])?o:r[n],g=a||c||s?o:1,m=Vu(l,n);h&&(g=h.animations[n].parent);let v,b=i.parent,x=i.interpolation,y=Iu(h?g.getPayload():g),w=o;p&&(w=qu({range:[0,1],output:[o,o]})(1));let C=x&&x.getValue();const $=!Du.und(b)&&i.animatedValues.some((e=>!e.done)),k=!Du.equ(w,C),S=!Du.equ(w,i.previous),E=!Du.equ(m,i.config);if(d||S&&k||E){if(a||s)b=x=i.parent||new np(f);else if(c)b=x=i.parent||new rp(f);else if(p){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 np(0);const t={output:[e,o]};i.interpolation?(x=i.interpolation,i.interpolation.updateConfig(t)):x=b.interpolate(t)}return y=Iu(h?g.getPayload():g),v=Iu(b.getPayload()),d&&!p&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=$?e.lastVelocity:void 0,e.lastTime=$?e.lastTime:void 0,e.startTime=Gu(),e.done=!1,e.animatedStyles.clear()})),Vu(u,n)&&b.setValue(p?g:o,!1),Mu({},e,{[n]:Mu({},i,{name:n,parent:b,interpolation:x,animatedValues:v,toValues:y,previous:w,config:m,fromValues:Iu(b.getValue()),immediate:Vu(u,n),initialVelocity:Nu(m.velocity,0),clamp:Nu(m.clamp,!1),precision:Nu(m.precision,.01),tension:Nu(m.tension,170),friction:Nu(m.friction,26),mass:Nu(m.mass,1),duration:m.duration,easing:Nu(m.easing,(e=>e)),decay:m.decay})})}return k?e:(p&&(b.setValue(1,!1),x.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,Mu({},e,{[n]:Mu({},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 ap=e=>{const t=Du.fun(e),n=((e,t)=>{const n=le(!1),r=le(),o=Du.fun(t),i=oe((()=>{let n;return r.current&&(r.current.map((e=>e.destroy())),r.current=void 0),[new Array(e).fill().map(((e,r)=>{const i=new ip,a=o?Vu(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),a=i[0],l=i[1];r.current=a,fe(l,(()=>({start:()=>Promise.all(r.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>r.current.forEach((t=>t.stop(e))),get controllers(){return r.current}})));const s=oe((()=>e=>r.current.map(((t,n)=>{t.update(o?Vu(e,n,t):e[n]),l||t.start()}))),[e]);se((()=>{n.current?o||s(t):l||r.current.forEach((e=>e.start()))})),se((()=>(n.current=!0,()=>r.current.forEach((e=>e.destroy())))),[]);const c=r.current.map((e=>e.getValues()));return o?[c,s,e=>r.current.forEach((t=>t.pause(e)))]:c})(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r};class lp extends Hu{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof ju||(e=Bu.transform(e)),this.payload=e}}const sp={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},cp="[-+]?\\d*\\.?\\d+",dp=cp+"%";function up(){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 pp=new RegExp("rgb"+up(cp,cp,cp)),hp=new RegExp("rgba"+up(cp,cp,cp,cp)),fp=new RegExp("hsl"+up(cp,dp,dp)),gp=new RegExp("hsla"+up(cp,dp,dp,cp)),mp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,bp=/^#([0-9a-fA-F]{6})$/,xp=/^#([0-9a-fA-F]{8})$/;function yp(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 wp(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=yp(o,r,e+1/3),a=yp(o,r,e),l=yp(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Cp(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function $p(e){return(parseFloat(e)%360+360)%360/360}function kp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Sp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ep(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=bp.exec(e))?parseInt(t[1]+"ff",16)>>>0:sp.hasOwnProperty(e)?sp[e]:(t=pp.exec(e))?(Cp(t[1])<<24|Cp(t[2])<<16|Cp(t[3])<<8|255)>>>0:(t=hp.exec(e))?(Cp(t[1])<<24|Cp(t[2])<<16|Cp(t[3])<<8|kp(t[4]))>>>0:(t=mp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=xp.exec(e))?parseInt(t[1],16)>>>0:(t=vp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=fp.exec(e))?(255|wp($p(t[1]),Sp(t[2]),Sp(t[3])))>>>0:(t=gp.exec(e))?(wp($p(t[1]),Sp(t[2]),Sp(t[3]))|kp(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 Lp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Rp=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Op=new RegExp(`(${Object.keys(sp).join("|")})`,"g");let Tp={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 Pp=["Webkit","Ms","Moz","O"];function Mp(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Tp.hasOwnProperty(e)&&Tp[e]?(""+t).trim():t+"px"}Tp=Object.keys(Tp).reduce(((e,t)=>(Pp.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Tp);const _p={};var Dp;Wu=e=>new lp(e),Dp=e=>{const t=e.output.map((e=>e.replace(Rp,Ep))).map((e=>e.replace(Op,Ep))),n=t[0].match(Lp).map((()=>[]));t.forEach((e=>{e.match(Lp).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Lp).map(((t,r)=>Ju(Mu({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Lp,(()=>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})`))}},qu=Dp,Fu=sp,function(e,t){Bu={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,a=t.scrollTop,l=t.scrollLeft,s=_u(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=Mp(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in s){const n=c?t:_p[t]||(_p[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,s[t])}}}),(e=>e));var Np;const Ip=(Np=e=>ie(((t,n)=>{const r=function(){const e=ae(!1)[1];return pe((()=>e((e=>!e))),[])}(),o=le(!0),i=le(null),a=le(null),l=pe((e=>{const t=i.current;i.current=new Uu(e,(()=>{let e=!1;a.current&&(e=Bu.fn(a.current,i.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);se((()=>()=>{o.current=!1,i.current&&i.current.detach()}),[]),fe(n,(()=>(e=>e.current)(a))),l(t);const s=i.current.getValue();s.scrollTop,s.scrollLeft;const c=_u(s,["scrollTop","scrollLeft"]),d=(u=e,!Du.fun(u)||u.prototype instanceof te.Component?e=>a.current=function(e,t){return t&&(Du.fun(t)?t(e):Du.obj(t)&&(t.current=e)),e}(e,n):void 0);var u;return te.createElement(e,Mu({},c,{ref:d}))})),e=>(Du.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Np(n),e}),Np))(["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 Vp(e,t){return e.map((function(e,n){return e+t[n]}))}function Ap(e,t){return e.map((function(e,n){return e-t[n]}))}function jp(e){return Math.hypot.apply(Math,e)}function zp(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Hp(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 Bp(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?-Hp(t-e,n-t,r)+t:e>n?+Hp(e-n,n-t,r)+n:e}function Fp(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 qp(){return qp=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},qp.apply(this,arguments)}function Zp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Wp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gp(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 Up(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 Gp(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)?Gp(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 Xp(){}function Yp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Xp:1===t.length?t[0]:function(){for(var e,n,r=Up(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Kp(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 Jp(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 Qp(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],l=i[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=Qp(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}var eh=qp({},{threshold:function(e){return void 0===e&&(e=0),Kp(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Kp(.15);case!1:return Kp(0);default:return Kp(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:Kp(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 eh.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,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,i],[l,void 0===s?1/0:s]]}}),th="undefined"!=typeof window&&window.document&&window.document.createElement,nh={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=th?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}}},rh=qp({},eh,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,l=n.axis,s=Kp(e,o?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=o||s[0]+s[1]>0,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Kp(e)},swipeDistance:function(e){return void 0===e&&(e=60),Kp(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function oh(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"]),a=function(e){return void 0===e&&(e={}),Qp(e,nh)}({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=function(e){return void 0===e&&(e={}),Qp(e,rh)}(i),a}function ih(e){return qp({_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:Xp,canceled:!1,memo:void 0,args:void 0},e)}function ah(){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:ih({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:ih({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:ih({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:ih({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:ih({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var lh=new Map,sh=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),a=2;a<o;a++)i[a-2]=arguments[a];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=qp({},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,a=this.state,l=a._bounds,s=a._initial,c=a._active,d=a._intentional,u=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===d[0]?ch(h[0],i[0]):d[0],g=!1===d[1]?ch(h[1],i[1]):d[1],m=this.checkIntentionality([f,g],h);if(m._blocked)return qp({},m,{_movement:h,delta:[0,0]});var v,b,x,y,w=m._intentional,C=h;(!1!==w[0]&&!1===d[0]&&(b=Jp(n,this.state),v=Jp(r,this.state),s[0]=b[0],l[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(x=b)?x:Jp(n,this.state),v=null!=(y=v)?y:Jp(r,this.state),s[1]=b[1],l[1]=v[1]);var $=[!1!==w[0]?h[0]-w[0]:s[0],!1!==w[1]?h[1]-w[1]:s[1]],k=Vp($,u),S=c?o:[0,0];return $=dh(l,Vp($,s),S),qp({},m,{intentional:!1!==w[0]||!1!==w[1],_initial:s,_movement:C,movement:$,values:e,offset:dh(l,k,S),delta:Ap($,p)})},t.clean=function(){this.clearTimeout()},Fp(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 ch(e,t){return Math.abs(e)>=t&&zp(e)*t}function dh(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],l=e[0],s=l[0],c=l[1],d=e[1],u=d[0],p=d[1];return[Bp(r,s,c,i),Bp(o,u,p,a)]}function uh(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,a=t.type,l=r.values;return{_lastEventType:a,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:l}}function ph(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,qp({},t,{event:n})].concat(o))}}var hh=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,a=Up(t.classes);!(i=a()).done;){new(0,i.value)(t,r).addBindings(e)}for(var l=0,s=Object.entries(t.nativeRefs);l<s.length;l++){var c=s[l];mh(e,c[0],ph(c[1],qp({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=gh(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;bh(o,fh(r),i);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],d=s[1],u=c.slice(2).toLowerCase();r.push([u,Yp.apply(void 0,d)])}vh(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var l=a[i],s=l[0],c=l[1],d=Array.isArray(c)?c:[c];r[s+o]=Yp.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=gh(t.config),n=t.config.eventOptions;e&&bh(e,fh(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){bh(n,o[i],r)}e.windowListeners={}}(t)},this.state=ah(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function fh(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function gh(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function mh(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function vh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Up(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.addEventListener(a,l,n)}}function bh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Up(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.removeEventListener(a,l,n)}}function xh(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;e.drag&&t.add(lh.get("drag"));e.wheel&&t.add(lh.get("wheel"));e.scroll&&t.add(lh.get("scroll"));e.move&&t.add(lh.get("move"));e.pinch&&t.add(lh.get("pinch"));e.hover&&t.add(lh.get("hover"));return t}(e),o=te.useMemo((function(){return new hh(r)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=n,te.useEffect(o.effect,[]),o.config.domTarget?yh:o.bind}function yh(){"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`.")}function wh(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function Ch(e){var t="buttons"in e?e.buttons:0,n=wh(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 $h(e){var t=wh(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var kh=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&&(bh(r.window,o[t],r.eventOptions),vh(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(Wp(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=Ch(e);if(n.down){t.updateSharedState(n);var r=$h(e),o=t.getKinematics(r,e),i=uh(Wp(t),e),a=t.state._isTap,l=jp(o._movement);a&&l>=3&&(a=!1),t.updateGestureState(qp({},i,o,{_isTap:a})),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],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,d=c[0],u=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],g=t.config.swipeDistance,m=g[0],v=g[1],b=qp({},uh(Wp(t),e),t.getMovement(t.state.values)),x=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>h&&Math.abs(l)>m&&(x[0]=zp(o)),!1!==u&&Math.abs(i)>f&&Math.abs(s)>v&&(x[1]=zp(i))),t.updateGestureState(qp({},b,{tap:n,swipe:x})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Wp(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(bh(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}Zp(t,e);var n=t.prototype;return n.startDrag=function(e){var t=$h(e);this.updateSharedState(Ch(e)),this.updateGestureState(qp({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return qp({},ah()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),uh(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(mh(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&mh(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Zp(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Ap(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=jp(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,l=t.map((function(e){return i*e})),s=t.map((function(e){return o*e}));return{velocities:l,velocity:a,distance:jp(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(sh));function Sh(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(!Sh(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(!Sh(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||Sh(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function Eh(e,t){try{return Sh(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 Lh(e,t){void 0===t&&(t={}),lh.set("drag",kh);var n=le();return n.current||(n.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return i&&n===this&&t(l,o)||(r=e.apply(this,l),i=!0,n=this,o=l),r}}(oh,Eh)),xh({drag:e},n.current(t))}
|
|
2530
|
+
***************************************************************************** */var Cc,$c,kc=function(){return kc=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},kc.apply(this,arguments)};function Sc(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 Ec(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 Lc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a}function Rc(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"}(Cc||(Cc={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}($c||($c={}));var Oc=Cc.Start,Tc=Cc.Stop,Pc=Cc.Raise,Mc=Cc.Send,_c=Cc.Cancel,Dc=Cc.NullEvent,Nc=Cc.Assign;Cc.After,Cc.DoneState;var Ic=Cc.Log,Vc=Cc.Init,Ac=Cc.Invoke;Cc.ErrorExecution;var jc,zc=Cc.ErrorPlatform,Hc=Cc.ErrorCustom,Bc=Cc.Update,Fc=Cc.Choose,qc=Cc.Pure,Zc={},Wc="xstate.guard",Gc="production"===process.env.NODE_ENV;function Uc(e,t,n){void 0===n&&(n=".");var r=Kc(e,n),o=Kc(t,n);return hd(o)?!!hd(r)&&o===r:hd(r)?r in o:Object.keys(r).every((function(e){return e in o&&Uc(r[e],o[e])}))}function Xc(e){try{return hd(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 Yc(e,t){try{return ud(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Kc(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:ud(e)?Jc(e):"string"!=typeof e?e:Jc(Yc(e,t));var n}function Jc(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 Qc(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 ed(e,t,n){var r,o,i={};try{for(var a=Ec(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];n(c)&&(i[s]=t(c,s,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var td=function(e){return function(t){var n,r,o=t;try{for(var i=Ec(e),a=i.next();!a.done;a=i.next()){o=o[a.value]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function nd(e){return e?hd(e)?[[e]]:rd(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?nd(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function rd(e){var t;return(t=[]).concat.apply(t,Rc([],Lc(e),!1))}function od(e){return ud(e)?e:[e]}function id(e){return void 0===e?[]:od(e)}function ad(e,t,n){var r,o;if(pd(e))return e(t,n.data);var i={};try{for(var a=Ec(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];pd(c)?i[s]=c(t,n.data):i[s]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function ld(e){return e instanceof Promise||!(null===e||!pd(e)&&"object"!=typeof e||!pd(e.then))}function sd(e,t){return Qc(e.states,(function(e,n){if(e){var r=(hd(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:sd(e,r)}}}))}function cd(e,t,n,r){Gc||dd(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,a=n.assignment,l={state:r,action:n,_event:t},s={};if(pd(a))s=a(e,t.data,l);else try{for(var c=Ec(Object.keys(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=a[u];s[u]=pd(p)?p(e,t.data,l):p}}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,s)}),e):e;return o}var dd=function(){};function ud(e){return Array.isArray(e)}function pd(e){return"function"==typeof e}function hd(e){return"string"==typeof e}function fd(e,t){if(e)return hd(e)?{type:Wc,name:e,predicate:t?t[e]:void 0}:pd(e)?{type:Wc,name:e.name,predicate:e}:e}Gc||(dd=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 gd=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function md(e){return!!e&&"__xstatenode"in e}function vd(e,t){return hd(e)||"number"==typeof e?kc({type:e},t):e}function bd(e,t){if(!hd(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=vd(e);return kc({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function xd(e,t){return od(t).map((function(t){return void 0===t||"string"==typeof t||md(t)?{target:t,event:e}:kc(kc({},t),{event:e})}))}function yd(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Wc)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,a);var l=null==i?void 0:i[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,a)}function wd(e){return"string"==typeof e?{type:e}:e}function Cd(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 $d(e,t){return"".concat(e,":invocation[").concat(t,"]")}function kd(e){return(e.type===Pc||e.type===Mc&&e.to===$c.Internal)&&"number"!=typeof e.delay}(jc={})[gd]=function(){return this},jc[Symbol.observable]=function(){return this};var Sd=bd({type:Vc});function Ed(e,t){return t&&t[e]||void 0}function Ld(e,t){var n;if(hd(e)||"number"==typeof e)n=pd(r=Ed(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(pd(e))n={type:e.name||e.toString(),exec:e};else{var r;if(pd(r=Ed(e.type,t)))n=kc(kc({},e),{exec:r});else if(r){var o=r.type||e.type;n=kc(kc(kc({},r),e),{type:o})}else n=e}return n}var Rd=function(e,t){return e?(ud(e)?e:[e]).map((function(e){return Ld(e,t)})):[]};function Od(e){var t=Ld(e);return kc(kc({id:hd(e)?e:t.id},t),{type:t.type})}function Td(e,t){var n="".concat(Cc.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Pd(e,t){var n="".concat(Cc.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Md(e,t){var n="".concat(Cc.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function _d(e,t,n,r,o,i,a){void 0===a&&(a=!1);var l=a?[]:function(e){var t,n,r=[];try{for(var o=Ec(e),i=o.next();!i.done;i=o.next())for(var a=i.value,l=0;l<a.actions.length;)a.actions[l].type!==Nc?l++:(r.push(a.actions[l]),a.actions.splice(l,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),s=l.length?cd(n,r,l,t):n,c=a?[n]:void 0,d=[];function u(o,l){var u;switch(l.type){case Pc:var p=function(e,t,n,r){var o,i={_event:n},a=bd(pd(e.event)?e.event(t,n.data,i):e.event);if(hd(e.delay)){var l=r&&r[e.delay];o=pd(l)?l(t,n.data,i):l}else o=pd(e.delay)?e.delay(t,n.data,i):e.delay;return kc(kc({},e),{type:Pc,_event:a,delay:o})}(l,s,r,e.options.delays);return i&&"number"==typeof p.delay&&i(p,s,r),p;case Mc:var h=function(e,t,n,r){var o,i={_event:n},a=bd(pd(e.event)?e.event(t,n.data,i):e.event);if(hd(e.delay)){var l=r&&r[e.delay];o=pd(l)?l(t,n.data,i):l}else o=pd(e.delay)?e.delay(t,n.data,i):e.delay;var s=pd(e.to)?e.to(t,n.data,i):e.to;return kc(kc({},e),{to:s,_event:a,event:a.data,delay:o})}(l,s,r,e.options.delays);if(!Gc){var f=l.delay;dd(!hd(f)||"number"==typeof h.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&h.to!==$c.Internal&&("entry"===o?d.push(h):i(h,s,r)),h;case Ic:var g=function(e,t,n){return kc(kc({},e),{value:hd(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(l,s,r);return null==i||i(g,s,r),g;case Fc:if(!(x=null===(u=l.conds.find((function(n){var o=fd(n.cond,e.options.guards);return!o||yd(e,o,s,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var m=Lc(_d(e,t,s,r,[{type:o,actions:Rd(id(x),e.options.actions)}],i,a),2),v=m[0],b=m[1];return s=b,null==c||c.push(s),v;case qc:var x;if(!(x=l.get(s,r.data)))return[];var y=Lc(_d(e,t,s,r,[{type:o,actions:Rd(id(x),e.options.actions)}],i,a),2),w=y[0],C=y[1];return s=C,null==c||c.push(s),w;case Tc:g=function(e,t,n){var r=pd(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:Cc.Stop,activity:o}}(l,s,r);return null==i||i(g,n,r),g;case Nc:s=cd(s,r,[l],i?void 0:t),null==c||c.push(s);break;default:var $=Ld(l,e.options.actions),k=$.exec;if(i)i($,s,r);else if(k&&c){var S=c.length-1,E=kc(kc({},$),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];k.apply(void 0,Rc([c[S]],Lc(t),!1))}});$=E}return $}}var p=rd(o.map((function(e){var t,n,o=[];try{for(var a=Ec(e.actions),l=a.next();!l.done;l=a.next()){var c=l.value,p=u(e.type,c);p&&(o=o.concat(p))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,s,r)})),d.length=0,o})));return[p,s]}var Dd=function(e,t){return t(e)};function Nd(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[gd]=function(){return this},t}function Id(e,t,n){var r=Nd(t);if(r.deferred=!0,md(e)){var o=r.state=Dd(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var Vd=function(e){return"atomic"===e.type||"final"===e.type};function Ad(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function jd(e){return Ad(e).filter((function(e){return"history"!==e.type}))}function zd(e){var t=[e];return Vd(e)?t:t.concat(rd(jd(e).map(zd)))}function Hd(e,t){var n,r,o,i,a,l,s,c,d=Fd(new Set(e)),u=new Set(t);try{for(var p=Ec(u),h=p.next();!h.done;h=p.next())for(var f=($=h.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Fd(u);try{for(var m=Ec(u),v=m.next();!v.done;v=m.next()){if("compound"!==($=v.value).type||g.get($)&&g.get($).length){if("parallel"===$.type)try{for(var b=(a=void 0,Ec(jd($))),x=b.next();!x.done;x=b.next()){var y=x.value;u.has(y)||(u.add(y),d.get(y)?d.get(y).forEach((function(e){return u.add(e)})):y.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}}else d.get($)?d.get($).forEach((function(e){return u.add(e)})):$.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var w=Ec(u),C=w.next();!C.done;C=w.next()){var $;for(f=($=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){s={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return u}function Bd(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Vd(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=Bd(e,t)})),o}function Fd(e){var t,n,r=new Map;try{for(var o=Ec(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}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 qd(e,t){return Bd(e,Fd(Hd([e],t)))}function Zd(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Wd(e,t){return"compound"===t.type?jd(t).some((function(t){return"final"===t.type&&Zd(e,t)})):"parallel"===t.type&&jd(t).every((function(t){return Wd(e,t)}))}function Gd(e){return new Set(rd(e.map((function(e){return e.tags}))))}function Ud(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(hd(e)||hd(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Ud(e[n],t[n])}))}var Xd=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Zc,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||Zc,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 Rc([],Lc(new Set(rd(Rc([],Lc(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:Sd,_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=Sd;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="."),hd(e))return[e];var r=Object.keys(e);return r.concat.apply(r,Rc([],Lc(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=Sc(e,["configuration","transitions","tags","machine"]);return kc(kc({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Uc(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Gc&&dd(!!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}(),Yd={deferEvents:!1},Kd=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=kc(kc({},Yd),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}(),Jd=new Map,Qd=0,eu=function(){return"x:".concat(Qd++)},tu=function(e,t){return Jd.set(e,t),e},nu=function(e){return Jd.get(e)},ru=function(e){Jd.delete(e)};function ou(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Gc||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 iu(e){if(ou()){var t=function(){var e=ou();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function au(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(e){var t;return kc(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[gd]=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,l),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=Cd(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),l={parent:t.parent,self:a,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,a}var lu,su={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(lu||(lu={}));var cu=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=lu.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(ud(e))return r.batch(e),r.state;var n=bd(vd(e,t));if(r.status===lu.Stopped)return Gc||dd(!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!==lu.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===$c.Parent||r.parent.id===t),a=i?r.parent:hd(t)?t===$c.Internal?r:r.children.get(t)||nu(t):(o=t)&&"function"==typeof o.send?t:void 0;if(a)if("machine"in a){if(r.status!==lu.Stopped||r.parent!==a||r.state.done){var l=kc(kc({},e),{name:e.name===Hc?"".concat(Md(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,l]):a.send(l)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([a,e.data]):a.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Gc||dd(!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||Ed(e.type,o),a=pd(i)?i:i?i.exec:e.exec;if(a)try{return a(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 Pc:var l=e;r.defer(l);break;case Mc:var s=e;if("number"==typeof s.delay)return void r.defer(s);s.to?r.sendTo(s._event,s.to,n===Sd):r.send(s._event);break;case _c:r.cancel(e.sendId);break;case Oc:if(r.status!==lu.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===Cc.Invoke){var d=wd(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,p=c.id,h=c.data;Gc||dd(!("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(Gc||dd(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var g=h?ad(h,t,n):void 0;if("string"==typeof u)return;var m=pd(u)?u(t,n.data,{data:g,src:d,meta:c.meta}):u;if(!m)return;var v=void 0;md(m)&&(m=g?m.withContext(g):m,v={autoForward:f}),r.spawn(m,p,v)}else r.spawnActivity(c);break;case Tc:r.stopChild(e.activity.id);break;case Ic:var b=e,x=b.label,y=b.value;x?r.logger(x,y):r.logger(y);break;default:Gc||dd(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=kc(kc({},e.defaultOptions),n),i=o.clock,a=o.logger,l=o.parent,s=o.id,c=void 0!==s?s:t.id;this.id=c,this.logger=a,this.clock=i,this.parent=l,this.options=o,this.scheduler=new Kd({deferEvents:this.options.deferEvents}),this.sessionId=eu()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Dd(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Gc||dd(this.status!==lu.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=Ec(e.actions),i=o.next();!i.done;i=o.next()){var a=i.value;this.exec(a,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,a,l,s,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==Sd||!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 p=Ec(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var f=Ec(this.listeners),g=f.next();!g.done;g=f.next()){(0,g.value)(e,e.event)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var m=Ec(this.contextListeners),v=m.next();!v.done;v=m.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){a={error:e}}finally{try{v&&!v.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),x=b&&b.doneData?ad(b.doneData,e.context,t):void 0;this._doneEvent=Pd(this.id,x);try{for(var y=Ec(this.doneListeners),w=y.next();!w.done;w=y.next()){(0,w.value)(this._doneEvent)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}this._stop(),this._stopChildren(),ru(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===lu.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=Cd(e,t,n);this.listeners.add(o.next),this.status!==lu.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===lu.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===lu.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===lu.Running)return this;this.machine._init(),tu(this.sessionId,this),this.initialized=!0,this.status=lu.Running;var n=void 0===e?this.initialState:Dd(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(Xd.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,Sd)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){pd(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,a,l,s,c;try{for(var d=Ec(this.listeners),u=d.next();!u.done;u=d.next()){var p=u.value;this.listeners.delete(p)}}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 h=Ec(this.stopListeners),f=h.next();!f.done;f=h.next()){(p=f.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=Ec(this.contextListeners),m=g.next();!m.done;m=g.next()){p=m.value;this.contextListeners.delete(p)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var v=Ec(this.doneListeners),b=v.next();!b.done;b=v.next()){p=b.value;this.doneListeners.delete(p)}}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=lu.Stopped,this._initialState=void 0;try{for(var x=Ec(Object.keys(this.delayedEventsMap)),y=x.next();!y.done;y=x.next()){var w=y.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=x.return)&&c.call(x)}finally{if(s)throw s.error}}this.scheduler.clear(),this.scheduler=new Kd({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=bd({type:"xstate.stop"}),r=Dd(e,(function(){var t=rd(Rc([],Lc(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return Rd(t.onExit,e.machine.options.actions)}))),r=Lc(_d(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],a=new Xd({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!kd(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return a.changed=!0,a}));e.update(r,n),e._stopChildren(),ru(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===lu.NotStarted&&this.options.deferEvents)Gc||dd(!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!==lu.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,a=!1,l=[],s=function(e){var r=bd(e);t.forward(r),i=Dd(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),l.push.apply(l,Rc([],Lc(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return kc(kc({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),a=a||!!i.changed};try{for(var c=Ec(e),d=c.next();!d.done;d=c.next()){s(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=a,i.actions=l,t.update(i,bd(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=bd(e);if(0===r.name.indexOf(zc)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(zc)})))throw r.data.data;return Dd(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=Ec(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,a=this.children.get(i);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));a.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),pd(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==lu.Running)return Id(e,t);if(ld(e))return this.spawnPromise(Promise.resolve(e),t);if(pd(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&&pd(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(md(e))return this.spawnMachine(e,kc(kc({},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,kc(kc({},this.options),{parent:this,id:n.id||t.id})),i=kc(kc({},su),n);i.sync&&o.onTransition((function(e){r.send(Bc,{state:e,id:o.id})}));var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(bd(e,{origin:o.id}))})).start(),a},e.prototype.spawnBehavior=function(e,t){var n=au(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(bd(Pd(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=Md(t,e);try{o.send(bd(n,{origin:t}))}catch(r){!function(e,t,n){if(!Gc){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 a=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=Cd(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}})[gd]=function(){return this},n);return this.children.set(t,a),a},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,a=!1,l=new Set,s=new Set;try{o=e((function(e){r=e,s.forEach((function(t){return t(e)})),a||i.send(bd(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send(Md(t,e))}if(ld(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=Cd(e);return s.add(t.next),{unsubscribe:function(){s.delete(t.next)}}},stop:function(){a=!0,pd(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[gd]=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(bd(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(bd(Md(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(bd(Pd(t),{origin:t}))})),a=((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}}})[gd]=function(){return this},n);return this.children.set(t,a),a},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 Gc||dd(!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}}})[gd]=function(){return this},n))},e.prototype.attachDev=function(){var e=ou();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(kc(kc({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:kc({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}iu(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[gd]=function(){return this},e.prototype.getSnapshot=function(){return this.status===lu.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=du,e}();function du(e,t){return new cu(e,t)}function uu(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function pu(e){return kc(kc({type:Ac},e),{toJSON:function(){e.onDone,e.onError;var t=Sc(e,["onDone","onError"]);return kc(kc({},t),{type:Ac,src:uu(e.src)})}})}var hu="",fu="*",gu={},mu=function(e){return"#"===e[0]},vu=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,a=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||Rc([this.machine.key],Lc(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,Gc||dd(!("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?Qc(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:a,key:n});return Object.assign(a.idMap,kc(((r={})[o.id]=o,r),o.idMap)),o})):gu;var l=0;!function e(t){var n,r;t.order=l++;try{for(var o=Ec(Ad(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===hu})):hu in this.config.on),this.strict=!!this.config.strict,this.onEntry=id(this.config.entry||this.config.onEntry).map((function(e){return Ld(e)})),this.onExit=id(this.config.exit||this.config.onExit).map((function(e){return Ld(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=id(this.config.invoke).map((function(e,t){var n,r;if(md(e)){var o=$d(a.id,t);return a.machine.options.services=kc(((n={})[o]=e,n),a.machine.options.services),pu({src:o,id:o})}if(hd(e.src)){o=e.id||$d(a.id,t);return pu(kc(kc({},e),{id:o,src:e.src}))}if(md(e.src)||pd(e.src)){o=e.id||$d(a.id,t);return a.machine.options.services=kc(((r={})[o]=e.src,r),a.machine.options.services),pu(kc(kc({id:o},e),{src:o}))}var i=e.src;return pu(kc(kc({id:$d(a.id,t)},e),{src:i}))})),this.activities=id(this.config.activities).concat(this.invoke).map((function(e){return Od(e)})),this.transition=this.transition.bind(this),this.tags=id(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||zd(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,l=r.services,s=r.delays;return new e(this.config,{actions:kc(kc({},o),t.actions),activities:kc(kc({},i),t.activities),guards:kc(kc({},a),t.guards),services:kc(kc({},l),t.services),delays:kc(kc({},s),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 pd(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:Qc(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===hu,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===fu}));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(Cc.After,"(").concat(e,")").concat(n)}(pd(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:Mc,event:pd(e)?e:vd(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:pd(e)?e.name:Xc(e)}}(r,{delay:t})),e.onExit.push({type:_c,sendId:r}),r},r=ud(t)?t.map((function(e,t){var r=n(e.delay,t);return kc(kc({},e),{event:r})})):rd(Object.keys(t).map((function(e,r){var o=t[e],i=hd(o)?{target:o}:o,a=isNaN(+e)?e:+e,l=n(a,r);return id(i).map((function(e){return kc(kc({},e),{event:l,delay:a})}))})));return r.map((function(t){var n=t.delay;return kc(kc({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Xd?e.value:Kc(e,this.delimiter);if(hd(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),a=[this];return a.push.apply(a,Rc([],Lc(rd(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),a},e.prototype.handles=function(e){var t=Xc(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Xd?e:Xd.create(e),n=Array.from(Hd([],this.getStateNodes(t.value)));return new Xd(kc(kc({},t),{value:this.resolve(t.value),configuration:n,done:Wd(n,this),tags:Gd(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 a=Ec(Object.keys(e)),l=a.next();!l.done;l=a.next()){var s=l.value,c=e[s];if(c){var d=this.getStateNode(s)._transition(c,t,n);d&&(i[s]=d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),p=rd(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=rd(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:p,exitSet:rd(u.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:rd(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return hd(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,bd(t))},e.prototype.next=function(e,t){var n,r,o,i=this,a=t.name,l=[],s=[];try{for(var c=Ec(this.getCandidates(a)),d=c.next();!d.done;d=c.next()){var u=d.value,p=u.cond,h=u.in,f=e.context,g=!h||(hd(h)&&mu(h)?e.matches(Kc(this.getStateNodeById(h).path,this.delimiter)):Uc(Kc(h,this.delimiter),td(this.path.slice(0,-2))(e.value))),m=!1;try{m=!p||yd(this.machine,p,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(m&&g){void 0!==u.target&&(s=u.target),l.push.apply(l,Rc([],Lc(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(!s.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:l};var v=rd(s.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:rd(s.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:l}}},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,a){var l,s,c,d,u=this,p=i?Hd([],this.getStateNodes(i.value)):[],h=new Set;try{for(var f=Ec(Array.from(e).sort((function(e,t){return e.order-t.order}))),g=f.next();!g.done;g=f.next()){(!Zd(p,b=g.value)||Zd(n.exitSet,b)||b.parent&&h.has(b.parent))&&h.add(b)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(l)throw l.error}}try{for(var m=Ec(p),v=m.next();!v.done;v=m.next()){var b;Zd(e,b=v.value)&&!Zd(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=m.return)&&d.call(m)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var x=Array.from(h).sort((function(e,t){return e.order-t.order})),y=new Set(n.exitSet),w=rd(x.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(Td(e.id,e.doneData),Td(i.id,e.doneData?ad(e.doneData,r,o):void 0));var a=i.parent;return"parallel"===a.type&&jd(a).every((function(e){return Wd(n.configuration,e)}))&&t.push(Td(a.id)),t}))),C=x.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=Od(e);return{type:Cc.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:Rd(a?Rc(Rc([],Lc(t),!1),Lc(n),!1):Rc(Rc([],Lc(n),!1),Lc(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:Pc,event:"function"==typeof e?e:vd(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),$=Array.from(y).map((function(e){return{type:"exit",actions:Rd(Rc(Rc([],Lc(e.onExit),!1),Lc(e.activities.map((function(e){return function(e){var t=pd(e)?e:Od(e);return{type:Cc.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:Rd(n.actions,this.machine.options.actions)}).concat(C);if(t){var k=Rd(rd(Rc([],Lc(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!kd(e)}));return $.concat({type:"stop",actions:k})}return $},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,a=bd(t);if(e instanceof Xd)o=void 0===n?e:this.resolveState(Xd.from(e,n));else{var l=hd(e)?this.resolve(Jc(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;o=this.resolveState(Xd.from(l,s))}if(!Gc&&a.name===fu)throw new Error("An event cannot have the wildcard type ('".concat(fu,"')"));if(this.strict&&!this.events.includes(a.name)&&(i=a.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var c=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=Hd([],this.getStateNodes(o.value)),u=c.configuration.length?Hd(d,c.configuration):d;return c.configuration=Rc([],Lc(u),!1),this.resolveTransition(c,o,o.context,r,a)},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,Rc([],Lc(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,a,l,s,c=this;void 0===o&&(o=Sd);var d=e.configuration,u=!t||e.transitions.length>0,p=u?e.configuration:t?t.configuration:[],h=Wd(p,this),f=u?qd(this.machine,d):void 0,g=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,m=this.getActions(new Set(p),h,e,n,o,t,r),v=t?kc({},t.activities):{};try{for(var b=Ec(m),x=b.next();!x.done;x=b.next()){var y=x.value;try{for(var w=(l=void 0,Ec(y.actions)),C=w.next();!C.done;C=w.next()){var $=C.value;$.type===Oc?v[$.activity.id||$.activity.type]=$:$.type===Tc&&(v[$.activity.id||$.activity.type]=!1)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}}}catch(e){i={error:e}}finally{try{x&&!x.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}var k,S,E=Lc(_d(this,t,n,o,m,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=E[0],R=E[1],O=Lc(function(e,t){var n,r,o=Lc([[],[]],2),i=o[0],a=o[1];try{for(var l=Ec(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(L,kd),2),T=O[0],P=O[1],M=L.filter((function(e){var t;return e.type===Oc&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Ac})),_=M.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=wd(e.src),a=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],l=e.data?ad(e.data,n,r):void 0,s=a?Id(a,e.id,l):Nd(e.id);return s.meta=e,s}(t.activity,c.machine,R,o),e}),t?kc({},t.children):{}),D=new Xd({value:f||t.value,context:R,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?g?(k=g,S=f,{current:S,states:sd(k,S)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?P:[],activities:f?v:t?t.activities:{},events:[],configuration:p,transitions:e.transitions,children:_,done:h,tags:Gd(p),machine:this}),N=n!==R;D.changed=o.name===Bc||N;var I=D.history;I&&delete I.history;var V=!h&&(this._transient||d.some((function(e){return e._transient})));if(!(u||V&&o.name!==hu))return D;var A=D;if(!h)for(V&&(A=this.resolveRaisedTransition(A,{type:Dc},o,r));T.length;){var j=T.shift();A=this.resolveRaisedTransition(A,j._event,o,r)}var z=A.changed||(I?!!A.actions.length||N||typeof I.value!=typeof A.value||!Ud(A.value,I.value):void 0);return A.changed=z,A.history=I,A},e.prototype.getStateNode=function(e){if(mu(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=mu(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&&mu(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=Yc(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||gu;switch(this.type){case"parallel":return Qc(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):gu}));case"compound":if(hd(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Qc(e,(function(e,t){return e?n.getStateNode(t).resolve(e):gu})):this.initialStateValue||{};default:return e||gu}},e.prototype.getResolvedPath=function(e){if(mu(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 Yc(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=ed(this.states,(function(e){return e.initialStateValue||gu}),(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=Vd(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=hd(t.target)&&mu(t.target)?Jc(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 Vd(this)?[this]:"compound"!==this.type||this.initial?rd(nd(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Gc||dd(!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=Lc(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:ed(this.states,(function(t,n){if(!e)return t.historyValue();var r=hd(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?rd(nd(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,a=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var a=Ec(o),l=a.next();!l.done;l=a.next()){var s=l.value;r=r[i][s]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r})(e).current;return hd(a)?[n.getStateNode(a)]:rd(nd(a).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=rd(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 a=Ec(Object.keys(o)),l=a.next();!l.done;l=a.next()){var s=o[l.value];if(s.states)try{for(var c=(n=void 0,Ec(s.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{l&&!l.done&&(t=a.return)&&t.call(a)}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(!hd(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 id(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return hd(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),a=kc(kc({},e),{actions:Rd(id(e.actions)),cond:fd(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return kc(kc({},a),{target:a.target?a.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return a},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=fu,a=o[i],l=void 0===a?[]:a,s=Sc(o,["*"]);n=rd(Object.keys(s).map((function(e){Gc||e!==hu||dd(!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=xd(e,s[e]);return Gc||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(hd(e.target)||md(e.target))})),o=t===hu?"the transient event":"event '".concat(t,"'");dd(!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(xd(fu,l)))}else n=[];var c=this.config.always?xd("",this.config.always):[],d=this.config.onDone?xd(String(Td(this.id)),this.config.onDone):[];Gc||dd(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=rd(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,Rc([],Lc(xd(String(Pd(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,Rc([],Lc(xd(String(Md(e.id)),e.onError)),!1)),t}))),p=this.after,h=rd(Rc(Rc(Rc(Rc([],Lc(d),!1),Lc(u),!1),Lc(n),!1),Lc(c),!1).map((function(e){return id(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=Ec(p),g=f.next();!g.done;g=f.next()){var m=g.value;h.push(m)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return h},e}();var bu,xu=function(e){return{type:Nc,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(bu||(bu={}));var yu="undefined"!=typeof document?de:function(){};function wu(e){var t=ee.useRef();return t.current||(t.current={v:e()}),t.current.v}var Cu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a},$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 ku=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a},Su=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 Eu(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function Lu(e){var t=le([]),n=le([]);yu((function(){var r=e.subscribe((function(e){var r,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),a=ku(function(e,t){var n,r,o=Cu([[],[]],2),i=o[0],a=o[1];try{for(var l=$u(e),s=l.next();!s.done;s=l.next()){var c=s.value;t(c)?i.push(c):a.push(c)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,a]}(i,(function(e){return e.exec.__effect===bu.Effect})),2),l=a[0],s=a[1];(r=t.current).push.apply(r,Su([],ku(l.map((function(t){return[t,e]}))),!1)),(o=n.current).push.apply(o,Su([],ku(s.map((function(t){return[t,e]}))),!1))}}));return function(){r.unsubscribe()}}),[]),yu((function(){for(;n.current.length;){var e=ku(n.current.shift(),2);Eu(e[0],e[1])}})),se((function(){for(;t.current.length;){var e=ku(t.current.shift(),2);Eu(e[0],e[1])}}))}var Ru=function(){return Ru=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},Ru.apply(this,arguments)},Ou=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},Tu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a};var Pu=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.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 a};function Mu(e,t){void 0===t&&(t={});var n=pe((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),r=function(e,t,n){void 0===t&&(t={});var r=wu((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var o=Tu(ae(r),1)[0];e!==o&&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 i=t.context,a=t.guards,l=t.actions,s=t.activities,c=t.services,d=t.delays,u=t.state,p=Ou(t,["context","guards","actions","activities","services","delays","state"]),h=wu((function(){var e={context:i,guards:a,actions:l,activities:s,services:c,delays:d};return du(r.withConfig(e,(function(){return Ru(Ru({},r.context),i)})),Ru({deferEvents:!0},p))}));return yu((function(){var e;return n&&(e=h.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(n))),function(){null==e||e.unsubscribe()}}),[n]),yu((function(){return h.start(u?Xd.create(u):void 0),function(){h.stop()}}),[]),yu((function(){Object.assign(h.machine.options.actions,l),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,s),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,d)}),[l,a,s,c,d]),Lu(h),h}(e,t,n),o=Pu(ae((function(){var e=r.machine.initialState;return t.state?Xd.create(t.state):e})),2),i=o[0],a=o[1];return[i,r.send,r]}function _u(){return _u=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},_u.apply(null,arguments)}function Du(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 Nu={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(Nu.str(e)||Nu.num(e))return e===t;if(Nu.obj(e)&&Nu.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!Nu.und(n)||e===t}};function Iu(e,t){return Nu.und(e)||Nu.nul(e)?t:e}function Vu(e){return Nu.und(e)?[]:Nu.arr(e)?e:[e]}function Au(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 Nu.fun(e)?e(...n):e}function ju(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,Du(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(Nu.und(t))return _u({to:t},e);const n=Object.keys(e).reduce(((n,r)=>Nu.und(t[r])?_u({},n,{[r]:e[r]}):n),{});return _u({to:t},n)}class zu{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 Hu extends zu{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof zu&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof zu&&e.removeChild(this)))}}class Bu extends zu{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof zu&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof zu&&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 zu)&&(t[n]=r instanceof zu?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Fu,qu;let Zu,Wu=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Gu,Uu=()=>Date.now();class Xu extends Bu{constructor(e,t){super(),this.update=void 0,this.payload=e.style?_u({},e,{style:Gu(e.style)}):e,this.update=t,this.attach()}}let Yu=!1;const Ku=new Set,Ju=()=>{if(!Yu)return!1;let e=Uu();for(let t of Ku){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,a=t.configs[r];for(let t=0;t<a.animatedValues.length;t++){let r=a.animatedValues[t];if(r.done)continue;let l=a.fromValues[t],s=a.toValues[t],c=r.lastPosition,d=s instanceof zu,u=Array.isArray(a.initialVelocity)?a.initialVelocity[t]:a.initialVelocity;if(d&&(s=s.getValue()),a.immediate)r.setValue(s),r.done=!0;else if("string"!=typeof l&&"string"!=typeof s){if(void 0!==a.duration)c=l+a.easing((e-r.startTime)/a.duration)*(s-l),o=e>=r.startTime+a.duration;else if(a.decay)c=l+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(s=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:a.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-a.tension*(c-s)+-a.friction*u)/a.mass)/1e3,c+=1*u/1e3}let n=!(!a.clamp||0===a.tension)&&(l<s?c>s:c<s),d=Math.abs(u)<=a.precision,p=0===a.tension||Math.abs(s-c)<=a.precision;o=n||d&&p,r.lastVelocity=u,r.lastTime=e}d&&!a.toValues[t].done&&(o=!1),o?(r.value!==s&&(c=s),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(s),r.done=!0}t.props.onFrame&&(t.values[a.name]=a.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Ku.delete(t),t.stop(!0))}return Ku.size?Wu(Ju):Yu=!1,Yu};function Qu(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Qu({range:e,output:t,extrapolate:n});if(Zu&&"string"==typeof e.output[0])return Zu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=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,a,l,s){let c=s?s(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(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],s,a,l,r.map)}}class ep extends Hu{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof Hu&&!(e instanceof ep)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Qu(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Qu(e,t,n)}interpolate(e,t,n){return new ep(this,e,t,n)}}const tp=(e,t,n)=>e&&new ep(e,t,n);function np(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>np(e,t)))}class rp extends zu{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&&np(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new ep(this,e,t,n)}}class op extends Hu{constructor(e){super(),this.payload=e.map((e=>new rp(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 ep(this,e,t)}}let ip=0,ap=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=ip++}update(e){if(!e)return this;const t=ju(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=Du(t,["delay","to"]);if(Nu.arr(o)||Nu.fun(o))this.queue.push(_u({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const a=_u({to:{[n]:o},delay:Au(r,n)},i),l=e[a.delay]&&e[a.delay].to;e[a.delay]=_u({},e[a.delay],a,{to:_u({},l,a.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;Nu.obj(n)&&(this.merged=_u({},n,this.merged)),Nu.obj(o)&&(this.merged=_u({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,a=Du(r,["delay"]);const l=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let s=Nu.arr(a.to)||Nu.fun(a.to);i?setTimeout((()=>{t===this.guid&&(s?this.runAsync(a,l):this.diff(a).start(l))}),i):s?this.runAsync(a,l):this.diff(a).start(l)}))}else Nu.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Ku.has(t)||Ku.add(t),Yu||(Yu=!0,Wu(Ju));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,Ku.has(t)&&Ku.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=Du(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(Nu.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=_u({},r,ju(r.to[t]));Nu.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(Nu.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=_u({},r,ju(n));if(Nu.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=_u({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,a=t.config,l=void 0===a?{}:a,s=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(s){var p=[i,r];r=p[0],i=p[1]}this.merged=_u({},r,this.merged,i),this.hasChanged=!1;let h=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const a=Nu.num(o),s=Nu.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!qu[o],c=Nu.arr(o),p=!a&&!c&&!s;let f=Nu.und(r[n])?o:r[n],g=a||c||s?o:1,m=Au(l,n);h&&(g=h.animations[n].parent);let v,b=i.parent,x=i.interpolation,y=Vu(h?g.getPayload():g),w=o;p&&(w=Zu({range:[0,1],output:[o,o]})(1));let C=x&&x.getValue();const $=!Nu.und(b)&&i.animatedValues.some((e=>!e.done)),k=!Nu.equ(w,C),S=!Nu.equ(w,i.previous),E=!Nu.equ(m,i.config);if(d||S&&k||E){if(a||s)b=x=i.parent||new rp(f);else if(c)b=x=i.parent||new op(f);else if(p){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 rp(0);const t={output:[e,o]};i.interpolation?(x=i.interpolation,i.interpolation.updateConfig(t)):x=b.interpolate(t)}return y=Vu(h?g.getPayload():g),v=Vu(b.getPayload()),d&&!p&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=$?e.lastVelocity:void 0,e.lastTime=$?e.lastTime:void 0,e.startTime=Uu(),e.done=!1,e.animatedStyles.clear()})),Au(u,n)&&b.setValue(p?g:o,!1),_u({},e,{[n]:_u({},i,{name:n,parent:b,interpolation:x,animatedValues:v,toValues:y,previous:w,config:m,fromValues:Vu(b.getValue()),immediate:Au(u,n),initialVelocity:Iu(m.velocity,0),clamp:Iu(m.clamp,!1),precision:Iu(m.precision,.01),tension:Iu(m.tension,170),friction:Iu(m.friction,26),mass:Iu(m.mass,1),duration:m.duration,easing:Iu(m.easing,(e=>e)),decay:m.decay})})}return k?e:(p&&(b.setValue(1,!1),x.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,_u({},e,{[n]:_u({},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 lp=e=>{const t=Nu.fun(e),n=((e,t)=>{const n=le(!1),r=le(),o=Nu.fun(t),i=oe((()=>{let n;return r.current&&(r.current.map((e=>e.destroy())),r.current=void 0),[new Array(e).fill().map(((e,r)=>{const i=new ap,a=o?Au(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),a=i[0],l=i[1];r.current=a,fe(l,(()=>({start:()=>Promise.all(r.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>r.current.forEach((t=>t.stop(e))),get controllers(){return r.current}})));const s=oe((()=>e=>r.current.map(((t,n)=>{t.update(o?Au(e,n,t):e[n]),l||t.start()}))),[e]);se((()=>{n.current?o||s(t):l||r.current.forEach((e=>e.start()))})),se((()=>(n.current=!0,()=>r.current.forEach((e=>e.destroy())))),[]);const c=r.current.map((e=>e.getValues()));return o?[c,s,e=>r.current.forEach((t=>t.pause(e)))]:c})(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r};class sp extends Bu{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof zu||(e=Fu.transform(e)),this.payload=e}}const cp={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},dp="[-+]?\\d*\\.?\\d+",up=dp+"%";function pp(){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 hp=new RegExp("rgb"+pp(dp,dp,dp)),fp=new RegExp("rgba"+pp(dp,dp,dp,dp)),gp=new RegExp("hsl"+pp(dp,up,up)),mp=new RegExp("hsla"+pp(dp,up,up,dp)),vp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,bp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,xp=/^#([0-9a-fA-F]{6})$/,yp=/^#([0-9a-fA-F]{8})$/;function wp(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 Cp(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=wp(o,r,e+1/3),a=wp(o,r,e),l=wp(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function $p(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function kp(e){return(parseFloat(e)%360+360)%360/360}function Sp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ep(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Lp(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=xp.exec(e))?parseInt(t[1]+"ff",16)>>>0:cp.hasOwnProperty(e)?cp[e]:(t=hp.exec(e))?($p(t[1])<<24|$p(t[2])<<16|$p(t[3])<<8|255)>>>0:(t=fp.exec(e))?($p(t[1])<<24|$p(t[2])<<16|$p(t[3])<<8|Sp(t[4]))>>>0:(t=vp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=yp.exec(e))?parseInt(t[1],16)>>>0:(t=bp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gp.exec(e))?(255|Cp(kp(t[1]),Ep(t[2]),Ep(t[3])))>>>0:(t=mp.exec(e))?(Cp(kp(t[1]),Ep(t[2]),Ep(t[3]))|Sp(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 Rp=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Op=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Tp=new RegExp(`(${Object.keys(cp).join("|")})`,"g");let Pp={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 Mp=["Webkit","Ms","Moz","O"];function _p(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Pp.hasOwnProperty(e)&&Pp[e]?(""+t).trim():t+"px"}Pp=Object.keys(Pp).reduce(((e,t)=>(Mp.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Pp);const Dp={};var Np;Gu=e=>new sp(e),Np=e=>{const t=e.output.map((e=>e.replace(Op,Lp))).map((e=>e.replace(Tp,Lp))),n=t[0].match(Rp).map((()=>[]));t.forEach((e=>{e.match(Rp).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Rp).map(((t,r)=>Qu(_u({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Rp,(()=>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})`))}},Zu=Np,qu=cp,function(e,t){Fu={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,a=t.scrollTop,l=t.scrollLeft,s=Du(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==a&&(e.scrollTop=a),void 0!==l&&(e.scrollLeft=l),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=_p(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in s){const n=c?t:Dp[t]||(Dp[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,s[t])}}}),(e=>e));var Ip;const Vp=(Ip=e=>ie(((t,n)=>{const r=function(){const e=ae(!1)[1];return pe((()=>e((e=>!e))),[])}(),o=le(!0),i=le(null),a=le(null),l=pe((e=>{const t=i.current;i.current=new Xu(e,(()=>{let e=!1;a.current&&(e=Fu.fn(a.current,i.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);se((()=>()=>{o.current=!1,i.current&&i.current.detach()}),[]),fe(n,(()=>(e=>e.current)(a))),l(t);const s=i.current.getValue();s.scrollTop,s.scrollLeft;const c=Du(s,["scrollTop","scrollLeft"]),d=(u=e,!Nu.fun(u)||u.prototype instanceof te.Component?e=>a.current=function(e,t){return t&&(Nu.fun(t)?t(e):Nu.obj(t)&&(t.current=e)),e}(e,n):void 0);var u;return te.createElement(e,_u({},c,{ref:d}))})),e=>(Nu.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Ip(n),e}),Ip))(["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 Ap(e,t){return e.map((function(e,n){return e+t[n]}))}function jp(e,t){return e.map((function(e,n){return e-t[n]}))}function zp(e){return Math.hypot.apply(Math,e)}function Hp(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Bp(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 Fp(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?-Bp(t-e,n-t,r)+t:e>n?+Bp(e-n,n-t,r)+n:e}function qp(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 Zp(){return Zp=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},Zp.apply(this,arguments)}function Wp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Gp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Up(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 Xp(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 Up(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)?Up(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 Yp(){}function Kp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Yp:1===t.length?t[0]:function(){for(var e,n,r=Xp(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Jp(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 Qp(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 eh(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],l=i[1];switch(typeof l){case"function":n[a]=l.call(n,e[a],a,e);break;case"object":n[a]=eh(e[a],l);break;case"boolean":l&&(n[a]=e[a])}}return n}var th=Zp({},{threshold:function(e){return void 0===e&&(e=0),Jp(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Jp(.15);case!1:return Jp(0);default:return Jp(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:Jp(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 th.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,a=t.top,l=void 0===a?-1/0:a,s=t.bottom;return[[r,i],[l,void 0===s?1/0:s]]}}),nh="undefined"!=typeof window&&window.document&&window.document.createElement,rh={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=nh?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}}},oh=Zp({},th,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,a=void 0!==i&&i,l=n.axis,s=Jp(e,o?3:a||(void 0===l?void 0:l)?1:0);return this.filterTaps=o||s[0]+s[1]>0,s},swipeVelocity:function(e){return void 0===e&&(e=.5),Jp(e)},swipeDistance:function(e){return void 0===e&&(e=60),Jp(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function ih(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"]),a=function(e){return void 0===e&&(e={}),eh(e,rh)}({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=function(e){return void 0===e&&(e={}),eh(e,oh)}(i),a}function ah(e){return Zp({_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:Yp,canceled:!1,memo:void 0,args:void 0},e)}function lh(){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:ah({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:ah({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:ah({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:ah({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:ah({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var sh=new Map,ch=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),a=2;a<o;a++)i[a-2]=arguments[a];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=Zp({},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,a=this.state,l=a._bounds,s=a._initial,c=a._active,d=a._intentional,u=a.lastOffset,p=a.movement,h=this.getInternalMovement(e,this.state),f=!1===d[0]?dh(h[0],i[0]):d[0],g=!1===d[1]?dh(h[1],i[1]):d[1],m=this.checkIntentionality([f,g],h);if(m._blocked)return Zp({},m,{_movement:h,delta:[0,0]});var v,b,x,y,w=m._intentional,C=h;(!1!==w[0]&&!1===d[0]&&(b=Qp(n,this.state),v=Qp(r,this.state),s[0]=b[0],l[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(x=b)?x:Qp(n,this.state),v=null!=(y=v)?y:Qp(r,this.state),s[1]=b[1],l[1]=v[1]);var $=[!1!==w[0]?h[0]-w[0]:s[0],!1!==w[1]?h[1]-w[1]:s[1]],k=Ap($,u),S=c?o:[0,0];return $=uh(l,Ap($,s),S),Zp({},m,{intentional:!1!==w[0]||!1!==w[1],_initial:s,_movement:C,movement:$,values:e,offset:uh(l,k,S),delta:jp($,p)})},t.clean=function(){this.clearTimeout()},qp(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 dh(e,t){return Math.abs(e)>=t&&Hp(e)*t}function uh(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],l=e[0],s=l[0],c=l[1],d=e[1],u=d[0],p=d[1];return[Fp(r,s,c,i),Fp(o,u,p,a)]}function ph(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,a=t.type,l=r.values;return{_lastEventType:a,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:l}}function hh(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,Zp({},t,{event:n})].concat(o))}}var fh=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,a=Xp(t.classes);!(i=a()).done;){new(0,i.value)(t,r).addBindings(e)}for(var l=0,s=Object.entries(t.nativeRefs);l<s.length;l++){var c=s[l];vh(e,c[0],hh(c[1],Zp({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=mh(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;xh(o,gh(r),i);for(var a=0,l=Object.entries(t);a<l.length;a++){var s=l[a],c=s[0],d=s[1],u=c.slice(2).toLowerCase();r.push([u,Kp.apply(void 0,d)])}bh(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var l=a[i],s=l[0],c=l[1],d=Array.isArray(c)?c:[c];r[s+o]=Kp.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=mh(t.config),n=t.config.eventOptions;e&&xh(e,gh(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){xh(n,o[i],r)}e.windowListeners={}}(t)},this.state=lh(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function gh(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function mh(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function vh(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function bh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Xp(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.addEventListener(a,l,n)}}function xh(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=Xp(t);!(r=o()).done;){var i=r.value,a=i[0],l=i[1];e.removeEventListener(a,l,n)}}function yh(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;e.drag&&t.add(sh.get("drag"));e.wheel&&t.add(sh.get("wheel"));e.scroll&&t.add(sh.get("scroll"));e.move&&t.add(sh.get("move"));e.pinch&&t.add(sh.get("pinch"));e.hover&&t.add(sh.get("hover"));return t}(e),o=te.useMemo((function(){return new fh(r)}),[]);return o.config=t,o.handlers=e,o.nativeRefs=n,te.useEffect(o.effect,[]),o.config.domTarget?wh:o.bind}function wh(){"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`.")}function Ch(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function $h(e){var t="buttons"in e?e.buttons:0,n=Ch(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 kh(e){var t=Ch(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var Sh=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&&(xh(r.window,o[t],r.eventOptions),bh(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(Gp(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=$h(e);if(n.down){t.updateSharedState(n);var r=kh(e),o=t.getKinematics(r,e),i=ph(Gp(t),e),a=t.state._isTap,l=zp(o._movement);a&&l>=3&&(a=!1),t.updateGestureState(Zp({},i,o,{_isTap:a})),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],a=t.state.movement,l=a[0],s=a[1],c=t.state._intentional,d=c[0],u=c[1],p=t.config.swipeVelocity,h=p[0],f=p[1],g=t.config.swipeDistance,m=g[0],v=g[1],b=Zp({},ph(Gp(t),e),t.getMovement(t.state.values)),x=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>h&&Math.abs(l)>m&&(x[0]=Hp(o)),!1!==u&&Math.abs(i)>f&&Math.abs(s)>v&&(x[1]=Hp(i))),t.updateGestureState(Zp({},b,{tap:n,swipe:x})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Gp(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(xh(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}Wp(t,e);var n=t.prototype;return n.startDrag=function(e){var t=kh(e);this.updateSharedState($h(e)),this.updateGestureState(Zp({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Zp({},lh()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),ph(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(vh(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&vh(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}Wp(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return jp(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=zp(t),o=0===r?0:1/r,i=0===n?0:1/n,a=i*r,l=t.map((function(e){return i*e})),s=t.map((function(e){return o*e}));return{velocities:l,velocity:a,distance:zp(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(ch));function Eh(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(!Eh(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(!Eh(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||Eh(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function Lh(e,t){try{return Eh(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 Rh(e,t){void 0===t&&(t={}),sh.set("drag",Sh);var n=le();return n.current||(n.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return i&&n===this&&t(l,o)||(r=e.apply(this,l),i=!0,n=this,o=l),r}}(ih,Lh)),yh({drag:e},n.current(t))}
|
|
2526
2531
|
/*!
|
|
2527
2532
|
* tabbable 5.3.3
|
|
2528
2533
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
2529
|
-
*/var
|
|
2534
|
+
*/var Oh=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Th=Oh.join(","),Ph="undefined"==typeof Element,Mh=Ph?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_h=!Ph&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},Dh=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(Th));return t&&Mh.call(e,Th)&&r.unshift(e),r=r.filter(n)},Nh=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if("SLOT"===a.tagName){var l=a.assignedElements(),s=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,s):o.push({scope:a,candidates:s})}else{Mh.call(a,Th)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!r.shadowRootFilter||r.shadowRootFilter(a);if(c&&d){var u=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},Ih=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},Vh=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ah=function(e){return"INPUT"===e.tagName},jh=function(e){return function(e){return Ah(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||_h(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)},zh=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Hh=function(e,t){return!(t.disabled||function(e){return Ah(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Mh.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Mh.call(o,"details:not([open]) *"))return!0;var i=_h(e).host,a=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return zh(e)}else{if("function"==typeof r){for(var l=e;e;){var s=e.parentElement,c=_h(e);if(s&&!s.shadowRoot&&!0===r(s))return zh(e);e=e.assignedSlot?e.assignedSlot:s||c===e.ownerDocument?s:c.host}e=l}if(a)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!!Mh.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Bh=function(e,t){return!(jh(t)||Ih(t)<0||!Hh(e,t))},Fh=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},qh=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,a=i?t.scope:t,l=Ih(a,i),s=i?e(t.candidates):a;0===l?i?n.push.apply(n,s):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:s})})),r.sort(Vh).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Zh=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Nh([e],t.includeContainer,{filter:Bh.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Fh}):Dh(e,t.includeContainer,Bh.bind(null,t)),qh(n)},Wh=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Mh.call(e,Th)&&Bh(t,e)},Gh=Oh.concat("iframe").join(","),Uh=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Mh.call(e,Gh)&&Hh(t,e)};
|
|
2530
2535
|
/*!
|
|
2531
2536
|
* focus-trap 6.9.4
|
|
2532
2537
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2533
2538
|
*/
|
|
2534
|
-
function Uh(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 Xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uh(Object(n),!0).forEach((function(t){Yh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kh,Jh=(Kh=[],{activateTrap:function(e){if(Kh.length>0){var t=Kh[Kh.length-1];t!==e&&t.pause()}var n=Kh.indexOf(e);-1===n||Kh.splice(n,1),Kh.push(e)},deactivateTrap:function(e){var t=Kh.indexOf(e);-1!==t&&Kh.splice(t,1),Kh.length>0&&Kh[Kh.length-1].unpause()}}),Qh=function(e){return setTimeout(e,0)},ef=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},tf=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},nf=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},rf=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Xh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},l=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}))}))},s=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];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 l=t;if("string"==typeof t&&!(l=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return l},c=function(){var e=s("initialFocus");if(!1===e)return!1;if(void 0===e)if(l(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||s("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=qh(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?Dh([t],n.includeContainer,{filter:zh.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):_h(t,n.includeContainer,zh.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 Zh(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Zh(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!s("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()))},p=function(e){var t=s("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=nf(e);l(t)>=0||(tf(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Gh(t,o.tabbableOptions)}):tf(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=nf(e),n=l(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==tf(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=nf(e);d();var n=null;if(i.tabbableGroups.length>0){var r=l(t),a=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=ef(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Gh(t,o.tabbableOptions)&&!Zh(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=ef(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Gh(t,o.tabbableOptions)&&!Zh(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=s("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},m=function(e){var t=nf(e);l(t)>=0||tf(o.clickOutsideDeactivates,e)||tf(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return Jh.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?Qh((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",m,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",m,!0),r.removeEventListener("keydown",g,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var l=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!i.active)return this;var t=Xh({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,Jh.deactivateTrap(n);var r=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),s=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){Qh((function(){c&&u(p(i.nodeFocusedBeforeActivation)),l&&l()}))};return c&&s?(s(p(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 of=!1;if("undefined"!=typeof window){var af={get passive(){of=!0}};window.addEventListener("testPassive",null,af),window.removeEventListener("testPassive",null,af)}var lf,sf="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),cf=[],df=!1,uf=-1,pf=void 0,hf=void 0,ff=function(e){return cf.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},gf=function(e){var t=e||window.event;return!!ff(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},mf=function(e,t){if(e){if(!cf.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};cf=[].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)}(cf),[n]),sf?(e.ontouchstart=function(e){1===e.targetTouches.length&&(uf=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-uf;!ff(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?gf(e):e.stopPropagation())}(t,e)},df||(document.addEventListener("touchmove",gf,of?{passive:!1}:void 0),df=!0)):function(e){if(void 0===hf){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(hf=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===pf&&(pf=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.")},vf=function(e){e?(cf=cf.filter((function(t){return t.targetElement!==e})),sf?(e.ontouchstart=null,e.ontouchmove=null,df&&0===cf.length&&(document.removeEventListener("touchmove",gf,of?{passive:!1}:void 0),df=!1)):cf.length||(void 0!==hf&&(document.body.style.paddingRight=hf,hf=void 0),void 0!==pf&&(document.body.style.overflow=pf,pf=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},bf=[],xf="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"}(lf||(lf={}));var yf,wf=function(e){return Object.freeze(e)},Cf=function(e,t){this.inlineSize=e,this.blockSize=t,wf(this)},$f=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,wf(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}(),kf=function(e){return e instanceof SVGElement&&"getBBox"in e},Sf=function(e){if(kf(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ef=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)},Lf="undefined"!=typeof window?window:{},Rf=new WeakMap,Of=/auto|scroll/,Tf=/^tb|vertical/,Pf=/msie|trident/i.test(Lf.navigator&&Lf.navigator.userAgent),Mf=function(e){return parseFloat(e||"0")},_f=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Cf((n?t:e)||0,(n?e:t)||0)},Df=wf({devicePixelContentBoxSize:_f(),borderBoxSize:_f(),contentBoxSize:_f(),contentRect:new $f(0,0,0,0)}),Nf=function(e,t){if(void 0===t&&(t=!1),Rf.has(e)&&!t)return Rf.get(e);if(Sf(e))return Rf.set(e,Df),Df;var n=getComputedStyle(e),r=kf(e)&&e.ownerSVGElement&&e.getBBox(),o=!Pf&&"border-box"===n.boxSizing,i=Tf.test(n.writingMode||""),a=!r&&Of.test(n.overflowY||""),l=!r&&Of.test(n.overflowX||""),s=r?0:Mf(n.paddingTop),c=r?0:Mf(n.paddingRight),d=r?0:Mf(n.paddingBottom),u=r?0:Mf(n.paddingLeft),p=r?0:Mf(n.borderTopWidth),h=r?0:Mf(n.borderRightWidth),f=r?0:Mf(n.borderBottomWidth),g=u+c,m=s+d,v=(r?0:Mf(n.borderLeftWidth))+h,b=p+f,x=l?e.offsetHeight-b-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,w=o?g+v:0,C=o?m+b:0,$=r?r.width:Mf(n.width)-w-y,k=r?r.height:Mf(n.height)-C-x,S=$+g+y+v,E=k+m+x+b,L=wf({devicePixelContentBoxSize:_f(Math.round($*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:_f(S,E,i),contentBoxSize:_f($,k,i),contentRect:new $f(u,s,$,k)});return Rf.set(e,L),L},If=function(e,t,n){var r=Nf(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case lf.DEVICE_PIXEL_CONTENT_BOX:return a;case lf.BORDER_BOX:return o;default:return i}},Vf=function(e){var t=Nf(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=wf([t.borderBoxSize]),this.contentBoxSize=wf([t.contentBoxSize]),this.devicePixelContentBoxSize=wf([t.devicePixelContentBoxSize])},Af=function(e){if(Sf(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},jf=function(){var e=1/0,t=[];bf.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Vf(t.target),o=Af(t.target);r.push(n),t.lastReportedSize=If(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},zf=function(e){bf.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(Af(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Hf=function(){var e=0;for(zf(e);bf.some((function(e){return e.activeTargets.length>0}));)e=jf(),zf(e);return bf.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:xf}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=xf),window.dispatchEvent(e)}(),e>0},Bf=[],Ff=function(e){if(!yf){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Bf.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),yf=function(){n.textContent="".concat(t?t--:t++)}}Bf.push(e),yf()},qf=0,Zf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Wf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Gf=function(e){return void 0===e&&(e=0),Date.now()+e},Uf=!1,Xf=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),!Uf){Uf=!0;var n,r=Gf(e);n=function(){var n=!1;try{n=Hf()}finally{if(Uf=!1,e=r-Gf(),!qf)return;n?t.run(1e3):e>0?t.run(e):t.start()}},Ff((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,Zf)};document.body?t():Lf.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Wf.forEach((function(t){return Lf.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Wf.forEach((function(t){return Lf.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Yf=function(e){!qf&&e>0&&Xf.start(),!(qf+=e)&&Xf.stop()},Kf=function(){function e(e,t){this.target=e,this.observedBox=t||lf.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=If(this.target,this.observedBox,!0);return function(e){return!kf(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}(),Jf=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Qf=new WeakMap,eg=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},tg=function(){function e(){}return e.connect=function(e,t){var n=new Jf(e,t);Qf.set(e,n)},e.observe=function(e,t,n){var r=Qf.get(e),o=0===r.observationTargets.length;eg(r.observationTargets,t)<0&&(o&&bf.push(r),r.observationTargets.push(new Kf(t,n&&n.box)),Yf(1),Xf.schedule())},e.unobserve=function(e,t){var n=Qf.get(e),r=eg(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&bf.splice(bf.indexOf(n),1),n.observationTargets.splice(r,1),Yf(-1))},e.disconnect=function(e){var t=this,n=Qf.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),ng=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.");tg.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(!Ef(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");tg.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(!Ef(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");tg.unobserve(this,e)},e.prototype.disconnect=function(){tg.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function rg(){return rg=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},rg.apply(this,arguments)}function og(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 ig="undefined"!=typeof window?de:se;function ag(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 lg(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var sg={box:"border-box"};function cg(e,t){var n=t.label,r=t.enabled,o=t.resizeSourceRef,i=ae(0),a=i[0],l=i[1];ge(n+": "+a);var s=pe((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return ig((function(){if(e.current&&r){var t=new ng(s);return t.observe(e.current,sg),function(){t.disconnect()}}}),[e,s,r]),r?a:0}function dg(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var ug={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},pg={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},hg=function(e,t,n){return void 0===n&&(n=e.context),new mu(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:rg({},ug,pg)}}},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:rg({},ug,pg)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:rg({},{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:[bu({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(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(dg()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),fg=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],gg=["velocity"],mg=["onRest","config"],vg={tension:170,friction:26},bg=vg.tension,xg=vg.friction,yg=te.forwardRef((function(e,t){var n=e.children,r=e.sibling,o=e.className,i=e.footer,a=e.header,l=e.open,s=e.initialState,c=e.lastSnapRef,d=e.initialFocusRef,u=e.onDismiss,p=e.maxHeight,h=e.defaultSnap,f=void 0===h?Cg:h,g=e.snapPoints,m=void 0===g?$g:g,v=e.blocking,b=void 0===v||v,x=e.scrollLocking,y=void 0===x||x,w=e.style,C=e.onSpringStart,$=e.onSpringCancel,k=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?b:S,L=e.expandOnContentDrag,R=void 0!==L&&L,O=og(e,fg),T=function(){var e=ae(!1),t=e[0],n=e[1],r=ae({}),o=r[0],i=r[1],a=pe((function(e){return i((function(t){var n;return rg({},t,((n={})[e]=!1,n))})),function(){i((function(t){var n;return rg({},t,((n={})[e]=!0,n))}))}}),[]);return se((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&n(!0)}),[o]),{ready:t,registerReady:a}}(),P=T.ready,M=T.registerReady,_=le(!1),D=le(C),N=le($),I=le(k);se((function(){D.current=C,N.current=$,I.current=k}),[$,C,k]);var V,A,j=ap((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),z=j[0],H=j[1],B=le(null),F=le(null),q=le(null),Z=le(null),W=le(null),G=le(null),U=le(0),X=le(),Y=le(!1),K=(V=oe((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),A=le(null==V?void 0:V.matches),ge(A.current?"reduce":"no-preference"),se((function(){var e=function(e){A.current=e.matches};return null==V||V.addListener(e),function(){return null==V?void 0:V.removeListener(e)}}),[V]),A),J=function(e){var t=e.targetRef,n=e.enabled,r=e.reserveScrollBarGap,o=le({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return ge(n?"Enabled":"Disabled"),se((function(){if(!n)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,i=!1;o.current={activate:function(){i||(i=!0,mf(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:r}))},deactivate:function(){i&&(i=!1,vf(e))}}}),[n,t,r]),o}({targetRef:F,enabled:P&&y,reserveScrollBarGap:E}),Q=function(e){var t=e.targetRef,n=e.enabled,r=le({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return ge(n?"Enabled":"Disabled"),se((function(){if(!n)return r.current.deactivate(),void(r.current={activate:function(){},deactivate:function(){}});var e=t.current,o=!1,i=[],a=[];r.current={activate:function(){if(!o){o=!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),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){o&&(o=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,n]),r}({targetRef:B,enabled:P&&b}),ee=function(e){var t=e.targetRef,n=e.fallbackRef,r=e.initialFocusRef,o=e.enabled,i=le({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return ge(o?"Enabled":"Disabled"),se((function(){if(!o)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=n.current,a=rf(t.current,{onActivate:void 0,initialFocus:r?function(){return(null==r?void 0:r.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),l=!1;i.current={activate:function(){try{return l?Promise.resolve():(l=!0,Promise.resolve(a.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(){l&&(l=!1,a.deactivate())}}}),[o,n,r,t]),i}({targetRef:B,fallbackRef:G,initialFocusRef:d||void 0,enabled:P&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,n=e.heightRef,r=e.lastSnapRef,o=e.ready,i=function(e){var t=e.contentRef,n=e.controlledMaxHeight,r=e.footerEnabled,o=e.footerRef,i=e.headerEnabled,a=e.headerRef,l=e.registerReady,s=e.resizeSourceRef,c=oe((function(){return l("contentHeight")}),[l]),d=function(e,t,n){var r=oe((function(){return t("maxHeight")}),[t]),o=ae((function(){return lg(e)||"undefined"!=typeof window?window.innerHeight:0})),i=o[0],a=o[1],l=i>0,s=le(0);return ge(e?"controlled":"auto"),se((function(){l&&r()}),[l,r]),ig((function(){if(e)return a(lg(e)),void(n.current="maxheightprop");var t=function(){s.current||(s.current=requestAnimationFrame((function(){a(window.innerHeight),n.current="window",s.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),n.current="window",r(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(s.current)}}),[e,r,n]),i}(n,l,s),u=cg(a,{label:"headerHeight",enabled:i,resizeSourceRef:s}),p=cg(t,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=cg(o,{label:"footerHeight",enabled:r,resizeSourceRef:s}),f=Math.min(d-u-h,p)+u+h;ge("minHeight: "+f);var g=p>0;return se((function(){g&&c()}),[g,c]),{maxHeight:d,minHeight:f,headerHeight:u,footerHeight:h}}({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=i.maxHeight,l=i.minHeight,s=i.headerHeight,c=i.footerHeight,d=function(e,t){var n=[].concat(e).map(lg).reduce((function(e,n){return e.add(ag(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}}(o?t({height:n.current,footerHeight:c,headerHeight:s,minHeight:l,maxHeight:a}):[0],a),u=d.snapPoints,p=d.minSnap,h=d.maxSnap;return ge("minSnap: "+p+", maxSnap:"+h),{minSnap:p,maxSnap:h,findSnap:function(e){var t=lg("function"==typeof e?e({footerHeight:c,headerHeight:s,height:n.current,minHeight:l,maxHeight:a,snapPoints:u,lastSnap:r.current}):e);return u.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:q,controlledMaxHeight:p,footerEnabled:!!i,footerRef:W,getSnapPoints:m,headerEnabled:!1!==a,headerRef:Z,heightRef:U,lastSnapRef:c,ready:P,registerReady:M,resizeSourceRef:X}),re=ne.minSnap,ie=ne.maxSnap,ce=ne.maxHeight,de=ne.findSnap,ue=le(ce),he=le(re),me=le(ie),ve=le(de),be=le(0);ig((function(){ue.current=ce,me.current=ie,he.current=re,ve.current=de,be.current=de(f)}),[de,f,ce,ie,re]);var xe=pe((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=og(n,gg),a=og(e,mg);return new Promise((function(e){return H(rg({},a,{config:rg({velocity:o},i,{mass:1,tension:bg,friction:Math.max(xg,xg+(xg-xg*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),ye=Pu(hg,{devTools:!1,actions:{onOpenCancel:pe((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapCancel:pe((function(e){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:pe((function(){return null==N.current?void 0:N.current({type:"CLOSE"})}),[]),onResizeCancel:pe((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:X.current})}),[]),onOpenEnd:pe((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapEnd:pe((function(e,t){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:pe((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:X.current})}),[])},context:{initialState:s},services:{onSnapStart:pe((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:pe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:pe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:pe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:pe((function(e,t){try{return Promise.resolve(null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:pe((function(){try{return Promise.resolve(null==I.current?void 0:I.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:pe((function(){try{return Promise.resolve(null==I.current?void 0:I.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:pe((function(){try{return Promise.resolve(null==I.current?void 0:I.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:pe((function(e,t){try{return Promise.resolve(xe({y:be.current,ready:0,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe]),activate:pe((function(e,t){try{return _.current=!0,Promise.resolve(Promise.all([J.current.activate(),ee.current.activate(),Q.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[Q,ee,J]),deactivate:pe((function(){try{return J.current.deactivate(),ee.current.deactivate(),Q.current.deactivate(),_.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[Q,ee,J]),openImmediately:pe((function(){try{return U.current=be.current,Promise.resolve(xe({y:be.current,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe]),openSmoothly:pe((function(){try{return Promise.resolve(xe({y:0,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:!0})).then((function(){return U.current=be.current,Promise.resolve(xe({y:be.current,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:K.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[xe,K]),snapSmoothly:pe((function(e,t){try{var n=ve.current(e.y);return U.current=n,c.current=n,Promise.resolve(xe({y:n,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:he.current,immediate:K.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe,c,K]),resizeSmoothly:pe((function(){try{var e=ve.current(U.current);return U.current=e,c.current=e,Promise.resolve(xe({y:e,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:he.current,immediate:"element"!==X.current||K.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe,c,K]),closeSmoothly:pe((function(e,t){try{return xe({minSnap:U.current,immediate:!0}),U.current=0,Promise.resolve(xe({y:0,maxHeight:ue.current,maxSnap:me.current,immediate:K.current})).then((function(){return Promise.resolve(xe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[xe,K])}}),we=ye[0],Ce=ye[1];se((function(){P&&Ce(l?"OPEN":"CLOSE")}),[l,Ce,P]),ig((function(){(ce||ie||re)&&Ce("RESIZE")}),[ce,ie,re,Ce]),se((function(){return function(){J.current.deactivate(),ee.current.deactivate(),Q.current.deactivate()}}),[Q,ee,J]),fe(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,a=void 0===i?"custom":i;Ce("SNAP",{payload:{y:ve.current(e),velocity:o,source:a}})},get height(){return U.current}}}),[Ce]),se((function(){var e=F.current,t=function(e){Y.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,F]);var $e=Lh((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,a=void 0!==i&&i,l=e.cancel,s=e.direction[1],c=e.down,d=e.first,p=e.last,h=e.memo,f=void 0===h?z.y.getValue():h,g=e.tap,m=e.velocity,v=-1*e.movement[1];if(!_.current)return l(),f;if(u&&o&&g)return l(),setTimeout((function(){return u()}),0),f;if(g)return f;var b=f+v,x=v*m,y=Math.max(he.current,Math.min(me.current,b+2*x));if(!c&&u&&s>0&&b+x<he.current/2)return l(),u(),f;var w=c?u||he.current!==me.current?Bp(b,u?0:he.current,me.current,.55):b<he.current?Bp(b,he.current,2*me.current,.55):Bp(b,he.current/2,me.current,.55):y;return R&&a?(w>=me.current&&(w=me.current),f===me.current&&F.current.scrollTop>0&&(w=me.current),Y.current=w<me.current):Y.current=!1,d&&Ce("DRAG"),p?(Ce("SNAP",{payload:{y:w,velocity:m>.05?m:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:he.current,immediate:!0,config:{velocity:m}}),f)}),{filterTaps:!0});if(Number.isNaN(me.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(he.current))throw new TypeError("minSnapRef is NaN!!");var ke=function(e){var t,n=e.spring,r=ep([n.y,n.maxHeight],(function(e,t){return Math.round(ag(t-e,0,16))+"px"})),o=ep([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return ag(e,t,n)+"px"})),i=ep([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=ep([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),l=ep([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return ag((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),s=ep([n.y,n.minSnap],(function(e,t){return t?ag(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=l,t["--rsbs-backdrop-opacity"]=s,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:z});return te.createElement(Ip.div,rg({},O,{"data-rsbs-root":!0,"data-rsbs-state":wg.find(we.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!u,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!i,className:o,ref:B,style:rg({},ke,w,{opacity:z.ready})}),r,b&&te.createElement("div",rg({key:"backdrop","data-rsbs-backdrop":!0},$e({closeOnTap:!0}))),te.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(),u&&u())}},!1!==a&&te.createElement("div",rg({key:"header","data-rsbs-header":!0,ref:Z},$e()),a),te.createElement("div",rg({key:"scroll","data-rsbs-scroll":!0,ref:F},R?$e({isContentDragging:!0}):{}),te.createElement("div",{"data-rsbs-content":!0,ref:q},n)),i&&te.createElement("div",rg({key:"footer",ref:W,"data-rsbs-footer":!0},$e()),i)))})),wg=["closed","opening","open","closing","dragging","snapping","resizing"];function Cg(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function $g(e){return e.minHeight}var kg=["onSpringStart","onSpringEnd","skipInitialTransition"],Sg=ie((function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,o=e.skipInitialTransition,i=og(e,kg),a=ae(!1),l=a[0],s=a[1],c=le(),d=le(null),u=le(o&&i.open?"OPEN":"CLOSED");ig((function(){if(i.open)return cancelAnimationFrame(c.current),s(!0),function(){u.current="CLOSED"}}),[i.open]);var p=pe((function(e){return Promise.resolve(null==n?void 0:n(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(c.current)}))}),[n]),h=pe((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"CLOSE"===e.type&&(c.current=requestAnimationFrame((function(){return s(!1)})))}))}),[r]);return l?te.createElement(yc,{"data-rsbs-portal":!0},te.createElement(yg,rg({},i,{lastSnapRef:d,ref:t,initialState:u.current,onSpringStart:p,onSpringEnd:h}))):null}));const Eg=ye`
|
|
2535
|
-
width:
|
|
2536
|
-
border-radius:
|
|
2539
|
+
function Xh(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 Yh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xh(Object(n),!0).forEach((function(t){Kh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jh,Qh=(Jh=[],{activateTrap:function(e){if(Jh.length>0){var t=Jh[Jh.length-1];t!==e&&t.pause()}var n=Jh.indexOf(e);-1===n||Jh.splice(n,1),Jh.push(e)},deactivateTrap:function(e){var t=Jh.indexOf(e);-1!==t&&Jh.splice(t,1),Jh.length>0&&Jh[Jh.length-1].unpause()}}),ef=function(e){return setTimeout(e,0)},tf=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},nf=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},rf=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},of=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=Yh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},l=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}))}))},s=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];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 l=t;if("string"==typeof t&&!(l=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return l},c=function(){var e=s("initialFocus");if(!1===e)return!1;if(void 0===e)if(l(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||s("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=Zh(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?Nh([t],n.includeContainer,{filter:Hh.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Dh(t,n.includeContainer,Hh.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 Wh(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return Wh(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!s("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()))},p=function(e){var t=s("setReturnFocus",e);return t||!1!==t&&e},h=function(e){var t=rf(e);l(t)>=0||(nf(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Uh(t,o.tabbableOptions)}):nf(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=rf(e),n=l(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==nf(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=rf(e);d();var n=null;if(i.tabbableGroups.length>0){var r=l(t),a=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=tf(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(a.container===t||Uh(t,o.tabbableOptions)&&!Wh(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(c=r),c>=0){var p=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[p].lastTabbableNode}}else{var h=tf(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(h<0&&(a.container===t||Uh(t,o.tabbableOptions)&&!Wh(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(h=r),h>=0){var f=h===i.tabbableGroups.length-1?0:h+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=s("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},m=function(e){var t=rf(e);l(t)>=0||nf(o.clickOutsideDeactivates,e)||nf(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return Qh.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?ef((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",m,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",m,!0),r.removeEventListener("keydown",g,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=a(e,"onActivate"),n=a(e,"onPostActivate"),o=a(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var l=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!i.active)return this;var t=Yh({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,Qh.deactivateTrap(n);var r=a(t,"onDeactivate"),l=a(t,"onPostDeactivate"),s=a(t,"checkCanReturnFocus"),c=a(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){ef((function(){c&&u(p(i.nodeFocusedBeforeActivation)),l&&l()}))};return c&&s?(s(p(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 af=!1;if("undefined"!=typeof window){var lf={get passive(){af=!0}};window.addEventListener("testPassive",null,lf),window.removeEventListener("testPassive",null,lf)}var sf,cf="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),df=[],uf=!1,pf=-1,hf=void 0,ff=void 0,gf=function(e){return df.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},mf=function(e){var t=e||window.event;return!!gf(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},vf=function(e,t){if(e){if(!df.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};df=[].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)}(df),[n]),cf?(e.ontouchstart=function(e){1===e.targetTouches.length&&(pf=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-pf;!gf(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?mf(e):e.stopPropagation())}(t,e)},uf||(document.addEventListener("touchmove",mf,af?{passive:!1}:void 0),uf=!0)):function(e){if(void 0===ff){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(ff=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===hf&&(hf=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.")},bf=function(e){e?(df=df.filter((function(t){return t.targetElement!==e})),cf?(e.ontouchstart=null,e.ontouchmove=null,uf&&0===df.length&&(document.removeEventListener("touchmove",mf,af?{passive:!1}:void 0),uf=!1)):df.length||(void 0!==ff&&(document.body.style.paddingRight=ff,ff=void 0),void 0!==hf&&(document.body.style.overflow=hf,hf=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},xf=[],yf="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"}(sf||(sf={}));var wf,Cf=function(e){return Object.freeze(e)},$f=function(e,t){this.inlineSize=e,this.blockSize=t,Cf(this)},kf=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,Cf(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}(),Sf=function(e){return e instanceof SVGElement&&"getBBox"in e},Ef=function(e){if(Sf(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Lf=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)},Rf="undefined"!=typeof window?window:{},Of=new WeakMap,Tf=/auto|scroll/,Pf=/^tb|vertical/,Mf=/msie|trident/i.test(Rf.navigator&&Rf.navigator.userAgent),_f=function(e){return parseFloat(e||"0")},Df=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new $f((n?t:e)||0,(n?e:t)||0)},Nf=Cf({devicePixelContentBoxSize:Df(),borderBoxSize:Df(),contentBoxSize:Df(),contentRect:new kf(0,0,0,0)}),If=function(e,t){if(void 0===t&&(t=!1),Of.has(e)&&!t)return Of.get(e);if(Ef(e))return Of.set(e,Nf),Nf;var n=getComputedStyle(e),r=Sf(e)&&e.ownerSVGElement&&e.getBBox(),o=!Mf&&"border-box"===n.boxSizing,i=Pf.test(n.writingMode||""),a=!r&&Tf.test(n.overflowY||""),l=!r&&Tf.test(n.overflowX||""),s=r?0:_f(n.paddingTop),c=r?0:_f(n.paddingRight),d=r?0:_f(n.paddingBottom),u=r?0:_f(n.paddingLeft),p=r?0:_f(n.borderTopWidth),h=r?0:_f(n.borderRightWidth),f=r?0:_f(n.borderBottomWidth),g=u+c,m=s+d,v=(r?0:_f(n.borderLeftWidth))+h,b=p+f,x=l?e.offsetHeight-b-e.clientHeight:0,y=a?e.offsetWidth-v-e.clientWidth:0,w=o?g+v:0,C=o?m+b:0,$=r?r.width:_f(n.width)-w-y,k=r?r.height:_f(n.height)-C-x,S=$+g+y+v,E=k+m+x+b,L=Cf({devicePixelContentBoxSize:Df(Math.round($*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:Df(S,E,i),contentBoxSize:Df($,k,i),contentRect:new kf(u,s,$,k)});return Of.set(e,L),L},Vf=function(e,t,n){var r=If(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case sf.DEVICE_PIXEL_CONTENT_BOX:return a;case sf.BORDER_BOX:return o;default:return i}},Af=function(e){var t=If(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Cf([t.borderBoxSize]),this.contentBoxSize=Cf([t.contentBoxSize]),this.devicePixelContentBoxSize=Cf([t.devicePixelContentBoxSize])},jf=function(e){if(Ef(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},zf=function(){var e=1/0,t=[];xf.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Af(t.target),o=jf(t.target);r.push(n),t.lastReportedSize=Vf(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},Hf=function(e){xf.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(jf(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},Bf=function(){var e=0;for(Hf(e);xf.some((function(e){return e.activeTargets.length>0}));)e=zf(),Hf(e);return xf.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:yf}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=yf),window.dispatchEvent(e)}(),e>0},Ff=[],qf=function(e){if(!wf){var t=0,n=document.createTextNode("");new MutationObserver((function(){return Ff.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),wf=function(){n.textContent="".concat(t?t--:t++)}}Ff.push(e),wf()},Zf=0,Wf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Uf=function(e){return void 0===e&&(e=0),Date.now()+e},Xf=!1,Yf=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),!Xf){Xf=!0;var n,r=Uf(e);n=function(){var n=!1;try{n=Bf()}finally{if(Xf=!1,e=r-Uf(),!Zf)return;n?t.run(1e3):e>0?t.run(e):t.start()}},qf((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,Wf)};document.body?t():Rf.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gf.forEach((function(t){return Rf.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Gf.forEach((function(t){return Rf.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Kf=function(e){!Zf&&e>0&&Yf.start(),!(Zf+=e)&&Yf.stop()},Jf=function(){function e(e,t){this.target=e,this.observedBox=t||sf.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Vf(this.target,this.observedBox,!0);return function(e){return!Sf(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}(),Qf=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},eg=new WeakMap,tg=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ng=function(){function e(){}return e.connect=function(e,t){var n=new Qf(e,t);eg.set(e,n)},e.observe=function(e,t,n){var r=eg.get(e),o=0===r.observationTargets.length;tg(r.observationTargets,t)<0&&(o&&xf.push(r),r.observationTargets.push(new Jf(t,n&&n.box)),Kf(1),Yf.schedule())},e.unobserve=function(e,t){var n=eg.get(e),r=tg(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&xf.splice(xf.indexOf(n),1),n.observationTargets.splice(r,1),Kf(-1))},e.disconnect=function(e){var t=this,n=eg.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),rg=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.");ng.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(!Lf(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ng.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(!Lf(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ng.unobserve(this,e)},e.prototype.disconnect=function(){ng.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function og(){return og=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},og.apply(this,arguments)}function ig(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 ag="undefined"!=typeof window?de:se;function lg(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 sg(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var cg={box:"border-box"};function dg(e,t){var n=t.label,r=t.enabled,o=t.resizeSourceRef,i=ae(0),a=i[0],l=i[1];ge(n+": "+a);var s=pe((function(e){l(e[0].borderBoxSize[0].blockSize),o.current="element"}),[o]);return ag((function(){if(e.current&&r){var t=new rg(s);return t.observe(e.current,cg),function(){t.disconnect()}}}),[e,s,r]),r?a:0}function ug(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var pg={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},hg={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},fg=function(e,t,n){return void 0===n&&(n=e.context),new vu(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:og({},pg,hg)}}},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:og({},pg,hg)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:og({},{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:[xu({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(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(ug()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),gg=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],mg=["velocity"],vg=["onRest","config"],bg={tension:170,friction:26},xg=bg.tension,yg=bg.friction,wg=te.forwardRef((function(e,t){var n=e.children,r=e.sibling,o=e.className,i=e.footer,a=e.header,l=e.open,s=e.initialState,c=e.lastSnapRef,d=e.initialFocusRef,u=e.onDismiss,p=e.maxHeight,h=e.defaultSnap,f=void 0===h?$g:h,g=e.snapPoints,m=void 0===g?kg:g,v=e.blocking,b=void 0===v||v,x=e.scrollLocking,y=void 0===x||x,w=e.style,C=e.onSpringStart,$=e.onSpringCancel,k=e.onSpringEnd,S=e.reserveScrollBarGap,E=void 0===S?b:S,L=e.expandOnContentDrag,R=void 0!==L&&L,O=ig(e,gg),T=function(){var e=ae(!1),t=e[0],n=e[1],r=ae({}),o=r[0],i=r[1],a=pe((function(e){return i((function(t){var n;return og({},t,((n={})[e]=!1,n))})),function(){i((function(t){var n;return og({},t,((n={})[e]=!0,n))}))}}),[]);return se((function(){var e=Object.values(o);0!==e.length&&e.every(Boolean)&&n(!0)}),[o]),{ready:t,registerReady:a}}(),P=T.ready,M=T.registerReady,_=le(!1),D=le(C),N=le($),I=le(k);se((function(){D.current=C,N.current=$,I.current=k}),[$,C,k]);var V,A,j=lp((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),z=j[0],H=j[1],B=le(null),F=le(null),q=le(null),Z=le(null),W=le(null),G=le(null),U=le(0),X=le(),Y=le(!1),K=(V=oe((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),A=le(null==V?void 0:V.matches),ge(A.current?"reduce":"no-preference"),se((function(){var e=function(e){A.current=e.matches};return null==V||V.addListener(e),function(){return null==V?void 0:V.removeListener(e)}}),[V]),A),J=function(e){var t=e.targetRef,n=e.enabled,r=e.reserveScrollBarGap,o=le({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return ge(n?"Enabled":"Disabled"),se((function(){if(!n)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,i=!1;o.current={activate:function(){i||(i=!0,vf(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:r}))},deactivate:function(){i&&(i=!1,bf(e))}}}),[n,t,r]),o}({targetRef:F,enabled:P&&y,reserveScrollBarGap:E}),Q=function(e){var t=e.targetRef,n=e.enabled,r=le({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return ge(n?"Enabled":"Disabled"),se((function(){if(!n)return r.current.deactivate(),void(r.current={activate:function(){},deactivate:function(){}});var e=t.current,o=!1,i=[],a=[];r.current={activate:function(){if(!o){o=!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),a.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){o&&(o=!1,a.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],a=[])}}}),[t,n]),r}({targetRef:B,enabled:P&&b}),ee=function(e){var t=e.targetRef,n=e.fallbackRef,r=e.initialFocusRef,o=e.enabled,i=le({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return ge(o?"Enabled":"Disabled"),se((function(){if(!o)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=n.current,a=of(t.current,{onActivate:void 0,initialFocus:r?function(){return(null==r?void 0:r.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),l=!1;i.current={activate:function(){try{return l?Promise.resolve():(l=!0,Promise.resolve(a.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(){l&&(l=!1,a.deactivate())}}}),[o,n,r,t]),i}({targetRef:B,fallbackRef:G,initialFocusRef:d||void 0,enabled:P&&b&&!1!==d}),ne=function(e){var t=e.getSnapPoints,n=e.heightRef,r=e.lastSnapRef,o=e.ready,i=function(e){var t=e.contentRef,n=e.controlledMaxHeight,r=e.footerEnabled,o=e.footerRef,i=e.headerEnabled,a=e.headerRef,l=e.registerReady,s=e.resizeSourceRef,c=oe((function(){return l("contentHeight")}),[l]),d=function(e,t,n){var r=oe((function(){return t("maxHeight")}),[t]),o=ae((function(){return sg(e)||"undefined"!=typeof window?window.innerHeight:0})),i=o[0],a=o[1],l=i>0,s=le(0);return ge(e?"controlled":"auto"),se((function(){l&&r()}),[l,r]),ag((function(){if(e)return a(sg(e)),void(n.current="maxheightprop");var t=function(){s.current||(s.current=requestAnimationFrame((function(){a(window.innerHeight),n.current="window",s.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),n.current="window",r(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(s.current)}}),[e,r,n]),i}(n,l,s),u=dg(a,{label:"headerHeight",enabled:i,resizeSourceRef:s}),p=dg(t,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=dg(o,{label:"footerHeight",enabled:r,resizeSourceRef:s}),f=Math.min(d-u-h,p)+u+h;ge("minHeight: "+f);var g=p>0;return se((function(){g&&c()}),[g,c]),{maxHeight:d,minHeight:f,headerHeight:u,footerHeight:h}}({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=i.maxHeight,l=i.minHeight,s=i.headerHeight,c=i.footerHeight,d=function(e,t){var n=[].concat(e).map(sg).reduce((function(e,n){return e.add(lg(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}}(o?t({height:n.current,footerHeight:c,headerHeight:s,minHeight:l,maxHeight:a}):[0],a),u=d.snapPoints,p=d.minSnap,h=d.maxSnap;return ge("minSnap: "+p+", maxSnap:"+h),{minSnap:p,maxSnap:h,findSnap:function(e){var t=sg("function"==typeof e?e({footerHeight:c,headerHeight:s,height:n.current,minHeight:l,maxHeight:a,snapPoints:u,lastSnap:r.current}):e);return u.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:q,controlledMaxHeight:p,footerEnabled:!!i,footerRef:W,getSnapPoints:m,headerEnabled:!1!==a,headerRef:Z,heightRef:U,lastSnapRef:c,ready:P,registerReady:M,resizeSourceRef:X}),re=ne.minSnap,ie=ne.maxSnap,ce=ne.maxHeight,de=ne.findSnap,ue=le(ce),he=le(re),me=le(ie),ve=le(de),be=le(0);ag((function(){ue.current=ce,me.current=ie,he.current=re,ve.current=de,be.current=de(f)}),[de,f,ce,ie,re]);var xe=pe((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=ig(n,mg),a=ig(e,vg);return new Promise((function(e){return H(og({},a,{config:og({velocity:o},i,{mass:1,tension:xg,friction:Math.max(yg,yg+(yg-yg*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[H]),ye=Mu(fg,{devTools:!1,actions:{onOpenCancel:pe((function(){return null==N.current?void 0:N.current({type:"OPEN"})}),[]),onSnapCancel:pe((function(e){return null==N.current?void 0:N.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:pe((function(){return null==N.current?void 0:N.current({type:"CLOSE"})}),[]),onResizeCancel:pe((function(){return null==N.current?void 0:N.current({type:"RESIZE",source:X.current})}),[]),onOpenEnd:pe((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapEnd:pe((function(e,t){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:pe((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:X.current})}),[])},context:{initialState:s},services:{onSnapStart:pe((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:pe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:pe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:pe((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:pe((function(e,t){try{return Promise.resolve(null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:pe((function(){try{return Promise.resolve(null==I.current?void 0:I.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:pe((function(){try{return Promise.resolve(null==I.current?void 0:I.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:pe((function(){try{return Promise.resolve(null==I.current?void 0:I.current({type:"RESIZE",source:X.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:pe((function(e,t){try{return Promise.resolve(xe({y:be.current,ready:0,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe]),activate:pe((function(e,t){try{return _.current=!0,Promise.resolve(Promise.all([J.current.activate(),ee.current.activate(),Q.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[Q,ee,J]),deactivate:pe((function(){try{return J.current.deactivate(),ee.current.deactivate(),Q.current.deactivate(),_.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[Q,ee,J]),openImmediately:pe((function(){try{return U.current=be.current,Promise.resolve(xe({y:be.current,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe]),openSmoothly:pe((function(){try{return Promise.resolve(xe({y:0,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:!0})).then((function(){return U.current=be.current,Promise.resolve(xe({y:be.current,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:be.current,immediate:K.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[xe,K]),snapSmoothly:pe((function(e,t){try{var n=ve.current(e.y);return U.current=n,c.current=n,Promise.resolve(xe({y:n,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:he.current,immediate:K.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe,c,K]),resizeSmoothly:pe((function(){try{var e=ve.current(U.current);return U.current=e,c.current=e,Promise.resolve(xe({y:e,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:he.current,immediate:"element"!==X.current||K.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[xe,c,K]),closeSmoothly:pe((function(e,t){try{return xe({minSnap:U.current,immediate:!0}),U.current=0,Promise.resolve(xe({y:0,maxHeight:ue.current,maxSnap:me.current,immediate:K.current})).then((function(){return Promise.resolve(xe({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[xe,K])}}),we=ye[0],Ce=ye[1];se((function(){P&&Ce(l?"OPEN":"CLOSE")}),[l,Ce,P]),ag((function(){(ce||ie||re)&&Ce("RESIZE")}),[ce,ie,re,Ce]),se((function(){return function(){J.current.deactivate(),ee.current.deactivate(),Q.current.deactivate()}}),[Q,ee,J]),fe(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,a=void 0===i?"custom":i;Ce("SNAP",{payload:{y:ve.current(e),velocity:o,source:a}})},get height(){return U.current}}}),[Ce]),se((function(){var e=F.current,t=function(e){Y.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return R&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[R,F]);var $e=Rh((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,a=void 0!==i&&i,l=e.cancel,s=e.direction[1],c=e.down,d=e.first,p=e.last,h=e.memo,f=void 0===h?z.y.getValue():h,g=e.tap,m=e.velocity,v=-1*e.movement[1];if(!_.current)return l(),f;if(u&&o&&g)return l(),setTimeout((function(){return u()}),0),f;if(g)return f;var b=f+v,x=v*m,y=Math.max(he.current,Math.min(me.current,b+2*x));if(!c&&u&&s>0&&b+x<he.current/2)return l(),u(),f;var w=c?u||he.current!==me.current?Fp(b,u?0:he.current,me.current,.55):b<he.current?Fp(b,he.current,2*me.current,.55):Fp(b,he.current/2,me.current,.55):y;return R&&a?(w>=me.current&&(w=me.current),f===me.current&&F.current.scrollTop>0&&(w=me.current),Y.current=w<me.current):Y.current=!1,d&&Ce("DRAG"),p?(Ce("SNAP",{payload:{y:w,velocity:m>.05?m:1,source:"dragging"}}),f):(H({y:w,ready:1,maxHeight:ue.current,maxSnap:me.current,minSnap:he.current,immediate:!0,config:{velocity:m}}),f)}),{filterTaps:!0});if(Number.isNaN(me.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(he.current))throw new TypeError("minSnapRef is NaN!!");var ke=function(e){var t,n=e.spring,r=tp([n.y,n.maxHeight],(function(e,t){return Math.round(lg(t-e,0,16))+"px"})),o=tp([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return lg(e,t,n)+"px"})),i=tp([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),a=tp([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),l=tp([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return lg((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),s=tp([n.y,n.minSnap],(function(e,t){return t?lg(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=l,t["--rsbs-backdrop-opacity"]=s,t["--rsbs-antigap-scale-y"]=a,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:z});return te.createElement(Vp.div,og({},O,{"data-rsbs-root":!0,"data-rsbs-state":Cg.find(we.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!u,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!i,className:o,ref:B,style:og({},ke,w,{opacity:z.ready})}),r,b&&te.createElement("div",og({key:"backdrop","data-rsbs-backdrop":!0},$e({closeOnTap:!0}))),te.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(),u&&u())}},!1!==a&&te.createElement("div",og({key:"header","data-rsbs-header":!0,ref:Z},$e()),a),te.createElement("div",og({key:"scroll","data-rsbs-scroll":!0,ref:F},R?$e({isContentDragging:!0}):{}),te.createElement("div",{"data-rsbs-content":!0,ref:q},n)),i&&te.createElement("div",og({key:"footer",ref:W,"data-rsbs-footer":!0},$e()),i)))})),Cg=["closed","opening","open","closing","dragging","snapping","resizing"];function $g(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function kg(e){return e.minHeight}var Sg=["onSpringStart","onSpringEnd","skipInitialTransition"],Eg=ie((function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,o=e.skipInitialTransition,i=ig(e,Sg),a=ae(!1),l=a[0],s=a[1],c=le(),d=le(null),u=le(o&&i.open?"OPEN":"CLOSED");ag((function(){if(i.open)return cancelAnimationFrame(c.current),s(!0),function(){u.current="CLOSED"}}),[i.open]);var p=pe((function(e){return Promise.resolve(null==n?void 0:n(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(c.current)}))}),[n]),h=pe((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"CLOSE"===e.type&&(c.current=requestAnimationFrame((function(){return s(!1)})))}))}),[r]);return l?te.createElement(wc,{"data-rsbs-portal":!0},te.createElement(wg,og({},i,{lastSnapRef:d,ref:t,initialState:u.current,onSpringStart:p,onSpringEnd:h}))):null}));const Lg=ye`
|
|
2540
|
+
width: 2.5rem;
|
|
2541
|
+
border-radius: 0.25rem;
|
|
2537
2542
|
background: transparent;
|
|
2538
|
-
padding:
|
|
2543
|
+
padding: 0.25rem 0.375rem;
|
|
2539
2544
|
cursor: grab;
|
|
2540
2545
|
&:focus-visible {
|
|
2541
2546
|
outline-color: ${Re("primary",700)};
|
|
2542
2547
|
}
|
|
2543
2548
|
div {
|
|
2544
|
-
height:
|
|
2545
|
-
margin:
|
|
2549
|
+
height: 0.125rem;
|
|
2550
|
+
margin: 0;
|
|
2546
2551
|
background: ${Re("neutral",300)};
|
|
2547
2552
|
}
|
|
2548
|
-
`,
|
|
2553
|
+
`,Rg=(e,t)=>ye`
|
|
2549
2554
|
[data-rsbs-overlay] {
|
|
2550
|
-
border-top-left-radius:
|
|
2551
|
-
border-top-right-radius:
|
|
2555
|
+
border-top-left-radius: 1rem;
|
|
2556
|
+
border-top-right-radius: 1rem;
|
|
2552
2557
|
overflow: hidden;
|
|
2553
2558
|
z-index: ${t};
|
|
2554
2559
|
}
|
|
@@ -2559,8 +2564,8 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2559
2564
|
}
|
|
2560
2565
|
|
|
2561
2566
|
[data-rsbs-header] {
|
|
2562
|
-
padding:
|
|
2563
|
-
min-height: ${e?"
|
|
2567
|
+
padding: 0;
|
|
2568
|
+
min-height: ${e?"3.125rem":"1.25rem"};
|
|
2564
2569
|
}
|
|
2565
2570
|
|
|
2566
2571
|
[data-rsbs-header]:before {
|
|
@@ -2568,10 +2573,10 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2568
2573
|
}
|
|
2569
2574
|
|
|
2570
2575
|
[data-rsbs-footer] {
|
|
2571
|
-
padding:
|
|
2572
|
-
min-height:
|
|
2576
|
+
padding: 0;
|
|
2577
|
+
min-height: 4rem;
|
|
2573
2578
|
}
|
|
2574
|
-
`;!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
|
|
2579
|
+
`;!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 Og=(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},Tg=({header:e,content:t,footer:n,open:r=!1,onClose:o,minimizedHeight:i,midHeight:a=200,maxFullHeight:l,defaultSnap:s="minimized",className:c,blocking:d,zIndex:u=1e3})=>{const p=le(null),h=te.useRef([]),[f,g]=te.useState(null),m=window.innerWidth>768,v=h.current;let b="Expand sheet";if(null!=f){const e=Og(f,v);e>0&&e<v.length-1?b="Make full screen":e===v.length-1&&(b="Expanded sheet")}const x=!(null==f||!v.length||Og(f,v)!==v.length-1);return be(Eg,{ref:p,css:Rg(!!e,u),className:c,open:r,onDismiss:o,header:ve("div",{children:[be("button",{type:"button",disabled:x,"aria-label":b,css:Lg,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=v[v.length-1];if(m)return void p.current?.snapTo?.((()=>t));const n=f??v[0];let r=v.findIndex((e=>e>n));-1===r&&(r=v.length-1);const o=v[r];p.current?.snapTo?.((()=>o))},children:be("div",{})}),be("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:b}),e]}),footer:n,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:r})=>{const o=[20,i||e,a+(n?r:0),l||t-t/6];return h.current=o,o},onSpringEnd:()=>{const e=p.current?.height;e&&g(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:r})=>{let o=20;return"minimized"===s?o=i||e:"mid"===s?o=a+(n?r:0):"full"===s&&(o=l||t-t/6),o},blocking:d,children:r?t:null})},Pg=e=>ye`
|
|
2575
2580
|
a,
|
|
2576
2581
|
p {
|
|
2577
2582
|
font-size: ${"small"===e?"0.75rem":"1rem"};
|
|
@@ -2603,19 +2608,19 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2603
2608
|
a:hover {
|
|
2604
2609
|
text-decoration: underline;
|
|
2605
2610
|
}
|
|
2606
|
-
`,
|
|
2611
|
+
`,Mg=e=>ye`
|
|
2607
2612
|
svg {
|
|
2608
2613
|
height: ${"small"===e?"0.5rem":"0.75rem"};
|
|
2609
2614
|
width: ${"small"===e?"0.5rem":"0.75rem"};
|
|
2610
2615
|
color: ${Re("neutral",600)};
|
|
2611
2616
|
}
|
|
2612
|
-
`,
|
|
2617
|
+
`,_g=ye`
|
|
2613
2618
|
cursor: pointer;
|
|
2614
2619
|
color: ${Re("neutral",600)};
|
|
2615
2620
|
display: flex;
|
|
2616
2621
|
justify-content: center;
|
|
2617
2622
|
align-items: center;
|
|
2618
|
-
`,
|
|
2623
|
+
`,Dg=({links:e,separator:t,maxItems:n=99,linkRouter:r,size:o="default"})=>{const[i,a]=ae(e.length>n);se((()=>{a(e.length>n)}),[e.length]);const l=r;return be(V.Root,{children:be(V.List,{gap:"small"===o?"0.375rem":"0.625rem",children:i?ve(xe,{children:[be(V.Item,{css:Pg(o),children:ve(l,{to:e[0].link,href:e[0].link,children:[e[0].icon,e[0].label]})}),be(V.Separator,{css:Mg(o),children:t||be(qe,{rotate:"270"})}),be("li",{className:"chakra-breadcrumb__item",children:be("button",{css:_g,type:"button",onClick:()=>a(!1),children:"..."})}),be(V.Separator,{css:Mg(o),children:t||be(qe,{rotate:"270"})}),be(V.Item,{css:Pg(o),children:ve("p",{"aria-current":"page","aria-label":e[e.length-1].label,children:[e[e.length-1].icon,e[e.length-1].label]})})]}):e.map(((n,r)=>n?.label?ve(me,{children:[be(V.Item,{css:Pg(o),children:r<e.length-1?ve(l,{to:n.link,href:n.link,children:[n.icon,n.label]}):ve("p",{"aria-current":"page","aria-label":n.label,children:[n.label&&n.icon?n.icon:"",n.label]})}),r<e.length-1?be(V.Separator,{css:Mg(o),children:t||be(qe,{rotate:"270"})}):null]},n.label):null))})})},Ng=(e,t)=>ye`
|
|
2619
2624
|
min-height: 3.5rem;
|
|
2620
2625
|
width: 100vw;
|
|
2621
2626
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2627,7 +2632,7 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2627
2632
|
`,Ig=e=>ye`
|
|
2628
2633
|
height: 100%;
|
|
2629
2634
|
width: 100%;
|
|
2630
|
-
max-width: ${null!=e?
|
|
2635
|
+
max-width: ${null!=e?oc(e):"100%"};
|
|
2631
2636
|
display: flex;
|
|
2632
2637
|
align-items: center;
|
|
2633
2638
|
justify-content: space-between;
|
|
@@ -2807,7 +2812,7 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2807
2812
|
`,Xg=(e,t,n)=>ye`
|
|
2808
2813
|
height: ${n?"1.75rem":"3rem"};
|
|
2809
2814
|
width: 100%;
|
|
2810
|
-
max-width: ${t?
|
|
2815
|
+
max-width: ${t?oc(t):"100%"};
|
|
2811
2816
|
background-color: ${e?Re("neutral",800):"transparent"};
|
|
2812
2817
|
display: flex;
|
|
2813
2818
|
align-items: ${n?"start":"center"};
|
|
@@ -3445,7 +3450,7 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3445
3450
|
}
|
|
3446
3451
|
}
|
|
3447
3452
|
}
|
|
3448
|
-
`,Om=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Tm=e=>1===e?"none":2===e?"left":"right",Pm=({variant:e="panel",defaultValue:t,tabs:n,onTabClick:o,activationMode:i="manual"})=>{const[a,l]=ae(Om(n,t)||0);return be("div",{css:$m(e),children:be(A.Root,{width:"full",defaultValue:t||n?.[0]?.value,onValueChange:({value:e})=>{return l(Om(n,t=e)),void(o&&o(t));var t},activationMode:i,children:be(A.List,{alignItems:"center",border:"none",children:n.map(((t,n)=>ve(me,{children:["view"===e&&1===n&&"left"===Tm(a)?be("div",{css:Em}):null,be(A.Trigger,{css:[km,"view"===e&&Lm,"panel"===e&&Sm,"transparent"===e&&Rm],"aria-label":t["aria-label"]||t.label,...t,children:ve(r,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[t.icon,t.label]})},t.label),"view"===e&&1===n&&"right"===Tm(a)?be("div",{css:Em}):null]},t.label)))})})})},Mm=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return K(Q,{children:r.map((e=>n.test(e)?K("strong",{children:e},e):K("span",{children:e},e)))})},_m=({items:e,query:t,onSelect:n,highlightedIndex:o})=>{const i=le(null);return se((()=>{if(!i.current)return;const e=i.current.children[o];e&&e.scrollIntoView({block:"nearest"})}),[o]),K(r,{padding:"0.5rem",children:e.map(((e,a)=>K(r,{ref:i,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:a===o?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>n(e.id||e.label),children:K(Mm,{text:e.label,query:t})},e.id)))})},Dm=({placeholder:e,disabled:t,size:n="default",options:i=[],resultsMaxHeight:a=50,isLoading:s=!1,displayResults:c="text",onSelect:d,onQueryChange:u,onClear:p,renderResults:h,labels:f})=>{const g=Ve("Search",f),[m,v]=ae(""),{open:b,onOpen:x,onClose:y}=B(),[w,C]=ae(i),[$,k]=ae(-1),[S,E]=ae(!1),L=le(null),R=`search-results-${ce()}`,O=e=>{const t=i.find((t=>t.id===e||t.label===e));t&&(d?.(t),v(""),y())};se((()=>{if(u?.(m),!m)return void C(i);const e=i.filter((e=>e.id?.toLowerCase().includes(m.toLowerCase())||e.label.toLowerCase().includes(m.toLowerCase())||e.caption?.toLowerCase().includes(m.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>O(e.id||e.label)})));C(e),x()}),[m]),se((()=>{function e(e){b&&L.current&&!L.current.contains(e.target)&&y()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[b]);const T=m.length?be(Et,{style:{marginTop:"0.5rem"},onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!m.length&&w.length>0&&b;let M=Re("neutral",500);t?M=Re("neutral",500):S&&(M=Re("primary",700));const _="small"===n?"1rem":"1.25rem",D=
|
|
3453
|
+
`,Om=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Tm=e=>1===e?"none":2===e?"left":"right",Pm=({variant:e="panel",defaultValue:t,tabs:n,onTabClick:o,activationMode:i="manual"})=>{const[a,l]=ae(Om(n,t)||0);return be("div",{css:$m(e),children:be(A.Root,{width:"full",defaultValue:t||n?.[0]?.value,onValueChange:({value:e})=>{return l(Om(n,t=e)),void(o&&o(t));var t},activationMode:i,children:be(A.List,{alignItems:"center",border:"none",children:n.map(((t,n)=>ve(me,{children:["view"===e&&1===n&&"left"===Tm(a)?be("div",{css:Em}):null,be(A.Trigger,{css:[km,"view"===e&&Lm,"panel"===e&&Sm,"transparent"===e&&Rm],"aria-label":t["aria-label"]||t.label,...t,children:ve(r,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[t.icon,t.label]})},t.label),"view"===e&&1===n&&"right"===Tm(a)?be("div",{css:Em}):null]},t.label)))})})})},Mm=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return K(Q,{children:r.map((e=>n.test(e)?K("strong",{children:e},e):K("span",{children:e},e)))})},_m=({items:e,query:t,onSelect:n,highlightedIndex:o})=>{const i=le(null);return se((()=>{if(!i.current)return;const e=i.current.children[o];e&&e.scrollIntoView({block:"nearest"})}),[o]),K(r,{padding:"0.5rem",children:e.map(((e,a)=>K(r,{ref:i,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:a===o?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>n(e.id||e.label),children:K(Mm,{text:e.label,query:t})},e.id)))})},Dm=({placeholder:e,disabled:t,size:n="default",options:i=[],resultsMaxHeight:a=50,isLoading:s=!1,displayResults:c="text",onSelect:d,onQueryChange:u,onClear:p,renderResults:h,labels:f})=>{const g=Ve("Search",f),[m,v]=ae(""),{open:b,onOpen:x,onClose:y}=B(),[w,C]=ae(i),[$,k]=ae(-1),[S,E]=ae(!1),L=le(null),R=`search-results-${ce()}`,O=e=>{const t=i.find((t=>t.id===e||t.label===e));t&&(d?.(t),v(""),y())};se((()=>{if(u?.(m),!m)return void C(i);const e=i.filter((e=>e.id?.toLowerCase().includes(m.toLowerCase())||e.label.toLowerCase().includes(m.toLowerCase())||e.caption?.toLowerCase().includes(m.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>O(e.id||e.label)})));C(e),x()}),[m]),se((()=>{function e(e){b&&L.current&&!L.current.contains(e.target)&&y()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[b]);const T=m.length?be(Et,{style:{marginTop:"0.5rem"},onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!m.length&&w.length>0&&b;let M=Re("neutral",500);t?M=Re("neutral",500):S&&(M=Re("primary",700));const _="small"===n?"1rem":"1.25rem",D=oc(a);return ve("div",{ref:L,style:{position:"relative",width:"100%"},children:[be(F,{startElement:be(wt,{width:_,height:_,fill:M,style:{marginTop:"0.5rem"}}),endElement:T,children:be(er,{autoComplete:"off",placeholder:e||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:m,label:"",style:{paddingLeft:"2.5rem",borderColor:Re("neutral",500)},type:"search","aria-label":e||g.filterAriaLabel,"aria-expanded":P,"aria-controls":R,role:"combobox","aria-autocomplete":"list",disabled:t,size:n,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),k((e=>Math.min(e+1,w.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),k((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=w[$];O(e.id||e.label)}"Escape"===e.key&&y()}}})}),(P||s&&!!m.length)&&"custom"===c&&h&&!s&&h({items:w,highlightedIndex:$,query:m,onSelect:O}),(P||s&&!!m.length)&&be(l,{container:L,children:ve(r,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:D,children:[s&&be(r,{padding:"1rem",children:be(o,{})}),"text"===c&&!s&&be(_m,{highlightedIndex:$,items:w,query:m,onSelect:O}),"list"===c&&!s&&be(Il,{items:w,highlightedIndex:$})]})})]})},Nm={small:"16px",medium:"24px",large:"40px",default:"16px"};function Im(e,t,n,r){const o=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&Nm[e]?Nm[e]:Nm.default}(e,t),i=n?Re("neutral",200):Re("primary",300),a=r??i,l=r&&n?"opacity: 0.7;":"",s=Re("neutral",n?400:800);return ye`
|
|
3449
3454
|
height: ${o};
|
|
3450
3455
|
width: ${o};
|
|
3451
3456
|
border-radius: 50%;
|
|
@@ -3766,4 +3771,4 @@ function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3766
3771
|
padding: 6px;
|
|
3767
3772
|
`,wv=ye`
|
|
3768
3773
|
padding: 6px;
|
|
3769
|
-
`,Cv={pauseOnPageIdle:!0,offsets:"24px"},$v={"top-start":G({placement:"top-start",...Cv}),"top-end":G({placement:"top-end",...Cv}),"bottom-start":G({placement:"bottom-start",...Cv}),"bottom-end":G({placement:"bottom-end",...Cv})},kv=e=>{$v[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},Sv=({labels:e})=>{const t=Ve("Toast",e);return Object.keys($v).map((e=>be(l,{children:be(U,{toaster:$v[e],insetInline:{mdDown:"4"},children:n=>ve(X.Root,{css:vv,width:{md:"sm"},children:[ve(Y,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===n.type?n.meta?.icon?n.meta.icon:be(Fe,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?be(o,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:be(Ke,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:be(Je,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:be(Qe,{color:"var(--chakra-colors-error-500)"}):null,ve(Y,{gap:"1",flex:"1",maxWidth:"100%",children:[be(X.Title,{css:bv,"aria-label":`${n.title}`,children:n.title}),n.description?be(X.Title,{css:xv,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?ve(Y,{flexDirection:"row",children:[n.action?be(Ae,{css:yv,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),$v[e].dismiss()}}):null,n.meta?.closable?be(Ae,{css:wv,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:be(We,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>$v[e].dismiss()}):null]}):null]})})},e)))};export{av as AlertBanner,ls as AnalysisWidget,jm as Avatar,Gm as Badge,po as BaseMap,
|
|
3774
|
+
`,Cv={pauseOnPageIdle:!0,offsets:"24px"},$v={"top-start":G({placement:"top-start",...Cv}),"top-end":G({placement:"top-end",...Cv}),"bottom-start":G({placement:"bottom-start",...Cv}),"bottom-end":G({placement:"bottom-end",...Cv})},kv=e=>{$v[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},Sv=({labels:e})=>{const t=Ve("Toast",e);return Object.keys($v).map((e=>be(l,{children:be(U,{toaster:$v[e],insetInline:{mdDown:"4"},children:n=>ve(X.Root,{css:vv,width:{md:"sm"},children:[ve(Y,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===n.type?n.meta?.icon?n.meta.icon:be(Fe,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?be(o,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:be(Ke,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:be(Je,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:be(Qe,{color:"var(--chakra-colors-error-500)"}):null,ve(Y,{gap:"1",flex:"1",maxWidth:"100%",children:[be(X.Title,{css:bv,"aria-label":`${n.title}`,children:n.title}),n.description?be(X.Title,{css:xv,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?ve(Y,{flexDirection:"row",children:[n.action?be(Ae,{css:yv,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),$v[e].dismiss()}}):null,n.meta?.closable?be(Ae,{css:wv,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:be(We,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>$v[e].dismiss()}):null]}):null]})})},e)))};export{av as AlertBanner,ls as AnalysisWidget,jm as Avatar,Gm as Badge,po as BaseMap,Dg as Breadcrumb,Ae as Button,tn as Checkbox,Hn as CheckboxList,cn as CheckboxOptionCard,Et as CloseButton,go as ClusterPoint,no as Combobox,Te as DesignSystemLocaleProvider,ns as ExtendableCard,zg as Footer,Qt as FormContainer,St as IconButton,ov as InlineMessage,Lr as InputWithUnits,Ll as ItemCount,Fa as LayerGroup,qa as LayerGroupContainer,Ba as LayerItem,Xa as LayerParameters,ll as LegendItem,Il as List,Dt as MapControlsToolbar,fo as MapMarker,vo as MapMarkers,Ma as MapPopUp,Bt as Menu,Wg as MobileTabBar,cc as Modal,Ut as MultiActionButton,mm as Navbar,Cm as NavigationRail,mn as OptionCard,Hl as Pagination,mc as Panel,Nr as Password,cv as ProgressBar,ml as QualitativeAttribute,yn as Radio,wn as RadioGroup,Fr as RadioList,Ct as SSOButtons,$l as ScaleBar,Dm as Search,Er as Select,Tg as Sheet,mo as SimpleMapPin,Tn as Slider,Gr as SliderInput,mv as StepProgressIndicator,Mn as Switch,Pm as TabBar,Kl as Table,Ql as TableCell,Jl as TableRow,$r as Tag,er as TextInput,to as Textarea,Sv as Toast,_t as Toolbar,Pt as Tooltip,Le as designSystemStyles,Ee as designSystemStylesForTailwind,Re as getThemedColor,kv as showToast};
|