@seedtactics/insight-client 16.8.4-beta.10 → 16.8.4-beta.11
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/assets/index-CQhVwNX7.js +388 -0
- package/dist/cell-status/material-details.d.ts +15 -5
- package/dist/cell-status/material-details.js +58 -37
- package/dist/components/operations/AllMaterial.js +4 -3
- package/dist/components/station-monitor/BulkRawMaterial.js +4 -4
- package/dist/components/station-monitor/CancelLoadButton.d.ts +4 -0
- package/dist/components/station-monitor/CancelLoadButton.js +59 -0
- package/dist/components/station-monitor/Closeout.js +2 -1
- package/dist/components/station-monitor/Inspection.js +2 -1
- package/dist/components/station-monitor/InvalidateCycle.d.ts +4 -1
- package/dist/components/station-monitor/InvalidateCycle.js +61 -10
- package/dist/components/station-monitor/LoadStation.js +23 -11
- package/dist/components/station-monitor/QuarantineButton.js +80 -60
- package/dist/components/station-monitor/Queues.js +2 -1
- package/dist/components/station-monitor/QueuesAddMaterial.js +59 -48
- package/dist/components/station-monitor/SystemOverview.js +2 -1
- package/dist/components/station-monitor/Whiteboard.js +2 -2
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +18 -4
- package/dist/network/api.js +69 -2
- package/dist/network/backend-mock.js +3 -0
- package/dist/network/backend.d.ts +1 -0
- package/package.json +1 -1
- package/dist/assets/index-BB3Eqktr.js +0 -388
|
@@ -1,388 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function u(e){return`init`in e}function d(e){return typeof e.write==`function`}function f(e){return!!e.onMount}function p(e){return`v`in e||`e`in e}function m(e){if(`e`in e)throw e.e;return e.v}function h(e){return typeof e?.then==`function`}function g(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function _(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function v(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function y(e){return!!e.INTERNAL_onInit}var b=(e,t,n,...r)=>n.read(...r),x=(e,t,n,...r)=>n.write(...r),S=(e,t,n)=>n.INTERNAL_onInit(t),C=(e,t,n,r)=>n.onMount?.call(n,r),w=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),y(n)&&s(e,t,n)}return a},T=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},E=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of v(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},D=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],f=e[11],v=e[12],y=e[13],b=e[14],x=e[16],S=e[17],C=e[20],w=e[26],T=e[28],E=f(e,t,n),D=T[0];if(p(E)){if(a.has(n)&&o.get(n)!==E.n||E.m===D)return E.m=D,E;let r=!1;for(let[n,i]of E.d)if(b(e,t,n).n!==i){r=!0;break}if(!r)return E.m=D,E}let O=!0,ee=new Set(E.d.keys()),te=()=>{for(let e of ee)E.d.delete(e)},k=()=>{if(a.has(n)){let r=!s.size;S(e,t,n),r&&(y(e,t),v(e,t))}},A=r=>{var i;if(r===n){let n=f(e,t,r);if(!p(n))if(u(r))C(e,t,r,r.init);else throw Error(`no atom init`);return m(n)}let o=b(e,t,r);try{return m(o)}finally{ee.delete(r),E.d.set(r,o.n),h(E.v)&&_(n,E.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),O||k()}},j,M,ne={get signal(){return j||=new AbortController,j.signal},get setSelf(){return!M&&d(n)&&(M=(...r)=>{if(!O)try{return x(e,t,n,r)}finally{y(e,t),v(e,t)}}),M}},re=E.n,ie=o.get(n)===re;try{let i=l(e,t,n,A,ne);if(C(e,t,n,i),h(i)){w(e,t,i,()=>j?.abort());let n=()=>{te(),k()};i.then(n,n)}else te();return(r=c.r)==null||r.call(c,n),E.m=D,E}catch(e){if(g(e))throw e;return delete E.v,E.e=e,++E.n,E.m=D,E}finally{O=!1,E.n!==re&&ie&&(o.set(n,E.n),s.add(n),(i=c.c)==null||i.call(c,n))}},O=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of v(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},ee=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],d=e[14],f=e[15],p=e[16],h=e[17],g=e[20],_=e[28],v=!0,y=n=>m(d(e,t,n)),b=(r,...o)=>{var d;let m=s(e,t,r);try{if(r===n){if(!u(r))throw Error(`atom not writable`);let n=m.n,s=o[0];g(e,t,r,s),h(e,t,r),n!==m.n&&(++_[0],i.add(r),f(e,t,r),(d=a.c)==null||d.call(a,r));return}else return p(e,t,r,o)}finally{v||(l(e,t),c(e,t))}};try{return o(e,t,n,y,b,...r)}finally{v=!1}},te=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},k=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],p=e[14],m=e[16],h=e[18],g=c(e,t,n),_=i.get(n);if(!_){p(e,t,n);for(let r of g.d.keys())h(e,t,r).t.add(n);_={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(n,_),d(n)&&f(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return m(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(_.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return _},A=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},j=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(h(r))for(let a of o.d.keys())_(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,h(c)&&a(e,t,c))},M=(e,t,n)=>{let r=e[14];return m(r(e,t,n))},ne=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},re=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},ie=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},ae=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},N=new WeakMap;function oe(e){let t=N.get(e),n=t[24];return n?n(t,e):t}function se(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},b,x,S,C,w,T,E,D,O,ee,te,k,A,j,M,ne,re,void 0,new WeakMap,ie,ae,[0]].map((t,n)=>e[n]||t);N.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ce=0;function P(e,t){let n=`atom${++ce}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=le,r.write=ue),t&&(r.write=t),r}function le(e){return e(this)}function ue(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var F;function I(){return F?F():se()}var de;function fe(){return de||=I(),de}var pe=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var re=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ie={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,re)}catch(e){re(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),me=o(((e,t)=>{t.exports=pe()})),L=l(me(),1),he=(0,L.createContext)(void 0);function ge(e){let t=(0,L.useContext)(he);return e?.store||t||fe()}function _e({children:e,store:t}){let n=(0,L.useRef)(null);return t?(0,L.createElement)(he.Provider,{value:t},e):(n.current===null&&(n.current=I()),(0,L.createElement)(he.Provider,{value:n.current},e))}var ve=e=>typeof e?.then==`function`,ye=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},be=L.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(ye(e),e)}),xe=new WeakMap,Se=(e,t,n)=>{let r=oe(e),i=r[26],a=xe.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();ve(t)?(xe.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),xe.set(t,a)),a};function R(e,t){let{delay:n,unstable_promiseStatus:r=!L.use}=t||{},i=ge(t),[[a,o,s],c]=(0,L.useReducer)(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),(0,L.useEffect)(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);ve(t)&&ye(Se(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
|
|
2
|
-
|
|
3
|
-
Migration guide:
|
|
4
|
-
|
|
5
|
-
Create a custom hook like the following.
|
|
6
|
-
|
|
7
|
-
function useAtomValueWithDelay<Value>(
|
|
8
|
-
atom: Atom<Value>,
|
|
9
|
-
options: { delay: number },
|
|
10
|
-
): Value {
|
|
11
|
-
const { delay } = options
|
|
12
|
-
const store = useStore(options)
|
|
13
|
-
const [value, setValue] = useState(() => store.get(atom))
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
const unsub = store.sub(atom, () => {
|
|
16
|
-
setTimeout(() => setValue(store.get(atom)), delay)
|
|
17
|
-
})
|
|
18
|
-
return unsub
|
|
19
|
-
}, [store, atom, delay])
|
|
20
|
-
return value
|
|
21
|
-
}
|
|
22
|
-
`),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),(0,L.useDebugValue)(l),ve(l)){let t=Se(i,l,()=>i.get(e));return r&&ye(t),be(t)}return l}function z(e,t){let n=ge(t);return(0,L.useCallback)((...t)=>n.set(e,...t),[n,e])}function B(e,t){return[R(e,t),z(e,t)]}var Ce=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}fMSInformation(e){let t=this.baseUrl+`/api/v1/fms/fms-information`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processFMSInformation(e))}processFMSInformation(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=De.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}findInstructions(e,t,n,r,i,a,o){let s=this.baseUrl+`/api/v1/fms/find-instructions/{part}?`;if(e==null)throw new globalThis.Error(`The parameter 'part' must be defined.`);if(s=s.replace(`{part}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'type' must be defined and cannot be null.`);if(s+=`type=`+encodeURIComponent(``+t)+`&`,n!=null&&(s+=`process=`+encodeURIComponent(``+n)+`&`),r!=null&&(s+=`materialID=`+encodeURIComponent(``+r)+`&`),i!=null&&(s+=`operatorName=`+encodeURIComponent(``+i)+`&`),a===null)throw new globalThis.Error(`The parameter 'pallet' cannot be null.`);a!==void 0&&(s+=`pallet=`+encodeURIComponent(``+a)+`&`),s=s.replace(/[?&]$/,``);let c={method:`GET`,signal:o,headers:{}};return this.http.fetch(s,c).then(e=>this.processFindInstructions(e))}processFindInstructions(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===302?e.text().then(e=>zt(`A server side error occurred.`,t,e,n)):t===404?e.text().then(e=>{let r=null,i=e===``?null:JSON.parse(e,this.jsonParseReviver);return r=yt.fromJS(i),zt(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}printLabel(e,t,n){let r=this.baseUrl+`/api/v1/fms/print-label/{materialId}?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);if(r=r.replace(`{materialId}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(r+=`process=`+encodeURIComponent(``+t)+`&`),r=r.replace(/[?&]$/,``);let i={method:`POST`,signal:n,headers:{}};return this.http.fetch(r,i).then(e=>this.processPrintLabel(e))}processPrintLabel(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t===400?e.text().then(e=>{let r=null,i=e===``?null:JSON.parse(e,this.jsonParseReviver);return r=yt.fromJS(i),zt(`A server side error occurred.`,t,e,n,r)}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}parseBarcode(e,t,n){let r=this.baseUrl+`/api/v1/fms/parse-barcode?`;if(e==null)throw new globalThis.Error(`The parameter 'barcode' must be defined and cannot be null.`);r+=`barcode=`+encodeURIComponent(``+e)+`&`,t!=null&&t&&t.forEach(e=>{r+=`queuesToAddTo=`+encodeURIComponent(``+e)+`&`}),r=r.replace(/[?&]$/,``);let i={method:`POST`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processParseBarcode(e))}processParseBarcode(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n?bt.fromJS(n):null,t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}enableVerboseLoggingForFiveMinutes(e){let t=this.baseUrl+`/api/v1/fms/enable-verbose-logging-for-five-minutes`;t=t.replace(/[?&]$/,``);let n={method:`POST`,signal:e,headers:{}};return this.http.fetch(t,n).then(e=>this.processEnableVerboseLoggingForFiveMinutes(e))}processEnableVerboseLoggingForFiveMinutes(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},we=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}history(e,t,n){let r=this.baseUrl+`/api/v1/jobs/history?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processHistory(e))}processHistory(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=wt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}filteredHistory(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/history?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(i+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);i+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processFilteredHistory(e))}processFilteredHistory(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=wt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recent(e,t,n){let r=this.baseUrl+`/api/v1/jobs/recent?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processRecent(e))}processRecent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Tt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}latestSchedule(e){let t=this.baseUrl+`/api/v1/jobs/latest-schedule`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processLatestSchedule(e))}processLatestSchedule(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Et.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}currentStatus(e){let t=this.baseUrl+`/api/v1/jobs/status`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processCurrentStatus(e))}processCurrentStatus(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Xe.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}unscheduledRebookings(e){let t=this.baseUrl+`/api/v1/jobs/unscheduled-rebookings`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processUnscheduledRebookings(e))}processUnscheduledRebookings(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ot.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addFromSim(e,t,n){let r=this.baseUrl+`/api/v1/jobs/add-from-sim?`;if(e===void 0)throw new globalThis.Error(`The parameter 'expectedPreviousScheduleId' must be defined.`);e!==null&&(r+=`expectedPreviousScheduleId=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processAddFromSim(e))}processAddFromSim(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}add(e,t,n){let r=this.baseUrl+`/api/v1/jobs/add?`;if(e===void 0)throw new globalThis.Error(`The parameter 'expectedPreviousScheduleId' must be defined.`);e!==null&&(r+=`expectedPreviousScheduleId=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`POST`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processAdd(e))}processAdd(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addUnallocatedCastingToQueue(e,t,n,r,i,a,o){let s=this.baseUrl+`/api/v1/jobs/casting/{castingName}?`;if(e==null)throw new globalThis.Error(`The parameter 'castingName' must be defined.`);if(s=s.replace(`{castingName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'queue' must be defined and cannot be null.`);if(s+=`queue=`+encodeURIComponent(``+t)+`&`,n===null)throw new globalThis.Error(`The parameter 'qty' cannot be null.`);n!==void 0&&(s+=`qty=`+encodeURIComponent(``+n)+`&`),r!=null&&(s+=`operName=`+encodeURIComponent(``+r)+`&`),i!=null&&(s+=`workorder=`+encodeURIComponent(``+i)+`&`),s=s.replace(/[?&]$/,``);let c={body:JSON.stringify(a),method:`POST`,signal:o,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(s,c).then(e=>this.processAddUnallocatedCastingToQueue(e))}processAddUnallocatedCastingToQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(rt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getJobPlan(e,t){let n=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/plan`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);n=n.replace(`{jobUnique}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetJobPlan(e))}processGetJobPlan(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ze.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}addUnprocessedMaterialToQueue(e,t,n,r,i,a,o,s){let c=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/unprocessed-material?`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);if(c=c.replace(`{jobUnique}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'lastCompletedProcess' must be defined and cannot be null.`);if(c+=`lastCompletedProcess=`+encodeURIComponent(``+t)+`&`,n==null)throw new globalThis.Error(`The parameter 'queue' must be defined and cannot be null.`);if(c+=`queue=`+encodeURIComponent(``+n)+`&`,r==null)throw new globalThis.Error(`The parameter 'pos' must be defined and cannot be null.`);c+=`pos=`+encodeURIComponent(``+r)+`&`,i!=null&&(c+=`operName=`+encodeURIComponent(``+i)+`&`),a!=null&&(c+=`workorder=`+encodeURIComponent(``+a)+`&`),c=c.replace(/[?&]$/,``);let l={body:JSON.stringify(o),method:`POST`,signal:s,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(c,l).then(e=>this.processAddUnprocessedMaterialToQueue(e))}processAddUnprocessedMaterialToQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=rt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setJobComment(e,t,n){let r=this.baseUrl+`/api/v1/jobs/job/{jobUnique}/comment`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);r=r.replace(`{jobUnique}`,encodeURIComponent(``+e)),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`PUT`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processSetJobComment(e))}processSetJobComment(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setMaterialInQueue(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/queue?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetMaterialInQueue(e))}processSetMaterialInQueue(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}removeMaterialFromAllQueues(e,t,n){let r=this.baseUrl+`/api/v1/jobs/material/{materialId}/queue?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);r=r.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(r+=`operName=`+encodeURIComponent(``+t)+`&`),r=r.replace(/[?&]$/,``);let i={method:`DELETE`,signal:n,headers:{}};return this.http.fetch(r,i).then(e=>this.processRemoveMaterialFromAllQueues(e))}processRemoveMaterialFromAllQueues(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}signalMaterialForQuarantine(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/signal-quarantine?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSignalMaterialForQuarantine(e))}processSignalMaterialForQuarantine(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}invalidatePalletCycle(e,t,n,r,i,a){let o=this.baseUrl+`/api/v1/jobs/material/{materialId}/invalidate-process?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);o=o.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(o+=`operName=`+encodeURIComponent(``+t)+`&`),n!=null&&(o+=`changeCastingTo=`+encodeURIComponent(``+n)+`&`),r!=null&&(o+=`changeJobUniqueTo=`+encodeURIComponent(``+r)+`&`),o=o.replace(/[?&]$/,``);let s={body:JSON.stringify(i),method:`PUT`,signal:a,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(o,s).then(e=>this.processInvalidatePalletCycle(e))}processInvalidatePalletCycle(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=xt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}swapMaterialOnPallet(e,t,n,r){let i=this.baseUrl+`/api/v1/jobs/material/{materialId}/swap-off-pallet?`;if(e==null)throw new globalThis.Error(`The parameter 'materialId' must be defined.`);i=i.replace(`{materialId}`,encodeURIComponent(``+e)),t!=null&&(i+=`operName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`PUT`,signal:r,headers:{"Content-Type":`application/json`}};return this.http.fetch(i,a).then(e=>this.processSwapMaterialOnPallet(e))}processSwapMaterialOnPallet(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}bulkRemoveMaterialFromQueues(e,t,n){let r=this.baseUrl+`/api/v1/jobs/material?`;e!=null&&(r+=`operName=`+encodeURIComponent(``+e)+`&`),r=r.replace(/[?&]$/,``);let i={body:JSON.stringify(t),method:`DELETE`,signal:n,headers:{"Content-Type":`application/json`}};return this.http.fetch(r,i).then(e=>this.processBulkRemoveMaterialFromQueues(e))}processBulkRemoveMaterialFromQueues(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}decrementQuantities(e,t,n){let r=this.baseUrl+`/api/v1/jobs/planned-cycles?`;e!=null&&(r+=`loadDecrementsStrictlyAfterDecrementId=`+encodeURIComponent(``+e)+`&`),t!=null&&(r+=`loadDecrementsAfterTimeUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`),r=r.replace(/[?&]$/,``);let i={method:`DELETE`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processDecrementQuantities(e))}processDecrementQuantities(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(At.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Te=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}get(e,t,n){let r=this.baseUrl+`/api/v1/log/events/all?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGet(e))}processGet(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getEventCSV(e,t,n){let r=this.baseUrl+`/api/v1/log/events.csv?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/octet-stream`}};return this.http.fetch(r,i).then(e=>this.processGetEventCSV(e))}processGetEventCSV(e){let t=e.status,n={};if(e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200||t===206){let r=e.headers?e.headers.get(`content-disposition`):void 0,i=r?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(r):void 0,a=i&&i.length>1?i[3]||i[2]:void 0;return a?a=decodeURIComponent(a):(i=r?/filename="?([^"]*?)"?(;|$)/g.exec(r):void 0,a=i&&i.length>1?i[1]:void 0),e.blob().then(e=>({fileName:a,data:e,status:t,headers:n}))}else if(t!==200&&t!==204)return e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n));return Promise.resolve(null)}getCompletedParts(e,t,n){let r=this.baseUrl+`/api/v1/log/events/all-completed-parts?`;if(e==null)throw new globalThis.Error(`The parameter 'startUTC' must be defined and cannot be null.`);if(r+=`startUTC=`+encodeURIComponent(e?``+e.toISOString():``)+`&`,t==null)throw new globalThis.Error(`The parameter 'endUTC' must be defined and cannot be null.`);r+=`endUTC=`+encodeURIComponent(t?``+t.toISOString():``)+`&`,r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGetCompletedParts(e))}processGetCompletedParts(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recent(e,t,n){let r=this.baseUrl+`/api/v1/log/events/recent?`;if(e==null)throw new globalThis.Error(`The parameter 'lastSeenCounter' must be defined and cannot be null.`);r+=`lastSeenCounter=`+encodeURIComponent(``+e)+`&`,t!=null&&(r+=`expectedEndUTCofLastSeen=`+encodeURIComponent(t?``+t.toISOString():``)+`&`),r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processRecent(e))}processRecent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForMaterial(e,t){let n=this.baseUrl+`/api/v1/log/events/for-material/{materialID}`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);n=n.replace(`{materialID}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForMaterial(e))}processLogForMaterial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForMaterials(e,t){let n=this.baseUrl+`/api/v1/log/events/for-material?`;e!=null&&e&&e.forEach(e=>{n+=`id=`+encodeURIComponent(``+e)+`&`}),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForMaterials(e))}processLogForMaterials(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForSerial(e,t){let n=this.baseUrl+`/api/v1/log/events/for-serial/{serial}`;if(e==null)throw new globalThis.Error(`The parameter 'serial' must be defined.`);n=n.replace(`{serial}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForSerial(e))}processLogForSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}logForWorkorder(e,t){let n=this.baseUrl+`/api/v1/log/events/for-workorder/{workorder}`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);n=n.replace(`{workorder}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processLogForWorkorder(e))}processLogForWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ae.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialDetails(e,t){let n=this.baseUrl+`/api/v1/log/material-details/{materialID}`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);n=n.replace(`{materialID}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialDetails(e))}processMaterialDetails(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=xt.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialDetailsForJob(e,t){let n=this.baseUrl+`/api/v1/log/material-for-job/{jobUnique}`;if(e==null)throw new globalThis.Error(`The parameter 'jobUnique' must be defined.`);n=n.replace(`{jobUnique}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialDetailsForJob(e))}processMaterialDetailsForJob(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(xt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}materialForSerial(e,t){let n=this.baseUrl+`/api/v1/log/material-for-serial/{serial}`;if(e==null)throw new globalThis.Error(`The parameter 'serial' must be defined.`);n=n.replace(`{serial}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processMaterialForSerial(e))}processMaterialForSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(xt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setSerial(e,t,n,r){let i=this.baseUrl+`/api/v1/log/material-details/{materialID}/serial?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(i=i.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(i+=`process=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetSerial(e))}processSetSerial(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setWorkorder(e,t,n,r){let i=this.baseUrl+`/api/v1/log/material-details/{materialID}/workorder?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(i=i.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(i+=`process=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processSetWorkorder(e))}processSetWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}setInspectionDecision(e,t,n,r,i){let a=this.baseUrl+`/api/v1/log/material-details/{materialID}/inspections/{inspType}?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(a=a.replace(`{materialID}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'inspType' must be defined.`);if(a=a.replace(`{inspType}`,encodeURIComponent(``+t)),n===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);n!==void 0&&(a+=`process=`+encodeURIComponent(``+n)+`&`),a=a.replace(/[?&]$/,``);let o={body:JSON.stringify(r),method:`POST`,signal:i,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(a,o).then(e=>this.processSetInspectionDecision(e))}processSetInspectionDecision(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordOperatorNotes(e,t,n,r,i){let a=this.baseUrl+`/api/v1/log/material-details/{materialID}/notes?`;if(e==null)throw new globalThis.Error(`The parameter 'materialID' must be defined.`);if(a=a.replace(`{materialID}`,encodeURIComponent(``+e)),t===null)throw new globalThis.Error(`The parameter 'process' cannot be null.`);t!==void 0&&(a+=`process=`+encodeURIComponent(``+t)+`&`),n!=null&&(a+=`operatorName=`+encodeURIComponent(``+n)+`&`),a=a.replace(/[?&]$/,``);let o={body:JSON.stringify(r),method:`POST`,signal:i,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(a,o).then(e=>this.processRecordOperatorNotes(e))}processRecordOperatorNotes(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}requestRebooking(e,t,n,r,i,a){let o=this.baseUrl+`/api/v1/log/events/rebooking?`;if(e==null)throw new globalThis.Error(`The parameter 'partName' must be defined and cannot be null.`);if(o+=`partName=`+encodeURIComponent(``+e)+`&`,t===null)throw new globalThis.Error(`The parameter 'qty' cannot be null.`);t!==void 0&&(o+=`qty=`+encodeURIComponent(``+t)+`&`),n!=null&&(o+=`workorder=`+encodeURIComponent(``+n)+`&`),r!=null&&(o+=`priority=`+encodeURIComponent(``+r)+`&`),o=o.replace(/[?&]$/,``);let s={body:JSON.stringify(i),method:`POST`,signal:a,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(o,s).then(e=>this.processRequestRebooking(e))}processRequestRebooking(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}cancelRebooking(e,t){let n=this.baseUrl+`/api/v1/log/events/cancel-rebooking/{bookingId}`;if(e==null)throw new globalThis.Error(`The parameter 'bookingId' must be defined.`);n=n.replace(`{bookingId}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`POST`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processCancelRebooking(e))}processCancelRebooking(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordInspectionCompleted(e,t){let n=this.baseUrl+`/api/v1/log/events/inspection-result`;n=n.replace(/[?&]$/,``);let r={body:JSON.stringify(e),method:`POST`,signal:t,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processRecordInspectionCompleted(e))}processRecordInspectionCompleted(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordCloseoutCompleted(e,t){let n=this.baseUrl+`/api/v1/log/events/closeout`;n=n.replace(/[?&]$/,``);let r={body:JSON.stringify(e),method:`POST`,signal:t,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processRecordCloseoutCompleted(e))}processRecordCloseoutCompleted(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}recordWorkorderComment(e,t,n,r){let i=this.baseUrl+`/api/v1/log/workorder/{workorder}/comment?`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);i=i.replace(`{workorder}`,encodeURIComponent(``+e)),t!=null&&(i+=`operatorName=`+encodeURIComponent(``+t)+`&`),i=i.replace(/[?&]$/,``);let a={body:JSON.stringify(n),method:`POST`,signal:r,headers:{"Content-Type":`application/json`,Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processRecordWorkorderComment(e))}processRecordWorkorderComment(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=Ae.fromJS(n),t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getActiveWorkorder(e,t){let n=this.baseUrl+`/api/v1/log/workorder/{workorder}`;if(e==null)throw new globalThis.Error(`The parameter 'workorder' must be defined.`);n=n.replace(`{workorder}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetActiveWorkorder(e))}processGetActiveWorkorder(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(ut.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},Ee=class{constructor(e,t){this.jsonParseReviver=void 0,this.http=t||window,this.baseUrl=e??``}getToolsInMachines(e){let t=this.baseUrl+`/api/v1/machines/tools`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processGetToolsInMachines(e))}processGetToolsInMachines(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Pt.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramsInCellController(e){let t=this.baseUrl+`/api/v1/machines/programs-in-cell-controller`;t=t.replace(/[?&]$/,``);let n={method:`GET`,signal:e,headers:{Accept:`application/json`}};return this.http.fetch(t,n).then(e=>this.processGetProgramsInCellController(e))}processGetProgramsInCellController(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(Ft.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramRevisionsInDescendingOrderOfRevision(e,t,n,r){let i=this.baseUrl+`/api/v1/machines/program/{programName}/revisions?`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);if(i=i.replace(`{programName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'count' must be defined and cannot be null.`);i+=`count=`+encodeURIComponent(``+t)+`&`,n!=null&&(i+=`revisionToStart=`+encodeURIComponent(``+n)+`&`),i=i.replace(/[?&]$/,``);let a={method:`GET`,signal:r,headers:{Accept:`application/json`}};return this.http.fetch(i,a).then(e=>this.processGetProgramRevisionsInDescendingOrderOfRevision(e))}processGetProgramRevisionsInDescendingOrderOfRevision(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);if(Array.isArray(n)){t=[];for(let e of n)t.push(It.fromJS(e))}else t=null;return t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getProgramRevisionContent(e,t,n){let r=this.baseUrl+`/api/v1/machines/program/{programName}/revision/{revision}/content`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);if(r=r.replace(`{programName}`,encodeURIComponent(``+e)),t==null)throw new globalThis.Error(`The parameter 'revision' must be defined.`);r=r.replace(`{revision}`,encodeURIComponent(``+t)),r=r.replace(/[?&]$/,``);let i={method:`GET`,signal:n,headers:{Accept:`application/json`}};return this.http.fetch(r,i).then(e=>this.processGetProgramRevisionContent(e))}processGetProgramRevisionContent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n===void 0?null:n,t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}getLatestProgramRevisionContent(e,t){let n=this.baseUrl+`/api/v1/machines/program/{programName}/latest-revision/content`;if(e==null)throw new globalThis.Error(`The parameter 'programName' must be defined.`);n=n.replace(`{programName}`,encodeURIComponent(``+e)),n=n.replace(/[?&]$/,``);let r={method:`GET`,signal:t,headers:{Accept:`application/json`}};return this.http.fetch(n,r).then(e=>this.processGetLatestProgramRevisionContent(e))}processGetLatestProgramRevisionContent(e){let t=e.status,n={};return e.headers&&e.headers.forEach&&e.headers.forEach((e,t)=>n[t]=e),t===200?e.text().then(e=>{let t=null,n=e===``?null:JSON.parse(e,this.jsonParseReviver);return t=n===void 0?null:n,t}):t!==200&&t!==204?e.text().then(e=>zt(`An unexpected server error occurred.`,t,e,n)):Promise.resolve(null)}},De=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.name=e.Name,this.version=e.Version,this.licenseExpires=e.LicenseExpires?new Date(e.LicenseExpires.toString()):void 0,Array.isArray(e.AdditionalLogServers)){this.additionalLogServers=[];for(let t of e.AdditionalLogServers)this.additionalLogServers.push(t)}if(this.openIDConnectAuthority=e.OpenIDConnectAuthority,this.localhostOpenIDConnectAuthority=e.LocalhostOpenIDConnectAuthority,this.openIDConnectClientId=e.OpenIDConnectClientId,this.usingLabelPrinterForSerials=e.UsingLabelPrinterForSerials,this.useClientPrinterForLabels=e.UseClientPrinterForLabels,this.allowQuarantineToCancelLoad=e.AllowQuarantineToCancelLoad,this.quarantineQueue=e.QuarantineQueue,this.customStationMonitorDialogUrl=e.CustomStationMonitorDialogUrl,this.supportsRebookings=e.SupportsRebookings,this.allowChangeWorkorderAtLoadStation=e.AllowChangeWorkorderAtLoadStation,this.allowSwapSerialAtLoadStation=e.AllowSwapSerialAtLoadStation,this.allowInvalidateMaterialAtLoadStation=e.AllowInvalidateMaterialAtLoadStation,e.LoadStationNames){this.loadStationNames={};for(let t in e.LoadStationNames)e.LoadStationNames.hasOwnProperty(t)&&(this.loadStationNames[t]=e.LoadStationNames[t])}this.requireScanAtCloseout=e.RequireScanAtCloseout,this.requireWorkorderBeforeAllowCloseoutComplete=e.RequireWorkorderBeforeAllowCloseoutComplete,this.addToQueueButton=e.AddToQueueButton,this.requireOperatorNamePromptWhenAddingMaterial=e.RequireOperatorNamePromptWhenAddingMaterial,this.allowEditJobPlanQuantityFromQueuesPage=e.AllowEditJobPlanQuantityFromQueuesPage,this.allowInvalidateMaterialOnQueuesPage=e.AllowInvalidateMaterialOnQueuesPage,this.basketName=e.BasketName}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.Name=this.name,e.Version=this.version,e.LicenseExpires=this.licenseExpires?this.licenseExpires.toISOString():void 0,Array.isArray(this.additionalLogServers)){e.AdditionalLogServers=[];for(let t of this.additionalLogServers)e.AdditionalLogServers.push(t)}if(e.OpenIDConnectAuthority=this.openIDConnectAuthority,e.LocalhostOpenIDConnectAuthority=this.localhostOpenIDConnectAuthority,e.OpenIDConnectClientId=this.openIDConnectClientId,e.UsingLabelPrinterForSerials=this.usingLabelPrinterForSerials,e.UseClientPrinterForLabels=this.useClientPrinterForLabels,e.AllowQuarantineToCancelLoad=this.allowQuarantineToCancelLoad,e.QuarantineQueue=this.quarantineQueue,e.CustomStationMonitorDialogUrl=this.customStationMonitorDialogUrl,e.SupportsRebookings=this.supportsRebookings,e.AllowChangeWorkorderAtLoadStation=this.allowChangeWorkorderAtLoadStation,e.AllowSwapSerialAtLoadStation=this.allowSwapSerialAtLoadStation,e.AllowInvalidateMaterialAtLoadStation=this.allowInvalidateMaterialAtLoadStation,this.loadStationNames){e.LoadStationNames={};for(let t in this.loadStationNames)this.loadStationNames.hasOwnProperty(t)&&(e.LoadStationNames[t]=this.loadStationNames[t])}return e.RequireScanAtCloseout=this.requireScanAtCloseout,e.RequireWorkorderBeforeAllowCloseoutComplete=this.requireWorkorderBeforeAllowCloseoutComplete,e.AddToQueueButton=this.addToQueueButton,e.RequireOperatorNamePromptWhenAddingMaterial=this.requireOperatorNamePromptWhenAddingMaterial,e.AllowEditJobPlanQuantityFromQueuesPage=this.allowEditJobPlanQuantityFromQueuesPage,e.AllowInvalidateMaterialOnQueuesPage=this.allowInvalidateMaterialOnQueuesPage,e.BasketName=this.basketName,e}},Oe=function(e){return e.DoNotShow=`DoNotShow`,e.AddBulkUnassigned=`AddBulkUnassigned`,e.LookupExistingSerial=`LookupExistingSerial`,e.ManualBarcodeScan=`ManualBarcodeScan`,e}({}),ke=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.logEntry=e.LogEntry?Ae.fromJS(e.LogEntry):void 0,this.newJobs=e.NewJobs?Fe.fromJS(e.NewJobs):void 0,this.newCurrentStatus=e.NewCurrentStatus?Xe.fromJS(e.NewCurrentStatus):void 0,this.editMaterialInLog=e.EditMaterialInLog?vt.fromJS(e.EditMaterialInLog):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.LogEntry=this.logEntry?this.logEntry.toJSON():void 0,e.NewJobs=this.newJobs?this.newJobs.toJSON():void 0,e.NewCurrentStatus=this.newCurrentStatus?this.newCurrentStatus.toJSON():void 0,e.EditMaterialInLog=this.editMaterialInLog?this.editMaterialInLog.toJSON():void 0,e}},Ae=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.material=[])}init(e){if(e){if(this.counter=e.counter,Array.isArray(e.material)){this.material=[];for(let t of e.material)this.material.push(je.fromJS(t))}if(this.type=e.type,this.startofcycle=e.startofcycle,this.endUTC=e.endUTC?new Date(e.endUTC.toString()):void 0,this.loc=e.loc,this.locnum=e.locnum,this.pal=e.pal,this.containerId=e.containerId,Array.isArray(e.containerIds)){this.containerIds=[];for(let t of e.containerIds)this.containerIds.push(t)}if(this.program=e.program,this.result=e.result,this.elapsed=e.elapsed,this.active=e.active,e.details){this.details={};for(let t in e.details)e.details.hasOwnProperty(t)&&(this.details[t]=e.details[t])}if(Array.isArray(e.tooluse)){this.tooluse=[];for(let t of e.tooluse)this.tooluse.push(Me.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.counter=this.counter,Array.isArray(this.material)){e.material=[];for(let t of this.material)e.material.push(t?t.toJSON():void 0)}if(e.type=this.type,e.startofcycle=this.startofcycle,e.endUTC=this.endUTC?this.endUTC.toISOString():void 0,e.loc=this.loc,e.locnum=this.locnum,e.pal=this.pal,e.containerId=this.containerId,Array.isArray(this.containerIds)){e.containerIds=[];for(let t of this.containerIds)e.containerIds.push(t)}if(e.program=this.program,e.result=this.result,e.elapsed=this.elapsed,e.active=this.active,this.details){e.details={};for(let t in this.details)this.details.hasOwnProperty(t)&&(e.details[t]=this.details[t])}if(Array.isArray(this.tooluse)){e.tooluse=[];for(let t of this.tooluse)e.tooluse.push(t?t.toJSON():void 0)}return e}},je=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.id=e.id,this.uniq=e.uniq,this.part=e.part,this.proc=e.proc,this.path=e.path,this.numproc=e.numproc,this.face=e.face,this.serial=e.serial,this.workorder=e.workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.id=this.id,e.uniq=this.uniq,e.part=this.part,e.proc=this.proc,e.path=this.path,e.numproc=this.numproc,e.face=this.face,e.serial=this.serial,e.workorder=this.workorder,e}},V=function(e){return e.LoadUnloadCycle=`LoadUnloadCycle`,e.MachineCycle=`MachineCycle`,e.PartMark=`PartMark`,e.Inspection=`Inspection`,e.OrderAssignment=`OrderAssignment`,e.GeneralMessage=`GeneralMessage`,e.PalletCycle=`PalletCycle`,e.WorkorderComment=`WorkorderComment`,e.InspectionResult=`InspectionResult`,e.CloseOut=`CloseOut`,e.AddToQueue=`AddToQueue`,e.RemoveFromQueue=`RemoveFromQueue`,e.InspectionForce=`InspectionForce`,e.PalletOnRotaryInbound=`PalletOnRotaryInbound`,e.PalletInStocker=`PalletInStocker`,e.SignalQuarantine=`SignalQuarantine`,e.InvalidateCycle=`InvalidateCycle`,e.SwapMaterialOnPallet=`SwapMaterialOnPallet`,e.Rebooking=`Rebooking`,e.CancelRebooking=`CancelRebooking`,e.BasketLoadUnload=`BasketLoadUnload`,e.BasketCycle=`BasketCycle`,e.BasketInLocation=`BasketInLocation`,e.BasketIdentityHint=`BasketIdentityHint`,e.BasketContentSnapshot=`BasketContentSnapshot`,e}({}),Me=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.tool=e.Tool,this.pocket=e.Pocket,this.toolChangeOccurred=e.ToolChangeOccurred,this.toolSerialAtStartOfCycle=e.ToolSerialAtStartOfCycle,this.toolSerialAtEndOfCycle=e.ToolSerialAtEndOfCycle,this.toolUseDuringCycle=e.ToolUseDuringCycle,this.totalToolUseAtEndOfCycle=e.TotalToolUseAtEndOfCycle,this.configuredToolLife=e.ConfiguredToolLife,this.toolUseCountDuringCycle=e.ToolUseCountDuringCycle,this.totalToolUseCountAtEndOfCycle=e.TotalToolUseCountAtEndOfCycle,this.configuredToolLifeCount=e.ConfiguredToolLifeCount)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Tool=this.tool,e.Pocket=this.pocket,e.ToolChangeOccurred=this.toolChangeOccurred,e.ToolSerialAtStartOfCycle=this.toolSerialAtStartOfCycle,e.ToolSerialAtEndOfCycle=this.toolSerialAtEndOfCycle,e.ToolUseDuringCycle=this.toolUseDuringCycle,e.TotalToolUseAtEndOfCycle=this.totalToolUseAtEndOfCycle,e.ConfiguredToolLife=this.configuredToolLife,e.ToolUseCountDuringCycle=this.toolUseCountDuringCycle,e.TotalToolUseCountAtEndOfCycle=this.totalToolUseCountAtEndOfCycle,e.ConfiguredToolLifeCount=this.configuredToolLifeCount,e}},Ne=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.stops=[])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.pallet=e.Pallet,this.loadStation=e.LoadStation,Array.isArray(e.Stops)){this.stops=[];for(let t of e.Stops)this.stops.push(Pe.fromJS(t))}this.unloadStation=e.UnloadStation}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.Pallet=this.pallet,e.LoadStation=this.loadStation,Array.isArray(this.stops)){e.Stops=[];for(let t of this.stops)e.Stops.push(t?t.toJSON():void 0)}return e.UnloadStation=this.unloadStation,e}},Pe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.stationName=e.StationName,this.stationNum=e.StationNum)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.StationName=this.stationName,e.StationNum=this.stationNum,e}},Fe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs=[])}init(e){if(e){if(this.scheduleId=e.ScheduleId,Array.isArray(e.Jobs)){this.jobs=[];for(let t of e.Jobs)this.jobs.push(Ie.fromJS(t))}if(e.ExtraParts){this.extraParts={};for(let t in e.ExtraParts)e.ExtraParts.hasOwnProperty(t)&&(this.extraParts[t]=e.ExtraParts[t])}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(Ue.fromJS(t))}if(Array.isArray(e.StationUseForCurrentStatus)){this.stationUseForCurrentStatus=[];for(let t of e.StationUseForCurrentStatus)this.stationUseForCurrentStatus.push(Ue.fromJS(t))}if(Array.isArray(e.SimDayUsage)){this.simDayUsage=[];for(let t of e.SimDayUsage)this.simDayUsage.push(Ge.fromJS(t))}if(Array.isArray(e.SimWorkordersFilled)){this.simWorkordersFilled=[];for(let t of e.SimWorkordersFilled)this.simWorkordersFilled.push(Ke.fromJS(t))}if(Array.isArray(e.CurrentUnfilledWorkorders)){this.currentUnfilledWorkorders=[];for(let t of e.CurrentUnfilledWorkorders)this.currentUnfilledWorkorders.push(qe.fromJS(t))}if(Array.isArray(e.Programs)){this.programs=[];for(let t of e.Programs)this.programs.push(Ye.fromJS(t))}if(Array.isArray(e.AllocationWarning)){this.allocationWarning=[];for(let t of e.AllocationWarning)this.allocationWarning.push(t)}this.debugMessage=e.DebugMessage}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,Array.isArray(this.jobs)){e.Jobs=[];for(let t of this.jobs)e.Jobs.push(t?t.toJSON():void 0)}if(this.extraParts){e.ExtraParts={};for(let t in this.extraParts)this.extraParts.hasOwnProperty(t)&&(e.ExtraParts[t]=this.extraParts[t])}if(Array.isArray(this.stationUse)){e.StationUse=[];for(let t of this.stationUse)e.StationUse.push(t?t.toJSON():void 0)}if(Array.isArray(this.stationUseForCurrentStatus)){e.StationUseForCurrentStatus=[];for(let t of this.stationUseForCurrentStatus)e.StationUseForCurrentStatus.push(t?t.toJSON():void 0)}if(Array.isArray(this.simDayUsage)){e.SimDayUsage=[];for(let t of this.simDayUsage)e.SimDayUsage.push(t?t.toJSON():void 0)}if(Array.isArray(this.simWorkordersFilled)){e.SimWorkordersFilled=[];for(let t of this.simWorkordersFilled)e.SimWorkordersFilled.push(t?t.toJSON():void 0)}if(Array.isArray(this.currentUnfilledWorkorders)){e.CurrentUnfilledWorkorders=[];for(let t of this.currentUnfilledWorkorders)e.CurrentUnfilledWorkorders.push(t?t.toJSON():void 0)}if(Array.isArray(this.programs)){e.Programs=[];for(let t of this.programs)e.Programs.push(t?t.toJSON():void 0)}if(Array.isArray(this.allocationWarning)){e.AllocationWarning=[];for(let t of this.allocationWarning)e.AllocationWarning.push(t)}return e.DebugMessage=this.debugMessage,e}},Ie=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.procsAndPaths=[])}init(e){if(e){if(this.unique=e.Unique,this.routeStartUTC=e.RouteStartUTC?new Date(e.RouteStartUTC.toString()):void 0,this.routeEndUTC=e.RouteEndUTC?new Date(e.RouteEndUTC.toString()):void 0,this.archived=e.Archived,this.partName=e.PartName,this.comment=e.Comment,this.allocationAlgorithm=e.AllocationAlgorithm,Array.isArray(e.Bookings)){this.bookings=[];for(let t of e.Bookings)this.bookings.push(t)}if(this.provisionalWorkorderId=e.ProvisionalWorkorderId,this.artifactRunDate=e.ArtifactRunDate?new Date(e.ArtifactRunDate.toString()):void 0,this.manuallyCreated=e.ManuallyCreated,this.holdEntireJob=e.HoldEntireJob?Le.fromJS(e.HoldEntireJob):void 0,this.cycles=e.Cycles,Array.isArray(e.ProcsAndPaths)){this.procsAndPaths=[];for(let t of e.ProcsAndPaths)this.procsAndPaths.push(Re.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.Unique=this.unique,e.RouteStartUTC=this.routeStartUTC?this.routeStartUTC.toISOString():void 0,e.RouteEndUTC=this.routeEndUTC?this.routeEndUTC.toISOString():void 0,e.Archived=this.archived,e.PartName=this.partName,e.Comment=this.comment,e.AllocationAlgorithm=this.allocationAlgorithm,Array.isArray(this.bookings)){e.Bookings=[];for(let t of this.bookings)e.Bookings.push(t)}if(e.ProvisionalWorkorderId=this.provisionalWorkorderId,e.ArtifactRunDate=this.artifactRunDate?Lt(this.artifactRunDate):void 0,e.ManuallyCreated=this.manuallyCreated,e.HoldEntireJob=this.holdEntireJob?this.holdEntireJob.toJSON():void 0,e.Cycles=this.cycles,Array.isArray(this.procsAndPaths)){e.ProcsAndPaths=[];for(let t of this.procsAndPaths)e.ProcsAndPaths.push(t?t.toJSON():void 0)}return e}},Le=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.holdUnholdPattern=[])}init(e){if(e){if(this.userHold=e.UserHold,this.reasonForUserHold=e.ReasonForUserHold,Array.isArray(e.HoldUnholdPattern)){this.holdUnholdPattern=[];for(let t of e.HoldUnholdPattern)this.holdUnholdPattern.push(t)}this.holdUnholdPatternStartUTC=e.HoldUnholdPatternStartUTC?new Date(e.HoldUnholdPatternStartUTC.toString()):void 0,this.holdUnholdPatternRepeats=e.HoldUnholdPatternRepeats}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.UserHold=this.userHold,e.ReasonForUserHold=this.reasonForUserHold,Array.isArray(this.holdUnholdPattern)){e.HoldUnholdPattern=[];for(let t of this.holdUnholdPattern)e.HoldUnholdPattern.push(t)}return e.HoldUnholdPatternStartUTC=this.holdUnholdPatternStartUTC?this.holdUnholdPatternStartUTC.toISOString():void 0,e.HoldUnholdPatternRepeats=this.holdUnholdPatternRepeats,e}},Re=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.paths=[])}init(e){if(e){if(e.ExtraFields){this.extraFields={};for(let t in e.ExtraFields)e.ExtraFields.hasOwnProperty(t)&&(this.extraFields[t]=e.ExtraFields[t])}if(Array.isArray(e.BasketLoadStations)){this.basketLoadStations=[];for(let t of e.BasketLoadStations)this.basketLoadStations.push(t)}if(this.expectedBasketLoadTime=e.ExpectedBasketLoadTime,Array.isArray(e.BasketUnloadStations)){this.basketUnloadStations=[];for(let t of e.BasketUnloadStations)this.basketUnloadStations.push(t)}if(this.expectedBasketUnloadTime=e.ExpectedBasketUnloadTime,Array.isArray(e.paths)){this.paths=[];for(let t of e.paths)this.paths.push(ze.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.extraFields){e.ExtraFields={};for(let t in this.extraFields)this.extraFields.hasOwnProperty(t)&&(e.ExtraFields[t]=this.extraFields[t])}if(Array.isArray(this.basketLoadStations)){e.BasketLoadStations=[];for(let t of this.basketLoadStations)e.BasketLoadStations.push(t)}if(e.ExpectedBasketLoadTime=this.expectedBasketLoadTime,Array.isArray(this.basketUnloadStations)){e.BasketUnloadStations=[];for(let t of this.basketUnloadStations)e.BasketUnloadStations.push(t)}if(e.ExpectedBasketUnloadTime=this.expectedBasketUnloadTime,Array.isArray(this.paths)){e.paths=[];for(let t of this.paths)e.paths.push(t?t.toJSON():void 0)}return e}},ze=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.palletNums=[],this.load=[],this.unload=[],this.stops=[])}init(e){if(e){if(Array.isArray(e.PalletNums)){this.palletNums=[];for(let t of e.PalletNums)this.palletNums.push(t)}if(this.fixture=e.Fixture,this.face=e.Face,Array.isArray(e.Load)){this.load=[];for(let t of e.Load)this.load.push(t)}if(this.expectedLoadTime=e.ExpectedLoadTime,Array.isArray(e.Unload)){this.unload=[];for(let t of e.Unload)this.unload.push(t)}if(this.expectedUnloadTime=e.ExpectedUnloadTime,Array.isArray(e.Stops)){this.stops=[];for(let t of e.Stops)this.stops.push(Be.fromJS(t))}if(Array.isArray(e.SimulatedProduction)){this.simulatedProduction=[];for(let t of e.SimulatedProduction)this.simulatedProduction.push(Ve.fromJS(t))}if(e.SimulatedStartTimePerPallet){this.simulatedStartTimePerPallet={};for(let t in e.SimulatedStartTimePerPallet)e.SimulatedStartTimePerPallet.hasOwnProperty(t)&&(this.simulatedStartTimePerPallet[t]=e.SimulatedStartTimePerPallet[t]?new Date(e.SimulatedStartTimePerPallet[t].toString()):void 0)}if(this.simulatedStartingUTC=e.SimulatedStartingUTC?new Date(e.SimulatedStartingUTC.toString()):void 0,this.simulatedAverageFlowTime=e.SimulatedAverageFlowTime,this.holdMachining=e.HoldMachining?Le.fromJS(e.HoldMachining):void 0,this.holdLoadUnload=e.HoldLoadUnload?Le.fromJS(e.HoldLoadUnload):void 0,this.partsPerPallet=e.PartsPerPallet,this.inputQueue=e.InputQueue,this.outputQueue=e.OutputQueue,Array.isArray(e.Inspections)){this.inspections=[];for(let t of e.Inspections)this.inspections.push(He.fromJS(t))}this.casting=e.Casting}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.palletNums)){e.PalletNums=[];for(let t of this.palletNums)e.PalletNums.push(t)}if(e.Fixture=this.fixture,e.Face=this.face,Array.isArray(this.load)){e.Load=[];for(let t of this.load)e.Load.push(t)}if(e.ExpectedLoadTime=this.expectedLoadTime,Array.isArray(this.unload)){e.Unload=[];for(let t of this.unload)e.Unload.push(t)}if(e.ExpectedUnloadTime=this.expectedUnloadTime,Array.isArray(this.stops)){e.Stops=[];for(let t of this.stops)e.Stops.push(t?t.toJSON():void 0)}if(Array.isArray(this.simulatedProduction)){e.SimulatedProduction=[];for(let t of this.simulatedProduction)e.SimulatedProduction.push(t?t.toJSON():void 0)}if(this.simulatedStartTimePerPallet){e.SimulatedStartTimePerPallet={};for(let t in this.simulatedStartTimePerPallet)this.simulatedStartTimePerPallet.hasOwnProperty(t)&&(e.SimulatedStartTimePerPallet[t]=this.simulatedStartTimePerPallet[t]?this.simulatedStartTimePerPallet[t].toISOString():void 0)}if(e.SimulatedStartingUTC=this.simulatedStartingUTC?this.simulatedStartingUTC.toISOString():void 0,e.SimulatedAverageFlowTime=this.simulatedAverageFlowTime,e.HoldMachining=this.holdMachining?this.holdMachining.toJSON():void 0,e.HoldLoadUnload=this.holdLoadUnload?this.holdLoadUnload.toJSON():void 0,e.PartsPerPallet=this.partsPerPallet,e.InputQueue=this.inputQueue,e.OutputQueue=this.outputQueue,Array.isArray(this.inspections)){e.Inspections=[];for(let t of this.inspections)e.Inspections.push(t?t.toJSON():void 0)}return e.Casting=this.casting,e}},Be=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.stationNums=[])}init(e){if(e){if(this.stationGroup=e.StationGroup,Array.isArray(e.StationNums)){this.stationNums=[];for(let t of e.StationNums)this.stationNums.push(t)}this.expectedCycleTime=e.ExpectedCycleTime,this.program=e.Program,this.programRevision=e.ProgramRevision}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.StationGroup=this.stationGroup,Array.isArray(this.stationNums)){e.StationNums=[];for(let t of this.stationNums)e.StationNums.push(t)}return e.ExpectedCycleTime=this.expectedCycleTime,e.Program=this.program,e.ProgramRevision=this.programRevision,e}},Ve=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Quantity=this.quantity,e}},He=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.inspectionType=e.InspectionType,this.counter=e.Counter,this.maxVal=e.MaxVal,this.randomFreq=e.RandomFreq,this.timeInterval=e.TimeInterval,this.expectedInspectionTime=e.ExpectedInspectionTime)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.InspectionType=this.inspectionType,e.Counter=this.counter,e.MaxVal=this.maxVal,e.RandomFreq=this.randomFreq,e.TimeInterval=this.timeInterval,e.ExpectedInspectionTime=this.expectedInspectionTime,e}},Ue=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.scheduleId=e.ScheduleId,this.stationGroup=e.StationGroup,this.stationNum=e.StationNum,this.startUTC=e.StartUTC?new Date(e.StartUTC.toString()):void 0,this.endUTC=e.EndUTC?new Date(e.EndUTC.toString()):void 0,this.planDown=e.PlanDown,this.pallet=e.Pallet,Array.isArray(e.Parts))){this.parts=[];for(let t of e.Parts)this.parts.push(We.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,e.StationGroup=this.stationGroup,e.StationNum=this.stationNum,e.StartUTC=this.startUTC?this.startUTC.toISOString():void 0,e.EndUTC=this.endUTC?this.endUTC.toISOString():void 0,e.PlanDown=this.planDown,e.Pallet=this.pallet,Array.isArray(this.parts)){e.Parts=[];for(let t of this.parts)e.Parts.push(t?t.toJSON():void 0)}return e}},We=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.process=e.Process,this.path=e.Path)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.Process=this.process,e.Path=this.path,e}},Ge=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.day=e.Day?new Date(e.Day.toString()):void 0,this.machineGroup=e.MachineGroup,this.usage=e.Usage)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Day=this.day?Lt(this.day):void 0,e.MachineGroup=this.machineGroup,e.Usage=this.usage,e}},Ke=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.workorderId=e.WorkorderId,this.part=e.Part,this.started=e.Started?new Date(e.Started.toString()):void 0,this.filled=e.Filled?new Date(e.Filled.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.Started=this.started?Lt(this.started):void 0,e.Filled=this.filled?Lt(this.filled):void 0,e}},qe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.workorderId=e.WorkorderId,this.part=e.Part,this.quantity=e.Quantity,this.dueDate=e.DueDate?new Date(e.DueDate.toString()):void 0,this.priority=e.Priority,Array.isArray(e.Programs))){this.programs=[];for(let t of e.Programs)this.programs.push(Je.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.Quantity=this.quantity,e.DueDate=this.dueDate?this.dueDate.toISOString():void 0,e.Priority=this.priority,Array.isArray(this.programs)){e.Programs=[];for(let t of this.programs)e.Programs.push(t?t.toJSON():void 0)}return e}},Je=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.processNumber=e.ProcessNumber,this.stopIndex=e.StopIndex,this.programName=e.ProgramName,this.revision=e.Revision)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProcessNumber=this.processNumber,e.StopIndex=this.stopIndex,e.ProgramName=this.programName,e.Revision=this.revision,e}},Ye=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.programName=e.ProgramName,this.comment=e.Comment,this.programContent=e.ProgramContent,this.revision=e.Revision)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProgramName=this.programName,e.Comment=this.comment,e.ProgramContent=this.programContent,e.Revision=this.revision,e}},Xe=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs={},this.pallets={},this.material=[],this.alarms=[],this.queues={})}init(e){if(e){if(this.timeOfCurrentStatusUTC=e.TimeOfCurrentStatusUTC?new Date(e.TimeOfCurrentStatusUTC.toString()):void 0,e.Jobs){this.jobs={};for(let t in e.Jobs)e.Jobs.hasOwnProperty(t)&&(this.jobs[t]=e.Jobs[t]?Qe.fromJS(e.Jobs[t]):new Qe)}if(e.Pallets){this.pallets={};for(let t in e.Pallets)e.Pallets.hasOwnProperty(t)&&(this.pallets[t]=e.Pallets[t]?et.fromJS(e.Pallets[t]):new et)}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(rt.fromJS(t))}if(Array.isArray(e.Alarms)){this.alarms=[];for(let t of e.Alarms)this.alarms.push(t)}if(e.Queues){this.queues={};for(let t in e.Queues)e.Queues.hasOwnProperty(t)&&(this.queues[t]=e.Queues[t]?st.fromJS(e.Queues[t]):new st)}if(Array.isArray(e.MachineLocations)){this.machineLocations=[];for(let t of e.MachineLocations)this.machineLocations.push(lt.fromJS(t))}if(Array.isArray(e.Workorders)){this.workorders=[];for(let t of e.Workorders)this.workorders.push(ut.fromJS(t))}if(e.Baskets){this.baskets={};for(let t in e.Baskets)e.Baskets.hasOwnProperty(t)&&(this.baskets[t]=e.Baskets[t]?mt.fromJS(e.Baskets[t]):new mt)}if(Array.isArray(e.BasketMoveInstructions)){this.basketMoveInstructions=[];for(let t of e.BasketMoveInstructions)this.basketMoveInstructions.push(_t.fromJS(t))}this.customState=e.CustomState}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.TimeOfCurrentStatusUTC=this.timeOfCurrentStatusUTC?this.timeOfCurrentStatusUTC.toISOString():void 0,this.jobs){e.Jobs={};for(let t in this.jobs)this.jobs.hasOwnProperty(t)&&(e.Jobs[t]=this.jobs[t]?this.jobs[t].toJSON():void 0)}if(this.pallets){e.Pallets={};for(let t in this.pallets)this.pallets.hasOwnProperty(t)&&(e.Pallets[t]=this.pallets[t]?this.pallets[t].toJSON():void 0)}if(Array.isArray(this.material)){e.Material=[];for(let t of this.material)e.Material.push(t?t.toJSON():void 0)}if(Array.isArray(this.alarms)){e.Alarms=[];for(let t of this.alarms)e.Alarms.push(t)}if(this.queues){e.Queues={};for(let t in this.queues)this.queues.hasOwnProperty(t)&&(e.Queues[t]=this.queues[t]?this.queues[t].toJSON():void 0)}if(Array.isArray(this.machineLocations)){e.MachineLocations=[];for(let t of this.machineLocations)e.MachineLocations.push(t?t.toJSON():void 0)}if(Array.isArray(this.workorders)){e.Workorders=[];for(let t of this.workorders)e.Workorders.push(t?t.toJSON():void 0)}if(this.baskets){e.Baskets={};for(let t in this.baskets)this.baskets.hasOwnProperty(t)&&(e.Baskets[t]=this.baskets[t]?this.baskets[t].toJSON():void 0)}if(Array.isArray(this.basketMoveInstructions)){e.BasketMoveInstructions=[];for(let t of this.basketMoveInstructions)e.BasketMoveInstructions.push(t?t.toJSON():void 0)}return e.CustomState=this.customState,e}},Ze=class e extends Ie{constructor(e){super(e)}init(e){if(super.init(e),e&&(this.scheduleId=e.ScheduleId,this.copiedToSystem=e.CopiedToSystem,Array.isArray(e.Decrements))){this.decrements=[];for(let t of e.Decrements)this.decrements.push($e.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.ScheduleId=this.scheduleId,e.CopiedToSystem=this.copiedToSystem,Array.isArray(this.decrements)){e.Decrements=[];for(let t of this.decrements)e.Decrements.push(t?t.toJSON():void 0)}return super.toJSON(e),e}},Qe=class e extends Ze{constructor(e){super(e)}init(e){if(super.init(e),e){if(Array.isArray(e.Completed)){this.completed=[];for(let t of e.Completed)this.completed.push(t)}if(Array.isArray(e.Precedence)){this.precedence=[];for(let t of e.Precedence)this.precedence.push(t)}if(Array.isArray(e.AssignedWorkorders)){this.assignedWorkorders=[];for(let t of e.AssignedWorkorders)this.assignedWorkorders.push(t)}this.remainingToStart=e.RemainingToStart}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},Array.isArray(this.completed)){e.Completed=[];for(let t of this.completed)e.Completed.push(t)}if(Array.isArray(this.precedence)){e.Precedence=[];for(let t of this.precedence)e.Precedence.push(t)}if(Array.isArray(this.assignedWorkorders)){e.AssignedWorkorders=[];for(let t of this.assignedWorkorders)e.AssignedWorkorders.push(t)}return e.RemainingToStart=this.remainingToStart,super.toJSON(e),e}},$e=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.decrementId=e.DecrementId,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.DecrementId=this.decrementId,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Quantity=this.quantity,e}},et=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.currentPalletLocation=new tt)}init(e){if(e){if(this.palletNum=e.PalletNum,this.fixtureOnPallet=e.FixtureOnPallet,this.onHold=e.OnHold,this.currentPalletLocation=e.CurrentPalletLocation?tt.fromJS(e.CurrentPalletLocation):new tt,this.newFixture=e.NewFixture,this.numFaces=e.NumFaces,Array.isArray(e.FaceNames)){this.faceNames=[];for(let t of e.FaceNames)this.faceNames.push(t)}this.targetLocation=e.TargetLocation?tt.fromJS(e.TargetLocation):void 0,this.percentMoveCompleted=e.PercentMoveCompleted}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.PalletNum=this.palletNum,e.FixtureOnPallet=this.fixtureOnPallet,e.OnHold=this.onHold,e.CurrentPalletLocation=this.currentPalletLocation?this.currentPalletLocation.toJSON():void 0,e.NewFixture=this.newFixture,e.NumFaces=this.numFaces,Array.isArray(this.faceNames)){e.FaceNames=[];for(let t of this.faceNames)e.FaceNames.push(t)}return e.TargetLocation=this.targetLocation?this.targetLocation.toJSON():void 0,e.PercentMoveCompleted=this.percentMoveCompleted,e}},tt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.loc=e.loc,this.group=e.group,this.num=e.num)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.loc=this.loc,e.group=this.group,e.num=this.num,e}},nt=function(e){return e.LoadUnload=`LoadUnload`,e.Machine=`Machine`,e.MachineQueue=`MachineQueue`,e.Buffer=`Buffer`,e.Cart=`Cart`,e}({}),rt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.signaledInspections=[],this.location=new it,this.action=new ot)}init(e){if(e){if(this.materialID=e.MaterialID,this.jobUnique=e.JobUnique,this.partName=e.PartName,this.process=e.Process,this.path=e.Path,this.serial=e.Serial,this.workorderId=e.WorkorderId,Array.isArray(e.SignaledInspections)){this.signaledInspections=[];for(let t of e.SignaledInspections)this.signaledInspections.push(t)}this.quarantineAfterUnload=e.QuarantineAfterUnload,this.problem=e.Problem,this.lastCompletedMachiningRouteStopIndex=e.LastCompletedMachiningRouteStopIndex,this.location=e.Location?it.fromJS(e.Location):new it,this.action=e.Action?ot.fromJS(e.Action):new ot}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.JobUnique=this.jobUnique,e.PartName=this.partName,e.Process=this.process,e.Path=this.path,e.Serial=this.serial,e.WorkorderId=this.workorderId,Array.isArray(this.signaledInspections)){e.SignaledInspections=[];for(let t of this.signaledInspections)e.SignaledInspections.push(t)}return e.QuarantineAfterUnload=this.quarantineAfterUnload,e.Problem=this.problem,e.LastCompletedMachiningRouteStopIndex=this.lastCompletedMachiningRouteStopIndex,e.Location=this.location?this.location.toJSON():void 0,e.Action=this.action?this.action.toJSON():void 0,e}},it=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.type=e.Type,this.palletNum=e.PalletNum,this.face=e.Face,this.currentQueue=e.CurrentQueue,this.queuePosition=e.QueuePosition,this.basketId=e.BasketId,this.basketSlot=e.BasketSlot)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Type=this.type,e.PalletNum=this.palletNum,e.Face=this.face,e.CurrentQueue=this.currentQueue,e.QueuePosition=this.queuePosition,e.BasketId=this.basketId,e.BasketSlot=this.basketSlot,e}},at=function(e){return e.Free=`Free`,e.OnPallet=`OnPallet`,e.InQueue=`InQueue`,e.InBasket=`InBasket`,e}({}),ot=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.type=e.Type,this.workId=e.WorkId,this.loadOntoPalletNum=e.LoadOntoPalletNum,this.loadOntoFace=e.LoadOntoFace,this.processAfterLoad=e.ProcessAfterLoad,this.pathAfterLoad=e.PathAfterLoad,this.loadFromBasketId=e.LoadFromBasketId,this.loadToBasketId=e.LoadToBasketId,this.loadToBasketSlot=e.LoadToBasketSlot,this.unloadIntoQueue=e.UnloadIntoQueue,this.unloadToBasketId=e.UnloadToBasketId,this.unloadToBasketSlot=e.UnloadToBasketSlot,this.elapsedLoadUnloadTime=e.ElapsedLoadUnloadTime,this.program=e.Program,this.elapsedMachiningTime=e.ElapsedMachiningTime,this.expectedRemainingMachiningTime=e.ExpectedRemainingMachiningTime)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Type=this.type,e.WorkId=this.workId,e.LoadOntoPalletNum=this.loadOntoPalletNum,e.LoadOntoFace=this.loadOntoFace,e.ProcessAfterLoad=this.processAfterLoad,e.PathAfterLoad=this.pathAfterLoad,e.LoadFromBasketId=this.loadFromBasketId,e.LoadToBasketId=this.loadToBasketId,e.LoadToBasketSlot=this.loadToBasketSlot,e.UnloadIntoQueue=this.unloadIntoQueue,e.UnloadToBasketId=this.unloadToBasketId,e.UnloadToBasketSlot=this.unloadToBasketSlot,e.ElapsedLoadUnloadTime=this.elapsedLoadUnloadTime,e.Program=this.program,e.ElapsedMachiningTime=this.elapsedMachiningTime,e.ExpectedRemainingMachiningTime=this.expectedRemainingMachiningTime,e}},H=function(e){return e.Waiting=`Waiting`,e.Loading=`Loading`,e.UnloadToInProcess=`UnloadToInProcess`,e.UnloadToCompletedMaterial=`UnloadToCompletedMaterial`,e.Machining=`Machining`,e.LoadingToBasket=`LoadingToBasket`,e}({}),st=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.maxSizeBeforeStopUnloading=e.MaxSizeBeforeStopUnloading,this.role=e.Role)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MaxSizeBeforeStopUnloading=this.maxSizeBeforeStopUnloading,e.Role=this.role,e}},ct=function(e){return e.RawMaterial=`RawMaterial`,e.InProcessTransfer=`InProcessTransfer`,e.Quarantine=`Quarantine`,e.Other=`Other`,e}({}),lt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.possibleLoadStations=[])}init(e){if(e){if(this.machineGroup=e.MachineGroup,this.machineNum=e.MachineNum,this.moving=e.Moving,Array.isArray(e.PossibleLoadStations)){this.possibleLoadStations=[];for(let t of e.PossibleLoadStations)this.possibleLoadStations.push(t)}this.currentLoadStation=e.CurrentLoadStation}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MachineGroup=this.machineGroup,e.MachineNum=this.machineNum,e.Moving=this.moving,Array.isArray(this.possibleLoadStations)){e.PossibleLoadStations=[];for(let t of this.possibleLoadStations)e.PossibleLoadStations.push(t)}return e.CurrentLoadStation=this.currentLoadStation,e}},ut=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.elapsedStationTime={},this.activeStationTime={})}init(e){if(e){if(this.workorderId=e.WorkorderId,this.part=e.Part,this.plannedQuantity=e.PlannedQuantity,this.dueDate=e.DueDate?new Date(e.DueDate.toString()):void 0,this.priority=e.Priority,this.simulatedStart=e.SimulatedStart?new Date(e.SimulatedStart.toString()):void 0,this.simulatedFilled=e.SimulatedFilled?new Date(e.SimulatedFilled.toString()):void 0,this.completedQuantity=e.CompletedQuantity,Array.isArray(e.Comments)){this.comments=[];for(let t of e.Comments)this.comments.push(dt.fromJS(t))}if(e.ElapsedStationTime){this.elapsedStationTime={};for(let t in e.ElapsedStationTime)e.ElapsedStationTime.hasOwnProperty(t)&&(this.elapsedStationTime[t]=e.ElapsedStationTime[t])}if(e.ActiveStationTime){this.activeStationTime={};for(let t in e.ActiveStationTime)e.ActiveStationTime.hasOwnProperty(t)&&(this.activeStationTime[t]=e.ActiveStationTime[t])}if(Array.isArray(e.Material)){this.material=[];for(let t of e.Material)this.material.push(ft.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.WorkorderId=this.workorderId,e.Part=this.part,e.PlannedQuantity=this.plannedQuantity,e.DueDate=this.dueDate?this.dueDate.toISOString():void 0,e.Priority=this.priority,e.SimulatedStart=this.simulatedStart?Lt(this.simulatedStart):void 0,e.SimulatedFilled=this.simulatedFilled?Lt(this.simulatedFilled):void 0,e.CompletedQuantity=this.completedQuantity,Array.isArray(this.comments)){e.Comments=[];for(let t of this.comments)e.Comments.push(t?t.toJSON():void 0)}if(this.elapsedStationTime){e.ElapsedStationTime={};for(let t in this.elapsedStationTime)this.elapsedStationTime.hasOwnProperty(t)&&(e.ElapsedStationTime[t]=this.elapsedStationTime[t])}if(this.activeStationTime){e.ActiveStationTime={};for(let t in this.activeStationTime)this.activeStationTime.hasOwnProperty(t)&&(e.ActiveStationTime[t]=this.activeStationTime[t])}if(Array.isArray(this.material)){e.Material=[];for(let t of this.material)e.Material.push(t?t.toJSON():void 0)}return e}},dt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.comment=e.Comment,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Comment=this.comment,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e}},ft=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.materialID=e.MaterialID,this.serial=e.Serial,this.quarantined=e.Quarantined,this.inspectionFailed=e.InspectionFailed,this.closeout=e.Closeout)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Serial=this.serial,e.Quarantined=this.quarantined,e.InspectionFailed=this.inspectionFailed,e.Closeout=this.closeout,e}},pt=function(e){return e.None=`None`,e.ClosedOut=`ClosedOut`,e.CloseOutFailed=`CloseOutFailed`,e}({}),mt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.position=new ht)}init(e){if(e){if(this.basketId=e.BasketId,this.position=e.Position?ht.fromJS(e.Position):new ht,Array.isArray(e.EmptySlots)){this.emptySlots=[];for(let t of e.EmptySlots)this.emptySlots.push(t)}if(Array.isArray(e.UnknownSlots)){this.unknownSlots=[];for(let t of e.UnknownSlots)this.unknownSlots.push(t)}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.BasketId=this.basketId,e.Position=this.position?this.position.toJSON():void 0,Array.isArray(this.emptySlots)){e.EmptySlots=[];for(let t of this.emptySlots)e.EmptySlots.push(t)}if(Array.isArray(this.unknownSlots)){e.UnknownSlots=[];for(let t of this.unknownSlots)e.UnknownSlots.push(t)}return e}},ht=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.location=e.Location,this.locationNum=e.LocationNum,this.locationTitle=e.LocationTitle,this.zone=e.Zone)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Location=this.location,e.LocationNum=this.locationNum,e.LocationTitle=this.locationTitle,e.Zone=this.zone,e}},gt=function(e){return e.LoadUnload=`LoadUnload`,e.LoadStationStaging=`LoadStationStaging`,e.Storage=`Storage`,e.InTransit=`InTransit`,e}({}),_t=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.source=new ht,this.destination=new ht)}init(e){e&&(this.instructionId=e.InstructionId,this.basketId=e.BasketId,this.source=e.Source?ht.fromJS(e.Source):new ht,this.destination=e.Destination?ht.fromJS(e.Destination):new ht,this.reason=e.Reason,this.displayText=e.DisplayText,this.prerequisiteInstructionId=e.PrerequisiteInstructionId)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.InstructionId=this.instructionId,e.BasketId=this.basketId,e.Source=this.source?this.source.toJSON():void 0,e.Destination=this.destination?this.destination.toJSON():void 0,e.Reason=this.reason,e.DisplayText=this.displayText,e.PrerequisiteInstructionId=this.prerequisiteInstructionId,e}},vt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.editedEvents=[])}init(e){if(e&&(this.oldMaterialID=e.OldMaterialID,this.newMaterialID=e.NewMaterialID,Array.isArray(e.EditedEvents))){this.editedEvents=[];for(let t of e.EditedEvents)this.editedEvents.push(Ae.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.OldMaterialID=this.oldMaterialID,e.NewMaterialID=this.newMaterialID,Array.isArray(this.editedEvents)){e.EditedEvents=[];for(let t of this.editedEvents)e.EditedEvents.push(t?t.toJSON():void 0)}return e}},yt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);this.type=e.type,this.title=e.title,this.status=e.status,this.detail=e.detail,this.instance=e.instance}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){for(var t in e=typeof e==`object`?e:{},this)this.hasOwnProperty(t)&&(e[t]=this[t]);return e.type=this.type,e.title=this.title,e.status=this.status,e.detail=this.detail,e.instance=this.instance,e}},bt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.existingMaterial=e.ExistingMaterial?xt.fromJS(e.ExistingMaterial):void 0,this.potentialNewMaterial=e.PotentialNewMaterial?St.fromJS(e.PotentialNewMaterial):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ExistingMaterial=this.existingMaterial?this.existingMaterial.toJSON():void 0,e.PotentialNewMaterial=this.potentialNewMaterial?this.potentialNewMaterial.toJSON():void 0,e}},xt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e&&(this.materialID=e.MaterialID,this.jobUnique=e.JobUnique,this.partName=e.PartName,this.numProcesses=e.NumProcesses,this.workorder=e.Workorder,this.serial=e.Serial,e.Paths)){this.paths={};for(let t in e.Paths)e.Paths.hasOwnProperty(t)&&(this.paths[t]=e.Paths[t])}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.JobUnique=this.jobUnique,e.PartName=this.partName,e.NumProcesses=this.numProcesses,e.Workorder=this.workorder,e.Serial=this.serial,this.paths){e.Paths={};for(let t in this.paths)this.paths.hasOwnProperty(t)&&(e.Paths[t]=this.paths[t])}return e}},St=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(e.PossibleCastingsByQueue){this.possibleCastingsByQueue={};for(let t in e.PossibleCastingsByQueue)e.PossibleCastingsByQueue.hasOwnProperty(t)&&(this.possibleCastingsByQueue[t]=e.PossibleCastingsByQueue[t]===void 0?[]:e.PossibleCastingsByQueue[t])}if(e.PossibleJobsByQueue){this.possibleJobsByQueue={};for(let t in e.PossibleJobsByQueue)e.PossibleJobsByQueue.hasOwnProperty(t)&&(this.possibleJobsByQueue[t]=e.PossibleJobsByQueue[t]?e.PossibleJobsByQueue[t].map(e=>Ct.fromJS(e)):[])}this.workorder=e.Workorder,this.serial=e.Serial}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.possibleCastingsByQueue){e.PossibleCastingsByQueue={};for(let t in this.possibleCastingsByQueue)this.possibleCastingsByQueue.hasOwnProperty(t)&&(e.PossibleCastingsByQueue[t]=this.possibleCastingsByQueue[t])}if(this.possibleJobsByQueue){e.PossibleJobsByQueue={};for(let t in this.possibleJobsByQueue)this.possibleJobsByQueue.hasOwnProperty(t)&&(e.PossibleJobsByQueue[t]=this.possibleJobsByQueue[t])}return e.Workorder=this.workorder,e.Serial=this.serial,e}},Ct=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.lastCompletedProcess=e.LastCompletedProcess,this.workorder=e.Workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.LastCompletedProcess=this.lastCompletedProcess,e.Workorder=this.workorder,e}},wt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs={},this.stationUse=[])}init(e){if(e){if(e.Jobs){this.jobs={};for(let t in e.Jobs)e.Jobs.hasOwnProperty(t)&&(this.jobs[t]=e.Jobs[t]?Ze.fromJS(e.Jobs[t]):new Ze)}if(Array.isArray(e.StationUse)){this.stationUse=[];for(let t of e.StationUse)this.stationUse.push(Ue.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},this.jobs){e.Jobs={};for(let t in this.jobs)this.jobs.hasOwnProperty(t)&&(e.Jobs[t]=this.jobs[t]?this.jobs[t].toJSON():void 0)}if(Array.isArray(this.stationUse)){e.StationUse=[];for(let t of this.stationUse)e.StationUse.push(t?t.toJSON():void 0)}return e}},Tt=class e extends wt{constructor(e){super(e)}init(e){if(super.init(e),e&&(this.mostRecentSimulationId=e.MostRecentSimulationId,Array.isArray(e.MostRecentSimDayUsage))){this.mostRecentSimDayUsage=[];for(let t of e.MostRecentSimDayUsage)this.mostRecentSimDayUsage.push(Ge.fromJS(t))}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MostRecentSimulationId=this.mostRecentSimulationId,Array.isArray(this.mostRecentSimDayUsage)){e.MostRecentSimDayUsage=[];for(let t of this.mostRecentSimDayUsage)e.MostRecentSimDayUsage.push(t?t.toJSON():void 0)}return super.toJSON(e),e}},Et=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e||(this.jobs=[],this.extraParts={})}init(e){if(e){if(this.latestScheduleId=e.LatestScheduleId,Array.isArray(e.Jobs)){this.jobs=[];for(let t of e.Jobs)this.jobs.push(Ze.fromJS(t))}if(e.ExtraParts){this.extraParts={};for(let t in e.ExtraParts)e.ExtraParts.hasOwnProperty(t)&&(this.extraParts[t]=e.ExtraParts[t])}if(Array.isArray(e.RecentArtifactRuns)){this.recentArtifactRuns=[];for(let t of e.RecentArtifactRuns)this.recentArtifactRuns.push(Dt.fromJS(t))}if(Array.isArray(e.UnscheduledRebookings)){this.unscheduledRebookings=[];for(let t of e.UnscheduledRebookings)this.unscheduledRebookings.push(Ot.fromJS(t))}}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.LatestScheduleId=this.latestScheduleId,Array.isArray(this.jobs)){e.Jobs=[];for(let t of this.jobs)e.Jobs.push(t?t.toJSON():void 0)}if(this.extraParts){e.ExtraParts={};for(let t in this.extraParts)this.extraParts.hasOwnProperty(t)&&(e.ExtraParts[t]=this.extraParts[t])}if(Array.isArray(this.recentArtifactRuns)){e.RecentArtifactRuns=[];for(let t of this.recentArtifactRuns)e.RecentArtifactRuns.push(t?t.toJSON():void 0)}if(Array.isArray(this.unscheduledRebookings)){e.UnscheduledRebookings=[];for(let t of this.unscheduledRebookings)e.UnscheduledRebookings.push(t?t.toJSON():void 0)}return e}},Dt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.jobUnique=e.JobUnique,this.partName=e.PartName,this.artifactRunDate=e.ArtifactRunDate?new Date(e.ArtifactRunDate.toString()):void 0)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.JobUnique=this.jobUnique,e.PartName=this.partName,e.ArtifactRunDate=this.artifactRunDate?Lt(this.artifactRunDate):void 0,e}},Ot=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.bookingId=e.BookingId,this.partName=e.PartName,this.quantity=e.Quantity,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.priority=e.Priority,this.notes=e.Notes,this.workorder=e.Workorder)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.BookingId=this.bookingId,e.PartName=this.partName,e.Quantity=this.quantity,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Priority=this.priority,e.Notes=this.notes,e.Workorder=this.workorder,e}},kt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.queue=e.Queue,this.position=e.Position)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Queue=this.queue,e.Position=this.position,e}},At=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.decrementId=e.DecrementId,this.jobUnique=e.JobUnique,this.timeUTC=e.TimeUTC?new Date(e.TimeUTC.toString()):void 0,this.part=e.Part,this.quantity=e.Quantity)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.DecrementId=this.decrementId,e.JobUnique=this.jobUnique,e.TimeUTC=this.timeUTC?this.timeUTC.toISOString():void 0,e.Part=this.part,e.Quantity=this.quantity,e}},jt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.inspectionLocationNum=e.InspectionLocationNum,this.inspectionType=e.InspectionType,this.success=e.Success,e.ExtraData){this.extraData={};for(let t in e.ExtraData)e.ExtraData.hasOwnProperty(t)&&(this.extraData[t]=e.ExtraData[t])}this.elapsed=e.Elapsed,this.active=e.Active}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.InspectionLocationNum=this.inspectionLocationNum,e.InspectionType=this.inspectionType,e.Success=this.success,this.extraData){e.ExtraData={};for(let t in this.extraData)this.extraData.hasOwnProperty(t)&&(e.ExtraData[t]=this.extraData[t])}return e.Elapsed=this.elapsed,e.Active=this.active,e}},Mt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){if(e){if(this.materialID=e.MaterialID,this.process=e.Process,this.locationNum=e.LocationNum,this.closeoutType=e.CloseoutType,e.ExtraData){this.extraData={};for(let t in e.ExtraData)e.ExtraData.hasOwnProperty(t)&&(this.extraData[t]=e.ExtraData[t])}this.elapsed=e.Elapsed,this.active=e.Active,this.failed=e.Failed}}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){if(e=typeof e==`object`?e:{},e.MaterialID=this.materialID,e.Process=this.process,e.LocationNum=this.locationNum,e.CloseoutType=this.closeoutType,this.extraData){e.ExtraData={};for(let t in this.extraData)this.extraData.hasOwnProperty(t)&&(e.ExtraData[t]=this.extraData[t])}return e.Elapsed=this.elapsed,e.Active=this.active,e.Failed=this.failed,e}},Nt=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.pocket=e.Pocket,this.toolName=e.ToolName,this.serial=e.Serial,this.currentUse=e.CurrentUse,this.totalLifeTime=e.TotalLifeTime,this.currentUseCount=e.CurrentUseCount,this.totalLifeCount=e.TotalLifeCount)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.Pocket=this.pocket,e.ToolName=this.toolName,e.Serial=this.serial,e.CurrentUse=this.currentUse,e.TotalLifeTime=this.totalLifeTime,e.CurrentUseCount=this.currentUseCount,e.TotalLifeCount=this.totalLifeCount,e}},Pt=class e extends Nt{constructor(e){super(e)}init(e){super.init(e),e&&(this.machineGroupName=e.MachineGroupName,this.machineNum=e.MachineNum)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.MachineGroupName=this.machineGroupName,e.MachineNum=this.machineNum,super.toJSON(e),e}},Ft=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.cellControllerProgramName=e.CellControllerProgramName,this.programName=e.ProgramName,this.revision=e.Revision,this.comment=e.Comment)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.CellControllerProgramName=this.cellControllerProgramName,e.ProgramName=this.programName,e.Revision=this.revision,e.Comment=this.comment,e}},It=class e{constructor(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}init(e){e&&(this.programName=e.ProgramName,this.revision=e.Revision,this.comment=e.Comment,this.cellControllerProgramName=e.CellControllerProgramName)}static fromJS(t){t=typeof t==`object`?t:{};let n=new e;return n.init(t),n}toJSON(e){return e=typeof e==`object`?e:{},e.ProgramName=this.programName,e.Revision=this.revision,e.Comment=this.comment,e.CellControllerProgramName=this.cellControllerProgramName,e}};function Lt(e){return e.getUTCFullYear()+`-`+(e.getUTCMonth()<9?`0`+(e.getUTCMonth()+1):e.getUTCMonth()+1)+`-`+(e.getUTCDate()<10?`0`+e.getUTCDate():e.getUTCDate())}var Rt=class extends Error{constructor(e,t,n,r,i){super(),this.isApiException=!0,this.message=e,this.status=t,this.response=n,this.headers=r,this.result=i}static isApiException(e){return e.isApiException===!0}};function zt(e,t,n,r,i){throw i??new Rt(e,t,n,r,null)}var Bt,Vt,Ht,Ut,Wt=[],Gt=[],Kt;function qt(){Ht=new Te,Ut=new Ee,Vt=new we,Bt=new Ce}function Jt(e){Wt=e,Gt=e.map(e=>new Te(e))}function Yt(e){Kt=e.access_token;let t={fetch:Xt};Bt=new Ce(void 0,t),Vt=new we(void 0,t),Ht=new Te(void 0,t),Gt=Wt.map(e=>new Te(e,t))}function Xt(e,t){let n=new Headers(e instanceof Request?e.headers:void 0);return new Headers(t?.headers).forEach((e,t)=>n.set(t,e)),Kt&&n.set(`Authorization`,`Bearer `+Kt),window.fetch(e,t?{...t,headers:n}:{headers:n})}function Zt(e,t,n,r,i,a){return`/api/v1/fms/find-instructions/`+encodeURIComponent(e)+`?type=`+encodeURIComponent(t)+(`&materialID=`+n.toString())+(i==null?``:`&process=`+i.toString())+(a===null?``:`&operatorName=`+encodeURIComponent(a))+(r?`&pallet=`+encodeURIComponent(r):``)}var Qt=class extends Error{};Qt.prototype.name=`InvalidTokenError`;function $t(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n}))}function en(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw Error(`base64 string is not of the correct length`)}try{return $t(t)}catch{return atob(t)}}function tn(e,t){if(typeof e!=`string`)throw new Qt(`Invalid token specified: must be a string`);t||={};let n=t.header===!0?0:1,r=e.split(`.`)[n];if(typeof r!=`string`)throw new Qt(`Invalid token specified: missing part #${n+1}`);let i;try{i=en(r)}catch(e){throw new Qt(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new Qt(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}var nn={debug:()=>void 0,info:()=>void 0,warn:()=>void 0,error:()=>void 0},rn,an,on=(e=>(e[e.NONE=0]=`NONE`,e[e.ERROR=1]=`ERROR`,e[e.WARN=2]=`WARN`,e[e.INFO=3]=`INFO`,e[e.DEBUG=4]=`DEBUG`,e))(on||{});(e=>{function t(){rn=3,an=nn}e.reset=t;function n(e){if(!(0<=e&&e<=4))throw Error(`Invalid log level`);rn=e}e.setLevel=n;function r(e){an=e}e.setLogger=r})(on||={});var sn=class e{constructor(e){this._name=e}debug(...t){rn>=4&&an.debug(e._format(this._name,this._method),...t)}info(...t){rn>=3&&an.info(e._format(this._name,this._method),...t)}warn(...t){rn>=2&&an.warn(e._format(this._name,this._method),...t)}error(...t){rn>=1&&an.error(e._format(this._name,this._method),...t)}throw(e){throw this.error(e),e}create(e){let t=Object.create(this);return t._method=e,t.debug(`begin`),t}static createStatic(t,n){let r=new e(`${t}.${n}`);return r.debug(`begin`),r}static _format(e,t){let n=`[${e}]`;return t?`${n} ${t}:`:n}static debug(t,...n){rn>=4&&an.debug(e._format(t),...n)}static info(t,...n){rn>=3&&an.info(e._format(t),...n)}static warn(t,...n){rn>=2&&an.warn(e._format(t),...n)}static error(t,...n){rn>=1&&an.error(e._format(t),...n)}};on.reset();var cn=class{static decode(e){try{return tn(e)}catch(e){throw sn.error(`JwtUtils.decode`,e),e}}static async generateSignedJwt(e,t,n){let r=`${fn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${fn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign({name:`ECDSA`,hash:{name:`SHA-256`}},n,new TextEncoder().encode(r));return`${r}.${fn.encodeBase64Url(new Uint8Array(i))}`}static async generateSignedJwtWithHmac(e,t,n){let r=`${fn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e)))}.${fn.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t)))}`,i=await window.crypto.subtle.sign(`HMAC`,n,new TextEncoder().encode(r));return`${r}.${fn.encodeBase64Url(new Uint8Array(i))}`}},ln=`10000000-1000-4000-8000-100000000000`,un=e=>btoa([...new Uint8Array(e)].map(e=>String.fromCharCode(e)).join(``)),dn=class e{static _randomWord(){let e=new Uint32Array(1);return crypto.getRandomValues(e),e[0]}static generateUUIDv4(){return ln.replace(/[018]/g,t=>(t^e._randomWord()&15>>t/4).toString(16)).replace(/-/g,``)}static generateCodeVerifier(){return e.generateUUIDv4()+e.generateUUIDv4()+e.generateUUIDv4()}static async generateCodeChallenge(e){if(!crypto.subtle)throw Error(`Crypto.subtle is available only in secure contexts (HTTPS).`);try{let t=new TextEncoder().encode(e);return un(await crypto.subtle.digest(`SHA-256`,t)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}catch(e){throw sn.error(`CryptoUtils.generateCodeChallenge`,e),e}}static generateBasicAuth(e,t){return un(new TextEncoder().encode([e,t].join(`:`)))}static async hash(e,t){let n=new TextEncoder().encode(t),r=await crypto.subtle.digest(e,n);return new Uint8Array(r)}static async customCalculateJwkThumbprint(t){let n;switch(t.kty){case`RSA`:n={e:t.e,kty:t.kty,n:t.n};break;case`EC`:n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case`OKP`:n={crv:t.crv,kty:t.kty,x:t.x};break;case`oct`:n={crv:t.k,kty:t.kty};break;default:throw Error(`Unknown jwk type`)}let r=await e.hash(`SHA-256`,JSON.stringify(n));return e.encodeBase64Url(r)}static async generateDPoPProof({url:t,accessToken:n,httpMethod:r,keyPair:i,nonce:a}){let o,s,c={jti:window.crypto.randomUUID(),htm:r??`GET`,htu:t,iat:Math.floor(Date.now()/1e3)};n&&(o=await e.hash(`SHA-256`,n),s=e.encodeBase64Url(o),c.ath=s),a&&(c.nonce=a);try{let e=await crypto.subtle.exportKey(`jwk`,i.publicKey),t={alg:`ES256`,typ:`dpop+jwt`,jwk:{crv:e.crv,kty:e.kty,x:e.x,y:e.y}};return await cn.generateSignedJwt(t,c,i.privateKey)}catch(e){throw e instanceof TypeError?Error(`Error exporting dpop public key: ${e.message}`):e}}static async generateDPoPJkt(t){try{let n=await crypto.subtle.exportKey(`jwk`,t.publicKey);return await e.customCalculateJwkThumbprint(n)}catch(e){throw e instanceof TypeError?Error(`Could not retrieve dpop keys from storage: ${e.message}`):e}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!1,[`sign`,`verify`])}static async generateClientAssertionJwt(t,n,r,i=`HS256`){let a=Math.floor(Date.now()/1e3),o={alg:i,typ:`JWT`},s={iss:t,sub:t,aud:r,jti:e.generateUUIDv4(),exp:a+300,iat:a},c={HS256:`SHA-256`,HS384:`SHA-384`,HS512:`SHA-512`}[i];if(!c)throw Error(`Unsupported algorithm: ${i}. Supported algorithms are: HS256, HS384, HS512`);let l=new TextEncoder,u=await crypto.subtle.importKey(`raw`,l.encode(n),{name:`HMAC`,hash:c},!1,[`sign`]);return await cn.generateSignedJwtWithHmac(o,s,u)}};dn.encodeBase64Url=e=>un(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`);var fn=dn,pn=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new sn(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){let t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug(`raise:`,...e);for(let t of this._callbacks)await t(...e)}},mn=class{static center({...e}){return e.width??=[800,720,600,480].find(e=>e<=window.outerWidth/1.618)??360,e.left??=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2)),e.height!=null&&(e.top??=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2))),e}static serialize(e){return Object.entries(e).filter(([,e])=>e!=null).map(([e,t])=>`${e}=${typeof t==`boolean`?t?`yes`:`no`:t}`).join(`,`)}},hn=class e extends pn{constructor(){super(...arguments),this._logger=new sn(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{let t=this._expiration-e.getEpochTime();this._logger.debug(`timer completes in`,t),this._expiration<=e.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){let n=this._logger.create(`init`);t=Math.max(Math.floor(t),1);let r=e.getEpochTime()+t;if(this.expiration===r&&this._timerHandle){n.debug(`skipping since already initialized for expiration at`,this.expiration);return}this.cancel(),n.debug(`using duration`,t),this._expiration=r;let i=Math.min(t,5);this._timerHandle=setInterval(this._callback,i*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create(`cancel`),this._timerHandle&&=(clearInterval(this._timerHandle),null)}},gn=class{static readParams(e,t=`query`){if(!e)throw TypeError(`Invalid URL`);let n=new URL(e,`http://127.0.0.1`)[t===`fragment`?`hash`:`search`];return new URLSearchParams(n.slice(1))}},_n=`;`,vn=class extends Error{constructor(e,t){if(super(e.error_description||e.error||``),this.form=t,this.name=`ErrorResponse`,!e.error)throw sn.error(`ErrorResponse`,`No error passed`),Error(`No error passed`);this.error=e.error,this.error_description=e.error_description??null,this.error_uri=e.error_uri??null,this.state=e.userState,this.session_state=e.session_state??null,this.url_state=e.url_state}},yn=class extends Error{constructor(e){super(e),this.name=`ErrorTimeout`}},bn=class{constructor(e){this._logger=new sn(`AccessTokenEvents`),this._expiringTimer=new hn(`Access token expiring`),this._expiredTimer=new hn(`Access token expired`),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){let t=this._logger.create(`load`);if(e.access_token&&e.expires_in!==void 0){let n=e.expires_in;if(t.debug(`access token present, remaining duration:`,n),n>0){let e=n-this._expiringNotificationTimeInSeconds;e<=0&&(e=1),t.debug(`registering expiring timer, raising in`,e,`seconds`),this._expiringTimer.init(e)}else t.debug(`canceling existing expiring timer because we're past expiration.`),this._expiringTimer.cancel();let r=n+1;t.debug(`registering expired timer, raising in`,r,`seconds`),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug(`unload: canceling existing access token timers`),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},xn=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new sn(`CheckSessionIFrame`),this._timer=null,this._session_state=null,this._message=e=>{e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&(e.data===`error`?(this._logger.error(`error message from check session op iframe`),this._stopOnError&&this.stop()):e.data===`changed`?(this._logger.debug(`changed message from check session op iframe`),this.stop(),this._callback()):this._logger.debug(e.data+` message from check session op iframe`))};let a=new URL(n);this._frame_origin=a.origin,this._frame=window.document.createElement(`iframe`),this._frame.style.visibility=`hidden`,this._frame.style.position=`fixed`,this._frame.style.left=`-1000px`,this._frame.style.top=`0`,this._frame.width=`0`,this._frame.height=`0`,this._frame.src=a.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener(`message`,this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create(`start`),this.stop(),this._session_state=e;let t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+` `+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create(`stop`),this._session_state=null,this._timer&&=(clearInterval(this._timer),null)}},Sn=class{constructor(){this._logger=new sn(`InMemoryWebStorage`),this._data={}}clear(){this._logger.create(`clear`),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Cn=class extends Error{constructor(e,t){super(t),this.name=`ErrorDPoPNonce`,this.nonce=e}},wn=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new sn(`JsonService`),this._contentTypes=[],this._contentTypes.push(...e,`application/json`),t&&this._contentTypes.push(`application/jwt`)}async fetchWithTimeout(e,t={}){let{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);let i=new AbortController,a=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?new yn(`Network timed out`):e}finally{clearTimeout(a)}}async getJson(e,{token:t,credentials:n,timeoutInSeconds:r}={}){let i=this._logger.create(`getJson`),a={Accept:this._contentTypes.join(`, `)};t&&(i.debug(`token passed, setting Authorization header`),a.Authorization=`Bearer `+t),this._appendExtraHeaders(a);let o;try{i.debug(`url:`,e),o=await this.fetchWithTimeout(e,{method:`GET`,headers:a,timeoutInSeconds:r,credentials:n})}catch(e){throw i.error(`Network Error`),e}i.debug(`HTTP response received, status`,o.status);let s=o.headers.get(`Content-Type`);if(s&&!this._contentTypes.find(e=>s.startsWith(e))&&i.throw(Error(`Invalid response Content-Type: ${s??`undefined`}, from URL: ${e}`)),o.ok&&this._jwtHandler&&s?.startsWith(`application/jwt`))return await this._jwtHandler(await o.text());let c;try{c=await o.json()}catch(e){throw i.error(`Error parsing JSON response`,e),o.ok?e:Error(`${o.statusText} (${o.status})`)}if(!o.ok)throw i.error(`Error from server:`,c),c.error?new vn(c):Error(`${o.statusText} (${o.status}): ${JSON.stringify(c)}`);return c}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i,extraHeaders:a}){let o=this._logger.create(`postForm`),s={Accept:this._contentTypes.join(`, `),"Content-Type":`application/x-www-form-urlencoded`,...a};n!==void 0&&(s.Authorization=`Basic `+n),this._appendExtraHeaders(s);let c;try{o.debug(`url:`,e),c=await this.fetchWithTimeout(e,{method:`POST`,headers:s,body:t,timeoutInSeconds:r,credentials:i})}catch(e){throw o.error(`Network error`),e}o.debug(`HTTP response received, status`,c.status);let l=c.headers.get(`Content-Type`);if(l&&!this._contentTypes.find(e=>l.startsWith(e)))throw Error(`Invalid response Content-Type: ${l??`undefined`}, from URL: ${e}`);let u=await c.text(),d={};if(u)try{d=JSON.parse(u)}catch(e){throw o.error(`Error parsing JSON response`,e),c.ok?e:Error(`${c.statusText} (${c.status})`)}if(!c.ok)throw o.error(`Error from server:`,d),c.headers.has(`dpop-nonce`)?new Cn(c.headers.get(`dpop-nonce`),`${JSON.stringify(d)}`):d.error?new vn(d,t):Error(`${c.statusText} (${c.status}): ${JSON.stringify(d)}`);return d}_appendExtraHeaders(e){let t=this._logger.create(`appendExtraHeaders`),n=Object.keys(this._extraHeaders),r=[`accept`,`content-type`],i=[`authorization`];n.length!==0&&n.forEach(n=>{if(r.includes(n.toLocaleLowerCase())){t.warn(`Protected header could not be set`,n,r);return}if(i.includes(n.toLocaleLowerCase())&&Object.keys(e).includes(n)){t.warn(`Header could not be overridden`,n,i);return}let a=typeof this._extraHeaders[n]==`function`?this._extraHeaders[n]():this._extraHeaders[n];a&&a!==``&&(e[n]=a)})}},Tn=class{constructor(e){this._settings=e,this._logger=new sn(`MetadataService`),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new wn([`application/jwk-set+json`],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug(`using signingKeys from settings`),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug(`using metadata from settings`),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug(`using fetchRequestCredentials from settings`),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){let e=this._logger.create(`getMetadata`);if(this._metadata)return e.debug(`using cached values`),this._metadata;if(!this._metadataUrl)throw e.throw(Error(`No authority or metadataUrl configured on settings`)),null;e.debug(`getting metadata from`,this._metadataUrl);let t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug(`merging remote JSON with seed metadata`),this._metadata=Object.assign({},t,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty(`issuer`)}getAuthorizationEndpoint(){return this._getMetadataProperty(`authorization_endpoint`)}getUserInfoEndpoint(){return this._getMetadataProperty(`userinfo_endpoint`)}getTokenEndpoint(e=!0){return this._getMetadataProperty(`token_endpoint`,e)}getCheckSessionIframe(){return this._getMetadataProperty(`check_session_iframe`,!0)}getEndSessionEndpoint(){return this._getMetadataProperty(`end_session_endpoint`,!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty(`revocation_endpoint`,e)}getKeysEndpoint(e=!0){return this._getMetadataProperty(`jwks_uri`,e)}async _getMetadataProperty(e,t=!1){let n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug(`resolved`),r[e]===void 0){if(t===!0){n.warn(`Metadata does not contain optional property`);return}n.throw(Error(`Metadata does not contain property `+e))}return r[e]}async getSigningKeys(){let e=this._logger.create(`getSigningKeys`);if(this._signingKeys)return e.debug(`returning signingKeys from cache`),this._signingKeys;let t=await this.getKeysEndpoint(!1);e.debug(`got jwks_uri`,t);let n=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug(`got key set`,n),!Array.isArray(n.keys))throw e.throw(Error(`Missing keys on keyset`)),null;return this._signingKeys=n.keys,this._signingKeys}},En=class{constructor({prefix:e=`oidc.`,store:t=localStorage}={}){this._logger=new sn(`WebStorageStateStore`),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;let t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create(`getAllKeys`);let e=await this._store.length,t=[];for(let n=0;n<e;n++){let e=await this._store.key(n);e&&e.indexOf(this._prefix)===0&&t.push(e.substr(this._prefix.length))}return t}},Dn=`code`,On=`openid`,kn=`client_secret_post`,An=900,jn=class{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,metadataSeed:i,client_id:a,client_secret:o,response_type:s=Dn,scope:c=On,redirect_uri:l,post_logout_redirect_uri:u,client_authentication:d=kn,token_endpoint_auth_signing_alg:f=`HS256`,prompt:p,display:m,max_age:h,ui_locales:g,acr_values:_,resource:v,response_mode:y,filterProtocolClaims:b=!0,loadUserInfo:x=!1,requestTimeoutInSeconds:S,staleStateAgeInSeconds:C=An,mergeClaimsStrategy:w={array:`replace`},disablePKCE:T=!1,stateStore:E,revokeTokenAdditionalContentTypes:D,fetchRequestCredentials:O,refreshTokenAllowedScope:ee,extraQueryParams:te={},extraTokenParams:k={},extraHeaders:A={},dpop:j,omitScopeWhenRequesting:M=!1}){if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith(`/`)||(this.metadataUrl+=`/`),this.metadataUrl+=`.well-known/openid-configuration`)),this.metadata=n,this.metadataSeed=i,this.signingKeys=r,this.client_id=a,this.client_secret=o,this.response_type=s,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=u,this.client_authentication=d,this.token_endpoint_auth_signing_alg=f,this.prompt=p,this.display=m,this.max_age=h,this.ui_locales=g,this.acr_values=_,this.resource=v,this.response_mode=y,this.filterProtocolClaims=b??!0,this.loadUserInfo=!!x,this.staleStateAgeInSeconds=C,this.mergeClaimsStrategy=w,this.omitScopeWhenRequesting=M,this.disablePKCE=!!T,this.revokeTokenAdditionalContentTypes=D,this.fetchRequestCredentials=O||`same-origin`,this.requestTimeoutInSeconds=S,E)this.stateStore=E;else{let e=typeof window<`u`?window.localStorage:new Sn;this.stateStore=new En({store:e})}if(this.refreshTokenAllowedScope=ee,this.extraQueryParams=te,this.extraTokenParams=k,this.extraHeaders=A,this.dpop=j,this.dpop&&!this.dpop?.store)throw Error(`A DPoPStore is required when dpop is enabled`)}},Mn=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new sn(`UserInfoService`),this._getClaimsFromJwt=async e=>{let t=this._logger.create(`_getClaimsFromJwt`);try{let n=cn.decode(e);return t.debug(`JWT decoding successful`),n}catch(e){throw t.error(`Error parsing JWT response`),e}},this._jsonService=new wn(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){let t=this._logger.create(`getClaims`);e||this._logger.throw(Error(`No token passed`));let n=await this._metadataService.getUserInfoEndpoint();t.debug(`got userinfo url`,n);let r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug(`got claims`,r),r}},Nn=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new sn(`TokenClient`),this._jsonService=new wn(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e=`authorization_code`,redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,extraHeaders:i,...a}){let o=this._logger.create(`exchangeCode`);n||o.throw(Error(`A client_id is required`)),t||o.throw(Error(`A redirect_uri is required`)),a.code||o.throw(Error(`A code is required`));let s=new URLSearchParams({grant_type:e,redirect_uri:t});for(let[e,t]of Object.entries(a))t!=null&&s.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&r==null)throw o.throw(Error(`A client_secret is required`)),null;let c,l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:c=fn.generateBasicAuth(n,r);break;case`client_secret_post`:s.append(`client_id`,n),r&&s.append(`client_secret`,r);break;case`client_secret_jwt`:{let e=await fn.generateClientAssertionJwt(n,r,l,this._settings.token_endpoint_auth_signing_alg);s.append(`client_id`,n),s.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),s.append(`client_assertion`,e);break}}o.debug(`got token endpoint`);let u=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return o.debug(`got response`),u}async exchangeCredentials({grant_type:e=`password`,client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){let a=this._logger.create(`exchangeCredentials`);t||a.throw(Error(`A client_id is required`));let o=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||o.set(`scope`,r);for(let[e,t]of Object.entries(i))t!=null&&o.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&n==null)throw a.throw(Error(`A client_secret is required`)),null;let s,c=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:s=fn.generateBasicAuth(t,n);break;case`client_secret_post`:o.append(`client_id`,t),n&&o.append(`client_secret`,n);break;case`client_secret_jwt`:{let e=await fn.generateClientAssertionJwt(t,n,c,this._settings.token_endpoint_auth_signing_alg);o.append(`client_id`,t),o.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),o.append(`client_assertion`,e);break}}a.debug(`got token endpoint`);let l=await this._jsonService.postForm(c,{body:o,basicAuth:s,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return a.debug(`got response`),l}async exchangeRefreshToken({grant_type:e=`refresh_token`,client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,extraHeaders:i,...a}){let o=this._logger.create(`exchangeRefreshToken`);t||o.throw(Error(`A client_id is required`)),a.refresh_token||o.throw(Error(`A refresh_token is required`));let s=new URLSearchParams({grant_type:e});for(let[e,t]of Object.entries(a))Array.isArray(t)?t.forEach(t=>s.append(e,t)):t!=null&&s.set(e,t);if((this._settings.client_authentication===`client_secret_basic`||this._settings.client_authentication===`client_secret_jwt`)&&n==null)throw o.throw(Error(`A client_secret is required`)),null;let c,l=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case`client_secret_basic`:c=fn.generateBasicAuth(t,n);break;case`client_secret_post`:s.append(`client_id`,t),n&&s.append(`client_secret`,n);break;case`client_secret_jwt`:{let e=await fn.generateClientAssertionJwt(t,n,l,this._settings.token_endpoint_auth_signing_alg);s.append(`client_id`,t),s.append(`client_assertion_type`,`urn:ietf:params:oauth:client-assertion-type:jwt-bearer`),s.append(`client_assertion`,e);break}}o.debug(`got token endpoint`);let u=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:i});return o.debug(`got response`),u}async revoke(e){let t=this._logger.create(`revoke`);e.token||t.throw(Error(`A token is required`));let n=await this._metadataService.getRevocationEndpoint(!1);t.debug(`got revocation endpoint, revoking ${e.token_type_hint??`default token type`}`);let r=new URLSearchParams;for(let[t,n]of Object.entries(e))n!=null&&r.set(t,n);r.set(`client_id`,this._settings.client_id),this._settings.client_secret&&r.set(`client_secret`,this._settings.client_secret),await this._jsonService.postForm(n,{body:r,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),t.debug(`got response`)}},Pn=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new sn(`ResponseValidator`),this._userInfoService=new Mn(this._settings,this._metadataService),this._tokenClient=new Nn(this._settings,this._metadataService)}async validateSigninResponse(e,t,n){let r=this._logger.create(`validateSigninResponse`);this._processSigninState(e,t),r.debug(`state processed`),await this._processCode(e,t,n),r.debug(`code processed`),e.isOpenId&&this._validateIdTokenAttributes(e,``,t.nonce),r.debug(`tokens validated`),await this._processClaims(e,t?.skipUserInfo,e.isOpenId),r.debug(`claims processed`)}async validateCredentialsResponse(e,t){let n=this._logger.create(`validateCredentialsResponse`),r=e.isOpenId&&!!e.id_token;r&&this._validateIdTokenAttributes(e),n.debug(`tokens validated`),await this._processClaims(e,t,r),n.debug(`claims processed`)}async validateRefreshResponse(e,t){let n=this._logger.create(`validateRefreshResponse`);e.userState=t.data,e.session_state??=t.session_state,e.scope??=t.scope,e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),n.debug(`ID Token validated`)),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);let r=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,r),n.debug(`claims processed`)}validateSignoutResponse(e,t){let n=this._logger.create(`validateSignoutResponse`);if(t.id!==e.state&&n.throw(Error(`State does not match`)),n.debug(`state validated`),e.userState=t.data,e.error)throw n.warn(`Response was error`,e.error),new vn(e)}_processSigninState(e,t){let n=this._logger.create(`_processSigninState`);if(t.id!==e.state&&n.throw(Error(`State does not match`)),t.client_id||n.throw(Error(`No client_id on state`)),t.authority||n.throw(Error(`No authority on state`)),this._settings.authority!==t.authority&&n.throw(Error(`authority mismatch on settings vs. signin state`)),this._settings.client_id&&this._settings.client_id!==t.client_id&&n.throw(Error(`client_id mismatch on settings vs. signin state`)),n.debug(`state validated`),e.userState=t.data,e.url_state=t.url_state,e.scope??=t.scope,e.error)throw n.warn(`Response was error`,e.error),new vn(e);t.code_verifier&&!e.code&&n.throw(Error(`Expected code in response`))}async _processClaims(e,t=!1,n=!0){let r=this._logger.create(`_processClaims`);if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug(`not loading user info`);return}r.debug(`loading user info`);let i=await this._userInfoService.getClaims(e.access_token);r.debug(`user info claims received from user info endpoint`),n&&i.sub!==e.profile.sub&&r.throw(Error(`subject from UserInfo response does not match subject in ID Token`)),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug(`user info claims received, updated profile:`,e.profile)}async _processCode(e,t,n){let r=this._logger.create(`_processCode`);if(e.code){r.debug(`Validating code`);let i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:n,...t.extraTokenParams});Object.assign(e,i)}else r.debug(`No code to process`)}_validateIdTokenAttributes(e,t,n){let r=this._logger.create(`_validateIdTokenAttributes`);r.debug(`decoding ID Token JWT`);let i=cn.decode(e.id_token??``);if(i.sub||r.throw(Error(`ID Token is missing a subject claim`)),n&&i.nonce!==n&&r.throw(Error(`nonce in id_token does not match nonce in client storage`)),t){let e=cn.decode(t);i.sub!==e.sub&&r.throw(Error(`sub in id_token does not match current sub`)),i.auth_time&&i.auth_time!==e.auth_time&&r.throw(Error(`auth_time in id_token does not match original auth_time`)),i.azp&&i.azp!==e.azp&&r.throw(Error(`azp in id_token does not match original azp`)),!i.azp&&e.azp&&r.throw(Error(`azp not in id_token, but present in original id_token`))}e.profile=i}},Fn=class e{constructor(e){this.id=e.id||fn.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=hn.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new sn(`State`).create(`toStorageString`),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return sn.createStatic(`State`,`fromStorageString`),Promise.resolve(new e(JSON.parse(t)))}static async clearStaleState(t,n){let r=sn.createStatic(`State`,`clearStaleState`),i=hn.getEpochTime()-n,a=await t.getAllKeys();r.debug(`got keys`,a);for(let n=0;n<a.length;n++){let o=a[n],s=await t.get(o),c=!1;if(s)try{let t=await e.fromStorageString(s);r.debug(`got item from key:`,o,t.created),t.created<=i&&(c=!0)}catch(e){r.error(`Error parsing state for key:`,o,e),c=!0}else r.debug(`no item in storage for key:`,o),c=!0;c&&(r.debug(`removed item for key:`,o),t.remove(o))}}},In=class e extends Fn{constructor(e){super(e),this.code_verifier=e.code_verifier,this.code_challenge=e.code_challenge,this.authority=e.authority,this.client_id=e.client_id,this.redirect_uri=e.redirect_uri,this.scope=e.scope,this.client_secret=e.client_secret,this.extraTokenParams=e.extraTokenParams,this.response_mode=e.response_mode,this.skipUserInfo=e.skipUserInfo,this.nonce=e.nonce}static async create(t){let n=t.code_verifier===!0?fn.generateCodeVerifier():t.code_verifier||void 0,r=n?await fn.generateCodeChallenge(n):void 0;return new e({...t,code_verifier:n,code_challenge:r})}toStorageString(){return new sn(`SigninState`).create(`toStorageString`),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo,nonce:this.nonce})}static fromStorageString(t){sn.createStatic(`SigninState`,`fromStorageString`);let n=JSON.parse(t);return e.create(n)}},Ln=class e{constructor(e){this.url=e.url,this.state=e.state}static async create({url:t,authority:n,client_id:r,redirect_uri:i,response_type:a,scope:o,state_data:s,response_mode:c,request_type:l,client_secret:u,nonce:d,url_state:f,resource:p,skipUserInfo:m,extraQueryParams:h,extraTokenParams:g,disablePKCE:_,dpopJkt:v,omitScopeWhenRequesting:y,...b}){if(!t)throw this._logger.error(`create: No url passed`),Error(`url`);if(!r)throw this._logger.error(`create: No client_id passed`),Error(`client_id`);if(!i)throw this._logger.error(`create: No redirect_uri passed`),Error(`redirect_uri`);if(!a)throw this._logger.error(`create: No response_type passed`),Error(`response_type`);if(!o)throw this._logger.error(`create: No scope passed`),Error(`scope`);if(!n)throw this._logger.error(`create: No authority passed`),Error(`authority`);let x=await In.create({data:s,request_type:l,url_state:f,code_verifier:!_,client_id:r,authority:n,redirect_uri:i,response_mode:c,client_secret:u,scope:o,extraTokenParams:g,skipUserInfo:m,nonce:d}),S=new URL(t);S.searchParams.append(`client_id`,r),S.searchParams.append(`redirect_uri`,i),S.searchParams.append(`response_type`,a),y||S.searchParams.append(`scope`,o),d&&S.searchParams.append(`nonce`,d),v&&S.searchParams.append(`dpop_jkt`,v);let C=x.id;f&&(C=`${C}${_n}${f}`),S.searchParams.append(`state`,C),x.code_challenge&&(S.searchParams.append(`code_challenge`,x.code_challenge),S.searchParams.append(`code_challenge_method`,`S256`)),p&&(Array.isArray(p)?p:[p]).forEach(e=>S.searchParams.append(`resource`,e));for(let[e,t]of Object.entries({response_mode:c,...b,...h}))t!=null&&S.searchParams.append(e,t.toString());return new e({url:S.href,state:x})}};Ln._logger=new sn(`SigninRequest`);var Rn=Ln,zn=`openid`,Bn=class{constructor(e){if(this.access_token=``,this.token_type=``,this.profile={},this.state=e.get(`state`),this.session_state=e.get(`session_state`),this.state){let e=decodeURIComponent(this.state).split(_n);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(_n))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`),this.code=e.get(`code`)}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-hn.getEpochTime()}set expires_in(e){typeof e==`string`&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+hn.getEpochTime())}get isOpenId(){return this.scope?.split(` `).includes(zn)||!!this.id_token}},Vn=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:a,client_id:o,url_state:s}){if(this._logger=new sn(`SignoutRequest`),!e)throw this._logger.error(`ctor: No url passed`),Error(`url`);let c=new URL(e);if(n&&c.searchParams.append(`id_token_hint`,n),o&&c.searchParams.append(`client_id`,o),r&&(c.searchParams.append(`post_logout_redirect_uri`,r),t||s)){this.state=new Fn({data:t,request_type:a,url_state:s});let e=this.state.id;s&&(e=`${e}${_n}${s}`),c.searchParams.append(`state`,e)}for(let[e,t]of Object.entries({...i}))t!=null&&c.searchParams.append(e,t.toString());this.url=c.href}},Hn=class{constructor(e){if(this.state=e.get(`state`),this.state){let e=decodeURIComponent(this.state).split(_n);this.state=e[0],e.length>1&&(this.url_state=e.slice(1).join(_n))}this.error=e.get(`error`),this.error_description=e.get(`error_description`),this.error_uri=e.get(`error_uri`)}},Un=[`nbf`,`jti`,`auth_time`,`nonce`,`acr`,`amr`,`azp`,`at_hash`],Wn=[`sub`,`iss`,`aud`,`exp`,`iat`],Gn=class{constructor(e){this._settings=e,this._logger=new sn(`ClaimsService`)}filterProtocolClaims(e){let t={...e};if(this._settings.filterProtocolClaims){let e;e=Array.isArray(this._settings.filterProtocolClaims)?this._settings.filterProtocolClaims:Un;for(let n of e)Wn.includes(n)||delete t[n]}return t}mergeClaims(e,t){let n={...e};for(let[e,r]of Object.entries(t))if(n[e]!==r)if(Array.isArray(n[e])||Array.isArray(r))if(this._settings.mergeClaimsStrategy.array==`replace`)n[e]=r;else{let t=Array.isArray(n[e])?n[e]:[n[e]];for(let e of Array.isArray(r)?r:[r])t.includes(e)||t.push(e);n[e]=t}else typeof n[e]==`object`&&typeof r==`object`?n[e]=this.mergeClaims(n[e],r):n[e]=r;return n}},Kn=class{constructor(e,t){this.keys=e,this.nonce=t}},qn=class{constructor(e,t){this._logger=new sn(`OidcClient`),this.settings=e instanceof jn?e:new jn(e),this.metadataService=t??new Tn(this.settings),this._claimsService=new Gn(this.settings),this._validator=new Pn(this.settings,this.metadataService,this._claimsService),this._tokenClient=new Nn(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:a,skipUserInfo:o,nonce:s,url_state:c,response_type:l=this.settings.response_type,scope:u=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:f=this.settings.prompt,display:p=this.settings.display,max_age:m=this.settings.max_age,ui_locales:h=this.settings.ui_locales,acr_values:g=this.settings.acr_values,resource:_=this.settings.resource,response_mode:v=this.settings.response_mode,extraQueryParams:y=this.settings.extraQueryParams,extraTokenParams:b=this.settings.extraTokenParams,dpopJkt:x,omitScopeWhenRequesting:S=this.settings.omitScopeWhenRequesting}){let C=this._logger.create(`createSigninRequest`);if(l!==`code`)throw Error(`Only the Authorization Code flow (with PKCE) is supported`);let w=await this.metadataService.getAuthorizationEndpoint();C.debug(`Received authorization endpoint`,w);let T=await Rn.create({url:w,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:l,scope:u,state_data:e,url_state:c,prompt:f,display:p,max_age:m,ui_locales:h,id_token_hint:i,login_hint:a,acr_values:g,dpopJkt:x,resource:_,request:t,request_uri:n,extraQueryParams:y,extraTokenParams:b,request_type:r,response_mode:v,client_secret:this.settings.client_secret,skipUserInfo:o,nonce:s,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:S});await this.clearStaleState();let E=T.state;return await this.settings.stateStore.set(E.id,E.toStorageString()),T}async readSigninResponseState(e,t=!1){let n=this._logger.create(`readSigninResponseState`),r=new Bn(gn.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(Error(`No state in response`)),null;let i=await this.settings.stateStore[t?`remove`:`get`](r.state);if(!i)throw n.throw(Error(`No matching state found in storage`)),null;return{state:await In.fromStorageString(i),response:r}}async processSigninResponse(e,t,n=!0){let r=this._logger.create(`processSigninResponse`),{state:i,response:a}=await this.readSigninResponseState(e,n);if(r.debug(`received state from storage; validating response`),this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:e}}try{await this._validator.validateSigninResponse(a,i,t)}catch(e){if(e instanceof Cn&&this.settings.dpop){let n=await this.getDpopProof(this.settings.dpop.store,e.nonce);t.DPoP=n,await this._validator.validateSigninResponse(a,i,t)}else throw e}return a}async getDpopProof(e,t){let n,r;return(await e.getAllKeys()).includes(this.settings.client_id)?(r=await e.get(this.settings.client_id),r.nonce!==t&&t&&(r.nonce=t,await e.set(this.settings.client_id,r))):(n=await fn.generateDPoPKeys(),r=new Kn(n,t),await e.set(this.settings.client_id,r)),await fn.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:`POST`,keyPair:r.keys,nonce:r.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){let i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),a=new Bn(new URLSearchParams);return Object.assign(a,i),await this._validator.validateCredentialsResponse(a,n),a}async useRefreshToken({state:e,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,extraTokenParams:a}){let o=this._logger.create(`useRefreshToken`),s;if(this.settings.refreshTokenAllowedScope===void 0)s=e.scope;else{let t=this.settings.refreshTokenAllowedScope.split(` `);s=(e.scope?.split(` `)||[]).filter(e=>t.includes(e)).join(` `)}if(this.settings.dpop&&this.settings.dpop.store){let e=await this.getDpopProof(this.settings.dpop.store);i={...i,DPoP:e}}let c;try{c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...a})}catch(o){if(o instanceof Cn&&this.settings.dpop)i.DPoP=await this.getDpopProof(this.settings.dpop.store,o.nonce),c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:s,redirect_uri:t,resource:n,timeoutInSeconds:r,extraHeaders:i,...a});else throw o}let l=new Bn(new URLSearchParams);return Object.assign(l,c),o.debug(`validating response`,l),await this._validator.validateRefreshResponse(l,{...e,scope:s}),l}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,url_state:i,post_logout_redirect_uri:a=this.settings.post_logout_redirect_uri,extraQueryParams:o=this.settings.extraQueryParams}={}){let s=this._logger.create(`createSignoutRequest`),c=await this.metadataService.getEndSessionEndpoint();if(!c)throw s.throw(Error(`No end session endpoint`)),null;s.debug(`Received end session endpoint`,c),!n&&a&&!t&&(n=this.settings.client_id);let l=new Vn({url:c,id_token_hint:t,client_id:n,post_logout_redirect_uri:a,state_data:e,extraQueryParams:o,request_type:r,url_state:i});await this.clearStaleState();let u=l.state;return u&&(s.debug(`Signout request has state to persist`),await this.settings.stateStore.set(u.id,u.toStorageString())),l}async readSignoutResponseState(e,t=!1){let n=this._logger.create(`readSignoutResponseState`),r=new Hn(gn.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug(`No state in response`),r.error)throw n.warn(`Response was error:`,r.error),new vn(r);return{state:void 0,response:r}}let i=await this.settings.stateStore[t?`remove`:`get`](r.state);if(!i)throw n.throw(Error(`No matching state found in storage`)),null;return{state:await Fn.fromStorageString(i),response:r}}async processSignoutResponse(e){let t=this._logger.create(`processSignoutResponse`),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug(`Received state from storage; validating response`),this._validator.validateSignoutResponse(r,n)):t.debug(`No state from storage; skipping response validation`),r}clearStaleState(){return this._logger.create(`clearStaleState`),Fn.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create(`revokeToken`),await this._tokenClient.revoke({token:e,token_type_hint:t})}},Jn=class{constructor(e){this._userManager=e,this._logger=new sn(`SessionMonitor`),this._start=async e=>{let t=e.session_state;if(!t)return;let n=this._logger.create(`_start`);if(e.profile?(this._sub=e.profile.sub,n.debug(`session_state`,t,`, sub`,this._sub)):(this._sub=void 0,n.debug(`session_state`,t,`, anonymous user`)),this._checkSessionIFrame){this._checkSessionIFrame.start(t);return}try{let e=await this._userManager.metadataService.getCheckSessionIframe();if(e){n.debug(`initializing check session iframe`);let r=this._userManager.settings.client_id,i=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,o=new xn(this._callback,r,e,i,a);await o.load(),this._checkSessionIFrame=o,o.start(t)}else n.warn(`no check session iframe found in the metadata`)}catch(e){n.error(`Error from getCheckSessionIframe:`,e instanceof Error?e.message:e)}},this._stop=()=>{let e=this._logger.create(`_stop`);if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){let t=setInterval(async()=>{clearInterval(t);try{let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}catch(t){e.error(`error from querySessionStatus`,t instanceof Error?t.message:t)}},1e3)}},this._callback=async()=>{let e=this._logger.create(`_callback`);try{let t=await this._userManager.querySessionStatus(),n=!0;t&&this._checkSessionIFrame?t.sub===this._sub?(n=!1,this._checkSessionIFrame.start(t.session_state),e.debug(`same sub still logged in at OP, session state has changed, restarting check session iframe; session_state`,t.session_state),await this._userManager.events._raiseUserSessionChanged()):e.debug(`different subject signed into OP`,t.sub):e.debug(`subject no longer signed into OP`),n?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():e.debug(`no change in session detected, no event to raise`)}catch(t){this._sub&&(e.debug(`Error calling queryCurrentSigninSession; raising signed out event`,t),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(Error(`No user manager passed`)),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(e=>{this._logger.error(e)})}async _init(){this._logger.create(`_init`);let e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){let e=await this._userManager.querySessionStatus();if(e){let t={session_state:e.session_state,profile:e.sub?{sub:e.sub}:null};this._start(t)}}}},Yn=class e{constructor(e){this.id_token=e.id_token,this.session_state=e.session_state??null,this.access_token=e.access_token,this.refresh_token=e.refresh_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=e.profile,this.expires_at=e.expires_at,this.state=e.userState,this.url_state=e.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-hn.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+hn.getEpochTime())}get expired(){let e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){return this.scope?.split(` `)??[]}toStorageString(){return new sn(`User`).create(`toStorageString`),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return sn.createStatic(`User`,`fromStorageString`),new e(JSON.parse(t))}},Xn=`oidc-client`,Zn=class{constructor(){this._abort=new pn(`Window navigation aborted`),this._disposeHandlers=new Set,this._window=null}async navigate(e){let t=this._logger.create(`navigate`);if(!this._window)throw Error(`Attempted to navigate on a disposed window`);t.debug(`setting URL in window`),this._window.location.replace(e.url);let{url:n,keepOpen:r}=await new Promise((n,r)=>{let i=i=>{let a=i.data,o=e.scriptOrigin??window.location.origin;if(!(i.origin!==o||a?.source!==Xn)){try{let n=gn.readParams(a.url,e.response_mode).get(`state`);if(n||t.warn(`no state found in response url`),i.source!==this._window&&n!==e.state)return}catch{this._dispose(),r(Error(`Invalid response from window`))}n(a)}};window.addEventListener(`message`,i,!1),this._disposeHandlers.add(()=>window.removeEventListener(`message`,i,!1));let a=new BroadcastChannel(`oidc-client-popup-${e.state}`);a.addEventListener(`message`,i,!1),this._disposeHandlers.add(()=>a.close()),this._disposeHandlers.add(this._abort.addHandler(e=>{this._dispose(),r(e)}))});return t.debug(`got response from window`),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create(`_dispose`);for(let e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){let i={source:Xn,url:t,keepOpen:n},a=new sn(`_notifyParent`);if(e)a.debug(`With parent. Using parent.postMessage.`),e.postMessage(i,r);else{a.debug(`No parent. Using BroadcastChannel.`);let e=new URL(t).searchParams.get(`state`);if(!e)throw Error(`No parent and no state in URL. Can't complete notification.`);let n=new BroadcastChannel(`oidc-client-popup-${e}`);n.postMessage(i),n.close()}}},Qn={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},$n=`_blank`,er=60,tr=2,nr=10,rr=class extends jn{constructor(e){let{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=Qn,popupWindowTarget:i=$n,redirectMethod:a=`assign`,redirectTarget:o=`self`,iframeNotifyParentOrigin:s=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:l,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:d,automaticSilentRenew:f=!0,validateSubOnSilentRenew:p=!0,includeIdTokenInSilentRenew:m=!1,monitorSession:h=!1,monitorAnonymousSession:g=!1,checkSessionIntervalInSeconds:_=tr,query_status_response_type:v=`code`,stopCheckSessionOnError:y=!0,revokeTokenTypes:b=[`access_token`,`refresh_token`],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:C=er,maxSilentRenewTimeoutRetries:w,userStore:T}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=a,this.redirectTarget=o,this.iframeNotifyParentOrigin=s,this.iframeScriptOrigin=c,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=d||l||nr,this.automaticSilentRenew=f,this.validateSubOnSilentRenew=p,this.includeIdTokenInSilentRenew=m,this.monitorSession=h,this.monitorAnonymousSession=g,this.checkSessionIntervalInSeconds=_,this.stopCheckSessionOnError=y,this.query_status_response_type=v,this.revokeTokenTypes=b,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=S,this.accessTokenExpiringNotificationTimeInSeconds=C,this.maxSilentRenewTimeoutRetries=w,T)this.userStore=T;else{let e=typeof window<`u`?window.sessionStorage:new Sn;this.userStore=new En({store:e})}}},ir=class e extends Zn{constructor({silentRequestTimeoutInSeconds:t=nr}){super(),this._logger=new sn(`IFrameWindow`),this._timeoutInSeconds=t,this._frame=e.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){let e=window.document.createElement(`iframe`);return e.style.visibility=`hidden`,e.style.position=`fixed`,e.style.left=`-1000px`,e.style.top=`0`,e.width=`0`,e.height=`0`,window.document.body.appendChild(e),e}async navigate(e){this._logger.debug(`navigate: Using timeout of:`,this._timeoutInSeconds);let t=setTimeout(()=>void this._abort.raise(new yn(`IFrame timed out without a response`)),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&=(this._frame.parentNode&&(this._frame.addEventListener(`load`,e=>{var t;let n=e.target;(t=n.parentNode)==null||t.removeChild(n),this._abort.raise(Error(`IFrame removed from DOM`))},!0),(e=this._frame.contentWindow)==null||e.location.replace(`about:blank`)),null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},ar=class{constructor(e){this._settings=e,this._logger=new sn(`IFrameNavigator`)}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new ir({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create(`callback`),ir.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},or=500,sr=1e3,cr=class extends Zn{constructor({popupWindowTarget:e=$n,popupWindowFeatures:t={},popupSignal:n,popupAbortOnClose:r}){super(),this._logger=new sn(`PopupWindow`);let i=mn.center({...Qn,...t});this._window=window.open(void 0,e,mn.serialize(i)),this.abortOnClose=!!r,n&&n.addEventListener(`abort`,()=>{this._abort.raise(Error(n.reason??`Popup aborted`))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!=`boolean`||this._window.closed){this._abort.raise(Error(`Popup blocked by user`));return}this.close()},t.closePopupWindowAfterInSeconds*sr)}async navigate(e){var t;(t=this._window)==null||t.focus();let n=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug(`Popup closed by user or isolated by redirect`),r(),this._disposeHandlers.delete(r),this.abortOnClose&&this._abort.raise(Error(`Popup closed by user`)))},or),r=()=>clearInterval(n);return this._disposeHandlers.add(r),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(Error(`Popup closed`)))),this._window=null}static notifyOpener(e,t){super._notifyParent(window.opener,e,t),!t&&!window.opener&&window.close()}},lr=class{constructor(e){this._settings=e,this._logger=new sn(`PopupNavigator`)}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:n,popupAbortOnClose:r}){return new cr({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:n,popupAbortOnClose:r})}async callback(e,{keepOpen:t=!1}){this._logger.create(`callback`),cr.notifyOpener(e,t)}},ur=class{constructor(e){this._settings=e,this._logger=new sn(`RedirectNavigator`)}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){this._logger.create(`prepare`);let n=window.self;t===`top`&&(n=window.top??window.self);let r=n.location[e].bind(n.location),i;return{navigate:async e=>(this._logger.create(`navigate`),await new Promise((t,n)=>{i=n,window.addEventListener(`pageshow`,()=>t(window.location.href)),r(e.url)})),close:()=>{this._logger.create(`close`),i?.(Error(`Redirect aborted`)),n.stop()}}}async callback(){}},dr=class extends bn{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new sn(`UserManagerEvents`),this._userLoaded=new pn(`User loaded`),this._userUnloaded=new pn(`User unloaded`),this._silentRenewError=new pn(`Silent renew error`),this._userSignedIn=new pn(`User signed in`),this._userSignedOut=new pn(`User signed out`),this._userSessionChanged=new pn(`User session changed`)}async load(e,t=!0){await super.load(e),t&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},fr=class{constructor(e){this._userManager=e,this._logger=new sn(`SilentRenewService`),this._isStarted=!1,this._retryTimer=new hn(`Retry Silent Renew`),this._timeoutRetryCount=0,this._tokenExpiring=async()=>{let e=this._logger.create(`_tokenExpiring`);try{await this._userManager.signinSilent(),this._timeoutRetryCount=0,e.debug(`silent token renewal successful`)}catch(t){if(t instanceof yn){this._timeoutRetryCount++;let n=this._userManager.settings.maxSilentRenewTimeoutRetries;if(n!==void 0&&this._timeoutRetryCount>n){e.error(`Timeout retry limit reached (${this._timeoutRetryCount} > ${n}), raising silentRenewError:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t);return}e.warn(`ErrorTimeout from signinSilent (attempt ${this._timeoutRetryCount}), retry in 5s:`,t),this._retryTimer.init(5);return}e.error(`Error from signinSilent:`,t),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(t)}}}async start(){let e=this._logger.create(`start`);if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error(`getUser error`,t)}}}stop(){this._isStarted&&=(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),!1)}},pr=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},mr=class{constructor(e,t,n,r){this._logger=new sn(`UserManager`),this.settings=new rr(e),this._client=new qn(e),this._redirectNavigator=t??new ur(this.settings),this._popupNavigator=n??new lr(this.settings),this._iframeNavigator=r??new ar(this.settings),this._events=new dr(this.settings),this._silentRenewService=new fr(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new Jn(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){let t=this._logger.create(`getUser`),n=await this._loadUser();return n?(t.info(`user loaded`),await this._events.load(n,e),n):(t.info(`user not found in storage`),null)}async removeUser(){let e=this._logger.create(`removeUser`);await this.storeUser(null),e.info(`user removed from storage`),await this._events.unload()}async signinRedirect(e={}){this._logger.create(`signinRedirect`);let{redirectMethod:t,...n}=e,r;this.settings.dpop?.bind_authorization_code&&(r=await this.generateDPoPJkt(this.settings.dpop));let i=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:`si:r`,dpopJkt:r,...n},i)}async signinRedirectCallback(e=window.location.href){let t=this._logger.create(`signinRedirectCallback`),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info(`success, signed in subject`,n.profile.sub):t.info(`no subject`),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){let r=this._logger.create(`signinResourceOwnerCredential`),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug(`got signin response`);let a=await this._buildUser(i);return a.profile&&a.profile.sub?r.info(`success, signed in subject`,a.profile.sub):r.info(`no subject`),a}async signinPopup(e={}){let t=this._logger.create(`signinPopup`),n;this.settings.dpop?.bind_authorization_code&&(n=await this.generateDPoPJkt(this.settings.dpop));let{popupWindowFeatures:r,popupWindowTarget:i,popupSignal:a,popupAbortOnClose:o,...s}=e,c=this.settings.popup_redirect_uri;c||t.throw(Error(`No popup_redirect_uri configured`));let l=await this._popupNavigator.prepare({popupWindowFeatures:r,popupWindowTarget:i,popupSignal:a,popupAbortOnClose:o}),u=await this._signin({request_type:`si:p`,redirect_uri:c,display:`popup`,dpopJkt:n,...s},l);return u&&(u.profile&&u.profile.sub?t.info(`success, signed in subject`,u.profile.sub):t.info(`no subject`)),u}async signinPopupCallback(e=window.location.href,t=!1){let n=this._logger.create(`signinPopupCallback`);await this._popupNavigator.callback(e,{keepOpen:t}),n.info(`success`)}async signinSilent(e={}){let t=this._logger.create(`signinSilent`),{silentRequestTimeoutInSeconds:n,...r}=e,i=await this._loadUser();if(!e.forceIframeAuth&&i?.refresh_token){t.debug(`using refresh token`);let e=new pr(i);return await this._useRefreshToken({state:e,redirect_uri:r.redirect_uri,resource:r.resource,extraTokenParams:r.extraTokenParams,timeoutInSeconds:n})}let a;this.settings.dpop?.bind_authorization_code&&(a=await this.generateDPoPJkt(this.settings.dpop));let o=this.settings.silent_redirect_uri;o||t.throw(Error(`No silent_redirect_uri configured`));let s;i&&this.settings.validateSubOnSilentRenew&&(t.debug(`subject prior to silent renew:`,i.profile.sub),s=i.profile.sub);let c=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});return i=await this._signin({request_type:`si:s`,redirect_uri:o,prompt:`none`,id_token_hint:this.settings.includeIdTokenInSilentRenew?i?.id_token:void 0,dpopJkt:a,...r},c,s),i&&(i.profile?.sub?t.info(`success, signed in subject`,i.profile.sub):t.info(`no subject`)),i}async _useRefreshToken(e){let t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),n=new Yn({...e.state,...t});return await this.storeUser(n),await this._events.load(n),n}async signinSilentCallback(e=window.location.href){let t=this._logger.create(`signinSilentCallback`);await this._iframeNavigator.callback(e),t.info(`success`)}async signinCallback(e=window.location.href){let{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case`si:r`:return await this.signinRedirectCallback(e);case`si:p`:await this.signinPopupCallback(e);break;case`si:s`:await this.signinSilentCallback(e);break;default:throw Error(`invalid request_type in state`)}}async signoutCallback(e=window.location.href,t=!1){let{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case`so:r`:return await this.signoutRedirectCallback(e);case`so:p`:await this.signoutPopupCallback(e,t);break;case`so:s`:await this.signoutSilentCallback(e);break;default:throw Error(`invalid request_type in state`)}}async querySessionStatus(e={}){let t=this._logger.create(`querySessionStatus`),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(Error(`No silent_redirect_uri configured`));let a=await this._loadUser(),o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),s=await this._signinStart({request_type:`si:s`,redirect_uri:i,prompt:`none`,id_token_hint:this.settings.includeIdTokenInSilentRenew?a?.id_token:void 0,response_type:this.settings.query_status_response_type,scope:`openid`,skipUserInfo:!0,...r},o);try{let e=await this._client.processSigninResponse(s.url,{});return t.debug(`got signin response`),e.session_state&&e.profile.sub?(t.info(`success for subject`,e.profile.sub),{session_state:e.session_state,sub:e.profile.sub}):(t.info(`success, user not authenticated`),null)}catch(e){if(this.settings.monitorAnonymousSession&&e instanceof vn)switch(e.error){case`login_required`:case`consent_required`:case`interaction_required`:case`account_selection_required`:return t.info(`success for anonymous user`),{session_state:e.session_state}}throw e}}async _signin(e,t,n){let r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){let n=this._logger.create(`_signinStart`);try{let r=await this._client.createSigninRequest(e);return n.debug(`got signin request`),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug(`error after preparing navigator, closing navigator window`),t.close(),e}}async _signinEnd(e,t){let n=this._logger.create(`_signinEnd`),r=await this._client.processSigninResponse(e,{});return n.debug(`got signin response`),await this._buildUser(r,t)}async _buildUser(e,t){let n=this._logger.create(`_buildUser`),r=new Yn(e);if(t){if(t!==r.profile.sub)throw n.debug(`current user does not match user returned from signin. sub from signin:`,r.profile.sub),new vn({...e,error:`login_required`});n.debug(`current user matches user returned from signin`)}return await this.storeUser(r),n.debug(`user stored`),await this._events.load(r),r}async signoutRedirect(e={}){let t=this._logger.create(`signoutRedirect`),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:`so:r`,post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info(`success`)}async signoutRedirectCallback(e=window.location.href){let t=this._logger.create(`signoutRedirectCallback`),n=await this._signoutEnd(e);return t.info(`success`),n}async signoutPopup(e={}){let t=this._logger.create(`signoutPopup`),{popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i,...a}=e,o=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r,popupSignal:i});await this._signout({request_type:`so:p`,post_logout_redirect_uri:o,state:o==null?void 0:{},...a},s),t.info(`success`)}async signoutPopupCallback(e=window.location.href,t=!1){let n=this._logger.create(`signoutPopupCallback`);await this._popupNavigator.callback(e,{keepOpen:t}),n.info(`success`)}async _signout(e,t){let n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){let n=this._logger.create(`_signoutStart`);try{let r=await this._loadUser();n.debug(`loaded current user from storage`),this.settings.revokeTokensOnSignout&&await this._revokeInternal(r);let i=e.id_token_hint||r&&r.id_token;i&&(n.debug(`setting id_token_hint in signout request`),e.id_token_hint=i),await this.removeUser(),n.debug(`user removed, creating signout request`);let a=await this._client.createSignoutRequest(e);return n.debug(`got signout request`),await t.navigate({url:a.url,state:a.state?.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(e){throw n.debug(`error after preparing navigator, closing navigator window`),t.close(),e}}async _signoutEnd(e){let t=this._logger.create(`_signoutEnd`),n=await this._client.processSignoutResponse(e);return t.debug(`got signout response`),n}async signoutSilent(e={}){let t=this._logger.create(`signoutSilent`),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.includeIdTokenInSilentSignout?(await this._loadUser())?.id_token:void 0,a=this.settings.popup_post_logout_redirect_uri,o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n});await this._signout({request_type:`so:s`,post_logout_redirect_uri:a,id_token_hint:i,...r},o),t.info(`success`)}async signoutSilentCallback(e=window.location.href){let t=this._logger.create(`signoutSilentCallback`);await this._iframeNavigator.callback(e),t.info(`success`)}async revokeTokens(e){let t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){let n=this._logger.create(`_revokeInternal`);if(!e)return;let r=t.filter(t=>typeof e[t]==`string`);if(!r.length){n.debug(`no need to revoke due to no token(s)`);return}for(let t of r)await this._client.revokeToken(e[t],t),n.info(`${t} revoked successfully`),t!==`access_token`&&(e[t]=null);await this.storeUser(e),n.debug(`user stored`),await this._events.load(e)}startSilentRenew(){this._logger.create(`startSilentRenew`),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){let e=this._logger.create(`_loadUser`),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug(`user storageString loaded`),Yn.fromStorageString(t)):(e.debug(`no user storageString`),null)}async storeUser(e){let t=this._logger.create(`storeUser`);if(e){t.debug(`storing user`);let n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug(`removing user`),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,n,r){let i=await(this.settings.dpop?.store)?.get(this.settings.client_id);if(i)return await fn.generateDPoPProof({url:e,accessToken:t?.access_token,httpMethod:n,keyPair:i.keys,nonce:r})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);return t||(t=new Kn(await fn.generateDPoPKeys()),await e.store.set(this.settings.client_id,t)),await fn.generateDPoPJkt(t.keys)}},hr;function gr(e){return e.openIDConnectClientId?location.hostname===`localhost`?!!e.localhostOpenIDConnectAuthority:!!e.openIDConnectAuthority:!1}async function _r(){let e=await Bt.fMSInformation();e.additionalLogServers&&e.additionalLogServers.length>0&&Jt(e.additionalLogServers);let t=null;if(gr(e)){if(hr=new mr({authority:(location.hostname===`localhost`?e.localhostOpenIDConnectAuthority:e.openIDConnectAuthority)??``,client_id:e.openIDConnectClientId??``,redirect_uri:window.location.protocol+`//`+window.location.host+`/`,post_logout_redirect_uri:window.location.protocol+`//`+window.location.host+`/`,automaticSilentRenew:!0,loadUserInfo:!0,scope:`openid profile`}),t=await hr.getUser(),!t){try{t=await hr.signinRedirectCallback()}catch{t=null}window.history.replaceState({},``,`/`)}t&&(Yt(t),localStorage.setItem(`current-operator`,t.profile.name||t.profile.sub))}return{...e,user:t===null?void 0:t}}var vr=P({name:`FMS Insight`,version:``});function yr(e){hr&&!e.user&&hr.signinRedirect().catch(e=>console.log(e))}function br(){hr&&hr.signoutRedirect().catch(e=>console.log(e))}var xr=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Sr=o(((e,t)=>{t.exports=xr()})),Cr=o((e=>{var t=me();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),wr=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Cr()})),Tr=o((e=>{var t=Sr(),n=me(),r=wr();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function k(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?k(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}var A=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function N(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function oe(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),P=ae(null),le=ae(null);function ue(e,t){switch(oe(P,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(se),oe(se,e)}function F(){N(se),N(ce),N(P)}function I(e){e.memoizedState!==null&&oe(le,e);var t=se.current,n=Jd(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function de(e){ce.current===e&&(N(se),N(ce)),le.current===e&&(N(le),ip._currentValue=ne)}var fe,pe;function L(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
23
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
24
|
-
`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
25
|
-
`),l=s.split(`
|
|
26
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
27
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?L(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return L(e.type);case 16:return L(`Lazy`);case 13:return e.child!==t&&t!==null?L(`Suspense Fallback`):L(`Suspense`);case 19:return L(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return L(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
28
|
-
Error generating stack: `+e.message+`
|
|
29
|
-
`+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,R=t.unstable_requestPaint,z=t.unstable_now,B=t.unstable_getCurrentPriorityLevel,Ce=t.unstable_ImmediatePriority,we=t.unstable_UserBlockingPriority,Te=t.unstable_NormalPriority,Ee=t.unstable_LowPriority,De=t.unstable_IdlePriority,Oe=t.log,ke=t.unstable_setDisableYieldValue,Ae=null,je=null;function V(e){if(typeof Oe==`function`&&ke(e),je&&typeof je.setStrictMode==`function`)try{je.setStrictMode(Ae,e)}catch{}}var Me=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var Ie=256,Le=262144,Re=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Be(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ze(n))):i=ze(o):i=ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ze(n))):i=ze(o)):i=ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ue(){var e=Re;return Re<<=1,!(Re&62914560)&&(Re=4194304),e}function We(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ke(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Me(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Me(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Je(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Me(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ye(e,t){var n=t&-t;return n=n&42?1:Xe(n),(n&(e.suspendedLanes|t))===0?n:0}function Xe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ze(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Qe(){var e=M.p;return e===0?(e=window.event,e===void 0?32:bp(e.type)):e}function $e(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var et=Math.random().toString(36).slice(2),tt=`__reactFiber$`+et,nt=`__reactProps$`+et,rt=`__reactContainer$`+et,it=`__reactEvents$`+et,at=`__reactListeners$`+et,ot=`__reactHandles$`+et,H=`__reactResources$`+et,st=`__reactMarker$`+et;function ct(e){delete e[tt],delete e[nt],delete e[it],delete e[at],delete e[ot]}function lt(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rt]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_f(e);e!==null;){if(n=e[tt])return n;e=_f(e)}return t}e=n,n=e.parentNode}return null}function ut(e){if(e=e[tt]||e[rt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ft(e){var t=e[H];return t||=e[H]={hoistableStyles:new Map,hoistableScripts:new Map},t}function pt(e){e[st]=!0}var mt=new Set,ht={};function gt(e,t){_t(e,t),_t(e+`Capture`,t)}function _t(e,t){for(ht[e]=t,e=0;e<t.length;e++)mt.add(t[e])}var vt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),yt={},bt={};function xt(e){return ye.call(bt,e)?!0:ye.call(yt,e)?!1:vt.test(e)?bt[e]=!0:(yt[e]=!0,!1)}function St(e,t,n){if(xt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ct(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function wt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Tt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Et(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Dt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ot(e){if(!e._valueTracker){var t=Et(e)?`checked`:`value`;e._valueTracker=Dt(e,t,``+e[t])}}function kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Et(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function At(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var jt=/[\n"\\]/g;function Mt(e){return e.replace(jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Nt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Tt(t)):e.value!==``+Tt(t)&&(e.value=``+Tt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ft(e,o,Tt(n)):Ft(e,o,Tt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Tt(s):e.removeAttribute(`name`)}function Pt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ot(e);return}n=n==null?``:``+Tt(n),t=t==null?n:``+Tt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ot(e)}function Ft(e,t,n){t===`number`&&At(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function It(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Tt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lt(e,t,n){if(t!=null&&(t=``+Tt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Tt(n)}function Rt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(A(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Tt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ot(e)}function zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Vt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Bt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ht(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Vt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Vt(e,o,t[o])}function Ut(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Wt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Gt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Kt(e){return Gt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function qt(){}var Jt=null;function Yt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xt=null,Zt=null;function Qt(e){var t=ut(e);if(t&&(e=t.stateNode)){var n=e[nt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Nt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Mt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[nt]||null;if(!a)throw Error(i(90));Nt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&kt(r)}break a;case`textarea`:Lt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&It(e,!!n.multiple,t,!1)}}}var $t=!1;function en(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(Xt!==null||Zt!==null)&&(Eu(),Xt&&(t=Xt,e=Zt,Zt=Xt=null,Qt(t),e)))for(t=0;t<e.length;t++)Qt(e[t])}}function tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[nt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var nn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,"passive",{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,cn=null;function ln(){if(cn)return cn;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return cn=i.slice(e,1<r?1-r:void 0)}function un(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dn(){return!0}function fn(){return!1}function pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?dn:fn,this.isPropagationStopped=fn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=dn)},persist:function(){},isPersistent:dn}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=pn(mn),gn=f({},mn,{view:0,detail:0}),_n=pn(gn),vn,yn,bn,xn=f({},gn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==bn&&(bn&&e.type===`mousemove`?(vn=e.screenX-bn.screenX,yn=e.screenY-bn.screenY):yn=vn=0,bn=e),vn)},movementY:function(e){return`movementY`in e?e.movementY:yn}}),Sn=pn(xn),Cn=pn(f({},xn,{dataTransfer:0})),wn=pn(f({},gn,{relatedTarget:0})),Tn=pn(f({},mn,{animationName:0,elapsedTime:0,pseudoElement:0})),En=pn(f({},mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Dn=pn(f({},mn,{data:0})),On={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},kn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},An={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=An[e])?!!t[e]:!1}function Mn(){return jn}var Nn=pn(f({},gn,{key:function(e){if(e.key){var t=On[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=un(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mn,charCode:function(e){return e.type===`keypress`?un(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?un(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Pn=pn(f({},xn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Fn=pn(f({},gn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mn})),In=pn(f({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=pn(f({},xn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Rn=pn(f({},mn,{newState:0,oldState:0})),zn=[9,13,27,32],Bn=nn&&`CompositionEvent`in window,Vn=null;nn&&`documentMode`in document&&(Vn=document.documentMode);var Hn=nn&&`TextEvent`in window&&!Vn,Un=nn&&(!Bn||Vn&&8<Vn&&11>=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=ln(),cn=sn=on=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Un&&t.locale!==`ko`?null:t.data;default:return null}}var Zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Zn[e.type]:t===`textarea`}function $n(e,t,n,r){Xt?Zt?Zt.push(r):Zt=[r]:Xt=r,t=Md(t,`onChange`),0<t.length&&(n=new hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var er=null,tr=null;function nr(e){Td(e,0)}function rr(e){if(kt(dt(e)))return e}function ir(e,t){if(e===`change`)return t}var ar=!1;if(nn){var or;if(nn){var sr=`oninput`in document;if(!sr){var cr=document.createElement(`div`);cr.setAttribute(`oninput`,`return;`),sr=typeof cr.oninput==`function`}or=sr}else or=!1;ar=or&&(!document.documentMode||9<document.documentMode)}function lr(){er&&(er.detachEvent(`onpropertychange`,ur),tr=er=null)}function ur(e){if(e.propertyName===`value`&&rr(tr)){var t=[];$n(t,tr,e,Yt(e)),en(nr,t)}}function dr(e,t,n){e===`focusin`?(lr(),er=t,tr=n,er.attachEvent(`onpropertychange`,ur)):e===`focusout`&&lr()}function fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return rr(tr)}function pr(e,t){if(e===`click`)return rr(t)}function mr(e,t){if(e===`input`||e===`change`)return rr(t)}function hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var gr=typeof Object.is==`function`?Object.is:hr;function _r(e,t){if(gr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!gr(e[i],t[i]))return!1}return!0}function vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yr(e,t){var n=vr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=nn&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==At(r)||(r=Er,`selectionStart`in r&&Cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&_r(Or,r)||(Or=r,r=Md(Dr,`onSelect`),0<r.length&&(t=new hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};nn&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),gt(t,[e])}var Kr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Me(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<_u)throw _u=0,vu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function si(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=Yf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ii(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return li(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ii(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ii(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ii(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Me(r)-1;r&=~(1<<i),n+=1;var a=32-Me(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Me(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[tt]=e,t[nt]=r,n){case`dialog`:Ed(`cancel`,t),Ed(`close`,t);break;case`iframe`:case`object`:case`embed`:Ed(`load`,t);break;case`video`:case`audio`:for(n=0;n<Cd.length;n++)Ed(Cd[n],t);break;case`source`:Ed(`error`,t);break;case`img`:case`image`:case`link`:Ed(`error`,t),Ed(`load`,t);break;case`details`:Ed(`toggle`,t);break;case`input`:Ed(`invalid`,t),Pt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Ed(`invalid`,t);break;case`textarea`:Ed(`invalid`,t),Rt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ld(t.textContent,n)?(r.popover!=null&&(Ed(`beforetoggle`,t),Ed(`toggle`,t)),r.onScroll!=null&&Ed(`scroll`,t),r.onScrollEnd!=null&&Ed(`scrollend`,t),r.onClick!=null&&(t.onclick=qt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Yd(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=gf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=gf(e)}else t===27?(t=Ai,rf(e.type)?(e=hf,hf=null,Ai=e):Ai=t):Ai=ki?mf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(ru===null?ru=e:ru.push.apply(ru,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=ae(null),Ui=null,Wi=null;function Gi(e,t,n){oe(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,N(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;gr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ip]:e.push(ip))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!gr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=_d(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=j.S;j.S=function(e,t){ou=z(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=ae(null);function ga(){var e=ha.current;return e===null?Vl.pooledCache:e}function _a(e,t){t===null?oe(ha,ha.current):oe(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(qt,qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(qt,qt);else{if(e=Vl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=li(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case h:return t=fi(t,e.mode,n),t.return=e,t;case T:return t=Ta(t),f(e,t,n)}if(A(t)||ee(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===b)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ta(n),p(e,t,n,r)}if(A(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===b)return p(e,t,$i(e,n),r);Na(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ta(r),_(e,t,n,r,i)}if(A(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,ja(r),i);if(r.$$typeof===b)return _(e,t,n,$i(t,r),i);Na(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ji&&wi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return ji&&wi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),ji&&wi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ji&&wi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ji&&wi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ji&&wi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=fi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ta(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ja(o),c);if(o.$$typeof===b)return x(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=x(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var U=!1;function Wa(){if(U){var e=ua;if(e!==null)throw e}}function Ga(e,t,n,r){U=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Ul&p)===p:(r&p)===p){p!==0&&p===la&&(U=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:La=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=ae(null),Ya=ae(0);function Xa(e,t){e=Yl,oe(Ya,e),oe(Ja,t),Yl=e|t.baseLanes}function Za(){oe(Ya,Yl),oe(Ja,Ja.current)}function Qa(){Yl=Ya.current,N(Ja),N(Ya)}var $a=ae(null),eo=null;function to(e){var t=e.alternate;oe(oo,oo.current&1),oe($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){oe(oo,oo.current),oe($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(oe(oo,oo.current),oe($a,e),eo===null&&(eo=e)):io(e)}function io(){oe(oo,oo.current),oe($a,$a.current)}function ao(e){N($a),eo===e&&(eo=null),N(oo)}var oo=ae(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||df(n)||ff(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,lo=null,uo=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(i(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return co=a,lo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?zs:Bs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){j.H=Rs;var t=uo!==null&&uo.next!==null;if(co=0,fo=uo=lo=null,po=!1,_o=0,vo=null,t)throw Error(i(300));e===null||nc||(e=e.dependencies,e!==null&&Xi(e)&&(nc=!0))}function wo(e,t,n,r){lo=e;var a=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=a)throw Error(i(301));if(a+=1,fo=uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Vs,o=t(n,r)}while(mo);return o}function To(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(uo===null?null:uo.memoizedState)!==e&&(lo.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}co=0,fo=uo=lo=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?lo.memoizedState=fo=e:fo=fo.next=e,fo}function Ao(){if(uo===null){var e=lo.alternate;e=e===null?null:e.memoizedState}else e=uo.next;var t=fo===null?lo.memoizedState:fo.next;if(t!==null)fo=t,uo=e;else{if(e===null)throw lo.alternate===null?Error(i(467)):Error(i(310));uo=e,e={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},fo===null?lo.memoizedState=fo=e:fo=fo.next=e}return fo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=wa(vo,e,t),t=lo,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===b)return Qi(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=lo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=lo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=jo(),lo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(Ao(),uo,e)}function Lo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Ul&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((co&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,lo.lanes|=p,Zl|=p;f=u.action,ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,lo.lanes|=f,Zl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!gr(o,e.memoizedState)&&(nc=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ro(e){var t=Ao(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);gr(o,t.memoizedState)||(nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=lo,a=Ao(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!gr((uo||a).memoizedState,n);if(s&&(a.memoizedState=n,nc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),Vl===null)throw Error(i(349));o||co&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=lo.updateQueue,t===null?(t=jo(),lo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gr(e,n)}catch{return!0}}function Wo(e){var t=$r(e,2);t!==null&&xu(t,e,2)}function Go(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){V(!0);try{n()}finally{V(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,uo,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(ji){var n=Vl.formState;if(n!==null){a:{var r=lo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=mf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=mf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,lo,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,lo,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,lo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(Ao(),uo,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===ya?xa:e}else r=t;t=Ao();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(lo.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=Ao(),n=uo;if(n!==null)return ns(t,n,e);Ao(),t=t.memoizedState,n=Ao();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=lo.updateQueue,t===null&&(t=jo(),lo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function os(){return Ao().memoizedState}function ss(e,t,n,r){var i=ko();lo.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=Ao();r=r===void 0?null:r;var a=i.memoizedState.inst;uo!==null&&r!==null&&xo(r,uo.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(lo.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){lo.flags|=4;var t=lo.updateQueue;if(t===null)t=jo(),lo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=Ao().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(Bl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){V(!0);try{e()}finally{V(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||co&1073741824&&!(Ul&261930)?e.memoizedState=t:(e.memoizedState=n,e=bu(),lo.lanes|=e,Zl|=e,n)}function xs(e,t,n,r){return gr(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Ul&261930)?(nc=!0,e.memoizedState=n):(e=bu(),lo.lanes|=e,Zl|=e,t):(e=bs(e,n,r),gr(e,t)||(nc=!0),e)}function Ss(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,Ps(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),yu(e)):Ns(e,t,r,yu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ne,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},yu())}function Ds(){return Qi(ip)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ba(n);var r=Va(t,e,n);r!==null&&(xu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=Qr(e,t,n,r),n!==null&&(xu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,yu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Zr(e,t,i,0),Vl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return xu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:_d(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&xu(t,e,2)}function Fs(e){var t=e.alternate;return e===lo||t!==null&&t===lo}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}var Rs={readContext:Qi,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:Qi,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){V(!0);try{e()}finally{V(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){V(!0);try{n(t)}finally{V(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,lo,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,lo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,lo,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=lo,a=ko();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=Vl.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,lo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ko().memoizedState=As.bind(null,lo)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(Bl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(Ao(),uo.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(Ao(),uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=Ao();return uo===null?bs(n,e,t):xs(n,uo.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=Ao();return uo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(xu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(xu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(xu(t,e,n),Ha(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!_r(n,r)||!_r(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){Kr(e)}function Js(e){console.error(e)}function W(e){Kr(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Ba(e),e.tag=3,e}function $s(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(lu===null?lu=new Set([this]):lu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ec(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Nu():n.alternate===null&&Xl===0&&(Xl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Zu(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Zu(e,r,a)),!1}throw Error(i(435,n.tag))}return Zu(e,r,a),Nu(),!1}if(ji)return t=$a.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Zs(e.stateNode,r,a),Ua(e,a),Xl!==4&&(Xl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),nu===null?nu=[o]:nu.push(o),Xl!==4&&(Xl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Zs(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(lu===null||!lu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Qs(a),$s(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var tc=Error(i(461)),nc=!1;function rc(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ic(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!nc?(Do(e,t,i),Oc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,rc(e,t,r,i),t.child)}function ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!kc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?_r:n,n(o,r)&&e.ref===t.ref)return Oc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function oc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(_r(a,r)&&e.ref===t.ref)if(nc=!1,t.pendingProps=r=a,kc(e,i))e.flags&131072&&(nc=!0);else return t.lanes=e.lanes,Oc(e,t,i)}return mc(e,t,n,r,i)}function sc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Za(),io(t)):(_a(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return rc(e,t,i,n),t.child}function cc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Za(),ro(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function uc(e,t){return t=Cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dc(e,t,n){return Fa(t,e.child,null,n),e=uc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function fc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=uc(t,r),t.lanes=536870912,cc(null,e);if(no(t),(e=Ai)?(e=uf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a)if(t.flags&256)t.flags&=-257,t=dc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(nc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,nc||a){if(r=Vl,r!==null&&(s=Ye(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),xu(r,e,s),tc;Nu(),t=dc(e,t,n)}else e=o.treeContext,Ai=mf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=uc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mc(e,t,n,r,i){return Zi(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!nc?(Do(e,t,i),Oc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,rc(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!nc?(Do(e,t,a),Oc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,rc(e,t,n,a),t.child)}function gc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,pc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):rc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Oc(e,t,i),e}function _c(e,t,n,r){return zi(),t.flags|=256,rc(e,t,n,r),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:va()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=eu),e}function xc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ji){if(a?to(t):io(t),(e=Ai)?(e=uf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return ff(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(null,r)):(to(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,t=cc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),ff(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(nc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,nc||s){if(s=Vl,s!==null&&(r=Ye(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),xu(s,e,r),tc;df(c)||Nu(),t=wc(e,t,n)}else df(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=mf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,cc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=yc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Sc(e,t){return t=Cc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Cc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return Fa(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Ec(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,oe(oo,o),rc(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a,r);break;case`together`:Ec(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Oc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function Ac(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:I(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Oc(e,t,n),e===null?null:e.sibling):xc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(oo,oo.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Oc(e,t,n)}function jc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)nc=!0;else{if(!kc(e,n)&&!(t.flags&128))return nc=!1,Ac(e,t,n);nc=!!(e.flags&131072)}else nc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ks(e,r),t.tag=1,t=gc(null,t,e,r,n)):(t.tag=0,t=mc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=ic(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=k(e)||e,Error(i(306,t,``))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Wa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=_c(e,t,r,n);break a}else if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=_c(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ai=mf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Oc(e,t,n);break a}rc(e,t,r,n)}t=t.child}return t;case 26:return pc(e,t),e===null?(n=Ff(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Kd(P.current).createElement(n),r[tt]=t,r[nt]=e,Bd(r,n,e),pt(r),t.stateNode=r):t.memoizedState=Ff(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return I(t),e===null&&ji&&(r=t.stateNode=vf(t.type,t.pendingProps,P.current),ki=t,Ni=!0,a=Ai,rf(t.type)?(hf=a,Ai=mf(r.firstChild)):Ai=a),rc(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=cf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=mf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),I(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Yd(a,o)?r=null:s!==null&&Yd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=So(e,t,To,null,null,n),ip._currentValue=a),pc(e,t),rc(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=lf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return xc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):rc(e,t,r,n),t.child;case 11:return ic(e,t,t.type,t.pendingProps,n);case 7:return rc(e,t,t.pendingProps,n),t.child;case 8:return rc(e,t,t.pendingProps.children,n),t.child;case 12:return rc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),rc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,rc(e,t,r,n),t.child;case 14:return ac(e,t,t.type,t.pendingProps,n);case 15:return oc(e,t,t.type,t.pendingProps,n);case 19:return Dc(e,t,n);case 31:return fc(e,t,n);case 22:return sc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Vl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),rc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Mc(e){e.flags|=4}function Nc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Au())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Pc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xf(t))if(Au())e.flags|=8192;else throw Ea=Sa,ba}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ue(),e.lanes|=t,tu|=t)}function Ic(e,t){if(!ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Lc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lc(t),null;case 1:return Lc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),F(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Lc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(Lc(t),Nc(t,a,null,r,n)):(Lc(t),Pc(t,o))):o?o===e.memoizedState?(Lc(t),t.flags&=-16777217):(Mc(t),Lc(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),Lc(t),Nc(t,a,e,r,n)),null;case 27:if(de(t),n=P.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}e=se.current,Ri(t)?Ii(t,e):(e=vf(a,r,n),t.stateNode=e,Mc(t))}return Lc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Lc(t),null}if(o=se.current,Ri(t))Ii(t,o);else{var s=Kd(P.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[tt]=t,o[nt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Bd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=P.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||Fi(t,!0)}else e=Kd(e).createTextNode(r),e[tt]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[tt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[tt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Lc(t),null);case 4:return F(),e===null&&kd(t.stateNode.containerInfo),Lc(t),null;case 10:return Ki(t.type),Lc(t),null;case 19:if(N(oo),r=t.memoizedState,r===null)return Lc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return oe(oo,oo.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&z()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return Lc(t),null}else 2*z()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=z(),e.sibling=null,n=oo.current,oe(oo,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&N(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),F(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(oo),null;case 4:return F(),null;case 10:return Ki(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&N(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Bc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),F();break;case 26:case 27:case 5:de(t);break;case 4:F();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:N(oo);break;case 10:Ki(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&N(ha);break;case 24:Ki(ia)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Xu(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Xu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Xu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Xu(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Xu(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Xu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Xu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Xu(e,t,n)}else n.current=null}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Xu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Vd(r,e.type,n,t),r[nt]=t}catch(t){Xu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&rf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bd(t,r,n),t[tt]=e,t[nt]=n}catch(t){Xu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Wd=pp,e=xr(e),Cr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},pp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Xu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)sf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:sf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Vc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Xu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Xu(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Xu(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:xl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ed.bind(null,n),pf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),el=i,tl=a}break;case 30:break;default:xl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ct(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var cl=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(je&&typeof je.onCommitFiberUnmount==`function`)try{je.onCommitFiberUnmount(Ae,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=cl,i=ll;rf(n.type)&&(cl=n.stateNode,ll=!1),ul(e,t,n),yf(n.stateNode),cl=r,ll=i;break;case 5:tl||Kc(n,t);case 6:if(r=cl,i=ll,cl=null,ul(e,t,n),cl=r,ll=i,cl!==null)if(ll)try{(cl.nodeType===9?cl.body:cl.nodeName===`HTML`?cl.ownerDocument.body:cl).removeChild(n.stateNode)}catch(e){Xu(n,t,e)}else try{cl.removeChild(n.stateNode)}catch(e){Xu(n,t,e)}break;case 18:cl!==null&&(ll?(e=cl,af(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),zp(e)):af(cl,n.stateNode));break;case 4:r=cl,i=ll,cl=n.stateNode.containerInfo,ll=!0,ul(e,t,n),cl=r,ll=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ul(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ul(e,t,n),tl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{zp(e)}catch(e){Xu(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zp(e)}catch(e){Xu(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=td.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(rf(c.type)){cl=c.stateNode,ll=!1;break a}break;case 5:cl=c.stateNode,ll=!1;break a;case 3:case 4:cl=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(cl===null)throw Error(i(160));dl(o,s,a),cl=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=_l;if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[st]||o[tt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Bd(o,r,n),o[tt]=e,pt(o),r=o;break a;case`link`:var s=qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Bd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Bd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[tt]=e,pt(o),r=o}e.stateNode=r}else Jf(a,e.type,e.stateNode);else e.stateNode=Hf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Jf(a,e.type,e.stateNode):Hf(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{zt(a,``)}catch(t){Xu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Xu(e,e.return,t)}}break;case 3:if(Kf=null,a=_l,_l=Sf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zp(t.containerInfo)}catch(t){Xu(e,e.return,t)}nl&&(nl=!1,bl(e));break;case 4:r=_l,_l=Sf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(au=z()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,gl(t,e),tl=d,el=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Xu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Xu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?of(m,!0):of(l.stateNode,!1)}catch(e){Xu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(zt(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Xu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),Sl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),Sl(t);break;case 27:yf(t.stateNode);case 26:case 5:Kc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Vc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Xu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Xu(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Gc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Vc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Xu(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Zf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=Sf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Rl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,Bl=0,Vl=null,Hl=null,Ul=0,Wl=0,Gl=null,Kl=!1,ql=!1,Jl=!1,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=null,ru=null,iu=!1,au=0,ou=0,su=1/0,cu=null,lu=null,uu=0,du=null,fu=null,pu=0,mu=0,hu=null,gu=null,_u=0,vu=null;function yu(){return Bl&2&&Ul!==0?Ul&-Ul:j.T===null?Qe():_d()}function bu(){if(eu===0)if(!(Ul&536870912)||ji){var e=Le;Le<<=1,!(Le&3932160)&&(Le=262144),eu=e}else eu=536870912;return e=$a.current,e!==null&&(e.flags|=32),eu}function xu(e,t,n){(e===Vl&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)&&(Ou(e,0),Tu(e,Ul,eu,!1)),Ge(e,n),(!(Bl&2)||e!==Vl)&&(e===Vl&&(!(Bl&2)&&(Ql|=n),Xl===4&&Tu(e,Ul,eu,!1)),ld(e))}function Su(e,t,n){if(Bl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ve(e,t),a=r?Iu(e,t):Pu(e,t,!0),o=r;do{if(a===0){ql&&!r&&Tu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!wu(n)){a=Pu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=nu;var l=c.current.memoizedState.isDehydrated;if(l&&(Ou(c,s).flags|=256),s=Pu(c,s,!1),s!==2){if(Jl&&!l){c.errorRecoveryDisabledLanes|=o,Ql|=o,a=4;break a}o=ru,ru=a,o!==null&&(ru===null?ru=o:ru.push.apply(ru,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ou(e,0),Tu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Tu(r,t,eu,!Kl);break a;case 2:ru=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=au+300-z(),10<a)){if(Tu(r,t,eu,!Kl),Be(r,0,!0)!==0)break a;pu=t,r.timeoutHandle=Qd(Cu.bind(null,r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,`Throttled`,-0,0),a);break a}Cu(r,n,ru,cu,iu,t,eu,Ql,tu,Kl,o,null,-0,0)}}break}while(1);ld(e)}function Cu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qt},Ml(t,a,d);var m=(a&62914560)===a?au-z():(a&4194048)===a?ou-z():0;if(m=$f(d,m),m!==null){pu=a,e.cancelPendingCommit=m(Uu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Tu(e,a,o,!l);return}}Uu(e,t,a,n,r,i,o,s,c)}function wu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!gr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tu(e,t,n,r){t&=~$l,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Me(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&qe(e,n,t)}function Eu(){return Bl&6?!0:(ud(0,!1),!1)}function Du(){if(Hl!==null){if(Wl===0)var e=Hl.return;else e=Hl,Wi=Ui=null,Oo(e),ka=null,Aa=0,e=Hl;for(;e!==null;)Bc(e.alternate,e),e=e.return;Hl=null}}function Ou(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,$d(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),pu=0,Du(),Vl=e,Hl=n=oi(e.current,null),Ul=t,Wl=0,Gl=null,Kl=!1,ql=Ve(e,t),Jl=!1,tu=eu=$l=Ql=Zl=Xl=0,ru=nu=null,iu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Me(r),a=1<<i;t|=e[i],r&=~a}return Yl=t,Xr(),n}function ku(e,t){lo=null,j.H=Rs,t===ya||t===xa?(t=Da(),Wl=3):t===ba?(t=Da(),Wl=4):Wl=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Gl=t,Hl===null&&(Xl=1,Ys(e,mi(t,e.current)))}function Au(){var e=$a.current;return e===null?!0:(Ul&4194048)===Ul?eo===null:(Ul&62914560)===Ul||Ul&536870912?e===eo:!1}function ju(){var e=j.H;return j.H=Rs,e===null?Rs:e}function Mu(){var e=j.A;return j.A=Rl,e}function Nu(){Xl=4,Kl||(Ul&4194048)!==Ul&&$a.current!==null||(ql=!0),!(Zl&134217727)&&!(Ql&134217727)||Vl===null||Tu(Vl,Ul,eu,!1)}function Pu(e,t,n){var r=Bl;Bl|=2;var i=ju(),a=Mu();(Vl!==e||Ul!==t)&&(cu=null,Ou(e,t)),t=!1;var o=Xl;a:do try{if(Wl!==0&&Hl!==null){var s=Hl,c=Gl;switch(Wl){case 8:Du(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=Wl;if(Wl=0,Gl=null,Bu(e,s,c,l),n&&ql){o=0;break a}break;default:l=Wl,Wl=0,Gl=null,Bu(e,s,c,l)}}Fu(),o=Xl;break}catch(t){ku(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Bl=r,j.H=i,j.A=a,Hl===null&&(Vl=null,Ul=0,Xr()),o}function Fu(){for(;Hl!==null;)Ru(Hl)}function Iu(e,t){var n=Bl;Bl|=2;var r=ju(),a=Mu();Vl!==e||Ul!==t?(cu=null,su=z()+500,Ou(e,t)):ql=Ve(e,t);a:do try{if(Wl!==0&&Hl!==null){t=Hl;var o=Gl;b:switch(Wl){case 1:Wl=0,Gl=null,Bu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Wl=0,Gl=null,zu(t);break}t=function(){Wl!==2&&Wl!==9||Vl!==e||(Wl=7),ld(e)},o.then(t,t);break a;case 3:Wl=7;break a;case 4:Wl=5;break a;case 7:Ca(o)?(Wl=0,Gl=null,zu(t)):(Wl=0,Gl=null,Bu(e,t,o,7));break;case 5:var s=null;switch(Hl.tag){case 26:s=Hl.memoizedState;case 5:case 27:var c=Hl;if(s?Xf(s):c.stateNode.complete){Wl=0,Gl=null;var l=c.sibling;if(l!==null)Hl=l;else{var u=c.return;u===null?Hl=null:(Hl=u,Vu(u))}break b}}Wl=0,Gl=null,Bu(e,t,o,5);break;case 6:Wl=0,Gl=null,Bu(e,t,o,6);break;case 8:Du(),Xl=6;break a;default:throw Error(i(462))}}Lu();break}catch(t){ku(e,t)}while(1);return Wi=Ui=null,j.H=r,j.A=a,Bl=n,Hl===null?(Vl=null,Ul=0,Xr(),Xl):0}function Lu(){for(;Hl!==null&&!Se();)Ru(Hl)}function Ru(e){var t=jc(e.alternate,e,Yl);e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function zu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Ul);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Ul);break;case 5:Oo(t);default:Bc(n,t),t=Hl=si(t,Yl),t=jc(n,t,Yl)}e.memoizedProps=e.pendingProps,t===null?Vu(e):Hl=t}function Bu(e,t,n,r){Wi=Ui=null,Oo(t),ka=null,Aa=0;var i=t.return;try{if(ec(e,i,t,n,Ul)){Xl=1,Ys(e,mi(n,e.current)),Hl=null;return}}catch(t){if(i!==null)throw Hl=i,t;Xl=1,Ys(e,mi(n,e.current)),Hl=null;return}t.flags&32768?(ji||r===1?e=!0:ql||Ul&536870912?e=!1:(Kl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hu(t,e)):Vu(t)}function Vu(e){var t=e;do{if(t.flags&32768){Hu(t,Kl);return}e=t.return;var n=Rc(t.alternate,t,Yl);if(n!==null){Hl=n;return}if(t=t.sibling,t!==null){Hl=t;return}Hl=t=e}while(t!==null);Xl===0&&(Xl=5)}function Hu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,Hl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Hl=e;return}Hl=e=n}while(e!==null);Xl=6,Hl=null}function Uu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ju();while(uu!==0);if(Bl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,Ke(e,n,o,s,c,l),e===Vl&&(Hl=Vl=null,Ul=0),fu=t,du=e,pu=n,mu=o,hu=a,gu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,nd(Te,function(){return Yu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=j.T,j.T=null,a=M.p,M.p=2,s=Bl,Bl|=4;try{al(e,t,n)}finally{Bl=s,M.p=a,j.T=r}}uu=1,Wu(),Gu(),Ku()}}function Wu(){if(uu===1){uu=0;var e=du,t=fu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Bl;Bl|=4;try{vl(t,e);var a=Gd,o=xr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&br(s.ownerDocument.documentElement,s)){if(c!==null&&Cr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}pp=!!Wd,Gd=Wd=null}finally{Bl=i,M.p=r,j.T=n}}e.current=t,uu=2}}function Gu(){if(uu===2){uu=0;var e=du,t=fu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Bl;Bl|=4;try{ol(e,t.alternate,t)}finally{Bl=i,M.p=r,j.T=n}}uu=3}}function Ku(){if(uu===4||uu===3){uu=0,R();var e=du,t=fu,n=pu,r=gu;t.subtreeFlags&10256||t.flags&10256?uu=5:(uu=0,fu=du=null,qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(lu=null),Ze(n),t=t.stateNode,je&&typeof je.onCommitFiberRoot==`function`)try{je.onCommitFiberRoot(Ae,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{j.T=t,M.p=i}}pu&3&&Ju(),ld(e),i=e.pendingLanes,n&261930&&i&42?e===vu?_u++:(_u=0,vu=e):_u=0,ud(0,!1)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Ju(){return Wu(),Gu(),Ku(),Yu()}function Yu(){if(uu!==5)return!1;var e=du,t=mu;mu=0;var n=Ze(pu),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,ud(0,!1),je&&typeof je.onPostCommitFiberRoot==`function`)try{je.onPostCommitFiberRoot(Ae,o)}catch{}return!0}finally{M.p=a,j.T=r,qu(e,t)}}function G(e,t,n){t=mi(n,t),t=Zs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ge(e,2),ld(e))}function Xu(e,t,n){if(e.tag===3)G(e,e,n);else for(;t!==null;){if(t.tag===3){G(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=mi(n,e),n=Qs(2),r=Va(t,n,2),r!==null&&($s(n,r,t,e),Ge(r,2),ld(r));break}}t=t.return}}function Zu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=Qu.bind(null,e,t,n),t.then(e,e))}function Qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>z()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ld(e)}function $u(e,t){t===0&&(t=Ue()),e=$r(e,t),e!==null&&(Ge(e,t),ld(e))}function ed(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$u(e,n)}function td(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),$u(e,n)}function nd(e,t){return be(e,t)}var rd=null,id=null,ad=!1,od=!1,sd=!1,cd=0;function ld(e){e!==id&&e.next===null&&(id===null?rd=id=e:id=id.next=e),od=!0,ad||(ad=!0,gd())}function ud(e,t){if(!sd&&od){sd=!0;do for(var n=!1,r=rd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Me(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,hd(r,a))}else a=Ul,a=Be(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ve(r,a)||(n=!0,hd(r,a));r=r.next}while(n);sd=!1}}function dd(){fd()}function fd(){od=ad=!1;var e=0;cd!==0&&Zd()&&(e=cd);for(var t=z(),n=null,r=rd;r!==null;){var i=r.next,a=pd(r,t);a===0?(r.next=null,n===null?rd=i:n.next=i,i===null&&(id=n)):(n=r,(e!==0||a&3)&&(od=!0)),r=i}uu!==0&&uu!==5||ud(e,!1),cd!==0&&(cd=0)}function pd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Me(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=He(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Vl,n=Ul,n=Be(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Wl===2||Wl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ve(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),Ze(n)){case 2:case 8:n=we;break;case 32:n=Te;break;case 268435456:n=De;break;default:n=Te}return r=md.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function md(e,t){if(uu!==0&&uu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ju()&&e.callbackNode!==n)return null;var r=Ul;return r=Be(e,e===Vl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Su(e,r,t),pd(e,z()),e.callbackNode!=null&&e.callbackNode===n?md.bind(null,e):null)}function hd(e,t){if(Ju())return null;Su(e,t,!0)}function gd(){tf(function(){Bl&6?be(Ce,dd):fd()})}function _d(){if(cd===0){var e=la;e===0&&(e=Ie,Ie<<=1,!(Ie&261888)&&(Ie=256)),cd=e}return cd}function vd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Kt(``+e)}function yd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function bd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=vd((i[nt]||null).action),o=r.submitter;o&&(t=(t=o[nt]||null)?vd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(cd!==0){var e=o?yd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?yd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var xd=0;xd<Wr.length;xd++){var Sd=Wr[xd];Gr(Sd.toLowerCase(),`on`+(Sd[0].toUpperCase()+Sd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),_t(`onMouseEnter`,[`mouseout`,`mouseover`]),_t(`onMouseLeave`,[`mouseout`,`mouseover`]),_t(`onPointerEnter`,[`pointerout`,`pointerover`]),_t(`onPointerLeave`,[`pointerout`,`pointerover`]),gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Cd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),wd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Cd));function Td(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}}}}function Ed(e,t){var n=t[it];n===void 0&&(n=t[it]=new Set);var r=e+`__bubble`;n.has(r)||(K(t,e,2,!1),n.add(r))}function Dd(e,t,n){var r=0;t&&(r|=4),K(n,e,r,t)}var Od=`_reactListening`+Math.random().toString(36).slice(2);function kd(e){if(!e[Od]){e[Od]=!0,mt.forEach(function(t){t!==`selectionchange`&&(wd.has(t)||Dd(t,!1,e),Dd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Od]||(t[Od]=!0,Dd(`selectionchange`,!1,t))}}function K(e,t,n,r){switch(bp(t)){case 2:var i=mp;break;case 8:i=hp;break;default:i=gp}n=i.bind(null,t,n,e),i=void 0,!rn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ad(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=lt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}en(function(){var r=a,i=Yt(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=hn,u=e;switch(e){case`keypress`:if(un(n)===0)break a;case`keydown`:case`keyup`:l=Nn;break;case`focusin`:u=`focus`,l=wn;break;case`focusout`:u=`blur`,l=wn;break;case`beforeblur`:case`afterblur`:l=wn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Sn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Cn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Fn;break;case Ir:case Lr:case Rr:l=Tn;break;case Hr:l=In;break;case`scroll`:case`scrollend`:l=_n;break;case`wheel`:l=Ln;break;case`copy`:case`cut`:case`paste`:l=En;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Pn;break;case`toggle`:case`beforetoggle`:l=Rn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=tn(m,p),g!=null&&d.push(jd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Jt&&(u=n.relatedTarget||n.fromElement)&&(lt(u)||u[rt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?lt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Sn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Pn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:dt(l),h=u==null?c:dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,lt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=q,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Nd(s,c,l,d,!1),u!==null&&f!==null&&Nd(s,f,u,d,!0)}}a:{if(c=r?dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ir;else if(Qn(c))if(ar)v=mr;else{v=fr;var y=dr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ut(r.elementType)&&(v=ir):v=pr;if(v&&=v(e,r)){$n(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ft(c,`number`,c.value)}switch(y=r?dt(r):window,e){case`focusin`:(Qn(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Bn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Jn?Kn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Un&&n.locale!==`ko`&&(Jn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Jn&&(b=ln()):(on=i,sn=`value`in on?on.value:on.textContent,Jn=!0)),y=Md(r,x),0<y.length&&(x=new Dn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=qn(n),b!==null&&(x.data=b)))),(b=Hn?Yn(e,n):Xn(e,n))&&(x=Md(r,`onBeforeInput`),0<x.length&&(y=new Dn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),bd(s,e,r,n,i)}Td(s,t)})}function jd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Md(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=tn(e,n),i!=null&&r.unshift(jd(e,i,a)),i=tn(e,t),i!=null&&r.push(jd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function q(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=tn(n,a),l!=null&&o.unshift(jd(n,l,c))):i||(l=tn(n,a),l!=null&&o.push(jd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pd=/\r\n?/g,Fd=/\u0000|\uFFFD/g;function Id(e){return(typeof e==`string`?e:``+e).replace(Pd,`
|
|
30
|
-
`).replace(Fd,``)}function Ld(e,t){return t=Id(t),Id(e)===t}function Rd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Rd(e,t,`name`,a.name,a,null),Rd(e,t,`formEncType`,a.formEncType,a,null),Rd(e,t,`formMethod`,a.formMethod,a,null),Rd(e,t,`formTarget`,a.formTarget,a,null)):(Rd(e,t,`encType`,a.encType,a,null),Rd(e,t,`method`,a.method,a,null),Rd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ed(`beforetoggle`,e),Ed(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Wt.get(n)||n,St(e,n,r))}}function zd(e,t,n,r,a,o){switch(n){case`style`:Ht(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&zt(e,``+r);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[nt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):St(e,n,r)}}}function Bd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Ed(`error`,e),Ed(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Rd(e,t,o,s,n,null)}}a&&Rd(e,t,`srcSet`,n.srcSet,n,null),r&&Rd(e,t,`src`,n.src,n,null);return;case`input`:Ed(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Rd(e,t,r,d,n,null)}}Pt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Ed(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Rd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&It(e,!!r,n,!0):It(e,!!r,t,!1);return;case`textarea`:for(s in Ed(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Rd(e,t,s,c,n,null)}Rt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Rd(e,t,l,r,n,null)}return;case`dialog`:Ed(`beforetoggle`,e),Ed(`toggle`,e),Ed(`cancel`,e),Ed(`close`,e);break;case`iframe`:case`object`:Ed(`load`,e);break;case`video`:case`audio`:for(r=0;r<Cd.length;r++)Ed(Cd[r],e);break;case`image`:Ed(`error`,e),Ed(`load`,e);break;case`details`:Ed(`toggle`,e);break;case`embed`:case`source`:case`link`:Ed(`error`,e),Ed(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Rd(e,t,u,r,n,null)}return;default:if(Ut(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&zd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Rd(e,t,c,r,n,null))}function Vd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Rd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Rd(e,t,p,m,r,f)}}Nt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Rd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Rd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?It(e,!!n,n?[]:``,!1):It(e,!!n,t,!0)):It(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Rd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Rd(e,t,s,a,r,o)}Lt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Rd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Rd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Rd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Rd(e,t,u,p,r,m)}return;default:if(Ut(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&zd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||zd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Rd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Rd(e,t,f,p,r,m)}function Hd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ud(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Hd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Hd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Wd=null,Gd=null;function Kd(e){return e.nodeType===9?e:e.ownerDocument}function qd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Jd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Yd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xd=null;function Zd(){var e=window.event;return e&&e.type===`popstate`?e===Xd?!1:(Xd=e,!0):(Xd=null,!1)}var Qd=typeof setTimeout==`function`?setTimeout:void 0,$d=typeof clearTimeout==`function`?clearTimeout:void 0,ef=typeof Promise==`function`?Promise:void 0,tf=typeof queueMicrotask==`function`?queueMicrotask:ef===void 0?Qd:function(e){return ef.resolve(null).then(e).catch(nf)};function nf(e){setTimeout(function(){throw e})}function rf(e){return e===`head`}function af(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),zp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)yf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,yf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[st]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&yf(e.ownerDocument.body);n=i}while(n);zp(t)}function of(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function sf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:sf(n),ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function cf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[st])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=mf(e.nextSibling),e===null)break}return null}function lf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=mf(e.nextSibling),e===null))return null;return e}function uf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=mf(e.nextSibling),e===null))return null;return e}function df(e){return e.data===`$?`||e.data===`$~`}function ff(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function pf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function mf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var hf=null;function gf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return mf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function vf(e,t,n){switch(t=Kd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function yf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ct(e)}var bf=new Map,xf=new Set;function Sf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Cf=M.d;M.d={f:wf,r:Tf,D:Of,C:kf,L:Af,m:jf,X:Nf,S:Mf,M:Pf};function wf(){var e=Cf.f(),t=Eu();return e||t}function Tf(e){var t=ut(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):Cf.r(e)}var Ef=typeof document>`u`?null:document;function Df(e,t,n){var r=Ef;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xf.has(i)||(xf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Bd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Of(e){Cf.D(e),Df(`dns-prefetch`,e,null)}function kf(e,t){Cf.C(e,t),Df(`preconnect`,e,t)}function Af(e,t,n){Cf.L(e,t,n);var r=Ef;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=If(e);break;case`script`:a=Bf(e)}bf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Bd(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e,t){Cf.m(e,t);var n=Ef;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bf(e)}if(!bf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),bf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Bd(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Mf(e,t,n){Cf.S(e,t,n);var r=Ef;if(r&&e){var i=ft(r).hoistableStyles,a=If(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);pt(c),Bd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nf(e,t){Cf.X(e,t);var n=Ef;if(n&&e){var r=ft(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=f({src:e,async:!0},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),pt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t){Cf.M(e,t);var n=Ef;if(n&&e){var r=ft(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=bf.get(i))&&Gf(e,t),a=n.createElement(`script`),pt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t,n,r){var a=(a=P.current)?Sf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=If(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=If(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),bf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bf.set(e,n),o||zf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Bf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function If(e){return`href="`+Mt(e)+`"`}function Lf(e){return`link[rel="stylesheet"][`+e+`]`}function Rf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function zf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Bd(t,`link`,n),pt(t),e.head.appendChild(t))}function Bf(e){return`[src="`+Mt(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Bd(r,`style`,a),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=If(n.href);var o=e.querySelector(Lf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Rf(n),(a=bf.get(a))&&Wf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Bd(o,`link`,r),t.state.loading|=4,Uf(o,n.precedence,e),t.instance=o;case`script`:return o=Bf(n.src),(a=e.querySelector(Vf(o)))?(t.instance=a,pt(a),a):(r=n,(a=bf.get(o))&&(r=f({},n),Gf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Bd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Kf=null;function qf(e,t,n){if(Kf===null){var r=new Map,i=Kf=new Map;i.set(n,r)}else i=Kf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[st]||a[tt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=If(r.href),a=t.querySelector(Lf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Rf(r),(i=bf.get(i))&&Wf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Bd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&np(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Qf===0&&(Qf=62500*Ud());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&np(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ep.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ip={$$typeof:b,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ap(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=We(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=We(0),this.hiddenUpdates=We(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function op(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ap(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function sp(e){return e?(e=ni,e):ni}function cp(e,t,n,r,i,a){i=sp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(xu(n,e,t),Ha(n,e,t))}function lp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function up(e,t){lp(e,t),(e=e.alternate)&&lp(e,t)}function dp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&xu(t,e,67108864),up(e,67108864)}}function fp(e){if(e.tag===13||e.tag===31){var t=yu();t=Xe(t);var n=$r(e,t);n!==null&&xu(n,e,t),up(e,t)}}var pp=!0;function mp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,gp(e,t,n,r)}finally{M.p=a,j.T=i}}function hp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,gp(e,t,n,r)}finally{M.p=a,j.T=i}}function gp(e,t,n,r){if(pp){var i=_p(r);if(i===null)Ad(e,t,r,vp,n),kp(e,r);else if(jp(i,e,t,n,r))r.stopPropagation();else if(kp(e,r),t&4&&-1<Op.indexOf(e)){for(;i!==null;){var a=ut(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Me(o);s.entanglements[1]|=c,o&=~c}ld(a),!(Bl&6)&&(su=z()+500,ud(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&xu(s,a,2),Eu(),up(a,2)}if(a=_p(r),a===null&&Ad(e,t,r,vp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ad(e,t,r,null,n)}}function _p(e){return e=Yt(e),yp(e)}var vp=null;function yp(e){if(vp=null,e=lt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vp=e,null}function bp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(B()){case Ce:return 2;case we:return 8;case Te:case Ee:return 32;case De:return 268435456;default:return 32}default:return 32}}var xp=!1,Sp=null,Cp=null,wp=null,Tp=new Map,Ep=new Map,Dp=[],Op=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function kp(e,t){switch(e){case`focusin`:case`focusout`:Sp=null;break;case`dragenter`:case`dragleave`:Cp=null;break;case`mouseover`:case`mouseout`:wp=null;break;case`pointerover`:case`pointerout`:Tp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ep.delete(t.pointerId)}}function Ap(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ut(t),t!==null&&dp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function jp(e,t,n,r,i){switch(t){case`focusin`:return Sp=Ap(Sp,e,t,n,r,i),!0;case`dragenter`:return Cp=Ap(Cp,e,t,n,r,i),!0;case`mouseover`:return wp=Ap(wp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Tp.set(a,Ap(Tp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ep.set(a,Ap(Ep.get(a)||null,e,t,n,r,i)),!0}return!1}function Mp(e){var t=lt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,$e(e.priority,function(){fp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,$e(e.priority,function(){fp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Np(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_p(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jt=r,n.target.dispatchEvent(r),Jt=null}else return t=ut(n),t!==null&&dp(t),e.blockedOn=n,!1;t.shift()}return!0}function Pp(e,t,n){Np(e)&&n.delete(t)}function Fp(){xp=!1,Sp!==null&&Np(Sp)&&(Sp=null),Cp!==null&&Np(Cp)&&(Cp=null),wp!==null&&Np(wp)&&(wp=null),Tp.forEach(Pp),Ep.forEach(Pp)}function Ip(e,n){e.blockedOn===n&&(e.blockedOn=null,xp||(xp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Fp)))}var Lp=null;function Rp(e){Lp!==e&&(Lp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Lp===e&&(Lp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(yp(r||n)===null)continue;break}var a=ut(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function zp(e){function t(t){return Ip(t,e)}Sp!==null&&Ip(Sp,e),Cp!==null&&Ip(Cp,e),wp!==null&&Ip(wp,e),Tp.forEach(t),Ep.forEach(t);for(var n=0;n<Dp.length;n++){var r=Dp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Dp.length&&(n=Dp[0],n.blockedOn===null);)Mp(n),n.blockedOn===null&&Dp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[nt]||null;if(typeof a==`function`)o||Rp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[nt]||null)s=o.formAction;else if(yp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Rp(n)}}}function Bp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Vp(e){this._internalRoot=e}Hp.prototype.render=Vp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;cp(n,yu(),e,t,null,null)},Hp.prototype.unmount=Vp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cp(e.current,2,null,e,null,null),Eu(),t[rt]=null}};function Hp(e){this._internalRoot=e}Hp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dp.length&&t!==0&&t<Dp[n].priority;n++);Dp.splice(n,0,e),n===0&&Mp(e)}};var Up=n.version;if(Up!==`19.2.8`)throw Error(i(527,Up,`19.2.8`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Wp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Gp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gp.isDisabled&&Gp.supportsFiber)try{Ae=Gp.inject(Wp),je=Gp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=W;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=op(e,1,!1,null,null,n,r,null,o,s,c,Bp),e[rt]=t.current,kd(e),new Vp(t)}})),Er=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Tr()})),Dr={black:`#000`,white:`#fff`},Or={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},kr={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},Ar={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},jr={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},Mr={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`},Nr={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},Pr={50:`#efebe9`,100:`#d7ccc8`,200:`#bcaaa4`,300:`#a1887f`,400:`#8d6e63`,500:`#795548`,600:`#6d4c41`,700:`#5d4037`,800:`#4e342e`,900:`#3e2723`,A100:`#d7ccc8`,A200:`#bcaaa4`,A400:`#8d6e63`,A700:`#5d4037`},Fr={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`};function Ir(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var Lr=`$$material`;function Rr(){return Rr=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},Rr.apply(null,arguments)}function zr(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Br(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var Vr=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(Br(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=zr(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Hr=`-ms-`,Ur=`-moz-`,Wr=`-webkit-`,Gr=`comm`,Kr=`rule`,qr=`decl`,Jr=`@import`,Yr=`@keyframes`,Xr=`@layer`,Zr=Math.abs,Qr=String.fromCharCode,$r=Object.assign;function ei(e,t){return ai(e,0)^45?(((t<<2^ai(e,0))<<2^ai(e,1))<<2^ai(e,2))<<2^ai(e,3):0}function ti(e){return e.trim()}function ni(e,t){return(e=t.exec(e))?e[0]:e}function ri(e,t,n){return e.replace(t,n)}function ii(e,t){return e.indexOf(t)}function ai(e,t){return e.charCodeAt(t)|0}function oi(e,t,n){return e.slice(t,n)}function si(e){return e.length}function ci(e){return e.length}function li(e,t){return t.push(e),e}function ui(e,t){return e.map(t).join(``)}var di=1,fi=1,pi=0,mi=0,hi=0,gi=``;function _i(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:di,column:fi,length:o,return:``}}function vi(e,t){return $r(_i(``,null,null,``,null,null,0),e,{length:-e.length},t)}function yi(){return hi}function bi(){return hi=mi>0?ai(gi,--mi):0,fi--,hi===10&&(fi=1,di--),hi}function xi(){return hi=mi<pi?ai(gi,mi++):0,fi++,hi===10&&(fi=1,di++),hi}function Si(){return ai(gi,mi)}function Ci(){return mi}function wi(e,t){return oi(gi,e,t)}function Ti(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ei(e){return di=fi=1,pi=si(gi=e),mi=0,[]}function Di(e){return gi=``,e}function Oi(e){return ti(wi(mi-1,ji(e===91?e+2:e===40?e+1:e)))}function ki(e){for(;(hi=Si())&&hi<33;)xi();return Ti(e)>2||Ti(hi)>3?``:` `}function Ai(e,t){for(;--t&&xi()&&!(hi<48||hi>102||hi>57&&hi<65||hi>70&&hi<97););return wi(e,Ci()+(t<6&&Si()==32&&xi()==32))}function ji(e){for(;xi();)switch(hi){case e:return mi;case 34:case 39:e!==34&&e!==39&&ji(hi);break;case 40:e===41&&ji(e);break;case 92:xi();break}return mi}function Mi(e,t){for(;xi()&&e+hi!==57&&!(e+hi===84&&Si()===47););return`/*`+wi(t,mi-1)+`*`+Qr(e===47?e:xi())}function Ni(e){for(;!Ti(Si());)xi();return wi(e,mi)}function Pi(e){return Di(Fi(``,null,null,null,[``],e=Ei(e),0,[0],e))}function Fi(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=xi()){case 40:if(m!=108&&ai(C,d-1)==58){ii(C+=ri(Oi(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Oi(v);break;case 9:case 10:case 13:case 32:C+=ki(m);break;case 92:C+=Ai(Ci()-1,7);continue;case 47:switch(Si()){case 42:case 47:li(Li(Mi(xi(),Ci()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=si(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=ri(C,/\f/g,``)),p>0&&si(C)-d&&li(p>32?Ri(C+`;`,r,n,d-1):Ri(ri(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(li(S=Ii(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)Fi(C,t,S,S,b,a,d,s,x);else switch(f===99&&ai(C,3)===110?100:f){case 100:case 108:case 109:case 115:Fi(e,S,S,r&&li(Ii(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Fi(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+si(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&bi()==125)continue}switch(C+=Qr(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(si(C)-1)*_,_=1;break;case 64:Si()===45&&(C+=Oi(xi())),f=Si(),u=d=si(y=C+=Ni(Ci())),v++;break;case 45:m===45&&si(C)==2&&(h=0)}}return a}function Ii(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=ci(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=oi(e,d+1,d=Zr(h=o[m])),y=e;_<p;++_)(y=ti(h>0?f[_]+` `+v:ri(v,/&\f/g,f[_])))&&(c[g++]=y);return _i(e,t,n,i===0?Kr:s,c,l,u)}function Li(e,t,n){return _i(e,t,n,Gr,Qr(yi()),oi(e,2,-2),0)}function Ri(e,t,n,r){return _i(e,t,n,qr,oi(e,0,r),oi(e,r+1,-1),r)}function zi(e,t){for(var n=``,r=ci(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Bi(e,t,n,r){switch(e.type){case Xr:if(e.children.length)break;case Jr:case qr:return e.return=e.return||e.value;case Gr:return``;case Yr:return e.return=e.value+`{`+zi(e.children,r)+`}`;case Kr:e.value=e.props.join(`,`)}return si(n=zi(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Vi(e){var t=ci(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Hi(e){return function(t){t.root||(t=t.return)&&e(t)}}function Ui(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Wi=function(e,t,n){for(var r=0,i=0;r=i,i=Si(),r===38&&i===12&&(t[n]=1),!Ti(i);)xi();return wi(e,mi)},Gi=function(e,t){var n=-1,r=44;do switch(Ti(r)){case 0:r===38&&Si()===12&&(t[n]=1),e[n]+=Wi(mi-1,t,n);break;case 2:e[n]+=Oi(r);break;case 4:if(r===44){e[++n]=Si()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=Qr(r)}while(r=xi());return e},Ki=function(e,t){return Di(Gi(Ei(e),t))},qi=new WeakMap,Ji=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!qi.get(n))&&!r){qi.set(e,!0);for(var i=[],a=Ki(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},Yi=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function Xi(e,t){switch(ei(e,t)){case 5103:return Wr+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Wr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Wr+e+Ur+e+Hr+e+e;case 6828:case 4268:return Wr+e+Hr+e+e;case 6165:return Wr+e+Hr+`flex-`+e+e;case 5187:return Wr+e+ri(e,/(\w+).+(:[^]+)/,Wr+`box-$1$2`+Hr+`flex-$1$2`)+e;case 5443:return Wr+e+Hr+`flex-item-`+ri(e,/flex-|-self/,``)+e;case 4675:return Wr+e+Hr+`flex-line-pack`+ri(e,/align-content|flex-|-self/,``)+e;case 5548:return Wr+e+Hr+ri(e,`shrink`,`negative`)+e;case 5292:return Wr+e+Hr+ri(e,`basis`,`preferred-size`)+e;case 6060:return Wr+`box-`+ri(e,`-grow`,``)+Wr+e+Hr+ri(e,`grow`,`positive`)+e;case 4554:return Wr+ri(e,/([^-])(transform)/g,`$1`+Wr+`$2`)+e;case 6187:return ri(ri(ri(e,/(zoom-|grab)/,Wr+`$1`),/(image-set)/,Wr+`$1`),e,``)+e;case 5495:case 3959:return ri(e,/(image-set\([^]*)/,Wr+"$1$`$1");case 4968:return ri(ri(e,/(.+:)(flex-)?(.*)/,Wr+`box-pack:$3`+Hr+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+Wr+e+e;case 4095:case 3583:case 4068:case 2532:return ri(e,/(.+)-inline(.+)/,Wr+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(si(e)-1-t>6)switch(ai(e,t+1)){case 109:if(ai(e,t+4)!==45)break;case 102:return ri(e,/(.+:)(.+)-([^]+)/,`$1`+Wr+`$2-$3$1`+Ur+(ai(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~ii(e,`stretch`)?Xi(ri(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(ai(e,t+1)!==115)break;case 6444:switch(ai(e,si(e)-3-(~ii(e,`!important`)&&10))){case 107:return ri(e,`:`,`:`+Wr)+e;case 101:return ri(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+Wr+(ai(e,14)===45?`inline-`:``)+`box$3$1`+Wr+`$2$3$1`+Hr+`$2box$3`)+e}break;case 5936:switch(ai(e,t+11)){case 114:return Wr+e+Hr+ri(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Wr+e+Hr+ri(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Wr+e+Hr+ri(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return Wr+e+Hr+e+e}return e}var Zi=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case qr:e.return=Xi(e.value,e.length);break;case Yr:return zi([vi(e,{value:ri(e.value,`@`,`@`+Wr)})],r);case Kr:if(e.length)return ui(e.props,function(t){switch(ni(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return zi([vi(e,{props:[ri(t,/:(read-\w+)/,`:`+Ur+`$1`)]})],r);case`::placeholder`:return zi([vi(e,{props:[ri(t,/:(plac\w+)/,`:`+Wr+`input-$1`)]}),vi(e,{props:[ri(t,/:(plac\w+)/,`:`+Ur+`$1`)]}),vi(e,{props:[ri(t,/:(plac\w+)/,Hr+`input-$1`)]})],r)}return``})}}],Qi=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||Zi,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[Ji,Yi],l,u=[Bi,Hi(function(e){l.insert(e)})],d=Vi(c.concat(r,u)),f=function(e){return zi(Pi(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Vr({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},$i=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),ea=o(((e,t)=>{t.exports=$i()})),ta=o(((e,t)=>{var n=ea(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function na(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var ra=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},ia=function(e,t,n){ra(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function aa(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var oa={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},sa=/[A-Z]|^ms/g,ca=/_EMO_([^_]+?)_([^]*?)_EMO_/g,la=function(e){return e.charCodeAt(1)===45},ua=function(e){return e!=null&&typeof e!=`boolean`},da=Ui(function(e){return la(e)?e:e.replace(sa,`-$&`).toLowerCase()}),fa=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(ca,function(e,t,n){return ga={name:t,styles:n,next:ga},t})}return oa[e]!==1&&!la(e)&&typeof t==`number`&&t!==0?t+`px`:t};function pa(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return ga={name:i.name,styles:i.styles,next:ga},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)ga={name:o.name,styles:o.styles,next:ga},o=o.next;return a.styles+`;`}return ma(e,t,n);case`function`:if(e!==void 0){var s=ga,c=n(e);return ga=s,pa(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function ma(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=pa(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:ua(s)&&(r+=da(a)+`:`+fa(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)ua(o[c])&&(r+=da(a)+`:`+fa(a,o[c])+`;`);else{var l=pa(e,t,o);switch(a){case`animation`:case`animationName`:r+=da(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var ha=/label:\s*([^\s;{]+)\s*(;|$)/g,ga;function _a(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;ga=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=pa(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=pa(n,t,e[o]),r&&(i+=a[o]);ha.lastIndex=0;for(var s=``,c;(c=ha.exec(i))!==null;)s+=`-`+c[1];return{name:aa(i)+s,styles:i,next:ga}}var va=function(e){return e()},ya=L.useInsertionEffect?L.useInsertionEffect:!1,ba=ya||va,xa=ya||L.useLayoutEffect,Sa=L.createContext(typeof HTMLElement<`u`?Qi({key:`css`}):null);Sa.Provider;var Ca=function(e){return(0,L.forwardRef)(function(t,n){return e(t,(0,L.useContext)(Sa),n)})},wa=L.createContext({}),Ta={}.hasOwnProperty,Ea=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Da=function(e,t){var n={};for(var r in t)Ta.call(t,r)&&(n[r]=t[r]);return n[Ea]=e,n},Oa=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ra(t,n,r),ba(function(){return ia(t,n,r)}),null},ka=Ca(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Ea],a=[r],o=``;typeof e.className==`string`?o=na(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=_a(a,void 0,L.useContext(wa));o+=t.key+`-`+s.name;var c={};for(var l in e)Ta.call(e,l)&&l!==`css`&&l!==Ea&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),L.createElement(L.Fragment,null,L.createElement(Oa,{cache:t,serialized:s,isStringTag:typeof i==`string`}),L.createElement(i,c))});ta();var Aa=function(e,t){var n=arguments;if(t==null||!Ta.call(t,`css`))return L.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=ka,i[1]=Da(e,t);for(var a=2;a<r;a++)i[a]=n[a];return L.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(Aa||={});var ja=Ca(function(e,t){var n=e.styles,r=_a([n],void 0,L.useContext(wa)),i=L.useRef();return xa(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),xa(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&ia(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function Ma(){return _a([...arguments])}function Na(){var e=Ma.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var Pa=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Fa=Ui(function(e){return Pa.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ia=function(e){return e!==`theme`},La=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?Fa:Ia},Ra=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},za=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ra(t,n,r),ba(function(){return ia(t,n,r)}),null},Ba=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=Ra(t,n,r),c=s||La(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=Ca(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=L.useContext(wa)}typeof e.className==`string`?a=na(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=_a(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?La(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),L.createElement(L.Fragment,null,L.createElement(za,{cache:t,serialized:m,isStringTag:typeof r==`string`}),L.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,Rr({},n,r,{shouldForwardProp:Ra(h,r,!0)})).apply(void 0,d)},h}},Va=`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.marquee.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`.split(`.`),Ha=Ba.bind(null);Va.forEach(function(e){Ha[e]=Ha(e)});var Ua=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),U=o(((e,t)=>{t.exports=Ua()}))();function Wa(e){return e==null||Object.keys(e).length===0}function Ga(e){let{styles:t,defaultTheme:n={}}=e;return(0,U.jsx)(ja,{styles:typeof t==`function`?e=>t(Wa(e)?n:e):t})}function Ka(e,t){return Ha(e,t)}function qa(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Ja=[];function Ya(e){return Ja[0]=e,_a(Ja)}var Xa=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),Za=o(((e,t)=>{t.exports=Xa()}))();function Qa(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $a(e){if(L.isValidElement(e)||(0,Za.isValidElementType)(e)||!Qa(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=$a(e[n])}),t}function eo(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return Qa(e)&&Qa(t)&&Object.keys(t).forEach(i=>{L.isValidElement(t[i])||(0,Za.isValidElementType)(t[i])?r[i]=t[i]:Qa(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Qa(e[i])?r[i]=eo(e[i],t[i],n):n.clone?r[i]=Qa(t[i])?$a(t[i]):t[i]:r[i]=t[i]}),r}var to=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function no(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=to(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}let f=[];for(let e=0;e<o.length;e+=1)f.push(s(o[e]));return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,internal_mediaKeys:f,...i}}var ro=/min-width:\s*([0-9.]+)/;function io(e,t){if(!e.containerQueries||!ao(t))return t;let n=[];for(let e in t)e.startsWith(`@container`)&&n.push(e);n.sort((e,t)=>(e.match(ro)?.[1]||0)-+(t.match(ro)?.[1]||0));let r=t;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[t];delete r[t],r[t]=i}return r}function ao(e){for(let t in e)if(t.startsWith(`@container`))return!0;return!1}function oo(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function so(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function co(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var lo={borderRadius:4};function uo(e){if(e==null)return!0;for(let t in e)return!1;return!0}function fo(e,t){let n=Array.isArray(t),r=Array.isArray(e);return _o(t)?t:vo(e)?yo(t):n&&r?ho(e,t):n===r?bo(e,t):yo(t)}function po(e){let t=0,n=e.length,r=Array(n);for(t=0;t<n;t+=1)r[t]=yo(e[t]);return r}function mo(e){let t={};for(let n in e)n===`__proto__`||n===`constructor`||n===`prototype`||(t[n]=yo(e[n]));return t}function ho(e,t){let n=e.length;for(let r=0;r<t.length;r+=1)e[n+r]=yo(t[r]);return e}function go(e){return typeof e==`object`&&!!e&&!(e instanceof RegExp)&&!(e instanceof Date)}function _o(e){return typeof e!=`object`||!e}function vo(e){return typeof e!=`object`||!e||e instanceof RegExp||e instanceof Date}function yo(e){return go(e)?Array.isArray(e)?po(e):mo(e):e}function bo(e,t){for(let n in t)n===`__proto__`||n===`constructor`||n===`prototype`||(n in e?e[n]=fo(e[n],t[n]):e[n]=yo(t[n]));return e}var xo={},So={xs:0,sm:600,md:900,lg:1200,xl:1536},Co=no({values:So}),wo={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:So[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function To(e,t,n){let r={};return Eo(r,e.theme,t,(e,t,i)=>{let a=n(t,i);e?r[e]=a:fo(r,a)})}function Eo(e,t,n,r){if(t??=xo,Array.isArray(n)){let i=t.breakpoints??Co;for(let t=0;t<n.length;t+=1)Do(e,i.up(i.keys[t]),n[t],void 0,r);return e}if(typeof n==`object`){let i=t.breakpoints??Co,a=i.values??So;for(let o in n)if(oo(i.keys,o)){let i=so(t.containerQueries?t:wo,o);i&&Do(e,i,n[o],o,r)}else if(o in a)Do(e,i.up(o),n[o],o,r);else{let t=o;e[t]=n[t]}return e}return r(void 0,n),e}function Do(e,t,n,r,i){e[t]??={},i(t,n,r)}function Oo(e=Co){let{internal_mediaKeys:t}=e,n={};for(let e=0;e<t.length;e+=1)n[t[e]]={};return n}function ko(e,t){let n=e.internal_mediaKeys;for(let e=0;e<n.length;e+=1){let r=n[e];uo(t[r])&&delete t[r]}return t}function Ao(e,...t){return ko(e,[Oo(e),...t].reduce((e,t)=>eo(e,t),{}))}function jo(e,t){if(typeof e!=`object`)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{e[t]!=null&&(n[t]=!0)}),n}function Mo(e){let{values:t,breakpoints:n,base:r}=e,i=r||jo(t,n),a=Object.keys(i);if(a.length===0)return t;let o;return a.reduce((e,n,r)=>{if(Array.isArray(t))e[n]=t[r]==null?t[o]:t[r],o=r;else if(typeof t==`object`&&t){let r=t;e[n]=r[n]==null?r[o]:r[n],o=n}else e[n]=t;return e},{})}function No(e,t){if(Array.isArray(t))return!0;if(typeof t==`object`&&t){for(let n=0;n<e.keys.length;n+=1)if(e.keys[n]in t)return!0;let n=Object.keys(t);for(let t=0;t<n.length;t+=1)if(oo(e.keys,n[t]))return!0}return!1}function Po(e){if(typeof e!=`string`)throw Error(Ir(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Fo(e,t,n,r){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||n:typeof n==`string`&&Io(e,n,!0,r)||n,t&&(i=t(i,n,e)),i}function Io(e,t,n=!0,r=void 0){if(!e||!t)return null;let i=t.split(`.`);if(e.vars&&n){let t=Lo(e.vars,i,r);if(t!=null)return t}return Lo(e,i,r)}function Lo(e,t,n=void 0){let r,i=e,a=0;for(;a<t.length;){if(i==null)return i;r=i,i=i[t[a]],a+=1}if(n&&i===void 0){let e=t[t.length-1],i=`${n}${e==="default"?``:Po(e)}`;return r?.[i]}return i}function Ro(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=Io(o,r)||{};return To(e,a,e=>{let r=Fo(s,i,e,t);return n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}var zo={internal_cache:{}},Bo={m:`margin`,p:`padding`},Vo={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},Ho={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Uo={};for(let e in Bo)Uo[e]=[Bo[e]];for(let e in Bo)for(let t in Vo){let n=Bo[e],r=Vo[t],i=Array.isArray(r)?r.map(e=>n+e):[n+r];Uo[e+t]=i}for(let e in Ho)Uo[e]=Uo[Ho[e]];var Wo=new Set([`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`]),Go=new Set([`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`]),Ko=new Set([...Wo,...Go]);function qo(e,t,n,r){let i=Io(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function Jo(e){return qo(e,`spacing`,8,`spacing`)}function Yo(e,t){return typeof t==`string`||t==null?t:e(t)}var Xo=[``];function Zo(e,t){let n=e.theme??zo,r=n?.internal_cache?.unarySpacing??Jo(n),i={};for(let n in e){if(!t.has(n))continue;let a=Uo[n]??(Xo[0]=n,Xo),o=e[n];Eo(i,e.theme,o,(e,t)=>{let n=e?i[e]:i;for(let e=0;e<a.length;e+=1)n[a[e]]=Yo(r,t)})}return i}function Qo(e){return Zo(e,Wo)}Qo.propTypes={},Qo.filterProps=Wo;var $o=Qo;function es(e){return Zo(e,Go)}es.propTypes={},es.filterProps=Go;var ts=es;function ns(e){return Zo(e,Ko)}ns.propTypes={},ns.filterProps=Ko;function rs(e=8,t=Jo({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function is(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>{let n={};for(let r in e)t[r]&&fo(n,t[r](e));return n};return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function as(e){return typeof e==`number`?`${e}px solid`:e}function os(e,t){return Ro({prop:e,themeKey:`borders`,transform:t})}var ss=os(`border`,as),cs=os(`borderTop`,as),ls=os(`borderRight`,as),us=os(`borderBottom`,as),ds=os(`borderLeft`,as),fs=os(`borderColor`),ps=os(`borderTopColor`),ms=os(`borderRightColor`),hs=os(`borderBottomColor`),gs=os(`borderLeftColor`),_s=os(`outline`,as),vs=os(`outlineColor`),ys=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=qo(e.theme,`shape.borderRadius`,4,`borderRadius`);return To(e,e.borderRadius,e=>({borderRadius:Yo(t,e)}))}return null};ys.propTypes={},ys.filterProps=[`borderRadius`],is(ss,cs,ls,us,ds,fs,ps,ms,hs,gs,ys,_s,vs);var bs=e=>{if(e.gap!==void 0&&e.gap!==null){let t=qo(e.theme,`spacing`,8,`gap`);return To(e,e.gap,e=>({gap:Yo(t,e)}))}return null};bs.propTypes={},bs.filterProps=[`gap`];var xs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=qo(e.theme,`spacing`,8,`columnGap`);return To(e,e.columnGap,e=>({columnGap:Yo(t,e)}))}return null};xs.propTypes={},xs.filterProps=[`columnGap`];var Ss=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=qo(e.theme,`spacing`,8,`rowGap`);return To(e,e.rowGap,e=>({rowGap:Yo(t,e)}))}return null};Ss.propTypes={},Ss.filterProps=[`rowGap`],is(bs,xs,Ss,Ro({prop:`gridColumn`}),Ro({prop:`gridRow`}),Ro({prop:`gridAutoFlow`}),Ro({prop:`gridAutoColumns`}),Ro({prop:`gridAutoRows`}),Ro({prop:`gridTemplateColumns`}),Ro({prop:`gridTemplateRows`}),Ro({prop:`gridTemplateAreas`}),Ro({prop:`gridArea`}));function Cs(e,t){return t===`grey`?t:e}is(Ro({prop:`color`,themeKey:`palette`,transform:Cs}),Ro({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Cs}),Ro({prop:`backgroundColor`,themeKey:`palette`,transform:Cs}));var ws=So;function Ts(e){return e<=1&&e!==0?`${e*100}%`:e}var Es=Ro({prop:`width`,transform:Ts}),Ds=e=>e.maxWidth!==void 0&&e.maxWidth!==null?To(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||ws[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Ts(t)}}):null;Ds.filterProps=[`maxWidth`];var Os=Ro({prop:`minWidth`,transform:Ts}),ks=Ro({prop:`height`,transform:Ts}),As=Ro({prop:`maxHeight`,transform:Ts}),js=Ro({prop:`minHeight`,transform:Ts});Ro({prop:`size`,cssProperty:`width`,transform:Ts}),Ro({prop:`size`,cssProperty:`height`,transform:Ts}),is(Es,Ds,Os,ks,As,js,Ro({prop:`boxSizing`}));var Ms={border:{themeKey:`borders`,transform:as},borderTop:{themeKey:`borders`,transform:as},borderRight:{themeKey:`borders`,transform:as},borderBottom:{themeKey:`borders`,transform:as},borderLeft:{themeKey:`borders`,transform:as},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:as},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:ys},color:{themeKey:`palette`,transform:Cs},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Cs},backgroundColor:{themeKey:`palette`,transform:Cs},p:{style:ts},pt:{style:ts},pr:{style:ts},pb:{style:ts},pl:{style:ts},px:{style:ts},py:{style:ts},padding:{style:ts},paddingTop:{style:ts},paddingRight:{style:ts},paddingBottom:{style:ts},paddingLeft:{style:ts},paddingX:{style:ts},paddingY:{style:ts},paddingInline:{style:ts},paddingInlineStart:{style:ts},paddingInlineEnd:{style:ts},paddingBlock:{style:ts},paddingBlockStart:{style:ts},paddingBlockEnd:{style:ts},m:{style:$o},mt:{style:$o},mr:{style:$o},mb:{style:$o},ml:{style:$o},mx:{style:$o},my:{style:$o},margin:{style:$o},marginTop:{style:$o},marginRight:{style:$o},marginBottom:{style:$o},marginLeft:{style:$o},marginX:{style:$o},marginY:{style:$o},marginInline:{style:$o},marginInlineStart:{style:$o},marginInlineEnd:{style:$o},marginBlock:{style:$o},marginBlockStart:{style:$o},marginBlockEnd:{style:$o},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:bs},rowGap:{style:Ss},columnGap:{style:xs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Ts},maxWidth:{style:Ds},minWidth:{transform:Ts},height:{transform:Ts},maxHeight:{transform:Ts},minHeight:{transform:Ts},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}},Ns={};function Ps(){function e(t){if(!t.sx)return null;let{sx:n,theme:r=Ns,nested:i}=t,a=r.unstable_sxConfig??Ms,o={sx:null,theme:r,nested:!0};function s(n){let s=n;if(typeof n==`function`)s=n(r);else if(typeof n!=`object`)return n;if(!s)return null;let c=r.breakpoints??Co,l=Oo(c);for(let n in s){let i=Ls(s[n],r);if(i!=null){if(typeof i!=`object`){Is(l,n,i,r,a);continue}if(a[n]){Is(l,n,i,r,a);continue}No(c,i)?Eo(l,t.theme,i,(e,t)=>{l[e][n]=t}):(o.sx=i,l[n]=e(o))}}return!i&&r.modularCssLayers?{"@layer sx":io(r,ko(c,l))}:io(r,ko(c,l))}return Array.isArray(n)?n.map(s):s(n)}return e.filterProps=[`sx`],e}var Fs=Ps();function Is(e,t,n,r,i){let a=i[t];if(!a){e[t]=n;return}if(n==null)return;let{themeKey:o}=a;if(o===`typography`&&n===`inherit`){e[t]=n;return}let{style:s}=a;if(s){fo(e,s({[t]:n,theme:r}));return}let{cssProperty:c=t,transform:l}=a,u=Io(r,o);Eo(e,r,n,(n,r)=>{let i=Fo(u,l,r,t);c===!1?fo(n?e[n]:e,i):n?e[n][c]=i:e[c]=i})}function Ls(e,t){return typeof e==`function`?e(t):e}function Rs(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function zs(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=no(n),c=rs(i),l=eo({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...lo,...a}},o);return l=co(l),l.applyStyles=Rs,l=t.reduce((e,t)=>eo(e,t),l),l.unstable_sxConfig={...Ms,...o?.unstable_sxConfig},l.unstable_sx=function(e){return Fs({sx:e,theme:this})},l.internal_cache={},l}function Bs(e){return Object.keys(e).length===0}function Vs(e=null){let t=L.useContext(wa);return!t||Bs(t)?e:t}var Hs=zs();function Us(e=Hs){return Vs(e)}function Ws(e){let t=Ya(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Gs({styles:e,themeId:t,defaultTheme:n={}}){let r=Us(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Ws(typeof e==`function`?e(i):e)):Ws(a)),(0,U.jsx)(Ga,{styles:a})}var Ks=e=>e,qs=(()=>{let e=Ks;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ks}}})();function Js(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Js(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function W(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Js(e))&&(r&&(r+=` `),r+=t);return r}function Ys(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=Ka(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(Fs);return L.forwardRef(function(e,o){let s=Us(n),{className:c,component:l=`div`,...u}=e;return(0,U.jsx)(a,{as:l,ref:o,className:W(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var Xs={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Zs(e,t,n=`Mui`){let r=Xs[t];return r?`${n}-${r}`:`${qs.generate(e)}-${t}`}function Qs(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Zs(e,t,n)}),r}function $s(e){let{variants:t,...n}=e,r={variants:t,style:Ya(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Ya(e.style))}),r}var ec=zs();function tc(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function nc(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function rc(e){return e?(t,n)=>n[e]:null}function ic(e,t,n){e.theme=uo(e.theme)?n:e.theme[t]||e.theme}function ac(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>ac(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?nc(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?nc(Ya(i),n):i}return oc(e,r.variants,[t],n)}return r?.isProcessed?n?nc(Ya(r.style),n):r.style:n?nc(Ya(r),n):r}function oc(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?nc(Ya(o.style(i)),r):o.style(i))):n.push(r?nc(Ya(o.style),r):o.style)}return n}function sc(e={}){let{themeId:t,defaultTheme:n=ec,rootShouldForwardProp:r=tc,slotShouldForwardProp:i=tc}=e;function a(e){ic(e,t,n)}return(e,t={})=>{qa(e,e=>e.filter(e=>e!==Fs));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=rc(lc(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=tc;o===`Root`||o===`root`?m=r:o?m=i:cc(e)&&(m=void 0);let h=Ka(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return ac(t,e,t.theme.modularCssLayers?d:void 0)};if(Qa(e)){let t=$s(e);return function(e){return t.variants?ac(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?nc(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=ac(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?oc(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(Fs),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function cc(e){return typeof e==`string`&&e.charCodeAt(0)>96}function lc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var uc=sc();function dc(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=dc(i[t],o[t],n)}}}else a===`className`&&n&&t.className!==void 0?r.className=W(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function fc(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:dc(t.components[n].defaultProps,r)}function pc(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,a=Us(r);return i&&(a=a[i]||a),fc({theme:a,name:n,props:t})}var mc=typeof window<`u`?L.useLayoutEffect:L.useEffect;function hc(e,t,n,r,i){let[a,o]=L.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return mc(()=>{if(!n)return;let t=n(e),r=()=>{o(t.matches)};return r(),t.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r)}},[e,n]),a}var gc={...L}.useSyncExternalStore;function _c(e,t,n,r,i){let a=L.useCallback(()=>t,[t]),o=L.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(r!==null){let{matches:t}=r(e);return()=>t}return a},[a,e,r,i,n]),[s,c]=L.useMemo(()=>{if(n===null)return[a,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[a,n,e]);return gc(c,s,o)}function vc(e={}){let{themeId:t}=e;return function(e,n={}){let r=Vs();r&&t&&(r=r[t]||r);let i=typeof window<`u`&&window.matchMedia!==void 0?window.matchMedia:null,{defaultMatches:a=!1,matchMedia:o,ssrMatchMedia:s=null,noSsr:c=!1}=fc({name:`MuiUseMediaQuery`,props:n,theme:r}),l=L.useMemo(()=>o===void 0?i===null?null:i.bind(window):o,[o,i]),u=typeof e==`function`?e(r):e;return u=u.replace(/^@media( ?)/m,``),u.includes(`print`)&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.",`Using the print media query to modify print styles can lead to unexpected results.`,"Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
31
|
-
`)),(gc===void 0?hc:_c)(u,a,l,s,c)}}vc();function yc(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function bc(e,t=0,n=1){return yc(e,t,n)}function xc(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function Sc(e){if(e.type)return e;if(e.charAt(0)===`#`)return Sc(xc(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(Ir(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(Ir(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var Cc=e=>{let t=Sc(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},wc=(e,t)=>{try{return Cc(e)}catch{return e}};function Tc(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function Ec(e){e=Sc(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),Tc({type:s,values:c})}function Dc(e){e=Sc(e);let t=e.type===`hsl`||e.type===`hsla`?Sc(Ec(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Oc(e,t){let n=Dc(e),r=Dc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function kc(e,t){return e=Sc(e),t=bc(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,Tc(e)}function Ac(e,t,n){try{return kc(e,t)}catch{return e}}function jc(e,t){if(e=Sc(e),t=bc(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Tc(e)}function Mc(e,t,n){try{return jc(e,t)}catch{return e}}function Nc(e,t){if(e=Sc(e),t=bc(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Tc(e)}function Pc(e,t,n){try{return Nc(e,t)}catch{return e}}function Fc(e,t=.15){return Dc(e)>.5?jc(e,t):Nc(e,t)}function Ic(e,t,n){try{return Fc(e,t)}catch{return e}}var Lc=L.createContext(null);function Rc(){return L.useContext(Lc)}var zc=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Bc(e,t){return typeof t==`function`?t(e):{...e,...t}}function Vc(e){let{children:t,theme:n}=e,r=Rc(),i=L.useMemo(()=>{let e=r===null?{...n}:Bc(r,n);return e!=null&&(e[zc]=r!==null),e},[n,r]);return(0,U.jsx)(Lc.Provider,{value:i,children:t})}var Hc=L.createContext();function Uc({value:e,...t}){return(0,U.jsx)(Hc.Provider,{value:e??!0,...t})}var Wc=()=>L.useContext(Hc)??!1,Gc=L.createContext(void 0);function Kc({value:e,children:t}){return(0,U.jsx)(Gc.Provider,{value:e,children:t})}function qc(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?dc(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?dc(i,r,t.components.mergeClassNameAndStyle):r}function Jc({props:e,name:t}){return qc({props:e,name:t,theme:{components:L.useContext(Gc)}})}var Yc=0;function Xc(e){let[t,n]=L.useState(e),r=e||t;return L.useEffect(()=>{t??(Yc+=1,n(`mui-${Yc}`))},[t]),r}var Zc={...L}.useId;function Qc(e){if(Zc!==void 0){let t=Zc();return e??t}return Xc(e)}function $c(e){let t=Vs(),n=Qc()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,mc(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,U.jsx)(Gs,{styles:i}):null}var el={};function tl(e,t,n,r=!1){return L.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function nl(e){let{children:t,theme:n,themeId:r}=e,i=Vs(el),a=Rc()||el,o=tl(r,i,n),s=tl(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=$c(o);return(0,U.jsx)(Vc,{theme:s,children:(0,U.jsx)(wa.Provider,{value:o,children:(0,U.jsx)(Uc,{value:c,children:(0,U.jsxs)(Kc,{value:r?o[r].components:o.components,children:[l,t]})})})})}var rl={theme:void 0};function il(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(rl.theme=r.theme,i=$s(e(rl)),t=i,n=r.theme),i}}var al=`mode`,ol=`color-scheme`,sl=`data-color-scheme`;({...L}).useSyncExternalStore;function cl(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=al,colorSchemeStorageKey:a=ol,attribute:o=sl,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
32
|
-
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let d=u.match(/\[([^[\]]+)\]/);if(d){let[e,t]=d[1].split(`=`);t||(l+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
33
|
-
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
34
|
-
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,U.jsx)(`script`,{suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(function() {
|
|
35
|
-
try {
|
|
36
|
-
let colorScheme = '';
|
|
37
|
-
const mode = localStorage.getItem('${i}') || '${t}';
|
|
38
|
-
const dark = localStorage.getItem('${a}-dark') || '${r}';
|
|
39
|
-
const light = localStorage.getItem('${a}-light') || '${n}';
|
|
40
|
-
if (mode === 'system') {
|
|
41
|
-
// handle system mode
|
|
42
|
-
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
43
|
-
if (mql.matches) {
|
|
44
|
-
colorScheme = dark
|
|
45
|
-
} else {
|
|
46
|
-
colorScheme = light
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (mode === 'light') {
|
|
50
|
-
colorScheme = light;
|
|
51
|
-
}
|
|
52
|
-
if (mode === 'dark') {
|
|
53
|
-
colorScheme = dark;
|
|
54
|
-
}
|
|
55
|
-
if (colorScheme) {
|
|
56
|
-
${l}
|
|
57
|
-
}
|
|
58
|
-
} catch(e){}})();`}},`mui-color-scheme-init`)}function ll(){}var ul=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return ll;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function dl(){}function fl(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function pl(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function ml(e){return pl(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function hl(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=al,colorSchemeStorageKey:o=ol,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=ul,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=L.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=L.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=L.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=L.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:fl(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=L.useState(l||!d);L.useEffect(()=>{v(!0)},[]);let y=ml(h),b=L.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:fl(r)}})},[f,t]),x=L.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return pl(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),S=L.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=L.useRef(S);return C.current=S,L.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>C.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),L.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||dl,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||dl,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||dl;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var gl=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function _l(e){let{themeId:t,theme:n={},modeStorageKey:r=al,colorSchemeStorageKey:i=ol,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=L.createContext(void 0),u=()=>L.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:S=`system`,forceThemeRerender:C=!1,noSsr:w}=e,T=L.useRef(!1),E=Rc(),D=L.useContext(l),O=!!D&&!b,ee=L.useMemo(()=>u||(typeof n==`function`?n():n),[u]),te=ee[t],k=te||ee,{colorSchemes:A=d,components:j=f,cssVarPrefix:M}=k,ne=Object.keys(A).filter(e=>!!A[e]).join(`,`),re=L.useMemo(()=>ne.split(`,`),[ne]),ie=typeof o==`string`?o:o.light,ae=typeof o==`string`?o:o.dark,{mode:N,setMode:oe,systemMode:se,lightColorScheme:ce,darkColorScheme:P,colorScheme:le,setColorScheme:ue}=hl({supportedColorSchemes:re,defaultLightColorScheme:ie,defaultDarkColorScheme:ae,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:A[ie]&&A[ae]?S:A[k.defaultColorScheme]?.palette?.mode||k.palette?.mode,storageManager:g,storageWindow:_,noSsr:w}),F=N,I=le;O&&(F=D.mode,I=D.colorScheme);let de=I||k.defaultColorScheme;k.vars&&!C&&(de=k.defaultColorScheme);let fe=L.useMemo(()=>{let e=k.generateThemeVars?.()||k.vars,t={...k,components:j,colorSchemes:A,cssVarPrefix:M,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),de){let e=A[de];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[k,de,j,A,M]),pe=k.colorSchemeSelector;mc(()=>{if(I&&y&&pe&&pe!==`media`){let e=pe,t=pe;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...re.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,I));else{let e=t.replace(`%s`,I).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||re.forEach(e=>{y.removeAttribute(t.replace(I,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,I)}}},[I,pe,y,re]),L.useEffect(()=>{let e;if(h&&T.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(gl)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[I,h,v]),L.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let me=L.useMemo(()=>({allColorSchemes:re,colorScheme:I,darkColorScheme:P,lightColorScheme:ce,mode:F,setColorScheme:ue,setMode:oe,systemMode:se}),[re,I,P,ce,F,ue,oe,se,fe.colorSchemeSelector]),he=!0;(x||k.cssVariables===!1||O&&E?.cssVarPrefix===M)&&(he=!1);let ge=(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(nl,{themeId:te?t:void 0,theme:fe,children:c}),he&&(0,U.jsx)(Ga,{styles:fe.generateStyleSheets?.()||[]})]});return O?ge:(0,U.jsx)(l.Provider,{value:me,children:ge})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>cl({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function vl(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var yl=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},bl=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},xl=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function Sl(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return bl(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=xl(e,t);Object.assign(i,{[r]:c}),yl(a,e,`var(${r})`,s),yl(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function Cl(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=Sl(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Sl(n,t);p=eo(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Sl(h,t);p=eo(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=eo(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function wl(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function Tl(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function El(e,t){return L.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var Dl=(e,t)=>e.filter(e=>t.includes(e)),Ol=(e,t,n)=>{let r=e.keys[0];Array.isArray(t)?t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(r===0?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)}):t&&typeof t==`object`?(Object.keys(t).length>e.keys.length?e.keys:Dl(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){let a=t[i];a!==void 0&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},a)}}):(typeof t==`number`||typeof t==`string`)&&n((e,t)=>{Object.assign(e,t)},t)};function kl(e){return`--Grid-${e}Spacing`}function Al(e){return`--Grid-parent-${e}Spacing`}var jl=`--Grid-columns`,Ml=`--Grid-parent-columns`,Nl=({theme:e,ownerState:t})=>{let n={};return Ol(e.breakpoints,t.size,(e,t)=>{let r={};t===`grow`&&(r={flexBasis:0,flexGrow:1,maxWidth:`100%`}),t===`auto`&&(r={flexBasis:`auto`,flexGrow:0,flexShrink:0,maxWidth:`none`,width:`auto`}),typeof t==`number`&&(r={flexGrow:0,flexBasis:`auto`,width:`calc(100% * ${t} / var(${Ml}) - (var(${Ml}) - ${t}) * (var(${Al(`column`)}) / var(${Ml})))`}),e(n,r)}),n},Pl=({theme:e,ownerState:t})=>{let n={};return Ol(e.breakpoints,t.offset,(e,t)=>{let r={};t===`auto`&&(r={marginLeft:`auto`}),typeof t==`number`&&(r={marginLeft:t===0?`0px`:`calc(100% * ${t} / var(${Ml}) + var(${Al(`column`)}) * ${t} / var(${Ml}))`}),e(n,r)}),n},Fl=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[jl]:12};return Ol(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[jl]:r,"> *":{[Ml]:r}})}),n},Il=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Ol(e.breakpoints,t.rowSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[kl(`row`)]:i,"> *":{[Al(`row`)]:i}})}),n},Ll=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Ol(e.breakpoints,t.columnSpacing,(t,r)=>{let i=typeof r==`string`?r:e.spacing?.(r);t(n,{[kl(`column`)]:i,"> *":{[Al(`column`)]:i}})}),n},Rl=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Ol(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},zl=({ownerState:e})=>({minWidth:0,boxSizing:`border-box`,...e.container&&{display:`flex`,flexWrap:`wrap`,...e.wrap&&e.wrap!==`wrap`&&{flexWrap:e.wrap},gap:`var(${kl(`row`)}) var(${kl(`column`)})`}}),Bl=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${e}-${String(n)}`)}),t},Vl=(e,t=`xs`)=>{function n(e){return e===void 0?!1:typeof e==`string`&&!Number.isNaN(Number(e))||typeof e==`number`&&e>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e==`object`&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]},Hl=e=>e===void 0?[]:typeof e==`object`?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],Ul=zs(),Wl=uc(`div`,{name:`MuiGrid`,slot:`Root`});function Gl(e){return pc({props:e,name:`MuiGrid`,defaultTheme:Ul})}function Kl(e={}){let{createStyledComponent:t=Wl,useThemeProps:n=Gl,useTheme:r=Us,componentName:i=`MuiGrid`}=e,a=(e,t)=>{let{container:n,direction:r,spacing:a,wrap:o,size:s}=e;return Tl({root:[`root`,n&&`container`,o!==`wrap`&&`wrap-xs-${String(o)}`,...Hl(r),...Bl(s),...n?Vl(a,t.breakpoints.keys[0]):[]]},e=>Zs(i,e),{})};function o(e,t,n=()=>!0){let r={};return e===null||(Array.isArray(e)?e.forEach((e,i)=>{e!==null&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):typeof e==`object`?Object.keys(e).forEach(t=>{let i=e[t];i!=null&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let s=t(Fl,Ll,Il,Nl,Rl,zl,Pl),c=L.forwardRef(function(e,t){let i=r(),c=n(e),{className:l,children:u,columns:d=12,container:f=!1,component:p=`div`,direction:m=`row`,wrap:h=`wrap`,size:g={},offset:_={},spacing:v=0,rowSpacing:y=v,columnSpacing:b=v,unstable_level:x=0,...S}=c,C=o(g,i.breakpoints,e=>e!==!1),w=o(_,i.breakpoints),T=e.columns??(x?void 0:d),E=e.spacing??(x?void 0:v),D=e.rowSpacing??e.spacing??(x?void 0:y),O=e.columnSpacing??e.spacing??(x?void 0:b),ee={...c,level:x,columns:T,container:f,direction:m,wrap:h,spacing:E,rowSpacing:D,columnSpacing:O,size:C,offset:w},te=a(ee,i);return(0,U.jsx)(s,{ref:t,as:p,ownerState:ee,className:W(te.root,l),...S,children:L.Children.map(u,e=>L.isValidElement(e)&&El(e,[`Grid`])&&f&&e.props.container?L.cloneElement(e,{unstable_level:e.props?.unstable_level??x+1}):e)})});return c.muiName=`Grid`,c}var ql=zs(),Jl=uc(`div`,{name:`MuiStack`,slot:`Root`});function Yl(e){return pc({props:e,name:`MuiStack`,defaultTheme:ql})}function Xl(e,t){let n=L.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(L.cloneElement(t,{key:`separator-${i}`})),e),[])}var Zl=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],Ql=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...To({theme:t},Mo({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=Jo(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>((typeof e.spacing==`object`&&e.spacing[n]!=null||typeof e.direction==`object`&&e.direction[n]!=null)&&(t[n]=!0),t),{}),a=Mo({values:e.direction,base:i}),o=Mo({values:e.spacing,base:i});typeof a==`object`&&Object.keys(a).forEach((e,t,n)=>{if(!a[e]){let r=t>0?a[n[t-1]]:`column`;a[e]=r}}),n=eo(n,To({theme:t},o,(t,n)=>e.useFlexGap?{gap:Yo(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Zl(n?a[n]:e.direction)}`]:Yo(r,t)}}))}return n=Ao(t.breakpoints,n),n};function $l(e={}){let{createStyledComponent:t=Jl,useThemeProps:n=Yl,componentName:r=`MuiStack`}=e,i=()=>Tl({root:[`root`]},e=>Zs(r,e),{}),a=t(Ql);return L.forwardRef(function(e,t){let{component:r=`div`,direction:o=`column`,spacing:s=0,divider:c,children:l,className:u,useFlexGap:d=!1,...f}=n(e),p={direction:o,spacing:s,useFlexGap:d},m=i();return(0,U.jsx)(a,{as:r,ownerState:p,ref:t,className:W(m.root,u),...f,children:c?Xl(l,c):l})})}function eu(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:Dr.white,default:Dr.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var tu=eu();function nu(){return{text:{primary:Dr.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:Dr.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var ru=nu();function iu(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=Nc(e.main,i):t===`dark`&&(e.dark=jc(e.main,a)))}function au(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function ou(e=`light`){return e===`dark`?{main:Ar[200],light:Ar[50],dark:Ar[400]}:{main:Ar[700],light:Ar[400],dark:Ar[800]}}function su(e=`light`){return e===`dark`?{main:kr[200],light:kr[50],dark:kr[400]}:{main:kr[500],light:kr[300],dark:kr[700]}}function cu(e=`light`){return e===`dark`?{main:Or[500],light:Or[300],dark:Or[700]}:{main:Or[700],light:Or[400],dark:Or[800]}}function lu(e=`light`){return e===`dark`?{main:jr[400],light:jr[300],dark:jr[700]}:{main:jr[700],light:jr[500],dark:jr[900]}}function uu(e=`light`){return e===`dark`?{main:Mr[400],light:Mr[300],dark:Mr[700]}:{main:Mr[800],light:Mr[500],dark:Mr[900]}}function du(e=`light`){return e===`dark`?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:`#ed6c02`,light:Nr[500],dark:Nr[900]}}function fu(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function pu(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||ou(t),s=e.secondary||su(t),c=e.error||cu(t),l=e.info||lu(t),u=e.success||uu(t),d=e.warning||du(t);function f(e){return i?fu(e):Oc(e,ru.text.primary)>=n?ru.text.primary:tu.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(Ir(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(Ir(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(au(i,e,`light`,a,r),au(i,e,`dark`,o,r)):(iu(e,`light`,a,r),iu(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=eu():t===`dark`&&(m=nu()),eo({common:{...Dr},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:Fr,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function mu(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function hu(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function gu(e){return Math.round(e*1e5)/1e5}var _u={textTransform:`uppercase`},vu=`"Roboto", "Helvetica", "Arial", sans-serif`;function yu(e,t){let{fontFamily:n=vu,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===vu?{letterSpacing:`${gu(i/t)}em`}:{},...a,...l});return eo({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,_u),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,_u),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var bu=.2,xu=.14,Su=.12;function Cu(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${bu})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${xu})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Su})`].join(`,`)}var wu=[`none`,Cu(0,2,1,-1,0,1,1,0,0,1,3,0),Cu(0,3,1,-2,0,2,2,0,0,1,5,0),Cu(0,3,3,-2,0,3,4,0,0,1,8,0),Cu(0,2,4,-1,0,4,5,0,0,1,10,0),Cu(0,3,5,-1,0,5,8,0,0,1,14,0),Cu(0,3,5,-1,0,6,10,0,0,1,18,0),Cu(0,4,5,-2,0,7,10,1,0,2,16,1),Cu(0,5,5,-3,0,8,10,1,0,3,14,2),Cu(0,5,6,-3,0,9,12,1,0,3,16,2),Cu(0,6,6,-3,0,10,14,1,0,4,18,3),Cu(0,6,7,-4,0,11,15,1,0,4,20,3),Cu(0,7,8,-4,0,12,17,2,0,5,22,4),Cu(0,7,8,-4,0,13,19,2,0,5,24,4),Cu(0,7,9,-4,0,14,21,2,0,5,26,4),Cu(0,8,9,-5,0,15,22,2,0,6,28,5),Cu(0,8,10,-5,0,16,24,2,0,6,30,5),Cu(0,8,11,-5,0,17,26,2,0,6,32,5),Cu(0,9,11,-5,0,18,28,2,0,7,34,6),Cu(0,9,12,-6,0,19,29,2,0,7,36,6),Cu(0,10,13,-6,0,20,31,3,0,8,38,7),Cu(0,10,13,-6,0,21,33,3,0,8,40,7),Cu(0,10,14,-6,0,22,35,3,0,8,42,7),Cu(0,11,14,-7,0,23,36,3,0,9,44,8),Cu(0,11,15,-7,0,24,38,3,0,9,46,8)],Tu=[`all`],Eu={},Du={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},Ou={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ku(e){return`${Math.round(e)}ms`}function Au(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function ju(e){let t={...e};delete t.reducedMotion;let n={...Du,...t.easing},r={...Ou,...t.duration};return{getAutoHeightDuration:Au,create:t.create??((e=Tu,t=Eu)=>{let{duration:i=r.standard,easing:a=n.easeInOut,delay:o=0,...s}=t;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:ku(i)} ${a} ${typeof o==`string`?o:ku(o)}`).join(`,`)}),...t,easing:n,duration:r}}var Mu={};function Nu(e=Mu){return{reducedMotion:`never`,...e}}var Pu={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Fu(e){return Qa(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Iu(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Fu(a)||i.startsWith(`unstable_`)||i.startsWith(`internal_`)?delete e[i]:Qa(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
59
|
-
|
|
60
|
-
const theme = ${JSON.stringify(t,null,2)};
|
|
61
|
-
|
|
62
|
-
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
63
|
-
theme.motion = { reducedMotion: 'never', ...theme.motion };
|
|
64
|
-
theme.transitions = createTransitions(theme.transitions || {});
|
|
65
|
-
|
|
66
|
-
export default theme;`}function Lu(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Ru=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function zu(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:kc(t,Ru(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Lu(n)})`:Nc(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Lu(n)})`:jc(t,n)}})}function Bu(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},motion:o={},transitions:s={},typography:c={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(Ir(22));let f=pu({...a,colorSpace:u}),p=zs(e),m=eo(p,{mixins:hu(p.breakpoints,r),palette:f,shadows:wu.slice(),typography:yu(f,c),motion:Nu(o),transitions:ju(s),zIndex:{...Pu}});return m=eo(m,d),m=t.reduce((e,t)=>eo(e,t),m),delete m.transitions.reducedMotion,m.unstable_sxConfig={...Ms,...d?.unstable_sxConfig},m.unstable_sx=function(e){return Fs({sx:e,theme:this})},m.toRuntimeSource=Iu,zu(m),m}function Vu(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var Hu=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=Vu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Uu(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function Wu(e){return e===`dark`?Hu:[]}function Gu(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=pu({...t,colorSpace:i});return{palette:o,opacity:{...Uu(o.mode),...n},overlays:r||Wu(o.mode),...a}}function Ku(e){return e[0]===`motion`||!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var qu=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],Ju=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return qu(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function Yu(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function Xu(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:Ec(e)}function Zu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=wc(Xu(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
67
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Qu(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var $u=e=>{try{return e()}catch{}},ed=(e=`mui`)=>vl(e);function td(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=Gu({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=Bu({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...Uu(a),...n?.opacity},overlays:n?.overlays||Wu(a)},s}function nd(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=Ku,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=ed(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(Ir(21,f));let b;o&&(b=`oklch`);let x=td(b,v,y,u,f);h&&!v.light&&td(b,v,h,void 0,`light`),g&&!v.dark&&td(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...mu(x.typography),...x.font},spacing:Qu(u.spacing)};Object.keys(S.colorSchemes).forEach(e=>{let t=S.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(G(t.common,`background`,`#fff`),G(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(G(t.common,`background`,`#000`),G(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===Ac&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===Mc&&(r=`#000 ${(n*100).toFixed(0)}%`),e===Pc&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(Yu(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){G(t.Alert,`errorColor`,r(Mc,o?p(`palette-error-light`):t.error.light,.6)),G(t.Alert,`infoColor`,r(Mc,o?p(`palette-info-light`):t.info.light,.6)),G(t.Alert,`successColor`,r(Mc,o?p(`palette-success-light`):t.success.light,.6)),G(t.Alert,`warningColor`,r(Mc,o?p(`palette-warning-light`):t.warning.light,.6)),G(t.Alert,`errorFilledBg`,n(`palette-error-main`)),G(t.Alert,`infoFilledBg`,n(`palette-info-main`)),G(t.Alert,`successFilledBg`,n(`palette-success-main`)),G(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),G(t.Alert,`errorFilledColor`,$u(()=>t.getContrastText(t.error.main))),G(t.Alert,`infoFilledColor`,$u(()=>t.getContrastText(t.info.main))),G(t.Alert,`successFilledColor`,$u(()=>t.getContrastText(t.success.main))),G(t.Alert,`warningFilledColor`,$u(()=>t.getContrastText(t.warning.main))),G(t.Alert,`errorStandardBg`,r(Pc,o?p(`palette-error-light`):t.error.light,.9)),G(t.Alert,`infoStandardBg`,r(Pc,o?p(`palette-info-light`):t.info.light,.9)),G(t.Alert,`successStandardBg`,r(Pc,o?p(`palette-success-light`):t.success.light,.9)),G(t.Alert,`warningStandardBg`,r(Pc,o?p(`palette-warning-light`):t.warning.light,.9)),G(t.Alert,`errorIconColor`,n(`palette-error-main`)),G(t.Alert,`infoIconColor`,n(`palette-info-main`)),G(t.Alert,`successIconColor`,n(`palette-success-main`)),G(t.Alert,`warningIconColor`,n(`palette-warning-main`)),G(t.AppBar,`defaultBg`,n(`palette-grey-100`)),G(t.Avatar,`defaultBg`,n(`palette-grey-400`)),G(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),G(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),G(t.Chip,`defaultBorder`,n(`palette-grey-400`)),G(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),G(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),G(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),G(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),G(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),G(t.LinearProgress,`primaryBg`,r(Pc,o?p(`palette-primary-main`):t.primary.main,.62)),G(t.LinearProgress,`secondaryBg`,r(Pc,o?p(`palette-secondary-main`):t.secondary.main,.62)),G(t.LinearProgress,`errorBg`,r(Pc,o?p(`palette-error-main`):t.error.main,.62)),G(t.LinearProgress,`infoBg`,r(Pc,o?p(`palette-info-main`):t.info.main,.62)),G(t.LinearProgress,`successBg`,r(Pc,o?p(`palette-success-main`):t.success.main,.62)),G(t.LinearProgress,`warningBg`,r(Pc,o?p(`palette-warning-light`):t.warning.main,.62)),G(t.Skeleton,`bg`,b?r(Ac,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),G(t.Slider,`primaryTrack`,r(Pc,o?p(`palette-primary-main`):t.primary.main,.62)),G(t.Slider,`secondaryTrack`,r(Pc,o?p(`palette-secondary-main`):t.secondary.main,.62)),G(t.Slider,`errorTrack`,r(Pc,o?p(`palette-error-main`):t.error.main,.62)),G(t.Slider,`infoTrack`,r(Pc,o?p(`palette-info-main`):t.info.main,.62)),G(t.Slider,`successTrack`,r(Pc,o?p(`palette-success-main`):t.success.main,.62)),G(t.Slider,`warningTrack`,r(Pc,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(Mc,o?p(`palette-background-default`):t.background.default,.6825):Ic(t.background.default,.8);G(t.SnackbarContent,`bg`,e),G(t.SnackbarContent,`color`,$u(()=>b?ru.text.primary:t.getContrastText(e))),G(t.SpeedDialAction,`fabHoverBg`,Ic(t.background.paper,.15)),G(t.StepConnector,`border`,n(`palette-grey-400`)),G(t.StepContent,`border`,n(`palette-grey-400`)),G(t.Switch,`defaultColor`,n(`palette-common-white`)),G(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),G(t.Switch,`primaryDisabledColor`,r(Pc,o?p(`palette-primary-main`):t.primary.main,.62)),G(t.Switch,`secondaryDisabledColor`,r(Pc,o?p(`palette-secondary-main`):t.secondary.main,.62)),G(t.Switch,`errorDisabledColor`,r(Pc,o?p(`palette-error-main`):t.error.main,.62)),G(t.Switch,`infoDisabledColor`,r(Pc,o?p(`palette-info-main`):t.info.main,.62)),G(t.Switch,`successDisabledColor`,r(Pc,o?p(`palette-success-main`):t.success.main,.62)),G(t.Switch,`warningDisabledColor`,r(Pc,o?p(`palette-warning-main`):t.warning.main,.62)),G(t.TableCell,`border`,r(Pc,Ac(o?p(`palette-divider`):t.divider,1),.88)),G(t.Tooltip,`bg`,r(Ac,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){G(t.Alert,`errorColor`,r(Pc,o?p(`palette-error-light`):t.error.light,.6)),G(t.Alert,`infoColor`,r(Pc,o?p(`palette-info-light`):t.info.light,.6)),G(t.Alert,`successColor`,r(Pc,o?p(`palette-success-light`):t.success.light,.6)),G(t.Alert,`warningColor`,r(Pc,o?p(`palette-warning-light`):t.warning.light,.6)),G(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),G(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),G(t.Alert,`successFilledBg`,n(`palette-success-dark`)),G(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),G(t.Alert,`errorFilledColor`,$u(()=>t.getContrastText(t.error.dark))),G(t.Alert,`infoFilledColor`,$u(()=>t.getContrastText(t.info.dark))),G(t.Alert,`successFilledColor`,$u(()=>t.getContrastText(t.success.dark))),G(t.Alert,`warningFilledColor`,$u(()=>t.getContrastText(t.warning.dark))),G(t.Alert,`errorStandardBg`,r(Mc,o?p(`palette-error-light`):t.error.light,.9)),G(t.Alert,`infoStandardBg`,r(Mc,o?p(`palette-info-light`):t.info.light,.9)),G(t.Alert,`successStandardBg`,r(Mc,o?p(`palette-success-light`):t.success.light,.9)),G(t.Alert,`warningStandardBg`,r(Mc,o?p(`palette-warning-light`):t.warning.light,.9)),G(t.Alert,`errorIconColor`,n(`palette-error-main`)),G(t.Alert,`infoIconColor`,n(`palette-info-main`)),G(t.Alert,`successIconColor`,n(`palette-success-main`)),G(t.Alert,`warningIconColor`,n(`palette-warning-main`)),G(t.AppBar,`defaultBg`,n(`palette-grey-900`)),G(t.AppBar,`darkBg`,n(`palette-background-paper`)),G(t.AppBar,`darkColor`,n(`palette-text-primary`)),G(t.Avatar,`defaultBg`,n(`palette-grey-600`)),G(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),G(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),G(t.Chip,`defaultBorder`,n(`palette-grey-700`)),G(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),G(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),G(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),G(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),G(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),G(t.LinearProgress,`primaryBg`,r(Mc,o?p(`palette-primary-main`):t.primary.main,.5)),G(t.LinearProgress,`secondaryBg`,r(Mc,o?p(`palette-secondary-main`):t.secondary.main,.5)),G(t.LinearProgress,`errorBg`,r(Mc,o?p(`palette-error-main`):t.error.main,.5)),G(t.LinearProgress,`infoBg`,r(Mc,o?p(`palette-info-main`):t.info.main,.5)),G(t.LinearProgress,`successBg`,r(Mc,o?p(`palette-success-main`):t.success.main,.5)),G(t.LinearProgress,`warningBg`,r(Mc,o?p(`palette-warning-main`):t.warning.main,.5)),G(t.Skeleton,`bg`,b?r(Ac,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),G(t.Slider,`primaryTrack`,r(Mc,o?p(`palette-primary-main`):t.primary.main,.5)),G(t.Slider,`secondaryTrack`,r(Mc,o?p(`palette-secondary-main`):t.secondary.main,.5)),G(t.Slider,`errorTrack`,r(Mc,o?p(`palette-error-main`):t.error.main,.5)),G(t.Slider,`infoTrack`,r(Mc,o?p(`palette-info-main`):t.info.main,.5)),G(t.Slider,`successTrack`,r(Mc,o?p(`palette-success-main`):t.success.main,.5)),G(t.Slider,`warningTrack`,r(Mc,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(Pc,o?p(`palette-background-default`):t.background.default,.985):Ic(t.background.default,.98);G(t.SnackbarContent,`bg`,e),G(t.SnackbarContent,`color`,$u(()=>b?tu.text.primary:t.getContrastText(e))),G(t.SpeedDialAction,`fabHoverBg`,Ic(t.background.paper,.15)),G(t.StepConnector,`border`,n(`palette-grey-600`)),G(t.StepContent,`border`,n(`palette-grey-600`)),G(t.Switch,`defaultColor`,n(`palette-grey-300`)),G(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),G(t.Switch,`primaryDisabledColor`,r(Mc,o?p(`palette-primary-main`):t.primary.main,.55)),G(t.Switch,`secondaryDisabledColor`,r(Mc,o?p(`palette-secondary-main`):t.secondary.main,.55)),G(t.Switch,`errorDisabledColor`,r(Mc,o?p(`palette-error-main`):t.error.main,.55)),G(t.Switch,`infoDisabledColor`,r(Mc,o?p(`palette-info-main`):t.info.main,.55)),G(t.Switch,`successDisabledColor`,r(Mc,o?p(`palette-success-main`):t.success.main,.55)),G(t.Switch,`warningDisabledColor`,r(Mc,o?p(`palette-warning-light`):t.warning.main,.55)),G(t.TableCell,`border`,r(Mc,Ac(o?p(`palette-divider`):t.divider,1),.68)),G(t.Tooltip,`bg`,r(Ac,o?p(`palette-grey-700`):t.grey[700],.92))}o||(Zu(t.background,`default`),Zu(t.background,`paper`),Zu(t.common,`background`),Zu(t.common,`onBackground`),Zu(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&G(t[e],`mainChannel`,wc(Xu(n.main))),n.light&&G(t[e],`lightChannel`,wc(Xu(n.light))),n.dark&&G(t[e],`darkChannel`,wc(Xu(n.dark))),n.contrastText&&G(t[e],`contrastTextChannel`,wc(Xu(n.contrastText))),e===`text`&&(Zu(t[e],`primary`),Zu(t[e],`secondary`)),e===`action`&&(n.active&&Zu(t[e],`active`),n.selected&&Zu(t[e],`selected`)))})}),S=t.reduce((e,t)=>eo(e,t),S);let C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:Ju(S),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:E}=Cl(S,C);return S.vars=w,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([e,t])=>{S[e]=t}),S.generateThemeVars=T,S.generateStyleSheets=E,S.generateSpacing=function(){return rs(u.spacing,Jo(this))},S.getColorSchemeSelector=wl(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Ms,...u?.unstable_sxConfig},S.unstable_sx=function(e){return Fs({sx:e,theme:this})},S.internal_cache={},S.toRuntimeSource=Iu,S}function rd(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:pu({...n===!0?{}:n.palette,mode:t})})}function id(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return Bu(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=Bu({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},rd(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},rd(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),nd({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}function ad(e){return Zs(`MuiAccordionSummary`,e)}var od=Qs(`MuiAccordionSummary`,[`root`,`expanded`,`focusVisible`,`disabled`,`gutters`,`content`,`expandIconWrapper`]);function sd(e){return Zs(`MuiAutocomplete`,e)}var cd=Qs(`MuiAutocomplete`,`root.expanded.fullWidth.focused.focusVisible.tag.tagSizeSmall.tagSizeMedium.hasPopupIcon.hasClearIcon.inputRoot.input.inputFocused.endAdornment.clearIndicator.popupIndicator.popupIndicatorOpen.popper.popperDisablePortal.paper.listbox.loading.noOptions.option.groupLabel.groupUl`.split(`.`));function ld(e){return Zs(`MuiCheckbox`,e)}var ud=Qs(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]);function dd(e){return typeof e==`string`}function fd(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}function pd(...e){let t=L.useRef(void 0),n=L.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return L.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}function md(e){let t=L.useRef(e);return mc(()=>{t.current=e}),L.useRef((...e)=>(0,t.current)(...e)).current}function hd(e){return e&&e.ownerDocument||document}function gd(e){return hd(e).defaultView||window}function _d(e){return parseInt(e,10)||0}var vd={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function yd(e){for(let t in e)return!1;return!0}function bd(e){return yd(e)||e.outerHeightStyle===0&&!e.overflowing}var xd=L.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=L.useRef(o!=null),l=L.useRef(null),u=pd(t,l),d=L.useRef(null),f=L.useRef(null),p=L.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=gd(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
68
|
-
`&&(n.value+=` `);let o=a.boxSizing,s=_d(a.paddingBottom)+_d(a.paddingTop),c=_d(a.borderBottomWidth)+_d(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=md(()=>{let e=l.current,t=p();if(!e||!t||bd(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=L.useCallback(()=>{let e=l.current,t=p();if(!e||!t||bd(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=L.useRef(-1);return mc(()=>{let e=fd(h),t=l?.current;if(!t)return;let n=gd(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),mc(()=>{h()}),(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
69
|
-
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,U.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...vd.shadow,...a,paddingTop:0,paddingBottom:0}})]})}),Sd=L.createContext(void 0);function Cd(){return L.useContext(Sd)}function wd({props:e,states:t}){let n=L.useContext(Sd),r={};return t.forEach(t=>{let i=e[t];r[t]=i===void 0&&n?n[t]:i}),[r,n]}var Td=id();function Ed(){let e=Us(Td);return e.$$material||e}function Dd(e){return(0,U.jsx)(Gs,{...e,defaultTheme:Td,themeId:Lr})}function Od(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var kd=e=>Od(e)&&e!==`classes`,K=sc({themeId:Lr,defaultTheme:Td,rootShouldForwardProp:kd});function Ad(e){return function(t){return(0,U.jsx)(Dd,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}var jd=il;function Md(e){return Jc(e)}var q=Po,Nd=pd,Pd=mc,Fd=hd;function Id(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Ld=Id;function Rd(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function zd(e,t=!1){return e&&(Rd(e.value)&&e.value!==``||t&&Rd(e.defaultValue)&&e.defaultValue!==``)}function Bd(e){return e.startAdornment}function Vd(e){return Zs(`MuiInputBase`,e)}var Hd=Qs(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputTypeSearch`]),Ud={transition:`none`};function Wd(e,t){return e===`always`?t:e===`system`?{"@media (prefers-reduced-motion: reduce)":t}:null}var Gd=e=>e.scrollTop,Kd={},qd=[`all`],Jd={};function Yd(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function Xd(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function Zd(e,t){let{timeout:n,easing:r,style:i=Kd}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function Qd(e,t){let n=t??Ud;return Wd(e.motion?.reducedMotion,n)}function $d(e,t=qd,n=Jd){let r=e.transitions?.create?.(t,n),i=Qd(e);if(r===void 0)return i??Kd;let a={transition:r};return i?{...a,...i}:a}var ef,tf=`mui-auto-fill`,nf=`mui-auto-fill-cancel`,rf=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${q(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},af=(e,t)=>{let{ownerState:n}=e;return[t.input,n.type===`search`&&t.inputTypeSearch]},of=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return Tl({root:[`root`,`color${q(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${q(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,d&&`readOnly`]},Vd,t)},sf=K(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:rf})(jd(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${Hd.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),cf=K(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:af})(jd(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},...$d(e,`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${Hd.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Hd.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:nf,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:tf}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),lf=Ad({[`@keyframes ${tf}`]:{from:{animationName:tf}},[`@keyframes ${nf}`]:{from:{animationName:nf}}}),uf=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiInputBase`}),{"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,className:s,color:c,defaultValue:l,disabled:u,disableInjectingGlobalStyles:d,endAdornment:f,error:p,fullWidth:m=!1,id:h,inputComponent:g=`input`,inputProps:_={},inputRef:v,margin:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onClick:E,onFocus:D,onKeyDown:O,onKeyUp:ee,placeholder:te,readOnly:k,renderSuffix:A,rows:j,size:M,slotProps:ne={},slots:re={},startAdornment:ie,type:ae=`text`,value:N,...oe}=n,se=_.value==null?N:_.value,{current:ce}=L.useRef(se!=null),P=L.useRef(),le=L.useCallback(e=>{},[]),ue=Nd(P,v,_.ref,le),[F,I]=L.useState(!1),[de,fe]=wd({props:n,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});de.focused=fe?fe.focused:F,L.useEffect(()=>{!fe&&u&&F&&(I(!1),w&&w())},[fe,u,F,w]);let pe=fe&&fe.onFilled,me=fe&&fe.onEmpty,he=L.useCallback(e=>{zd(e)?pe&&pe():me&&me()},[pe,me]);Pd(()=>{ce&&he({value:se})},[se,he,ce]),Pd(()=>{if(!o)return;let e=P.current;if(!e)return;let t=Fd(e),n=Ld(t),r=n==null||n===t.body||n===t.documentElement;e===n?fe&&fe.onFocus?fe.onFocus():I(!0):r&&e.focus()},[o]);let ge=e=>{D&&D(e),_.onFocus&&_.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):I(!0)},_e=e=>{w&&w(e),_.onBlur&&_.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):I(!1)},ve=(e,...t)=>{if(!ce){let t=e.target||P.current;if(t==null)throw Error(Ir(1));he({value:t.value})}_.onChange&&_.onChange(e,...t),T&&T(e,...t)};L.useEffect(()=>{he(P.current)},[]);let ye=e=>{P.current&&e.currentTarget===e.target&&P.current.focus(),E&&E(e)},be=g,xe=_;S&&be===`input`&&(xe=j?{type:void 0,minRows:j,maxRows:j,...xe}:{type:void 0,maxRows:b,minRows:x,...xe},be=xd);let Se=e=>{he(e.animationName===nf?P.current:{value:`x`})};L.useEffect(()=>{fe&&fe.setAdornedStart(!!ie)},[fe,ie]);let R={...n,color:de.color||`primary`,disabled:de.disabled,endAdornment:f,error:de.error,focused:de.focused,formControl:fe,fullWidth:m,hiddenLabel:de.hiddenLabel,multiline:S,size:de.size,startAdornment:ie,type:ae},z=of(R),B=re.root||sf,Ce=ne.root||{},we=re.input||cf;return xe={...xe,...ne.input},(0,U.jsxs)(L.Fragment,{children:[!d&&typeof lf==`function`&&(ef||=(0,U.jsx)(lf,{})),(0,U.jsxs)(B,{...Ce,ref:t,onClick:ye,...oe,...!dd(B)&&{ownerState:{...R,...Ce.ownerState}},className:W(z.root,Ce.className,s,k&&`MuiInputBase-readOnly`),children:[ie,(0,U.jsx)(Sd.Provider,{value:null,children:(0,U.jsx)(we,{"aria-invalid":de.error,"aria-describedby":r,"aria-label":i,autoComplete:a,autoFocus:o,defaultValue:l,disabled:de.disabled,id:h,onAnimationStart:Se,name:C,placeholder:te,readOnly:k,required:de.required,rows:j,value:se,onKeyDown:O,onKeyUp:ee,type:ae,...xe,...!dd(we)&&{as:be,ownerState:{...R,...xe.ownerState}},ref:ue,className:W(z.input,xe.className,k&&`MuiInputBase-readOnly`),onBlur:_e,onChange:ve,onFocus:ge})}),f,A?A({...de,startAdornment:ie}):null]})]})});function df(e){return Zs(`MuiFilledInput`,e)}var ff={...Hd,...Qs(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};function pf(e){return Zs(`MuiFormControlLabel`,e)}var mf=Qs(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]);function hf(e){return Zs(`MuiFormHelperText`,e)}var gf=Qs(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]);function _f(e){return Zs(`MuiFormLabel`,e)}var vf=Qs(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);function yf(e){return Zs(`MuiInput`,e)}var bf={...Hd,...Qs(`MuiInput`,[`root`,`underline`,`input`])};function xf(e){return Zs(`MuiListItemButton`,e)}var Sf=Qs(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function Cf(e){return Zs(`MuiMenuItem`,e)}var wf=Qs(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function Tf(e){return Zs(`MuiNativeSelect`,e)}var Ef=Qs(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function Df(e){return Zs(`MuiOutlinedInput`,e)}var Of={...Hd,...Qs(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};function kf(e){return Zs(`MuiRadio`,e)}var Af=Qs(`MuiRadio`,[`root`,`checked`,`disabled`,`colorPrimary`,`colorSecondary`,`sizeSmall`]);function jf(e){return Zs(`MuiSlider`,e)}var Mf=Qs(`MuiSlider`,`root.active.colorPrimary.colorSecondary.colorError.colorInfo.colorSuccess.colorWarning.disabled.dragging.focusVisible.mark.markActive.marked.markLabel.markLabelActive.rail.sizeSmall.thumb.track.trackInverted.trackFalse.valueLabel.valueLabelOpen.valueLabelCircle.valueLabelLabel.vertical`.split(`.`));function Nf(e){return Zs(`MuiToggleButton`,e)}var Pf=Qs(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]);function Ff({theme:e,...t}){let n=`$$material`in e?e[Lr]:void 0;return(0,U.jsx)(nl,{...t,themeId:n?Lr:void 0,theme:n||e})}var If={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:Lf,useColorScheme:Rf,getInitColorSchemeScript:zf}=_l({themeId:Lr,theme:()=>id({cssVariables:!0}),colorSchemeStorageKey:If.colorSchemeStorageKey,modeStorageKey:If.modeStorageKey,defaultColorScheme:{light:If.defaultLightColorScheme,dark:If.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:yu(e.palette,e.typography)};return t.unstable_sx=function(e){return Fs({sx:e,theme:this})},t}}),Bf=Lf;function Vf({theme:e,...t}){let n=L.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[Lr]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,U.jsx)(Ff,{theme:n,...t}):(0,U.jsx)(Bf,{theme:e,...t})}function Hf(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}var Uf=Hf;function Wf(e){return Zs(`MuiSvgIcon`,e)}Qs(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var Gf=e=>{let{color:t,fontSize:n,classes:r}=e;return Tl({root:[`root`,t!==`inherit`&&`color${q(t)}`,`fontSize${q(n)}`]},Wf,r)},Kf=K(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${q(n.color)}`],t[`fontSize${q(n.fontSize)}`]]}})(jd(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,...$d(e,`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),qf=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=L.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=Gf(m);return(0,U.jsxs)(Kf,{as:o,className:W(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,U.jsx)(`title`,{children:u}):null]})});qf.muiName=`SvgIcon`;function Jf(e,t){function n(t,n){return(0,U.jsx)(qf,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=qf.muiName,L.memo(L.forwardRef(n))}var Yf=fd,Xf=El,Zf=gd;function Qf(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var $f=Qc;function ep(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=L.useRef(t!==void 0),[o,s]=L.useState(n);return[a?t:o,L.useCallback(e=>{a||s(e)},[])]}var tp=ep,np=md;function rp(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function ip(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{rp(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=W(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=W(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}var ap={};function op(e,t){let n=L.useRef(ap);return n.current===ap&&(n.current=e(t)),n}function sp(e){let t=op(()=>cp(e)).current;return t.next=e,mc(t.effect),t}function cp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var lp=L.createContext(null);function up(e){if(e==null)return{appear:void 0,enter:void 0,exit:void 0};if(typeof e==`number`)return{appear:e,enter:e,exit:e};let t=e.enter,n=e.exit;return{appear:e.appear===void 0?t:e.appear,enter:t,exit:n}}function dp(e){if(e.autoTimeout!=null)return e.autoTimeout;let t=up(e.timeout);return e.currentStatus===`entering`?e.isAppearing?t.appear??t.enter??null:t.enter??null:t.exit??null}function fp(e){let{in:t=!1,appear:n=!1,enter:r=!0,exit:i=!0,mountOnEnter:a=!1,unmountOnExit:o=!1,timeout:s,addEndListener:c,reduceMotion:l=!1,getAutoTimeout:u,nodeRef:d,onEnter:f,onEntering:p,onEntered:m,onExit:h,onExiting:g,onExited:_,children:v,...y}=e,b=L.useContext(lp),x=b&&!b.isMounting?r:n,[S,C]=L.useState(()=>t?x?`exited`:`entered`:a||o?`unmounted`:`exited`),w=L.useRef(S);w.current=S,t&&S===`unmounted`&&(w.current=`exited`,C(`exited`));let T=L.useRef(t&&x),E=L.useRef(!1),D=L.useRef(null),O=L.useRef(S),ee=L.useRef(!1),te=L.useRef(l),k=sp({timeout:s,addEndListener:c,reduceMotion:l,getAutoTimeout:u,onEnter:f,onEntering:p,onEntered:m,onExit:h,onExiting:g,onExited:_,enter:r,exit:i,mountOnEnter:a,unmountOnExit:o,nodeRef:d,parentGroup:b}),A=L.useCallback(()=>{D.current!==null&&(D.current.cancel(),D.current=null)},[]),j=L.useCallback(e=>{let t=!0,n=()=>{t&&(t=!1,D.current=null,e())};return n.cancel=()=>{t=!1},D.current=n,n},[]),M=L.useCallback((e,t)=>{let n,r=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},i=j(()=>{r(),w.current=e,C(e)}),a=i.cancel;i.cancel=()=>{r(),a()};let o=k.current.nodeRef.current,s=k.current.addEndListener,c=k.current.getAutoTimeout!==void 0,l=k.current.getAutoTimeout?.(),u=dp({currentStatus:t,isAppearing:ee.current,timeout:k.current.timeout,autoTimeout:l}),d=te.current,f=u??(d&&c?0:null),p=e=>{n=setTimeout(i,e)};if(!o){p(0);return}if(s){f!=null&&p(d?0:f),s.length>=2?s(o,i):s(i);return}p(d?0:u??0)},[j,k]),ne=L.useCallback(e=>{let t=k.current,n=t.parentGroup?t.parentGroup.isMounting:e;if(ee.current=n,!e&&!t.enter){w.current=`entered`,C(`entered`);return}te.current=t.reduceMotion,t.onEnter?.(n),w.current=`entering`,C(`entering`)},[k]),re=L.useCallback(()=>{let e=k.current;if(!e.exit){w.current=`exited`,C(`exited`);return}te.current=e.reduceMotion,e.onExit?.(),w.current=`exiting`,C(`exiting`)},[k]),ie=L.useCallback((e,t)=>{if(A(),t===`entering`){let t=k.current;if(t.mountOnEnter||t.unmountOnExit){let e=t.nodeRef.current;e&&Gd(e)}ne(e)}else re()},[A,ne,re,k]);return mc(()=>(E.current=!0,T.current&&(T.current=!1,ie(!0,`entering`)),()=>{E.current=!1,A()}),[A,ie]),mc(()=>{if(!E.current)return;let e=w.current;t?e!==`entering`&&e!==`entered`&&ie(!1,`entering`):e===`entering`||e===`entered`?ie(!1,`exiting`):e===`exited`&&o&&(w.current=`unmounted`,C(`unmounted`))},[t,S,o,ie]),mc(()=>{if(S===`unmounted`||O.current===`unmounted`){O.current=S;return}if(O.current===S)return;O.current=S;let e=k.current;S===`entering`?(e.onEntering?.(ee.current),M(`entered`,`entering`)):S===`exiting`?(e.onExiting?.(),M(`exited`,`exiting`)):S===`entered`?e.onEntered?.(ee.current):S===`exited`&&e.onExited?.()},[k,M,S]),S===`unmounted`?null:(0,U.jsx)(lp.Provider,{value:null,children:v(S,y)})}var pp=`(prefers-reduced-motion: reduce)`,mp=0,hp=`0ms`,gp=()=>{},_p=()=>!1,vp=()=>!0,yp=()=>gp;function bp(e){let[t,n]=L.useState(()=>({enabled:e,matches:e?null:!1})),r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),mc(()=>{let r=t=>{n(n=>n.enabled===e&&n.matches===t?n:{enabled:e,matches:t})};if(!e){t.enabled&&r(!1);return}if(typeof window>`u`||typeof window.matchMedia!=`function`){r(!1);return}let i=window.matchMedia(pp),a=()=>{r(i.matches)};return a(),i.addEventListener(`change`,a),()=>{i.removeEventListener(`change`,a)}},[e,t.enabled]),r}var xp={...L}.useSyncExternalStore;function Sp(e){let t=e?vp:_p,[n,r]=L.useMemo(()=>{if(!e||typeof window>`u`||typeof window.matchMedia!=`function`)return[_p,yp];let t=window.matchMedia(pp);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[e]);return xp(r,n,t)}var Cp=xp===void 0?bp:Sp;function wp(e,t){let n=Cp(!t&&e===`system`),r=!t&&(e===`always`||e===`system`&&n!==!1);return L.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(e){return r?{duration:mp,delay:hp}:e}}),[r])}function Tp(e,t,n){return e===void 0||dd(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Ep(e,t,n){return typeof e==`function`?e(t,n):e}function Dp(e){if(e===void 0)return{};let t={};for(let n of Object.keys(e))rp(n,e[n])&&(t[n]=e[n]);return t}function Op(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function kp(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=W(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Dp({...i,...r}),s=Op(r),c=Op(i),l=t(o),u=W(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function Ap(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Ep(d[e],i),{props:{component:h,...g},internalRef:_}=kp({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=pd(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Tp(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}function jp(e){return Zs(`MuiCollapse`,e)}Qs(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var Mp={},Np=e=>{let{orientation:t,classes:n}=e;return Tl({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},jp,n)},Pp=K(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(jd(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),Fp=K(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Ip=K(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),Lp=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,disablePrefersReducedMotion:c=!1,easing:l,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:h,onExiting:g,orientation:_=`vertical`,slots:v=Mp,slotProps:y=Mp,style:b,timeout:x=Ou.standard,TransitionComponent:S=fp,...C}=n,w={...n,orientation:_,collapsedSize:o},T=Np(w),E=Ed(),D=L.useRef(null),O=L.useRef(null),ee=typeof o==`number`?`${o}px`:o,te=_===`horizontal`,k=te?`width`:`height`,A=wp(E.motion.reducedMotion,c),j=L.useRef(null),M=Nd(t,j),ne=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=Yd(j,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,d&&d(e,t)}),ie=Yd(j,(e,t)=>{let n=ne();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=Zd({style:b,timeout:x,easing:l},{mode:`enter`});if(x===`auto`&&!A.shouldReduceMotion){let e=E.transitions.getAutoHeightDuration(n);O.current=e}else O.current=null;let a=A.getTransitionTiming({duration:O.current??r,delay:void 0});e.style.transitionDuration=typeof a.duration==`string`?a.duration:`${a.duration}ms`,e.style[k]=`${n}px`,e.style.transitionTimingFunction=i,p&&p(e,t)}),ae=Yd(j,(e,t)=>{e.style[k]=`auto`,f&&f(e,t)}),N=Yd(j,e=>{e.style[k]=`${ne()}px`,m&&m(e)}),oe=Yd(j,h),se=Yd(j,e=>{let t=ne(),{duration:n,easing:r}=Zd({style:b,timeout:x,easing:l},{mode:`exit`});if(x===`auto`&&!A.shouldReduceMotion){let e=E.transitions.getAutoHeightDuration(t);O.current=e}else O.current=null;let i=A.getTransitionTiming({duration:O.current??n,delay:void 0});e.style.transitionDuration=typeof i.duration==`string`?i.duration:`${i.duration}ms`,e.style[k]=ee,e.style.transitionTimingFunction=r,g&&g(e)}),ce=r?e=>{r(j.current,e)}:void 0,P={slots:v,slotProps:y,component:s},[le,ue]=Ap(`root`,{ref:M,className:W(T.root,a),elementType:Pp,externalForwardedProps:P,ownerState:w,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...b}}}),[F,I]=Ap(`wrapper`,{ref:D,className:T.wrapper,elementType:Fp,externalForwardedProps:P,ownerState:w}),[de,fe]=Ap(`wrapperInner`,{className:T.wrapperInner,elementType:Ip,externalForwardedProps:P,ownerState:w});return(0,U.jsx)(S,{in:u,onEnter:re,onEntered:ae,onEntering:ie,onExit:N,onExited:oe,onExiting:se,addEndListener:ce,getAutoTimeout:x===`auto`?()=>O.current:void 0,reduceMotion:A.shouldReduceMotion,nodeRef:j,timeout:x===`auto`?null:x,...C,children:(e,{ownerState:t,...n})=>{let r={...w,state:e};return(0,U.jsx)(le,{...ue,className:W(ue.className,{entered:T.entered,exited:!u&&ee===`0px`&&T.hidden}[e]),ownerState:r,...n,children:(0,U.jsx)(F,{...I,ownerState:r,children:(0,U.jsx)(de,{...fe,ownerState:r,children:i})})})}})});Lp&&(Lp.muiSupportAuto=!0);function Rp(e){return Zs(`MuiPaper`,e)}Qs(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var zp=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return Tl({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},Rp,i)},Bp=K(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(jd(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,...$d(e,`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),Vp=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiPaper`}),r=Ed(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=zp(u);return(0,U.jsx)(Bp,{as:a,ownerState:u,className:W(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${kc(`#fff`,Vu(o))}, ${kc(`#fff`,Vu(o))})`}},...l.style}})}),Hp=L.createContext({});function Up(e){return Zs(`MuiAccordion`,e)}var Wp=Qs(`MuiAccordion`,[`root`,`heading`,`rounded`,`expanded`,`disabled`,`gutters`,`region`]),Gp=e=>{let{classes:t,square:n,expanded:r,disabled:i,disableGutters:a}=e;return Tl({root:[`root`,!n&&`rounded`,r&&`expanded`,i&&`disabled`,!a&&`gutters`],heading:[`heading`],region:[`region`]},Up,t)},eee=K(Vp,{name:`MuiAccordion`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Wp.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(jd(({theme:e})=>{let t={duration:e.transitions.duration.shortest};return{position:`relative`,...$d(e,[`margin`],t),overflowAnchor:`none`,"&::before":{position:`absolute`,left:0,top:-1,right:0,height:1,content:`""`,opacity:1,backgroundColor:(e.vars||e).palette.divider,...$d(e,[`opacity`,`background-color`],t)},"&:first-of-type":{"&::before":{display:`none`}},[`&.${Wp.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:`none`}}},[`&.${Wp.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),jd(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${Wp.expanded}`]:{margin:`16px 0`}}}]}))),Kp=K(`h3`,{name:`MuiAccordion`,slot:`Heading`})({all:`unset`}),qp=K(`div`,{name:`MuiAccordion`,slot:`Region`})({}),Jp=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAccordion`}),{children:r,className:i,defaultExpanded:a=!1,disabled:o=!1,disableGutters:s=!1,expanded:c,onChange:l,slots:u={},slotProps:d={},...f}=n,[p,m]=tp({controlled:c,default:a,name:`Accordion`,state:`expanded`}),h=L.useCallback(e=>{m(!p),l&&l(e,!p)},[p,l,m]),[g,..._]=L.Children.toArray(r),v=L.useMemo(()=>({expanded:p,disabled:o,disableGutters:s,toggle:h}),[p,o,s,h]),y={...n,disabled:o,disableGutters:s,expanded:p},b=Gp(y),x={slots:u,slotProps:d},[S,C]=Ap(`root`,{elementType:eee,externalForwardedProps:{...x,...f},className:W(b.root,i),shouldForwardComponentProp:!0,ownerState:y,ref:t}),[w,T]=Ap(`heading`,{elementType:Kp,externalForwardedProps:x,className:b.heading,ownerState:y}),[E,D]=Ap(`transition`,{elementType:Lp,externalForwardedProps:x,ownerState:y}),[O,ee]=Ap(`region`,{elementType:qp,externalForwardedProps:x,ownerState:y,className:b.region,additionalProps:{"aria-labelledby":g.props.id,id:g.props[`aria-controls`],role:`region`}});return(0,U.jsxs)(S,{...C,children:[(0,U.jsx)(w,{...T,children:(0,U.jsx)(Hp.Provider,{value:v,children:g})}),(0,U.jsx)(E,{in:p,timeout:`auto`,...D,children:(0,U.jsx)(O,{...ee,children:_})})]})});function Yp(e){return Zs(`MuiAccordionDetails`,e)}Qs(`MuiAccordionDetails`,[`root`]);var Xp=e=>{let{classes:t}=e;return Tl({root:[`root`]},Yp,t)},tee=K(`div`,{name:`MuiAccordionDetails`,slot:`Root`})(jd(({theme:e})=>({padding:e.spacing(1,2,2)}))),nee=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAccordionDetails`}),{className:r,...i}=n,a=n,o=Xp(a);return(0,U.jsx)(tee,{className:W(o.root,r),ref:t,ownerState:a,...i})});function Zp(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function Qp(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return L.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var $p={};function em(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:f}=e,p=L.useRef(null),m=l===!0,h=Qp({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=L.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`||!!(e.tagName===`A`&&e.href)},[t]),_=L.useMemo(()=>{let e=m?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,m||(e.disabled=a)):(e.role=`button`,!m&&a&&(e[`aria-disabled`]=a)),m?{...e,...h}:e},[a,m,h,s,t,c,o]);return{getButtonProps:L.useCallback((e=$p)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(m&&h.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(f?.(e),r?.(e),e.target===e.currentTarget&&!g()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{..._,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[_,a,m,h,g,d,f,u]),rootRef:p}}var tm=class e{static create(){return new e}static use(){let t=op(e.create).current,[n,r]=L.useState(!1);return t.shouldMount=n,t.setShouldMount=r,L.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=rm(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function nm(){return tm.use()}function rm(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var im=[];function am(e){L.useEffect(e,im)}var om=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function sm(){let e=op(om.create).current;return am(e.disposeEffect),e}function cm(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=L.useState(!1),f=sm(),p=L.useRef(!1),m=L.useRef(c);m.current=c;let h=c!=null,g=W(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),_={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},v=W(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),L.useEffect(()=>{!s&&h?p.current||(p.current=!0,f.start(l,()=>{p.current=!1,m.current?.()})):(p.current=!1,f.clear())},[f,h,s,l]),(0,U.jsx)(`span`,{className:g,style:_,children:(0,U.jsx)(`span`,{className:v})})}var lm=Qs(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),um=550,dm={},fm=[],ree=()=>{};function pm(e,t){let n=new Set(t),r=new Map,i=[];for(let t of e)n.has(t)?i.length>0&&(r.set(t,i),i=[]):i.push(t);let a=[];for(let e of t){let t=r.get(e);t&&a.push(...t),a.push(e)}return a.push(...i),a}function iee({event:e,element:t,center:n}){let r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0},i,a;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)i=Math.round(r.width/2),a=Math.round(r.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-r.left),a=Math.round(n-r.top)}let o;if(n)o=Math.sqrt((2*r.width**2+r.height**2)/3),o%2==0&&(o+=1);else{let e=Math.max(Math.abs((t?t.clientWidth:0)-i),i)*2+2,n=Math.max(Math.abs((t?t.clientHeight:0)-a),a)*2+2;o=Math.sqrt(e**2+n**2)}return{rippleX:i,rippleY:a,rippleSize:o}}var aee=Na`
|
|
70
|
-
0% {
|
|
71
|
-
transform: scale(0);
|
|
72
|
-
opacity: 0.1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
100% {
|
|
76
|
-
transform: scale(1);
|
|
77
|
-
opacity: 0.3;
|
|
78
|
-
}
|
|
79
|
-
`,mm=Na`
|
|
80
|
-
0% {
|
|
81
|
-
opacity: 1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
100% {
|
|
85
|
-
opacity: 0;
|
|
86
|
-
}
|
|
87
|
-
`,hm=Na`
|
|
88
|
-
0% {
|
|
89
|
-
transform: scale(1);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
50% {
|
|
93
|
-
transform: scale(0.92);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
100% {
|
|
97
|
-
transform: scale(1);
|
|
98
|
-
}
|
|
99
|
-
`;function gm(e){if(e.motion.reducedMotion===`always`)return null;let t=Ma`
|
|
100
|
-
&.${lm.rippleVisible} {
|
|
101
|
-
animation-name: ${aee};
|
|
102
|
-
animation-duration: ${um}ms;
|
|
103
|
-
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&.${lm.ripplePulsate} {
|
|
107
|
-
animation-duration: ${e.transitions.duration.shorter}ms;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
& .${lm.childLeaving} {
|
|
111
|
-
animation-name: ${mm};
|
|
112
|
-
animation-duration: ${um}ms;
|
|
113
|
-
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
& .${lm.childPulsate} {
|
|
117
|
-
animation-name: ${hm};
|
|
118
|
-
animation-duration: 2500ms;
|
|
119
|
-
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
120
|
-
animation-iteration-count: infinite;
|
|
121
|
-
animation-delay: 200ms;
|
|
122
|
-
}
|
|
123
|
-
`;return e.motion.reducedMotion===`system`?Ma`
|
|
124
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
125
|
-
${t}
|
|
126
|
-
}
|
|
127
|
-
`:t}var _m=K(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),vm=K(cm,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
128
|
-
opacity: 0;
|
|
129
|
-
position: absolute;
|
|
130
|
-
|
|
131
|
-
&.${lm.rippleVisible} {
|
|
132
|
-
opacity: 0.3;
|
|
133
|
-
transform: scale(1);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/*
|
|
137
|
-
* Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same
|
|
138
|
-
* element with equal specificity, so the later rule wins. 'child' must come
|
|
139
|
-
* before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus
|
|
140
|
-
* (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so
|
|
141
|
-
* it relies on this static 'opacity: 0' to disappear on blur instead of
|
|
142
|
-
* lingering until removal.
|
|
143
|
-
*/
|
|
144
|
-
& .${lm.child} {
|
|
145
|
-
opacity: 1;
|
|
146
|
-
display: block;
|
|
147
|
-
width: 100%;
|
|
148
|
-
height: 100%;
|
|
149
|
-
border-radius: 50%;
|
|
150
|
-
background-color: currentColor;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
& .${lm.childLeaving} {
|
|
154
|
-
opacity: 0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
& .${lm.childPulsate} {
|
|
158
|
-
position: absolute;
|
|
159
|
-
/* @noflip */
|
|
160
|
-
left: 0px;
|
|
161
|
-
top: 0;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
${({theme:e})=>gm(e)}
|
|
165
|
-
`,ym=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTouchRipple`}),r=wp(Ed().motion.reducedMotion,!1),{center:i=!1,classes:a=dm,className:o,...s}=n,[c,l]=L.useState({items:fm,order:fm}),u=c.items,d=L.useRef(0),f=L.useRef(null),p=L.useRef(!1);am(()=>(p.current=!0,()=>{p.current=!1})),L.useEffect(()=>{f.current&&=(f.current(),null)},[u]);let m=L.useRef(!1),h=sm(),g=L.useRef(null),_=L.useRef(null),v=np(e=>{p.current&&l(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:pm(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),y=np(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=d.current;d.current+=1,l(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:pm(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=a}),b=np((e=dm,t=dm,n=ree)=>{let{pulsate:r=!1,center:a=i||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&m.current){m.current=!1;return}e?.type===`touchstart`&&(m.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=iee({event:e,element:o?null:_.current,center:a});e?.touches?g.current===null&&(g.current=()=>{y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},h.start(80,()=>{g.current&&=(g.current(),null)})):y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),x=np(()=>{b(dm,{pulsate:!0})}),S=np((e,t)=>{if(h.clear(),e?.type===`touchend`&&g.current){g.current(),g.current=null,h.start(0,()=>{S(e,t)});return}g.current=null,l(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:pm(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=t});L.useImperativeHandle(t,()=>({pulsate:x,start:b,stop:S}),[x,b,S]);let C=new Map(u.map(e=>[e.key,e])),w=c.order.map(e=>C.get(e)).filter(Boolean);return(0,U.jsx)(_m,{className:W(lm.root,a.root,o),ref:_,...s,children:w.map(e=>(0,U.jsx)(vm,{classes:{ripple:W(a.ripple,lm.ripple),rippleVisible:W(a.rippleVisible,lm.rippleVisible),ripplePulsate:W(a.ripplePulsate,lm.ripplePulsate),child:W(a.child,lm.child),childLeaving:W(a.childLeaving,lm.childLeaving),childPulsate:W(a.childPulsate,lm.childPulsate)},timeout:r.shouldReduceMotion?0:um,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>v(e.key)},e.key))})});function bm(e){return Zs(`MuiButtonBase`,e)}var xm=Qs(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),Sm=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=Tl({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},bm,a);return n&&!i&&r&&(o.root+=` ${r}`),o},Cm=K(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${xm.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),wm=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,LinkComponent:g=`a`,nativeButton:_,onBlur:v,onClick:y,onContextMenu:b,onDragLeave:x,onFocus:S,onFocusVisible:C,onKeyDown:w,onKeyUp:T,onMouseDown:E,onMouseLeave:D,onMouseUp:O,onTouchEnd:ee,onTouchMove:te,onTouchStart:k,tabIndex:A=0,TouchRippleProps:j,touchRippleRef:M,type:ne,...re}=n,ie=!!(re.href||re.to),ae=!!re.formAction,N=s;N===`button`&&ie&&(N=g);let oe=typeof N==`string`?N===`button`:h??!1,se=_??oe,ce=nm(),P=Nd(ce.ref,M),[le,ue]=L.useState(!1);(c||m)&&le&&ue(!1);let F=np(e=>{d&&!e.repeat&&le&&e.key===` `&&ce.stop(e,()=>{ce.start(e)})}),I=np(e=>{d&&e.key===` `&&le&&!e.defaultPrevented&&ce.stop(e,()=>{ce.pulsate(e)})}),{getButtonProps:de,rootRef:fe}=em({nativeButton:se,nativeButtonProp:_,internalNativeButton:oe,allowInferredHostMismatch:ie||typeof N==`string`,disabled:c,type:ne,hasFormAction:ae,tabIndex:A,onBeforeKeyDown:F,onBeforeKeyUp:I}),{onClick:pe,onKeyDown:me,onKeyUp:he,...ge}=de({onClick:y,onKeyDown:w,onKeyUp:T});L.useImperativeHandle(r,()=>({focusVisible:()=>{ue(!0),fe.current.focus()}}),[fe]);let _e=ce.shouldMount&&!l&&!c;L.useEffect(()=>{le&&d&&!l&&ce.pulsate()},[l,d,le,ce]);let ve=Tm(ce,`start`,E,u),ye=Tm(ce,`stop`,b,u),be=Tm(ce,`stop`,x,u),xe=Tm(ce,`stop`,O,u),Se=Tm(ce,`stop`,e=>{le&&e.preventDefault(),D&&D(e)},u),R=Tm(ce,`start`,k,u),z=Tm(ce,`stop`,ee,u),B=Tm(ce,`stop`,te,u),Ce=Tm(ce,`stop`,e=>{Zp(e.target)||ue(!1),v&&v(e)},!1),we=np(e=>{fe.current||=e.currentTarget,!m&&Zp(e.target)&&(ue(!0),C&&C(e)),S&&S(e)}),Te={};ie&&(Te.tabIndex=c?-1:A,c&&(Te[`aria-disabled`]=c),Te.type=ne);let Ee=Nd(t,fe),De={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:m,tabIndex:A,focusVisible:le},Oe=Sm(De);return(0,U.jsxs)(Cm,{as:N,className:W(Oe.root,o),ownerState:De,onBlur:Ce,onClick:pe,onContextMenu:ye,onFocus:we,onKeyDown:me,onKeyUp:he,onMouseDown:ve,onMouseLeave:Se,onMouseUp:xe,onDragLeave:be,onTouchEnd:z,onTouchMove:B,onTouchStart:R,ref:Ee,...ie?Te:ge,...re,children:[a,_e?(0,U.jsx)(ym,{ref:P,center:i,...j}):null]})});function Tm(e,t,n,r=!1){return np(i=>(n&&n(i),r||e[t](i),!0))}var Em=e=>{let{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return Tl({root:[`root`,n&&`expanded`,r&&`disabled`,!i&&`gutters`],focusVisible:[`focusVisible`],content:[`content`,n&&`expanded`],expandIconWrapper:[`expandIconWrapper`,n&&`expanded`]},ad,t)},Dm=K(wm,{name:`MuiAccordionSummary`,slot:`Root`})(jd(({theme:e})=>({display:`flex`,width:`100%`,minHeight:48,padding:e.spacing(0,2),...$d(e,[`min-height`,`background-color`],{duration:e.transitions.duration.shortest}),[`&.${od.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${od.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${od.disabled})`]:{cursor:`pointer`},variants:[{props:e=>!e.disableGutters,style:{[`&.${od.expanded}`]:{minHeight:64}}}]}))),Om=K(`span`,{name:`MuiAccordionSummary`,slot:`Content`})(jd(({theme:e})=>({display:`flex`,textAlign:`start`,flexGrow:1,margin:`12px 0`,variants:[{props:e=>!e.disableGutters,style:{...$d(e,[`margin`],{duration:e.transitions.duration.shortest}),[`&.${od.expanded}`]:{margin:`20px 0`}}}]}))),km=K(`span`,{name:`MuiAccordionSummary`,slot:`ExpandIconWrapper`})(jd(({theme:e})=>({display:`flex`,color:(e.vars||e).palette.action.active,transform:`rotate(0deg)`,...$d(e,`transform`,{duration:e.transitions.duration.shortest}),[`&.${od.expanded}`]:{transform:`rotate(180deg)`}}))),Am=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAccordionSummary`}),{children:r,className:i,expandIcon:a,focusVisibleClassName:o,onClick:s,slots:c,slotProps:l,...u}=n,{disabled:d=!1,disableGutters:f,expanded:p,toggle:m}=L.useContext(Hp),h=e=>{m&&m(e),s&&s(e)},g={...n,expanded:p,disabled:d,disableGutters:f},_=Em(g),v={slots:c,slotProps:l},[y,b]=Ap(`root`,{ref:t,shouldForwardComponentProp:!0,className:W(_.root,i),elementType:Dm,externalForwardedProps:{...v,...u},ownerState:g,additionalProps:{focusRipple:!1,disableRipple:!0,internalNativeButton:!0,disabled:d,"aria-expanded":p,focusVisibleClassName:W(_.focusVisible,o)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),h(t)}})}),[x,S]=Ap(`content`,{className:_.content,elementType:Om,externalForwardedProps:v,ownerState:g}),[C,w]=Ap(`expandIconWrapper`,{className:_.expandIconWrapper,elementType:km,externalForwardedProps:v,ownerState:g});return(0,U.jsxs)(y,{...b,children:[(0,U.jsx)(x,{...S,children:r}),a&&(0,U.jsx)(C,{...w,children:a})]})});function jm(e){return typeof e.main==`string`}function Mm(e,t=[]){if(!jm(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Nm(e=[]){return([,t])=>t&&Mm(t,e)}function Pm(e){return Zs(`MuiAlert`,e)}var Fm=Qs(`MuiAlert`,[`root`,`action`,`icon`,`message`,`filled`,`colorSuccess`,`colorInfo`,`colorWarning`,`colorError`,`outlined`,`standard`]);function Im(e){return Zs(`MuiCircularProgress`,e)}Qs(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var Lm=44,Rm=Na`
|
|
166
|
-
0% {
|
|
167
|
-
transform: rotate(0deg);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
100% {
|
|
171
|
-
transform: rotate(360deg);
|
|
172
|
-
}
|
|
173
|
-
`,zm=Na`
|
|
174
|
-
0% {
|
|
175
|
-
stroke-dasharray: 1px, 200px;
|
|
176
|
-
stroke-dashoffset: 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
50% {
|
|
180
|
-
stroke-dasharray: 100px, 200px;
|
|
181
|
-
stroke-dashoffset: -15px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
100% {
|
|
185
|
-
stroke-dasharray: 1px, 200px;
|
|
186
|
-
stroke-dashoffset: -126px;
|
|
187
|
-
}
|
|
188
|
-
`,Bm=typeof Rm==`string`?null:Ma`
|
|
189
|
-
animation: ${Rm} 1.4s linear infinite;
|
|
190
|
-
`,Vm=typeof zm==`string`?null:Ma`
|
|
191
|
-
animation: ${zm} 1.4s ease-in-out infinite;
|
|
192
|
-
`,Hm=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Tl({root:[`root`,n,`color${q(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Im,t)},Um=K(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${q(n.color)}`]]}})(jd(({theme:e})=>{let t=Qd(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...$d(e,`transform`)}},{props:{variant:`indeterminate`},style:Bm||{animation:`${Rm} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),Wm=K(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Gm=K(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(jd(({theme:e})=>{let t=Qd(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...$d(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Vm||{animation:`${zm} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),Km=K(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(jd(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),qm=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=Hm(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((Lm-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,U.jsx)(Um,{className:W(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,U.jsxs)(Wm,{className:v.svg,ownerState:_,viewBox:`${Lm/2} ${Lm/2} ${Lm} ${Lm}`,children:[o?(0,U.jsx)(Km,{className:v.track,ownerState:_,cx:Lm,cy:Lm,r:(Lm-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,U.jsx)(Gm,{className:v.circle,style:y,ownerState:_,cx:Lm,cy:Lm,r:(Lm-d)/2,fill:`none`,strokeWidth:d})]})})});function Jm(e){return Zs(`MuiIconButton`,e)}var Ym=Qs(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),Xm=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return Tl({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${q(r)}`,i&&`edge${q(i)}`,`size${q(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Jm,t)},Zm=K(wm,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${q(n.color)}`],n.edge&&t[`edge${q(n.edge)}`],t[`size${q(n.size)}`]]}})(jd(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...$d(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),jd(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Ym.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Ym.loading}`]:{color:`transparent`}}))),Qm=K(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),$m=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=$f(u),h=f??(0,U.jsx)(qm,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=Xm(g);return(0,U.jsxs)(Zm,{id:d?m:u,className:W(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,U.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,U.jsx)(Qm,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),eh=Jf((0,U.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),th=Jf((0,U.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),nh=Jf((0,U.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),rh=Jf((0,U.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),ih=Jf((0,U.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),ah=e=>{let{variant:t,color:n,severity:r,classes:i}=e;return Tl({root:[`root`,`color${q(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},Pm,i)},oh=K(Vp,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})(jd(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(Nm([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Fm.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Nm([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Fm.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(Nm([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),sh=K(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),ch=K(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),lh=K(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),uh={success:(0,U.jsx)(eh,{fontSize:`inherit`}),warning:(0,U.jsx)(th,{fontSize:`inherit`}),error:(0,U.jsx)(nh,{fontSize:`inherit`}),info:(0,U.jsx)(rh,{fontSize:`inherit`})},dh=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,icon:c,iconMapping:l=uh,onClose:u,role:d=`alert`,severity:f=`success`,slotProps:p={},slots:m={},variant:h=`standard`,...g}=n,_={...n,color:s,severity:f,variant:h,colorSeverity:s||f},v=ah(_),y={slots:m,slotProps:p},[b,x]=Ap(`root`,{ref:t,shouldForwardComponentProp:!0,className:W(v.root,a),elementType:oh,externalForwardedProps:{...y,...g},ownerState:_,additionalProps:{role:d,elevation:0}}),[S,C]=Ap(`icon`,{className:v.icon,elementType:sh,externalForwardedProps:y,ownerState:_}),[w,T]=Ap(`message`,{className:v.message,elementType:ch,externalForwardedProps:y,ownerState:_}),[E,D]=Ap(`action`,{className:v.action,elementType:lh,externalForwardedProps:y,ownerState:_}),[O,ee]=Ap(`closeButton`,{elementType:$m,externalForwardedProps:y,ownerState:_}),[te,k]=Ap(`closeIcon`,{elementType:ih,externalForwardedProps:y,ownerState:_});return(0,U.jsxs)(b,{...x,children:[c===!1?null:(0,U.jsx)(S,{...C,children:c||l[f]||uh[f]}),(0,U.jsx)(w,{...T,children:i}),r==null?null:(0,U.jsx)(E,{...D,children:r}),r==null&&u?(0,U.jsx)(E,{...D,children:(0,U.jsx)(O,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:u,...ee,children:(0,U.jsx)(te,{fontSize:`small`,...k})})}):null]})});function fh(e){return Zs(`MuiTypography`,e)}var ph=Qs(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]),oee=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return Tl({root:[`root`,i,e.align!==`inherit`&&`align${q(t)}`,n&&`gutterBottom`,r&&`noWrap`]},fh,a)},see=K(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${q(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(jd(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${q(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),mh={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},J=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=mh,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u},p=o||u[l]||mh[l]||`span`,m=oee(f);return(0,U.jsx)(see,{as:p,ref:t,className:W(m.root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function cee(e){return Zs(`MuiAppBar`,e)}Qs(`MuiAppBar`,[`root`,`positionFixed`,`positionAbsolute`,`positionSticky`,`positionStatic`,`positionRelative`,`colorDefault`,`colorPrimary`,`colorSecondary`,`colorInherit`,`colorTransparent`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`]);var lee=e=>{let{color:t,position:n,classes:r}=e;return Tl({root:[`root`,`color${q(t)}`,`position${q(n)}`]},cee,r)},hh=(e,t)=>e?`${e.replace(`)`,``)}, ${t})`:t,uee=K(Vp,{name:`MuiAppBar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${q(n.position)}`],t[`color${q(n.color)}`]]}})(jd(({theme:e})=>({display:`flex`,flexDirection:`column`,width:`100%`,boxSizing:`border-box`,flexShrink:0,variants:[{props:{position:`fixed`},style:{position:`fixed`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0,"@media print":{position:`absolute`}}},{props:{position:`absolute`},style:{position:`absolute`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`sticky`},style:{position:`sticky`,zIndex:(e.vars||e).zIndex.appBar,top:0,left:`auto`,right:0}},{props:{position:`static`},style:{position:`static`}},{props:{position:`relative`},style:{position:`relative`}},{props:{color:`inherit`},style:{"--AppBar-color":`inherit`,color:`var(--AppBar-color)`}},{props:{color:`default`},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles(`dark`,{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Nm([`contrastText`])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:e=>e.enableColorOnDark===!0&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`}},{props:e=>e.enableColorOnDark===!1&&![`inherit`,`transparent`].includes(e.color),style:{backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundColor:e.vars?hh(e.vars.palette.AppBar.darkBg,`var(--AppBar-background)`):null,color:e.vars?hh(e.vars.palette.AppBar.darkColor,`var(--AppBar-color)`):null})}},{props:{color:`transparent`},style:{"--AppBar-background":`transparent`,"--AppBar-color":`inherit`,backgroundColor:`var(--AppBar-background)`,color:`var(--AppBar-color)`,...e.applyStyles(`dark`,{backgroundImage:`none`})}}]}))),gh=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAppBar`}),{className:r,color:i=`primary`,enableColorOnDark:a=!1,position:o=`fixed`,...s}=n,c={...n,color:i,position:o,enableColorOnDark:a},l=lee(c);return(0,U.jsx)(uee,{square:!0,component:`header`,ownerState:c,elevation:4,className:W(l.root,r,o===`fixed`&&`mui-fixed`),ref:t,...s})});function dee(){let[,e]=L.useState({});return L.useCallback(()=>{e({})},[])}function _h(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}function vh(e){let t=L.useRef({});return L.useEffect(()=>{t.current=e}),t.current}function yh({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function bh(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function xh(e={}){let{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i=`any`,stringify:a,trim:o=!1}=e;return(e,{inputValue:s,getOptionLabel:c})=>{let l=o?s.trim():s;n&&(l=l.toLowerCase()),t&&(l=bh(l));let u=l?e.filter(e=>{let r=(a||c)(e);return n&&(r=r.toLowerCase()),t&&(r=bh(r)),i===`start`?r.startsWith(l):r.includes(l)}):e;return typeof r==`number`?u.slice(0,r):u}}var Sh=xh(),Ch=5,wh=e=>e.current!==null&&_h(e.current.parentElement,document.activeElement),Th=(e,t)=>e===t,Eh=[];function Dh(e,t,n,r){if(t||e==null||r)return``;let i=n(e);return typeof i==`string`?i:``}function Oh(e){let{unstable_isActiveElementInListbox:t=wh,unstable_classNamePrefix:n=`Mui`,autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:c=!1,componentName:l=`useAutocomplete`,defaultValue:u=e.multiple?Eh:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:h=!1,filterOptions:g=Sh,filterSelectedOptions:_=!1,freeSolo:v=!1,getOptionDisabled:y,getOptionKey:b,getOptionLabel:x=e=>e.label??e,groupBy:S,handleHomeEndKeys:C=!e.freeSolo,id:w,includeInputInList:T=!1,inputValue:E,isOptionEqualToValue:D=Th,multiple:O=!1,onChange:ee,onClose:te,onHighlightChange:k,onInputChange:A,onOpen:j,open:M,openOnFocus:ne=!1,options:re,readOnly:ie=!1,renderValue:ae,resetHighlightOnMouseLeave:N=!1,selectOnFocus:oe=!e.freeSolo,value:se}=e,ce=Qc(w),P=x;P=e=>{let t=x(e);return typeof t==`string`?t:String(t)};let le=L.useRef(!1),ue=L.useRef(!0),F=L.useRef(null),I=L.useRef(null),de=L.useRef(!1),fe=L.useRef(!1),[pe,me]=L.useState(null),[he,ge]=L.useState(-1),_e=i?0:-1,ve=L.useRef(_e),ye=L.useRef(null),be=L.useRef(!1),xe=L.useRef(!1),Se=L.useRef(Dh(u??se,O,P)).current,[R,z]=ep({controlled:se,default:u,name:l}),[B,Ce]=ep({controlled:E,default:Se,name:l,state:`inputValue`}),[we,Te]=L.useState(!1),Ee=L.useCallback((e,t,n)=>{if(!(O?R.length<t.length:t!==null)&&!s&&!(n===`reset`&&v&&!O&&t===null))return;let r=Dh(t,O,P,ae);B!==r&&(Ce(r),A&&A(e,r,n))},[P,B,O,A,Ce,s,v,R,ae]),[De,Oe]=ep({controlled:M,default:!1,name:l,state:`open`}),[ke,Ae]=L.useState(!0),je=!O&&R!=null&&B===P(R),V=De&&!ie,Me=L.useMemo(()=>O?R:R==null?[]:[R],[O,R]),Ne=L.useMemo(()=>D!==Th||Me.length===0?null:new Set(Me),[D,Me]),Pe=L.useCallback(e=>Ne?Ne.has(e):Me.some(t=>t!=null&&D(e,t)),[D,Me,Ne]),Fe=V?g(re.filter(e=>!(_&&Pe(e))),{inputValue:je&&ke?``:B,getOptionLabel:P}):[],Ie=vh({filteredOptions:Fe,value:R,inputValue:B});L.useEffect(()=>{let e=R!==Ie.value;we&&!e||v&&(!e||R==null&&Ie.value===void 0)||Ee(null,R,`reset`)},[R,Ee,we,Ie.value,v]);let Le=De&&Fe.length>0&&!ie,Re=md(e=>{e===-1?F.current.focus():pe.querySelector(`[data-item-index="${e}"]`).focus()});L.useEffect(()=>{O&&he>R.length-1&&(ge(-1),Re(-1))},[R,O,he,Re]);function ze(e,t){if(!I.current||e<0||e>=Fe.length)return-1;let n=e;for(;;){let r=I.current.querySelector(`[data-option-index="${n}"]`),i=m?!1:!r||r.disabled||r.getAttribute(`aria-disabled`)===`true`;if(r&&r.hasAttribute(`tabindex`)&&!i)return n;if(n=t===`next`?(n+1)%Fe.length:(n-1+Fe.length)%Fe.length,n===e)return-1}}let Be=md(({index:e,reason:t,preserveScroll:r=!1})=>{if(F.current==null&&I.current==null||(e===-1?F.current.removeAttribute(`aria-activedescendant`):F.current.setAttribute(`aria-activedescendant`,`${ce}-option-${e}`),!I.current))return;let i=I.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=I.current;if(I.current.getAttribute(`role`)!==`listbox`&&(a=I.current.parentElement.querySelector(`[role="listbox"]`)),!a)return;if(e===-1){r||(a.scrollTop=0);return}let o=I.current.querySelector(`[data-option-index="${e}"]`);if(o&&(o.classList.add(`${n}-focused`),t===`keyboard`&&o.classList.add(`${n}-focusVisible`),a.scrollHeight>a.clientHeight&&t!==`mouse`&&t!==`touch`)){let e=o,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<a.scrollTop&&(a.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),Ve=md(({event:e,index:t,reason:n,preserveScroll:r=!1})=>{ve.current=t,ye.current=n??null,k&&[`mouse`,`keyboard`,`touch`].includes(n)&&k(e,t===-1?null:Fe[t],n),Be({index:t,reason:n,preserveScroll:r})}),He=md(({index:e})=>{ve.current=e,Be({index:e,reason:ye.current})}),Ue=md(({event:e,diff:t,direction:n=`next`,reason:i,preserveScroll:a})=>{if(!V)return;i===`keyboard`&&(be.current=!1,xe.current=!1);let o=ze((()=>{let e=Fe.length-1;if(t===`reset`)return _e;if(t===`start`)return 0;if(t===`end`)return e;let n=ve.current+t;return n<0?n===-1&&T?-1:h&&ve.current!==-1||Math.abs(t)>1?0:e:n>e?n===e+1&&T?-1:h||Math.abs(t)>1?e:0:n})(),n);if(Ve({index:o,reason:i,event:e,preserveScroll:a}),r&&t!==`reset`)if(o===-1)F.current.value=B;else{let e=P(Fe[o]);F.current.value=e,e.toLowerCase().indexOf(B.toLowerCase())===0&&B.length>0&&F.current.setSelectionRange(B.length,e.length)}}),We=!yh({array1:Ie.filteredOptions,array2:Fe,parser:P}),Ge=()=>{if(ve.current!==-1&&!yh({array1:Ie.filteredOptions,array2:Fe,parser:P})&&Ie.inputValue===B&&(O?R.length===Ie.value.length&&Ie.value.every((e,t)=>P(R[t])===P(e)):((e,t)=>(e?P(e):``)===(t?P(t):``))(Ie.value,R))){let e=Ie.filteredOptions[ve.current];if(e)return Fe.findIndex(t=>P(t)===P(e))}return-1},Ke=L.useCallback(()=>{if(!V)return;let e=Ge();if(e!==-1){He({index:e});return}let t=O?R[0]:R;if(Fe.length===0||t==null){let e=We&&Ie.inputValue===B&&Ie.filteredOptions?.length>0&&Fe.length>Ie.filteredOptions.length&&Ie.filteredOptions.every((e,t)=>P(e)===P(Fe[t]));Ue({diff:`reset`,preserveScroll:e});return}if(I.current){if(t!=null){let e=Fe[ve.current];if(O&&e&&R.findIndex(t=>D(e,t))!==-1&&Ie.filteredOptions?.length>0){He({index:ve.current});return}let n=Fe.findIndex(e=>D(e,t));n===-1?Ue({diff:`reset`}):Ve({index:n});return}if(ve.current>=Fe.length-1){Ve({index:Fe.length-1});return}Ve({index:ve.current})}},[Fe.length,!O&&R,Ue,Ve,He,V,B,O]),qe=md(e=>{Qf(I,e),e&&Ke()});L.useEffect(()=>{(We||V&&!f)&&Ke()},[Ke,We,V,f]),L.useEffect(()=>{if(typeof window>`u`)return;let e=()=>{fe.current=!0};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e)}},[]);let Je=e=>{De||(Oe(!0),Ae(!0),xe.current=!1,j&&j(e))},Ye=(e,t)=>{De&&(Oe(!1),be.current=!1,ye.current=null,te&&te(e,t))},Xe=(e,t,n,r)=>{if(O){if(R.length===t.length&&R.every((e,n)=>e===t[n]))return}else if(R===t)return;ee&&ee(e,t,n,r),z(t)},Ze=(e,t,n=`selectOption`,r=`options`)=>{let i=n,a=t;if(O){a=Array.isArray(R)?R.slice():[];let e=a.findIndex(e=>D(t,e));e===-1?a.push(t):r!==`freeSolo`&&(a.splice(e,1),i=`removeOption`)}Ee(e,a,i),Xe(e,a,i,{option:t}),!f&&(!e||!e.ctrlKey&&!e.metaKey)&&Ye(e,i),(o===!0||o===`touch`&&xe.current||o===`mouse`&&!xe.current)&&F.current.blur()};function Qe(e,t){if(e===-1)return-1;let n=e;for(;;){if(t===`next`&&n===R.length||t===`previous`&&n===-1)return-1;let e=pe.querySelector(`[data-item-index="${n}"]`);if(!e||!e.hasAttribute(`tabindex`)||e.disabled||e.getAttribute(`aria-disabled`)===`true`)n+=t===`next`?1:-1;else return n}}let $e=(e,t)=>{if(!O)return;B===``&&Ye(e,`toggleInput`);let n=he;he===-1&&t===`previous`?(n=R.length-1,v&&B!==``&&(Ce(``),A&&A(e,``,`reset`))):(n+=t===`next`?1:-1,n<0&&(n=0),n===R.length&&(n=-1)),n=Qe(n,t),ge(n),Re(n)},et=e=>{Ce(``),A&&A(e,``,`clear`),Xe(e,O?[]:null,`clear`)},tt=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(he!==-1&&![`ArrowLeft`,`ArrowRight`].includes(t.key)&&(ge(-1),Re(-1)),t.which!==229))switch(t.key){case`Home`:V&&C&&(t.preventDefault(),Ue({diff:`start`,direction:`next`,reason:`keyboard`,event:t}));break;case`End`:V&&C&&(t.preventDefault(),Ue({diff:`end`,direction:`previous`,reason:`keyboard`,event:t}));break;case`PageUp`:t.preventDefault(),Ue({diff:-5,direction:`previous`,reason:`keyboard`,event:t}),Je(t);break;case`PageDown`:t.preventDefault(),Ue({diff:Ch,direction:`next`,reason:`keyboard`,event:t}),Je(t);break;case`ArrowDown`:t.preventDefault(),Ue({diff:1,direction:`next`,reason:`keyboard`,event:t}),Je(t);break;case`ArrowUp`:t.preventDefault(),Ue({diff:-1,direction:`previous`,reason:`keyboard`,event:t}),Je(t);break;case`ArrowLeft`:{let e=F.current;if(!(e&&e.selectionStart===0&&e.selectionEnd===0))return;!O&&ae&&R!=null?(v&&B!==``&&(Ce(``),A&&A(t,``,`reset`)),ge(0),Re(0)):$e(t,`previous`);break}case`ArrowRight`:!O&&ae?(ge(-1),Re(-1)):$e(t,`next`);break;case`Enter`:{let e=V&&ve.current!==-1&&ye.current===null,n=v&&!ke&&e,i=!v||ke||!e,a=n&&!be.current;if(ve.current!==-1&&V&&i&&!be.current){let e=Fe[ve.current],n=y?y(e):!1;if(t.preventDefault(),n)return;Ze(t,e,`selectOption`),r&&F.current.setSelectionRange(F.current.value.length,F.current.value.length)}else v&&B!==``&&je===!1?((O||a)&&t.preventDefault(),Ze(t,B,`createOption`,`freeSolo`)):V&&be.current&&(t.preventDefault(),Ye(t,`escape`));break}case`Escape`:V?(t.preventDefault(),t.stopPropagation(),Ye(t,`escape`)):c&&(B!==``||O&&R.length>0||ae)&&(t.preventDefault(),t.stopPropagation(),et(t));break;case`Backspace`:if(de.current){de.current=!1;break}if(O&&!ie&&B===``&&R.length>0){let e=he===-1?R.length-1:he,n=R.slice();n.splice(e,1),Xe(t,n,`removeOption`,{option:R[e]}),he!==-1&&(de.current=!0,setTimeout(()=>{de.current&&=!1},0))}!O&&ae&&!ie&&B===``&&Xe(t,null,`removeOption`,{option:R});break;case`Delete`:if(O&&!ie&&B===``&&R.length>0&&he!==-1){let e=he,n=R.slice();n.splice(e,1),Xe(t,n,`removeOption`,{option:R[e]})}!O&&ae&&!ie&&B===``&&Xe(t,null,`removeOption`,{option:R});break;default:}},nt=e=>{if(Te(!0),he!==-1&&(ge(-1),Re(-1)),fe.current){fe.current=!1;return}ne&&!le.current&&Je(e)},rt=e=>{if(t(I)){F.current.focus();return}Te(!1),ue.current=!0,le.current=!1,a&&ve.current!==-1&&V&&ye.current!==`mouse`&&ye.current!==`touch`?Ze(e,Fe[ve.current],`blur`):a&&v&&B!==``?Ze(e,B,`blur`,`freeSolo`):s&&Ee(e,R,`blur`),Ye(e,`blur`)},it=e=>{let t=e.target.value,n=B!==t;n&&(Ce(t),be.current=!1,A&&A(e,t,`input`)),t===``?!d&&!O&&!ae&&Xe(e,null,`clear`):Je(e),n&&Ae(!1)},at=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));ve.current===t?ye.current=`mouse`:Ve({event:e,index:t,reason:`mouse`}),xe.current||(be.current=!1)},ot=e=>{!N||ve.current===-1||ye.current!==`mouse`||xe.current||Ve({event:e,index:-1,reason:`mouse`,preserveScroll:!0})},H=e=>{be.current=!1,Ve({event:e,index:Number(e.currentTarget.getAttribute(`data-option-index`)),reason:`touch`}),xe.current=!0},st=e=>{let t=Number(e.currentTarget.getAttribute(`data-option-index`));Ze(e,Fe[t],`selectOption`),xe.current=!1},ct=e=>t=>{let n=R.slice();n.splice(e,1),Xe(t,n,`removeOption`,{option:R[e]})},lt=e=>{Xe(e,null,`removeOption`,{option:R})},ut=e=>{De?Ye(e,`toggleInput`):Je(e)},dt=e=>{_h(e.currentTarget,e.target)&&(pe&&!_h(pe,e.target)||e.target.getAttribute(`id`)!==ce&&e.preventDefault())},ft=e=>{_h(e.currentTarget,e.target)&&(pe&&!_h(pe,e.target)||(F.current.focus(),oe&&ue.current&&F.current.selectionEnd-F.current.selectionStart===0&&F.current.select(),ue.current=!1))},pt=e=>{!p&&(B===``||!De)&&e.button===0&&ut(e)},mt=v&&B.length>0;mt||=O?R.length>0:R!==null;let ht=Fe;return S&&(ht=Fe.reduce((e,t,n)=>{let r=S(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),p&&we&&rt(),{getRootProps:(e={})=>({...e,onKeyDown:tt(e),onMouseDown:dt,onClick:ft}),getInputLabelProps:()=>({id:`${ce}-label`,htmlFor:ce}),getInputProps:()=>({id:ce,value:B,onBlur:rt,onFocus:nt,onChange:it,onMouseDown:pt,"aria-activedescendant":V?``:null,"aria-autocomplete":r?`both`:`list`,"aria-controls":Le?`${ce}-listbox`:void 0,"aria-expanded":Le,autoComplete:`off`,ref:F,autoCapitalize:`none`,spellCheck:`false`,role:`combobox`,disabled:p}),getClearProps:()=>({tabIndex:-1,type:`button`,onClick:e=>{le.current=!0,et(e)}}),getItemProps:({index:e=0}={})=>({...O&&{key:e},"data-item-index":e,tabIndex:-1,onFocus:()=>{he!==e&&ge(e)},...!ie&&{onDelete:O?ct(e):lt}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:`button`,onClick:ut}),getListboxProps:(e={})=>({...e,role:`listbox`,id:`${ce}-listbox`,"aria-labelledby":`${ce}-label`,"aria-multiselectable":O||void 0,ref:qe,onMouseDown:t=>{e.onMouseDown?.(t),!t.defaultMuiPrevented&&t.preventDefault()},onScroll:t=>{e.onScroll?.(t),!t.defaultMuiPrevented&&xe.current&&(be.current=!0)},onMouseLeave:t=>{e.onMouseLeave?.(t),!t.defaultMuiPrevented&&ot(t)}}),getOptionProps:({index:e,option:t})=>{let n=Pe(t),r=y?y(t):!1;return{key:b?.(t)??P(t),tabIndex:-1,role:`option`,id:`${ce}-option-${e}`,onMouseMove:at,onClick:st,onTouchStart:H,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:ce,inputValue:B,value:R,dirty:mt,expanded:V&&pe,popupOpen:V,focused:we||he!==-1,anchorEl:pe,setAnchorEl:me,focusedItem:he,groupedOptions:ht}}var kh=`bottom`,Ah=`right`,jh=`left`,Mh=`auto`,Nh=[`top`,kh,Ah,jh],Ph=`start`,Fh=`clippingParents`,Ih=`viewport`,Lh=`popper`,Rh=`reference`,zh=Nh.reduce(function(e,t){return e.concat([t+`-`+Ph,t+`-end`])},[]),Bh=[].concat(Nh,[Mh]).reduce(function(e,t){return e.concat([t,t+`-`+Ph,t+`-end`])},[]),Vh=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function Hh(e){return e?(e.nodeName||``).toLowerCase():null}function Uh(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wh(e){return e instanceof Uh(e).Element||e instanceof Element}function Gh(e){return e instanceof Uh(e).HTMLElement||e instanceof HTMLElement}function Kh(e){return typeof ShadowRoot>`u`?!1:e instanceof Uh(e).ShadowRoot||e instanceof ShadowRoot}function qh(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!Gh(i)||!Hh(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function Jh(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!Gh(r)||!Hh(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var Yh={name:`applyStyles`,enabled:!0,phase:`write`,fn:qh,effect:Jh,requires:[`computeStyles`]};function Xh(e){return e.split(`-`)[0]}var Zh=Math.max,Qh=Math.min,$h=Math.round;function eg(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function tg(){return!/^((?!chrome|android).)*safari/i.test(eg())}function ng(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Gh(e)&&(i=e.offsetWidth>0&&$h(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&$h(r.height)/e.offsetHeight||1);var o=(Wh(e)?Uh(e):window).visualViewport,s=!tg()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function rg(e){var t=ng(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ig(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Kh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ag(e){return Uh(e).getComputedStyle(e)}function og(e){return[`table`,`td`,`th`].indexOf(Hh(e))>=0}function sg(e){return((Wh(e)?e.ownerDocument:e.document)||window.document).documentElement}function cg(e){return Hh(e)===`html`?e:e.assignedSlot||e.parentNode||(Kh(e)?e.host:null)||sg(e)}function lg(e){return!Gh(e)||ag(e).position===`fixed`?null:e.offsetParent}function ug(e){var t=/firefox/i.test(eg());if(/Trident/i.test(eg())&&Gh(e)&&ag(e).position===`fixed`)return null;var n=cg(e);for(Kh(n)&&(n=n.host);Gh(n)&&[`html`,`body`].indexOf(Hh(n))<0;){var r=ag(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function dg(e){for(var t=Uh(e),n=lg(e);n&&og(n)&&ag(n).position===`static`;)n=lg(n);return n&&(Hh(n)===`html`||Hh(n)===`body`&&ag(n).position===`static`)?t:n||ug(e)||t}function fg(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function pg(e,t,n){return Zh(e,Qh(t,n))}function mg(e,t,n){var r=pg(e,t,n);return r>n?n:r}function hg(){return{top:0,right:0,bottom:0,left:0}}function gg(e){return Object.assign({},hg(),e)}function _g(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var vg=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,gg(typeof e==`number`?_g(e,Nh):e)};function yg(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Xh(n.placement),c=fg(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=vg(i.padding,n),d=rg(a),f=c===`y`?`top`:jh,p=c===`y`?kh:Ah,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=dg(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=pg(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function bg(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||ig(t.elements.popper,r)&&(t.elements.arrow=r))}var xg={name:`arrow`,enabled:!0,phase:`main`,fn:yg,effect:bg,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function Sg(e){return e.split(`-`)[1]}var Cg={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function wg(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:$h(n*i)/i||0,y:$h(r*i)/i||0}}function Tg(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=jh,b=`top`,x=window;if(l){var S=dg(n),C=`clientHeight`,w=`clientWidth`;if(S===Uh(n)&&(S=sg(n),ag(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=kh;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=Ah;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&Cg),O=u===!0?wg({x:p,y:h},Uh(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var ee;return Object.assign({},D,(ee={},ee[b]=v?`0`:``,ee[y]=_?`0`:``,ee.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,ee))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Eg(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:Xh(t.placement),variation:Sg(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Tg(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Tg(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Dg={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Eg,data:{}},Og={passive:!0};function kg(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=Uh(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,Og)}),s&&c.addEventListener(`resize`,n.update,Og),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,Og)}),s&&c.removeEventListener(`resize`,n.update,Og)}}var Ag={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:kg,data:{}},jg={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Mg(e){return e.replace(/left|right|bottom|top/g,function(e){return jg[e]})}var Ng={start:`end`,end:`start`};function Pg(e){return e.replace(/start|end/g,function(e){return Ng[e]})}function Fg(e){var t=Uh(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ig(e){return ng(sg(e)).left+Fg(e).scrollLeft}function Lg(e,t){var n=Uh(e),r=sg(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=tg();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Ig(e),y:c}}function Rg(e){var t=sg(e),n=Fg(e),r=e.ownerDocument?.body,i=Zh(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Zh(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Ig(e),s=-n.scrollTop;return ag(r||t).direction===`rtl`&&(o+=Zh(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function zg(e){var t=ag(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Bg(e){return[`html`,`body`,`#document`].indexOf(Hh(e))>=0?e.ownerDocument.body:Gh(e)&&zg(e)?e:Bg(cg(e))}function Vg(e,t){t===void 0&&(t=[]);var n=Bg(e),r=n===e.ownerDocument?.body,i=Uh(n),a=r?[i].concat(i.visualViewport||[],zg(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Vg(cg(a)))}function Hg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ug(e,t){var n=ng(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Wg(e,t,n){return t===`viewport`?Hg(Lg(e,n)):Wh(t)?Ug(t,n):Hg(Rg(sg(e)))}function Gg(e){var t=Vg(cg(e)),n=[`absolute`,`fixed`].indexOf(ag(e).position)>=0&&Gh(e)?dg(e):e;return Wh(n)?t.filter(function(e){return Wh(e)&&ig(e,n)&&Hh(e)!==`body`}):[]}function Kg(e,t,n,r){var i=t===`clippingParents`?Gg(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Wg(e,n,r);return t.top=Zh(i.top,t.top),t.right=Qh(i.right,t.right),t.bottom=Qh(i.bottom,t.bottom),t.left=Zh(i.left,t.left),t},Wg(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function qg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Xh(r):null,a=r?Sg(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case kh:c={x:o,y:t.y+t.height};break;case Ah:c={x:t.x+t.width,y:s};break;case jh:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?fg(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case Ph:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function Jg(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?Fh:s,l=n.rootBoundary,u=l===void 0?Ih:l,d=n.elementContext,f=d===void 0?Lh:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=gg(typeof g==`number`?_g(g,Nh):g),v=f===`popper`?Rh:Lh,y=e.rects.popper,b=e.elements[m?v:f],x=Kg(Wh(b)?b:b.contextElement||sg(e.elements.popper),c,u,o),S=ng(e.elements.reference),C=qg({reference:S,element:y,strategy:`absolute`,placement:i}),w=Hg(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function Yg(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Bh:c,u=Sg(r),d=u?s?zh:zh.filter(function(e){return Sg(e)===u}):Nh,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=Jg(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[Xh(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function Xg(e){if(Xh(e)===`auto`)return[];var t=Mg(e);return[Pg(e),t,Pg(t)]}function Zg(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=Xh(g)===g,v=c||(_||!m?[Mg(g)]:Xg(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(Xh(n)===`auto`?Yg(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=Xh(E),O=Sg(E)===Ph,ee=[`top`,kh].indexOf(D)>=0,te=ee?`width`:`height`,k=Jg(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=ee?O?Ah:jh:O?kh:`top`;b[te]>x[te]&&(A=Mg(A));var j=Mg(A),M=[];if(a&&M.push(k[D]<=0),s&&M.push(k[A]<=0,k[j]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,re=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},ie=ne;ie>0&&re(ie)!==`break`;ie--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Qg={name:`flip`,enabled:!0,phase:`main`,fn:Zg,requiresIfExists:[`offset`],data:{_skip:!1}};function $g(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function e_(e){return[`top`,Ah,kh,jh].some(function(t){return e[t]>=0})}function t_(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=Jg(t,{elementContext:`reference`}),s=Jg(t,{altBoundary:!0}),c=$g(o,r),l=$g(s,i,a),u=e_(c),d=e_(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var n_={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:t_};function r_(e,t,n){var r=Xh(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function i_(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Bh.reduce(function(e,n){return e[n]=r_(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var a_={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:i_};function o_(e){var t=e.state,n=e.name;t.modifiersData[n]=qg({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var s_={name:`popperOffsets`,enabled:!0,phase:`read`,fn:o_,data:{}};function c_(e){return e===`x`?`y`:`x`}function l_(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=Jg(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=Xh(t.placement),v=Sg(t.placement),y=!v,b=fg(_),x=c_(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var ee=b===`y`?`top`:jh,te=b===`y`?kh:Ah,k=b===`y`?`height`:`width`,A=S[b],j=A+g[ee],M=A-g[te],ne=p?-w[k]/2:0,re=v===`start`?C[k]:w[k],ie=v===`start`?-w[k]:-C[k],ae=t.elements.arrow,N=p&&ae?rg(ae):{width:0,height:0},oe=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:hg(),se=oe[ee],ce=oe[te],P=pg(0,C[k],N[k]),le=y?C[k]/2-ne-P-se-E.mainAxis:re-P-se-E.mainAxis,ue=y?-C[k]/2+ne+P+ce+E.mainAxis:ie+P+ce+E.mainAxis,F=t.elements.arrow&&dg(t.elements.arrow),I=F?b===`y`?F.clientTop||0:F.clientLeft||0:0,de=D?.[b]??0,fe=A+le-de-I,pe=A+ue-de,me=pg(p?Qh(j,fe):j,A,p?Zh(M,pe):M);S[b]=me,O[b]=me-A}if(s){var L=b===`x`?`top`:jh,he=b===`x`?kh:Ah,ge=S[x],_e=x===`y`?`height`:`width`,ve=ge+g[L],ye=ge-g[he],be=[`top`,jh].indexOf(_)!==-1,xe=D?.[x]??0,Se=be?ve:ge-C[_e]-w[_e]-xe+E.altAxis,R=be?ge+C[_e]+w[_e]-xe-E.altAxis:ye,z=p&&be?mg(Se,ge,R):pg(p?Se:ve,ge,p?R:ye);S[x]=z,O[x]=z-ge}t.modifiersData[r]=O}}var u_={name:`preventOverflow`,enabled:!0,phase:`main`,fn:l_,requiresIfExists:[`offset`]};function d_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function f_(e){return e===Uh(e)||!Gh(e)?Fg(e):d_(e)}function p_(e){var t=e.getBoundingClientRect(),n=$h(t.width)/e.offsetWidth||1,r=$h(t.height)/e.offsetHeight||1;return n!==1||r!==1}function m_(e,t,n){n===void 0&&(n=!1);var r=Gh(t),i=Gh(t)&&p_(t),a=sg(t),o=ng(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Hh(t)!==`body`||zg(a))&&(s=f_(t)),Gh(t)?(c=ng(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Ig(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function h_(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function fee(e){var t=h_(e);return Vh.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function pee(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function mee(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var g_={placement:`bottom`,modifiers:[],strategy:`absolute`};function __(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function hee(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?g_:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},g_,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:Wh(e)?Vg(e):e.contextElement?Vg(e.contextElement):[],popper:Vg(t)};var s=fee(mee([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(__(t,n)){i.rects={reference:m_(t,dg(n),i.options.strategy===`fixed`),popper:rg(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:pee(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!__(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var gee=hee({defaultModifiers:[Ag,s_,Dg,Yh,a_,Qg,u_,xg,n_]});function v_(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Ep(n,r),{props:s,internalRef:c}=kp({...a,externalSlotProps:o}),l=pd(c,o?.ref,e.additionalProps?.ref);return Tp(t,{...s,ref:l},r)}function y_(e){return e?.props?.ref||null}var b_=l(wr(),1);function _ee(e){return typeof e==`function`?e():e}var x_=L.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=L.useState(null),s=pd(L.isValidElement(n)?y_(n):null,t);if(mc(()=>{i||o(_ee(r)||document.body)},[r,i]),mc(()=>{if(a&&!i)return Qf(t,a),()=>{Qf(t,null)}},[t,a,i]),i){if(L.isValidElement(n)){let e={ref:s};return L.cloneElement(n,e)}return n}return a&&b_.createPortal(n,a)});function vee(e){return Zs(`MuiPopper`,e)}Qs(`MuiPopper`,[`root`]);function yee(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function S_(e){return typeof e==`function`?e():e}function bee(e){return e.nodeType!==void 0}var xee=e=>{let{classes:t}=e;return Tl({root:[`root`]},vee,t)},See={},Cee=L.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=L.useRef(null),_=pd(g,t),v=L.useRef(null),y=pd(v,u),b=L.useRef(y);mc(()=>{b.current=y},[y]),L.useImperativeHandle(u,()=>v.current,[]);let x=yee(c,i),[S,C]=L.useState(x),w=L.useMemo(()=>S_(n),[n]);L.useEffect(()=>{v.current&&v.current.forceUpdate()}),mc(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=gee(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let T={placement:S};p!==null&&(T.TransitionProps=p);let E=xee(e),D=f.root??`div`;return(0,U.jsx)(D,{...v_({elementType:D,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:E.root}),children:typeof r==`function`?r(T):r})}),wee=K(L.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=See,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=L.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=S_(n);S=e&&bee(e)?hd(e).body:hd(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,U.jsx)(x_,{disablePortal:o,container:S,children:(0,U.jsx)(Cee,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),C_=L.forwardRef(function(e,t){let n=Wc(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=Md({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,U.jsx)(wee,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})});function Tee(e){return Zs(`MuiListSubheader`,e)}Qs(`MuiListSubheader`,[`root`,`colorPrimary`,`colorInherit`,`gutters`,`inset`,`sticky`]);var Eee=e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:a}=e;return Tl({root:[`root`,n!=="default"&&`color${q(n)}`,!r&&`gutters`,i&&`inset`,!a&&`sticky`]},Tee,t)},Dee=K(`li`,{name:`MuiListSubheader`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${q(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(jd(({theme:e})=>({boxSizing:`border-box`,lineHeight:`48px`,listStyle:`none`,color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:`primary`},style:{color:(e.vars||e).palette.primary.main}},{props:{color:`inherit`},style:{color:`inherit`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:`sticky`,top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),w_=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiListSubheader`}),{className:r,color:i=`default`,component:a=`li`,disableGutters:o=!1,disableSticky:s=!1,inset:c=!1,...l}=n,u={...n,color:i,component:a,disableGutters:o,disableSticky:s,inset:c},d=Eee(u);return(0,U.jsx)(Dee,{as:a,className:W(d.root,r),ref:t,ownerState:u,...l})}),Oee=Jf((0,U.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z`}),`Cancel`);function kee(e){return Zs(`MuiChip`,e)}var T_=Qs(`MuiChip`,[`root`,`sizeSmall`,`sizeMedium`,`colorDefault`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`disabled`,`clickable`,`deletable`,`outlined`,`filled`,`avatar`,`icon`,`label`,`deleteIcon`,`focusVisible`]),Aee=e=>{let{classes:t,disabled:n,size:r,color:i,onDelete:a,clickable:o,variant:s}=e;return Tl({root:[`root`,s,n&&`disabled`,`size${q(r)}`,`color${q(i)}`,o&&`clickable`,a&&`deletable`],label:[`label`],avatar:[`avatar`],icon:[`icon`],deleteIcon:[`deleteIcon`]},kee,t)},jee=K(`div`,{name:`MuiChip`,slot:`Root`,shouldForwardProp:e=>kd(e)&&e!==`focusableWhenDisabled`&&e!==`skipFocusWhenDisabled`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:i,onDelete:a,size:o,variant:s}=n;return[{[`& .${T_.avatar}`]:t.avatar},{[`& .${T_.icon}`]:t.icon},{[`& .${T_.deleteIcon}`]:t.deleteIcon},t.root,t[`size${q(o)}`],t[`color${q(r)}`],i&&t.clickable,a&&t.deletable,t[s]]}})(jd(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:`100%`,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:`nowrap`,...$d(e,[`background-color`,`box-shadow`]),cursor:`unset`,outline:0,textDecoration:`none`,border:0,padding:0,verticalAlign:`middle`,boxSizing:`border-box`,[`&.${T_.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`& .${T_.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${T_.icon}`]:{marginLeft:5,marginRight:-6},[`& .${T_.deleteIcon}`]:{WebkitTapHighlightColor:`transparent`,color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:`pointer`,margin:`0 5px 0 -6px`,"&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:`primary`},style:{[`& .${T_.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:`secondary`},style:{[`& .${T_.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:`small`},style:{height:24,[`& .${T_.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${T_.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${T_.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Nm([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${T_.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${T_.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&e.color!=="default",style:{[`& .${T_.icon}`]:{color:`inherit`}}},{props:{onDelete:!0},style:{[`&.${T_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Nm([`dark`])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${T_.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:`none`,WebkitTapHighlightColor:`transparent`,cursor:`pointer`,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${T_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Nm([`dark`])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${T_.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:`outlined`},style:{backgroundColor:`transparent`,border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${T_.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${T_.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${T_.avatar}`]:{marginLeft:4},[`& .${T_.icon}`]:{marginLeft:4},[`& .${T_.deleteIcon}`]:{marginRight:5}}},{props:{size:`small`,variant:`outlined`},style:{[`& .${T_.avatar}`]:{marginLeft:2},[`& .${T_.icon}`]:{marginLeft:2},[`& .${T_.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{variant:`outlined`,color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${T_.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${T_.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${T_.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Mee=K(`span`,{name:`MuiChip`,slot:`Label`})({overflow:`hidden`,textOverflow:`ellipsis`,paddingLeft:12,paddingRight:12,whiteSpace:`nowrap`,variants:[{props:{variant:`outlined`},style:{paddingLeft:11,paddingRight:11}},{props:{size:`small`},style:{paddingLeft:8,paddingRight:8}},{props:{size:`small`,variant:`outlined`},style:{paddingLeft:7,paddingRight:7}}]});function E_(e){return e.key===`Backspace`||e.key===`Delete`}var Nee=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiChip`}),{avatar:r,className:i,clickable:a,color:o=`default`,component:s,deleteIcon:c,disabled:l=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:m,onKeyUp:h,size:g=`medium`,variant:_=`filled`,tabIndex:v,skipFocusWhenDisabled:y=!1,slots:b={},slotProps:x={},...S}=n,{nativeButton:C,...w}=S,T=Nd(L.useRef(null),t),E=e=>{e.stopPropagation(),p(e)},D=e=>{e.currentTarget===e.target&&E_(e)&&e.preventDefault(),m&&m(e)},O=e=>{e.currentTarget===e.target&&p&&E_(e)&&p(e),h&&h(e)},ee=a!==!1&&f?!0:a,te=ee||p?wm:s||`div`,k={...n,component:te,disabled:l,size:g,color:o,iconColor:L.isValidElement(u)&&u.props.color||o,onDelete:!!p,clickable:ee,variant:_},A=Aee(k),j=te===wm?{component:s||`div`,internalNativeButton:!1,focusVisibleClassName:A.focusVisible,...p&&{disableRipple:!0},...C!==void 0&&{nativeButton:C}}:{},M=null;p&&(M=c&&L.isValidElement(c)?L.cloneElement(c,{className:W(c.props.className,A.deleteIcon),onClick:E}):(0,U.jsx)(Oee,{className:A.deleteIcon,onClick:E}));let ne=null;r&&L.isValidElement(r)&&(ne=L.cloneElement(r,{className:W(A.avatar,r.props.className)}));let re=null;u&&L.isValidElement(u)&&(re=L.cloneElement(u,{className:W(A.icon,u.props.className)}));let ie={slots:b,slotProps:x},[ae,N]=Ap(`root`,{elementType:jee,externalForwardedProps:{...ie,...w},ownerState:k,shouldForwardComponentProp:!0,ref:T,className:W(A.root,i),additionalProps:{disabled:ee&&l?!0:void 0,tabIndex:y&&l?-1:v,...j},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),D(t)},onKeyUp:t=>{e.onKeyUp?.(t),O(t)}})}),[oe,se]=Ap(`label`,{elementType:Mee,externalForwardedProps:ie,ownerState:k,className:A.label});return(0,U.jsxs)(ae,{as:te,...N,children:[ne||re,(0,U.jsx)(oe,{...se,children:d}),M]})}),D_=Jf((0,U.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),Pee,Fee,Iee=e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:a,hasClearIcon:o,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e;return Tl({root:[`root`,r&&`expanded`,i&&`focused`,a&&`fullWidth`,o&&`hasClearIcon`,s&&`hasPopupIcon`],inputRoot:[`inputRoot`],input:[`input`,c&&`inputFocused`],tag:[`tag`,`tagSize${q(u)}`],endAdornment:[`endAdornment`],clearIndicator:[`clearIndicator`],popupIndicator:[`popupIndicator`,l&&`popupIndicatorOpen`],popper:[`popper`,n&&`popperDisablePortal`],paper:[`paper`],listbox:[`listbox`],loading:[`loading`],noOptions:[`noOptions`],option:[`option`],groupLabel:[`groupLabel`],groupUl:[`groupUl`]},sd,t)},Lee=K(`div`,{name:`MuiAutocomplete`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:a,inputFocused:o,size:s}=n;return[{[`& .${cd.tag}`]:t.tag},{[`& .${cd.tag}`]:t[`tagSize${q(s)}`]},{[`& .${cd.inputRoot}`]:t.inputRoot},{[`& .${cd.input}`]:t.input},{[`& .${cd.input}`]:o&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${cd.focused} .${cd.clearIndicator}`]:{visibility:`visible`},"@media (pointer: fine)":{[`&:hover .${cd.clearIndicator}`]:{visibility:`visible`}},[`& .${cd.tag}`]:{margin:3,maxWidth:`calc(100% - 6px)`},[`& .${cd.inputRoot}`]:{[`.${cd.hasPopupIcon}&, .${cd.hasClearIcon}&`]:{paddingRight:30},[`.${cd.hasPopupIcon}.${cd.hasClearIcon}&`]:{paddingRight:56},[`& .${cd.input}`]:{width:0,minWidth:30}},[`& .${bf.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:`4px 4px 4px 0px`}},[`& .${bf.root}.${Hd.sizeSmall}`]:{[`& .${bf.input}`]:{padding:`2px 4px 3px 0`}},[`& .${Of.root}`]:{padding:9,[`.${cd.hasPopupIcon}&, .${cd.hasClearIcon}&`]:{paddingRight:39},[`.${cd.hasPopupIcon}.${cd.hasClearIcon}&`]:{paddingRight:65},[`& .${cd.input}`]:{padding:`7.5px 4px 7.5px 5px`},[`& .${cd.endAdornment}`]:{right:9}},[`& .${Of.root}.${Hd.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${cd.input}`]:{padding:`2.5px 4px 2.5px 8px`}},[`& .${ff.root}`]:{paddingTop:19,paddingLeft:8,[`.${cd.hasPopupIcon}&, .${cd.hasClearIcon}&`]:{paddingRight:39},[`.${cd.hasPopupIcon}.${cd.hasClearIcon}&`]:{paddingRight:65},[`& .${ff.input}`]:{padding:`7px 4px`},[`& .${cd.endAdornment}`]:{right:9}},[`& .${ff.root}.${Hd.sizeSmall}`]:{paddingBottom:1,[`& .${ff.input}`]:{padding:`2.5px 4px`}},[`& .${Hd.hiddenLabel}`]:{paddingTop:8},[`& .${ff.root}.${Hd.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${cd.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ff.root}.${Hd.hiddenLabel}.${Hd.sizeSmall}`]:{[`& .${cd.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${cd.input}`]:{flexGrow:1,textOverflow:`ellipsis`,opacity:0},variants:[{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{[`& .${cd.tag}`]:{margin:2,maxWidth:`calc(100% - 4px)`}}},{props:{inputFocused:!0},style:{[`& .${cd.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${cd.inputRoot}`]:{flexWrap:`wrap`}}}]}),Ree=K(`div`,{name:`MuiAutocomplete`,slot:`EndAdornment`})({position:`absolute`,right:0,top:`50%`,transform:`translate(0, -50%)`}),zee=K($m,{name:`MuiAutocomplete`,slot:`ClearIndicator`})({marginRight:-2,padding:4,visibility:`hidden`}),Bee=K($m,{name:`MuiAutocomplete`,slot:`PopupIndicator`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:`rotate(180deg)`}}]}),Vee=K(C_,{name:`MuiAutocomplete`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${cd.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(jd(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:`absolute`}}]}))),Hee=K(Vp,{name:`MuiAutocomplete`,slot:`Paper`})(jd(({theme:e})=>({...e.typography.body1,overflow:`auto`}))),Uee=K(`div`,{name:`MuiAutocomplete`,slot:`Loading`})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),Wee=K(`div`,{name:`MuiAutocomplete`,slot:`NoOptions`})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:`14px 16px`}))),Gee=K(`ul`,{name:`MuiAutocomplete`,slot:`Listbox`})(jd(({theme:e})=>({listStyle:`none`,margin:0,padding:`8px 0`,maxHeight:`40vh`,overflow:`auto`,isolation:`isolate`,position:`relative`,[`& .${cd.option}`]:{minHeight:48,display:`flex`,overflow:`hidden`,justifyContent:`flex-start`,alignItems:`center`,cursor:`pointer`,paddingTop:6,boxSizing:`border-box`,outline:`0`,WebkitTapHighlightColor:`transparent`,paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up(`sm`)]:{minHeight:`auto`},[`&.${cd.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:`none`},[`&.${cd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${cd.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${cd.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),O_=K(w_,{name:`MuiAutocomplete`,slot:`GroupLabel`})(jd(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),k_=K(`ul`,{name:`MuiAutocomplete`,slot:`GroupUl`})({padding:0,[`& .${cd.option}`]:{paddingLeft:24}}),A_=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAutocomplete`}),{autoComplete:r=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:o=!1,className:s,clearIcon:c=Pee||=(0,U.jsx)(ih,{fontSize:`small`}),clearOnBlur:l=!n.freeSolo,clearOnEscape:u=!1,clearText:d=`Clear`,closeText:f=`Close`,defaultValue:p=n.multiple?[]:null,disableClearable:m=!1,disableCloseOnSelect:h=!1,disabled:g=!1,disabledItemsFocusable:_=!1,disableListWrap:v=!1,disablePortal:y=!1,filterOptions:b,filterSelectedOptions:x=!1,forcePopupIcon:S=`auto`,freeSolo:C=!1,fullWidth:w=!1,getLimitTagsText:T=e=>`+${e}`,getOptionDisabled:E,getOptionKey:D,getOptionLabel:O,isOptionEqualToValue:ee,groupBy:te,handleHomeEndKeys:k=!n.freeSolo,id:A,includeInputInList:j=!1,inputValue:M,limitTags:ne=-1,loading:re=!1,loadingText:ie=`Loading…`,multiple:ae=!1,noOptionsText:N=`No options`,onChange:oe,onClose:se,onHighlightChange:ce,onInputChange:P,onOpen:le,open:ue,openOnFocus:F=!1,openText:I=`Open`,options:de,popupIcon:fe=Fee||=(0,U.jsx)(D_,{}),readOnly:pe=!1,renderGroup:me,renderInput:he,renderOption:ge,renderValue:_e,resetHighlightOnMouseLeave:ve=!1,selectOnFocus:ye=!n.freeSolo,size:be=`medium`,slots:xe={},slotProps:Se={},value:R,...z}=n,{getRootProps:B,getInputProps:Ce,getInputLabelProps:we,getPopupIndicatorProps:Te,getClearProps:Ee,getItemProps:De,getListboxProps:Oe,getOptionProps:ke,value:Ae,dirty:je,expanded:V,id:Me,popupOpen:Ne,focused:Pe,focusedItem:Fe,anchorEl:Ie,setAnchorEl:Le,inputValue:Re,groupedOptions:ze}=Oh({...n,componentName:`Autocomplete`}),Be=dee();L.useEffect(()=>{if(!Ne||!Ie||typeof ResizeObserver>`u`)return;let e=Ie.clientWidth,t=new ResizeObserver(()=>{let t=Ie.clientWidth;e!==t&&(e=t,Be())});return t.observe(Ie),()=>{t.disconnect()}},[Ne,Ie,Be]);let Ve=L.useRef([]),He=L.useRef(!1),Ue=Ne?ze:Ve.current;mc(()=>{Ne&&!He.current&&(Ve.current=[]),He.current=Ne,Ne&&ze.length>0&&(Ve.current=ze)},[Ne,ze]);let We=!m&&!g&&je&&!pe,Ge=(!C||S===!0)&&S!==!1,{onMouseDown:Ke}=Ce(),qe=O||(e=>e.label??e),Je={...n,disablePortal:y,expanded:V,focused:Pe,fullWidth:w,getOptionLabel:qe,hasClearIcon:We,hasPopupIcon:Ge,inputFocused:Fe===-1,popupOpen:Ne,size:be},Ye=Iee(Je),Xe={slots:xe,slotProps:Se},[Ze,Qe]=Ap(`root`,{ref:t,className:[Ye.root,s],elementType:Lee,externalForwardedProps:{...Xe,...z},getSlotProps:B,ownerState:Je}),[$e,et]=Ap(`listbox`,{elementType:Gee,externalForwardedProps:Xe,ownerState:Je,className:Ye.listbox,getSlotProps:Oe}),[tt,nt]=Ap(`paper`,{elementType:Vp,externalForwardedProps:Xe,ownerState:Je,className:Ye.paper}),[rt,it]=Ap(`popper`,{elementType:C_,externalForwardedProps:Xe,ownerState:Je,className:Ye.popper,additionalProps:{disablePortal:y,style:{width:Ie?Ie.clientWidth:null,pointerEvents:Ne?void 0:`none`},role:`presentation`,anchorEl:Ie,open:Ne}}),at=Ue.length>0||re||!C||it.keepMounted===!0,[ot,H]=Ap(`clearIndicator`,{elementType:zee,externalForwardedProps:Xe,ownerState:Je,className:Ye.clearIndicator,shouldForwardComponentProp:!0,additionalProps:{...Ee(),"aria-label":d,title:d}}),[st,ct]=Ap(`popupIndicator`,{elementType:Bee,externalForwardedProps:Xe,ownerState:Je,className:Ye.popupIndicator,shouldForwardComponentProp:!0,additionalProps:{...Te(),disabled:g,"aria-label":Ne?f:I,title:Ne?f:I}}),lt,ut=e=>({className:Ye.tag,disabled:g,...De(e)});if(ae?Ae.length>0&&(lt=_e?_e(Ae,ut,Je):Ae.map((e,t)=>{let{key:n,...r}=ut({index:t});return(0,U.jsx)(Nee,{label:qe(e),size:be,...r,...Xe.slotProps.chip},n)})):_e&&Ae!=null&&(lt=_e(Ae,ut,Je)),ne>-1&&Array.isArray(lt)){let e=lt.length-ne;!Pe&&e>0&&(lt=lt.splice(0,ne),lt.push((0,U.jsx)(`span`,{className:Ye.tag,children:T(e)},lt.length)))}let dt=me||(e=>(0,U.jsxs)(`li`,{children:[(0,U.jsx)(O_,{className:Ye.groupLabel,ownerState:Je,component:`div`,children:e.group}),(0,U.jsx)(k_,{className:Ye.groupUl,ownerState:Je,children:e.children})]},e.key)),ft=ge||((e,t)=>{let{key:n,...r}=e;return(0,U.jsx)(`li`,{...r,children:qe(t)},n)}),pt=(e,t)=>{let n=ke({option:e,index:t});return ft({...n,className:Ye.option},e,{selected:n[`aria-selected`],index:t,inputValue:Re},Je)};return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(Ze,{...Qe,children:he({id:Me,disabled:g,fullWidth:n.fullWidth??!0,size:be===`small`?`small`:void 0,slotProps:{inputLabel:we(),input:{ref:Le,className:Ye.inputRoot,startAdornment:lt,onMouseDown:e=>{e.target===e.currentTarget&&Ke(e)},...(We||Ge)&&{endAdornment:(0,U.jsxs)(Ree,{className:Ye.endAdornment,ownerState:Je,children:[We?(0,U.jsx)(ot,{...H,children:c}):null,Ge?(0,U.jsx)(st,{...ct,children:fe}):null]})}},htmlInput:{className:Ye.input,disabled:g,readOnly:pe,...Ce()}}})}),Ie&&at?(0,U.jsx)(Vee,{as:rt,...it,children:(0,U.jsxs)(Hee,{as:tt,...nt,children:[re&&Ue.length===0?(0,U.jsx)(Uee,{className:Ye.loading,ownerState:Je,children:ie}):null,Ue.length===0&&!C&&!re?(0,U.jsx)(Wee,{className:Ye.noOptions,ownerState:Je,role:`presentation`,onMouseDown:e=>{e.preventDefault()},children:N}):null,Ue.length>0?(0,U.jsx)($e,{...et,children:Ue.map((e,t)=>te?dt({key:e.key,group:e.group,children:e.options.map((t,n)=>pt(t,e.index+n))}):pt(e,t))}):null]})}):null]})}),j_=Jf((0,U.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`}),`Person`);function M_(e){return Zs(`MuiAvatar`,e)}Qs(`MuiAvatar`,[`root`,`colorDefault`,`circular`,`rounded`,`square`,`img`,`fallback`]);var N_=e=>{let{classes:t,variant:n,colorDefault:r}=e;return Tl({root:[`root`,n,r&&`colorDefault`],img:[`img`],fallback:[`fallback`]},M_,t)},P_=K(`div`,{name:`MuiAvatar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(jd(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:`50%`,overflow:`hidden`,userSelect:`none`,variants:[{props:{variant:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:`square`},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles(`dark`,{backgroundColor:e.palette.grey[600]})}}}]}))),F_=K(`img`,{name:`MuiAvatar`,slot:`Img`})({width:`100%`,height:`100%`,textAlign:`center`,objectFit:`cover`,color:`transparent`,textIndent:1e4}),I_=K(j_,{name:`MuiAvatar`,slot:`Fallback`})({width:`75%`,height:`75%`});function L_(e,t,n,r){let[i,a]=L.useState(!1);return L.useEffect(()=>{if(!e&&!t)return;a(!1);let i=!0,o=new Image;return o.onload=()=>{i&&a(`loaded`)},o.onerror=()=>{i&&a(`error`)},o.crossOrigin=n,o.referrerPolicy=r,o.src=e,t&&(o.srcset=t),()=>{i=!1}},[n,r,e,t]),i}var R_=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiAvatar`}),{alt:r,children:i,className:a,component:o=`div`,slots:s={},slotProps:c={},sizes:l,src:u,srcSet:d,variant:f=`circular`,...p}=n,m=null,h={...n,component:o,variant:f},{crossOrigin:g,referrerPolicy:_}=(typeof c.img==`function`?c.img(h):c.img)??{},v=L_(u,d,g,_),y=u||d,b=y&&v!==`error`;h.colorDefault=!b,delete h.ownerState;let x=N_(h),S={slots:s,slotProps:c},[C,w]=Ap(`root`,{ref:t,className:W(x.root,a),elementType:P_,externalForwardedProps:{...S,component:o,...p},ownerState:h}),[T,E]=Ap(`img`,{className:x.img,elementType:F_,externalForwardedProps:S,additionalProps:{alt:r,src:u,srcSet:d,sizes:l},ownerState:h}),[D,O]=Ap(`fallback`,{className:x.fallback,elementType:I_,externalForwardedProps:S,shouldForwardComponentProp:!0,ownerState:h});return m=b?(0,U.jsx)(T,{...E}):i||i===0?i:y&&r?r[0]:(0,U.jsx)(D,{...O}),(0,U.jsx)(C,{...w,children:m})}),z_={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},B_={opacity:0,visibility:`hidden`},V_=L.forwardRef(function(e,t){let n=Ed(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,disablePrefersReducedMotion:s=!1,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:_=r,...v}=e,y=wp(n.motion.reducedMotion,s),b=L.useRef(null),x=Nd(b,y_(o),t),S=Yd(b,f),C=Yd(b,(e,t)=>{y.shouldReduceMotion||Gd(e);let r=Zd({style:g,timeout:_,easing:c},{mode:`enter`}),i=y.getTransitionTiming({duration:r.duration,delay:r.delay});e.style.transition=n.transitions.create(`opacity`,{duration:i.duration,easing:r.easing,delay:i.delay}),u&&u(e,t)}),w=Yd(b,d),T=Yd(b,h);return(0,U.jsx)(fp,{appear:a,in:l,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:Yd(b,e=>{let t=Zd({style:g,timeout:_,easing:c},{mode:`exit`}),r=y.getTransitionTiming({duration:t.duration,delay:t.delay});e.style.transition=n.transitions.create(`opacity`,{duration:r.duration,easing:t.easing,delay:r.delay}),p&&p(e)}),onExited:Yd(b,e=>{e.style.transition=``,m&&m(e)}),onExiting:T,addEndListener:i?e=>{i(b.current,e)}:void 0,reduceMotion:y.shouldReduceMotion,timeout:_,...v,children:(e,{ownerState:t,...n})=>{let r=Xd(e,l,z_,B_,g,o.props.style);return L.cloneElement(o,{style:r,ref:x,...n})}})});function H_(e){return Zs(`MuiBackdrop`,e)}Qs(`MuiBackdrop`,[`root`,`invisible`]);var U_=e=>{let{classes:t,invisible:n}=e;return Tl({root:[`root`,n&&`invisible`]},H_,t)},W_=K(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),G_=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,slotProps:c={},slots:l={},transitionDuration:u,...d}=n,f={...n,component:a,invisible:o},p=U_(f),m={component:a,slots:l,slotProps:c},[h,g]=Ap(`root`,{elementType:W_,externalForwardedProps:m,className:W(p.root,i),ownerState:f}),[_,v]=Ap(`transition`,{elementType:V_,externalForwardedProps:m,ownerState:f});return(0,U.jsx)(_,{in:s,timeout:u,...d,...v,children:(0,U.jsx)(h,{...g,ref:t,children:r})})});function K_(e){let{badgeContent:t,invisible:n=!1,max:r=99,showZero:i=!1}=e,a=vh({badgeContent:t,max:r}),o=n;n===!1&&t===0&&!i&&(o=!0);let{badgeContent:s,max:c=r}=o?a:e,l=s&&Number(s)>c?`${c}+`:s;return{badgeContent:s,invisible:o,max:c,displayValue:l}}function q_(e){return Zs(`MuiBadge`,e)}var J_=Qs(`MuiBadge`,[`root`,`badge`,`dot`,`standard`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`,`invisible`,`colorError`,`colorInfo`,`colorPrimary`,`colorSecondary`,`colorSuccess`,`colorWarning`,`overlapRectangular`,`overlapCircular`,`anchorOriginTopLeftCircular`,`anchorOriginTopLeftRectangular`,`anchorOriginTopRightCircular`,`anchorOriginTopRightRectangular`,`anchorOriginBottomLeftCircular`,`anchorOriginBottomLeftRectangular`,`anchorOriginBottomRightCircular`,`anchorOriginBottomRightRectangular`]),Y_=10,X_=4,Z_=e=>{let{color:t,anchorOrigin:n,invisible:r,overlap:i,variant:a,classes:o={}}=e;return Tl({root:[`root`],badge:[`badge`,a,r&&`invisible`,`anchorOrigin${q(n.vertical)}${q(n.horizontal)}`,`anchorOrigin${q(n.vertical)}${q(n.horizontal)}${q(i)}`,`overlap${q(i)}`,t!=="default"&&`color${q(t)}`]},q_,o)},Q_=K(`span`,{name:`MuiBadge`,slot:`Root`})({position:`relative`,display:`inline-flex`,verticalAlign:`middle`,flexShrink:0}),$_=K(`span`,{name:`MuiBadge`,slot:`Badge`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${q(n.anchorOrigin.vertical)}${q(n.anchorOrigin.horizontal)}${q(n.overlap)}`],n.color!=="default"&&t[`color${q(n.color)}`],n.invisible&&t.invisible]}})(jd(({theme:e})=>({display:`flex`,flexDirection:`row`,flexWrap:`wrap`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,position:`absolute`,boxSizing:`border-box`,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:Y_*2,lineHeight:1,padding:`0 6px`,height:Y_*2,borderRadius:Y_,zIndex:1,"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},...$d(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Nm([`contrastText`])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:`dot`},style:{borderRadius:X_,height:X_*2,minWidth:X_*2,padding:0}},{props:{invisible:!0},style:{...$d(e,`transform`,{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}},{style:{inset:`var(--Badge-inset)`,transform:`scale(1) translate(var(--Badge-translate))`,transformOrigin:`var(--Badge-origin)`,[`&.${J_.invisible}`]:{transform:`scale(0) translate(var(--Badge-translate))`}}}]})));function ev(e){return{vertical:e?.vertical??`top`,horizontal:e?.horizontal??`right`}}var tv=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiBadge`}),{anchorOrigin:r,className:i,classes:a,component:o,children:s,overlap:c=`rectangular`,color:l=`default`,invisible:u=!1,max:d=99,badgeContent:f,slots:p,slotProps:m,showZero:h=!1,variant:g=`standard`,..._}=n,{badgeContent:v,invisible:y,max:b,displayValue:x}=K_({max:d,invisible:u,badgeContent:f,showZero:h}),S=vh({anchorOrigin:ev(r),color:l,overlap:c,variant:g,badgeContent:f}),C=y||v==null&&g!==`dot`,{color:w=l,overlap:T=c,anchorOrigin:E,variant:D=g}=C?S:n,O=ev(E),ee=D===`dot`?void 0:x,te={...n,badgeContent:v,invisible:C,max:b,displayValue:ee,showZero:h,anchorOrigin:O,color:w,overlap:T,variant:D},k=Z_(te),A={slots:p,slotProps:m},[j,M]=Ap(`root`,{elementType:Q_,externalForwardedProps:{...A,..._},ownerState:te,className:W(k.root,i),ref:t,additionalProps:{as:o}}),{vertical:ne,horizontal:re}=O,ie=T===`circular`?`14%`:`0`,ae=ne===`top`?ie:`auto`,N=ne===`bottom`?ie:`auto`,oe=re===`right`?ie:`auto`,se=re===`left`?ie:`auto`,[ce,P]=Ap(`badge`,{elementType:$_,externalForwardedProps:A,ownerState:te,className:k.badge,additionalProps:{"aria-hidden":!0,style:{"--Badge-translate":`${re===`right`?`50%`:`-50%`}, ${ne===`top`?`-50%`:`50%`}`,"--Badge-inset":`${ae} ${oe} ${N} ${se}`,"--Badge-origin":`${re===`right`?`100%`:`0%`} ${ne===`top`?`0%`:`100%`}`}}});return(0,U.jsxs)(j,{...M,children:[s,(0,U.jsx)(ce,{...P,children:ee})]})}),nv=Qs(`MuiBox`,[`root`]),Y=Ys({themeId:Lr,defaultTheme:id(),defaultClassName:nv.root,generateClassName:qs.generate});function rv(e){return Zs(`MuiButton`,e)}var iv=Qs(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),av=L.createContext({}),ov=L.createContext(void 0),sv=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Tl({root:[`root`,o&&`loading`,a,`size${q(i)}`,`color${q(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${q(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},rv,c);return{...c,...l}},cv=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],lv=K(wm,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${q(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(jd(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...$d(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${iv.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${iv.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${iv.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${iv.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${iv.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${iv.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...$d(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${iv.loading}`]:{color:`transparent`}}}]}})),uv=K(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...$d(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...cv]})),dv=K(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...$d(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...cv]})),fv=K(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),pv=K(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),X=L.forwardRef(function(e,t){let n=L.useContext(av),r=L.useContext(ov),i=Md({props:dc(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=$f(h),T=_??(0,U.jsx)(qm,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=sv(E),O=(b||g&&v===`start`)&&(0,U.jsx)(uv,{className:D.startIcon,ownerState:E,children:b||(0,U.jsx)(pv,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,U.jsx)(dv,{className:D.endIcon,ownerState:E,children:f||(0,U.jsx)(pv,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,U.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,U.jsx)(fv,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...j}=D;return(0,U.jsxs)(lv,{ownerState:E,className:W(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:W(D.focusVisible,p),ref:t,internalNativeButton:!0,type:x,id:g?w:h,...C,classes:j,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})});function mv(e){return Zs(`MuiCard`,e)}Qs(`MuiCard`,[`root`]);var hv=e=>{let{classes:t}=e;return Tl({root:[`root`]},mv,t)},gv=K(Vp,{name:`MuiCard`,slot:`Root`})({overflow:`hidden`}),_v=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiCard`}),{className:r,raised:i=!1,...a}=n,o={...n,raised:i},s=hv(o);return(0,U.jsx)(gv,{className:W(s.root,r),elevation:i?8:void 0,ref:t,ownerState:o,...a})});function vv(e){return Zs(`MuiCardContent`,e)}Qs(`MuiCardContent`,[`root`]);var yv=e=>{let{classes:t}=e;return Tl({root:[`root`]},vv,t)},bv=K(`div`,{name:`MuiCardContent`,slot:`Root`})({padding:16,"&:last-child":{paddingBottom:24}}),xv=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiCardContent`}),{className:r,component:i=`div`,...a}=n,o={...n,component:i},s=yv(o);return(0,U.jsx)(bv,{as:i,className:W(s.root,r),ownerState:o,ref:t,...a})});function Sv(e){return Zs(`PrivateSwitchBase`,e)}Qs(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var Cv=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e;return Tl({root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${q(i)}`],input:[`input`]},Sv,t)},wv=K(wm,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),Tv=K(`input`,{name:`MuiSwitchBase`,shouldForwardProp:kd})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),Ev=L.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,name:d,onBlur:f,onChange:p,onFocus:m,readOnly:h,required:g=!1,tabIndex:_,type:v,value:y,slots:b={},slotProps:x={},...S}=e,{nativeButton:C,...w}=S,[T,E]=tp({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),D=Cd(),O=e=>{m&&m(e),D&&D.onFocus&&D.onFocus(e)},ee=e=>{f&&f(e),D&&D.onBlur&&D.onBlur(e)},te=e=>{if(e.nativeEvent.defaultPrevented||h)return;let t=e.target.checked;E(t),p&&p(e,t)},k=o;D&&k===void 0&&(k=D.disabled);let A=v===`checkbox`||v===`radio`,j={...e,checked:T,disabled:k,disableFocusRipple:s,edge:c},M=Cv(j),ne={slots:b,slotProps:x},[re,ie]=Ap(`root`,{ref:t,elementType:wv,className:M.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,component:`span`,...w},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),O(t)},onBlur:t=>{e.onBlur?.(t),ee(t)}}),ownerState:j,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[ae,N]=Ap(`input`,{elementType:Tv,className:M.input,externalForwardedProps:ne,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),te(t)}}),ownerState:j,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:k,id:A?u:void 0,name:d,readOnly:h,required:g,tabIndex:_,type:v,...v===`checkbox`&&y===void 0?{}:{value:y}}});return(0,U.jsxs)(re,{...ie,children:[(0,U.jsx)(ae,{...N}),T?i:l]})}),Dv=Jf((0,U.jsx)(`path`,{d:`M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z`}),`CheckBoxOutlineBlank`),Ov=Jf((0,U.jsx)(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`}),`CheckBox`),kv=Jf((0,U.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z`}),`IndeterminateCheckBox`),Av=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a=Tl({root:[`root`,n&&`indeterminate`,`color${q(r)}`,`size${q(i)}`]},ld,t);return{...t,...a}},jv=K(Ev,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${q(n.size)}`],n.color!=="default"&&t[`color${q(n.color)}`]]}})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:`default`,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{[`&.${ud.checked}, &.${ud.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${ud.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),Mv=(0,U.jsx)(Ov,{}),Nv=(0,U.jsx)(Dv,{}),Pv=(0,U.jsx)(kv,{}),Fv=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiCheckbox`}),{checkedIcon:r=Mv,color:i=`primary`,icon:a=Nv,indeterminate:o=!1,indeterminateIcon:s=Pv,size:c=`medium`,disableRipple:l=!1,className:u,slots:d={},slotProps:f={},...p}=n,m=o?s:a,h=o?s:r,g={...n,disableRipple:l,color:i,indeterminate:o,size:c},_=Av(g),v=f.input,[y,b]=Ap(`root`,{ref:t,elementType:jv,className:W(_.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:f,...p},ownerState:g,additionalProps:{type:`checkbox`,icon:L.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:L.cloneElement(h,{fontSize:h.props.fontSize??c}),disableRipple:l,slots:d,slotProps:{input:ip(typeof v==`function`?v(g):v,{"data-indeterminate":o,"aria-checked":o?`mixed`:void 0})}}});return(0,U.jsx)(y,{...b,classes:_})}),Iv=typeof Ad({})==`function`,Lv=(e,t)=>({WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,boxSizing:`border-box`,WebkitTextSizeAdjust:`100%`,...t&&!e.vars&&{colorScheme:e.palette.mode}}),Rv=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),zv=(e,t=!1)=>{let n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector==`function`&&Object.entries(e.colorSchemes).forEach(([t,r])=>{let i=e.getColorSchemeSelector(t);i.startsWith(`@`)?n[i]={":root":{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={colorScheme:r.palette?.mode}});let r={html:Lv(e,t),"*, *::before, *::after":{boxSizing:`inherit`},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Rv(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n},i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(r=[r,i]),r},Bv=`mui-ecs`,Vv=e=>{let t=zv(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${Bv})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([t,r])=>{let i=e.getColorSchemeSelector(t);i.startsWith(`@`)?n[i]={[`:root:not(:has(.${Bv}))`]:{colorScheme:r.palette?.mode}}:n[i.replace(/\s*&/,``)]={[`&:not(:has(.${Bv}))`]:{colorScheme:r.palette?.mode}}}),t},Hv=Ad(Iv?({theme:e,enableColorScheme:t})=>zv(e,t):({theme:e})=>Vv(e));function Uv(e){let{children:t,enableColorScheme:n=!1}=Md({props:e,name:`MuiCssBaseline`});return(0,U.jsxs)(L.Fragment,{children:[Iv&&(0,U.jsx)(Hv,{enableColorScheme:n}),!Iv&&!n&&(0,U.jsx)(`span`,{className:Bv,style:{display:`none`}}),t]})}function Wv(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Gv(e){let t=hd(e);return t.body===e?gd(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Kv(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function qv(e){return parseFloat(gd(e).getComputedStyle(e).paddingRight)||0}function Jv(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function Yv(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!Jv(e);t&&n&&Kv(e,i)})}function Xv(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function Zv(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(Gv(r)){let e=Wv(gd(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${qv(r)+e}px`;let t=hd(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${qv(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=hd(r).body;else{let t=r.parentElement,n=gd(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function Qv(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var $v=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Kv(e.modalRef,!1);let r=Qv(t);Yv(t,e.mount,e.modalRef,r,!0);let i=Xv(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=Xv(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=Zv(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=Xv(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Kv(e.modalRef,t),Yv(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&Kv(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},ey=_h,ty=`data-mui-focusable`;function ny(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${ty}]`):null}var ry=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function iy(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function ay(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function oy(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||ay(e))}function sy(e){let t=[],n=[];return Array.from(e.querySelectorAll(ry)).forEach((e,r)=>{let i=iy(e);i===-1||!oy(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function cy(){return!0}function ly(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=sy,isEnabled:o=cy,open:s}=e,c=L.useRef(!1),l=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=L.useRef(null),p=L.useRef(!1),m=L.useRef(null),h=pd(y_(t),m),g=L.useRef(null);L.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),L.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=Ld(hd(m.current)),t=ny(m.current)??m.current;return ey(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{!i&&d.current&&(c.current=!0,d.current.focus(),d.current=null)}},[s]),L.useEffect(()=>{if(!s||!m.current)return;let e=hd(m.current),t=t=>{if(g.current=t,r||!o()||t.key!==`Tab`)return;let n=m.current,i=Ld(e);if(n===null)return;let s=ny(n);if(i===n||i===s){let e=a(n);if(e.length===0)return;t.preventDefault(),t.shiftKey?e[e.length-1].focus():e[0].focus();return}if(ey(n,i)){let e=a(n),r=e.indexOf(i);if(r===-1||!e.some(e=>iy(e)>0))return;t.preventDefault();let o=0;o=t.shiftKey?r<=0?e.length-1:r-1:r===e.length-1?0:r+1,e[o].focus()}},n=()=>{let t=m.current;if(t===null)return;let n=Ld(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(ey(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=Ld(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),L.cloneElement(t,{ref:h,onFocus:_}),(0,U.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function uy(e){return typeof e==`function`?e():e}function dy(e){return e?e.props.hasOwnProperty(`in`):!1}var fy=()=>{},py=new $v;function my(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:i,onTransitionExited:a,children:o,onClose:s,open:c,rootRef:l}=e,u=L.useRef({}),d=L.useRef(null),f=L.useRef(null),p=pd(f,l),[m,h]=L.useState(!c),g=dy(o),_=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(_=!1);let v=()=>hd(d.current),y=()=>(u.current.modalRef=f.current,u.current.mount=d.current,u.current),b=()=>{py.mount(y(),{disableScrollLock:n}),f.current&&(f.current.scrollTop=0)},x=md(()=>{let e=uy(t)||v().body;py.add(y(),e),f.current&&b()}),S=()=>py.isTopModal(y()),C=md(e=>{d.current=e,e&&(c&&S()?b():f.current&&Kv(f.current,_))}),w=L.useCallback(()=>{py.remove(y(),_)},[_]);L.useEffect(()=>()=>{w()},[w]),L.useEffect(()=>{c?x():(!g||!r)&&w()},[c,w,g,r,x]);let T=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!S())&&(t.stopPropagation(),s&&s(t,`escapeKeyDown`))},E=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&s&&s(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Dp(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:T(r),ref:p}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:E(t),open:c}},getTransitionProps:()=>({onEnter:Hf(()=>{h(!1),i&&i()},o?.props.onEnter??fy),onExited:Hf(()=>{h(!0),a&&a(),r&&w()},o?.props.onExited??fy)}),rootRef:p,portalRef:C,isTopModal:S,exited:m,hasTransition:g}}function hy(e){return Zs(`MuiModal`,e)}Qs(`MuiModal`,[`root`,`hidden`,`backdrop`]);var gy=e=>{let{open:t,exited:n,classes:r}=e;return Tl({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},hy,r)},_y=K(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(jd(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),vy=K(G_,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),yy=L.forwardRef(function(e,t){let n=Md({name:`MuiModal`,props:e}),{classes:r,className:i,closeAfterTransition:a=!1,children:o,container:s,component:c,disableAutoFocus:l=!1,disableEnforceFocus:u=!1,disablePortal:d=!1,disableRestoreFocus:f=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:g,onTransitionEnter:_,onTransitionExited:v,open:y,slotProps:b={},slots:x={},theme:S,...C}=n,w={...n,closeAfterTransition:a,disableAutoFocus:l,disableEnforceFocus:u,disablePortal:d,disableRestoreFocus:f,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:E,getTransitionProps:D,portalRef:O,isTopModal:ee,exited:te,hasTransition:k}=my({...w,rootRef:t}),A={...w,exited:te},j=gy(A),M={};if(o.props.tabIndex===void 0&&(M.tabIndex=`-1`),k){let{onEnter:e,onExited:t}=D();M.onEnter=e,M.onExited=t}let ne={slots:x,slotProps:b},[re,ie]=Ap(`root`,{ref:t,elementType:_y,externalForwardedProps:{...ne,...C,component:c},getSlotProps:T,ownerState:A,className:W(i,j?.root,!A.open&&A.exited&&j?.hidden)}),[ae,N]=Ap(`backdrop`,{elementType:vy,externalForwardedProps:ne,shouldForwardComponentProp:!0,getSlotProps:e=>E({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:j?.backdrop,ownerState:A});return!h&&!y&&(!k||te)?null:(0,U.jsx)(x_,{ref:O,container:s,disablePortal:d,children:(0,U.jsxs)(re,{...ie,children:[m?null:(0,U.jsx)(ae,{...N}),(0,U.jsx)(ly,{disableEnforceFocus:u,disableAutoFocus:l,disableRestoreFocus:f,isEnabled:ee,open:y,children:L.cloneElement(o,M)})]})})});function by(e){return Zs(`MuiDialog`,e)}Qs(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]);var xy=L.createContext({}),Sy=K(G_,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),Cy=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return Tl({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${q(n)}`],paper:[`paper`,`paperWidth${q(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},by,t)},wy=K(yy,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),Ty=K(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${q(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),Ey=K(Vp,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${q(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(jd(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,outline:0,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:`xs`,scroll:`body`},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t,scroll:`body`},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&e.scroll===`body`,style:{margin:0,maxWidth:`100%`}}]}))),Dy=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiDialog`}),r=Ed(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,children:c,className:l,fullScreen:u=!1,fullWidth:d=!1,maxWidth:f=`sm`,onClick:p,onClose:m,open:h,PaperComponent:g=Vp,role:_=`dialog`,scroll:v=`paper`,slots:y={},slotProps:b={},transitionDuration:x=i,...S}=n,C={...n,fullScreen:u,fullWidth:d,maxWidth:f,scroll:v},w=Cy(C),T=L.useRef(),E=e=>{T.current=e.target===e.currentTarget},D=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,`backdropClick`))},O=Qc(o),ee=L.useMemo(()=>({titleId:O}),[O]),te={slots:y,slotProps:b},[k,A]=Ap(`root`,{elementType:wy,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:W(w.root,l),ref:t}),[j,M]=Ap(`backdrop`,{elementType:Sy,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.backdrop}),[ne,re]=Ap(`paper`,{elementType:Ey,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:C,className:w.paper,additionalProps:{elevation:24,role:_,"aria-describedby":a,"aria-labelledby":O,"aria-modal":s,tabIndex:-1,[ty]:``}}),[ie,ae]=Ap(`container`,{elementType:Ty,externalForwardedProps:te,ownerState:C,className:w.container}),[N,oe]=Ap(`transition`,{elementType:V_,externalForwardedProps:te,ownerState:C,additionalProps:{appear:!0,in:h,timeout:x,role:`presentation`}});return(0,U.jsx)(k,{closeAfterTransition:!0,slots:{backdrop:j},slotProps:{backdrop:{transitionDuration:x,...M}},onClose:m,open:h,onClick:D,...A,...S,children:(0,U.jsx)(N,{...oe,children:(0,U.jsx)(ie,{onMouseDown:E,...ae,children:(0,U.jsx)(ne,{as:g,...re,children:(0,U.jsx)(xy.Provider,{value:ee,children:c})})})})})});function Oy(e){return Zs(`MuiDialogActions`,e)}Qs(`MuiDialogActions`,[`root`,`spacing`]);var ky=e=>{let{classes:t,disableSpacing:n}=e;return Tl({root:[`root`,!n&&`spacing`]},Oy,t)},Ay=K(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),jy=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=ky(o);return(0,U.jsx)(Ay,{className:W(s.root,r),ownerState:o,ref:t,...a})});function My(e){return Zs(`MuiDialogContent`,e)}Qs(`MuiDialogContent`,[`root`,`dividers`]);function Ny(e){return Zs(`MuiDialogTitle`,e)}var Py=Qs(`MuiDialogTitle`,[`root`]),Fy=e=>{let{classes:t,dividers:n}=e;return Tl({root:[`root`,n&&`dividers`]},My,t)},Iy=K(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(jd(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${Py.root} + &`]:{paddingTop:0}}}]}))),Ly=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=Fy(o);return(0,U.jsx)(Iy,{className:W(s.root,r),ownerState:o,ref:t,...a})}),Ry=e=>{let{classes:t}=e;return Tl({root:[`root`]},Ny,t)},zy=K(J,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),By=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=Ry(o),{titleId:c=i}=L.useContext(xy);return(0,U.jsx)(zy,{component:`h2`,className:W(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function Vy(e){return Zs(`MuiDivider`,e)}var Hy=Qs(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`vertical`,`withChildren`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),Uy=e=>{let{absolute:t,children:n,classes:r,flexItem:i,orientation:a,textAlign:o,variant:s}=e;return Tl({root:[`root`,t&&`absolute`,s,a===`vertical`&&`vertical`,i&&`flexItem`,n&&`withChildren`,o===`right`&&a!==`vertical`&&`textAlignRight`,o===`left`&&a!==`vertical`&&`textAlignLeft`],wrapper:[`wrapper`,a===`vertical`&&`wrapperVertical`]},Vy,r)},Wy=K(`div`,{name:`MuiDivider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.orientation===`vertical`&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.textAlign===`right`&&n.orientation!==`vertical`&&t.textAlignRight,n.textAlign===`left`&&n.orientation!==`vertical`&&t.textAlignLeft]}})(jd(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:`solid`,borderColor:(e.vars||e).palette.divider,borderBottomWidth:`thin`,variants:[{props:{absolute:!0},style:{position:`absolute`,bottom:0,left:0,width:`100%`}},{props:{variant:`inset`},style:{marginLeft:72}},{props:{variant:`middle`,orientation:`horizontal`},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:`middle`,orientation:`vertical`},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:`vertical`},style:{height:`100%`,borderBottomWidth:0,borderRightWidth:`thin`}},{props:{flexItem:!0},style:{alignSelf:`stretch`,height:`auto`}},{props:({ownerState:e})=>!!e.children,style:{display:`flex`,textAlign:`center`,border:0,borderTopStyle:`solid`,borderLeftStyle:`solid`,"&::before, &::after":{content:`""`,alignSelf:`center`}}},{props:({ownerState:e})=>e.children&&e.orientation!==`vertical`,style:{"&::before, &::after":{width:`100%`,borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:`inherit`}}},{props:({ownerState:e})=>e.orientation===`vertical`&&e.children,style:{flexDirection:`column`,"&::before, &::after":{height:`100%`,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:`inherit`}}},{props:({ownerState:e})=>e.textAlign===`right`&&e.orientation!==`vertical`,style:{"&::before":{width:`90%`},"&::after":{width:`10%`}}},{props:({ownerState:e})=>e.textAlign===`left`&&e.orientation!==`vertical`,style:{"&::before":{width:`10%`},"&::after":{width:`90%`}}}]}))),Gy=K(`span`,{name:`MuiDivider`,slot:`Wrapper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,n.orientation===`vertical`&&t.wrapperVertical]}})(jd(({theme:e})=>({display:`inline-block`,paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:`nowrap`,variants:[{props:{orientation:`vertical`},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),Ky=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiDivider`}),{absolute:r=!1,children:i,className:a,orientation:o=`horizontal`,component:s=i||o===`vertical`?`div`:`hr`,flexItem:c=!1,role:l=s===`hr`?void 0:`separator`,textAlign:u=`center`,variant:d=`fullWidth`,...f}=n,p={...n,absolute:r,component:s,flexItem:c,orientation:o,role:l,textAlign:u,variant:d},m=Uy(p);return(0,U.jsx)(Wy,{as:s,className:W(m.root,a),role:l,ref:t,ownerState:p,"aria-orientation":l===`separator`&&(s!==`hr`||o===`vertical`)?o:void 0,...f,children:i?(0,U.jsx)(Gy,{className:m.wrapper,ownerState:p,children:i}):null})});function qy(e){return Zs(`MuiFab`,e)}var Jy=Qs(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),Yy=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=Tl({root:[`root`,n,`size${q(i)}`,t===`inherit`?`colorInherit`:t]},qy,r);return{...r,...a}},Xy=K(wm,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>kd(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${q(n.size)}`],n.color===`inherit`&&t.colorInherit,t[q(n.size)],t[n.color]]}})(jd(({theme:e})=>({...e.typography.button,minHeight:36,...$d(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${Jy.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:48/2,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:34/2,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:40/2,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),jd(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Nm([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),jd(({theme:e})=>({[`&.${Jy.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Zy=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFab`}),{children:r,className:i,color:a=`default`,component:o=`button`,disabled:s=!1,disableFocusRipple:c=!1,focusVisibleClassName:l,size:u=`large`,variant:d=`circular`,...f}=n,p={...n,color:a,component:o,disabled:s,disableFocusRipple:c,size:u,variant:d},m=Yy(p),{root:h,...g}=m;return(0,U.jsx)(Xy,{className:W(m.root,i),component:o,internalNativeButton:!0,disabled:s,focusRipple:!c,focusVisibleClassName:W(m.focusVisible,l),ownerState:p,ref:t,...f,classes:g,children:r})}),Qy=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=Tl({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${q(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},df,t);return{...t,...c}},$y=K(sf,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...rf(e,t),!n.disableUnderline&&t.underline]}})(jd(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,...$d(e,`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${ff.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${ff.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...$d(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${ff.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${ff.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...$d(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${ff.disabled}, .${ff.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ff.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),eb=K(cf,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:af})(jd(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`,...e.vars&&e.applyStyles(`dark`,{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`})},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),tb=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,fullWidth:i=!1,hiddenLabel:a,inputComponent:o=`input`,multiline:s=!1,notched:c,slotProps:l,slots:u={},type:d=`text`,...f}=n,p={...n,disableUnderline:r,fullWidth:i,inputComponent:o,multiline:s,type:d},m=Qy(n),h={root:{ownerState:p},input:{ownerState:p}},g=l?eo(h,l):h;return(0,U.jsx)(uf,{slots:{root:u.root??$y,input:u.input??eb},slotProps:g,fullWidth:i,inputComponent:o,multiline:s,ref:t,type:d,...f,classes:m})});tb.muiName=`Input`;function nb(e){return Zs(`MuiFormControl`,e)}Qs(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var rb=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Tl({root:[`root`,n!==`none`&&`margin${q(n)}`,r&&`fullWidth`]},nb,t)},ib=K(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${q(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),ab=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=rb(_),[y,b]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{if(!Xf(t,[`Input`,`Select`]))return;let n=Xf(t,[`Select`])?t.props.input:t;n&&Bd(n.props)&&(e=!0)}),e}),[x,S]=L.useState(()=>{let e=!1;return r&&L.Children.forEach(r,t=>{Xf(t,[`Input`,`Select`])&&(zd(t.props,!0)||zd(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=L.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;L.useRef(!1);let E=L.useCallback(()=>{S(!0)},[]),D=L.useCallback(()=>{S(!1)},[]),O=L.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,U.jsx)(Sd.Provider,{value:O,children:(0,U.jsx)(ib,{as:o,ownerState:_,className:W(v.root,i),ref:t,...g,children:r})})}),ob=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e;return Tl({root:[`root`,n&&`disabled`,`labelPlacement${q(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]},pf,t)},sb=K(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${mf.label}`]:t.label},t.root,t[`labelPlacement${q(n.labelPlacement)}`]]}})(jd(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${mf.disabled}`]:{cursor:`default`},[`& .${mf.label}`]:{[`&.${mf.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:`start`},style:{flexDirection:`row-reverse`,marginRight:-11}},{props:{labelPlacement:`top`},style:{flexDirection:`column-reverse`}},{props:{labelPlacement:`bottom`},style:{flexDirection:`column`}},{props:({labelPlacement:e})=>e===`start`||e===`top`||e===`bottom`,style:{marginLeft:16}}]}))),cb=K(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(jd(({theme:e})=>({[`&.${mf.error}`]:{color:(e.vars||e).palette.error.main}}))),lb=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFormControlLabel`}),{checked:r,className:i,control:a,disabled:o,disableTypography:s,inputRef:c,label:l,labelPlacement:u=`end`,name:d,onChange:f,required:p,slots:m={},slotProps:h={},value:g,..._}=n,[v,y]=wd({props:n,states:[`error`]}),b=o??a.props.disabled??y?.disabled,x=p??a.props.required,S={disabled:b,required:x};[`checked`,`name`,`onChange`,`value`,`inputRef`].forEach(e=>{a.props[e]===void 0&&n[e]!==void 0&&(S[e]=n[e])});let C={...n,disabled:b,labelPlacement:u,required:x,error:v.error},w=ob(C),[T,E]=Ap(`typography`,{elementType:J,externalForwardedProps:{slots:m,slotProps:h},ownerState:C}),D=l;return D!=null&&D.type!==J&&!s&&(D=(0,U.jsx)(T,{component:`span`,...E,className:W(w.label,E?.className),children:D})),(0,U.jsxs)(sb,{className:W(w.root,i),ownerState:C,ref:t,..._,children:[L.cloneElement(a,S),x?(0,U.jsxs)(`div`,{children:[D,(0,U.jsxs)(cb,{ownerState:C,"aria-hidden":!0,className:w.asterisk,children:[` `,`*`]})]}):D]})});function ub(e){return Zs(`MuiFormGroup`,e)}Qs(`MuiFormGroup`,[`root`,`row`,`error`]);var db=e=>{let{classes:t,row:n,error:r}=e;return Tl({root:[`root`,n&&`row`,r&&`error`]},ub,t)},fb=K(`div`,{name:`MuiFormGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:`flex`,flexDirection:`column`,flexWrap:`wrap`,variants:[{props:{row:!0},style:{flexDirection:`row`}}]}),pb=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFormGroup`}),{className:r,row:i=!1,...a}=n,[o]=wd({props:n,states:[`error`]}),s={...n,row:i,error:o.error},c=db(s);return(0,U.jsx)(fb,{className:W(c.root,r),ownerState:s,ref:t,...a})}),mb,hb=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return Tl({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${q(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},hf,t)},gb=K(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${q(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${gf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${gf.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),_b=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,[m]=wd({props:n,states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let g=hb(h);return(0,U.jsx)(gb,{as:a,className:W(g.root,i),ref:t,...p,ownerState:h,children:r===` `?mb||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})}),vb=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Tl({root:[`root`,`color${q(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},_f,t)},yb=K(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{[`&.${vf.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${vf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${vf.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),bb=K(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(jd(({theme:e})=>({[`&.${vf.error}`]:{color:(e.vars||e).palette.error.main}}))),xb=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,[p]=wd({props:n,states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=vb(m);return(0,U.jsxs)(yb,{as:o,ownerState:m,className:W(h.root,i),ref:t,...f,children:[r,p.required&&(0,U.jsxs)(bb,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})}),Sb=Kl({createStyledComponent:K(`div`,{name:`MuiGrid`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:`MuiGrid`,useThemeProps:e=>Md({props:e,name:`MuiGrid`}),useTheme:Ed});function Cb(e){return`scale(${e}, ${e**2})`}var wb={entering:{opacity:1,transform:Cb(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:Cb(.75)},exited:{opacity:0,transform:Cb(.75)}},Tb={opacity:0,transform:Cb(.75),visibility:`hidden`},Eb=L.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,disablePrefersReducedMotion:a=!1,easing:o,in:s,onEnter:c,onEntered:l,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h=`auto`,...g}=e,_=L.useRef(null),v=Ed(),y=wp(v.motion.reducedMotion,a),b=L.useRef(null),x=Nd(b,y_(i),t),S=Yd(b,u),C=Yd(b,(e,t)=>{y.shouldReduceMotion||Gd(e);let{duration:n,delay:r,easing:i}=Zd({style:m,timeout:h,easing:o},{mode:`enter`}),a;h===`auto`&&!y.shouldReduceMotion?(a=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=a):(a=n,_.current=null);let s=y.getTransitionTiming({duration:a,delay:r});e.style.transition=[v.transitions.create(`opacity`,{duration:s.duration,delay:s.delay}),v.transitions.create(`transform`,{duration:typeof s.duration==`string`?s.duration:s.duration*.666,delay:s.delay,easing:i})].join(`,`),c&&c(e,t)}),w=Yd(b,l),T=Yd(b,p);return(0,U.jsx)(fp,{appear:r,in:s,nodeRef:b,onEnter:C,onEntered:w,onEntering:S,onExit:Yd(b,e=>{let{duration:t,delay:n,easing:r}=Zd({style:m,timeout:h,easing:o},{mode:`exit`}),i;h===`auto`&&!y.shouldReduceMotion?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):(i=t,_.current=null);let a=y.getTransitionTiming({duration:i,delay:n});e.style.transition=[v.transitions.create(`opacity`,{duration:a.duration,delay:a.delay}),v.transitions.create(`transform`,{duration:typeof a.duration==`string`?a.duration:a.duration*.666,delay:a.delay||(typeof a.duration==`string`?a.duration:a.duration*.333),easing:r})].join(`,`),e.style.opacity=0,e.style.transform=Cb(.75),d&&d(e)}),onExited:Yd(b,e=>{e.style.transition=``,f&&f(e)}),onExiting:T,addEndListener:n?e=>{n(b.current,e)}:void 0,getAutoTimeout:h===`auto`?()=>_.current:void 0,reduceMotion:y.shouldReduceMotion,timeout:h===`auto`?null:h,...g,children:(e,{ownerState:t,...n})=>{let r=Xd(e,s,wb,Tb,m,i.props.style);return L.cloneElement(i,{style:r,ref:x,...n})}})});Eb&&(Eb.muiSupportAuto=!0);function Db(e){return Zs(`MuiInputLabel`,e)}var Ob=Qs(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),kb=e=>{let{classes:t,disableUnderline:n}=e,r=Tl({root:[`root`,!n&&`underline`],input:[`input`]},yf,t);return{...t,...r}},Ab=K(sf,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...rf(e,t),!n.disableUnderline&&t.underline]}})(jd(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${Ob.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,...$d(e,`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${bf.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${bf.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,...$d(e,`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${bf.disabled}, .${bf.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${bf.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),jb=K(cf,{name:`MuiInput`,slot:`Input`,overridesResolver:af})({}),Mb=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiInput`}),{disableUnderline:r=!1,fullWidth:i=!1,inputComponent:a=`input`,multiline:o=!1,notched:s,slotProps:c,slots:l={},type:u=`text`,...d}=n,f=kb(n),p={root:{ownerState:{disableUnderline:r}}},m=c?eo(c,p):p;return(0,U.jsx)(uf,{slots:{root:l.root??Ab,input:l.input??jb},slotProps:m,fullWidth:i,inputComponent:a,multiline:o,ref:t,type:u,...d,classes:f})});Mb.muiName=`Input`;function Nb(e){return Zs(`MuiInputAdornment`,e)}var Pb=Qs(`MuiInputAdornment`,[`root`,`filled`,`standard`,`outlined`,`positionStart`,`positionEnd`,`disablePointerEvents`,`hiddenLabel`,`sizeSmall`]),Fb,Ib=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${q(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},Lb=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:a,variant:o}=e;return Tl({root:[`root`,n&&`disablePointerEvents`,i&&`position${q(i)}`,o,r&&`hiddenLabel`,a&&`size${q(a)}`]},Nb,t)},Rb=K(`div`,{name:`MuiInputAdornment`,slot:`Root`,overridesResolver:Ib})(jd(({theme:e})=>({display:`flex`,maxHeight:`2em`,alignItems:`center`,whiteSpace:`nowrap`,color:(e.vars||e).palette.action.active,variants:[{props:{variant:`filled`},style:{[`&.${Pb.positionStart}&:not(.${Pb.hiddenLabel})`]:{marginTop:16}}},{props:{position:`start`},style:{marginRight:8}},{props:{position:`end`},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:`none`}}]}))),zb=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiInputAdornment`}),{children:r,className:i,component:a=`div`,disablePointerEvents:o=!1,disableTypography:s=!1,position:c,variant:l,...u}=n,d=Cd()||{},f=l;l&&d.variant,d&&!f&&(f=d.variant);let p={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:o,position:c,variant:f},m=Lb(p);return(0,U.jsx)(Sd.Provider,{value:null,children:(0,U.jsx)(Rb,{as:a,ownerState:p,className:W(m.root,i),ref:t,...u,children:typeof r==`string`&&!s?(0,U.jsx)(J,{color:`textSecondary`,children:r}):(0,U.jsxs)(L.Fragment,{children:[c===`start`?Fb||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):null,r]})})})}),Bb=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Tl({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${q(r)}`,o],asterisk:[s&&`asterisk`]},Db,t);return{...t,...c}},Vb=K(xb,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${vf.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(jd(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{...$d(e,[`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),Hb=L.forwardRef(function(e,t){let n=Md({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,[l,u]=wd({props:n,states:[`size`,`variant`,`required`,`focused`]}),d=a;d===void 0&&u&&(d=u.filled||u.focused||u.adornedStart);let f={...n,disableAnimation:r,formControl:u,shrink:d,size:l.size,variant:l.variant,required:l.required,focused:l.focused},p=Bb(f);return(0,U.jsx)(Vb,{"data-shrink":d,ref:t,className:W(p.root,s),...c,ownerState:f,classes:p})});function Ub(e){return Zs(`MuiLinearProgress`,e)}Qs(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`bar`,`bar1`,`bar2`]);var Wb=4,Gb={},Kb=Na`
|
|
193
|
-
0% {
|
|
194
|
-
left: -35%;
|
|
195
|
-
right: 100%;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
60% {
|
|
199
|
-
left: 100%;
|
|
200
|
-
right: -90%;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
100% {
|
|
204
|
-
left: 100%;
|
|
205
|
-
right: -90%;
|
|
206
|
-
}
|
|
207
|
-
`,qb=typeof Kb==`string`?null:Ma`
|
|
208
|
-
animation: ${Kb} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
209
|
-
`,Jb=Na`
|
|
210
|
-
0% {
|
|
211
|
-
left: -200%;
|
|
212
|
-
right: 100%;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
60% {
|
|
216
|
-
left: 107%;
|
|
217
|
-
right: -8%;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
100% {
|
|
221
|
-
left: 107%;
|
|
222
|
-
right: -8%;
|
|
223
|
-
}
|
|
224
|
-
`,Yb=typeof Jb==`string`?null:Ma`
|
|
225
|
-
animation: ${Jb} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
226
|
-
`,Xb=Na`
|
|
227
|
-
0% {
|
|
228
|
-
opacity: 1;
|
|
229
|
-
background-position: 0 -23px;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
60% {
|
|
233
|
-
opacity: 0;
|
|
234
|
-
background-position: 0 -23px;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
100% {
|
|
238
|
-
opacity: 1;
|
|
239
|
-
background-position: -200px -23px;
|
|
240
|
-
}
|
|
241
|
-
`,Zb=typeof Xb==`string`?null:Ma`
|
|
242
|
-
animation: ${Xb} 3s infinite linear;
|
|
243
|
-
`,Qb=e=>{let{classes:t,variant:n,color:r}=e;return Tl({root:[`root`,`color${q(r)}`,n],dashed:[`dashed`],bar1:[`bar`,`bar1`],bar2:[`bar`,`bar2`,n===`buffer`&&`color${q(r)}`]},Ub,t)},$b=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),ex=K(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${q(n.color)}`],t[n.variant]]}})(jd(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{backgroundColor:$b(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),tx=K(`span`,{name:`MuiLinearProgress`,slot:`Dashed`})(jd(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(Nm()).map(([t])=>{let n=$b(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),Zb||{animation:`${Xb} 3s infinite linear`},jd(({theme:e})=>Qd(e,{animation:`none`})||Gb)),nx=K(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>[t.bar,t.bar1]})(jd(({theme:e})=>{let t=Qd(e,{animation:`none`,left:`30%`,right:`auto`,width:`40%`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...$d(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{...$d(e,`transform`,{duration:`.${Wb}s`,easing:`linear`})}},{props:{variant:`buffer`},style:{zIndex:1,...$d(e,`transform`,{duration:`.${Wb}s`,easing:`linear`})}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:qb||{animation:`${Kb} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),rx=K(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>[t.bar,t.bar2]})(jd(({theme:e})=>{let t=Qd(e,{animation:`none`,display:`none`});return{width:`100%`,position:`absolute`,left:0,bottom:0,top:0,...$d(e,`transform`,{duration:`0.2s`,easing:`linear`}),transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:$b(e,t),...$d(e,`transform`,{duration:`.${Wb}s`,easing:`linear`})}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:Yb||{animation:`${Jb} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:t}]:[]]}})),ix=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,max:a,min:o,value:s,valueBuffer:c,variant:l=`indeterminate`,...u}=n,d={...n,color:i,variant:l},f=o??0,p=a??100,m=Qb(d),h=Wc(),g={},_={bar1:{},bar2:{}};if((l===`determinate`||l===`buffer`)&&s!==void 0){let e=p-f,t=(s-f)/e*100-100;h&&(t=-t),_.bar1.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`,g[`aria-valuenow`]=s,g[`aria-valuemin`]=f,g[`aria-valuemax`]=p}if(l===`buffer`&&c!==void 0){let e=p-f,t=(c-f)/e*100-100;h&&(t=-t),_.bar2.transform=e>0?`translateX(${t}%)`:`translateX(-100%)`}return(0,U.jsxs)(ex,{className:W(m.root,r),ownerState:d,role:`progressbar`,...g,ref:t,...u,children:[l===`buffer`?(0,U.jsx)(tx,{className:m.dashed,ownerState:d}):null,(0,U.jsx)(nx,{className:m.bar1,ownerState:d,style:_.bar1}),l===`determinate`?null:(0,U.jsx)(rx,{className:m.bar2,ownerState:d,style:_.bar2})]})});function ax(e){return Zs(`MuiLink`,e)}var ox=Qs(`MuiLink`,[`root`,`underlineNone`,`underlineHover`,`underlineAlways`,`button`,`focusVisible`]),sx=({theme:e,ownerState:t})=>{let n=t.color;if(`colorSpace`in e&&e.colorSpace){let r=Io(e,`palette.${n}.main`)||Io(e,`palette.${n}`)||t.color;return e.alpha(r,.4)}let r=Io(e,`palette.${n}.main`,!1)||Io(e,`palette.${n}`,!1)||t.color,i=Io(e,`palette.${n}.mainChannel`)||Io(e,`palette.${n}Channel`);return`vars`in e&&i?`rgba(${i} / 0.4)`:kc(r,.4)},cx={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},lx=e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e;return Tl({root:[`root`,`underline${q(i)}`,n===`button`&&`button`,r&&`focusVisible`]},ax,t)},ux=K(J,{name:`MuiLink`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${q(n.underline)}`],n.component===`button`&&t.button]}})(jd(({theme:e})=>({variants:[{props:{underline:`none`},style:{textDecoration:`none`}},{props:{underline:`hover`},style:{textDecoration:`none`,"&:hover":{textDecoration:`underline`}}},{props:{underline:`always`},style:{textDecoration:`underline`,"&:hover":{textDecorationColor:`inherit`}}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color!==`inherit`,style:{textDecorationColor:`var(--Link-underlineColor)`}},{props:({underline:e,ownerState:t})=>e===`always`&&t.color===`inherit`,style:e.colorSpace?{textDecorationColor:e.alpha(`currentColor`,.4)}:null},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{underline:`always`,color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:`always`,color:`textPrimary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:`always`,color:`textSecondary`},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:`always`,color:`textDisabled`},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:`button`},style:{position:`relative`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${ox.focusVisible}`]:{outline:`auto`}}}]}))),dx=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiLink`}),r=Ed(),{className:i,color:a=`primary`,component:o=`a`,onBlur:s,onFocus:c,TypographyClasses:l,underline:u=`always`,variant:d=`inherit`,sx:f,...p}=n,[m,h]=L.useState(!1),g=e=>{Zp(e.target)||h(!1),s&&s(e)},_=e=>{Zp(e.target)&&h(!0),c&&c(e)},v={...n,color:a,component:o,focusVisible:m,underline:u,variant:d},y=lx(v);return(0,U.jsx)(ux,{color:a,className:W(y.root,i),classes:l,component:o,onBlur:g,onFocus:_,ref:t,ownerState:v,variant:d,...p,sx:[...cx[a]===void 0?[{color:a}]:[],...Array.isArray(f)?f:[f]],style:{...p.style,...u===`always`&&a!==`inherit`&&!cx[a]&&{"--Link-underlineColor":sx({theme:r,ownerState:v})}}})}),fx=L.createContext({});function px(e){return Zs(`MuiList`,e)}Qs(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var mx=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Tl({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},px,t)},hx=K(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:`isolate`}}]}),gx=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=L.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=mx(d);return(0,U.jsx)(fx.Provider,{value:u,children:(0,U.jsxs)(hx,{as:a,className:W(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})});function _x(e){return Zs(`MuiListItem`,e)}Qs(`MuiListItem`,[`root`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var vx=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},yx=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:a,divider:o,selected:s}=e,c=Tl({root:[`root`,r&&`dense`,!a&&`gutters`,o&&`divider`,i&&`disabled`,t===`flex-start`&&`alignItemsFlexStart`,s&&`selected`]},xf,n);return{...n,...c}},bx=K(wm,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiListItemButton`,slot:`Root`,overridesResolver:vx})(jd(({theme:e})=>({display:`flex`,flexGrow:1,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minWidth:0,boxSizing:`border-box`,textAlign:`left`,paddingTop:8,paddingBottom:8,...$d(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Sf.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Sf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Sf.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Sf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Sf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),xx=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiListItemButton`}),{alignItems:r=`center`,autoFocus:i=!1,component:a=`div`,children:o,dense:s=!1,disableGutters:c=!1,divider:l=!1,focusVisibleClassName:u,selected:d=!1,className:f,...p}=n,m=L.useContext(fx),h=L.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:c}),[r,m.dense,s,c]),g=L.useRef(null);Pd(()=>{i&&g.current&&g.current.focus()},[i]);let _={...n,alignItems:r,dense:h.dense,disableGutters:c,divider:l,selected:d},v=yx(_),{root:y,...b}=v,x=Nd(g,t);return(0,U.jsx)(fx.Provider,{value:h,children:(0,U.jsx)(bx,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&a===`div`?`button`:a,internalNativeButton:!1,focusVisibleClassName:W(v.focusVisible,u),ownerState:_,className:W(v.root,f),...p,classes:b,children:o})})});function Sx(e){return Zs(`MuiListItemSecondaryAction`,e)}Qs(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var Cx=e=>{let{disableGutters:t,classes:n}=e;return Tl({root:[`root`,t&&`disableGutters`]},Sx,n)},wx=K(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Tx=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiListItemSecondaryAction`}),{className:r,component:i,...a}=n,o=L.useContext(fx),s={...n,disableGutters:o.disableGutters},c=Cx(s);return(0,U.jsx)(wx,{as:i,className:W(c.root,r),ownerState:s,ref:t,...a})});Tx.muiName=`ListItemSecondaryAction`;var Ex=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding]},Dx=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o}=e;return Tl({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`],secondaryAction:[`secondaryAction`]},_x,n)},Ox=K(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:Ex})(jd(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${Sf.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{...$d(e,`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),kx=K(Tx,{name:`MuiListItem`,slot:`secondaryAction`})({}),Ax=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o=`li`,dense:s=!1,disableGutters:c=!1,disablePadding:l=!1,divider:u=!1,secondaryAction:d,slotProps:f={},slots:p={},...m}=n,h=L.useContext(fx),g=L.useMemo(()=>({dense:s||h.dense||!1,alignItems:r,disableGutters:c}),[r,h.dense,s,c]),_={...n,alignItems:r,dense:g.dense,disableGutters:c,disablePadding:l,divider:u,secondaryAction:d},v=Dx(_),y={slots:p,slotProps:f},[b,x]=Ap(`root`,{ref:t,elementType:Ox,externalForwardedProps:{component:o,...y,...m},ownerState:_,className:W(v.root,a)}),[S,C]=Ap(`secondaryAction`,{elementType:kx,shouldForwardComponentProp:!0,externalForwardedProps:y,ownerState:_,className:v.secondaryAction});return(0,U.jsx)(fx.Provider,{value:g,children:(0,U.jsxs)(b,{...x,children:[i,d&&(0,U.jsx)(S,{...C,children:d})]})})});function jx(e){return Zs(`MuiListItemIcon`,e)}var Mx=Qs(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),Nx=e=>{let{alignItems:t,classes:n}=e;return Tl({root:[`root`,t===`flex-start`&&`alignItemsFlexStart`]},jx,n)},Px=K(`div`,{name:`MuiListItemIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.alignItems===`flex-start`&&t.alignItemsFlexStart]}})(jd(({theme:e})=>({minWidth:e.spacing(4.5),color:(e.vars||e).palette.action.active,flexShrink:0,display:`inline-flex`,variants:[{props:{alignItems:`flex-start`},style:{marginTop:8}}]}))),Fx=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiListItemIcon`}),{className:r,...i}=n,a=L.useContext(fx),o={...n,alignItems:a.alignItems},s=Nx(o);return(0,U.jsx)(Px,{className:W(s.root,r),ownerState:o,ref:t,...i})});function Ix(e){return Zs(`MuiListItemText`,e)}var Lx=Qs(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),Rx=e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return Tl({root:[`root`,n&&`inset`,a&&`dense`,r&&i&&`multiline`],primary:[`primary`],secondary:[`secondary`]},Ix,t)},zx=K(`div`,{name:`MuiListItemText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Lx.primary}`]:t.primary},{[`& .${Lx.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:`1 1 auto`,minWidth:0,marginTop:4,marginBottom:4,[`.${ph.root}:where(& .${Lx.primary})`]:{display:`block`},[`.${ph.root}:where(& .${Lx.secondary})`]:{display:`block`},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Bx=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiListItemText`}),{children:r,className:i,disableTypography:a=!1,inset:o=!1,primary:s,secondary:c,slots:l={},slotProps:u={},...d}=n,{dense:f}=L.useContext(fx),p=s??r,m=c,h={...n,disableTypography:a,inset:o,primary:!!p,secondary:!!m,dense:f},g=Rx(h),_={slots:l,slotProps:u},[v,y]=Ap(`root`,{className:W(g.root,i),elementType:zx,externalForwardedProps:{..._,...d},ownerState:h,ref:t}),[b,x]=Ap(`primary`,{className:g.primary,elementType:J,externalForwardedProps:_,ownerState:h}),[S,C]=Ap(`secondary`,{className:g.secondary,elementType:J,externalForwardedProps:_,ownerState:h});return p!=null&&p.type!==J&&!a&&(p=(0,U.jsx)(b,{variant:f?`body2`:`body1`,component:x?.variant?void 0:`span`,...x,children:p})),m!=null&&m.type!==J&&!a&&(m=(0,U.jsx)(S,{variant:`body2`,color:`textSecondary`,...C,children:m})),(0,U.jsxs)(v,{...y,children:[p,m]})}),Vx=L.createContext(void 0);function Hx(){let e=L.useContext(Vx);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var Ux=Object.is;function Wx(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!Ux(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var Gx=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function Kx(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=oS,wrap:o=!0}=e,[s,c]=L.useState(t),[l,u]=L.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=L.useRef(null),p=L.useRef(new Map),[m,h]=L.useState(0),g=L.useMemo(()=>rS(p.current),[m]),_=Jx(d,g,a,n),v=L.useRef(_);v.current=_;let y=L.useCallback(()=>{let e=rS(p.current);return eS(e,Jx(v.current,e,a,n))},[n,a]),b=L.useCallback(()=>p.current,[]),x=md(e=>{Wx(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),S=md(e=>{p.current.delete(e)&&h(e=>e+1)}),C=md(e=>{c(e)}),w=L.useCallback(e=>v.current===e,[]),T=L.useCallback((e,t,n,r)=>{let i=Qx(iS(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),E=L.useCallback(e=>({onFocus:e=>{let t=iS(p.current),n=nS(t,e.target);n!==-1&&c(t[n].id)},onKeyDown:e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!Gx.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,n=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,n=`ArrowLeft`);let a=iS(p.current),s=Id(hd(f.current)),c=s===f.current,l=Zx(a,s,v.current),u=`next`;switch(e.key){case t:u=`previous`,e.preventDefault(),c&&(l=a.length);break;case n:e.preventDefault(),c&&(l=-1);break;case`Home`:e.preventDefault(),l=-1;break;case`End`:e.preventDefault(),u=`previous`,l=a.length;break;default:return}T(l,u,o)},ref:lS(e,e=>{f.current=e})}),[T,i,r,o]),D=L.useCallback(e=>{let t=iS(p.current),n=Id(hd(f.current)),r=n===f.current?-1:Zx(t,n,v.current);return T(r,`next`,!0,e)?.id??null},[T]);return L.useMemo(()=>({activeItemId:_,focusNext:D,getActiveItem:y,getContainerProps:E,getItemMap:b,isItemActive:w,registerItem:x,setActiveItemId:C,unregisterItem:S}),[_,D,y,E,b,w,x,C,S])}function qx(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=Hx(),i=L.useRef(null),a=L.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=L.useRef(a);o.current=a;let s=L.useCallback(t=>{if(i.current=t,t==null){queueMicrotask(()=>{i.current??r(e.id)});return}n({...o.current,element:t})},[e.id,n,r]),c=pd(e.ref,s);return mc(()=>{i.current&&n({...a,element:i.current})},[a,n]),mc(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function Jx(e,t,n,r){return e==null?Xx(t,n,r):Yx(e,t,n)}function Yx(e,t,n){let r=tS(t,e);return r===-1?$x(t,n):n(t[r])?t[r].id:Qx(t,r,`next`,!1,n)?.id??null}function Xx(e,t,n){let r=n?.(e);if(r!=null){let n=eS(e,r);if(n&&t(n))return n.id}return $x(e,t)}function Zx(e,t,n){if(t){let n=nS(e,t);if(n!==-1)return n}return tS(e,n)}function Qx(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=aS(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=aS(s,a,n,r);else return t}return null}function $x(e,t){return e.find(e=>t(e))?.id??null}function eS(e,t){return t==null?null:e.find(e=>e.id===t)??null}function tS(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function nS(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function rS(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(sS).sort((e,t)=>cS(e.element,t.element)),r=t.filter(e=>!sS(e));return[...n,...r]}function iS(e){return rS(e).filter(sS)}function aS(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function oS(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function sS(e){return e.element!=null&&e.element.isConnected}function cS(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function lS(...e){return t=>{e.forEach(e=>{Qf(e??null,t)})}}var uS=Wv;function dS(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}function fS(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function pS(e){return e==null||typeof e==`string`&&!e.trim()}function mS(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var hS=L.createContext(null);function gS(){return L.useContext(hS)}var _S=hS.Provider,vS=L.createContext(void 0);function yS(){let e=L.useContext(vS);if(e===void 0)throw Error(`MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.`);return e}function bS(e){let t=e?.element??e;if(!t)return``;if(e?.textValue!==void 0)return e.textValue;let n=t.innerText;return n===void 0&&(n=t.textContent),n??``}function xS(e,t){if(t===void 0)return!0;let n=bS(e);return n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function SS(e,t){return xS(e,t)?oS(e):!1}function CS(e,t){dS(e,t)}var wS=L.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=L.useRef(null),p=L.useRef(!1),[m,h]=L.useState(!1),g=gS(),_=L.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=Kx({activeItemId:void 0,getDefaultActiveItemId:L.useCallback(e=>u===`selectedMenu`?e.find(e=>e.selected&&oS(e))?.id??e.find(e=>oS(e))?.id??null:e.find(e=>oS(e))?.id??null,[u]),orientation:`vertical`,wrap:!c}),{activeItemId:y,focusNext:b,getActiveItem:x,getContainerProps:S,getItemMap:C}=v,w=np((e=!1)=>{if(!f.current||!e&&p.current)return null;if(i){let e=x();if(e?.element){let t=Array.from(C().values()).some(e=>e.selected),n=u===`menu`&&t&&!e.selected&&g==null;return h(n),CS(e.element,g),p.current=!0,e.element}return r?(h(!1),f.current.focus(),f.current):null}return r?(h(!1),f.current.focus(),p.current=!0,f.current):(h(!1),null)});Pd(()=>{if(!r&&!i){p.current=!1,h(!1);return}w()},[y,i,r,w]),L.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${uS(Zf(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current},focusInitialTarget:()=>{if(!f.current)return null;let e=Ld(Fd(f.current));return e&&ey(f.current,e)?e:w(!0)}}),[w]);let T=S(),E=Nd(f,T.ref,t),D=L.useMemo(()=>({itemsFocusableWhenDisabled:s,suppressInitialFocusVisible:m,variant:u}),[s,m,u]);return(0,U.jsx)(gx,{role:`menu`,ref:E,className:o,onKeyDown:np(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&l){l(e);return}if(T.onKeyDown(e),e.key.length===1){let t=_.current,n=e.key.toLowerCase(),r=performance.now();t.keys.length>0&&(r-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&n!==t.keys[0]&&(t.repeating=!1)),t.lastTime=r,t.keys.push(n);let i=Ld(Fd(f.current)),a=i&&!t.repeating&&xS(i,t);t.previousKeyMatched&&(a||b(e=>SS(e,t))!=null)?e.preventDefault():t.previousKeyMatched=!1}l&&l(e)}),onFocus:T.onFocus,tabIndex:-1,...d,children:(0,U.jsx)(vS.Provider,{value:D,children:(0,U.jsx)(Vx.Provider,{value:v,children:a})})})});function TS(e){return Zs(`MuiPopover`,e)}Qs(`MuiPopover`,[`root`,`paper`]);function ES(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function DS(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function OS(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function kS(e){return typeof e==`function`?e():e}var AS=e=>{let{classes:t}=e;return Tl({root:[`root`],paper:[`paper`]},TS,t)},jS=K(yy,{name:`MuiPopover`,slot:`Root`})({}),MS=K(Vp,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),NS=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,disableAutoFocus:d=!1,elevation:f=8,marginThreshold:p=16,open:m,slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},transitionDuration:v=`auto`,disableScrollLock:y=!1,...b}=n,x=L.useRef(),S={...n,anchorOrigin:a,anchorReference:s,elevation:f,marginThreshold:p,transformOrigin:_,transitionDuration:v},C=AS(S),w=L.useCallback(()=>{if(s===`anchorPosition`)return o;let e=kS(i),t=(e&&e.nodeType===1?e:Fd(x.current).body).getBoundingClientRect();return{top:t.top+ES(t,a.vertical),left:t.left+DS(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),T=L.useCallback(e=>({vertical:ES(e,_.vertical),horizontal:DS(e,_.horizontal)}),[_.horizontal,_.vertical]),E=L.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if(s===`none`)return{top:null,left:null,transformOrigin:OS(n)};let r=w(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Zf(kS(i)),d=u.innerHeight-p,f=u.innerWidth-p;if(p!=null&&a<p){let e=a-p;a-=e,n.vertical+=e}else if(p!=null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(p!=null&&o<p){let e=o-p;o-=e,n.horizontal+=e}else if(l>f){let e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:OS(n)}},[i,s,w,T,p]),[D,O]=L.useState(m),ee=L.useCallback(()=>{let e=x.current;if(!e)return;let t=E(e);t.top!=null&&e.style.setProperty(`top`,t.top),t.left!=null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)},[E]);L.useEffect(()=>(y&&window.addEventListener(`scroll`,ee),()=>window.removeEventListener(`scroll`,ee)),[i,y,ee]);let te=()=>{ee()},k=()=>{O(!1)};L.useEffect(()=>{m&&ee()}),L.useImperativeHandle(r,()=>m?{updatePosition:()=>{ee()}}:null,[m,ee]),L.useEffect(()=>{if(!m)return;let e=Yf(()=>{ee()}),t=Zf(kS(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,m,ee]);let A=v,j={slots:h,slotProps:g},[M,ne]=Ap(`transition`,{elementType:Eb,externalForwardedProps:j,ownerState:S,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),te()},onExited:t=>{e.onExited?.(t),k()}}),additionalProps:{appear:!0,in:m}});v===`auto`&&!M.muiSupportAuto&&(A=void 0);let re=u||(i?Fd(kS(i)).body:void 0),[ie,{slots:ae,slotProps:N,...oe}]=Ap(`root`,{ref:t,elementType:jS,externalForwardedProps:{...j,...b},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:ip(typeof g.backdrop==`function`?g.backdrop(S):g.backdrop,{invisible:!0})},container:re,open:m},ownerState:S,className:W(C.root,l)}),[se,ce]=Ap(`paper`,{ref:x,className:C.paper,elementType:MS,externalForwardedProps:j,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:D?void 0:{opacity:0}},ownerState:S});return(0,U.jsx)(ie,{...oe,...!dd(ie)&&{slots:ae,slotProps:N,disableAutoFocus:d,disableScrollLock:y},children:(0,U.jsx)(M,{...ne,timeout:A,children:(0,U.jsx)(se,{...ce,children:c})})})});function PS(e){return Zs(`MuiMenu`,e)}Qs(`MuiMenu`,[`root`,`paper`,`list`]);var FS={vertical:`top`,horizontal:`right`},IS={vertical:`top`,horizontal:`left`},LS=e=>{let{classes:t}=e;return Tl({root:[`root`],paper:[`paper`],list:[`list`]},PS,t)},RS=K(NS,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),zS=K(MS,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),BS=K(wS,{name:`MuiMenu`,slot:`List`})({outline:0}),VS=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,onClose:s,open:c,PopoverClasses:l,transitionDuration:u=`auto`,variant:d=`selectedMenu`,slots:f={},slotProps:p={},...m}=n,h=Wc(),g={...n,autoFocus:r,disableAutoFocusItem:o,transitionDuration:u,variant:d},_=LS(g),v=r&&c,y=v&&!o,b=L.useRef(null),x=(e,t)=>{b.current&&(b.current.adjustStyleForScrollbar(e,{direction:h?`rtl`:`ltr`}),v&&b.current.focusInitialTarget?.())},S=e=>{e.key===`Tab`&&(e.preventDefault(),s&&s(e,`tabKeyDown`))},C={slots:f,slotProps:p},w=v_({elementType:f.root,externalSlotProps:p.root,ownerState:g,className:[_.root,a]}),[T,E]=Ap(`paper`,{className:_.paper,elementType:zS,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:g}),[D,O]=Ap(`list`,{className:_.list,elementType:BS,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{S(t),e.onKeyDown?.(t)}}),ownerState:g}),ee=typeof p.transition==`function`?p.transition(g):p.transition;return(0,U.jsx)(RS,{disableAutoFocus:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:h?`right`:`left`},transformOrigin:h?FS:IS,slots:{root:f.root,paper:T,backdrop:f.backdrop,transition:f.transition},slotProps:{root:w,paper:E,backdrop:typeof p.backdrop==`function`?p.backdrop(g):p.backdrop,transition:{...ee,onEntering:(...e)=>{x(...e),ee?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:u,ownerState:g,...m,classes:l,children:(0,U.jsx)(D,{actions:b,autoFocus:v,autoFocusItem:y,variant:d,...O,children:i})})}),HS=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},US=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=Tl({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},Cf,o);return{...o,...s}},WS=K(wm,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:HS})(jd(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${wf.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${wf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${wf.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${wf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${wf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Hy.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Hy.inset}`]:{marginLeft:52},[`& .${Lx.root}`]:{marginTop:0,marginBottom:0},[`& .${Lx.inset}`]:{paddingLeft:36},[`& .${Mx.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Mx.root} svg`]:{fontSize:`1.25rem`}}}]}))),GS=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=gS(),m=L.useContext(fx),h=L.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=yS(),_=$f(),v=g.suppressInitialFocusVisible,y=g.itemsFocusableWhenDisabled,b=L.useRef(null);Pd(()=>{r&&b.current&&dS(b.current,p)},[r]);let x={...n,dense:h.dense,divider:o,disableGutters:s},S=US(n),{root:C,...w}=S,T=qx({id:_,ref:t,disabled:n.disabled,focusableWhenDisabled:y,selected:n.selected}),E=Nd(b,T.ref),D;return u===void 0?g.variant===`selectedMenu`?D=T.tabIndex:(!n.disabled||y)&&(D=-1):D=u,(0,U.jsx)(fx.Provider,{value:h,children:(0,U.jsx)(WS,{ref:E,role:l,tabIndex:D,component:i,internalNativeButton:!1,focusableWhenDisabled:y,suppressFocusVisible:v,focusVisibleClassName:W(S.focusVisible,c),className:W(S.root,d),...f,ownerState:x,classes:w})})}),KS=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Tl({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${q(n)}`,a&&`iconOpen`,r&&`disabled`]},Tf,t)},qS=K(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Ef.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),JS=K(qS,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:kd,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Ef.multiple}`]:t.multiple}]}})({}),YS=K(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Ef.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),XS=K(YS,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${q(n.variant)}`],n.open&&t.iconOpen]}})({}),ZS=L.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=KS(l);return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(JS,{ownerState:l,className:W(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,U.jsx)(XS,{as:a,ownerState:l,className:u.icon})]})}),QS,$S=K(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:kd})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),eC=K(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:kd})(jd(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,...$d(e,`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,...$d(e,`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,...$d(e,`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function tC(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,U.jsx)($S,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,U.jsx)(eC,{ownerState:c,children:s?(0,U.jsx)(`span`,{children:i}):QS||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}var nC=e=>{let{classes:t}=e,n=Tl({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},Df,t);return{...t,...n}},rC=K(sf,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:rf})(jd(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Of.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Of.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Of.focused} .${Of.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{[`&.${Of.focused} .${Of.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Of.error} .${Of.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Of.disabled} .${Of.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),iC=K(tC,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(jd(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),aC=K(cf,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:af})(jd(({theme:e})=>({padding:`16.5px 14px`,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`},borderRadius:`inherit`,...e.vars&&e.applyStyles(`dark`,{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`})},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),oC=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiOutlinedInput`}),{fullWidth:r=!1,inputComponent:i=`input`,label:a,multiline:o=!1,notched:s,slots:c={},slotProps:l={},type:u=`text`,...d}=n,f=nC(n),[p,m]=wd({props:n,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),h={...n,color:p.color||`primary`,disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:r,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:u},g=c.root??rC,_=c.input??aC,[v,y]=Ap(`notchedOutline`,{elementType:iC,className:f.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:c,slotProps:l},additionalProps:{label:a!=null&&a!==``&&p.required?(0,U.jsxs)(L.Fragment,{children:[a,` `,`*`]}):a}});return(0,U.jsx)(uf,{slots:{root:g,input:_},slotProps:l,renderSuffix:e=>(0,U.jsx)(v,{...y,notched:s===void 0?!!(e.startAdornment||e.filled||e.focused):s}),fullWidth:r,inputComponent:i,multiline:o,ref:t,type:u,...d,classes:{...f,notchedOutline:null}})});oC.muiName=`Input`;var sC=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`RadioButtonUnchecked`),cC=Jf((0,U.jsx)(`path`,{d:`M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z`}),`RadioButtonChecked`),lC=K(`span`,{name:`MuiRadioButtonIcon`,shouldForwardProp:kd})({position:`relative`,display:`flex`}),uC=K(sC,{name:`MuiRadioButtonIcon`})({transform:`scale(1)`}),dC=K(cC,{name:`MuiRadioButtonIcon`})(jd(({theme:e})=>({left:0,position:`absolute`,transform:`scale(0)`,...$d(e,`transform`,{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:`scale(1)`,...$d(e,`transform`,{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function fC(e){let{checked:t=!1,classes:n={},fontSize:r}=e,i={...e,checked:t};return(0,U.jsxs)(lC,{className:n.root,ownerState:i,children:[(0,U.jsx)(uC,{fontSize:r,className:n.background,ownerState:i}),(0,U.jsx)(dC,{fontSize:r,className:n.dot,ownerState:i})]})}var pC=L.createContext(void 0);function mC(){return L.useContext(pC)}var hC=e=>{let{classes:t,color:n,size:r}=e,i={root:[`root`,`color${q(n)}`,r!==`medium`&&`size${q(r)}`]};return{...t,...Tl(i,kf,t)}},gC=K(Ev,{shouldForwardProp:e=>kd(e)||e===`classes`,name:`MuiRadio`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size!==`medium`&&t[`size${q(n.size)}`],t[`color${q(n.color)}`]]}})(jd(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${Af.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:`default`,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${Af.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]})));function _C(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var vC=(0,U.jsx)(fC,{checked:!0}),yC=(0,U.jsx)(fC,{}),bC=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiRadio`}),{checked:r,checkedIcon:i=vC,color:a=`primary`,icon:o=yC,name:s,onChange:c,size:l=`medium`,className:u,disabled:d,disableRipple:f=!1,slots:p={},slotProps:m={},...h}=n,g=Cd(),_=d;g&&_===void 0&&(_=g.disabled),_??=!1;let v={...n,disabled:_,disableRipple:f,color:a,size:l},y=hC(v),b=mC(),x=r,S=Uf(c,b&&b.onChange),C=s;b&&(x===void 0&&(x=_C(b.value,n.value)),C===void 0&&(C=b.name));let w=m.input,[T,E]=Ap(`root`,{ref:t,elementType:gC,className:W(y.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...h},getSlotProps:e=>({...e,onChange:(t,...n)=>{e.onChange?.(t,...n),S(t,...n)}}),ownerState:v,additionalProps:{type:`radio`,icon:L.cloneElement(o,{fontSize:o.props.fontSize??l}),checkedIcon:L.cloneElement(i,{fontSize:i.props.fontSize??l}),disabled:_,name:C,checked:x,slots:p,slotProps:{input:typeof w==`function`?w(v):w}}});return(0,U.jsx)(T,{...E,classes:y})});function xC(e){return Zs(`MuiRadioGroup`,e)}Qs(`MuiRadioGroup`,[`root`,`row`,`error`]);var SC=e=>{let{classes:t,row:n,error:r}=e;return Tl({root:[`root`,n&&`row`,r&&`error`]},xC,t)},CC=L.forwardRef(function(e,t){let{actions:n,children:r,className:i,defaultValue:a,name:o,onChange:s,value:c,...l}=e,u=L.useRef(null),d=SC(e),[f,p]=tp({controlled:c,default:a,name:`RadioGroup`});L.useImperativeHandle(n,()=>({focus:()=>{let e=u.current.querySelector(`input:not(:disabled):checked`);e||=u.current.querySelector(`input:not(:disabled)`),e&&e.focus()}}),[]);let m=Nd(t,u),h=$f(o),g=L.useMemo(()=>({name:h,onChange(e){p(e.target.value),s&&s(e,e.target.value)},value:f}),[h,s,p,f]);return(0,U.jsx)(pC.Provider,{value:g,children:(0,U.jsx)(pb,{role:`radiogroup`,ref:m,className:W(d.root,i),...l,children:r})})}),wC={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function TC(e){return Zs(`MuiSelect`,e)}var EC=Qs(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`nativeInput`,`error`]);function DC(e){return Object.prototype.hasOwnProperty.call(e.props,`value`)}function OC(e){if(typeof e==`string`||typeof e==`number`)return String(e);let t=``;return L.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=String(e):L.isValidElement(e)&&(t+=OC(e.props.children))}),t}function kC(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length;for(let n=0;n<e.length;n+=1){let i=(r+n)%e.length;if(e[i].label.startsWith(t))return i}return-1}function AC(e,t){return!e.some(e=>e.label[0]===t&&e.label[1]===t)}function jC(e,t){let n=[],r=-1;for(let i=0;i<e.length;i+=1){let a=e[i];if(!L.isValidElement(a)||!DC(a)||a.props.disabled)continue;let o=OC(a.props.children).trim().toLowerCase();o!==``&&(r===-1&&mS(t,a.props.value)&&(r=n.length),n.push({child:a,label:o,value:a.props.value}))}return{options:n,selectedIndex:r}}var MC,NC=2,PC=400,FC=200,Kee=750,IC=` `,qee=`ArrowUp`,Jee=`ArrowDown`,Yee=`Enter`;function LC(e,t){if(!t)return!1;if(e.composedPath().includes(t)||e.target?.nodeType&&t.contains(e.target))return!0;let n=t.getBoundingClientRect();return n.width===0&&n.height===0?!1:e.clientX>=n.left-NC&&e.clientX<=n.right+NC&&e.clientY>=n.top-NC&&e.clientY<=n.bottom+NC}var Xee=K(qS,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${EC.select}`]:t.select},{[`&.${EC.select}`]:t[n.variant]},{[`&.${EC.error}`]:t.error},{[`&.${EC.multiple}`]:t.multiple}]}})({[`&.${EC.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),Zee=K(YS,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.open&&t.iconOpen]}})({}),Qee=K(`input`,{shouldForwardProp:e=>Od(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),$ee=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Tl({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},TC,t)},ete=L.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:j,variant:M=`standard`,...ne}=e,[re,ie]=tp({controlled:j,default:l,name:`Select`}),[ae,N]=tp({controlled:E,default:c,name:`Select`}),oe=L.useRef(null),se=L.useRef(null),ce=L.useRef(null),P=L.useRef(!1),le=L.useRef(!1),ue=L.useRef(null),F=L.useRef(!1),I=L.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),de=L.useRef({buffer:``,previousSearchIndex:null,matchedIndex:null}),fe=sm(),pe=sm(),me=sm(),[he,ge]=L.useState(null),{current:_e}=L.useRef(E!=null),[ve,ye]=L.useState(),[be,xe]=L.useState(null),Se=Nd(t,m),R=L.useCallback(e=>{se.current=e,e&&ge(e)},[]),z=he?.parentNode;L.useImperativeHandle(Se,()=>({focus:()=>{se.current.focus()},node:oe.current,value:re}),[re]);let B=he!==null&&ae,Ce=L.useCallback(()=>{me.clear(),de.current.buffer=``,de.current.previousSearchIndex=null,de.current.matchedIndex=null},[me]);Pd(()=>{P.current=B,B&&Ce()},[B,Ce]);let we=L.useCallback(()=>{fe.clear(),pe.clear()},[fe,pe]),Te=L.useCallback(()=>{we(),F.current=!1,I.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[we]),Ee=L.useCallback(()=>{ue.current&&=(ue.current(),null)},[]);L.useEffect(()=>{B||(Te(),Ee())},[B,Te,Ee]),L.useEffect(()=>()=>{Te(),Ee(),Ce()},[Te,Ee,Ce]),L.useEffect(()=>{if(!B||!z||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ye(z.clientWidth)});return e.observe(z),()=>{e.disconnect()}},[B,z,a]),L.useEffect(()=>{c&&ae&&he&&!_e&&(ye(a?null:z.clientWidth),se.current.focus())},[he,a]),L.useEffect(()=>{i&&se.current.focus()},[i]),L.useEffect(()=>{if(!h)return;let e=Fd(se.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&se.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let De=np((e,t)=>{e||(Te(),Ee()),e?(Ce(),xe(fS(t)),T&&T(t)):(xe(null),x&&x(t)),_e||(P.current=e,ye(a?null:z.clientWidth),N(e))}),Oe=()=>{Te(),le.current?pe.start(FC,()=>{I.current.allowUnselectedMouseUp=!0,fe.start(FC,()=>{I.current.allowSelectedMouseUp=!0})}):fe.start(PC,()=>{I.current.allowSelectedMouseUp=!0,I.current.allowUnselectedMouseUp=!0})},ke=e=>{if(w?.(e),e.button!==0||(e.preventDefault(),!se.current))return;se.current.focus();let t=Fd(e.currentTarget);Oe(),Ee();let n=e=>{ue.current=null,se.current&&(LC(e,se.current)||LC(e,ce.current)||!P.current&&_e||De(!1,e))};t.addEventListener(`mouseup`,n,{capture:!0,once:!0}),ue.current=()=>{t.removeEventListener(`mouseup`,n,!0)},De(!0,e)},Ae=e=>{De(!1,e)},je=L.Children.toArray(o),V=e=>{let t=je.find(t=>t.props.value===e.target.value);t!==void 0&&(ie(t.props.value),b&&b(e,t))},Me=(e,t,n)=>{if(ie(n),b){let r=e.nativeEvent||e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,t)}},Ne=e=>t=>{F.current=!1;let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(re)?re.slice():[];let t=re.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),re!==n&&Me(t,e,n),_||De(!1,t)}},Pe=(e,t)=>n=>{if(e.props.onMouseUp?.(n),F.current){F.current=!1;return}let r=!I.current.allowSelectedMouseUp&&t,i=!I.current.allowUnselectedMouseUp&&!t;r||i||n.currentTarget.click()},Fe=e=>{let t=de.current,n=t.buffer!==``;if(B||_||u||e.defaultPrevented||e.nativeEvent?.isComposing||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||e.key===IC&&!n)return!1;e.key===IC&&e.preventDefault();let r=t.buffer===``,{options:i,selectedIndex:a}=jC(je,re);if(i.length===0)return e.key!==IC&&Ce(),!0;r&&(t.previousSearchIndex=a);let o=e.key.toLowerCase();t.buffer===o&&AC(i,o)&&(t.buffer=``,t.previousSearchIndex=t.matchedIndex),t.buffer+=o,me.start(Kee,Ce);let s=kC(i,t.buffer,(t.previousSearchIndex??-1)+1);if(s!==-1){let n=i[s];return t.matchedIndex=s,mS(re,n.value)||Me(e,n.child,n.value),!0}return e.key!==IC&&Ce(),!0},Ie=e=>{if(!D){let t=Fe(e),n=e.key===IC||e.key===qee||e.key===Jee||e.key===Yee;!t&&n&&(e.preventDefault(),De(!0,e)),C?.(e)}},Le=e=>{Ce(),!B&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:re,name:v}}),y(e))},Re=e=>t=>{e?.props?.onKeyDown?.(t),t.key===IC&&t.target===t.currentTarget&&!t.defaultPrevented&&(t.preventDefault(),t.repeat||t.currentTarget.click())};delete ne[`aria-invalid`];let ze,Be,Ve=[],He=!1,Ue=!1;(zd({value:re})||d)&&(O?ze=O(re):He=!0);let We=je.map(e=>{if(!L.isValidElement(e))return null;let t;if(_){if(!Array.isArray(re))throw Error(Ir(2));t=re.some(t=>mS(t,e.props.value)),t&&He&&Ve.push(e.props.children)}else t=mS(re,e.props.value),t&&He&&(Be=e.props.children);return t&&(Ue=!0),L.cloneElement(e,{"aria-selected":t?`true`:`false`,onMouseDown:t=>{F.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{F.current=!0,e.props.onPointerDown?.(t)},onClick:Ne(e),onMouseUp:Pe(e,t),onKeyUp:t=>{t.key===IC&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},onKeyDown:Re(e),role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Pd(()=>{le.current=Ue,!B&&!_&&!Ue&&Ce()},[Ue,_,B,Ce]),He&&(ze=_?Ve.length===0?null:Ve.reduce((e,t,n)=>(e.push(t),n<Ve.length-1&&e.push(`, `),e),[]):Be);let Ge=ve;!a&&_e&&he&&(Ge=z.clientWidth);let Ke;Ke=k===void 0?u?null:0:k;let qe=te.id||(v?`mui-component-select-${v}`:void 0),Je={...e,variant:M,value:re,open:B,error:f},Ye=$ee(Je),Xe=typeof g.slotProps?.paper==`function`?g.slotProps.paper(Je):g.slotProps?.paper,Ze=Nd(Xe?.ref,ce),Qe=typeof g.slotProps?.list==`function`?g.slotProps.list(Je):g.slotProps?.list,$e=Qc(),et=Qc();return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(Xee,{as:`div`,ref:R,tabIndex:Ke,role:`combobox`,"aria-controls":B?$e:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":B?`true`:`false`,"aria-haspopup":`listbox`,"aria-readonly":D?`true`:void 0,"aria-label":r,"aria-labelledby":h,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Ie,onMouseDown:u||D?null:ke,onBlur:Le,onFocus:S,...te,ownerState:Je,className:W(te.className,Ye.select,s),id:qe,children:pS(ze)?MC||=(0,U.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):ze}),(0,U.jsx)(Qee,{"aria-invalid":f,value:Array.isArray(re)?re.join(`,`):re,name:v,ref:oe,"aria-hidden":!0,onChange:V,tabIndex:-1,disabled:u,readOnly:D,className:Ye.nativeInput,autoFocus:i,required:ee,...ne,id:ne.id??et,ownerState:Je}),(0,U.jsx)(Zee,{as:p,className:Ye.icon,ownerState:Je}),(0,U.jsx)(_S,{value:be,children:(0,U.jsx)(VS,{id:`menu-${v||``}`,anchorEl:z,open:B,onClose:Ae,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:$e,...Qe},paper:{...Xe,ref:Ze,style:{minWidth:Ge,...Xe?.style}}},children:We})})]})}),tte=e=>{let{classes:t}=e,n=Tl({root:[`root`]},TC,t);return{...t,...n}},RC={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>kd(e)&&e!==`variant`},nte=K(Mb,RC)(``),rte=K(oC,RC)(``),ite=K(tb,RC)(``),zC=L.forwardRef(function(e,t){let n=Md({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=D_,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?ZS:ete,[E]=wd({props:n,states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=tte(O),{root:te,...k}=ee,A=d||{standard:(0,U.jsx)(nte,{ownerState:O}),outlined:(0,U.jsx)(rte,{label:p,ownerState:O}),filled:(0,U.jsx)(ite,{ownerState:O})}[D],j=Nd(t,y_(A));return(0,U.jsx)(L.Fragment,{children:L.cloneElement(A,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?eo(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:j,className:W(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});zC.muiName=`Select`;function ate(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var ote=2,ste=[],BC={};function VC(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function HC(e,t){return e-t}function UC(e,t,n=-1){let{index:r}=e.reduce((e,n,r)=>{let i=Math.abs(t-n);return e==null||i<=e.distance?{distance:i,index:r}:e},null)??BC;return r==null?r:n>=0&&e[n]===e[r]?n:r}function WC(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function GC(e,t,n){return(e-t)*100/(n-t)}function cte(e,t,n){return(n-t)*e+t}function lte(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function ute(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(lte(t)))}function KC(e,t,n){let r=e.slice();return r[n]=t,r.sort(HC)}function qC(e,t,n,r){let i=Ld(hd(e.current));if(!ey(e.current,i)||Number(i?.getAttribute(`data-index`))!==t){let n=e.current?.querySelector(`[type="range"][data-index="${t}"]`);n!=null&&(r==null?n.focus({preventScroll:!0}):n.focus({preventScroll:!0,focusVisible:r}))}n&&n(t)}function JC(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`&&ate(e,t)}var dte={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},fte=e=>e;function pte(e){let{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:c=0,name:l,onChange:u,onChangeCommitted:d,orientation:f=`horizontal`,rootRef:p,scale:m=fte,step:h=1,shiftStep:g=10,tabIndex:_,value:v}=e,y=L.useRef(void 0),b=L.useRef(null),[x,S]=L.useState(-1),[C,w]=L.useState(-1),[T,E]=L.useState(!1),D=L.useRef(0),O=L.useRef(-1),ee=L.useRef(!1),te=L.useRef(-1),k=md(()=>{b.current!=null&&(cancelAnimationFrame(b.current),b.current=null)}),A=L.useRef(null),[j,M]=ep({controlled:v,default:n??c,name:`Slider`}),ne=md((e,t,n)=>{let r=`nativeEvent`in e?e.nativeEvent:e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:l}}),A.current=t,u?.(i,t,n)}),re=Array.isArray(j),ie=L.useMemo(()=>{if(typeof j==`number`)return[yc(j,c,s)];if(j==null)return[c];let e=j.slice().sort(HC);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?c:yc(n,c,s)}return e},[j,c,s]),ae=L.useMemo(()=>{if(o===!0&&h!=null){let e=Array(Math.floor((s-c)/h)+1);for(let t=0;t<e.length;t+=1)e[t]={value:c+h*t};return e}return Array.isArray(o)?o:ste},[o,h,c,s]),N=L.useMemo(()=>{let e=Array(ae.length);for(let t=0;t<ae.length;t+=1)e[t]=ae[t].value;return e},[ae]),[oe,se]=L.useState(-1),ce=L.useRef(null),P=pd(p,ce),le=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));Zp(t.target)&&se(n),w(n),e?.onFocus?.(t)},ue=e=>t=>{Zp(t.target)||se(-1),w(-1),e?.onBlur?.(t)},F=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=ie[n],a=N.indexOf(r),o=t;if(ae&&h==null){let e=N[N.length-1];o=o>=e?e:o<=N[0]?N[0]:o<r?N[a-1]:N[a+1]}if(o=yc(o,c,s),re){i&&(o=yc(o,ie[n-1]||-1/0,ie[n+1]||1/0));let e=o;o=KC(ie,o,n);let t=n;i||(t=o.indexOf(e)),qC(ce,t)}M(o),se(n),u&&!JC(o,j)&&ne(e,o,n),d&&d(e,A.current??o)},I=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=Number(t.currentTarget.getAttribute(`data-index`)),n=ie[e],r=null;if(h!=null){let e=t.shiftKey?g:h;switch(t.key){case`ArrowUp`:r=VC(n,e,1,c,s);break;case`ArrowRight`:r=VC(n,e,a?-1:1,c,s);break;case`ArrowDown`:r=VC(n,e,-1,c,s);break;case`ArrowLeft`:r=VC(n,e,a?1:-1,c,s);break;case`PageUp`:r=VC(n,g,1,c,s);break;case`PageDown`:r=VC(n,g,-1,c,s);break;case`Home`:r=c;break;case`End`:r=s;break;default:break}}else if(ae){let e=N[N.length-1],i=N.indexOf(n),o=[a?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[a?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];o.includes(t.key)?r=i===0?N[0]:N[i-1]:s.includes(t.key)&&(r=i===N.length-1?e:N[i+1])}r!=null&&F(t,r)}e?.onKeyDown?.(t)};mc(()=>{let e=Ld(hd(ce.current));r&&ey(ce.current,e)&&e!=null&&`blur`in e&&e.blur()},[r]),r&&x!==-1&&S(-1),r&&oe!==-1&&se(-1);let de=e=>t=>{e.onChange?.(t),F(t,t.currentTarget.valueAsNumber)},fe=L.useRef(void 0),pe=f;a&&f===`horizontal`&&(pe+=`-reverse`);let me=e=>{let{current:t}=ce;if(!t)return null;let{width:n,height:r,bottom:a,left:o}=t.getBoundingClientRect(),l;l=pe.startsWith(`vertical`)?(a-e.y)/r:(e.x-o)/n,pe.includes(`-reverse`)&&(l=1-l);let u;if(u=cte(l,c,s),h)u=ute(u,h,c);else{let e=UC(N,u);u=N[e]}u=yc(u,c,s);let d=0;if(re){let e=fe.current!==-1;d=e?fe.current:UC(ie,u,O.current),i&&(u=yc(u,ie[d-1]||-1/0,ie[d+1]||1/0));let t=u;u=KC(ie,u,d),i&&e||(d=u.indexOf(t),fe.current=d)}return{newValue:u,activeIndex:d}},he=md(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=WC(e,y);if(!t)return;if(D.current+=1,e.type===`pointermove`&&e.buttons===0){ge(e);return}let n=me(t);n&&(qC(ce,n.activeIndex,S,!1),O.current=n.activeIndex,M(n.newValue),!T&&D.current>ote&&E(!0),u&&!JC(n.newValue,j)&&ne(e,n.newValue,n.activeIndex))}),ge=md(e=>{if(`pointerId`in e&&e.pointerId!==te.current)return;let t=WC(e,y);if(E(!1),!t)return;let n=me(t);S(-1),e.type===`touchend`&&w(-1),n&&d&&d(e,A.current??n.newValue),`pointerType`in e&&ce.current?.hasPointerCapture(e.pointerId)&&ce.current.releasePointerCapture(e.pointerId),y.current=void 0,te.current=-1,ve()}),_e=md(e=>{if(r)return;if(ee.current){ee.current=!1;let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);return}let t=e.changedTouches[0];t!=null&&(y.current=t.identifier);let n=WC(e,y);if(n!==!1){fe.current=-1;let t=me(n);t&&(qC(ce,t.activeIndex,S,!1),O.current=t.activeIndex,M(t.newValue),u&&!JC(t.newValue,j)&&ne(e,t.newValue,t.activeIndex))}D.current=0;let i=hd(ce.current);i.addEventListener(`touchmove`,he,{passive:!0}),i.addEventListener(`touchend`,ge,{passive:!0})}),ve=L.useCallback(()=>{let e=hd(ce.current);e.removeEventListener(`pointermove`,he),e.removeEventListener(`pointerup`,ge),e.removeEventListener(`touchmove`,he),e.removeEventListener(`touchend`,ge)},[ge,he]);L.useEffect(()=>{let e=ce.current;if(e)return e.addEventListener(`touchstart`,_e,{passive:!0}),()=>{e.removeEventListener(`touchstart`,_e),k(),ve()}},[ve,_e,k]),L.useEffect(()=>{r&&(ve(),k())},[r,ve,k]);let ye=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(ee.current=!0),r||t.defaultPrevented||t.button!==0)return;let n=WC(t,y);if(n!==!1){fe.current=-1;let e=me(n);if(e){let n=ce.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=hd(ce.current),i=n!=null&&n===Ld(r);S(e.activeIndex),O.current=e.activeIndex,i?t.preventDefault():(k(),b.current=requestAnimationFrame(()=>{b.current=null,qC(ce,e.activeIndex,void 0,!1)})),M(e.newValue),u&&!JC(e.newValue,j)&&ne(t,e.newValue,e.activeIndex)}}D.current=0,te.current=t.pointerId;let i=hd(ce.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}i.addEventListener(`pointermove`,he,{passive:!0}),i.addEventListener(`pointerup`,ge)},be=GC(re?ie[0]:c,c,s),xe=GC(ie[ie.length-1],c,s)-be,Se=(e=BC)=>{let t=Dp(e),n={onPointerDown:ye(t)},r={...t,...n};return{...e,ref:P,...r}},R=e=>t=>{e.onMouseOver?.(t);let n=Number(t.currentTarget.getAttribute(`data-index`));w(n)},z=e=>t=>{e.onMouseLeave?.(t),w(-1)},B=(e=BC)=>{let t=Dp(e),n={onMouseOver:R(t),onMouseLeave:z(t)};return{...e,...t,...n}},Ce=e=>{let t;return re?x===e?t=2:O.current===e&&(t=1):x===e&&(t=1),{pointerEvents:x!==-1&&x!==e?`none`:void 0,zIndex:t}},we;return f===`vertical`&&(we=a?`vertical-rl`:`vertical-lr`),{active:x,axis:pe,axisProps:dte,dragging:T,focusedThumbIndex:oe,getHiddenInputProps:(n=BC)=>{let i=Dp(n),o={onChange:de(i),onFocus:le(i),onBlur:ue(i),onKeyDown:I(i)},u={...i,...o};return{tabIndex:_,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":m(s),"aria-valuemin":m(c),name:l,type:`range`,min:e.min,max:e.max,step:e.step===null&&e.marks?`any`:e.step??void 0,disabled:r,...n,...u,style:{...wC,direction:a?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:we}}},getRootProps:Se,getThumbProps:B,marks:ae,open:C,range:re,rootRef:P,trackLeap:xe,trackOffset:be,values:ie,getThumbStyle:Ce}}var mte=e=>{let{open:t}=e;return{offset:W(t&&Mf.valueLabelOpen),circle:Mf.valueLabelCircle,label:Mf.valueLabelLabel}};function hte(e){let{children:t,className:n,value:r}=e,i=mte(e);return t?L.cloneElement(t,{className:t.props.className},(0,U.jsxs)(L.Fragment,{children:[t.props.children,(0,U.jsx)(`span`,{className:W(i.offset,n),"aria-hidden":!0,children:(0,U.jsx)(`span`,{className:i.circle,children:(0,U.jsx)(`span`,{className:i.label,children:r})})})]})):null}function YC(e){return e}var gte=K(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${q(n.color)}`],n.size!==`medium`&&t[`size${q(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(jd(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${Mf.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${Mf.dragging}`]:{[`& .${Mf.thumb}, & .${Mf.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:`horizontal`},style:{height:4,width:`100%`,padding:`13px 0`,"@media (pointer: coarse)":{padding:`20px 0`}}},{props:{orientation:`horizontal`,size:`small`},style:{height:2}},{props:{orientation:`horizontal`,marked:!0},style:{marginBottom:20}},{props:{orientation:`vertical`},style:{height:`100%`,width:4,padding:`0 13px`,"@media (pointer: coarse)":{padding:`0 20px`}}},{props:{orientation:`vertical`,size:`small`},style:{width:2}},{props:{orientation:`vertical`,marked:!0},style:{marginRight:44}}]}))),_te=K(`span`,{name:`MuiSlider`,slot:`Rail`})({display:`block`,position:`absolute`,borderRadius:`inherit`,backgroundColor:`currentColor`,opacity:.38,"@media (forced-colors: active)":{border:`1px solid transparent`,boxSizing:`border-box`},variants:[{props:{orientation:`horizontal`},style:{width:`100%`,height:`inherit`,top:`50%`,transform:`translateY(-50%)`}},{props:{orientation:`vertical`},style:{height:`100%`,width:`inherit`,left:`50%`,transform:`translateX(-50%)`}},{props:{track:`inverted`},style:{opacity:1}}]}),vte=K(`span`,{name:`MuiSlider`,slot:`Track`})(jd(({theme:e})=>({display:`block`,position:`absolute`,borderRadius:`inherit`,border:`1px solid currentColor`,backgroundColor:`currentColor`,...$d(e,[`left`,`width`,`bottom`,`height`],{duration:e.transitions.duration.shortest}),variants:[{props:{size:`small`},style:{"@media (forced-colors: none)":{border:`none`}}},{props:{orientation:`horizontal`},style:{height:`inherit`,top:`50%`,transform:`translateY(-50%)`}},{props:{orientation:`vertical`},style:{width:`inherit`,left:`50%`,transform:`translateX(-50%)`}},{props:{track:!1},style:{display:`none`}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t,track:`inverted`},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles(`dark`,{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles(`dark`,{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),yte=K(`span`,{name:`MuiSlider`,slot:`Thumb`})(jd(({theme:e})=>({position:`absolute`,width:20,height:20,boxSizing:`border-box`,borderRadius:`50%`,outline:0,backgroundColor:`currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,...$d(e,[`box-shadow`,`left`,`bottom`],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},"&::before":{position:`absolute`,content:`""`,borderRadius:`inherit`,width:`100%`,height:`100%`,boxShadow:(e.vars||e).shadows[2]},"&::after":{position:`absolute`,content:`""`,borderRadius:`50%`,width:42,height:42,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`},[`&.${Mf.disabled}`]:{"&:hover":{boxShadow:`none`}},variants:[{props:{size:`small`},style:{width:12,height:12,"&::before":{boxShadow:`none`}}},{props:{orientation:`horizontal`},style:{top:`50%`,transform:`translate(-50%, -50%)`}},{props:{orientation:`vertical`},style:{left:`50%`,transform:`translate(-50%, 50%)`}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Mf.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},[`&.${Mf.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),bte=K(hte,{name:`MuiSlider`,slot:`ValueLabel`})(jd(({theme:e})=>({zIndex:1,whiteSpace:`nowrap`,...e.typography.body2,fontWeight:500,...$d(e,[`transform`],{duration:e.transitions.duration.shortest}),position:`absolute`,backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`0.25rem 0.75rem`,variants:[{props:{orientation:`horizontal`},style:{transform:`translateY(-100%) scale(0)`,top:`-10px`,transformOrigin:`bottom center`,"&::before":{position:`absolute`,content:`""`,width:8,height:8,transform:`translate(-50%, 50%) rotate(45deg)`,backgroundColor:`inherit`,bottom:0,left:`50%`},[`&.${Mf.valueLabelOpen}`]:{transform:`translateY(-100%) scale(1)`}}},{props:{orientation:`vertical`},style:{transform:`translateY(-50%) scale(0)`,right:`30px`,top:`50%`,transformOrigin:`right center`,"&::before":{position:`absolute`,content:`""`,width:8,height:8,transform:`translate(-50%, -50%) rotate(45deg)`,backgroundColor:`inherit`,right:-8,top:`50%`},[`&.${Mf.valueLabelOpen}`]:{transform:`translateY(-50%) scale(1)`}}},{props:{size:`small`},style:{fontSize:e.typography.pxToRem(12),padding:`0.25rem 0.5rem`}},{props:{orientation:`vertical`,size:`small`},style:{right:`20px`}}]}))),xte=K(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>Od(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(jd(({theme:e})=>({position:`absolute`,width:2,height:2,borderRadius:1,backgroundColor:`currentColor`,variants:[{props:{orientation:`horizontal`},style:{top:`50%`,transform:`translate(-1px, -50%)`}},{props:{orientation:`vertical`},style:{left:`50%`,transform:`translate(-50%, 1px)`}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),Ste=K(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>Od(e)&&e!==`markLabelActive`})(jd(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:`absolute`,whiteSpace:`nowrap`,variants:[{props:{orientation:`horizontal`},style:{top:30,transform:`translateX(-50%)`,"@media (pointer: coarse)":{top:40}}},{props:{orientation:`vertical`},style:{left:36,transform:`translateY(50%)`,"@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),Cte=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e;return Tl({root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${q(s)}`,c&&`size${q(c)}`],rail:[`rail`],track:[`track`],mark:[`mark`],markActive:[`markActive`],markLabel:[`markLabel`],markLabelActive:[`markLabelActive`],valueLabel:[`valueLabel`],thumb:[`thumb`,t&&`disabled`],active:[`active`],disabled:[`disabled`],focusVisible:[`focusVisible`]},jf,o)},wte=({children:e})=>e,Tte=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiSlider`}),r=Wc(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":o,color:s=`primary`,classes:c,className:l,disableSwap:u=!1,disabled:d=!1,getAriaLabel:f,getAriaValueText:p,marks:m=!1,max:h=100,min:g=0,name:_,onChange:v,onChangeCommitted:y,orientation:b=`horizontal`,shiftStep:x=10,size:S=`medium`,step:C=1,scale:w=YC,slotProps:T={},slots:E={},tabIndex:D,track:O=`normal`,value:ee,valueLabelDisplay:te=`off`,valueLabelFormat:k=YC,...A}=n,j={...n,isRtl:r,max:h,min:g,classes:c,disabled:d,disableSwap:u,orientation:b,marks:m,color:s,size:S,step:C,shiftStep:x,scale:w,track:O,valueLabelDisplay:te,valueLabelFormat:k},{axisProps:M,getRootProps:ne,getHiddenInputProps:re,getThumbProps:ie,open:ae,active:N,axis:oe,focusedThumbIndex:se,range:ce,dragging:P,marks:le,values:ue,trackOffset:F,trackLeap:I,getThumbStyle:de}=pte({...j,rootRef:t});j.marked=le.length>0&&le.some(e=>e.label),j.dragging=P,j.focusedThumbIndex=se;let fe=Cte(j),pe={slots:E,slotProps:T},[me,he]=Ap(`root`,{elementType:gte,getSlotProps:ne,externalForwardedProps:{...pe,...A},ownerState:j,className:[fe.root,l]}),[ge,_e]=Ap(`rail`,{elementType:_te,externalForwardedProps:pe,ownerState:j,className:fe.rail}),[ve,ye]=Ap(`track`,{elementType:vte,externalForwardedProps:pe,additionalProps:{style:{...M[oe].offset(F),...M[oe].leap(I)}},ownerState:j,className:fe.track}),[be,xe]=Ap(`thumb`,{elementType:yte,getSlotProps:ie,externalForwardedProps:pe,ownerState:j,className:fe.thumb}),[Se,R]=Ap(`valueLabel`,{elementType:bte,externalForwardedProps:pe,ownerState:j,className:fe.valueLabel}),[z,B]=Ap(`mark`,{elementType:xte,externalForwardedProps:pe,ownerState:j,className:fe.mark}),[Ce,we]=Ap(`markLabel`,{elementType:Ste,externalForwardedProps:pe,ownerState:j,className:fe.markLabel}),[Te,Ee]=Ap(`input`,{elementType:`input`,getSlotProps:re,externalForwardedProps:pe,ownerState:j});return(0,U.jsxs)(me,{...he,children:[(0,U.jsx)(ge,{..._e}),(0,U.jsx)(ve,{...ye}),le.filter(e=>e.value>=g&&e.value<=h).map((e,t)=>{let n=GC(e.value,g,h),r=M[oe].offset(n),i;return i=O===!1?ue.includes(e.value):O===`normal`&&(ce?e.value>=ue[0]&&e.value<=ue[ue.length-1]:e.value<=ue[0])||O===`inverted`&&(ce?e.value<=ue[0]||e.value>=ue[ue.length-1]:e.value>=ue[0]),(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(z,{"data-index":t,...B,...!dd(z)&&{markActive:i},style:{...r,...B.style},className:W(B.className,i&&fe.markActive)}),e.label==null?null:(0,U.jsx)(Ce,{"aria-hidden":!0,"data-index":t,...we,...!dd(Ce)&&{markLabelActive:i},style:{...r,...we.style},className:W(fe.markLabel,we.className,i&&fe.markLabelActive),children:e.label})]},t)}),ue.map((e,t)=>{let n=GC(e,g,h),r=M[oe].offset(n),s=te===`off`?wte:Se;return(0,U.jsx)(s,{...!dd(s)&&{valueLabelFormat:k,valueLabelDisplay:te,value:typeof k==`function`?k(w(e),t):k,index:t,open:ae===t||N===t||te===`on`,disabled:d},...R,children:(0,U.jsx)(be,{"data-index":t,...xe,className:W(fe.thumb,xe.className,N===t&&fe.active,se===t&&fe.focusVisible),style:{...r,...de(t),...xe.style},children:(0,U.jsx)(Te,{"data-index":t,"aria-label":f?f(t):i,"aria-valuenow":w(e),"aria-labelledby":o,"aria-valuetext":p?p(w(e),t):a,value:ue[t],...Ee})})},t)})]})});function Ete(e){return Zs(`MuiTooltip`,e)}var XC=Qs(`MuiTooltip`,[`popper`,`popperInteractive`,`popperArrow`,`popperClose`,`tooltip`,`tooltipArrow`,`touch`,`tooltipPlacementLeft`,`tooltipPlacementRight`,`tooltipPlacementTop`,`tooltipPlacementBottom`,`arrow`]);function Dte(e){return Math.round(e*1e5)/1e5}var Ote=e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:a}=e;return Tl({popper:[`popper`,!n&&`popperInteractive`,r&&`popperArrow`],tooltip:[`tooltip`,r&&`tooltipArrow`,i&&`touch`,`tooltipPlacement${q(a.split(`-`)[0])}`],arrow:[`arrow`]},Ete,t)},kte=K(C_,{name:`MuiTooltip`,slot:`Popper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(jd(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:`none`,variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:`auto`}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${XC.arrow}`]:{top:0,marginTop:`-0.71em`,"&::before":{transformOrigin:`0 100%`}},[`&[data-popper-placement*="top"] .${XC.arrow}`]:{bottom:0,marginBottom:`-0.71em`,"&::before":{transformOrigin:`100% 0`}},[`&[data-popper-placement*="right"] .${XC.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineStart:0,marginInlineStart:`-0.71em`,"&::before":{transformOrigin:`100% 100%`}},[`&[data-popper-placement*="left"] .${XC.arrow}`]:{height:`1em`,width:`0.71em`,insetInlineEnd:0,marginInlineEnd:`-0.71em`,"&::before":{transformOrigin:`0 0`}}}}]}))),Ate=K(`div`,{name:`MuiTooltip`,slot:`Tooltip`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${q(n.placement.split(`-`)[0])}`]]}})(jd(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:`4px 8px`,fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:`break-word`,fontWeight:e.typography.fontWeightMedium,[`.${XC.popper}[data-popper-placement*="left"] &`]:{transformOrigin:`right center`,marginInlineEnd:`14px`},[`.${XC.popper}[data-popper-placement*="right"] &`]:{transformOrigin:`left center`,marginInlineStart:`14px`},[`.${XC.popper}[data-popper-placement*="top"] &`]:{transformOrigin:`center bottom`,marginBottom:`14px`},[`.${XC.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:`center top`,marginTop:`14px`},variants:[{props:({ownerState:e})=>e.arrow,style:{position:`relative`,marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:`8px 16px`,fontSize:e.typography.pxToRem(14),lineHeight:`${Dte(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${XC.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:`24px`},[`.${XC.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:`24px`},[`.${XC.popper}[data-popper-placement*="top"] &`]:{marginBottom:`24px`},[`.${XC.popper}[data-popper-placement*="bottom"] &`]:{marginTop:`24px`}}}]}))),jte=K(`span`,{name:`MuiTooltip`,slot:`Arrow`})(jd(({theme:e})=>({overflow:`hidden`,position:`absolute`,width:`1em`,height:`0.71em`,boxSizing:`border-box`,color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:`""`,margin:`auto`,display:`block`,width:`100%`,height:`100%`,backgroundColor:`currentColor`,transform:`rotate(45deg)`}}))),ZC=!1,QC=new om,$C={x:0,y:0};function ew(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}var tw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTooltip`}),{arrow:r=!1,children:i,classes:a,describeChild:o=!1,disableFocusListener:s=!1,disableHoverListener:c=!1,disableInteractive:l=!1,disableTouchListener:u=!1,enterDelay:d=100,enterNextDelay:f=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:g=0,leaveTouchDelay:_=1500,onClose:v,onOpen:y,open:b,placement:x=`bottom`,slotProps:S={},slots:C={},title:w,...T}=n,E=L.isValidElement(i)?i:(0,U.jsx)(`span`,{children:i}),D=Ed(),[O,ee]=L.useState(),[te,k]=L.useState(null),A=L.useRef(!1),j=l||m,M=sm(),ne=sm(),re=sm(),ie=sm(),[ae,N]=tp({controlled:b,default:!1,name:`Tooltip`,state:`open`}),oe=ae,se=$f(h),ce=L.useRef(),P=np(()=>{ce.current!==void 0&&(document.body.style.WebkitUserSelect=ce.current,ce.current=void 0),ie.clear()});L.useEffect(()=>P,[P]);let le=e=>{QC.clear(),ZC=!0,N(!0),y&&!oe&&y(e)},ue=np(e=>{QC.start(800+g,()=>{ZC=!1}),N(!1),v&&oe&&v(e),M.start(D.transitions.duration.shortest,()=>{A.current=!1})}),F=e=>{O?.disabled||A.current&&e.type!==`touchstart`||(O&&O.removeAttribute(`title`),ne.clear(),re.clear(),d||ZC&&f?ne.start(ZC?f:d,()=>{le(e)}):le(e))},I=e=>{ne.clear(),re.start(g,()=>{ue(e)})},[,de]=L.useState(!1),fe=e=>{let t=e?.target??O;if(!t||t.disabled||!Zp(t)){de(!1);let n=e??new Event(`blur`);!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),I(n)}},pe=e=>{if(O||ee(e.currentTarget),Zp(e.target)){let t=e=>{e.target.disabled&&fe(e),e.target.removeEventListener(`blur`,t)};e.target.addEventListener(`blur`,t),de(!0),F(e)}},me=e=>{A.current=!0;let t=E.props;t.onTouchStart&&t.onTouchStart(e)},he=e=>{me(e),re.clear(),M.clear(),P(),ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect=`none`,ie.start(p,()=>{document.body.style.WebkitUserSelect=ce.current,F(e)})},ge=e=>{E.props.onTouchEnd&&E.props.onTouchEnd(e),P(),re.start(_,()=>{ue(e)})};L.useEffect(()=>{if(!oe)return;function e(e){e.key===`Escape`&&ue(e)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[ue,oe]);let _e=Nd(y_(E),ee,t);!w&&w!==0&&(oe=!1);let ve=L.useRef(),ye=e=>{let t=E.props;t.onMouseMove&&t.onMouseMove(e),$C={x:e.clientX,y:e.clientY},ve.current&&ve.current.update()},be={},xe=typeof w==`string`;o?(be.title=!oe&&xe&&!c?w:null,be[`aria-describedby`]=oe?se:null):(be[`aria-label`]=xe?w:null,be[`aria-labelledby`]=oe&&!xe?se:null);let Se={...be,...T,...E.props,className:W(T.className,E.props.className),onTouchStart:me,ref:_e,...m?{onMouseMove:ye}:{}},R={};u||(Se.onTouchStart=he,Se.onTouchEnd=ge),c||(Se.onMouseOver=ew(F,Se.onMouseOver),Se.onMouseLeave=ew(I,Se.onMouseLeave),j||(R.onMouseOver=F,R.onMouseLeave=I)),s||(Se.onFocus=ew(pe,Se.onFocus),Se.onBlur=ew(fe,Se.onBlur),j||(R.onFocus=pe,R.onBlur=fe));let z={...n,arrow:r,disableInteractive:j,placement:x,touch:A.current},B=typeof S.popper==`function`?S.popper(z):S.popper,Ce=L.useMemo(()=>{let e=[{name:`arrow`,enabled:!!te,options:{element:te,padding:4}}];return B?.popperOptions?.modifiers&&(e=e.concat(B.popperOptions.modifiers)),{...B?.popperOptions,modifiers:e}},[te,B?.popperOptions]),we=Ote(z),Te={slots:C,slotProps:{arrow:S.arrow,popper:B,tooltip:S.tooltip,transition:S.transition}},[Ee,De]=Ap(`popper`,{elementType:kte,externalForwardedProps:Te,ownerState:z,className:we.popper}),[Oe,ke]=Ap(`transition`,{elementType:Eb,externalForwardedProps:Te,ownerState:z}),[Ae,je]=Ap(`tooltip`,{elementType:Ate,className:we.tooltip,externalForwardedProps:Te,ownerState:z}),[V,Me]=Ap(`arrow`,{elementType:jte,className:we.arrow,externalForwardedProps:Te,ownerState:z,ref:k});return(0,U.jsxs)(L.Fragment,{children:[L.cloneElement(E,Se),(0,U.jsx)(Ee,{as:C_,placement:x,anchorEl:m?{getBoundingClientRect:()=>({top:$C.y,left:$C.x,right:$C.x,bottom:$C.y,width:0,height:0})}:O,popperRef:ve,open:O?oe:!1,id:se,transition:!0,...R,...De,popperOptions:Ce,children:({TransitionProps:e})=>(0,U.jsx)(Oe,{timeout:D.transitions.duration.shorter,...e,...ke,children:(0,U.jsxs)(Ae,{...je,children:[w,r?(0,U.jsx)(V,{...Me}):null]})})})]})}),nw=$l({createStyledComponent:K(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>Md({props:e,name:`MuiStack`})}),rw=L.createContext({});function iw(){return L.useContext(rw)}var aw=L.createContext({});function Mte(e){return Zs(`MuiStep`,e)}Qs(`MuiStep`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`completed`]);var Nte=e=>{let{classes:t,orientation:n,alternativeLabel:r,completed:i}=e;return Tl({root:[`root`,n,r&&`alternativeLabel`,i&&`completed`]},Mte,t)},Pte=K(`li`,{name:`MuiStep`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:`horizontal`,alternativeLabel:!1,hasConnector:!1},style:{paddingLeft:8}},{props:{orientation:`horizontal`,alternativeLabel:!1,last:!0},style:{paddingRight:8}},{props:{orientation:`horizontal`,alternativeLabel:!1,hasConnector:!0},style:{flex:`1 1 auto`,display:`grid`,gridTemplateColumns:`1fr auto`,alignItems:`center`,gap:8}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{display:`flex`,flexDirection:`column`}},{props:{orientation:`horizontal`,alternativeLabel:!0},style:{flex:1,position:`relative`}}]}),ow=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiStep`}),{active:r,children:i,className:a,component:o=`li`,completed:s,disabled:c,expanded:l=!1,index:u,last:d,...f}=n,{activeStep:p,connector:m,alternativeLabel:h,orientation:g,nonLinear:_,isTabList:v}=iw(),[y=!1,b=!1,x=!1]=[r,s,c];p===u?y=r===void 0||r:!_&&p>u?b=s===void 0||s:!_&&p<u&&(x=c===void 0||c);let S=L.useMemo(()=>({index:u,last:d,expanded:l,icon:u+1,active:y,completed:b,disabled:x}),[u,d,l,y,b,x]),C=!!m&&u!==0,w={...n,active:y,orientation:g,alternativeLabel:h,completed:b,disabled:x,expanded:l,component:o,hasConnector:C},T=Nte(w);return(0,U.jsx)(aw.Provider,{value:S,children:(0,U.jsxs)(Pte,{as:o,className:W(T.root,a),ref:t,ownerState:w,role:v?`presentation`:void 0,...f,children:[C?m:null,i]})})}),Fte=Jf((0,U.jsx)(`path`,{d:`M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z`}),`CheckCircle`),Ite=Jf((0,U.jsx)(`path`,{d:`M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z`}),`Warning`);function Lte(e){return Zs(`MuiStepIcon`,e)}var sw=Qs(`MuiStepIcon`,[`root`,`active`,`completed`,`error`,`text`]),Rte,zte=e=>{let{classes:t,active:n,completed:r,error:i}=e;return Tl({root:[`root`,n&&`active`,r&&`completed`,i&&`error`],text:[`text`]},Lte,t)},cw=K(qf,{name:`MuiStepIcon`,slot:`Root`})(jd(({theme:e})=>({display:`block`,...$d(e,`color`,{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${sw.completed}, &.${sw.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${sw.error}`]:{color:(e.vars||e).palette.error.main}}))),Bte=K(`text`,{name:`MuiStepIcon`,slot:`Text`})(jd(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),Vte=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiStepIcon`}),{active:r=!1,className:i,completed:a=!1,error:o=!1,icon:s,...c}=n,l={...n,active:r,completed:a,error:o},u=zte(l);if(typeof s==`number`||typeof s==`string`){let e=W(i,u.root);return o?(0,U.jsx)(cw,{as:Ite,className:e,ref:t,ownerState:l,...c}):a?(0,U.jsx)(cw,{as:Fte,className:e,ref:t,ownerState:l,...c}):(0,U.jsxs)(cw,{className:e,ref:t,ownerState:l,...c,children:[Rte||=(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`12`}),(0,U.jsx)(Bte,{className:u.text,x:`12`,y:`12`,textAnchor:`middle`,dominantBaseline:`central`,ownerState:l,children:s})]})}return s});function Hte(e){return Zs(`MuiStepLabel`,e)}var lw=Qs(`MuiStepLabel`,[`root`,`horizontal`,`vertical`,`label`,`active`,`completed`,`error`,`disabled`,`iconContainer`,`alternativeLabel`,`labelContainer`]),Ute=e=>{let{classes:t,orientation:n,active:r,completed:i,error:a,disabled:o,alternativeLabel:s}=e;return Tl({root:[`root`,n,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],label:[`label`,r&&`active`,i&&`completed`,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],iconContainer:[`iconContainer`,r&&`active`,i&&`completed`,a&&`error`,o&&`disabled`,s&&`alternativeLabel`],labelContainer:[`labelContainer`,s&&`alternativeLabel`]},Hte,t)},Wte=K(`span`,{name:`MuiStepLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:`flex`,alignItems:`center`,[`&.${lw.disabled}`]:{cursor:`default`},variants:[{props:{orientation:`vertical`},style:{textAlign:`left`,padding:`8px 0`}},{props:{alternativeLabel:!0},style:{flexDirection:`column`}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{flexDirection:`row-reverse`}}]}),Gte=K(`span`,{name:`MuiStepLabel`,slot:`Label`})(jd(({theme:e})=>({...e.typography.body2,display:`block`,...$d(e,`color`,{duration:e.transitions.duration.shortest}),[`&.${lw.active}, &.${lw.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${lw.alternativeLabel}`]:{marginTop:16},[`&.${lw.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{[`&.${lw.alternativeLabel}`]:{marginTop:0}}}]}))),Kte=K(`span`,{name:`MuiStepLabel`,slot:`IconContainer`})({flexShrink:0,display:`flex`,paddingRight:8,[`&.${lw.alternativeLabel}`]:{paddingRight:0},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{paddingRight:0,paddingLeft:8}}]}),qte=K(`span`,{name:`MuiStepLabel`,slot:`LabelContainer`})(jd(({theme:e})=>({width:`100%`,color:(e.vars||e).palette.text.secondary,[`&.${lw.alternativeLabel}`]:{textAlign:`center`},variants:[{props:{orientation:`vertical`,alternativeLabel:!0},style:{[`&.${lw.alternativeLabel}`]:{textAlign:`right`}}}]}))),uw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiStepLabel`}),{children:r,className:i,error:a=!1,icon:o,optional:s,slots:c={},slotProps:l={},...u}=n,{alternativeLabel:d,orientation:f}=iw(),{active:p,disabled:m,completed:h,icon:g}=L.useContext(aw),_=o||g,v={...n,active:p,alternativeLabel:d,completed:h,disabled:m,error:a,orientation:f},y=Ute(v),b={slots:c,slotProps:l},[x,S]=Ap(`root`,{elementType:Wte,externalForwardedProps:{...b,...u},ownerState:v,ref:t,className:W(y.root,i)}),[C,w]=Ap(`label`,{elementType:Gte,externalForwardedProps:b,ownerState:v}),[T,E]=Ap(`stepIcon`,{elementType:_?Vte:void 0,externalForwardedProps:b,ownerState:v});return(0,U.jsxs)(x,{...S,children:[_||T?(0,U.jsx)(Kte,{className:y.iconContainer,ownerState:v,children:(0,U.jsx)(T,{completed:h,active:p,error:a,icon:_,...E})}):null,(0,U.jsxs)(qte,{className:y.labelContainer,ownerState:v,children:[r?(0,U.jsx)(C,{...w,className:W(y.label,w?.className),children:r}):null,s]})]})});uw.muiName=`StepLabel`;function Jte(e){return Zs(`MuiStepButton`,e)}var dw=Qs(`MuiStepButton`,[`root`,`horizontal`,`vertical`,`touchRipple`]),Yte=e=>{let{classes:t,orientation:n}=e;return Tl({root:[`root`,n],touchRipple:[`touchRipple`]},Jte,t)},fw=K(wm,{name:`MuiStepButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${dw.touchRipple}`]:t.touchRipple},t.root,t[n.orientation]]}})(jd(({theme:e})=>({width:`100%`,padding:`24px 16px`,margin:`-24px -16px`,boxSizing:`content-box`,[`& .${dw.touchRipple}`]:{color:`rgba(0, 0, 0, 0.3)`,...e.applyStyles(`dark`,{color:`rgba(255, 255, 255, 0.3)`})},variants:[{props:{orientation:`vertical`},style:{justifyContent:`flex-start`,padding:`8px`,margin:`-8px`}}]}))),Xte=L.forwardRef(function(e,t){let{children:n,disabled:r,index:i,...a}=e,o=qx({id:i,ref:t,disabled:r});return(0,U.jsx)(fw,{disabled:r,...o,...a,children:n})}),pw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiStepButton`}),{children:r,className:i,icon:a,optional:o,...s}=n,{disabled:c,active:l,index:u}=L.useContext(aw),{orientation:d,totalSteps:f,isTabList:p}=iw(),m={...n,orientation:d},h=Yte(m),g={icon:a,optional:o},_=Xf(r,[`StepLabel`])?L.cloneElement(r,g):(0,U.jsx)(uw,{...g,children:r}),v={internalNativeButton:!0,focusRipple:!0,disabled:c,TouchRippleProps:{className:h.touchRipple},className:W(h.root,i),ownerState:m,"aria-selected":l,"aria-posinset":u+1,"aria-setsize":f,role:`tab`,...s};return p?(0,U.jsx)(Xte,{...v,index:u,ref:t,children:_}):(0,U.jsx)(fw,{ref:t,tabIndex:l?0:-1,...v,children:_})});function Zte(e){return Zs(`MuiStepConnector`,e)}Qs(`MuiStepConnector`,[`root`,`horizontal`,`vertical`,`alternativeLabel`,`active`,`completed`,`disabled`,`line`]);var Qte=e=>{let{classes:t,orientation:n,alternativeLabel:r,active:i,completed:a,disabled:o}=e;return Tl({root:[`root`,n,r&&`alternativeLabel`,i&&`active`,a&&`completed`,o&&`disabled`],line:[`line`]},Zte,t)},$te=K(`div`,{name:`MuiStepConnector`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:`1 1 auto`,variants:[{props:{orientation:`vertical`},style:{marginLeft:12}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{marginLeft:`auto`,marginRight:12}},{props:{orientation:`horizontal`,alternativeLabel:!0},style:{position:`absolute`,top:12,left:`calc(-50% + 20px)`,right:`calc(50% + 20px)`}}]}),ene=K(`span`,{name:`MuiStepConnector`,slot:`Line`})(jd(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[400]:e.palette.grey[600];return{display:`block`,borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:`horizontal`},style:{borderTopStyle:`solid`,borderTopWidth:1}},{props:{orientation:`vertical`},style:{borderLeftStyle:`solid`,borderLeftWidth:1,minHeight:24}}]}})),tne=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiStepConnector`}),{className:r,...i}=n,{alternativeLabel:a,orientation:o=`horizontal`}=iw(),{active:s,disabled:c,completed:l}=L.useContext(aw),u={...n,alternativeLabel:a,orientation:o,active:s,completed:l,disabled:c},d=Qte(u);return(0,U.jsx)($te,{className:W(d.root,r),ref:t,ownerState:u,...i,children:(0,U.jsx)(ene,{className:d.line,ownerState:u})})});function nne(e){return Zs(`MuiStepper`,e)}Qs(`MuiStepper`,[`root`,`horizontal`,`vertical`,`nonLinear`,`alternativeLabel`]);var rne=e=>{let{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e;return Tl({root:[`root`,t,n&&`nonLinear`,r&&`alternativeLabel`]},nne,i)},mw=K(`ol`,{name:`MuiStepper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:`flex`,listStyle:`none`,margin:0,padding:0,variants:[{props:{orientation:`horizontal`},style:{flexDirection:`row`,alignItems:`center`}},{props:{orientation:`horizontal`,alternativeLabel:!1},style:{gap:8}},{props:{orientation:`vertical`},style:{flexDirection:`column`}},{props:{alternativeLabel:!0},style:{alignItems:`flex-start`}},{props:{orientation:`vertical`,alternativeLabel:!0},style:{alignItems:`flex-end`}}]}),ine=(0,U.jsx)(tne,{});function ane(e){let{children:t,className:n,component:r,forwardedRef:i,isRtl:a,orientation:o,ownerState:s,...c}=e,l=Kx({orientation:o,isRtl:a}),u=l.getContainerProps(i);return(0,U.jsx)(Vx.Provider,{value:l,children:(0,U.jsx)(mw,{as:r,ownerState:s,className:n,role:`tablist`,"aria-orientation":o,...u,...c,children:t})})}var one=L.forwardRef(function(e,t){let n=Wc(),r=Md({props:e,name:`MuiStepper`}),{activeStep:i=0,alternativeLabel:a=!1,children:o,className:s,component:c=`ol`,connector:l=ine,nonLinear:u=!1,orientation:d=`horizontal`,...f}=r,p={...r,nonLinear:u,alternativeLabel:a,orientation:d,component:c},m=rne(p),h=L.Children.toArray(o).filter(Boolean),g=h.length,_=h.some(e=>{if(!L.isValidElement(e))return!1;if(e.type===pw)return!0;let t=e.props.children;return t?L.Children.toArray(t).some(e=>L.isValidElement(e)&&e.type===pw):!1}),v=h.map((e,t)=>L.cloneElement(e,{index:t,last:t+1===g,...e.props})),y=L.useMemo(()=>({activeStep:i,alternativeLabel:a,connector:l,nonLinear:u,orientation:d,totalSteps:g,isTabList:_}),[i,a,l,u,d,g,_]);return _?(0,U.jsx)(rw.Provider,{value:y,children:(0,U.jsx)(ane,{forwardedRef:t,isRtl:n,className:W(m.root,s),component:c,orientation:d,ownerState:p,...f,children:v})}):(0,U.jsx)(rw.Provider,{value:y,children:(0,U.jsx)(mw,{as:c,ownerState:p,className:W(m.root,s),ref:t,...f,children:v})})});function sne(e){return Zs(`MuiTab`,e)}var hw=Qs(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),cne=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return Tl({root:[`root`,a&&o&&`labelIcon`,`textColor${q(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]},sne,t)},lne=K(wm,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${q(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${hw.icon}`]:t.icon}]}})(jd(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${hw.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${hw.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${hw.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${hw.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${hw.selected}`]:{opacity:1},[`&.${hw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${hw.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${hw.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${hw.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${hw.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),gw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b=Hx(),x=qx({id:_,ref:t,disabled:i,selected:m}),S=b.getItemMap().size===0&&m?0:x.tabIndex,C={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},w=cne(C),T=s&&u&&L.isValidElement(s)?L.cloneElement(s,{className:W(w.icon,s.props.className)}):s;return(0,U.jsxs)(lne,{internalNativeButton:!0,focusRipple:!a,className:W(w.root,r),ref:x.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:S,ownerState:C,...y,children:[c===`top`||c===`start`?(0,U.jsxs)(L.Fragment,{children:[T,u]}):(0,U.jsxs)(L.Fragment,{children:[u,T]}),l]})}),_w=L.createContext();function une(e){return Zs(`MuiTable`,e)}Qs(`MuiTable`,[`root`,`stickyHeader`]);var dne=e=>{let{classes:t,stickyHeader:n}=e;return Tl({root:[`root`,n&&`stickyHeader`]},une,t)},fne=K(`table`,{name:`MuiTable`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(jd(({theme:e})=>({display:`table`,width:`100%`,borderCollapse:`collapse`,borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:`left`,captionSide:`bottom`},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:`separate`}}]}))),vw=`table`,yw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTable`}),{className:r,component:i=vw,padding:a=`normal`,size:o=`medium`,stickyHeader:s=!1,...c}=n,l={...n,component:i,padding:a,size:o,stickyHeader:s},u=dne(l),d=L.useMemo(()=>({padding:a,size:o,stickyHeader:s}),[a,o,s]);return(0,U.jsx)(_w.Provider,{value:d,children:(0,U.jsx)(fne,{as:i,role:i===vw?null:`table`,ref:t,className:W(u.root,r),ownerState:l,...c})})}),bw=L.createContext();function pne(e){return Zs(`MuiTableBody`,e)}Qs(`MuiTableBody`,[`root`]);var mne=e=>{let{classes:t}=e;return Tl({root:[`root`]},pne,t)},hne=K(`tbody`,{name:`MuiTableBody`,slot:`Root`})({display:`table-row-group`}),gne={variant:`body`},xw=`tbody`,Sw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTableBody`}),{className:r,component:i=xw,...a}=n,o={...n,component:i},s=mne(o);return(0,U.jsx)(bw.Provider,{value:gne,children:(0,U.jsx)(hne,{className:W(s.root,r),as:i,ref:t,role:i===xw?null:`rowgroup`,ownerState:o,...a})})});function _ne(e){return Zs(`MuiTableCell`,e)}var vne=Qs(`MuiTableCell`,[`root`,`head`,`body`,`footer`,`sizeSmall`,`sizeMedium`,`paddingCheckbox`,`paddingNone`,`alignLeft`,`alignCenter`,`alignRight`,`alignJustify`,`stickyHeader`]),yne=e=>{let{classes:t,variant:n,align:r,padding:i,size:a,stickyHeader:o}=e;return Tl({root:[`root`,n,o&&`stickyHeader`,r!==`inherit`&&`align${q(r)}`,i!==`normal`&&`padding${q(i)}`,`size${q(a)}`]},_ne,t)},bne=K(`td`,{name:`MuiTableCell`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${q(n.size)}`],n.padding!==`normal`&&t[`padding${q(n.padding)}`],n.align!==`inherit`&&t[`align${q(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(jd(({theme:e})=>({...e.typography.body2,display:`table-cell`,verticalAlign:`inherit`,borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
244
|
-
${e.palette.mode===`light`?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:`left`,padding:16,variants:[{props:{variant:`head`},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:`body`},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:`footer`},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:`small`},style:{padding:`6px 16px`,[`&.${vne.paddingCheckbox}`]:{width:24,padding:`0 12px 0 16px`,"& > *":{padding:0}}}},{props:{padding:`checkbox`},style:{width:48,padding:`0 0 0 4px`}},{props:{padding:`none`},style:{padding:0}},{props:{align:`left`},style:{textAlign:`left`}},{props:{align:`center`},style:{textAlign:`center`}},{props:{align:`right`},style:{textAlign:`right`,flexDirection:`row-reverse`}},{props:{align:`justify`},style:{textAlign:`justify`}},{props:({ownerState:e})=>e.stickyHeader,style:{position:`sticky`,top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Z=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTableCell`}),{align:r=`inherit`,className:i,component:a,padding:o,scope:s,size:c,sortDirection:l,variant:u,...d}=n,f=L.useContext(_w),p=L.useContext(bw),m=p&&p.variant===`head`,h;h=a||(m?`th`:`td`);let g=s;h===`td`?g=void 0:!g&&m&&(g=`col`);let _=u||p&&p.variant,v={...n,align:r,component:h,padding:o||(f&&f.padding?f.padding:`normal`),size:c||(f&&f.size?f.size:`medium`),sortDirection:l,stickyHeader:_===`head`&&f&&f.stickyHeader,variant:_},y=yne(v),b=null;return l&&(b=l===`asc`?`ascending`:`descending`),(0,U.jsx)(bne,{as:h,ref:t,className:W(y.root,i),"aria-sort":b,scope:g,ownerState:v,...d})});function xne(e){return Zs(`MuiTableFooter`,e)}Qs(`MuiTableFooter`,[`root`]);var Sne=e=>{let{classes:t}=e;return Tl({root:[`root`]},xne,t)},Cne=K(`tfoot`,{name:`MuiTableFooter`,slot:`Root`})({display:`table-footer-group`}),wne={variant:`footer`},Cw=`tfoot`,Tne=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTableFooter`}),{className:r,component:i=Cw,...a}=n,o={...n,component:i},s=Sne(o);return(0,U.jsx)(bw.Provider,{value:wne,children:(0,U.jsx)(Cne,{as:i,className:W(s.root,r),ref:t,role:i===Cw?null:`rowgroup`,ownerState:o,...a})})});function Ene(e){return Zs(`MuiTableHead`,e)}Qs(`MuiTableHead`,[`root`]);var Dne=e=>{let{classes:t}=e;return Tl({root:[`root`]},Ene,t)},One=K(`thead`,{name:`MuiTableHead`,slot:`Root`})({display:`table-header-group`}),kne={variant:`head`},ww=`thead`,Tw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTableHead`}),{className:r,component:i=ww,...a}=n,o={...n,component:i},s=Dne(o);return(0,U.jsx)(bw.Provider,{value:kne,children:(0,U.jsx)(One,{as:i,className:W(s.root,r),ref:t,role:i===ww?null:`rowgroup`,ownerState:o,...a})})});function Ane(e){return Zs(`MuiToolbar`,e)}Qs(`MuiToolbar`,[`root`,`gutters`,`regular`,`dense`]);var jne=e=>{let{classes:t,disableGutters:n,variant:r}=e;return Tl({root:[`root`,!n&&`gutters`,r]},Ane,t)},Mne=K(`div`,{name:`MuiToolbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(jd(({theme:e})=>({position:`relative`,display:`flex`,alignItems:`center`,variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up(`sm`)]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:`dense`},style:{minHeight:48}},{props:{variant:`regular`},style:e.mixins.toolbar}]}))),Ew=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiToolbar`}),{className:r,component:i=`div`,disableGutters:a=!1,variant:o=`regular`,...s}=n,c={...n,component:i,disableGutters:a,variant:o},l=jne(c);return(0,U.jsx)(Mne,{as:i,className:W(l.root,r),ref:t,ownerState:c,...s})}),Nne=Jf((0,U.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),Pne=Jf((0,U.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function Dw(e){return Zs(`MuiTableRow`,e)}var Ow=Qs(`MuiTableRow`,[`root`,`selected`,`hover`,`head`,`footer`]),kw=e=>{let{classes:t,selected:n,hover:r,head:i,footer:a}=e;return Tl({root:[`root`,n&&`selected`,r&&`hover`,i&&`head`,a&&`footer`]},Dw,t)},Aw=K(`tr`,{name:`MuiTableRow`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(jd(({theme:e})=>({color:`inherit`,display:`table-row`,verticalAlign:`middle`,outline:0,[`&.${Ow.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ow.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),jw=`tr`,Mw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTableRow`}),{className:r,component:i=jw,hover:a=!1,selected:o=!1,...s}=n,c=L.useContext(bw),l={...n,component:i,hover:a,selected:o,head:c&&c.variant===`head`,footer:c&&c.variant===`footer`},u=kw(l);return(0,U.jsx)(Aw,{as:i,ref:t,className:W(u.root,r),role:i===jw?null:`row`,ownerState:l,...s})}),Nw=Jf((0,U.jsx)(`path`,{d:`M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z`}),`ArrowDownward`);function Pw(e){return Zs(`MuiTableSortLabel`,e)}var Fw=Qs(`MuiTableSortLabel`,[`root`,`active`,`icon`,`directionDesc`,`directionAsc`]),Iw=e=>{let{classes:t,direction:n,active:r}=e;return Tl({root:[`root`,r&&`active`,`direction${q(n)}`],icon:[`icon`]},Pw,t)},Lw=K(wm,{name:`MuiTableSortLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})(jd(({theme:e})=>({cursor:`pointer`,display:`inline-flex`,justifyContent:`flex-start`,flexDirection:`inherit`,alignItems:`center`,"&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${Fw.icon}`]:{opacity:.5}},[`&.${Fw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Fw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),Rw=K(`span`,{name:`MuiTableSortLabel`,slot:`Icon`})(jd(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,...$d(e,[`opacity`,`transform`],{duration:e.transitions.duration.shorter}),userSelect:`none`,variants:[{props:{direction:`desc`},style:{transform:`rotate(0deg)`}},{props:{direction:`asc`},style:{transform:`rotate(180deg)`}}]}))),zw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTableSortLabel`}),{active:r=!1,children:i,className:a,direction:o=`asc`,hideSortIcon:s=!1,IconComponent:c=Nw,slots:l={},slotProps:u={},...d}=n,f={...n,active:r,direction:o,hideSortIcon:s,IconComponent:c},p=Iw(f),m={slots:l,slotProps:u},[h,g]=Ap(`root`,{elementType:Lw,externalForwardedProps:m,ownerState:f,className:W(p.root,a),ref:t,additionalProps:{internalNativeButton:!1}}),[_,v]=Ap(`icon`,{elementType:Rw,externalForwardedProps:m,ownerState:f,className:p.icon});return(0,U.jsxs)(h,{disableRipple:!0,component:`span`,...g,...d,children:[i,s&&!r?null:(0,U.jsx)(_,{as:c,...v})]})});function Bw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function Vw(e,t,n,r={},i=()=>{}){let{ease:a=Bw,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var Hw={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function Uw(e){let{onChange:t,...n}=e,r=L.useRef(),i=L.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Pd(()=>{let e=Yf(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=Zf(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),L.useEffect(()=>{a(),t(r.current)},[t]),(0,U.jsx)(`div`,{style:Hw,...n,ref:i})}function Ww(e){return Zs(`MuiTabScrollButton`,e)}var Gw=Qs(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),Kw=e=>{let{classes:t,orientation:n,disabled:r}=e;return Tl({root:[`root`,n,r&&`disabled`]},Ww,t)},qw=K(wm,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Gw.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),Jw=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=Wc(),p={isRtl:f,...n},m=Kw(p),h=i.StartScrollButtonIcon??Nne,g=i.EndScrollButtonIcon??Pne,_=v_({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=v_({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,U.jsx)(qw,{component:`div`,className:W(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,U.jsx)(h,{..._}):(0,U.jsx)(g,{...v})})});function Yw(e){return Zs(`MuiTabs`,e)}var Xw=Qs(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Zw=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return Tl({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},Yw,c)},Qw=K(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Xw.scrollButtons}`]:t.scrollButtons},{[`& .${Xw.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(jd(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Xw.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),$w=K(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),eT=K(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),tT=K(`span`,{name:`MuiTabs`,slot:`Indicator`})(jd(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...$d(e),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),nT=K(Uw)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),rT={},iT=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTabs`}),r=Ed(),i=Wc(),a=wp(r.motion.reducedMotion,!1),{"aria-label":o,"aria-labelledby":s,action:c,centered:l=!1,children:u,className:d,component:f=`div`,allowScrollButtonsMobile:p=!1,indicatorColor:m=`primary`,onChange:h,orientation:g=`horizontal`,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},textColor:x=`primary`,value:S,variant:C=`standard`,visibleScrollbar:w=!1,...T}=n,E=C===`scrollable`,D=g===`vertical`,O=D?`scrollTop`:`scrollLeft`,ee=D?`top`:`left`,te=D?`bottom`:`right`,k=D?`clientHeight`:`clientWidth`,A=D?`height`:`width`,j={...n,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:g,vertical:D,scrollButtons:_,textColor:x,variant:C,visibleScrollbar:w,fixed:!E,hideScrollbar:E&&!w,scrollableX:E&&!D,scrollableY:E&&D,centered:l&&!E,scrollButtonsHideMobile:!p},M=Zw(j),ne=v_({elementType:y.startScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:j}),re=v_({elementType:y.endScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:j}),[ie,ae]=L.useState(!1),[N,oe]=L.useState(rT),[se,ce]=L.useState(!1),[P,le]=L.useState(!1),[ue,F]=L.useState(!1),I=S===!1?null:S,[de,fe]=L.useState(!1),[pe,me]=L.useState({overflow:`hidden`,scrollbarWidth:0}),he=new Map,ge=L.useRef(null),_e=L.useRef(null),ve={slots:y,slotProps:b},ye=()=>{let e=ge.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&S!==!1){let e=_e.current.children;if(e.length>0){let t=e[he.get(S)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},be=np(()=>{let{tabsMeta:e,tabMeta:t}=ye(),n=0,r;D?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[A]:t?t[A]:0};if(typeof N[r]!=`number`||typeof N[A]!=`number`)oe(a);else{let e=Math.abs(N[r]-a[r]),t=Math.abs(N[A]-a[A]);(e>=1||t>=1)&&oe(a)}}),xe=(e,{animation:t=!0}={})=>{t&&!a.shouldReduceMotion?Vw(O,ge.current,e,{duration:r.transitions.duration.standard}):ge.current[O]=e},Se=e=>{let t=ge.current[O];D?t+=e:t+=e*(i?-1:1),xe(t)},R=()=>{let e=ge.current[k],t=0,n=Array.from(_e.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[k]>e){r===0&&(t=e);break}t+=i[k]}return t},z=()=>{Se(-1*R())},B=()=>{Se(R())},[Ce,{onChange:we,...Te}]=Ap(`scrollbar`,{className:W(M.scrollableX,M.hideScrollbar),elementType:nT,shouldForwardComponentProp:!0,externalForwardedProps:ve,ownerState:j}),Ee=L.useCallback(e=>{we?.(e),me({overflow:null,scrollbarWidth:e})},[we]),[De,Oe]=Ap(`scrollButtons`,{className:M.scrollButtons,elementType:Jw,externalForwardedProps:ve,ownerState:j,additionalProps:{orientation:g,slots:{StartScrollButtonIcon:y.startScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ne,endScrollButtonIcon:re}}}),ke=()=>{let e={};e.scrollbarSizeListener=E?(0,U.jsx)(Ce,{...Te,onChange:Ee}):null;let t=E&&(_===`auto`&&(se||P)||_===!0);return e.scrollButtonStart=t?(0,U.jsx)(De,{direction:i?`right`:`left`,onClick:z,disabled:!se,...Oe}):null,e.scrollButtonEnd=t?(0,U.jsx)(De,{direction:i?`left`:`right`,onClick:B,disabled:!P,...Oe}):null,e},Ae=np(e=>{let{tabsMeta:t,tabMeta:n}=ye();if(!(!n||!t)){if(n[ee]<t[ee]){let r=t[O]+(n[ee]-t[ee]);xe(r,{animation:e})}else if(n[te]>t[te]){let r=t[O]+(n[te]-t[te]);xe(r,{animation:e})}}}),je=np(()=>{E&&_!==!1&&F(!ue)});L.useEffect(()=>{let e=Yf(()=>{ge.current&&be()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),je()},r=Zf(ge.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(_e.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(_e.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[be,je]),L.useEffect(()=>{let e=Array.from(_e.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&E&&_!==!1){let n=e[0],r=e[t-1],i={root:ge.current,threshold:.99},a=new IntersectionObserver(e=>{ce(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{le(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[E,_,ue,u?.length]),L.useEffect(()=>{ae(!0)},[]),L.useEffect(()=>{be()}),L.useEffect(()=>{Ae(rT!==N)},[Ae,N]),L.useImperativeHandle(c,()=>({updateIndicator:be,updateScrollButtons:je}),[be,je]);let[V,Me]=Ap(`indicator`,{className:M.indicator,elementType:tT,externalForwardedProps:ve,ownerState:j,additionalProps:{style:N}}),Ne=(0,U.jsx)(V,{...Me}),Pe=Kx({activeItemId:de?void 0:I,orientation:g,isRtl:i}),Fe=Pe.getContainerProps(),Ie=L.Children.toArray(u).filter(L.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return he.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===S;return L.cloneElement(e,{fullWidth:C===`fullWidth`,indicator:n&&!ie&&Ne,selected:n,selectionFollowsFocus:v,onChange:h,textColor:x,value:t})}),Le=ke(),[Re,ze]=Ap(`root`,{ref:t,className:W(M.root,d),elementType:Qw,externalForwardedProps:{...ve,...T,component:f},ownerState:j}),[Be,Ve]=Ap(`scroller`,{ref:ge,className:M.scroller,elementType:$w,externalForwardedProps:ve,ownerState:j,additionalProps:{style:{overflow:pe.overflow,[D?`margin${i?`Left`:`Right`}`:`marginBottom`]:w?void 0:-pe.scrollbarWidth}}}),He=Nd(Fe.ref,_e),Ue=e=>{let t=_e.current;Ld(Fd(t))?.getAttribute(`role`)===`tab`&&Fe.onKeyDown(e)},[We,Ge]=Ap(`list`,{ref:He,className:M.list,elementType:eT,externalForwardedProps:ve,ownerState:j,getSlotProps:e=>({...e,onBlur:t=>{ey(t.currentTarget,t.relatedTarget)||fe(!1),e.onBlur?.(t)},onKeyDown:t=>{Ue(t),e.onKeyDown?.(t)},onFocus:t=>{fe(!0),Fe.onFocus(t),e.onFocus?.(t)}})});return(0,U.jsxs)(Re,{...ze,children:[Le.scrollButtonStart,Le.scrollbarSizeListener,(0,U.jsxs)(Be,{...Ve,children:[(0,U.jsx)(We,{"aria-label":o,"aria-labelledby":s,"aria-orientation":g===`vertical`?`vertical`:null,role:`tablist`,...Ge,children:(0,U.jsx)(Vx.Provider,{value:Pe,children:Ie})}),ie&&Ne]}),Le.scrollButtonEnd]})});function aT(e){return Zs(`MuiTextField`,e)}Qs(`MuiTextField`,[`root`]);var oT={standard:Mb,filled:tb,outlined:oC},sT=e=>{let{classes:t}=e;return Tl({root:[`root`]},aT,t)},cT=K(ab,{name:`MuiTextField`,slot:`Root`})({}),lT=L.forwardRef(function(e,t){let n=Md({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,fullWidth:d=!1,helperText:f,id:p,inputRef:m,label:h,maxRows:g,minRows:_,multiline:v=!1,name:y,onBlur:b,onChange:x,onFocus:S,placeholder:C,required:w=!1,rows:T,select:E=!1,slots:D={},slotProps:O={},type:ee,value:te,variant:k=`outlined`,...A}=n,j={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:d,multiline:v,required:w,select:E,variant:k},M=sT(j),ne=Qc(p),re=f&&ne?`${ne}-helper-text`:void 0,ie=h&&ne?`${ne}-label`:void 0,ae=oT[k],N={slots:D,slotProps:O},[oe,se]=Ap(`select`,{elementType:zC,externalForwardedProps:N,ownerState:j}),ce=E&&se.native,P={},le=N.slotProps.inputLabel;k===`outlined`&&(le&&le.shrink!==void 0&&(P.notched=le.shrink),P.label=h),E&&(ce||(P.id=void 0),P[`aria-describedby`]=void 0);let[ue,F]=Ap(`root`,{elementType:cT,shouldForwardComponentProp:!0,externalForwardedProps:{...N,...A},ownerState:j,className:W(M.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:d,required:w,color:s,variant:k}}),[I,de]=Ap(`input`,{elementType:ae,externalForwardedProps:N,additionalProps:P,ownerState:j}),[fe,pe]=Ap(`inputLabel`,{elementType:Hb,externalForwardedProps:N,ownerState:j}),[me,L]=Ap(`htmlInput`,{elementType:`input`,externalForwardedProps:N,ownerState:j}),[he,ge]=Ap(`formHelperText`,{elementType:_b,externalForwardedProps:N,ownerState:j}),_e=(0,U.jsx)(I,{"aria-describedby":re,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:d,multiline:v,name:y,rows:T,maxRows:g,minRows:_,type:ee,value:te,id:ne,inputRef:m,onBlur:b,onChange:x,onFocus:S,placeholder:C,inputProps:L,slots:{input:D.htmlInput?me:void 0},...de});return(0,U.jsxs)(ue,{...F,children:[h!=null&&h!==``&&(0,U.jsx)(fe,{htmlFor:E&&!ce?void 0:ne,id:ie,...E&&!ce&&{component:`div`},...pe,children:h}),E?(0,U.jsx)(oe,{"aria-describedby":re,id:ne,labelId:ie,value:te,input:_e,...se,children:a}):_e,f&&(0,U.jsx)(he,{id:re,...ge,children:f})]})}),uT=L.createContext({}),dT=L.createContext(void 0);function fT(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}var pT=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return Tl({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${q(a)}`,o]},Nf,t)},mT=K(wm,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${q(n.size)}`]]}})(jd(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Pf.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${Pf.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Nm()).map(([t])=>({props:{color:t},style:{[`&.${Pf.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),hT=L.forwardRef(function(e,t){let{value:n,...r}=L.useContext(uT),i=L.useContext(dT),a=Md({props:dc({...r,selected:fT(e.value,n)},e),name:`MuiToggleButton`}),{children:o,className:s,color:c=`standard`,disabled:l=!1,disableFocusRipple:u=!1,fullWidth:d=!1,onChange:f,onClick:p,selected:m,size:h=`medium`,value:g,..._}=a,v={...a,color:c,disabled:l,disableFocusRipple:u,fullWidth:d,size:h},y=pT(v),b=e=>{p&&(p(e,g),e.defaultPrevented)||f&&f(e,g)},x=i||``;return(0,U.jsx)(mT,{className:W(r.className,y.root,s,x),internalNativeButton:!0,disabled:l,focusRipple:!u,ref:t,onClick:b,onChange:f,value:g,ownerState:v,"aria-pressed":m,..._,children:o})}),gT=vc({themeId:Lr}),_T=Er(),vT=Jf((0,U.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 3c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m7 13H5v-.23c0-.62.28-1.2.76-1.58C7.47 15.82 9.64 15 12 15s4.53.82 6.24 2.19c.48.38.76.97.76 1.58z`}),`AccountBox`),yT=Jf((0,U.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),bT=Jf((0,U.jsx)(`path`,{d:`m9.78 11.16-1.42 1.42c-.68-.69-1.34-1.58-1.79-2.94l1.94-.49c.32.89.77 1.5 1.27 2.01M11 6 7 2 3 6h3.02c.02.81.08 1.54.19 2.17l1.94-.49C8.08 7.2 8.03 6.63 8.02 6zm10 0-4-4-4 4h2.99c-.1 3.68-1.28 4.75-2.54 5.88-.5.44-1.01.92-1.45 1.55-.34-.49-.73-.88-1.13-1.24L9.46 13.6c.93.85 1.54 1.54 1.54 3.4v5h2v-5c0-2.02.71-2.66 1.79-3.63 1.38-1.24 3.08-2.78 3.2-7.37z`}),`AltRoute`),xT=Jf((0,U.jsx)(`path`,{d:`M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m4 12h-4v3l-5-5 5-5v3h4z`}),`AssignmentReturn`),ST=Jf((0,U.jsx)(`path`,{d:`M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4`}),`AttachMoney`),CT=Jf((0,U.jsx)(`path`,{d:`M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z`}),`BugReport`),wT=Jf((0,U.jsx)(`path`,{d:`m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4`}),`Build`),TT=Jf((0,U.jsx)(`path`,{d:`M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z`}),`CalendarMonth`),ET=Jf((0,U.jsx)(`path`,{d:`M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z`}),`CalendarToday`),DT=Jf((0,U.jsx)(`path`,{d:`M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M8 11H4V6h4zm6 0h-4V6h4zm6 0h-4V6h4zM8 18H4v-5h4zm6 0h-4v-5h4zm6 0h-4v-5h4z`}),`CalendarViewMonth`),OT=Jf((0,U.jsx)(`path`,{d:`m14 4 2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3z`}),`CallSplit`),kT=Jf([(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.2`},`0`),(0,U.jsx)(`path`,{d:`M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5`},`1`)],`CameraAlt`),AT=Jf((0,U.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),jT=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z`}),`CheckCircle`),MT=Jf((0,U.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),NT=Jf((0,U.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`),PT=Jf((0,U.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),FT=Jf((0,U.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),IT=Jf((0,U.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),LT=Jf((0,U.jsx)(`path`,{d:`m21.41 10.59-7.99-8c-.78-.78-2.05-.78-2.83 0l-8.01 8c-.78.78-.78 2.05 0 2.83l8.01 8c.78.78 2.05.78 2.83 0l7.99-8c.79-.79.79-2.05 0-2.83M13.5 14.5V12H10v3H8v-4c0-.55.45-1 1-1h4.5V7.5L17 11z`}),`Directions`),RT=Jf((0,U.jsx)(`path`,{d:`M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`Dns`),zT=Jf((0,U.jsx)(`path`,{d:`M11 9.16V2c-5 .5-9 4.79-9 10s4 9.5 9 10v-7.16c-1-.41-2-1.52-2-2.84s1-2.43 2-2.84M14.86 11H22c-.48-4.75-4-8.53-9-9v7.16c1 .3 1.52.98 1.86 1.84M13 14.84V22c5-.47 8.52-4.25 9-9h-7.14c-.34.86-.86 1.54-1.86 1.84`}),`DonutSmall`),BT=Jf((0,U.jsx)(`path`,{d:`M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`DragIndicator`),VT=Jf((0,U.jsx)(`path`,{d:`M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z`}),`Edit`),HT=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z`}),`Error`),UT=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z`}),`ErrorOutlined`),WT=Jf((0,U.jsx)(`path`,{d:`M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2`}),`ExitToApp`),GT=Jf((0,U.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`}),`ExpandMore`),KT=Jf((0,U.jsx)(`path`,{d:`M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11`}),`Extension`),qT=Jf((0,U.jsx)(`path`,{d:`M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z`}),`FilterList`),JT=Jf((0,U.jsx)(`path`,{d:`M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),YT=Jf((0,U.jsx)(`path`,{d:`M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z`}),`FolderOpen`),XT=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25`}),`HelpOutlined`),ZT=Jf((0,U.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`History`),QT=Jf((0,U.jsx)(`path`,{d:`M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2z`}),`HourglassFull`),$T=Jf((0,U.jsx)(`path`,{d:`M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z`}),`ImportExport`),eE=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z`}),`Info`),tE=Jf((0,U.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z`}),`InsertChart`),nE=Jf((0,U.jsx)(`path`,{d:`M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z`}),`KeyboardArrowDown`),rE=Jf((0,U.jsx)(`path`,{d:`M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z`}),`KeyboardArrowLeft`),iE=Jf((0,U.jsx)(`path`,{d:`M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z`}),`KeyboardArrowRight`),aE=Jf((0,U.jsx)(`path`,{d:`M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z`}),`KeyboardArrowUp`),oE=Jf((0,U.jsx)(`path`,{d:`M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`),sE=Jf((0,U.jsx)(`path`,{d:`M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z`}),`Loop`),cE=Jf((0,U.jsx)(`path`,{d:`M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z`}),`Memory`),lE=Jf((0,U.jsx)(`path`,{d:`M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreHoriz`),uE=Jf((0,U.jsx)(`path`,{d:`M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z`}),`Notifications`),dE=Jf((0,U.jsx)(`path`,{d:`M17.66 8 12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8M6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14z`}),`Opacity`),fE=Jf((0,U.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m.88 15.76V19h-1.75v-1.29c-.74-.18-2.39-.77-3.02-2.96l1.65-.67c.06.22.58 2.09 2.4 2.09.93 0 1.98-.48 1.98-1.61 0-.96-.7-1.46-2.28-2.03-1.1-.39-3.35-1.03-3.35-3.31 0-.1.01-2.4 2.62-2.96V5h1.75v1.24c1.84.32 2.51 1.79 2.66 2.23l-1.58.67c-.11-.35-.59-1.34-1.9-1.34-.7 0-1.81.37-1.81 1.39 0 .95.86 1.31 2.64 1.9 2.4.83 3.01 2.05 3.01 3.45 0 2.63-2.5 3.13-3.02 3.22`}),`Paid`),pE=Jf((0,U.jsx)(`path`,{d:`M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z`}),`Receipt`),mE=Jf((0,U.jsx)(`path`,{d:`M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z`}),`Refresh`),hE=Jf((0,U.jsx)(`path`,{d:`M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8`}),`Replay`),gE=Jf((0,U.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14m-2.17-1.5 2.14-1.53 2.14 1.53-.83-2.46 2.15-1.5h-2.62L9.47 6l-.84 2.54H6l2.14 1.49z`}),`SavedSearch`),_E=Jf((0,U.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`}),`Search`),vE=Jf((0,U.jsx)(`path`,{d:`M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6`}),`Settings`),yE=Jf((0,U.jsx)(`path`,{d:`m17.21 9-4.38-6.56c-.19-.28-.51-.42-.83-.42s-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1zM9 9l3-4.4L15 9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2`}),`ShoppingBasket`),bE=Jf((0,U.jsx)(`path`,{d:`m6 18 8.5-6L6 6zM16 6v12h2V6z`}),`SkipNext`),xE=Jf((0,U.jsx)(`path`,{d:`M6 6h2v12H6zm3.5 6 8.5 6V6z`}),`SkipPrevious`),SE=Jf((0,U.jsx)(`path`,{d:`M14.43 10 12 2l-2.43 8H2l6.18 4.41L5.83 22 12 17.31 18.18 22l-2.35-7.59L22 10z`}),`StarRate`),CE=Jf((0,U.jsx)(`path`,{d:`M15 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V9zM8 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m6 1V4.5l5.5 5.5z`}),`Summarize`),wE=Jf((0,U.jsx)(`path`,{d:`M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2`}),`Timeline`),TE=Jf((0,U.jsx)(`path`,{d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3`}),`Visibility`),EE=Jf((0,U.jsx)(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z`}),`VisibilityOff`),DE=Jf((0,U.jsx)(`path`,{d:`M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z`}),`Warning`),OE=Jf([(0,U.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14`},`0`),(0,U.jsx)(`path`,{d:`M12 10h-2v2H9v-2H7V9h2V7h1v2h2z`},`1`)],`ZoomIn`),kE=Jf((0,U.jsx)(`path`,{d:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z`}),`ZoomOut`),AE=365.2425,jE=864e5,ME=6e4,NE=36e5,PE=3600*24;PE*7,PE*AE/12*3;var FE=Symbol.for(`constructDateFrom`);function IE(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&FE in e?e[FE](t):e instanceof Date?new e.constructor(t):new Date(t)}function LE(e,t){return IE(t||e,e)}function RE(e,t,n){let r=LE(e,n?.in);return isNaN(t)?IE(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function zE(e,t,n){let r=LE(e,n?.in);if(isNaN(t))return IE(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=IE(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function BE(e,t,n){return IE(n?.in||e,+LE(e)+t)}function VE(e,t,n){return BE(e,t*NE,n)}var HE={};function UE(){return HE}function WE(e,t){let n=UE(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=LE(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function GE(e){let t=LE(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function KE(e,...t){let n=IE.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function qE(e,t){let n=LE(e,t?.in);return n.setHours(0,0,0,0),n}function JE(e,t,n){let[r,i]=KE(n?.in,e,t),a=qE(r),o=qE(i),s=+a-GE(a),c=+o-GE(o);return Math.round((s-c)/jE)}function YE(e,t,n){let r=LE(e,n?.in);return r.setTime(r.getTime()+t*ME),r}function XE(e,t,n){return BE(e,t*1e3,n)}function ZE(e,t,n){return zE(e,t*12,n)}function QE(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=IE.bind(null,e));let t=LE(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),IE(r,n||NaN)}function $E(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=IE.bind(null,e));let t=LE(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),IE(r,n||NaN)}function eD(e,t,n){let[r,i]=KE(n?.in,e,t),a=tD(r,i),o=Math.abs(JE(r,i));r.setDate(r.getDate()-a*o);let s=a*(o-Number(tD(r,i)===-a));return s===0?0:s}function tD(e,t){let n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function nD(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function rD(e,t){return LE(e)-+LE(t)}function iD(e,t,n){let r=rD(e,t)/ME;return nD(n?.roundingMethod)(r)}function aD(e,t){let n=LE(e,t?.in);return n.setHours(23,59,59,999),n}function oD(e,t,n){let r=rD(e,t)/1e3;return nD(n?.roundingMethod)(r)}function sD(e,t){let n=LE(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function cD(e,t){let n=LE(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=IE(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function lD(e){return qE(Date.now(),e)}var uD=3,dD=2;function fD(e,t,n){let r=n.left,i=n.right;return r===null?i===null?{key:e,val:t,size:2,left:null,right:n}:{key:n.key,val:n.val,size:3,left:{key:e,val:t,size:1,left:null,right:null},right:i}:i===null?{key:r.key,val:r.val,size:3,left:{key:e,val:t,size:1,left:null,right:null},right:{key:n.key,val:n.val,size:1,left:null,right:null}}:{key:n.key,val:n.val,size:1+n.size,left:{key:e,val:t,size:1+r.size,left:null,right:r},right:i}}function pD(e,t,n){let r=n.left,i=n.right;return r===null?i===null?{key:e,val:t,size:2,left:n,right:null}:{key:i.key,val:i.val,size:3,left:{key:n.key,val:n.val,size:1,left:null,right:null},right:{key:e,val:t,size:1,left:null,right:null}}:i===null?{key:n.key,val:n.val,size:3,left:r,right:{key:e,val:t,size:1,left:null,right:null}}:{key:n.key,val:n.val,size:1+n.size,left:r,right:{key:e,val:t,size:1+i.size,left:i,right:null}}}function mD(e,t,n,r){let i=r.left,a=r.right;return i.size<dD*a.size?{key:r.key,val:r.val,size:1+n.size+r.size,left:{key:e,val:t,size:1+n.size+i.size,left:n,right:i},right:a}:{key:i.key,val:i.val,size:1+n.size+r.size,left:{key:e,val:t,size:1+n.size+(i.left?.size??0),left:n,right:i.left},right:{key:r.key,val:r.val,size:1+a.size+(i.right?.size??0),left:i.right,right:a}}}function hD(e,t,n,r){let i=n.left,a=n.right;return a.size<dD*i.size?{key:n.key,val:n.val,size:1+n.size+r.size,left:i,right:{key:e,val:t,size:1+r.size+a.size,left:a,right:r}}:{key:a.key,val:a.val,size:1+n.size+r.size,left:{key:n.key,val:n.val,size:1+i.size+(a.left?.size??0),left:i,right:a.left},right:{key:e,val:t,size:1+r.size+(a.right?.size??0),left:a.right,right:r}}}function gD(e,t,n,r){if(r===null)return e===null?{key:t,val:n,size:1,left:null,right:null}:pD(t,n,e);let i=e;return i.size>uD*r.size?hD(t,n,i,r):{key:t,val:n,size:1+i.size+r.size,left:e,right:r}}function _D(e,t,n,r){if(e===null)return r===null?{key:t,val:n,size:1,left:null,right:null}:fD(t,n,r);let i=r;return i.size>uD*e.size?mD(t,n,e,i):{key:t,val:n,size:1+e.size+i.size,left:e,right:r}}function vD(e,t,n,r){return e===null?r===null?{key:t,val:n,size:1,left:null,right:null}:fD(t,n,r):r===null?pD(t,n,e):r.size>uD*e.size?mD(t,n,e,r):e.size>uD*r.size?hD(t,n,e,r):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function yD(e,t,n){return n===null?{key:e,val:t,size:1,left:null,right:null}:gD(yD(e,t,n.left),n.key,n.val,n.right)}function bD(e,t,n){if(n===null)return{key:e,val:t,size:1,left:null,right:null};let r=bD(e,t,n.right);return _D(n.left,n.key,n.val,r)}function xD(e,t,n,r){return e===null?yD(t,n,r):r===null?bD(t,n,e):r.size>uD*e.size?gD(xD(e,t,n,r.left),r.key,r.val,r.right):e.size>uD*r.size?_D(e.left,e.key,e.val,xD(e.right,t,n,r)):{key:t,val:n,size:1+e.size+r.size,left:e,right:r}}function SD(e){let t=e.left;if(t===null)return{k:e.key,v:e.val,rest:e.right};{let n=SD(t);return n.rest=_D(n.rest,e.key,e.val,e.right),n}}function CD(e){let t=e.right;if(t===null)return{k:e.key,v:e.val,rest:e.left};{let n=CD(t);return n.rest=gD(e.left,e.key,e.val,n.rest),n}}function wD(e,t){if(e===null)return t;if(t===null)return e;if(e.size>t.size){let{k:n,v:r,rest:i}=CD(e);return _D(i,n,r,t)}else{let{k:n,v:r,rest:i}=SD(t);return gD(e,n,r,i)}}function TD(e,t){return e===null?t:t===null?e:t.size>uD*e.size?gD(TD(e,t.left),t.key,t.val,t.right):e.size>uD*t.size?_D(e.left,e.key,e.val,TD(e.right,t)):wD(e,t)}function ED(e,t,n,r,i){return e<0?{key:t,val:n,size:2,left:null,right:{key:r,val:i,size:1,left:null,right:null}}:{key:t,val:n,size:2,left:{key:r,val:i,size:1,left:null,right:null},right:null}}function DD(e){let t=e.right,n=t.size;return t.size=e.size,e.right=t.left,e.size=e.size-n+(e.right?.size??0),t.left=e,t}function OD(e){let t=e.left,n=t.size;return t.size=e.size,e.left=t.right,e.size=e.size-n+(e.left?.size??0),t.right=e,t}function kD(e){let t=e.left.size,n=e.right?.size??0;if(t>uD*n&&t+n>1){let t=e.left.left?.size??0;return(e.left.right?.size??0)<dD*t||(e.left=DD(e.left)),OD(e)}return e}function AD(e){let t=e.left?.size??0,n=e.right.size;return n>uD*t&&t+n>1?((e.right.left?.size??0)<dD*(e.right.right?.size??0)||(e.right=OD(e.right)),DD(e)):e}function jD(e){return typeof e==`object`&&!!e&&`compare`in e}function MD(e,t){return`asc`in e?e.asc(t):`desc`in e?e.desc(t):e(t)}function ND(...e){return(t,n)=>{for(let r of e)if(`desc`in r){let e=r.desc(t),i=r.desc(n);if(typeof e==`string`&&typeof i==`string`){let t=e.localeCompare(i);if(t===0)continue;return t<0?1:-1}else if(jD(e)&&i!==null){let t=e.compare(i);if(t===0)continue;return t<0?1:-1}else if(e===i)continue;else if(e===null)return-1;else if(i===null)return 1;else return e<i?1:-1}else{let e=`asc`in r?r.asc:r,i=e(t),a=e(n);if(typeof i==`string`&&typeof a==`string`){let e=i.localeCompare(a);if(e===0)continue;return e<0?-1:1}else if(jD(i)&&a!==null){let e=i.compare(a);if(e===0)continue;return e<0?-1:1}else if(i===a)continue;else if(i===null)return 1;else if(a===null)return-1;else return i<a?-1:1}return 0}}function PD(e,t){return e===t?0:e?1:-1}function FD(e,t){return e-t}function ID(e,t){return e.localeCompare(t)}function LD(e,t){return e.getTime()-t.getTime()}function RD(e,t){return e.compare(t)}function zD(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=LD;return}else if(jD(t)){e.compare=RD;return}else throw Error(`key type must have compare method`);case`string`:e.compare=ID;return;case`number`:e.compare=FD;return;case`boolean`:e.compare=PD;return;default:throw Error(`cannot compare keys`)}}function n(n,r){return t(n),e.compare(n,r)}return e={compare:n},e}function BD({compare:e},t,n){let r=n;for(;r;){let n=e(t,r.key);if(n===0)return r.val;r=n<0?r.left:r.right}}function VD(e){let t=e;for(;;){let e=t.left;if(e)t=e;else return[t.key,t.val]}}function HD(e){let t=e;for(;;){let e=t.right;if(e)t=e;else return[t.key,t.val]}}function UD({compare:e},t,n,r){function i(r){if(r===null){let e=n(void 0);return e===void 0?null:{key:t,val:e,size:1,left:null,right:null}}let a=e(t,r.key);if(a===0){let e=n(r.val);return e===void 0?wD(r.left,r.right):e===r.val?r:{key:t,val:e,size:r.size,left:r.left,right:r.right}}else if(a<0){let e=i(r.left);return e===r.left?r:vD(e,r.key,r.val,r.right)}else{let e=i(r.right);return e===r.right?r:vD(r.left,r.key,r.val,e)}}return i(r)}function WD({compare:e},t,n,r,i){let a=!0;function o(i){if(i===null)return{key:t,val:r(void 0,n),size:1,left:null,right:null};let s=e(t,i.key);if(s<0)return i.left=o(i.left),a&&(i.size+=1),kD(i);if(s>0)return i.right=o(i.right),a&&(i.size+=1),AD(i);{let e=r(i.val,n);return e===i.val?(a=!1,i):(a=!1,{key:i.key,val:e,size:i.size,left:i.left,right:i.right})}}return o(i)}function GD({compare:e},t,n){let r,i,a=null,o=!0;function s(t){if(t===null)return{key:r,val:i,size:1,left:null,right:null};let a=e(r,t.key);return a<0?(t.left=s(t.left),o&&(t.size+=1),kD(t)):a>0?(t.right=s(t.right),o&&(t.size+=1),AD(t)):i===t.val?(o=!1,t):(o=!1,{key:t.key,val:n?n(t.val,i):i,size:t.size,left:t.left,right:t.right})}for([r,i]of t)a=s(a),o=!0;return a}function KD({compare:e},t,n,r){let i,a,o=null,s=!0;function c(t){if(t===null)return{key:i,val:r?r(void 0,a):a,size:1,left:null,right:null};let n=e(i,t.key);if(n<0)return t.left=c(t.left),s&&(t.size+=1),kD(t);if(n>0)return t.right=c(t.right),s&&(t.size+=1),AD(t);{s=!1;let e=r?r(t.val,a):a;return e===t.val?t:{key:t.key,val:e,size:t.size,left:t.left,right:t.right}}}for(a of t)i=n(a),o=c(o),s=!0;return o}function*qD(e,t){let n=[],r=t;for(;r!==null||n.length>0;)r===null?(r=n.pop(),yield e(r.key,r.val),r=r.right):(n.push(r),r=r.left)}function*JD(e,t){let n=[],r=t;for(;r!==null||n.length>0;)r===null?(r=n.pop(),yield e(r.key,r.val),r=r.left):(n.push(r),r=r.right)}function YD(e,t,n){let r=[],i=n,a=t;for(;i!==null||r.length>0;)i===null?(i=r.pop(),a=e(a,i.key,i.val),i=i.right):(r.push(i),i=i.left);return a}function XD(e,t,n){let r=[],i=n,a=t;for(;i!==null||r.length>0;)i===null?(i=r.pop(),a=e(i.key,i.val,a),i=i.left):(r.push(i),i=i.right);return a}function ZD(e,t){function n(t){if(!t)return null;let r=n(t.left),i=e(t.val,t.key),a=n(t.right);return i===t.val&&r===t.left&&a===t.right?t:{key:t.key,val:i,size:t.size,left:r,right:a}}return n(t)}function QD(e,t,n){function r(n){if(!n)return null;let i=r(n.left),a=e(n.val,n.key),o=r(n.right);return a===void 0||t&&a===null?TD(i,o):a===n.val&&i===n.left&&o===n.right?n:xD(i,n.key,a,o)}return r(n)}function $D({compare:e},t,n){function r(n){if(!n)return{below:null,val:void 0,above:null};let i=e(t,n.key);if(i<0){let e=r(n.left),t=xD(e.above,n.key,n.val,n.right);return{below:e.below,val:e.val,above:t}}else if(i>0){let e=r(n.right);return{below:xD(n.left,n.key,n.val,e.below),val:e.val,above:e.above}}else return{below:n.left,val:n.val,above:n.right}}return r(n)}function eO(e,t){function n(t){if(t===null)return[null,null];let[r,i]=n(t.left),[a,o]=n(t.right);if(e(t.key,t.val))return[r===t.left&&a===t.right?t:xD(r,t.key,t.val,a),TD(i,o)];{let e=o===t.right&&i===t.left?t:xD(i,t.key,t.val,o);return[TD(r,a),e]}}return n(t)}function tO(e){return SD(e)}function nO(e){return CD(e)}function rO(e,t,n){if(!t)return!0;if(!n||t.size>n.size)return!1;function r(t,n){if(!t)return!0;let i=$D(e,t.key,n);return i.val===void 0||(t.left?.size??0)>(i.below?.size??0)||(t.right?.size??0)>(i.above?.size??0)?!1:r(t.left,i.below)&&r(t.right,i.above)}return r(t,n)}function iO(e,t,n){if(!t||!n)return!0;function r(t,n){if(!t||!n)return!0;if(t.size===1)return BD(e,t.key,n)===void 0;let i=$D(e,t.key,n);return i.val===void 0&&r(t.left,i.below)&&r(t.right,i.above)}return r(t,n)}function aO({compare:e},t,n){let r=n,i=0;for(;r;){let n=e(t,r.key);if(n===0)return r.left&&(i+=r.left.size),i;n<0?r=r.left:(r.left&&(i+=r.left.size),i+=1,r=r.right)}return-1}function oO(e,t){let n=t,r=e;for(;n;){let e=n.left?n.left.size:0;if(r<e)n=n.left;else if(r===e)return[n.key,n.val];else r-=e+1,n=n.right}}function sO(e,t){if(e<=0||t===null)return null;if(e>=t.size)return t;let n=t.left?t.left.size:0;if(e<=n)return sO(e,t.left);{let r=sO(e-n-1,t.right);return xD(t.left,t.key,t.val,r)}}function cO(e,t){if(e<=0||t===null)return t;if(e>=t.size)return null;let n=t.left?t.left.size:0;return e<n?xD(cO(e,t.left),t.key,t.val,t.right):e===n?yD(t.key,t.val,t.right):cO(e-n-1,t.right)}function lO(e,t,n){if(e<0||n===null)return n;let r=n.left?n.left.size:0;if(e<r){let r=lO(e,t,n.left);return r===n.left?n:vD(r,n.key,n.val,n.right)}else if(e===r){let e=t(n.key,n.val);return e===void 0?wD(n.left,n.right):e===n.val?n:{key:n.key,val:e,size:n.size,left:n.left,right:n.right}}else{let i=lO(e-r-1,t,n.right);return i===n.right?n:vD(n.left,n.key,n.val,i)}}function uO(e,t,n,r){function i(n,r){if(!n)return r;if(!r)return n;if(!n.left&&!n.right)return UD(e,n.key,e=>e===void 0?n.val:t(n.val,e,n.key),r);if(!r.left&&!r.right)return UD(e,r.key,e=>e===void 0?r.val:t(e,r.val,r.key),n);let a=$D(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return o===n.left&&s===n.right&&(a.val===void 0||a.val===n.val)?n:a.val===void 0?xD(o,n.key,n.val,s):xD(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function dO(e,t,n,r){function i(n,r){if(!n||!r)return null;let a=$D(e,n.key,r),o=i(n.left,a.below),s=i(n.right,a.above);return a.val===void 0?TD(o,s):o===n.left&&s===n.right&&a.val===n.val?n:xD(o,n.key,t(n.val,a.val,n.key),s)}return i(n,r)}function fO(e,t,n){function r(t,n){if(!t)return null;if(!n)return t;let i=$D(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?a===t.left&&o===t.right?t:xD(a,t.key,t.val,o):TD(a,o)}return r(t,n)}function pO(e,t,n){function r(t,n){if(!t)return n;if(!n)return t;if(!t.left&&!t.right)return UD(e,t.key,e=>e===void 0?t.val:void 0,n);if(!n.left&&!n.right)return UD(e,n.key,e=>e===void 0?n.val:void 0,t);let i=$D(e,t.key,n),a=r(t.left,i.below),o=r(t.right,i.above);return i.val===void 0?xD(a,t.key,t.val,o):TD(a,o)}return r(t,n)}function mO(e,t,n,r){function i(e,n){return t(void 0,e,n)}function a(n,r){if(!r)return n;if(!n)return QD(i,!1,r);let o=$D(e,n.key,r),s=a(n.left,o.below),c=a(n.right,o.above);if(o.val!==void 0){let e=t(n.val,o.val,n.key);return e===void 0?TD(s,c):e===n.val&&s===n.left&&c===n.right?n:xD(s,n.key,e,c)}else if(s===n.left&&c===n.right)return n;else return xD(s,n.key,n.val,c)}return a(n,r)}function hO(e){return typeof e==`object`&&!!e&&`hash`in e}function gO(e,t){return e*16777619^t}function _O(e){let t=2166136261;for(let n=0;n<e.length;n++)t=gO(t,e.charCodeAt(n));return gO(t,e.length)}function vO(e){return+!!e}function yO(e){if(Number.isInteger(e)&&e>=-2147483648&&e<=2147483647)return e;if(Object.is(e,1/0)||Object.is(e,NaN))return 0;{let t=new ArrayBuffer(8);new Float64Array(t)[0]=e;let n=new Int32Array(t);return gO(gO(2166136261,n[0]),n[1])}}function bO(e){return yO(e.getTime())}function xO(...e){let t=e.length===1?0:2166136261;for(let n=0;n<e.length;n++){let r=e[n];if(r==null)t=gO(t,0);else switch(typeof r){case`string`:t=gO(t,_O(r));break;case`number`:t=gO(t,yO(r));break;case`boolean`:t=gO(t,vO(r));break;default:t=r instanceof Date?gO(t,yO(r.getTime())):hO(r)?gO(t,r.hash()):gO(t,_O(r.toString()));break}}return e.length===1?t:gO(t,e.length)}function SO(){let e;function t(t){switch(typeof t){case`object`:if(t instanceof Date){e.compare=LD,e.hash=bO;return}else if(hO(t)){e.compare=RD,e.hash=e=>e.hash();return}else throw Error(`key type must have compare and hash methods`);case`string`:e.compare=ID,e.hash=_O;return;case`number`:e.compare=FD,e.hash=yO;return;case`boolean`:e.compare=PD,e.hash=vO;return}}function n(n,r){return t(n),e.compare(n,r)}function r(n){return t(n),e.hash(n)}return e={compare:n,hash:r},e}var CO=5,wO=(1<<CO)-1,TO=-1;function EO(e,t){return 1<<(e>>>t&wO)}function DO(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}function OO(e,t){return DO(e&t-1)}function kO(e,t){return e>>>t&wO}function AO(){}function jO(e,t,n,r,i){r===void 0&&(r=e.hash(t)),i===void 0&&(i=0);let a=n;do if(`children`in a){let e=a.bitmap;if(e!==TO){let t=EO(r,i);if((e&t)===0)return;a=a.children[OO(e,t)],i+=CO}else a=a.children[kO(r,i)],i+=CO}else if(`key`in a)return r===a.hash&&e.compare(t,a.key)===0?a.val:void 0;else if(r===a.hash)return BD(e,t,a.collision);else return;while(a);throw Error(`Internal immutable-collections violation: node undefined during lookup`)}function MO(e,t,n){let r=t.hash,i=n.hash,a,o;for(;;){let s=EO(r,e),c=EO(i,e);if(s===c){let t=[,],n={bitmap:s,children:t};a===void 0&&(a=n),o!==void 0&&(o[0]=n),o=t,e+=CO}else{let l={bitmap:s|c,children:kO(r,e)<kO(i,e)?[t,n]:[n,t]};return o!==void 0&&(o[0]=l),a??l}}}function NO(e,t,n,r){let i=e.hash(t);if(r===null)return[{hash:i,key:t,val:n(void 0)},!0];let a,o,s=0,c=0,l=r;do if(`children`in l){let e,r,u=l.bitmap;if(u!==TO){let d=EO(i,c);if(e=OO(u,d),(u&d)===0){let r=l.children,c={hash:i,key:t,val:n(void 0)},f=[...r.slice(0,e),c,...r.slice(e)],p={bitmap:u|d,children:f};return o!==void 0&&(o[s]=p),[a??p,!0]}r={bitmap:u,children:[...l.children]}}else e=kO(i,c),r={bitmap:TO,children:[...l.children]};a===void 0&&(a=r),o!==void 0&&(o[s]=r),o=r.children,s=e,c+=CO,l=r.children[e]}else if(`key`in l){let u,d=!0;if(i===l.hash){let a=e.compare(t,l.key);if(a===0){let e=n(l.val);if(e===l.val)return[r,!1];u={hash:i,key:t,val:e},d=!1}else u={hash:i,collision:ED(a,t,n(void 0),l.key,l.val)}}else u=MO(c,{hash:i,key:t,val:n(void 0)},l);return o!==void 0&&(o[s]=u),[a??u,d]}else{let u,d=!0;if(i===l.hash){let a=UD(e,t,n,l.collision);if(a===l.collision)return[r,!1];d=a.size!==l.collision.size,u={hash:i,collision:a}}else u=MO(c,l,{hash:i,key:t,val:n(void 0)});return o!==void 0&&(o[s]=u),[a??u,d]}while(l);throw Error(`Internal immutable-collections violation: hamt insert reached null`)}function PO(e,t,n,r,i){let a=e.hash(t);if(i===null)return{hash:a,key:t,val:r(void 0,n)};let o,s=0,c=0,l=i;do if(`children`in l){let e,u=l.bitmap;if(u!==TO){let o=EO(a,c);if(e=OO(u,o),(u&o)===0){let s={hash:a,key:t,val:r(void 0,n)};return l.children.splice(e,0,s),l.bitmap|=o,i}}else e=kO(a,c);o=l.children,s=e,c+=CO,l=o[e]}else if(`key`in l){let u;if(a===l.hash){let o=e.compare(t,l.key);if(e.compare(t,l.key)===0)return l.val=r(l.val,n),i;u={hash:a,collision:ED(o,t,r(void 0,n),l.key,l.val)}}else u=MO(c,{hash:a,key:t,val:r(void 0,n)},l);return o===void 0?i=u:o[s]=u,i}else if(a===l.hash)return l.collision=WD(e,t,n,r,l.collision),i;else{let e=MO(c,l,{hash:a,key:t,val:r(void 0,n)});return o===void 0?i=e:o[s]=e,i}while(l);throw Error(`Internal immutable-collections violation: hamt mutate insert reached null`)}function FO(e,t,n){let r=null,i=0,a;a=n?function(e,t){return e===void 0?(i++,t):n(e,t)}:function(e,t){return e===void 0&&i++,t};for(let[n,i]of t)r=PO(e,n,i,a,r);return[r,i]}function IO(e,t,n,r){let i=null,a=0,o;o=r?function(e,t){return e===void 0?(a++,r(void 0,t)):r(e,t)}:function(e,t){return e===void 0&&a++,t};for(let r of t)i=PO(e,n(r),r,o,i);return[i,a]}function LO(e){for(;;)if(`children`in e)if(e.children.length===1)e=e.children[0];else return null;else return e}function RO(e,t,n){let r=e[e.length-1];if(r.node.bitmap===TO){let t=r.node.children;t.splice(r.childIdx,1);let n=~(1<<r.childIdx);if(e.length===1)return{bitmap:n,children:t};{let r=e[e.length-2];return r.node.children[r.childIdx]={bitmap:n,children:t},e[0].node}}if(r.node.children.length===2){let t=LO(r.node.children[1-r.childIdx]);if(t){for(let n=e.length-2;n>=0;n--){let r=e[n];if(r.node.children.length!==1)return r.node.children[r.childIdx]=t,e[0].node}return t}}return r.node.bitmap&=~EO(t,n-CO),r.node.children.splice(r.childIdx,1),e[0].node}function zO(e,t,n){if(e.length>0){let n=e[e.length-1];n.node.children[n.childIdx]=t}e.push({node:t,childIdx:n})}function BO(e,t,n,r,i){if(n===null)return null;r===void 0&&(r=e.hash(t)),i===void 0&&(i=0);let a=[],o=n;do if(`children`in o){let e,t=o.bitmap;if(t!==TO){let a=EO(r,i);if((t&a)===0)return n;e=OO(t,a)}else e=kO(r,i);let s={bitmap:t,children:[...o.children]};zO(a,s,e),i+=CO,o=s.children[e]}else if(`key`in o)return r===o.hash&&e.compare(t,o.key)===0?a.length===0?null:RO(a,r,i):n;else if(r===o.hash){let i=UD(e,t,AO,o.collision);if(i===o.collision)return n;let s;if(s=i.size===1?{hash:r,key:i.key,val:i.val}:{hash:r,collision:i},a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=s,a[0].node}else return s}else return n;while(o);throw Error(`Internal immutable-collections violation: hamt remove reached null`)}function VO(e,t,n,r){if(r===null){let r=n(void 0);return r===void 0?[null,0]:[{hash:e.hash(t),key:t,val:r},1]}let i=e.hash(t),a=[],o=0,s=r;do if(`children`in s){let e,c=s.bitmap;if(c!==TO){let l=EO(i,o);if((c&l)===0){let e=n(void 0);if(e===void 0)return[r,0];{let n=s.children,r=OO(c,l),o=[...n.slice(0,r),{hash:i,key:t,val:e},...n.slice(r)],u={bitmap:c|l,children:o};if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=u,[a[0].node,1]}else return[u,1]}}else e=OO(c,l)}else e=kO(i,o);let l={bitmap:c,children:[...s.children]};zO(a,l,e),o+=CO,s=l.children[e]}else if(`key`in s){let c,l;if(i===s.hash){let u=e.compare(t,s.key);if(u===0){let e=n(s.val);if(e===void 0)return a.length===0?[null,-1]:[RO(a,i,o),-1];if(e===s.val)return[r,0];c={hash:i,key:t,val:e},l=0}else{let e=n(void 0);if(e===void 0)return[r,0];c={hash:i,collision:ED(u,t,e,s.key,s.val)},l=1}}else{let e=n(void 0);if(e===void 0)return[r,0];c=MO(o,{hash:i,key:t,val:e},s),l=1}if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=c,[a[0].node,l]}else return[c,l]}else{let c,l;if(i===s.hash){let a=UD(e,t,n,s.collision);if(a===s.collision)return[r,0];l=a.size-s.collision.size,c=a.size===1?{hash:i,key:a.key,val:a.val}:{hash:i,collision:a}}else{let e=n(void 0);if(e===void 0)return[r,0];c=MO(o,{hash:i,key:t,val:e},s),l=1}if(a.length>0){let e=a[a.length-1];return e.node.children[e.childIdx]=c,[a[0].node,l]}else return[c,l]}while(s);throw Error(`Internal immutable-collections violation: hamt alter reached null`)}function*HO(e,t){if(t===null)return;let n=[t],r;for(;r=n.pop();)if(`children`in r)for(let e=0,t=r.children,i=t.length;e<i;e++)n.push(t[e]);else`key`in r?yield e(r.key,r.val):yield*qD(e,r.collision)}function UO(e,t,n){let r=t;if(n===null)return r;let i=[n],a;for(;a=i.pop();)if(`children`in a)for(let e=0,t=a.children,n=t.length;e<n;e++)i.push(t[e]);else r=`key`in a?e(r,a.key,a.val):YD(e,r,a.collision);return r}function WO(e,t){if(t===null)return null;function n(t){if(`children`in t){let e;for(let r=0,i=t.children,a=i.length;r<a;r++){let t=i[r],a=n(t);e?e.push(a):t!==a&&(e=[...i.slice(0,r),a])}return e?{bitmap:t.bitmap,children:e}:t}else if(`key`in t){let n=e(t.val,t.key);return t.val===n?t:{hash:t.hash,key:t.key,val:n}}else{let n=ZD(e,t.collision);return n===t.collision?t:{hash:t.hash,collision:n}}}return n(t)}function GO(e,t,n){if(n===null)return[null,0];let r=0;function i(n){if(`children`in n){let e=n.bitmap,t,r=e;for(let a=1,o=0,s=e;s!==0;s&=~a,a<<=1)if(e&a){let e=n.children[o],s=i(e);t?s?t.push(s):r&=~a:s?e!==s&&(t=[...n.children.slice(0,o),s]):(t=[...n.children.slice(0,o)],r&=~a),o++}return t?t.length===0?null:t.length===1&&LO(t[0])||{bitmap:r,children:t}:n}else if(`key`in n){let i=e(n.val,n.key);return i===void 0||t&&i===null?null:n.val===i?(r++,n):(r++,{hash:n.hash,key:n.key,val:i})}else{let i=QD(e,t,n.collision);return i===n.collision?(r+=n.collision.size,n):i===null?null:i.size===1?(r+=1,{hash:n.hash,key:i.key,val:i.val}):(r+=i.size,{hash:n.hash,collision:i})}}return[i(n),r]}function KO(e,t,n,r){if(n===null)return[r,0];if(r===null)return[n,0];let i=0;function a(n,r,o){if(`key`in r&&`key`in o)if(r.hash===o.hash){let n=e.compare(r.key,o.key);if(n===0){i++;let e=t(r.val,o.val,r.key);return e===r.val?r:e===o.val?o:{hash:r.hash,key:r.key,val:e}}else return{hash:r.hash,collision:ED(n,r.key,r.val,o.key,o.val)}}else return MO(n,r,o);else if(`key`in r&&`collision`in o)if(r.hash===o.hash){let n=UD(e,r.key,e=>e===void 0?r.val:(i++,t(r.val,e,r.key)),o.collision);return n===o.collision?o:{hash:r.hash,collision:n}}else return MO(n,r,o);else if(`collision`in r&&`key`in o)if(r.hash===o.hash){let n=UD(e,o.key,e=>e===void 0?o.val:(i++,t(e,o.val,o.key)),r.collision);return n===r.collision?r:{hash:o.hash,collision:n}}else return MO(n,r,o);else if(`collision`in r&&`collision`in o)if(r.hash===o.hash){let n=uO(e,t,r.collision,o.collision);return n===r.collision?r:(i+=r.collision.size+o.collision.size-n.size,{hash:r.hash,collision:n})}else return MO(n,r,o);else if(`children`in r&&`children`in o){let e=r.bitmap,t=o.bitmap,i=e&t,s;for(let c=1,l=0,u=0,d=e|t;d!==0;d&=~c,c<<=1)if(c&i){let e=a(n+CO,r.children[l],o.children[u]);s?s.push(e):e!==r.children[l]&&(s=[...r.children.slice(0,l),e]),l++,u++}else c&e?(s&&s.push(r.children[l]),l++):c&t&&(s?s.push(o.children[u]):s=[...r.children.slice(0,l),o.children[u]],u++);return s?{bitmap:e|t,children:s}:r}else if(`children`in r){let e=o.hash,t=r.bitmap,i=r.children,s;if(t===TO)s=kO(e,n);else{let r=EO(e,n);if(t&r)s=OO(t,r);else{let e=OO(t,r),n=[...i.slice(0,e),o,...i.slice(e)];return{bitmap:t|r,children:n}}}let c=i[s],l=a(n+CO,c,o);if(l===c)return r;{let e=[...i];return e[s]=l,{bitmap:t,children:e}}}else{let e=r.hash,t=o,i=t.bitmap,s=t.children,c;if(i===TO)c=kO(e,n);else{let t=EO(e,n);if(i&t)c=OO(i,t);else{let e=OO(i,t),n=[...s.slice(0,e),r,...s.slice(e)];return{bitmap:i|t,children:n}}}let l=s[c],u=a(n+CO,r,l);if(u===l)return o;{let e=[...s];return e[c]=u,{bitmap:i,children:e}}}}return[a(0,n,r),i]}function qO(e,t,n,r){if(n===null||r===null)return[null,0];let i=0;function a(n,r,o){if(`key`in r){let a=jO(e,r.key,o,r.hash,n);if(a!==void 0){i++;let e=t(r.val,a,r.key);return e===r.val?r:{hash:r.hash,key:r.key,val:e}}else return null}else if(`key`in o){let a=jO(e,o.key,r,o.hash,n);if(a!==void 0){i++;let e=t(a,o.val,o.key);return e===o.val?o:{hash:o.hash,key:o.key,val:e}}else return null}else if(`collision`in r&&`collision`in o){let n=dO(e,t,r.collision,o.collision);return n===r.collision?(i+=r.collision.size,r):n===null?null:n.size===1?(i+=1,{hash:r.hash,key:n.key,val:n.val}):(i+=n.size,{hash:r.hash,collision:n})}else if(`children`in r&&`children`in o){let e=r.bitmap,t=o.bitmap,i=e&t,s,c=i;for(let l=1,u=0,d=0,f=e|t;f!==0;f&=~l,l<<=1)if(l&i){let e=a(n+CO,r.children[u],o.children[d]);s?e===null?c&=~l:s.push(e):e!==r.children[u]&&(e===null?(s=[...r.children.slice(0,u)],c&=~l):s=[...r.children.slice(0,u),e]),u++,d++}else l&e?(s||=[...r.children.slice(0,u)],u++):l&t&&d++;return s?s.length===0?null:s.length===1?LO(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:r}else if(`children`in r){let e=o.hash,t=r.bitmap,i;if(t===TO)i=kO(e,n);else{let r=EO(e,n);if(r&t)i=OO(t,r);else return null}return a(n+CO,r.children[i],o)}else{let e=r.hash,t=o,i=t.bitmap,s;if(i===TO)s=kO(e,n);else{let t=EO(e,n);if(t&i)s=OO(i,t);else return null}return a(n+CO,r,t.children[s])}}return[a(0,n,r),i]}function JO(e,t,n){if(n===null)return[t,0];if(t===null)return[null,0];let r=0;function i(t,n,a){if(`key`in n)return jO(e,n.key,a,n.hash,t)===void 0?n:(r+=1,null);if(`key`in a){let i=BO(e,a.key,n,a.hash,t);return i===n?n:(r+=1,i)}else if(`children`in n&&`children`in a){let e=n.bitmap,r=a.bitmap,o=e&r,s,c=e;for(let l=1,u=0,d=0,f=e;f!==0;f&=~l,l<<=1)if(l&o){let e=i(t+CO,n.children[u],a.children[d]);s?e===null?c&=~l:s.push(e):e!==n.children[u]&&(e===null?(s=[...n.children.slice(0,u)],c&=~l):s=[...n.children.slice(0,u),e]),u++,d++}else l&e?(s&&s.push(n.children[u]),u++):l&r&&d++;return s?s.length===0?null:s.length===1?LO(s[0])??{bitmap:c,children:s}:{bitmap:c,children:s}:n}else if(`collision`in n&&`collision`in a){let t=fO(e,n.collision,a.collision);return t===null?(r+=n.collision.size,null):t.size===1?(r+=n.collision.size-1,{hash:n.hash,key:t.key,val:t.val}):t===n.collision?n:(r+=n.collision.size-t.size,{hash:n.hash,collision:t})}else if(`children`in n){let e=a.hash,r=n.bitmap,o,s;if(r===TO)o=kO(e,t),s=1<<o;else if(s=EO(e,t),r&s)o=OO(r,s);else return n;let c=n.children,l=c[o],u=i(t+CO,l,a);if(u===l)return n;if(u===null)if(c.length===2){let e=c[1-o];return LO(e)??{bitmap:r&~s,children:[e]}}else{let e=[...c.slice(0,o),...c.slice(o+1)];return{bitmap:r&~s,children:e}}else{let e=[...c];return e[o]=u,{bitmap:r,children:e}}}else{let e=n.hash,r=a,o=r.bitmap,s;if(o===TO)s=kO(e,t);else{let r=EO(e,t);if(r&o)s=OO(o,r);else return n}return i(t+CO,n,r.children[s])}}return[i(0,t,n),r]}function YO(e,t,n,r){if(r===null)return[n,0];if(n===null){let[e,t]=GO(i,!1,r);return[e,-t]}function i(e,n){return t(void 0,e,n)}let a=0;function o(n,r,s){if(`key`in r&&`key`in s)if(r.hash===s.hash){let n=e.compare(r.key,s.key);if(n===0){let e=t(r.val,s.val,r.key);return e===void 0?(a+=1,null):e===r.val?r:e===s.val?s:{hash:r.hash,key:r.key,val:e}}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,{hash:r.hash,collision:ED(n,r.key,r.val,s.key,e)})}}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,MO(n,r,{hash:s.hash,key:s.key,val:e}))}else if(`collision`in r&&`key`in s)if(r.hash===s.hash){let n=UD(e,s.key,e=>t(e,s.val,s.key),r.collision);return n===r.collision?r:n.size===1?(a+=r.collision.size-1,{hash:r.hash,key:n.key,val:n.val}):(a+=r.collision.size-n.size,{hash:r.hash,collision:n})}else{let e=t(void 0,s.val,s.key);return e===void 0?r:(--a,MO(n,r,{hash:s.hash,key:s.key,val:e}))}else if(`key`in r&&`collision`in s)if(r.hash===s.hash){let n=mO(e,t,{key:r.key,val:r.val,size:1,left:null,right:null},s.collision);return n===null?(a+=1,null):(a+=1-n.size,{hash:r.hash,collision:n})}else{let e=QD(i,!1,s.collision);return e===null?r:e.size===1?(--a,MO(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,MO(n,r,{hash:s.hash,collision:e}))}else if(`collision`in r&&`collision`in s)if(r.hash===s.hash){let n=mO(e,t,r.collision,s.collision);return n===null?(a+=r.collision.size,null):n===r.collision?r:n.size===1?(a+=r.collision.size-1,{hash:r.hash,key:n.key,val:n.val}):(a+=r.collision.size-n.size,{hash:r.hash,collision:n})}else{let e=QD(i,!1,s.collision);return e===null?r:e.size===1?(--a,MO(n,r,{hash:s.hash,key:e.key,val:e.val})):(a-=e.size,MO(n,r,{hash:s.hash,collision:e}))}else if(`children`in r&&`children`in s){let e=r.bitmap,t=s.bitmap,c=e&t,l,u=e;for(let d=1,f=0,p=0,m=e|t;m!==0;m&=~d,d<<=1)if(d&c){let e=o(n+CO,r.children[f],s.children[p]);l?e===null?u&=~d:l.push(e):e!==r.children[f]&&(e===null?(l=[...r.children.slice(0,f)],u&=~d):l=[...r.children.slice(0,f),e]),f++,p++}else if(d&e)l&&l.push(r.children[f]),f++;else if(d&t){let[e,t]=GO(i,!1,s.children[p]);e!==null&&(a-=t,u|=d,l?l.push(e):l=[...r.children.slice(0,f),e]),p++}return l?l.length===0?null:l.length===1?LO(l[0])??{bitmap:u,children:l}:{bitmap:u,children:l}:r}else if(`children`in r){let e=s,t=e.hash,c=r.bitmap,l,u;if(c===TO?(l=kO(t,n),u=1<<l):(u=EO(t,n),l=OO(c,u)),c&u){let e=r.children,t=e[l],i=o(n+CO,t,s);if(i===null)if(e.length===2){let t=e[1-l];return LO(t)??{bitmap:c&~u,children:[t]}}else{let t=[...e.slice(0,l),...e.slice(l+1)];return{bitmap:c&~u,children:t}}else if(i===t)return r;else{let t=[...e];return t[l]=i,{bitmap:c,children:t}}}else{let t=OO(c,u),[n,o]=GO(i,!1,e);if(n!==null){a-=o;let e=r.children,i=[...e.slice(0,t),n,...e.slice(t)];return{bitmap:c|u,children:i}}else return r}}else{let e=s,t=r.hash,c=EO(t,n),l=e.bitmap,u,d=l;for(let t=1,s=0,f=l|c;f!==0;f&=~t,t<<=1)if(t&l){let l;if(t&c)l=o(n+CO,r,e.children[s]);else{let t;[l,t]=GO(i,!1,e.children[s]),a-=t}u?l===null?d&=~t:u.push(l):l!==e.children[s]&&(l===null?(u=[...e.children.slice(0,s)],d&=~t):u=[...e.children.slice(0,s),l]),s++}else t&c&&(d|=t,u?u.push(r):u=[...e.children.slice(0,s),r]);return u?u.length===0?null:u.length===1?LO(u[0])??{bitmap:d,children:u}:{bitmap:d,children:u}:s}}return[o(0,n,r),a]}function XO(){return!0}var ZO=class e{static empty(){return new e(SO(),null,0)}static ofKeys(t){let n=t;return new e(n.cfg,n.root,n.size)}static from(t){let n=null,r=0,i=SO();function a(e){return e===void 0&&r++,!0}for(let e of t)n=PO(i,e,void 0,a,n);return new e(i,n,r)}static build(t,n){let r=null,i=0,a=SO();function o(e){return e===void 0&&i++,!0}for(let e of t)r=PO(a,n(e),void 0,o,r);return new e(a,r,i)}has(e){return this.root!==null&&jO(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return HO(e=>e,this.root)}entries(){return HO(e=>[e,e],this.root)}keys(){return HO(e=>e,this.root)}values(){return HO(e=>e,this.root)}forEach(e){UO((t,n)=>{e(n,n,this)},void 0,this.root)}fold(e,t){return UO((t,n)=>e(t,n),t,this.root)}toLazySeq(){let e=this.root;return Q.ofIterator(()=>HO(e=>e,e))}add(t){let[n,r]=NO(this.cfg,t,XO,this.root);return n===this.root?this:new e(this.cfg,n,this.size+ +!!r)}delete(t){let n=BO(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}union(t){let[n,r]=KO(this.cfg,XO,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size+t.size-r)}static union(...t){let n=t.filter(e=>e.size>0);if(n.length===0)return e.empty();{let t=n[0].root,r=n[0].size;for(let e=1;e<n.length;e++){let i=n[e],[a,o]=KO(i.cfg,XO,t,i.root);t=a,r+=i.size-o}return t===n[0].root?n[0]:new e(n[0].cfg,t,r)}}append(t){return this.union(e.from(t))}intersection(t){let[n,r]=qO(this.cfg,XO,this.root,t.root);return n===this.root?this:new e(this.cfg,n,r)}static intersection(...t){if(t.length===0)return e.empty();{let n=t[0].root,r=0;for(let e=1;e<t.length;e++){let i=t[e],[a,o]=qO(i.cfg,XO,n,i.root);n=a,r+=o}return n===t[0].root?t[0]:new e(t[0].cfg,n,r)}}difference(t){let[n,r]=JO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=YO(this.cfg,e=>e===void 0||void 0,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}filter(t){let[n,r]=GO((e,n)=>t(n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n,r)}transform(e){return e(this)}isSubsetOf(e){if(this.size>e.size)return!1;for(let t of this)if(!e.has(t))return!1;return!0}isSupersetOf(e){return e.isSubsetOf(this)}isDisjointFrom(e){if(this.size<=e.size){for(let t of this)if(e.has(t))return!1}else for(let t of e)if(this.has(t))return!1;return!0}constructor(e,t,n){this.cfg=e,this.root=t,this.size=n}};Object.defineProperty(ZO.prototype,"@@__IMMUTABLE_SET__@@",{value:!0});function QO(){return!0}function $O(){}var ek=class e{static empty(){return new e(zD(),null)}static ofKeys(t){let n=t;return new e(n.cfg,n.root)}static from(t){let n=zD();return new e(n,KD(n,t,e=>e,QO))}static build(t,n){let r=zD();return new e(r,KD(r,t,n,QO))}get size(){return this.root===null?0:this.root.size}has(e){return this.root!==null&&BD(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return qD(e=>e,this.root)}entries(){return qD(e=>[e,e],this.root)}keys(){return qD(e=>e,this.root)}values(){return qD(e=>e,this.root)}forEach(e){YD((t,n)=>{e(n,n,this)},void 0,this.root)}foldl(e,t){return YD((t,n)=>e(t,n),t,this.root)}foldr(e,t){return XD((t,n,r)=>e(t,r),t,this.root)}toAscLazySeq(){let e=this.root;return Q.ofIterator(()=>qD(e=>e,e))}toDescLazySeq(){let e=this.root;return Q.ofIterator(()=>JD(e=>e,e))}add(t){let n=UD(this.cfg,t,QO,this.root);return n===this.root?this:new e(this.cfg,n)}delete(t){let n=UD(this.cfg,t,$O,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=eO(t,this.root);return n===this.root?[this,new e(this.cfg,null)]:r===this.root?[new e(this.cfg,null),this]:[new e(this.cfg,n),new e(this.cfg,r)]}filter(t){let n=QD((e,n)=>t(n)?!0:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=$D(this.cfg,t,this.root);return{below:new e(this.cfg,n.below),present:n.val!==void 0,above:new e(this.cfg,n.above)}}transform(e){return e(this)}lookupMin(){if(this.root!==null)return VD(this.root)[0]}lookupMax(){if(this.root!==null)return HD(this.root)[0]}deleteMin(){if(this.root===null)return this;let t=tO(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=nO(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=tO(this.root);return{min:t.k,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=nO(this.root);return{max:t.k,rest:new e(this.cfg,t.rest)}}}indexOf(e){return aO(this.cfg,e,this.root)}getByIndex(e){return oO(e,this.root)?.[0]}take(t){let n=sO(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=cO(t,this.root);return n===this.root?this:new e(this.cfg,n)}deleteByIndex(t){let n=lO(t,$O,this.root);return n===this.root?this:new e(this.cfg,n)}union(t){let n=uO(this.cfg,QO,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}static union(...t){let n=t.filter(e=>e.size>0);if(n.length===0)return e.empty();{let t=n[0].root;for(let e=1;e<n.length;e++){let r=n[e];t=uO(r.cfg,QO,t,r.root)}return t===n[0].root?n[0]:new e(n[0].cfg,t)}}intersection(t){let n=dO(this.cfg,QO,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}static intersection(...t){if(t.length===0)return e.empty();{let n=t[0].root;for(let e=1;e<t.length;e++){let r=t[e];n=dO(r.cfg,QO,n,r.root)}return n===t[0].root?t[0]:new e(t[0].cfg,n)}}difference(t){let n=fO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=pO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}isSubsetOf(e){return rO(this.cfg,this.root,e.root)}isSupersetOf(e){return rO(this.cfg,e.root,this.root)}isDisjointFrom(e){return iO(this.cfg,this.root,e.root)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(ek.prototype,"@@__IMMUTABLE_SET__@@",{value:!0}),Object.defineProperty(ek.prototype,"@@__IMMUTABLE_ORDERED__@@",{value:!0});function tk(){}var nk=class e{static empty(){return new e(zD(),null)}static from(t,n){let r=zD();return new e(r,GD(r,t,n))}static build(t,n,r){let i=zD();return new e(i,KD(i,t,n,r))}get size(){return this.root===null?0:this.root.size}get(e){return BD(this.cfg,e,this.root)}has(e){return BD(this.cfg,e,this.root)!==void 0}[Symbol.iterator](){return qD((e,t)=>[e,t],this.root)}entries(){return qD((e,t)=>[e,t],this.root)}keys(){return qD(e=>e,this.root)}values(){return qD((e,t)=>t,this.root)}forEach(e){YD((t,n,r)=>{e(r,n,this)},void 0,this.root)}foldl(e,t){return YD(e,t,this.root)}foldr(e,t){return XD(e,t,this.root)}toAscLazySeq(){let e=this.root;return Q.ofIterator(()=>qD((e,t)=>[e,t],e))}keysToAscLazySeq(){let e=this.root;return Q.ofIterator(()=>qD(e=>e,e))}valuesToAscLazySeq(){let e=this.root;return Q.ofIterator(()=>qD((e,t)=>t,e))}toDescLazySeq(){let e=this.root;return Q.ofIterator(()=>JD((e,t)=>[e,t],e))}keysToDescLazySeq(){let e=this.root;return Q.ofIterator(()=>JD(e=>e,e))}valuesToDescLazySeq(){let e=this.root;return Q.ofIterator(()=>JD((e,t)=>t,e))}keySet(){return ek.ofKeys(this)}set(t,n){let r=UD(this.cfg,t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}alter(t,n){let r=UD(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r)}delete(t){let n=UD(this.cfg,t,tk,this.root);return n===this.root?this:new e(this.cfg,n)}partition(t){let[n,r]=eO(t,this.root);return n===this.root?[this,new e(this.cfg,null)]:r===this.root?[new e(this.cfg,null),this]:[new e(this.cfg,n),new e(this.cfg,r)]}mapValues(t){let n=ZD(t,this.root);return n===this.root?this:new e(this.cfg,n)}collectValues(t){let n=QD(t,!0,this.root);return n===this.root?this:new e(this.cfg,n)}filter(t){let n=QD((e,n)=>t(e,n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n)}split(t){let n=$D(this.cfg,t,this.root);return{below:new e(this.cfg,n.below),val:n.val,above:new e(this.cfg,n.above)}}transform(e){return e(this)}lookupMin(){if(this.root!==null)return VD(this.root)}lookupMax(){if(this.root!==null)return HD(this.root)}deleteMin(){if(this.root===null)return this;let t=tO(this.root);return new e(this.cfg,t.rest)}deleteMax(){if(this.root===null)return this;let t=nO(this.root);return new e(this.cfg,t.rest)}minView(){if(this.root!==null){let t=tO(this.root);return{minKey:t.k,minVal:t.v,rest:new e(this.cfg,t.rest)}}}maxView(){if(this.root!==null){let t=nO(this.root);return{maxKey:t.k,maxVal:t.v,rest:new e(this.cfg,t.rest)}}}indexOf(e){return aO(this.cfg,e,this.root)}getByIndex(e){return oO(e,this.root)}take(t){let n=sO(t,this.root);return n===this.root?this:new e(this.cfg,n)}drop(t){let n=cO(t,this.root);return n===this.root?this:new e(this.cfg,n)}setByIndex(t,n){let r=lO(t,()=>n,this.root);return r===this.root?this:new e(this.cfg,r)}deleteByIndex(t){let n=lO(t,tk,this.root);return n===this.root?this:new e(this.cfg,n)}alterByIndex(t,n){let r=lO(t,n,this.root);return r===this.root?this:new e(this.cfg,r)}union(t,n){let r=uO(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r)}static union(t,...n){let r=n.filter(e=>e.size>0);if(r.length===0)return e.empty();{let n=r[0].root;for(let e=1;e<r.length;e++){let i=r[e];n=uO(i.cfg,t,n,i.root)}return n===r[0].root?r[0]:new e(r[0].cfg,n)}}intersection(t,n){let r=dO(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r)}static intersection(t,...n){if(n.length===0)return e.empty();{let r=n[0].root;for(let e=1;e<n.length;e++){let i=n[e];r=dO(i.cfg,t,r,i.root)}return r===n[0].root?n[0]:new e(n[0].cfg,r)}}difference(t){let n=fO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}symmetricDifference(t){let n=pO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n)}withoutKeys(t){let n=t,r=fO(this.cfg,this.root,n.root);return r===this.root?this:new e(this.cfg,r)}adjust(t,n){let r=mO(this.cfg,n,this.root,t.root);return r===this.root?this:new e(this.cfg,r)}constructor(e,t){this.cfg=e,this.root=t}};Object.defineProperty(nk.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0}),Object.defineProperty(nk.prototype,"@@__IMMUTABLE_ORDERED__@@",{value:!0});var rk=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},ik=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},ak,Q=class e{static of(t){return new e(t)}static ofIterator(t){return new e({[Symbol.iterator](){return t()}})}static ofObject(t){return e.ofIterator(function*(){for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(yield[e,t[e]])})}static ofRange(t,n,r){let i=r||1;return i>0?e.ofIterator(function*(){for(let e=t;e<n;e+=i)yield e}):e.ofIterator(function*(){for(let e=t;e>n;e+=i)yield e})}[(ak=new WeakMap,Symbol.iterator)](){return rk(this,ak,`f`)[Symbol.iterator]()}aggregate(t,n,r){let i=new Map;for(let e of rk(this,ak,`f`)){let a=t(e),o=i.get(a);o===void 0?i.set(a,n(e)):i.set(a,r(o,n(e)))}return e.of(i)}append(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){yield*n,yield t})}chunk(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){let e=[];for(let r of n)e.push(r),e.length===t&&(yield e,e=[]);e.length>0&&(yield e)})}concat(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){yield*n,yield*t})}distinct(){let t=rk(this,ak,`f`);return e.ofIterator(function*(){let e=new Set;for(let n of t)e.has(n)||(e.add(n),yield n)})}distinctBy(t,...n){n.unshift(t);let r=rk(this,ak,`f`),i={hash:e=>xO(...n.map(t=>t(e))),compare:ND(...n)};return e.ofIterator(function*(){let e=null,t=!1;function n(e){return t=e===void 0,!0}for(let a of r)e=PO(i,a,!0,n,e),t&&(yield a)})}distinctAndSortBy(t,...n){n.unshift(t);let r={compare:ND(...n)},i=null;function a(e,t){return e===void 0?t:e}for(let e of rk(this,ak,`f`))i=WD(r,e,e,a,i);return e.ofIterator(()=>qD(e=>e,i))}drop(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)e>=t?yield r:e+=1})}dropWhile(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){let e=!0;for(let r of n)e?t(r)||(e=!1,yield r):yield r})}filter(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){for(let e of n)t(e)&&(yield e)})}flatMap(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){for(let e of n)yield*t(e)})}groupBy(t,...n){n.unshift(t);let r={hash:e=>xO(...n.map(t=>t(e))),compare:ND(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of rk(this,ak,`f`))i=PO(r,e,e,a,i);return e.ofIterator(()=>HO((e,t)=>n.length===1?[n[0](e),t]:[n.map(t=>t(e)),t],i))}orderedGroupBy(t,...n){n.unshift(t);let r={compare:ND(...n)},i=null;function a(e,t){return e===void 0?[t]:(e.push(t),e)}for(let e of rk(this,ak,`f`))i=WD(r,e,e,a,i);return e.ofIterator(()=>qD((e,t)=>n.length===1?[MD(n[0],e),t]:[n.map(t=>MD(t,e)),t],i))}map(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){let e=0;for(let r of n)yield t(r,e),e+=1})}collect(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){for(let e of n){let n=t(e);n!=null&&(yield n)}})}prepend(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){yield t,yield*n})}prependAll(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){yield*t,yield*n})}sortWith(t){return e.of(Array.from(rk(this,ak,`f`)).sort(t))}sortBy(t,...n){return e.of(Array.from(rk(this,ak,`f`)).sort(ND(t,...n)))}tail(){let t=rk(this,ak,`f`);return e.ofIterator(function*(){let e=!1;for(let n of t)e?yield n:e=!0})}take(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){let e=0;for(let r of n){if(e>=t)return;yield r,e+=1}})}takeWhile(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){for(let e of n)if(t(e))yield e;else return})}zip(t){let n=rk(this,ak,`f`);return e.ofIterator(function*(){let e=n[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){let t=e.next(),n=r.next();if(t.done||n.done)return;yield[t.value,n.value]}})}every(e){for(let t of rk(this,ak,`f`))if(!e(t))return!1;return!0}some(e){for(let t of rk(this,ak,`f`))if(e(t))return!0;return!1}isEmpty(){return rk(this,ak,`f`)[Symbol.iterator]().next().done===!0}find(e){for(let t of rk(this,ak,`f`))if(e(t))return t}head(){let e=rk(this,ak,`f`)[Symbol.iterator]().next();if(!e.done)return e.value}length(){let e=0;for(let t of rk(this,ak,`f`))e+=1;return e}maxBy(e,...t){let n=ND(e,...t),r;for(let e of rk(this,ak,`f`))(r===void 0||n(r,e)<=0)&&(r=e);return r}minBy(e,...t){let n=ND(e,...t),r;for(let e of rk(this,ak,`f`))(r===void 0||n(r,e)>=0)&&(r=e);return r}sumBy(e){let t=0;for(let n of rk(this,ak,`f`))t+=e(n);return t}toRArray(){return Array.from(rk(this,ak,`f`))}toMutableArray(){return Array.from(rk(this,ak,`f`))}toSortedArray(e,...t){return Array.from(rk(this,ak,`f`)).sort(ND(e,...t))}toHashMap(e,t){return ok.from(this.map(e),t)}buildHashMap(e,t){return ok.build(rk(this,ak,`f`),e,t)}toOrderedMap(e,t){return nk.from(this.map(e),t)}buildOrderedMap(e,t){return nk.build(rk(this,ak,`f`),e,t)}toRMap(e,t){return this.toMutableMap(e,t)}toMutableMap(e,t){let n=new Map;for(let r of rk(this,ak,`f`)){let[i,a]=e(r);if(t!==void 0){let e=n.get(i);e?n.set(i,t(e,a)):n.set(i,a)}else n.set(i,a)}return n}toObject(e,t){let n={};for(let r of rk(this,ak,`f`)){let[i,a]=e(r);if(t!==void 0){let e=n[i];e?n[i]=t(e,a):n[i]=a}else n[i]=a}return n}toHashSet(e){return ZO.build(rk(this,ak,`f`),e)}toOrderedSet(e){return ek.build(rk(this,ak,`f`),e)}toRSet(e){return this.toMutableSet(e)}toMutableSet(e){let t=new Set;for(let n of rk(this,ak,`f`))t.add(e(n));return t}fold(e,t){let n=e;for(let e of rk(this,ak,`f`))n=t(n,e);return n}reduce(e,t){if(t===void 0){let t=!0,n;for(let r of rk(this,ak,`f`))t?(t=!1,n=r):n=e(n,r);if(t)throw Error(`Empty sequence`);return n}else return this.fold(t,e)}transform(e){return e(this)}toLookup(e,t){let n;return n=t===void 0?(e,t)=>e===void 0?[t]:(e.push(t),e):(e,n)=>e===void 0?[t(n)]:(e.push(t(n)),e),ok.build(rk(this,ak,`f`),e,n)}toOrderedLookup(e,t){let n;return n=t===void 0?(e,t)=>e===void 0?[t]:(e.push(t),e):(e,n)=>e===void 0?[t(n)]:(e.push(t(n)),e),nk.build(rk(this,ak,`f`),e,n)}toLookupMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??ok.empty()).set(t(n),n):r===void 0?(e,r)=>(e??ok.empty()).set(t(r),n(r)):(e,i)=>(e??ok.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),ok.build(rk(this,ak,`f`),e,i)}toLookupOrderedMap(e,t,n,r){let i;return i=n===void 0?(e,n)=>(e??nk.empty()).set(t(n),n):r===void 0?(e,r)=>(e??nk.empty()).set(t(r),n(r)):(e,i)=>(e??nk.empty()).alter(t(i),e=>e===void 0?n(i):r(e,n(i))),nk.build(rk(this,ak,`f`),e,i)}toRLookup(e,t){let n=new Map;for(let r of rk(this,ak,`f`)){let i=e(r),a=t===void 0?r:t(r),o=n.get(i);o===void 0?n.set(i,[a]):o.push(a)}return n}constructor(e){ak.set(this,void 0),ik(this,ak,e,`f`)}},ok=class e{static empty(){return new e(SO(),null,0)}static from(t,n){let r=SO(),[i,a]=FO(r,t,n);return new e(r,i,a)}static build(t,n,r){let i=SO(),[a,o]=IO(i,t,n,r);return new e(i,a,o)}get(e){if(this.root!==null)return jO(this.cfg,e,this.root)}has(e){return this.get(e)!==void 0}[Symbol.iterator](){return HO((e,t)=>[e,t],this.root)}entries(){return HO((e,t)=>[e,t],this.root)}keys(){return HO(e=>e,this.root)}values(){return HO((e,t)=>t,this.root)}forEach(e){UO((t,n,r)=>{e(r,n,this)},void 0,this.root)}fold(e,t){return UO(e,t,this.root)}toLazySeq(){let e=this.root;return Q.ofIterator(()=>HO((e,t)=>[e,t],e))}keysToLazySeq(){let e=this.root;return Q.ofIterator(()=>HO(e=>e,e))}valuesToLazySeq(){let e=this.root;return Q.ofIterator(()=>HO((e,t)=>t,e))}keySet(){return ZO.ofKeys(this)}set(e,t){return this.modify(e,()=>t)}modify(t,n){let[r,i]=NO(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+ +!!i)}delete(t){let n=BO(this.cfg,t,this.root);return n===this.root?this:new e(this.cfg,n,this.size-1)}alter(t,n){let[r,i]=VO(this.cfg,t,n,this.root);return r===this.root?this:new e(this.cfg,r,this.size+i)}mapValues(t){let n=WO(t,this.root);return n===this.root?this:new e(this.cfg,n,this.size)}collectValues(t){let[n,r]=GO(t,!0,this.root);return n===this.root?this:new e(this.cfg,n,r)}filter(t){let[n,r]=GO((e,n)=>t(e,n)?e:void 0,!1,this.root);return n===this.root?this:new e(this.cfg,n,r)}transform(e){return e(this)}union(t,n){let[r,i]=KO(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r,this.size+t.size-i)}static union(t,...n){let r=n.filter(e=>e.size>0);if(r.length===0)return e.empty();{let n=r[0].root,i=r[0].size;for(let e=1;e<r.length;e++){let a=r[e],[o,s]=KO(a.cfg,t,n,a.root);n=o,i+=a.size-s}return n===r[0].root?r[0]:new e(r[0].cfg,n,i)}}append(t){return this.union(e.from(t))}intersection(t,n){let[r,i]=qO(this.cfg,n??((e,t)=>t),this.root,t.root);return r===this.root?this:new e(this.cfg,r,i)}static intersection(t,...n){if(n.length===0)return e.empty();{let r=n[0].root,i=0;for(let e=1;e<n.length;e++){let a=n[e],[o,s]=qO(a.cfg,t,r,a.root);r=o,i+=s}return r===n[0].root?n[0]:new e(n[0].cfg,r,i)}}difference(t){let[n,r]=JO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}symmetricDifference(t){let[n,r]=YO(this.cfg,(e,t)=>e===void 0?t:void 0,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}withoutKeys(t){let[n,r]=JO(this.cfg,this.root,t.root);return n===this.root?this:new e(this.cfg,n,this.size-r)}adjust(t,n){let[r,i]=YO(this.cfg,n,this.root,t.root);return r===this.root?this:new e(this.cfg,r,this.size-i)}constructor(e,t,n){this.cfg=e,this.root=t,this.size=n}};Object.defineProperty(ok.prototype,"@@__IMMUTABLE_KEYED__@@",{value:!0});function sk(e,t){let n=null,r=new Map,i=new Set;function a(i){let s;if(t===void 0)s=r.get(i);else for(let[e,n]of r)if(t(e,i)){s=n;break}if(s!==void 0)if(n?.(s[1],i))a.remove(i);else return s[0];let c=e(i);return r.set(i,[c,Date.now()]),o(`CREATE`,i,c),c}function o(e,t,n){for(let r of i)r({type:e,param:t,atom:n})}return a.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),a.getParams=()=>r.keys(),a.remove=e=>{if(t===void 0){if(!r.has(e))return;let[t]=r.get(e);r.delete(e),o(`REMOVE`,e,t)}else for(let[n,[i]]of r)if(t(n,e)){r.delete(n),o(`REMOVE`,n,i);break}},a.setShouldRemove=e=>{if(n=e,n)for(let[e,[t,i]]of r)n(i,e)&&(r.delete(e),o(`REMOVE`,e,t))},a}var ck=P(ok.empty()),lk=ck,uk=P(ZO.empty()),dk=uk,fk=P(ok.empty()),pk=fk;function mk(e,t){if(e.size===0)return t;let n={...t,jobs:{...t.jobs},stationUse:t.stationUse.filter(t=>!e.has(t.scheduleId))};for(let[r,i]of Object.entries(t.jobs))i.scheduleId&&e.has(i.scheduleId)&&delete n.jobs[r];return n}var hk=P(null,(e,t,n)=>{t(ck,e=>e.union(Q.ofObject(n.jobs).toHashMap(e=>e))),t(uk,e=>e.union(Q.ofObject(n.jobs).collect(([,e])=>e.scheduleId).toHashSet(e=>e)))}),gk=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.scheduleId,a=Q.of(n.newJobs.jobs);t(ck,e=>{if(i){let t=RE(r,-30);e=e.filter(e=>e.routeStartUTC>=t)}return e.union(a.toHashMap(e=>{let t=new Ze({...e,copiedToSystem:!0});return[e.unique,t]}))}),e&&t(uk,t=>t.add(e))}}),_k=P(null,(e,t,n)=>{t(fk,Q.ofObject(n.jobs).toHashMap(e=>e))}),vk=sk(e=>P(t=>t(lk).get(e)?.comment??null,(t,n,r)=>{let i=r===null?``:r;n(ck,t=>{let n=t.get(e);return n===void 0?t:t.set(e,{...n,comment:i??void 0})})})),yk=Symbol(``);function bk(e){let t=Symbol(),n=P(t),r=P((r,i)=>{let a=r(n);return a===t?e(r,i):a},(e,i,a)=>{let o=typeof a==`function`?a(e(r)):a;i(n,o===yk?t:o)});return r}var xk=e=>typeof e?.then==`function`;function Sk(e=()=>{try{return window.localStorage}catch{return}},t){let n,r,i={getItem:(i,a)=>{let o=e=>{if(e||=``,n!==e){try{r=JSON.parse(e,t?.reviver)}catch{return a}n=e}return r},s=e()?.getItem(i)??null;return xk(s)?s.then(o):o(s)},setItem:(n,r)=>e()?.setItem(n,JSON.stringify(r,t?.replacer)),removeItem:t=>e()?.removeItem(t)},a=e=>(n,r,i)=>e(n,e=>{let n;try{n=JSON.parse(e||``,t?.reviver)}catch{n=i}r(n)}),o;try{o=e()?.subscribe}catch{}return!o&&typeof window<`u`&&typeof window.addEventListener==`function`&&window.Storage&&(o=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener(`storage`,r),()=>{window.removeEventListener(`storage`,r)}}),o&&(i.subscribe=a(o)),i}var Ck=Sk();function wk(e,t,n=Ck,r){let i=P(r?.getOnInit?n.getItem(e,t):t);return i.onMount=r=>(r(n.getItem(e,t)),n.subscribe?.call(n,e,r,t)),P(e=>e(i),(r,a,o)=>{let s=typeof o==`function`?o(r(i)):o;return s===yk?(a(i,t),n.removeItem(e)):xk(s)?s.then(t=>(a(i,t),n.setItem(e,t))):(a(i,s),n.setItem(e,s))})}var Tk=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),Ek=new WeakMap,Dk=(e,t,n)=>Tk(e,Tk(()=>new WeakMap,Ek,t),n),Ok=e=>typeof e?.then==`function`,kk=()=>void 0;function Ak(e,t=kk){return Dk(()=>{let n=new WeakMap,r=new WeakMap,i=P(0),a=P([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])};let o=P(s=>{s(i);let c;try{c=s(o)}catch{}let l=s(e);if(!Ok(l))return{v:l};if(l!==c?.p&&l.then(e=>{r.set(l,e);let[t]=s(a);t()},e=>{n.set(l,e);let[t]=s(a);t()}),n.has(l))throw n.get(l);return r.has(l)?{p:l,v:r.get(l)}:c&&`v`in c?{p:l,f:t(c.v),v:c.v}:{p:l,f:t()}});return o.init=void 0,P(e=>{let t=e(o);return`f`in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,t)}var jk=wk(`current-operator`,null),Mk=wk(`operators`,[]),Nk=P(e=>{let t=e(jk),n=e(vr);return n.user?n.user.profile.name||n.user.profile.sub||null:t},(e,t,n)=>{t(jk,n)}),Pk=P({timeOfCurrentStatusUTC:new Date,jobs:{},pallets:{},material:[],alarms:[],queues:{}}),Fk=Pk,Ik=P(Math.floor(Date.now()/1e3));Ik.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/1e3))},1e3);return()=>clearInterval(t)};var Lk=P(null,(e,t,n,r)=>{let i=r===null?``:r;t(Pk,e=>{let t=e.jobs[n];if(t){let r=new Qe(t);return r.comment=i,{...e,jobs:{...e.jobs,[n]:r}}}else return e}),t(vk(n),i),Vt.setJobComment(n,i)}),Rk=P(null,(e,t,{workorder:n,comment:r})=>{let i=e(Nk);t(Pk,e=>e.workorders?{...e,workorders:e.workorders.map(e=>e.workorderId===n?new ut({...e,comments:[...e.comments??[],new dt({comment:r,timeUTC:new Date})]}):e)}:e),Ht.recordWorkorderComment(n,i,r)}),zk=P(null,(e,t,n)=>t(Pk,n)),Bk=P(null,(e,t,{evt:n})=>{n.logEntry?t(Pk,Vk(n.logEntry)):n.newCurrentStatus&&t(Pk,n.newCurrentStatus)});function Vk(e){return t=>{let n=new Map;function r(e,r){if(n.size===0)for(let e of t.material)n.set(e.materialID,e);let i=n.get(e);i!==void 0&&n.set(e,new rt(r(i)))}switch(e.type){case V.PartMark:for(let t of e.material)r(t.id,t=>({...t,serial:e.result}));break;case V.OrderAssignment:for(let t of e.material)r(t.id,t=>({...t,workorderId:e.result}));break;case V.Inspection:case V.InspectionForce:if(e.result.toLowerCase()===`true`||e.result===`1`){let t;if(t=e.type===V.InspectionForce?e.program:(e.details||{}).InspectionType,t)for(let n of e.material)r(n.id,e=>({...e,signaledInspections:[...e.signaledInspections,t]}))}break}return n.size===0?t:{...t,material:Array.from(n.values())}}}var Hk=P(null,(e,t,{queue:n,matId:r,newIdx:i})=>{t(Pk,e=>{let t=e.material.find(e=>e.materialID===r);if(!t||t.location.type!==at.InQueue||t.location.currentQueue===n&&t.location.queuePosition===i)return e;let a=t.location.currentQueue,o=t.location.queuePosition;if(o===void 0||a===void 0)return e;let s=e.material.map(e=>{if(e.location.type!==at.InQueue||e.location.queuePosition===void 0||e.location.currentQueue===void 0)return e;if(e.materialID===r)return new rt({...e,location:new it({...e.location,type:at.InQueue,currentQueue:n,queuePosition:i})});let t=e.location.queuePosition;return e.location.currentQueue===a&&e.location.queuePosition>o&&--t,e.location.currentQueue===n&&t>=i&&(t+=1),t===e.location.queuePosition?e:new rt({...e,location:new it({...e.location,queuePosition:t})})});return{...e,material:s}})}),Uk=RegExp(`P(-?\\d+(?:[\\.,]\\d+)?Y)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?D)?(?:T(-?\\d+(?:[\\.,]\\d+)?H)?(-?\\d+(?:[\\.,]\\d+)?M)?(-?\\d+(?:[\\.,]\\d+)?S)?)?`);function Wk(e){let t=Uk.exec(e);if(!t||!t[1]&&!t[2]&&!t[3]&&!t[4]&&!t[5]&&!t[6])return null;let n={};return t[1]&&(n.years=parseFloat(t[1])),t[2]&&(n.months=parseFloat(t[2])),t[3]&&(n.days=parseFloat(t[3])),t[4]&&(n.hours=parseFloat(t[4])),t[5]&&(n.minutes=parseFloat(t[5])),t[6]&&(n.seconds=parseFloat(t[6])),n}function Gk(e){let t=Wk(e);return t?((((t.years??0)*365+(t.months??0)*30+(t.days??0))*24+(t.hours??0))*60+(t.minutes??0))*60+(t.seconds??0):0}function Kk(e){return Gk(e)/60}var qk=class e{constructor(e,t,n){this.part=e,this.statGroup=t,this.operation=n}static ofLogCycle(t){return new e(t.material[0].part,t.loc,(t.type===V.LoadUnloadCycle||t.type===V.BasketLoadUnload)&&t.material.length>0?t.result+`-`+t.material[0].proc.toString():t.program)}static ofPartCycle(t){return new e(t.part,t.stationGroup,t.carrier.kind!==`machining`&&t.material.length>0?t.operation+`-`+t.material[0].proc.toString():t.operation)}compare(e){let t=this.part.localeCompare(e.part);return t!==0||(t=this.statGroup.localeCompare(e.statGroup),t!==0)?t:this.operation.localeCompare(e.operation)}hash(){return xO(this.part,this.statGroup,this.operation)}toString(){return`{part: ${this.part}}, statGroup: ${this.statGroup}, operation: ${this.operation}}`}},Jk=P(ok.empty()),Yk=Jk,Xk=P(ok.empty()),Zk=Xk;function Qk(e,t){return e.medianMinutesForSingleMat===0?!1:t<e.medianMinutesForSingleMat?(e.medianMinutesForSingleMat-t)/e.MAD_belowMinutes>2:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function $k(e,t){return e.medianMinutesForSingleMat===0||t<e.medianMinutesForSingleMat?!1:(t-e.medianMinutesForSingleMat)/e.MAD_aboveMinutes>2}function eA(e){let t=e.toSortedArray(e=>e);if(t.length===0)return 0;let n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function tA(e){let t=eA(Q.of(e)),n=1.4826*eA(Q.of(e).filter(e=>e<=t).map(e=>t-e));n<.25&&(n=.25);let r=1.4826*eA(Q.of(e).filter(e=>e>=t).map(e=>e-t));r<.25&&(r=.25);let i={medianMinutesForSingleMat:t,MAD_belowMinutes:n,MAD_aboveMinutes:r,expectedCycleMinutesForSingleMat:0},a=Q.of(e).filter(e=>!Qk(i,e)).toRArray(),o=a.reduce((e,t)=>e+t,0)/a.length;return{...i,expectedCycleMinutesForSingleMat:o}}function nA(e,t,n){return e.toLookupOrderedMap(t,n,e=>[e],(e,t)=>e.concat(t)).toAscLazySeq().map(([e,t])=>{let r=[],i=[];for(let e of t.valuesToAscLazySeq().flatMap(e=>e))i.length===0?i=[e]:oD(n(e),n(i[i.length-1]))<10?i.push(e):(r.push(i),i=[e]);return i.length>0&&r.push(i),[e,r]})}function rA(e,t,n){let r=0,i=0,a=!0;for(let t of e)n(t)<0&&(a=!1),i+=t.material.length,r+=n(t);return a&&r>0?e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)*n(e)/r/e.material.length})):i>0?e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)/i})):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:t(e)}))}function iA(e){let t=new Set;for(let n of e)if(n.type===V.PalletCycle&&n.material.length>0)for(let e of n.material)t.add(e.id);return nA(Q.of(e).filter(e=>(e.type===V.LoadUnloadCycle||e.type===V.BasketLoadUnload||e.type===V.MachineCycle)&&!e.startofcycle&&e.loc!==``&&e.material.length>0),e=>e.loc+` #`+e.locnum.toString(),e=>e.endUTC).flatMap(([e,t])=>t).flatMap(e=>{let n=Kk(e[0].elapsed);return e.length>=2&&e.every(e=>Kk(e.elapsed)===n&&e.material.every(e=>!t.has(e.id)))?rA(e,e=>Kk(e.elapsed),e=>e.active===``?-1:Kk(e.active)):e.map(e=>({cycle:e,elapsedForSingleMaterialMinutes:e.material.length>0?Kk(e.elapsed)/e.material.length:0}))})}function aA(e){return iA(e).toLookup(e=>qk.ofLogCycle(e.cycle),e=>e.elapsedForSingleMaterialMinutes).mapValues(tA)}var oA=P(null,(e,t,n)=>{t(Jk,e=>e.size===0?aA(n):e)}),sA=P(null,(e,t,n)=>{t(Xk,aA(n))});function cA(e){return e.carrier.kind!==`machining`}function lA(e){return e.carrier.kind===`machining`}function uA(e){return e.carrier.kind===`pallet-lul`}function dA(e){return e.carrier.kind===`basket-lul`}function fA(e){return e.carrier.kind===`basket-lul`?void 0:e.carrier.pallet}function pA(e){return e.carrier.kind===`basket-lul`?e.carrier.basket:void 0}function mA(e,t){return e.startsWith(`Inspect`)?e:e+` #`+t.toString()}function hA(e,t){let n=t?.[e.toString()];return n&&n.trim().length>0?n:`L/U #${e}`}function gA(e,t,n){return e===`L/U`?hA(t,n):mA(e,t)}function _A(e){return e&&e.trim().length>0?e:`Basket`}function vA(e,t=`Basket`){switch(e.carrier.kind){case`machining`:case`pallet-lul`:return`Pallet ${e.carrier.pallet}`;case`basket-lul`:return`${t} ${e.carrier.basket}`}}function yA(e){switch(e.carrier.kind){case`machining`:case`pallet-lul`:return e.carrier.pallet;case`basket-lul`:return e.carrier.basket+1e6}}function bA(e){return e.valuesToLazySeq().some(e=>e.carrier.kind===`basket-lul`)}var xA=P(ok.empty()),SA=xA,CA=P(e=>bA(e(xA))),wA=P(ok.empty()),TA=wA,EA=P(e=>bA(e(wA)));function DA(e,t,n,r){if(t.startofcycle||t.type!==V.LoadUnloadCycle&&t.type!==V.BasketLoadUnload&&t.type!==V.MachineCycle||t.loc===``)return null;let i=t.type===V.MachineCycle?{kind:`machining`,pallet:t.pal}:t.type===V.LoadUnloadCycle?{kind:`pallet-lul`,pallet:t.pal}:{kind:`basket-lul`,basket:t.pal},a=Kk(t.active);if(i.kind===`basket-lul`&&n<=0&&a<=0)return null;let o=t.material.length>0?t.material[0].part:``,s=t.material.length>0?e.get(qk.ofLogCycle(t)):void 0,c=a;return(t.active===``||c<=0||t.material.length==0)&&(c=(s?.expectedCycleMinutesForSingleMat??0)*t.material.length),{endTime:t.endUTC,elapsedMinsPerMaterial:n,cntr:t.counter,activeMinutes:c,medianCycleMinutes:(s?.medianMinutesForSingleMat??0)*t.material.length,MAD_aboveMinutes:s?.MAD_aboveMinutes??0,part:o,carrier:i,material:t.material,isOutlier:s?Qk(s,n):!1,stationGroup:t.loc,stationNumber:t.locnum,stationLabel:gA(t.loc,t.locnum,r),operation:i.kind===`machining`?t.program:t.result,operator:t.details&&t.details.operator||``}}function OA(e,t,n){return iA(t).collect(t=>DA(e,t.cycle,t.elapsedForSingleMaterialMinutes,n)).buildHashMap(e=>e.cntr)}function kA(e,t){for(let n of e.editedEvents){let e=t.get(n.counter);if(e!==void 0){let r={...e,material:n.material};t=t.set(n.counter,r)}}return t}var AA=P(null,(e,t,n)=>{let r=e(Yk),i=e(vr)?.loadStationNames;t(xA,e=>e.union(OA(r,n,i)))}),jA=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&n.logEntry.type===V.InvalidateCycle){let e=n.logEntry.details?.EditedCounters,r=e?new Set(e.split(`,`).map(e=>parseInt(e))):new Set;r.size>0&&t(xA,e=>{for(let t of r){let n=e.get(t);n!==void 0&&(e=e.set(t,{...n,activeMinutes:0}))}return e})}else if(n.logEntry){let a=e(Yk),o=n.logEntry.material.length>0?Kk(n.logEntry.elapsed)/n.logEntry.material.length:0,s=e(vr)?.loadStationNames,c=DA(a,n.logEntry,o,s);if(!c)return;t(xA,e=>{if(i){let t=RE(r,-30);e=e.filter(e=>e.endTime>=t)}return e=e.set(c.cntr,c),e})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(xA,t=>kA(e,t))}}),MA=P(null,(e,t,n)=>{let r=e(Zk),i=e(vr)?.loadStationNames;t(wA,OA(r,n,i))}),NA=Object.create,PA=Object.defineProperty,FA=Object.getOwnPropertyDescriptor,IA=Object.getOwnPropertyNames,LA=Object.getPrototypeOf,RA=Object.prototype.hasOwnProperty,zA=(e,t)=>function(){return t||(0,e[IA(e)[0]])((t={exports:{}}).exports,t),t.exports},BA=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of IA(t))!RA.call(e,i)&&i!==n&&PA(e,i,{get:()=>t[i],enumerable:!(r=FA(t,i))||r.enumerable});return e},VA=((e,t,n)=>(n=e==null?{}:NA(LA(e)),BA(t||!e||!e.__esModule?PA(n,`default`,{value:e,enumerable:!0}):n,e)))(zA({"node_modules/toggle-selection/index.js"(e,t){t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}}})(),1).default,HA=`Copy to clipboard: #{key}, Enter`;function UA(e){var t=((navigator.userAgentData?/mac/i.test(navigator.userAgentData.platform):/mac os x/i.test(navigator.userAgent))?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function WA(e,t){var n={};return n[`text/plain`]=new Blob([e],{type:`text/plain`}),t&&t!==`text/plain`&&(n[t]=new Blob([e],{type:t})),new ClipboardItem(n)}async function GA(e,t){if(!t.format&&!t.onCopy)return await navigator.clipboard.writeText(e),!0;var n=WA(e,t.format);return t.onCopy&&(n=t.onCopy(n)||n),await navigator.clipboard.write([n]),!0}function KA(e,t){var n=document.createElement(`span`);return n.textContent=e,n.ariaHidden=`true`,n.style.all=`unset`,n.style.position=`fixed`,n.style.top=`0`,n.style.clip=`rect(0, 0, 0, 0)`,n.style.whiteSpace=`pre`,n.style.webkitUserSelect=`text`,n.style.MozUserSelect=`text`,n.style.msUserSelect=`text`,n.style.userSelect=`text`,n.addEventListener(`copy`,function(n){n.stopPropagation(),t.format&&(n.preventDefault(),n.clipboardData&&n.clipboardData.setData(t.format,e)),t.onCopy&&n.clipboardData&&t.onCopy(n.clipboardData)}),n}function qA(){let e=document.activeElement;for(;e;){if(e.tagName===`DIALOG`&&e.open)return e;e=e.parentElement}return null}function JA(e,t){var n=VA(),r=document.createRange(),i=document.getSelection(),a=KA(e,t),o=qA()||document.fullscreenElement||document.body,s=!1;try{if(o.appendChild(a),r.selectNodeContents(a),i.removeAllRanges(),i.addRange(r),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);s=!0}finally{typeof i.removeRange==`function`?i.removeRange(r):i.removeAllRanges(),o.removeChild(a),n()}return s}async function YA(e,t={}){var n=t.debug||!1;if(window.isSecureContext&&navigator.clipboard)try{return await GA(e,t)}catch(e){n&&console.error(`unable to copy using navigator.clipboard: `,e),n&&console.warn(`falling back to execCommand`)}else n&&!window.isSecureContext&&console.warn(`copy-to-clipboard: navigator.clipboard requires a secure context (HTTPS/localhost). Falling back to execCommand.`);try{return JA(e,t)}catch(i){if(n&&console.error(`unable to copy using execCommand: `,i),n&&console.error(`falling back to prompt`),t.fallbackToPrompt){var r=UA(`message`in t?t.message:HA);window.prompt(r,e)}}return!1}var XA=YA;function ZA(e,t){return!t&&e===`Basket`?`Any`:e}function QA(e,t){let n=ek.empty(),r=ek.empty(),i=ek.empty(),a=nk.empty(),o=ek.empty(),s=!1;for(let c of e){let e=fA(c);e!==void 0&&(n=n.add(e)),s||=dA(c),cA(c)?r=r.add(c.stationLabel):(i=i.add(c.stationLabel),t&&c.part==t.part&&c.material.some(e=>e.proc===t.proc)&&(o=o.add(qk.ofPartCycle(c))));for(let e of c.material)a=a.alter(e.part,t=>(t??ek.empty()).add(e.proc))}return{allPalletNames:n.toAscLazySeq().toRArray(),allLoadStationNames:r.toAscLazySeq().toRArray(),allMachineNames:i.toAscLazySeq().toRArray(),allPartAndProcNames:a.toAscLazySeq().flatMap(([e,t])=>t.toAscLazySeq().map(t=>({part:e,proc:t}))).toRArray(),allMachineOperations:o.toAscLazySeq().toRArray(),hasBasketCycles:s}}var $A=`@@@_FMSInsight_FilterAnyMachineKey_@@@`,ej=`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;function tj(e){return{...QA(e),seriesLabel:`Station`,data:new Map}}function nj(e,{zoom:t,partAndProc:n,pallet:r,station:i,operation:a,carrierKind:o}){let s=n&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`,c=r&&!a&&i&&i!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`&&i!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`;return{...QA(e,n),seriesLabel:s?`Carrier`:c?`Part`:`Station`,data:Q.of(e).filter(e=>{if(t&&(e.endTime<t.start||e.endTime>t.end)||n&&(e.part!==n.part||!e.material.some(e=>e.proc===n.proc))||r&&fA(e)!==r||o===`Pallet`&&pA(e)!==void 0||o===`Basket`&&pA(e)===void 0)return!1;if(i===`@@@_FMSInsight_FilterAnyMachineKey_@@@`){if(cA(e))return!1}else if(i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`){if(!cA(e))return!1}else if(i&&e.stationLabel!==i)return!1;return!(a&&a.compare(qk.ofPartCycle(e))!==0)}).toRLookup(e=>s?vA(e):c?e.part+`-`+Q.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`):e.stationLabel,e=>({...e,x:e.endTime,y:e.elapsedMinsPerMaterial*e.material.length}))}}function rj(e,{zoom:t,partAndProc:n,pallet:r,station:i,carrierKind:a}){let o=Q.of(e).filter(e=>a===`Pallet`&&pA(e)!==void 0||a===`Basket`&&pA(e)===void 0?!1:!i||i===`@@@_FMSInsigt_FilterAnyLoadKey_@@@`?cA(e):cA(e)&&e.stationLabel===i);return{...QA(e,n),seriesLabel:`Station`,data:nA(o,e=>e.stationLabel,e=>e.endTime).map(([e,i])=>[e,Q.of(i).collect(e=>{let i=e.find(e=>!(t&&(e.endTime<t.start||e.endTime>t.end)||n&&(e.part!==n.part||!e.material.some(e=>e.proc===n.proc))||r&&fA(e)!==r));return i?{...i,x:i.endTime,y:e.reduce((e,t)=>e+t.elapsedMinsPerMaterial*t.material.length,0),operations:Q.of(e).flatMap(e=>e.material.map(t=>({mat:t,operation:e.operation}))).toRArray()}:null}).toRArray()]).filter(([,e])=>e.length>0).toRMap(e=>e)}}function ij(e,t){let n=null;for(let[,r]of e.data)for(let e of r)if(e.material.length>0&&(n===null||n.time<e.x)){let r=t?e.activeMinutes/e.material.length:e.activeMinutes;n={time:e.x,mins:r}}return n?.mins}function aj(e){return nA(e,e=>e.stationLabel,e=>e.endTime).flatMap(function*([e,t]){for(let n of t){let t=Q.of(n).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=XE(n[0].endTime,-t*60),i=Q.of(n).sumBy(e=>e.activeMinutes);yield{station:e,startTime:r,endActive:i>0?YE(r,i):void 0,endOccupied:n[0].endTime,outlier:n.some(e=>e.isOutlier),parts:Q.of(n).flatMap(e=>Q.of(e.material).distinctBy(e=>e.proc).map(t=>({part:e.part,proc:t.proc,oper:e.operation}))).distinctAndSortBy(e=>e.part,e=>e.proc,e=>e.oper).map(e=>({part:e.part+`-`+e.proc.toString(),oper:e.oper})).toRArray()}}}).toRArray()}function oj(e,t){let n=[],r=new Set,i=new Set,a=new Set;for(let n of e.material){let e=t.get(n.id);if(e!==void 0){for(let t of e.signaledInspections)r.add(t);for(let[t,n]of Q.ofObject(e.completedInspections??{}))r.add(t),i.add(t),n.success&&a.add(t)}}for(let e of Q.of(r).toSortedArray(e=>e))i.has(e)?n.push(e+`[`+(a.has(e)?`success`:`failed`)+`]`):n.push(e);return n.join(`, `)}function sj(e,t,n,r,i,a,o){let s=`<table>
|
|
245
|
-
<thead><tr>`;s+=`<th>Date</th><th>Part</th><th>Station</th><th>Carrier</th>`,s+=`<th>Serial</th><th>Workorder</th><th>Inspection</th>`,s+=`<th>Elapsed Min</th><th>Target Min</th>`,i||(s+=`<th>Median Elapsed Min</th><th>Median Deviation</th>`),s+=`</tr></thead>
|
|
246
|
-
<tbody>
|
|
247
|
-
`;let c=Q.of(e.data).flatMap(([e,t])=>t).filter(e=>(!n||e.endTime>=n)&&(!r||e.endTime<r)).toSortedArray(e=>e.endTime.getTime());for(let e of c)s+=`<tr>`,s+=`<td>`+e.endTime.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,s+=`<td>`+e.part+`-`+Q.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)+`</td>`,s+=`<td>`+gA(e.stationGroup,e.stationNumber,a)+`</td>`,s+=`<td>`+vA(e,_A(o))+`</td>`,s+=`<td>`+e.material.filter(e=>e.serial).map(e=>e.serial).join(`,`)+`</td>`,s+=`<td>`+e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`,`)+`</td>`,s+=`<td>`+oj(e,t)+`</td>`,s+=`<td>`+(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)+`</td>`,s+=`<td>`+e.activeMinutes.toFixed(1)+`</td>`,i||(s+=`<td>`+e.medianCycleMinutes.toFixed(1)+`</td>`,s+=`<td>`+e.MAD_aboveMinutes.toFixed(1)+`</td>`),s+=`</tr>
|
|
248
|
-
`;return s+=`</tbody>
|
|
249
|
-
</table>`,s}function cj(e,t,n,r,i,a){XA(sj(e,t,n?n.start:void 0,n?n.end:void 0,r,i,a)).catch(console.error)}function lj(e,t=`Pallet`){let n=`<table>
|
|
250
|
-
<thead><tr>`;n+=`<th>${t}</th><th>Date</th><th>Elapsed (min)</th>`,n+=`</tr></thead>
|
|
251
|
-
<tbody>
|
|
252
|
-
`;let r=e.keysToLazySeq().toSortedArray(e=>e);for(let t of r)for(let r of e.get(t)?.valuesToLazySeq()??[])n+=`<tr>`,n+=`<td>`+t.toString()+`</td>`,n+=`<td>`+r.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,n+=`<td>`+r.y.toFixed(1)+`</td>`,n+=`</tr>
|
|
253
|
-
`;return n+=`</tbody>
|
|
254
|
-
</table>`,n}function uj(e,t=`Pallet`){XA(lj(e,t)).catch(console.error)}function dj(e){switch(e.type){case V.LoadUnloadCycle:case V.MachineCycle:return e.loc+` #`+e.locnum.toString();case V.AddToQueue:case V.RemoveFromQueue:return e.loc;case V.PartMark:return`Mark`;case V.OrderAssignment:return`Workorder`;case V.CloseOut:return`CloseOut`;case V.Inspection:return`Signal `+((e.details||{}).InspectionType||``);case V.InspectionForce:return`Signal `+e.program;case V.InspectionResult:return`Inspect `+e.program;default:return e.loc}}function fj(e){switch(e.type){case V.Inspection:case V.InspectionForce:case V.LoadUnloadCycle:case V.PartMark:case V.OrderAssignment:return e.result;case V.AddToQueue:return`Add`;case V.RemoveFromQueue:return`Remove`;case V.MachineCycle:return e.program;case V.InspectionResult:return e.result.toLowerCase()===`false`?`Failed`:`Succeeded`;default:return``}}function pj(e){let t=`<table>
|
|
255
|
-
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Station</th><th>Pallet</th>`,t+=`<th>Serial</th><th>Workorder</th><th>Result</th><th>Elapsed Min</th><th>Active Min</th>`,t+=`</tr></thead>
|
|
256
|
-
<tbody>
|
|
257
|
-
`;for(let n of e)if(!n.startofcycle)for(let e of n.material)t+=`<tr>`,t+=`<td>`+n.endUTC.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,t+=`<td>`+e.part+`-`+e.proc.toString()+`</td>`,t+=`<td>`+dj(n)+`</td>`,t+=`<td>`+n.pal.toString()+`</td>`,t+=`<td>`+(e.serial||``)+`</td>`,t+=`<td>`+(e.workorder||``)+`</td>`,t+=`<td>`+fj(n)+`</td>`,t+=`<td>`+Kk(n.elapsed).toFixed(1)+`</td>`,t+=`<td>`+Kk(n.active).toFixed(1)+`</td>`,t+=`</tr>
|
|
258
|
-
`;return t+=`</tbody>
|
|
259
|
-
</table>`,t}function mj(e){XA(pj(e)).catch(console.error)}var hj=P([]),gj=hj,_j=P([]),vj=_j;function yj(e,t){return e.map(e=>({station:e.stationGroup+` #`+e.stationNum.toString(),stationLabel:gA(e.stationGroup,e.stationNum,t),start:e.startUTC,end:e.endUTC,plannedDown:e.planDown??!1,parts:e.parts?.map(e=>({uniq:e.jobUnique,proc:e.process,path:e.path}))}))}var bj=P(null,(e,t,n)=>{let r=e(vr)?.loadStationNames;t(hj,e=>e.concat(yj(n.stationUse,r)))}),xj=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs?.stationUse){let a=n.newJobs?.stationUse,o=e(vr)?.loadStationNames;t(hj,e=>{if(i){let t=RE(r,-30),n=Q.of(e).minBy(e=>e.end.getTime());if((n===void 0||n.start>=t)&&a.length===0)return e;e=e.filter(e=>e.start>=t)}return e.concat(yj(a,o))})}}),Sj=P(null,(e,t,n)=>{let r=e(vr)?.loadStationNames;t(_j,yj(n.stationUse,r))});function Cj(e){let{target:t}=e;if(!(t instanceof SVGElement))return null;let n=t instanceof SVGSVGElement?t:t.ownerSVGElement;if(!n)return null;let r=n.getScreenCTM();if(!r)return null;let i=n.createSVGPoint();return`changedTouches`in e?(i.x=e.changedTouches[0].clientX,i.y=e.changedTouches[0].clientY):(i.x=e.clientX,i.y=e.clientY),i.matrixTransform(r.inverse())}var wj=`__bms_measure_text_element`;function Tj(e,t){try{let n=document.getElementById(wj),r;if(n instanceof SVGTextElement)r=n;else{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);e.setAttribute(`aria-hidden`,`true`),e.style.position=`absolute`,e.style.top=`-100%`,e.style.left=`-100%`,e.style.width=`0`,e.style.height=`0`,e.style.opacity=`0`;let n=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);if(!(n instanceof SVGTextElement))return null;r=n,r.setAttribute(`id`,wj),t&&(r.style.fontSize=t.toString()),e.appendChild(r),document.body.appendChild(e)}return r.textContent=e,r.getComputedTextLength()}catch{return null}}function Ej(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Dj(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Ej(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Oj(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Dj(e,t,{leading:r,maxWait:t,trailing:i})}var kj=(e,t,n,r)=>{switch(t){case`debounce`:return Dj(e,n,r);case`throttle`:return Oj(e,n,r);default:return e}},Aj=e=>{let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>((...e)=>t.current?.call(t,...e)),[])},jj=e=>{let[t,n]=L.useState(e?.current||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:L.useMemo(()=>new Proxy(e=>{e!==t&&n(e)},{get(e,n){return n===`current`?t:e[n]},set(e,t,r){return t===`current`?n(r):e[t]=r,!0}}),[t]),refElement:t,setRefElement:n}},Mj=(e,t)=>{let n=e.borderBoxSize?.[0],r=e.contentBoxSize?.[0];return t===`border-box`&&n?{width:n.inlineSize,height:n.blockSize}:t===`content-box`&&r?{width:r.inlineSize,height:r.blockSize}:{width:e.contentRect.width,height:e.contentRect.height}};function Nj({skipOnMount:e=!1,refreshMode:t,refreshRate:n=1e3,refreshOptions:r,handleWidth:i=!0,handleHeight:a=!0,targetRef:o,observerOptions:s,onResize:c,disableRerender:l=!1}={}){let u=(0,L.useRef)(e),d=Aj(c),[f,p]=(0,L.useState)({width:void 0,height:void 0}),m=(0,L.useRef)({width:void 0,height:void 0}),{refProxy:h,refElement:g}=jj(o),{box:_}=s||{},v=(0,L.useCallback)(e=>{if(!i&&!a)return;if(u.current){u.current=!1;return}let t=(e,t)=>i&&e.width!==t.width||a&&e.height!==t.height;e.forEach(e=>{let n=Mj(e,_);l?t(m.current,n)&&(m.current.width=n.width,m.current.height=n.height,d?.({width:n.width,height:n.height,entry:e})):p(r=>t(r,n)?(d?.({width:n.width,height:n.height,entry:e}),n):r)})},[i,a,u,_,l]),y=(0,L.useCallback)(kj(v,t,n,r),[v,t,n,r]);return(0,L.useEffect)(()=>{let e;if(g)try{e=new window.ResizeObserver(y),e.observe(g,s)}catch(e){console.warn(`ResizeObserver not supported or failed to initialize:`,e)}else(f.width||f.height)&&(d?.({width:null,height:null,entry:null}),m.current.width=void 0,m.current.height=void 0,l||p({width:void 0,height:void 0}));return()=>{var t,n,r;(t=e?.disconnect)==null||t.call(e),(r=(n=y).cancel)==null||r.call(n)}},[y,g]),Object.assign({ref:h},l?m.current:f)}var Pj=K(`div`)({backgroundColor:Fr[700],color:`white`,padding:`0.3rem 0.5rem`,borderRadius:`3px`,boxShadow:`0 1px 2px rgba(33, 33, 33, 0.2)`,pointerEvents:`none`});function Fj({chartHeight:e,chartWidth:t,atom:n,TooltipContent:r}){let i=R(n),{ref:a,width:o,height:s}=Nj({refreshMode:`debounce`,refreshRate:100});if(!i)return null;let c=i.left,l=i.top;return o!==void 0&&(c+10+o>t&&c+10>t/2?c=c-o-30:c+=10),s!==void 0&&(l+10+s>e&&l+10>e/2?l=l-s-10:l+=10),(0,U.jsx)(`div`,{style:{visibility:s!==void 0&&o!==void 0?`visible`:`hidden`,position:`absolute`,left:c,top:l,zIndex:10},children:(0,U.jsx)(Pj,{ref:a,style:i?.zIndex?{zIndex:i.zIndex}:void 0,children:(0,U.jsx)(r,{tooltip:i})})})}function Ij({chart:e,tooltipAtom:t,TooltipContent:n,sx:r,autoHeight:i}){let{ref:a,width:o,height:s}=Nj({refreshMode:`debounce`,refreshRate:100});return(0,U.jsx)(Y,{ref:a,sx:r,children:(0,U.jsxs)(Y,{sx:{position:`relative`,overflow:`hidden`},children:[o&&(s||i)?e({width:o,height:s??0}):void 0,s&&o?(0,U.jsx)(Fj,{chartHeight:s,chartWidth:o,atom:t,TooltipContent:n}):void 0]})})}function Lj(e){return Q.ofObject(e.baskets??{}).collect(([,e])=>e.position.location===gt.LoadUnload||e.position.location===gt.LoadStationStaging?[e.basketId,{group:`L/U`,num:e.position.locationNum}]:null).toRMap(([e,t])=>[e,t])}function Rj(e,t,n){return e.action.type===H.LoadingToBasket?n.get(e.action.loadToBasketId??0)??null:e.action.type===H.Loading?e.action.loadOntoPalletNum?t.get(e.action.loadOntoPalletNum)??null:e.action.loadFromBasketId?n.get(e.action.loadFromBasketId)??null:null:e.location.palletNum?t.get(e.location.palletNum)??null:e.location.basketId?n.get(e.location.basketId)??null:null}function zj(e,t,n,r){return Q.of(e.material).collect(e=>{if(e.action.type!==H.Machining||!e.location.palletNum)return null;let t=n.get(e.location.palletNum);return t?{mat:e,loc:t}:null}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,i],a])=>{let o=t.get(new qk(a[0].mat.partName,n,a[0].mat.action.program??``)),s=Gk(a[0].mat.action.elapsedMachiningTime??`PT0S`),c=Gk(a[0].mat.action.expectedRemainingMachiningTime??`PT0S`);return{station:gA(n,i,r),start:XE(e.timeOfCurrentStatusUTC,-s),expectedEnd:XE(e.timeOfCurrentStatusUTC,c),isOutlier:o?$k(o,s/60/a.length):!1,parts:[{part:a[0].mat.partName,oper:a[0].mat.action.program??``}]}})}function Bj(e,t,n,r){let i=Lj(e);return Q.of(e.material).collect(e=>{if(e.action.type===H.UnloadToCompletedMaterial||e.action.type===H.UnloadToInProcess){let t=Rj(e,n,i);return t?{mat:e,material:[e],proc:e.process,path:e.path,loc:t}:null}else if(e.action.type===H.Loading||e.action.type===H.LoadingToBasket){let t=Rj(e,n,i);return t?{mat:e,material:[e],proc:e.action.processAfterLoad??e.process,path:e.action.pathAfterLoad??e.path,loc:t}:null}return null}).map(t=>{let n=e.jobs[t.mat.jobUnique],r=n?.procsAndPaths?.[t.proc-1],i=n?.procsAndPaths?.[t.proc-1]?.paths?.[t.path-1];if(t.mat.action.type===H.Loading||t.mat.action.type===H.LoadingToBasket){let e=t.mat.action.type===H.Loading?i?.expectedLoadTime:r?.expectedBasketLoadTime??i?.expectedLoadTime;return{...t,expectedLoadSecs:Gk(e??`PT0S`)}}else{let e=t.mat.location.palletNum!==null&&t.mat.location.palletNum!==void 0?i?.expectedUnloadTime:r?.expectedBasketUnloadTime??i?.expectedUnloadTime;return{...t,expectedLoadSecs:Gk(e??`PT0S`)}}}).groupBy(({loc:e})=>e.group,({loc:e})=>e.num).map(([[n,i],a])=>{let o=rA(a,e=>Kk(e.mat.action.elapsedLoadUnloadTime??`PT0S`),e=>e.expectedLoadSecs/60),s=!1,c=0;for(let{cycle:e,elapsedForSingleMaterialMinutes:r}of o){let i=t.get(new qk(e.mat.partName,n,e.mat.action.type===H.Loading||e.mat.action.type===H.LoadingToBasket?`LOAD-`+e.proc.toString():`UNLOAD-`+e.proc.toString()));i&&$k(i,r)&&(s=!0),e.expectedLoadSecs>0?c+=e.expectedLoadSecs:i?.expectedCycleMinutesForSingleMat&&(c+=i.expectedCycleMinutesForSingleMat*60)}let l=Gk(a[0].mat.action.elapsedLoadUnloadTime??`PT0S`);return{station:gA(n,i,r),start:XE(e.timeOfCurrentStatusUTC,-l),expectedEnd:XE(e.timeOfCurrentStatusUTC,-l+c),isOutlier:s,parts:Q.of(a).distinctAndSortBy(e=>e.mat.partName,e=>e.proc,e=>e.mat.action.type===H.Loading||e.mat.action.type===H.LoadingToBasket?`LOAD`:`UNLOAD`).map(e=>({part:e.mat.partName+`-`+e.proc.toString(),oper:e.mat.action.type===H.Loading||e.mat.action.type===H.LoadingToBasket?`LOAD`:`UNLOAD`})).toRArray()}})}function Vj(e,t,n){let r=Q.ofObject(e.pallets).buildHashMap(([,e])=>e.palletNum,(e,[,t])=>t.currentPalletLocation);return zj(e,t,r,n).concat(Bj(e,t,r,n)).toRArray()}function Hj({scale:e,width:t,tickOverride:n}){return(0,U.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,U.jsx)(`line`,{x1:0,y1:e(n),x2:t,y2:e(n),stroke:`#eaf0f6`,strokeWidth:1},r))})}function Uj({scale:e,height:t,tickOverride:n}){return(0,U.jsx)(`g`,{children:(n??e.ticks()).map((n,r)=>(0,U.jsx)(`line`,{x1:e(n),y1:0,x2:e(n),y2:t,stroke:`#eaf0f6`,strokeWidth:1},r))})}function Wj({xScale:e,yScale:t,width:n,height:r,rowTickOverride:i,colTickOverride:a}){return(0,U.jsxs)(`g`,{children:[(0,U.jsx)(Hj,{scale:t,width:n,tickOverride:i}),(0,U.jsx)(Uj,{scale:e,height:r,tickOverride:a})]})}var Gj=8;function Kj(e,t){if(t)return t.map(t=>({tick:t,pos:e(t)??0}));if(`ticks`in e&&e.ticks)return e.ticks().map(t=>({tick:t,pos:e(t)??0}));if(`bandwidth`in e&&e.bandwidth){let t=e.bandwidth();return e.domain().map(n=>({tick:n,pos:(e(n)??0)+t/2}))}else return e.domain().map(t=>({tick:t,pos:e(t)??0}))}function qj({top:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=Kj(t,a),s=t.range();return(0,U.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,U.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,U.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,U.jsx)(`line`,{y1:Gj,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,U.jsx)(`text`,{dy:13,textAnchor:`middle`,fontSize:r,fill:`#222`,dominantBaseline:`hanging`,children:i(e.tick)})]},t)),n?(0,U.jsx)(`text`,{x:(s[0]+s[1])/2,y:Gj+r+20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function Jj({left:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=Kj(t,a),s=t.range();return(0,U.jsxs)(`g`,{transform:`translate(${e}, 0)`,children:[(0,U.jsx)(`line`,{x1:0,y1:s[0],x2:0,y2:s[1],stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,U.jsxs)(`g`,{transform:`translate(0, ${e.pos})`,children:[(0,U.jsx)(`line`,{x1:-8,x2:0,y1:0,y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,U.jsx)(`text`,{dx:-13,textAnchor:`end`,fontSize:r,fill:`#222`,dominantBaseline:`middle`,children:i(e.tick)})]},t)),n?(0,U.jsx)(`text`,{x:-(s[0]+s[1])/2,y:-8-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,transform:`rotate(-90)`,children:n}):void 0]})}function Yj({top:e,scale:t,label:n,fontSize:r,tickFormat:i,tickOverride:a}){r??=10,i??=`tickFormat`in t&&t.tickFormat?t.tickFormat():e=>String(e);let o=Kj(t,a),s=t.range();return(0,U.jsxs)(`g`,{transform:`translate(0, ${e})`,children:[(0,U.jsx)(`line`,{x1:s[0],y1:0,x2:s[1],y2:0,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),o.map((e,t)=>(0,U.jsxs)(`g`,{transform:`translate(${e.pos}, 0)`,children:[(0,U.jsx)(`line`,{y1:0,y2:-8,stroke:`#222`,strokeWidth:1,shapeRendering:`crispEdges`}),(0,U.jsx)(`text`,{dy:-13,textAnchor:`middle`,fontSize:r,fill:`#222`,children:i(e.tick)})]},t)),n?(0,U.jsx)(`text`,{x:(s[0]+s[1])/2,y:-8-r-20,textAnchor:`middle`,fontSize:r+2,fill:`#222`,children:n}):void 0]})}function Xj(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zj(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Qj(e){let t,n,r;e.length===2?(t=e===Xj||e===Zj?e:$j,n=e,r=e):(t=Xj,n=(t,n)=>Xj(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function $j(){return 0}function eM(e){return e===null?NaN:+e}var tM=Qj(Xj),nM=tM.right;tM.left,Qj(eM).center;var rM=class extends Map{constructor(e,t=sM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(iM(this,e))}has(e){return super.has(iM(this,e))}set(e,t){return super.set(aM(this,e),t)}delete(e){return super.delete(oM(this,e))}};function iM({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function aM({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function oM({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function sM(e){return typeof e==`object`&&e?e.valueOf():e}var cM=Math.sqrt(50),lM=Math.sqrt(10),uM=Math.sqrt(2);function dM(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=cM?10:a>=lM?5:a>=uM?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?dM(e,t,n*2):[s,c,l]}function fM(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?dM(t,e,n):dM(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function pM(e,t,n){return t=+t,e=+e,n=+n,dM(e,t,n)[2]}function mM(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?pM(t,e,n):pM(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function hM(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function gM(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var _M=Symbol(`implicit`);function vM(){var e=new rM,t=[],n=[],r=_M;function i(i){let a=e.get(i);if(a===void 0){if(r!==_M)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new rM;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return vM(t,n).unknown(r)},gM.apply(i,arguments),i}function yM(){var e=vM().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=hM(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return yM(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},gM.apply(d(),arguments)}function bM(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xM(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function SM(){}var CM=.7,wM=1/CM,TM=`\\s*([+-]?\\d+)\\s*`,EM=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,DM=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,OM=/^#([0-9a-f]{3,8})$/,kM=RegExp(`^rgb\\(${TM},${TM},${TM}\\)$`),AM=RegExp(`^rgb\\(${DM},${DM},${DM}\\)$`),jM=RegExp(`^rgba\\(${TM},${TM},${TM},${EM}\\)$`),MM=RegExp(`^rgba\\(${DM},${DM},${DM},${EM}\\)$`),NM=RegExp(`^hsl\\(${EM},${DM},${DM}\\)$`),PM=RegExp(`^hsla\\(${EM},${DM},${DM},${EM}\\)$`),FM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};bM(SM,BM,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IM,formatHex:IM,formatHex8:LM,formatHsl:RM,formatRgb:zM,toString:zM});function IM(){return this.rgb().formatHex()}function LM(){return this.rgb().formatHex8()}function RM(){return $M(this).formatHsl()}function zM(){return this.rgb().formatRgb()}function BM(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=OM.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?VM(t):n===3?new GM(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?HM(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?HM(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=kM.exec(e))?new GM(t[1],t[2],t[3],1):(t=AM.exec(e))?new GM(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jM.exec(e))?HM(t[1],t[2],t[3],t[4]):(t=MM.exec(e))?HM(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=NM.exec(e))?QM(t[1],t[2]/100,t[3]/100,1):(t=PM.exec(e))?QM(t[1],t[2]/100,t[3]/100,t[4]):FM.hasOwnProperty(e)?VM(FM[e]):e===`transparent`?new GM(NaN,NaN,NaN,0):null}function VM(e){return new GM(e>>16&255,e>>8&255,e&255,1)}function HM(e,t,n,r){return r<=0&&(e=t=n=NaN),new GM(e,t,n,r)}function UM(e){return e instanceof SM||(e=BM(e)),e?(e=e.rgb(),new GM(e.r,e.g,e.b,e.opacity)):new GM}function WM(e,t,n,r){return arguments.length===1?UM(e):new GM(e,t,n,r??1)}function GM(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}bM(GM,WM,xM(SM,{brighter(e){return e=e==null?wM:wM**+e,new GM(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?CM:CM**+e,new GM(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new GM(XM(this.r),XM(this.g),XM(this.b),YM(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:KM,formatHex:KM,formatHex8:qM,formatRgb:JM,toString:JM}));function KM(){return`#${ZM(this.r)}${ZM(this.g)}${ZM(this.b)}`}function qM(){return`#${ZM(this.r)}${ZM(this.g)}${ZM(this.b)}${ZM((isNaN(this.opacity)?1:this.opacity)*255)}`}function JM(){let e=YM(this.opacity);return`${e===1?`rgb(`:`rgba(`}${XM(this.r)}, ${XM(this.g)}, ${XM(this.b)}${e===1?`)`:`, ${e})`}`}function YM(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function XM(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ZM(e){return e=XM(e),(e<16?`0`:``)+e.toString(16)}function QM(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new tN(e,t,n,r)}function $M(e){if(e instanceof tN)return new tN(e.h,e.s,e.l,e.opacity);if(e instanceof SM||(e=BM(e)),!e)return new tN;if(e instanceof tN)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new tN(o,s,c,e.opacity)}function eN(e,t,n,r){return arguments.length===1?$M(e):new tN(e,t,n,r??1)}function tN(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}bM(tN,eN,xM(SM,{brighter(e){return e=e==null?wM:wM**+e,new tN(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?CM:CM**+e,new tN(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new GM(iN(e>=240?e-240:e+120,i,r),iN(e,i,r),iN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new tN(nN(this.h),rN(this.s),rN(this.l),YM(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=YM(this.opacity);return`${e===1?`hsl(`:`hsla(`}${nN(this.h)}, ${rN(this.s)*100}%, ${rN(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function nN(e){return e=(e||0)%360,e<0?e+360:e}function rN(e){return Math.max(0,Math.min(1,e||0))}function iN(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var aN=e=>()=>e;function oN(e,t){return function(n){return e+n*t}}function sN(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function cN(e){return(e=+e)==1?lN:function(t,n){return n-t?sN(t,n,e):aN(isNaN(t)?n:t)}}function lN(e,t){var n=t-e;return n?oN(e,n):aN(isNaN(e)?t:e)}var uN=(function e(t){var n=cN(t);function r(e,t){var r=n((e=WM(e)).r,(t=WM(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=lN(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function dN(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function fN(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function pN(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=xN(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function mN(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function hN(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gN(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=xN(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var _N=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vN=new RegExp(_N.source,`g`);function yN(e){return function(){return e}}function Fne(e){return function(t){return e(t)+``}}function bN(e,t){var n=_N.lastIndex=vN.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=_N.exec(e))&&(i=vN.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:hN(r,i)})),n=vN.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Fne(c[0].x):yN(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function xN(e,t){var n=typeof t,r;return t==null||n===`boolean`?aN(t):(n===`number`?hN:n===`string`?(r=BM(t))?(t=r,uN):bN:t instanceof BM?uN:t instanceof Date?mN:fN(t)?dN:Array.isArray(t)?pN:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?gN:hN)(e,t)}function SN(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function CN(e){return function(){return e}}function wN(e){return+e}var TN=[0,1];function EN(e){return e}function DN(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:CN(isNaN(t)?NaN:.5)}function ON(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function kN(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=DN(i,r),a=n(o,a)):(r=DN(r,i),a=n(a,o)),function(e){return a(r(e))}}function AN(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=DN(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=nM(e,t,1,r)-1;return a[n](i[n](t))}}function jN(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function MN(){var e=TN,t=TN,n=xN,r,i,a,o=EN,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==EN&&(o=ON(e[0],e[n-1])),s=n>2?AN:kN,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),hN))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,wN),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=SN,u()},d.clamp=function(e){return arguments.length?(o=e?!0:EN,u()):o!==EN},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function NN(){return MN()(EN,EN)}function PN(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function FN(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function IN(e){return e=FN(Math.abs(e)),e?e[1]:NaN}function LN(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function RN(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var zN=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BN(e){if(!(t=zN.exec(e)))throw Error(`invalid format: `+e);var t;return new VN({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}BN.prototype=VN.prototype;function VN(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}VN.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function HN(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var UN;function WN(e,t){var n=FN(e,t);if(!n)return UN=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(UN=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+FN(e,Math.max(0,t+a-1))[0]}function GN(e,t){var n=FN(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var KN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:PN,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>GN(e*100,t),r:GN,s:WN,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function qN(e){return e}var JN=Array.prototype.map,YN=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function XN(e){var t=e.grouping===void 0||e.thousands===void 0?qN:LN(JN.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?qN:RN(JN.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=BN(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):KN[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=KN[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=HN(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&UN!==void 0?YN[8+UN/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(IN(t)/3)))*3,r=10**-n,i=l((e=BN(e),e.type=`f`,e),{suffix:YN[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var ZN,QN,$N;eP({thousands:`,`,grouping:[3],currency:[`$`,``]});function eP(e){return ZN=XN(e),QN=ZN.format,$N=ZN.formatPrefix,ZN}function tP(e){return Math.max(0,-IN(Math.abs(e)))}function nP(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(IN(t)/3)))*3-IN(Math.abs(e)))}function rP(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,IN(t)-IN(e))+1}function iP(e,t,n,r){var i=mM(e,t,n),a;switch(r=BN(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=nP(i,o))&&(r.precision=a),$N(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=rP(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=tP(i))&&(r.precision=a-(r.type===`%`)*2);break}return QN(r)}function aP(e){var t=e.domain;return e.ticks=function(e){var n=t();return fM(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return iP(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=pM(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function oP(){var e=NN();return e.copy=function(){return jN(e,oP())},gM.apply(e,arguments),aP(e)}function sP(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var cP=new Date,lP=new Date;function uP(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>uP(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(cP.setTime(+t),lP.setTime(+r),e(cP),e(lP),Math.floor(n(cP,lP))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var dP=uP(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);dP.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?uP(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):dP),dP.range;var fP=1e3,pP=fP*60,mP=pP*60,hP=mP*24,gP=hP*7,_P=hP*30,vP=hP*365,yP=uP(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fP)},(e,t)=>(t-e)/fP,e=>e.getUTCSeconds());yP.range;var bP=uP(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fP)},(e,t)=>{e.setTime(+e+t*pP)},(e,t)=>(t-e)/pP,e=>e.getMinutes());bP.range;var xP=uP(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pP)},(e,t)=>(t-e)/pP,e=>e.getUTCMinutes());xP.range;var SP=uP(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fP-e.getMinutes()*pP)},(e,t)=>{e.setTime(+e+t*mP)},(e,t)=>(t-e)/mP,e=>e.getHours());SP.range;var CP=uP(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*mP)},(e,t)=>(t-e)/mP,e=>e.getUTCHours());CP.range;var wP=uP(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pP)/hP,e=>e.getDate()-1);wP.range;var TP=uP(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hP,e=>e.getUTCDate()-1);TP.range;var EP=uP(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hP,e=>Math.floor(e/hP));EP.range;function DP(e){return uP(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pP)/gP)}var OP=DP(0),kP=DP(1),AP=DP(2),Ine=DP(3),jP=DP(4),Lne=DP(5),Rne=DP(6);OP.range,kP.range,AP.range,Ine.range,jP.range,Lne.range,Rne.range;function MP(e){return uP(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/gP)}var NP=MP(0),PP=MP(1),zne=MP(2),Bne=MP(3),FP=MP(4),Vne=MP(5),Hne=MP(6);NP.range,PP.range,zne.range,Bne.range,FP.range,Vne.range,Hne.range;var IP=uP(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());IP.range;var LP=uP(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());LP.range;var RP=uP(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());RP.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:uP(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),RP.range;var zP=uP(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());zP.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:uP(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),zP.range;function BP(e,t,n,r,i,a){let o=[[yP,1,fP],[yP,5,5*fP],[yP,15,15*fP],[yP,30,30*fP],[a,1,pP],[a,5,5*pP],[a,15,15*pP],[a,30,30*pP],[i,1,mP],[i,3,3*mP],[i,6,6*mP],[i,12,12*mP],[r,1,hP],[r,2,2*hP],[n,1,gP],[t,1,_P],[t,3,3*_P],[e,1,vP]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=Qj(([,,e])=>e).right(o,i);if(a===o.length)return e.every(mM(t/vP,n/vP,r));if(a===0)return dP.every(Math.max(mM(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Une,Wne]=BP(zP,LP,NP,EP,CP,xP),[Gne,Kne]=BP(RP,IP,OP,wP,SP,bP);function VP(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function HP(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function UP(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function qne(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=qP(i),u=JP(i),d=qP(a),f=JP(a),p=qP(o),m=JP(o),h=qP(s),g=JP(s),_=qP(c),v=JP(c),y={a:j,A:M,b:ne,B:re,c:null,d:$P,e:$P,f:gre,g:Ere,G:Ore,H:pre,I:mre,j:hre,L:eF,m:_re,M:vre,p:ie,q:ae,Q:oF,s:sF,S:yre,u:bre,U:xre,V:Sre,w:Cre,W:wre,x:null,X:null,y:Tre,Y:Dre,Z:kre,"%":aF},b={a:N,A:oe,b:se,B:ce,c:null,d:nF,e:nF,f:Nre,g:Ure,G:Gre,H:Are,I:jre,j:Mre,L:rF,m:Pre,M:Fre,p:P,q:le,Q:oF,s:sF,S:Ire,u:Lre,U:Rre,V:zre,w:Bre,W:Vre,x:null,X:null,y:Hre,Y:Wre,Z:Kre,"%":aF},x={a:E,A:D,b:O,B:ee,c:te,d:ZP,e:ZP,f:lre,g:XP,G:YP,H:QP,I:QP,j:are,L:cre,m:ire,M:ore,p:T,q:rre,Q:dre,s:fre,S:sre,u:Qne,U:$ne,V:ere,w:Zne,W:tre,x:k,X:A,y:XP,Y:YP,Z:nre,"%":ure};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=WP[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=UP(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=HP(UP(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?PP.ceil(a):PP(a),a=TP.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=VP(UP(r.y,0,1)),o=a.getDay(),a=o>4||o===0?kP.ceil(a):kP(a),a=wP.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?HP(UP(r.y,0,1)).getUTCDay():VP(UP(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,HP(r)):VP(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in WP?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function te(e,n,r){return w(e,t,n,r)}function k(e,t,r){return w(e,n,t,r)}function A(e,t,n){return w(e,r,t,n)}function j(e){return o[e.getDay()]}function M(e){return a[e.getDay()]}function ne(e){return c[e.getMonth()]}function re(e){return s[e.getMonth()]}function ie(e){return i[+(e.getHours()>=12)]}function ae(e){return 1+~~(e.getMonth()/3)}function N(e){return o[e.getUTCDay()]}function oe(e){return a[e.getUTCDay()]}function se(e){return c[e.getUTCMonth()]}function ce(e){return s[e.getUTCMonth()]}function P(e){return i[+(e.getUTCHours()>=12)]}function le(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var WP={"-":``,_:` `,0:`0`},GP=/^\s*\d+/,Jne=/^%/,Yne=/[\\^$*+?|[\]().{}]/g;function KP(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Xne(e){return e.replace(Yne,`\\$&`)}function qP(e){return RegExp(`^(?:`+e.map(Xne).join(`|`)+`)`,`i`)}function JP(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Zne(e,t,n){var r=GP.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Qne(e,t,n){var r=GP.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function $ne(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ere(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tre(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function YP(e,t,n){var r=GP.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function XP(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nre(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function rre(e,t,n){var r=GP.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ire(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ZP(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function are(e,t,n){var r=GP.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function QP(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ore(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sre(e,t,n){var r=GP.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cre(e,t,n){var r=GP.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lre(e,t,n){var r=GP.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ure(e,t,n){var r=Jne.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dre(e,t,n){var r=GP.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fre(e,t,n){var r=GP.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function $P(e,t){return KP(e.getDate(),t,2)}function pre(e,t){return KP(e.getHours(),t,2)}function mre(e,t){return KP(e.getHours()%12||12,t,2)}function hre(e,t){return KP(1+wP.count(RP(e),e),t,3)}function eF(e,t){return KP(e.getMilliseconds(),t,3)}function gre(e,t){return eF(e,t)+`000`}function _re(e,t){return KP(e.getMonth()+1,t,2)}function vre(e,t){return KP(e.getMinutes(),t,2)}function yre(e,t){return KP(e.getSeconds(),t,2)}function bre(e){var t=e.getDay();return t===0?7:t}function xre(e,t){return KP(OP.count(RP(e)-1,e),t,2)}function tF(e){var t=e.getDay();return t>=4||t===0?jP(e):jP.ceil(e)}function Sre(e,t){return e=tF(e),KP(jP.count(RP(e),e)+(RP(e).getDay()===4),t,2)}function Cre(e){return e.getDay()}function wre(e,t){return KP(kP.count(RP(e)-1,e),t,2)}function Tre(e,t){return KP(e.getFullYear()%100,t,2)}function Ere(e,t){return e=tF(e),KP(e.getFullYear()%100,t,2)}function Dre(e,t){return KP(e.getFullYear()%1e4,t,4)}function Ore(e,t){var n=e.getDay();return e=n>=4||n===0?jP(e):jP.ceil(e),KP(e.getFullYear()%1e4,t,4)}function kre(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+KP(t/60|0,`0`,2)+KP(t%60,`0`,2)}function nF(e,t){return KP(e.getUTCDate(),t,2)}function Are(e,t){return KP(e.getUTCHours(),t,2)}function jre(e,t){return KP(e.getUTCHours()%12||12,t,2)}function Mre(e,t){return KP(1+TP.count(zP(e),e),t,3)}function rF(e,t){return KP(e.getUTCMilliseconds(),t,3)}function Nre(e,t){return rF(e,t)+`000`}function Pre(e,t){return KP(e.getUTCMonth()+1,t,2)}function Fre(e,t){return KP(e.getUTCMinutes(),t,2)}function Ire(e,t){return KP(e.getUTCSeconds(),t,2)}function Lre(e){var t=e.getUTCDay();return t===0?7:t}function Rre(e,t){return KP(NP.count(zP(e)-1,e),t,2)}function iF(e){var t=e.getUTCDay();return t>=4||t===0?FP(e):FP.ceil(e)}function zre(e,t){return e=iF(e),KP(FP.count(zP(e),e)+(zP(e).getUTCDay()===4),t,2)}function Bre(e){return e.getUTCDay()}function Vre(e,t){return KP(PP.count(zP(e)-1,e),t,2)}function Hre(e,t){return KP(e.getUTCFullYear()%100,t,2)}function Ure(e,t){return e=iF(e),KP(e.getUTCFullYear()%100,t,2)}function Wre(e,t){return KP(e.getUTCFullYear()%1e4,t,4)}function Gre(e,t){var n=e.getUTCDay();return e=n>=4||n===0?FP(e):FP.ceil(e),KP(e.getUTCFullYear()%1e4,t,4)}function Kre(){return`+0000`}function aF(){return`%`}function oF(e){return+e}function sF(e){return Math.floor(e/1e3)}var cF,lF;qre({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function qre(e){return cF=qne(e),lF=cF.format,cF.parse,cF.utcFormat,cF.utcParse,cF}function Jre(e){return new Date(e)}function Yre(e){return e instanceof Date?+e:+new Date(+e)}function uF(e,t,n,r,i,a,o,s,c,l){var u=NN(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Yre)):f().map(Jre)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(sP(n,e)):u},u.copy=function(){return jN(u,uF(e,t,n,r,i,a,o,s,c,l))},u}function dF(){return gM.apply(uF(Gne,Kne,RP,IP,OP,wP,SP,bP,yP,lF).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var fF=Mr[200],pF=Mr[600],mF=Mr[900],hF=Or[700],Xre=Fr[400],Zre=Fr[100];function Qre(){let e=R(lk),t=R(gj);return(0,L.useMemo)(()=>{let n=VE(new Date,-12);return Q.of(t).filter(e=>e.end>=n).sortBy(e=>+!!e.plannedDown).map(t=>({station:t.stationLabel,start:t.start,end:t.end,plannedDown:t.plannedDown,parts:Q.of(t.parts??[]).collect(t=>{let n=e.get(t.uniq);return n?n.partName+`-`+t.proc.toString():null}).distinctAndSortBy(e=>e).toRArray()})).toRArray()},[e,t])}var gF=P(null),_F=14,vF=20,yF=10,bF=2;function $re(e,t,n,r,i){let a=ek.build(e,e=>e.station).union(ek.build(t,e=>e.station)),o=(a.toAscLazySeq().map(e=>Tj(e,_F)).maxBy(e=>e??0)??20)+30,s=Math.max(r-o-bF,5),c=Math.max(i-yF-vF,5),l=dF().domain([VE(n,-12),VE(n,8)]).range([0,s]),u=yM().domain(Array.from(a)).range([0,c]).padding(.3);return{xScale:l,yScale:u,actualPlannedScale:yM().domain([`actual`,`planned`]).range([0,u.bandwidth()]).padding(.1),marginLeft:o}}function eie({xScale:e,yScale:t}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(qj,{scale:e,top:t.range()[1]}),(0,U.jsx)(Jj,{scale:t,left:e.range()[0],fontSize:_F}),(0,U.jsx)(Uj,{scale:e,height:t.range()[1]-t.range()[0]})]})}function tie({cycles:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`actual`)??0,o=z(gF);function s(e){return t=>{let n=Cj(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),o({left:n.x,top:n.y,data:{kind:`actual`,cycle:e}}))}}let c=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,U.jsx)(`g`,{children:e.map((e,i)=>e.endActive&&e.endActive<e.endOccupied?(0,U.jsxs)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:[(0,U.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:pF}),(0,U.jsx)(`rect`,{x:t(e.endActive),y:(n(e.station)??0)+a+r.bandwidth()/10,width:t(e.endOccupied)-t(e.endActive),height:r.bandwidth()*8/10,fill:e.outlier?hF:mF})]},i):(0,U.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,U.jsx)(`rect`,{x:t(e.startTime),y:(n(e.station)??0)+a,width:t(e.endOccupied)-t(e.startTime),height:r.bandwidth(),fill:pF})},i))})}function nie(e,t,n,r){return`M ${e} ${t} A ${n} ${r} 0 0 1 ${e} ${t+r}`}function rie({now:e,cycles:t,xScale:n,yScale:r,actualPlannedScale:i,hideTooltipRef:a}){let o=i(`actual`)??0,s=z(gF);function c(t){return n=>{let r=Cj(n);r&&(a.current!==null&&(clearTimeout(a.current),a.current=null),s({left:r.x,top:r.y,data:{kind:`current`,cycle:t,now:e}}))}}let l=(0,L.useCallback)(()=>{a.current=setTimeout(()=>{s(null)},300)},[a,s]);return(0,U.jsx)(`g`,{children:t.map((t,a)=>(0,U.jsxs)(`g`,{onMouseOver:c(t),onMouseLeave:l,children:[(0,U.jsx)(`rect`,{x:n(t.start),y:(r(t.station)??0)+o,width:n(e)-n(t.start),height:i.bandwidth(),fill:pF}),t.expectedEnd<e?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`rect`,{x:n(t.expectedEnd),y:(r(t.station)??0)+o+i.bandwidth()/10,width:n(e)-n(t.expectedEnd),height:i.bandwidth()*8/10,fill:t.isOutlier?hF:mF}),(0,U.jsx)(`path`,{d:nie(n(e),(r(t.station)??0)+o,80,i.bandwidth()),fill:fF})]}):(0,U.jsx)(`rect`,{x:n(e),y:(r(t.station)??0)+o,width:n(t.expectedEnd)-n(e),height:i.bandwidth(),fill:fF})]},a))})}function iie({sim:e,xScale:t,yScale:n,actualPlannedScale:r,hideTooltipRef:i}){let a=r(`planned`)??0,o=z(gF);function s(e){return t=>{let n=Cj(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),o({left:n.x,top:n.y,data:{kind:`sim`,cycle:e}}))}}let c=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{o(null)},300)},[i,o]);return(0,U.jsx)(`g`,{children:e.map((e,i)=>(0,U.jsx)(`g`,{onMouseOver:s(e),onMouseLeave:c,children:(0,U.jsx)(`rect`,{x:t(e.start),y:(n(e.station)??0)+a,width:t(e.end)-t(e.start),height:r.bandwidth(),fill:e.plannedDown?Zre:Xre})},i))})}function aie({tooltip:e}){return(0,U.jsx)(nw,{children:e.data.kind===`actual`?(0,U.jsxs)(U.Fragment,{children:[e.data.cycle.outlier?(0,U.jsxs)(`div`,{children:[`Outlier Cycle for `,e.data.cycle.station]}):(0,U.jsx)(`div`,{children:e.data.cycle.station}),(0,U.jsxs)(`div`,{children:[`Start: `,e.data.cycle.startTime.toLocaleString()]}),(0,U.jsxs)(`div`,{children:[`End: `,e.data.cycle.endOccupied.toLocaleString()]}),e.data.cycle.endActive===void 0?void 0:(0,U.jsxs)(`div`,{children:[`Active Minutes:`,` `,iD(e.data.cycle.endActive,e.data.cycle.startTime)]}),(0,U.jsxs)(`div`,{children:[`Occupied Minutes:`,` `,iD(e.data.cycle.endOccupied,e.data.cycle.startTime)]}),e.data.cycle.parts.map((e,t)=>(0,U.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]}):e.data.kind===`sim`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[`Simulation of `,e.data.cycle.station]}),e.data.cycle.parts.map((e,t)=>(0,U.jsxs)(`div`,{children:[`Part: `,e]},t)),(0,U.jsxs)(`div`,{children:[`Predicted Start: `,e.data.cycle.start.toLocaleString()]}),(0,U.jsxs)(`div`,{children:[`Predicted End: `,e.data.cycle.end.toLocaleString()]}),e.data.cycle.plannedDown?(0,U.jsx)(`div`,{children:`Planned Downtime`}):void 0]}):(0,U.jsxs)(U.Fragment,{children:[e.data.cycle.isOutlier?(0,U.jsxs)(`div`,{children:[`Current Outlier Cycle for `,e.data.cycle.station]}):(0,U.jsxs)(`div`,{children:[`Current `,e.data.cycle.station]}),(0,U.jsxs)(`div`,{children:[`Start: `,e.data.cycle.start.toLocaleString()]}),(0,U.jsxs)(`div`,{children:[`Expected End: `,e.data.cycle.expectedEnd.toLocaleString()]}),e.data.cycle.expectedEnd<e.data.now?(0,U.jsxs)(`div`,{children:[`Cycle Exceeding Expected By`,` `,iD(e.data.now,e.data.cycle.expectedEnd),` Minutes`]}):(0,U.jsxs)(`div`,{children:[`Expected Remaining Minutes:`,` `,iD(e.data.cycle.expectedEnd,e.data.now)]}),(0,U.jsxs)(`div`,{children:[`Occupied Minutes: `,iD(e.data.now,e.data.cycle.start)]}),e.data.cycle.parts.map((e,t)=>(0,U.jsxs)(`div`,{children:[`Part: `,e.part,` `,e.oper]},t))]})})}function oie({now:e,xScale:t,yScale:n}){let r=t(e);return(0,U.jsxs)(`g`,{children:[(0,U.jsx)(`line`,{x1:r,x2:r,y1:n.range()[0],y2:n.range()[1]+8,stroke:`black`}),(0,U.jsx)(`text`,{x:r,y:n.range()[1]+8+11,textAnchor:`middle`,fontSize:11,children:`Now`})]})}function xF({height:e,width:t}){let n=R(SA),r=R(Yk),i=Qre(),a=R(Fk),o=R(vr),s=(0,L.useMemo)(()=>{let e=VE(new Date,-12);return aj(n.valuesToLazySeq().filter(t=>t.endTime>=e))},[n]),c=(0,L.useMemo)(()=>Vj(a,r,o.loadStationNames),[a,r,o.loadStationNames]),l=new Date,[,u]=(0,L.useState)(0),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{u(e=>e+1)},300*1e3)});let{xScale:f,yScale:p,actualPlannedScale:m,marginLeft:h}=$re(s,c,l,t,e),g=(0,L.useRef)(null);return e<=0||t<=0?null:(0,U.jsxs)(`div`,{style:{position:`relative`,overflow:`hidden`},children:[(0,U.jsx)(`svg`,{height:e,width:t,children:(0,U.jsxs)(`g`,{transform:`translate(${h}, ${yF})`,children:[(0,U.jsx)(`clipPath`,{id:`recent-cycle-clip-body`,children:(0,U.jsx)(`rect`,{x:0,y:0,width:t-bF-h,height:e-vF-yF})}),(0,U.jsx)(eie,{xScale:f,yScale:p}),(0,U.jsxs)(`g`,{clipPath:`url(#recent-cycle-clip-body)`,children:[(0,U.jsx)(tie,{cycles:s,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,U.jsx)(rie,{now:l,cycles:c,xScale:f,yScale:p,hideTooltipRef:g,actualPlannedScale:m}),(0,U.jsx)(iie,{sim:i,xScale:f,yScale:p,actualPlannedScale:m,hideTooltipRef:g})]}),(0,U.jsx)(oie,{now:l,xScale:f,yScale:p})]})}),(0,U.jsx)(Fj,{chartHeight:e,chartWidth:t,atom:gF,TooltipContent:aie})]})}var sie=Object.defineProperty,SF=(e,t)=>sie(e,`name`,{value:t,configurable:!0}),CF=class{type=3;name=``;prefix=``;value=``;suffix=``;modifier=3;constructor(e,t,n,r,i,a){this.type=e,this.name=t,this.prefix=n,this.value=r,this.suffix=i,this.modifier=a}hasCustomName(){return this.name!==``&&typeof this.name!=`number`}};SF(CF,`Part`);var cie=/[$_\p{ID_Start}]/u,lie=/[$_\u200C\u200D\p{ID_Continue}]/u,wF=`.*`;function TF(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}SF(TF,`isASCII`);function EF(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r],a=SF(function(i){if(!t)throw TypeError(i);n.push({type:`INVALID_CHAR`,index:r,value:e[r++]})},`ErrorOrInvalid`);if(i===`*`){n.push({type:`ASTERISK`,index:r,value:e[r++]});continue}if(i===`+`||i===`?`){n.push({type:`OTHER_MODIFIER`,index:r,value:e[r++]});continue}if(i===`\\`){n.push({type:`ESCAPED_CHAR`,index:r++,value:e[r++]});continue}if(i===`{`){n.push({type:`OPEN`,index:r,value:e[r++]});continue}if(i===`}`){n.push({type:`CLOSE`,index:r,value:e[r++]});continue}if(i===`:`){let t=``,i=r+1;for(;i<e.length;){let n=e.substr(i,1);if(i===r+1&&cie.test(n)||i!==r+1&&lie.test(n)){t+=e[i++];continue}break}if(!t){a(`Missing parameter name at ${r}`);continue}n.push({type:`NAME`,index:r,value:t}),r=i;continue}if(i===`(`){let t=1,i=``,o=r+1,s=!1;if(e[o]===`?`){a(`Pattern cannot start with "?" at ${o}`);continue}for(;o<e.length;){if(!TF(e[o],!1)){a(`Invalid character '${e[o]}' at ${o}.`),s=!0;break}if(e[o]===`\\`){i+=e[o++]+e[o++];continue}if(e[o]===`)`){if(t--,t===0){o++;break}}else if(e[o]===`(`&&(t++,e[o+1]!==`?`)){a(`Capturing groups are not allowed at ${o}`),s=!0;break}i+=e[o++]}if(s)continue;if(t){a(`Unbalanced pattern at ${r}`);continue}if(!i){a(`Missing pattern at ${r}`);continue}n.push({type:`REGEX`,index:r,value:i}),r=o;continue}n.push({type:`CHAR`,index:r,value:e[r++]})}return n.push({type:`END`,index:r,value:``}),n}SF(EF,`lexer`);function DF(e,t={}){let n=EF(e);t.delimiter??=`/#?`,t.prefixes??=`./`;let r=`[^${OF(t.delimiter)}]+?`,i=[],a=0,o=0,s=new Set,c=SF(e=>{if(o<n.length&&n[o].type===e)return n[o++].value},`tryConsume`),l=SF(()=>c(`OTHER_MODIFIER`)??c(`ASTERISK`),`tryConsumeModifier`),u=SF(e=>{let t=c(e);if(t!==void 0)return t;let{type:r,index:i}=n[o];throw TypeError(`Unexpected ${r} at ${i}, expected ${e}`)},`mustConsume`),d=SF(()=>{let e=``,t;for(;t=c(`CHAR`)??c(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),f=SF(e=>e,`DefaultEncodePart`),p=t.encodePart||f,m=``,h=SF(e=>{m+=e},`appendToPendingFixedValue`),g=SF(()=>{m.length&&(i.push(new CF(3,``,``,p(m),``,3)),m=``)},`maybeAddPartFromPendingFixedValue`),_=SF((e,t,n,o,c)=>{let l=3;switch(c){case`?`:l=1;break;case`*`:l=0;break;case`+`:l=2;break}if(!t&&!n&&l===3){h(e);return}if(g(),!t&&!n){if(!e)return;i.push(new CF(3,``,``,p(e),``,l));return}let u;u=n?n===`*`?wF:n:r;let d=2;u===r?(d=1,u=``):u===wF&&(d=0,u=``);let f;if(t?f=t:n&&(f=a++),s.has(f))throw TypeError(`Duplicate name '${f}'.`);s.add(f),i.push(new CF(d,f,p(e),u,p(o),l))},`addPart`);for(;o<n.length;){let e=c(`CHAR`),n=c(`NAME`),r=c(`REGEX`);if(!n&&!r&&(r=c(`ASTERISK`)),n||r){let i=e??``;t.prefixes.indexOf(i)===-1&&(h(i),i=``),g();let a=l();_(i,n,r,``,a);continue}let i=e??c(`ESCAPED_CHAR`);if(i){h(i);continue}if(c(`OPEN`)){let e=d(),t=c(`NAME`),n=c(`REGEX`);!t&&!n&&(n=c(`ASTERISK`));let r=d();u(`CLOSE`);let i=l();_(e,t,n,r,i);continue}g(),u(`END`)}return i}SF(DF,`parse`);function OF(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}SF(OF,`escapeString`);function kF(e){return e&&e.ignoreCase?`ui`:`u`}SF(kF,`flags`);function AF(e,t,n){return MF(DF(e,n),t,n)}SF(AF,`stringToRegexp`);function jF(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}SF(jF,`modifierToString`);function MF(e,t,n={}){n.delimiter??=`/#?`,n.prefixes??=`./`,n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith=``;let r=n.start?`^`:``;for(let i of e){if(i.type===3){i.modifier===3?r+=OF(i.value):r+=`(?:${OF(i.value)})${jF(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${OF(n.delimiter)}]+?`,a=i.value;if(i.type===1?a=e:i.type===0&&(a=wF),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${a})${jF(i.modifier)}`:r+=`((?:${a})${jF(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${OF(i.prefix)}(${a})${OF(i.suffix)})`,r+=jF(i.modifier);continue}r+=`(?:${OF(i.prefix)}`,r+=`((?:${a})(?:`,r+=OF(i.suffix),r+=OF(i.prefix),r+=`(?:${a}))*)${OF(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${OF(n.endsWith)}]|$`,a=`[${OF(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${a}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,kF(n));n.strict||(r+=`(?:${a}(?=${i}))?`);let o=!1;if(e.length){let t=e[e.length-1];t.type===3&&t.modifier===3&&(o=n.delimiter.indexOf(t)>-1)}return o||(r+=`(?=${a}|${i})`),new RegExp(r,kF(n))}SF(MF,`partsToRegexp`);var NF={delimiter:``,prefixes:``,sensitive:!0,strict:!0},uie={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},die={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function PF(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}SF(PF,`isAbsolutePathname`);function FF(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}SF(FF,`maybeStripPrefix`);function IF(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}SF(IF,`maybeStripSuffix`);function LF(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}SF(LF,`treatAsIPv6Hostname`);var RF=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function zF(e){if(!e)return!0;for(let t of RF)if(e.test(t))return!0;return!1}SF(zF,`isSpecialScheme`);function BF(e,t){if(e=FF(e,`#`),t||e===``)return e;let n=new URL(`https://example.com`);return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):``}SF(BF,`canonicalizeHash`);function VF(e,t){if(e=FF(e,`?`),t||e===``)return e;let n=new URL(`https://example.com`);return n.search=e,n.search?n.search.substring(1,n.search.length):``}SF(VF,`canonicalizeSearch`);function HF(e,t){return t||e===``?e:LF(e)?$F(e):QF(e)}SF(HF,`canonicalizeHostname`);function UF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}SF(UF,`canonicalizePassword`);function WF(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}SF(WF,`canonicalizeUsername`);function GF(e,t,n){if(n||e===``)return e;if(t&&!RF.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]==`/`;return e=new URL(r?e:`/-`+e,`https://example.com`).pathname,r||(e=e.substring(2,e.length)),e}SF(GF,`canonicalizePathname`);function KF(e,t,n){return JF(t)===e&&(e=``),n||e===``?e:eI(e)}SF(KF,`canonicalizePort`);function qF(e,t){return e=IF(e,`:`),t||e===``?e:YF(e)}SF(qF,`canonicalizeProtocol`);function JF(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}SF(JF,`defaultPortForProtocol`);function YF(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}SF(YF,`protocolEncodeCallback`);function XF(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}SF(XF,`usernameEncodeCallback`);function ZF(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}SF(ZF,`passwordEncodeCallback`);function QF(e){if(e===``)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL(`https://example.com`);return t.hostname=e,t.hostname}SF(QF,`hostnameEncodeCallback`);function $F(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}SF($F,`ipv6HostnameEncodeCallback`);function eI(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}SF(eI,`portEncodeCallback`);function tI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.pathname=e[0]===`/`?e:`/-`+e,e[0]===`/`?t.pathname:t.pathname.substring(2,t.pathname.length)}SF(tI,`standardURLPathnameEncodeCallback`);function nI(e){return e===``?e:new URL(`data:${e}`).pathname}SF(nI,`pathURLPathnameEncodeCallback`);function rI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}SF(rI,`searchEncodeCallback`);function iI(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}SF(iI,`hashEncodeCallback`);var aI=class{#e;#t=[];#n={};#r=0;#i=1;#a=0;#o=0;#s=0;#c=0;#l=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=EF(this.#e,!0);this.#r<this.#t.length;this.#r+=this.#i){if(this.#i=1,this.#t[this.#r].type===`END`){if(this.#o===0){this.#f(),this.#C()?this.#u(9,1):this.#S()?this.#u(8,1):this.#u(7,0);continue}else if(this.#o===2){this.#p(5);continue}this.#u(10,0);break}if(this.#s>0)if(this.#T())--this.#s;else continue;if(this.#w()){this.#s+=1;continue}switch(this.#o){case 0:this.#g()&&this.#p(1);break;case 1:if(this.#g()){this.#k();let e=7,t=1;this.#_()?(e=2,t=3):this.#l&&(e=2),this.#u(e,t)}break;case 2:this.#v()?this.#p(3):(this.#x()||this.#S()||this.#C())&&this.#p(5);break;case 3:this.#y()?this.#u(4,1):this.#v()&&this.#u(5,1);break;case 4:this.#v()&&this.#u(5,1);break;case 5:this.#E()?this.#c+=1:this.#D()&&--this.#c,this.#b()&&!this.#c?this.#u(6,1):this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 6:this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 7:this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 8:this.#C()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port=``)}#u(e,t){switch(this.#o){case 0:break;case 1:this.#n.protocol=this.#O();break;case 2:break;case 3:this.#n.username=this.#O();break;case 4:this.#n.password=this.#O();break;case 5:this.#n.hostname=this.#O();break;case 6:this.#n.port=this.#O();break;case 7:this.#n.pathname=this.#O();break;case 8:this.#n.search=this.#O();break;case 9:this.#n.hash=this.#O();break;case 10:break}this.#o!==0&&e!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=``),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(e)&&(this.#n.pathname??=this.#l?`/`:``),[1,2,3,4,5,6,7].includes(this.#o)&&e===9&&(this.#n.search??=``)),this.#d(e,t)}#d(e,t){this.#o=e,this.#a=this.#r+t,this.#r+=t,this.#i=0}#f(){this.#r=this.#a,this.#i=0}#p(e){this.#f(),this.#o=e}#m(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#h(e,t){let n=this.#m(e);return n.value===t&&(n.type===`CHAR`||n.type===`ESCAPED_CHAR`||n.type===`INVALID_CHAR`)}#g(){return this.#h(this.#r,`:`)}#_(){return this.#h(this.#r+1,`/`)&&this.#h(this.#r+2,`/`)}#v(){return this.#h(this.#r,`@`)}#y(){return this.#h(this.#r,`:`)}#b(){return this.#h(this.#r,`:`)}#x(){return this.#h(this.#r,`/`)}#S(){if(this.#h(this.#r,`?`))return!0;if(this.#t[this.#r].value!==`?`)return!1;let e=this.#m(this.#r-1);return e.type!==`NAME`&&e.type!==`REGEX`&&e.type!==`CLOSE`&&e.type!==`ASTERISK`}#C(){return this.#h(this.#r,`#`)}#w(){return this.#t[this.#r].type==`OPEN`}#T(){return this.#t[this.#r].type==`CLOSE`}#E(){return this.#h(this.#r,`[`)}#D(){return this.#h(this.#r,`]`)}#O(){let e=this.#t[this.#r],t=this.#m(this.#a).index;return this.#e.substring(t,e.index)}#k(){let e={};Object.assign(e,NF),e.encodePart=YF;let t=AF(this.#O(),void 0,e);this.#l=zF(t)}};SF(aI,`Parser`);var oI=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],sI=`*`;function cI(e,t){if(typeof e!=`string`)throw TypeError(`parameter 1 is not of type 'string'.`);let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search===``?void 0:n.search.substring(1,n.search.length),hash:n.hash===``?void 0:n.hash.substring(1,n.hash.length)}}SF(cI,`extractValues`);function lI(e,t){return t?dI(e):e}SF(lI,`processBaseURLString`);function uI(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=lI(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=lI(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=lI(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=lI(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=lI(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=lI(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=lI(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=lI(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=qF(t.protocol,n)),typeof t.username==`string`&&(e.username=WF(t.username,n)),typeof t.password==`string`&&(e.password=UF(t.password,n)),typeof t.hostname==`string`&&(e.hostname=HF(t.hostname,n)),typeof t.port==`string`&&(e.port=KF(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!PF(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=lI(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=GF(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=VF(t.search,n)),typeof t.hash==`string`&&(e.hash=BF(t.hash,n)),e}SF(uI,`applyInit`);function dI(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}SF(dI,`escapePatternString`);function fI(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}SF(fI,`escapeRegexpString`);function pI(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${fI(t.delimiter)}]+?`,r=/[$_\u200C\u200D\p{ID_Continue}]/u,i=``;for(let a=0;a<e.length;++a){let o=e[a];if(o.type===3){if(o.modifier===3){i+=dI(o.value);continue}i+=`{${dI(o.value)}}${jF(o.modifier)}`;continue}let s=o.hasCustomName(),c=!!o.suffix.length||!!o.prefix.length&&(o.prefix.length!==1||!t.prefixes.includes(o.prefix)),l=a>0?e[a-1]:null,u=a<e.length-1?e[a+1]:null;if(!c&&s&&o.type===1&&o.modifier===3&&u&&!u.prefix.length&&!u.suffix.length)if(u.type===3){let e=u.value.length>0?u.value[0]:``;c=r.test(e)}else c=!u.hasCustomName();if(!c&&!o.prefix.length&&l&&l.type===3){let e=l.value[l.value.length-1];c=t.prefixes.includes(e)}c&&(i+=`{`),i+=dI(o.prefix),s&&(i+=`:${o.name}`),o.type===2?i+=`(${o.value})`:o.type===1?s||(i+=`(${n})`):o.type===0&&(!s&&(!l||l.type===3||l.modifier!==3||c||o.prefix!==``)?i+=`*`:i+=`(.*)`),o.type===1&&s&&o.suffix.length&&r.test(o.suffix[0])&&(i+=`\\`),i+=dI(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=jF(o.modifier))}return i}SF(pI,`partsToPattern`);var mI=class{#e;#t={};#n={};#r={};#i={};#a=!1;constructor(e={},t,n){try{let r;if(typeof t==`string`?r=t:n=t,typeof e==`string`){let t=new aI(e);if(t.parse(),e=t.result,r===void 0&&typeof e.protocol!=`string`)throw TypeError(`A base URL must be provided for a relative constructor string.`);e.baseURL=r}else{if(!e||typeof e!=`object`)throw TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);if(r)throw TypeError(`parameter 1 is not of type 'string'.`)}typeof n>`u`&&(n={ignoreCase:!1});let i={ignoreCase:n.ignoreCase===!0},a={pathname:sI,protocol:sI,username:sI,password:sI,hostname:sI,port:sI,search:sI,hash:sI};this.#e=uI(a,e,!0),JF(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let o;for(o of oI){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#n[o]=[],o){case`protocol`:Object.assign(e,NF),e.encodePart=YF;break;case`username`:Object.assign(e,NF),e.encodePart=XF;break;case`password`:Object.assign(e,NF),e.encodePart=ZF;break;case`hostname`:Object.assign(e,uie),LF(t)?e.encodePart=$F:e.encodePart=QF;break;case`port`:Object.assign(e,NF),e.encodePart=eI;break;case`pathname`:zF(this.#t.protocol)?(Object.assign(e,die,i),e.encodePart=tI):(Object.assign(e,NF,i),e.encodePart=nI);break;case`search`:Object.assign(e,NF,i),e.encodePart=rI;break;case`hash`:Object.assign(e,NF,i),e.encodePart=iI;break}try{this.#i[o]=DF(t,e),this.#t[o]=MF(this.#i[o],this.#n[o],e),this.#r[o]=pI(this.#i[o],e),this.#a=this.#a||this.#i[o].some(e=>e.type===2)}catch{throw TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return`URLPattern`}test(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return!1;try{n=typeof e==`object`?uI(n,e,!1):uI(n,cI(e,t),!1)}catch{return!1}let r;for(r of oI)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return;try{n=typeof e==`object`?uI(n,e,!1):uI(n,cI(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let i;for(i of oI){let e=this.#t[i].exec(n[i]);if(!e)return null;let t={};for(let[n,r]of this.#n[i].entries())(typeof r==`string`||typeof r==`number`)&&(t[r]=e[n+1]);r[i]={input:n[i]??``,groups:t}}return r}static compareComponent(e,t,n){let r=SF((e,t)=>{for(let n of[`type`,`modifier`,`prefix`,`value`,`suffix`]){if(e[n]<t[n])return-1;if(e[n]!==t[n])return 1}return 0},`comparePart`),i=new CF(3,``,``,``,``,3),a=new CF(0,``,``,``,``,3),o=SF((e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let i=r(e[n],t[n]);if(i)return i}return e.length===t.length?0:r(e[n]??i,t[n]??i)},`comparePartList`);return!t.#r[e]&&!n.#r[e]?0:t.#r[e]&&!n.#r[e]?o(t.#i[e],[a]):!t.#r[e]&&n.#r[e]?o([a],n.#i[e]):o(t.#i[e],n.#i[e])}get protocol(){return this.#r.protocol}get username(){return this.#r.username}get password(){return this.#r.password}get hostname(){return this.#r.hostname}get port(){return this.#r.port}get pathname(){return this.#r.pathname}get search(){return this.#r.search}get hash(){return this.#r.hash}get hasRegExpGroups(){return this.#a}};SF(mI,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=mI);function*fie(e){let t=null;for(let n of e)t!=null&&t.type===V.RemoveFromQueue&&n.type===V.AddToQueue&&t.loc===n.loc?t=null:(t!==null&&(yield t),t=n);t!==null&&(yield t)}function hI(e,t){return e.containerId?`${t} fragment ${e.containerId.slice(0,8)}`:e.pal>0?`${t} ${e.pal}`:t}function pie(e,t){let n=hI(e,t);if(e.startofcycle)return`${n} started cycle`;let r=e.containerIds?.length??0;return`${n} completed cycle${r>0?` from ${r} UUID fragment${r===1?``:`s`}`:``}`}var gI=K(`span`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$type:e})=>{switch(e){case`machine`:return{color:`#1565C0`};case`loadStation`:return{color:`#795548`};case`pallet`:return{color:`#00695C`};case`queue`:return{color:`#6A1B9A`};case`inspectionNotSignaled`:return{color:`#4527A0`};case`inspectionSignaled`:return{color:`red`};case`closeoutFailed`:return{color:`red`}}});function mie(e,t){let n=_A(t.basketName);switch(e.type){case V.LoadUnloadCycle:return e.startofcycle?`Start `+e.result.charAt(0).toUpperCase()+e.result.substring(1).toLowerCase():`End `+e.result.charAt(0).toUpperCase()+e.result.substring(1).toLowerCase();case V.BasketLoadUnload:return e.program===`LOAD`?`${n} Load`:`${n} Unload`;case V.BasketCycle:return`${n} Cycle`;case V.BasketInLocation:return e.startofcycle?`Arrive`:`Depart`;case V.BasketIdentityHint:return`${n} Identity Hint`;case V.BasketContentSnapshot:return`${n} Content Snapshot`;case V.MachineCycle:return e.startofcycle?`Start Cycle`:`End Cycle`;case V.PartMark:return`Serial`;case V.OrderAssignment:return`Workorder`;case V.Inspection:case V.InspectionForce:return`Signal`;case V.PalletCycle:return`Pallet Cycle`;case V.WorkorderComment:return`Workorder`;case V.CloseOut:return`CloseOut`;case V.InspectionResult:return`Inspection`;case V.AddToQueue:return`Queue`;case V.RemoveFromQueue:return`Queue`;case V.PalletInStocker:return`Stocker`;case V.PalletOnRotaryInbound:return`Rotary`;case V.SignalQuarantine:return`Quarantine`;case V.SwapMaterialOnPallet:return`Swap Serial`;case V.InvalidateCycle:return`Invalidate Cycle`;case V.Rebooking:return`Rebooking`;case V.CancelRebooking:return`Cancel Rebooking`;default:return`Message`}}function _I(e){return e.details?.PalletCycleInvalidated===`1`}function vI(e){return e.length>1?e[0].numproc==1?`${e[0].part} x${e.length}`:`${e[0].part}-${Q.of(e).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`&`)} x${e.length}`:e.length==1?e[0].numproc==1?e[0].part:`${e[0].part}-${e[0].proc}`:``}function yI(e){return e.length>1?`${e[0].part} x${e.length}`:e.length===1?e[0].part:``}function hie(e,t){let n=e.entry;switch(n.type){case V.LoadUnloadCycle:return(0,U.jsxs)(`span`,{children:[vI(n.material),` on`,` `,(0,U.jsxs)(gI,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,U.jsx)(gI,{$type:`loadStation`,children:hA(n.locnum,t.loadStationNames)})]});case V.BasketLoadUnload:{let e=_A(t.basketName);return(0,U.jsxs)(`span`,{children:[vI(n.material),` `,n.program===`LOAD`?`loaded onto`:`unloaded from`,` `,(0,U.jsx)(gI,{$type:`pallet`,children:hI(n,e)}),` at`,` `,(0,U.jsx)(gI,{$type:`loadStation`,children:hA(n.locnum,t.loadStationNames)})]})}case V.BasketCycle:return(0,U.jsx)(`span`,{children:pie(n,_A(t.basketName))});case V.BasketInLocation:{let e=_A(t.basketName);return n.startofcycle?(0,U.jsxs)(`span`,{children:[hI(n,e),` arrived at `,n.loc,n.locnum>0?` position ${n.locnum}`:``]}):(0,U.jsxs)(`span`,{children:[hI(n,e),` departed from `,n.loc,n.locnum>0?` position ${n.locnum}`:``]})}case V.BasketIdentityHint:{let e=_A(t.basketName);return(0,U.jsxs)(`span`,{children:[hI(n,e),` presently associated with `,e,` `,n.pal]})}case V.BasketContentSnapshot:return(0,U.jsxs)(`span`,{children:[hI(n,_A(t.basketName)),` contained `,vI(n.material)]});case V.MachineCycle:return(0,U.jsxs)(`span`,{children:[vI(n.material),` on`,` `,(0,U.jsxs)(gI,{$type:`pallet`,children:[`pallet `,n.pal]}),` at`,` `,(0,U.jsxs)(gI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),n.program&&n.program!==``?(0,U.jsxs)(`span`,{children:[` with program `,n.program]}):void 0]});case V.PartMark:return(0,U.jsxs)(`span`,{children:[vI(n.material),` marked with `,n.result]});case V.OrderAssignment:return(0,U.jsxs)(`span`,{children:[vI(n.material),` assigned to workorder `,n.result]});case V.PalletCycle:return n.startofcycle?(0,U.jsxs)(`span`,{children:[`Pallet `,n.pal,` started route`]}):(0,U.jsxs)(`span`,{children:[`Pallet `,n.pal,` completed route`]});case V.Inspection:{let e=(n.details||{}).InspectionType||``;return n.result.toLowerCase()===`true`||n.result===`1`?(0,U.jsxs)(`span`,{children:[vI(n.material),` signaled for inspection`,` `,(0,U.jsx)(gI,{$type:`inspectionSignaled`,children:e})]}):(0,U.jsxs)(`span`,{children:[vI(n.material),` skipped inspection`,` `,(0,U.jsx)(gI,{$type:`inspectionNotSignaled`,children:e})]})}case V.InspectionForce:{let e=n.program;return n.result.toLowerCase()===`true`||n.result===`1`?(0,U.jsxs)(`span`,{children:[vI(n.material),` declared for inspection`,` `,(0,U.jsx)(gI,{$type:`inspectionSignaled`,children:e})]}):(0,U.jsxs)(`span`,{children:[vI(n.material),` passed over for inspection`,` `,(0,U.jsx)(gI,{$type:`inspectionNotSignaled`,children:e})]})}case V.WorkorderComment:return(0,U.jsxs)(`span`,{children:[`Workorder `,n.result,` Comment`]});case V.InspectionResult:return n.result.toLowerCase()===`false`?(0,U.jsxs)(gI,{$type:`inspectionSignaled`,children:[n.program,` Failed`]}):(0,U.jsxs)(gI,{$type:`inspectionSignaled`,children:[n.program,` Succeeded`]});case V.CloseOut:return n.result.toLowerCase()===`failed`?(0,U.jsxs)(gI,{$type:`closeoutFailed`,children:[n.program&&n.program!==``?n.program:`CloseOut`,` Failed`]}):(0,U.jsxs)(`span`,{children:[n.program&&n.program!==``?n.program:`CloseOut`,` Completed`]});case V.AddToQueue:switch(n.program){case`Unloaded`:return(0,U.jsxs)(`span`,{children:[yI(n.material),` unloaded into queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc})]});case`SetByOperator`:return(0,U.jsxs)(`span`,{children:[yI(n.material),` set manually into queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc})]});case`Quarantine`:return(0,U.jsxs)(`span`,{children:[yI(n.material),` quarantined into queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc})]});case`SwapMaterial`:return(0,U.jsxs)(`span`,{children:[yI(n.material),` swapped off pallet into queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc})]});case`MaterialMissingOnPallet`:return(0,U.jsxs)(`span`,{children:[yI(n.material),` removed from cell controller, added to queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc})]});default:return(0,U.jsxs)(`span`,{children:[yI(n.material),` added to queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc}),n.program&&n.program!==``?` (`+n.program+`)`:void 0]})}case V.RemoveFromQueue:return(0,U.jsxs)(`span`,{children:[yI(n.material),` removed from queue`,` `,(0,U.jsx)(gI,{$type:`queue`,children:n.loc})]});case V.PalletInStocker:return n.startofcycle?(0,U.jsxs)(`span`,{children:[(0,U.jsxs)(gI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at stocker`,` `,n.locnum]}):(0,U.jsxs)(`span`,{children:[(0,U.jsxs)(gI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` departed stocker`,` `,n.locnum]});case V.PalletOnRotaryInbound:return n.startofcycle?(0,U.jsxs)(`span`,{children:[(0,U.jsxs)(gI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` arrived at`,` `,(0,U.jsxs)(gI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]}):n.result==`RotateIntoWorktable`?(0,U.jsxs)(`span`,{children:[(0,U.jsxs)(gI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` rotated into`,` `,(0,U.jsxs)(gI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]}),` `,`worktable`]}):(0,U.jsxs)(`span`,{children:[(0,U.jsxs)(gI,{$type:`pallet`,children:[`Pallet `,n.pal]}),` left`,` `,(0,U.jsxs)(gI,{$type:`machine`,children:[n.loc,` `,n.locnum.toString()]})]});case V.SignalQuarantine:return(0,U.jsxs)(`span`,{children:[vI(n.material),` signaled for quarantine after unload`]});case V.SwapMaterialOnPallet:return(0,U.jsx)(`span`,{children:n.result});case V.InvalidateCycle:return(0,U.jsx)(`span`,{children:n.result});case V.Rebooking:return(0,U.jsxs)(`span`,{children:[`Rebooking requested with ID `,n.result]});case V.CancelRebooking:return(0,U.jsxs)(`span`,{children:[`Rebooking `,n.result,` canceled`]});default:return(0,U.jsx)(`span`,{children:n.result})}}function gie(e){let t=[];if(e.details&&e.details.operator&&t.push({name:`Operator`,value:e.details.operator}),e.details&&e.details.note&&t.push({name:`Note`,value:e.details.note}),e.tooluse)for(let n of e.tooluse){let e=null;if(n.toolUseDuringCycle&&n.toolUseDuringCycle!==``&&(e=Kk(n.toolUseDuringCycle).toFixed(1)+` minutes used during cycle.`,n.totalToolUseAtEndOfCycle&&n.configuredToolLife&&n.totalToolUseAtEndOfCycle!==``&&n.configuredToolLife!==``)){let t=Gk(n.totalToolUseAtEndOfCycle),r=Gk(n.configuredToolLife),i=t/r;e+=` Total use at end of cycle: ${(t/60).toFixed(1)}/${(r/60).toFixed(1)} minutes (${(i*100).toFixed(0)}%).`}if(n.toolUseCountDuringCycle&&n.toolUseCountDuringCycle>0&&(e=(e===null?``:` | `)+`${n.toolUseCountDuringCycle} use${n.toolUseCountDuringCycle>1?`s`:``} during cycle.`,n.totalToolUseCountAtEndOfCycle&&n.configuredToolLifeCount&&(e+=` Total use count at end of cycle: ${n.totalToolUseCountAtEndOfCycle}/${n.configuredToolLifeCount} (${(n.totalToolUseCountAtEndOfCycle/n.configuredToolLifeCount*100).toFixed(0)}%).`)),e!==null){let r=n.pocket>0?`${n.tool} [${n.pocket}]`:n.tool,i=n.toolSerialAtEndOfCycle??n.toolSerialAtStartOfCycle;i&&i!==``&&(r+=` (${i})`),t.push({name:r,value:e})}}return t}var _ie=[V.AddToQueue,V.RemoveFromQueue,V.LoadUnloadCycle,V.BasketLoadUnload,V.MachineCycle],vie=K(Mw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$highlightProc:e,$invalidCycle:t})=>({...e&&{backgroundColor:`#eeeeee`},...t&&{textDecoration:`line-through`}})),yie=(0,L.memo)(function(e){let t=gie(e.entry),n=e.highlightProcsGreaterOrEqualTo,r=R(vr);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(vie,{$highlightProc:n!==void 0&&e.entry.material.findIndex(e=>e.proc>=n)>=0&&_ie.indexOf(e.entry.type)>=0,$invalidCycle:_I(e.entry),children:[(0,U.jsx)(Z,{size:`small`,children:e.entry.endUTC.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`2-digit`})}),(0,U.jsx)(Z,{size:`small`,children:e.entry.endUTC.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}),(0,U.jsx)(Z,{size:`small`,children:mie(e.entry,r)}),(0,U.jsx)(Z,{size:`small`,children:hie(e,r)}),(0,U.jsx)(Z,{padding:`checkbox`,children:t.length>0?(0,U.jsx)($m,{style:{transition:`all ease 200ms`,transform:e.entry.counter===e.detailLogCounter?`rotate(90deg)`:`none`},onClick:t=>{e.setDetail(e.entry.counter===e.detailLogCounter?null:e.entry.counter),t.stopPropagation()},size:`small`,children:(0,U.jsx)(MT,{fontSize:`inherit`})}):void 0})]}),t.length>0&&e.entry.counter===e.detailLogCounter?(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:5,children:(0,U.jsx)(`ul`,{children:t.map((e,t)=>(0,U.jsxs)(`li`,{children:[e.name,`: `,e.value]},t))})})}):void 0]})}),bI=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null);return(0,U.jsxs)(yw,{children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Date`}),(0,U.jsx)(Z,{children:`Time`}),(0,U.jsx)(Z,{children:`Type`}),(0,U.jsx)(Z,{children:`Details`}),(0,U.jsx)(Z,{padding:`checkbox`,children:e.copyToClipboard?(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>mj(e.entries),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})}):void 0})]})}),(0,U.jsx)(Sw,{children:Array.from(fie(e.entries)).map((r,i)=>(0,U.jsx)(yie,{entry:r,detailLogCounter:t,setDetail:n,highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo},i))})]})}),xI=P(null),SI=P(e=>e(xI),(e,t,n)=>{n===null?(t(xI,null),t(jI,[])):t(xI,n)}),CI=P(async e=>{let t=e(xI);if(t&&t.type===`Barcode`){if(Bt===void 0)return null;let n=e(GI),r=t.toQueue?[t.toQueue]:n.route===$.Station_LoadMonitor||n.route===$.Station_Queues?n.queues:null;return await Bt.parseBarcode(t.barcode,r)}else return null}),wI=P(async e=>(await e(CI))?.potentialNewMaterial??null),TI=P(async e=>{let t=e(xI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc;case`MatSummary`:return t.summary;case`MatDetails`:return t.details;case`LogMat`:return{materialID:t.logMat.id,partName:t.logMat.part,serial:t.logMat.serial,workorderId:t.logMat.workorder};case`Barcode`:{let t=await e(CI);return t?.existingMaterial&&t.existingMaterial.materialID>=0?t.existingMaterial:null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return Ht===void 0?null:(await Ht.materialForSerial(t.serial))?.[0]??null}}),EI=Ak(TI,e=>e??null);function DI(e){return Ak(P(t=>t(e).then(e=>({state:`hasData`,data:e}),e=>({state:`hasError`,error:e}))),()=>({state:`loading`}))}var bie=DI(TI),OI=P(async e=>{let t=e(Fk),n=e(xI);if(n===null)return null;if(n.type===`InProcMat`)return n.inproc;let r=(await e(TI))?.materialID??null;return r!==null&&r>=0?t.material.find(e=>e.materialID===r)??null:null}),kI=P(async e=>{let t=e(xI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc.serial??null;case`MatSummary`:return t.summary.serial??null;case`MatDetails`:return t.details.serial??null;case`LogMat`:return t.logMat.serial??null;case`Barcode`:{let t=await e(CI);return t?.existingMaterial?.serial??t?.potentialNewMaterial?.serial??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return t.serial}});Ak(kI,e=>e??null);var xie=DI(kI),AI=P(async e=>{let t=e(xI);if(t===null)return null;switch(t.type){case`InProcMat`:return t.inproc.workorderId??null;case`MatSummary`:return t.summary.workorderId??null;case`MatDetails`:return t.details.workorder??null;case`LogMat`:return t.logMat.workorder??null;case`Barcode`:{let t=await e(CI);return t?.existingMaterial?.workorder??t?.potentialNewMaterial?.workorder??null}case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:return null}}),jI=P([]),Sie=Ak(P(async(e,{signal:t})=>{let n=await e(TI);return n===null||Ht===void 0?[]:n.materialID>=0?await Ht.logForMaterial(n.materialID,t):n.serial&&n.serial!==``?await Ht.logForSerial(n.serial):[]}),e=>e??[]),Cie=Ak(P(async(e,{signal:t})=>{let n=await e(kI);if(n===null||n===``)return[];let r=[];for(let e of Gt)r.push.apply(await e.logForSerial(n,t));return r}),e=>e??[]),MI=P(e=>{let t=e(jI);return Q.of(e(Sie)).concat(e(Cie)).sortBy(e=>e.endUTC.getTime(),e=>e.counter).concat(t).toRArray()}),NI=P(async e=>{let t=await e(TI);if(t===null)return null;let n=e(MI),r=Q.of(n).filter(e=>!_I(e)&&(e.type===V.LoadUnloadCycle||e.type===V.MachineCycle||e.type===V.AddToQueue)).flatMap(e=>e.material).filter(e=>e.id===t.materialID).maxBy(e=>e.proc);return r?{process:r.proc,totalNumProcesses:r.numproc}:null}),PI=P(e=>{let t=e(xI),n=e(MI);if(t===null)return{signaledInspections:[],completedInspections:[]};let r=new Set(t.type===`InProcMat`?t.inproc.signaledInspections:[]),i=new Set;return n.forEach(e=>{switch(e.type){case V.Inspection:if(e.result.toLowerCase()===`true`||e.result===`1`){let t=(e.details||{}).InspectionType;t&&r.add(t)}break;case V.InspectionForce:(e.result.toLowerCase()===`true`||e.result===`1`)&&r.add(e.program);break;case V.InspectionResult:i.add(e.program);break}}),{signaledInspections:Q.of(r).toSortedArray(e=>e),completedInspections:Q.of(i).toSortedArray(e=>e)}}),wie=P(async e=>{let t=await e(TI);if(t===null||t.partName===``)return[];let n=e(Fk)?.workorders??[];return Q.of(n).filter(e=>e.part===t.partName).toSortedArray(e=>e.dueDate.getTime(),e=>-e.priority)});function FI(){let[e,t]=(0,L.useState)(!1),n=z(jI);return[(0,L.useCallback)(e=>{t(!0),Ht.setInspectionDecision(e.mat.materialID,e.inspType,1,e.inspect).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function Tie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Ht.recordInspectionCompleted(new jt({materialID:e.mat.materialID,process:1,inspectionLocationNum:1,inspectionType:e.inspType,success:e.success,active:`PT0S`,elapsed:`PT0S`,extraData:e.operator?{operator:e.operator}:void 0})).catch(console.log).finally(()=>t(!1))},[]),e]}function II(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Ht.recordCloseoutCompleted(new Mt({materialID:e.mat.materialID,process:1,locationNum:1,closeoutType:``,active:`PT0S`,elapsed:`PT0S`,extraData:e.operator?{operator:e.operator}:void 0,failed:e.failed})).catch(console.log).finally(()=>t(!1))},[]),e]}function LI(){let[e,t]=(0,L.useState)(!1),n=z(jI);return[(0,L.useCallback)((e,r)=>{t(!0),Ht.setWorkorder(e.materialID,1,r).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function Eie(){let[e,t]=(0,L.useState)(!1),n=z(jI);return[(0,L.useCallback)(e=>{t(!0),Ht.recordOperatorNotes(e.matId,e.process,e.operator,e.notes).then(e=>n(t=>[...t,e])).catch(console.log).finally(()=>t(!1))},[n]),e]}function RI(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Bt.printLabel(e.materialId,e.proc).catch(console.log).finally(()=>{t(!1),r(!0)})},[]),e,n]}function Die(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)((e,n)=>{t(!0),Vt.removeMaterialFromAllQueues(e,n??void 0).catch(console.log).finally(()=>t(!1))},[]),e]}function Oie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)((e,n,r)=>{t(!0),Vt.signalMaterialForQuarantine(e,n,r===``?void 0:r).catch(console.log).finally(()=>t(!1))},[]),e]}function zI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Vt.setMaterialInQueue(e.materialId,e.operator,new kt({queue:e.queue,position:e.queuePosition})).catch(console.log).finally(()=>t(!1))},[]),e]}function kie(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Vt.addUnprocessedMaterialToQueue(e.jobUnique,e.lastCompletedProcess,e.queue,e.queuePosition,e.operator,e.workorder,e.serial||``).then(t=>{e.onNewMaterial&&t?e.onNewMaterial(t):e.onError&&e.onError(`No material returned`)},e.onError).catch(console.log).finally(()=>t(!1))},[]),e]}function BI(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>{t(!0),Vt.addUnallocatedCastingToQueue(e.casting,e.queue,e.quantity,e.operator,e.workorder,[...e.serials||[]]).then(t=>{e.onNewMaterial&&e.onNewMaterial(t)},e.onError).catch(console.log).finally(()=>t(!1))},[]),e]}var $=function(e){return e.ChooseMode=`/`,e.Station_LoadMonitor=`/station/loadunload/:num`,e.Station_InspectionMonitor=`/station/inspection`,e.Station_InspectionMonitorWithType=`/station/inspection/:type`,e.Station_Closeout=`/station/closeout`,e.Station_Queues=`/station/queues`,e.Station_Overview=`/station/overview`,e.Operations_Dashboard=`/operations`,e.Operations_LoadOutliers=`/operations/load-outliers`,e.Operations_LoadHours=`/operations/load-hours`,e.Operations_LoadCycles=`/operations/load-cycles`,e.Operations_MachineOutliers=`/operations/machine-outliers`,e.Operations_MachineHours=`/operations/machine-hours`,e.Operations_MachineCycles=`/operations/machine-cycles`,e.Operations_SystemOverview=`/operations/system-overview`,e.Operations_AllMaterial=`/operations/material`,e.Operations_RecentSchedules=`/operations/recent-schedules`,e.Operations_CurrentWorkorders=`/operations/current-workorders`,e.Operations_Production=`/operations/recent-production`,e.Operations_Tools=`/operations/tools`,e.Operations_Programs=`/operations/programs`,e.Operations_Quality=`/operations/quality`,e.Operations_Inspections=`/operations/inspections`,e.Operations_CloseoutReport=`/operations/closeout`,e.Operations_Rebookings=`/analysis/rebookings`,e.Operations_Parts=`/operations/parts`,e.Engineering_Cycles=`/engineering`,e.Engineering_Hours=`/engineering/hours`,e.Engineering_Outliers=`/engineering/outliers`,e.Quality_Dashboard=`/quality`,e.Quality_Paths=`/quality/paths`,e.Quality_Quarantine=`/quality/quarantine`,e.Tools_Dashboard=`/tools`,e.Tools_Programs=`/tools/programs`,e.Analysis_Buffers=`/analysis/buffers`,e.Analysis_StationOEE=`/analysis/station-oee`,e.Analysis_PartsCompleted=`/analysis/parts-completed`,e.Analysis_MachineCycles=`/analysis/machine-cycles`,e.Analysis_LoadCycles=`/analysis/load-cycles`,e.Analysis_PalletCycles=`/analysis/pallet-cycles`,e.Analysis_BasketCycles=`/analysis/basket-cycles`,e.Analysis_Schedules=`/analysis/schedules`,e.Analysis_Quality=`/analysis/quality`,e.Analysis_ToolReplacements=`/analysis/tool-replacements`,e.Analysis_CostPercents=`/analysis/cost-percents`,e.Analysis_CostPerPiece=`/analysis/cost`,e.Sales_Dashboard=`/sales`,e.Sales_ProjectedUsage=`/sales/projected-usage`,e.VerboseLogging=`/logging`,e.Client_Custom=`/client/:custom+`,e}({}),Aie=Q.ofObject($).map(([,e])=>[e,new URLPattern(e,location.origin)]).append([`/operations/recent-schedules`,new URLPattern(`/operations/completed`,location.origin)]).append([`/station/closeout`,new URLPattern(`/station/wash`,location.origin)]).toRArray();function VI(e){switch(e.route){case`/station/loadunload/:num`:if(e.queues.length>0||e.completed){let t=new URLSearchParams;for(let n of e.queues)t.append(`queue`,n);return e.completed&&t.append(`completed`,`t`),`/station/loadunload/${e.loadNum}?${t.toString()}`}else return`/station/loadunload/${e.loadNum}`;case`/station/inspection/:type`:return`/station/inspection/${encodeURIComponent(e.inspType)}`;case`/station/queues`:if(e.queues.length>0){let t=new URLSearchParams;for(let n of e.queues)t.append(`queue`,n);return`/station/queues?${t.toString()}`}else return`/station/queues`;case`/operations/current-workorders`:if(e.workorder){let t=new URLSearchParams;return t.append(`workorder`,e.workorder),`/operations/current-workorders?${t.toString()}`}else return`/operations/current-workorders`;case`/client/:custom+`:return`/client/`+e.custom.map(e=>encodeURIComponent(e)).join(`/`);default:return e.route}}function HI(e){for(let[t,n]of Aie){let r=n.exec(e.origin+e.pathname)?.pathname?.groups;if(r)switch(t){case`/station/loadunload/:num`:return{route:t,loadNum:parseInt(r.num??`1`),queues:e.searchParams.getAll(`queue`),completed:e.searchParams.has(`completed`)};case`/station/inspection/:type`:{let e=r.type;return e?{route:`/station/inspection/:type`,inspType:e}:{route:`/station/inspection`}}case`/station/queues`:return{route:`/station/queues`,queues:e.searchParams.getAll(`queue`)};case`/operations/current-workorders`:return{route:`/operations/current-workorders`,workorder:e.searchParams.get(`workorder`)??void 0};case`/client/:custom+`:return{route:`/client/:custom+`,custom:r?.custom?.split(`/`)?.map(e=>decodeURIComponent(e))??[]};default:return{route:t}}}return{route:`/`}}var UI=P(HI(new URL(location.href))),WI=P(!1),GI=P(e=>e(UI),(e,t,n)=>{let r=e(WI);t(UI,n),t(SI,null),r||history.pushState(null,``,VI(n))});function jie({to:e,children:t}){let n=z(GI);return(0,L.createElement)(dx,{href:VI(e),onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e)}},t)}function Mie(){let e=R(WI),t=z(UI);(0,L.useEffect)(()=>{if(e)return;function n(){t(HI(new URL(location.href)))}return addEventListener(`popstate`,n),()=>removeEventListener(`popstate`,n)},[e,t])}function KI(){return R(WI)}function qI(e){(0,L.useEffect)(()=>{document.title=e+` - FMS Insight`},[KI(),e])}function Nie(e){switch(e.route){case`/station/loadunload/:num`:case`/station/inspection`:case`/station/inspection/:type`:case`/station/closeout`:case`/station/queues`:case`/station/overview`:return`https://www.seedtactics.com/docs/fms-insight/client-station-monitor`;case`/operations`:case`/operations/load-outliers`:case`/operations/load-hours`:case`/operations/load-cycles`:case`/operations/system-overview`:case`/operations/material`:case`/operations/recent-schedules`:case`/operations/current-workorders`:case`/operations/closeout`:case`/operations/recent-production`:case`/analysis/rebookings`:case`/operations/parts`:return`https://www.seedtactics.com/docs/fms-insight/client-operations`;case`/operations/machine-outliers`:case`/operations/machine-hours`:case`/operations/machine-cycles`:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case`/operations/quality`:case`/operations/inspections`:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case`/operations/tools`:case`/operations/programs`:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case`/engineering`:case`/engineering/outliers`:case`/engineering/hours`:return`https://www.seedtactics.com/docs/fms-insight/client-engineering`;case`/quality`:case`/quality/paths`:case`/quality/quarantine`:return`https://www.seedtactics.com/docs/fms-insight/client-quality`;case`/tools`:case`/tools/programs`:return`https://www.seedtactics.com/docs/fms-insight/client-tools-programs`;case`/analysis/schedules`:case`/analysis/buffers`:case`/analysis/station-oee`:case`/analysis/parts-completed`:case`/analysis/machine-cycles`:case`/analysis/load-cycles`:case`/analysis/pallet-cycles`:case`/analysis/quality`:case`/analysis/cost-percents`:case`/analysis/tool-replacements`:case`/analysis/cost`:return`https://www.seedtactics.com/docs/fms-insight/client-efficiency`;case`/sales`:case`/sales/projected-usage`:return`https://www.seedtactics.com/docs/fms-insight/client-sales`;default:return`https://www.seedtactics.com/docs/fms-insight/client-launch`}}var JI=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1});function Pie(){let e=new Date;return t=>{if(!t.simulatedProduction)return 0;let n=0;for(let r of t.simulatedProduction){if(r.timeUTC>e)break;n=r.quantity}return n}}var YI=(0,L.memo)(function(){let e=R(Fk),t=Q.ofObject(e.jobs).sumBy(([,e])=>Q.of(e.completed??[]).sumBy(e=>Q.of(e).sumBy(e=>e))),n=Q.ofObject(e.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).sumBy(Pie()),r=Q.ofObject(e.jobs).sumBy(([,e])=>(e.cycles??0)*e.procsAndPaths.length);return(0,U.jsx)(Y,{sx:{maxWidth:`60em`,ml:`auto`,mr:`auto`,pt:`1em`},children:(0,U.jsxs)(Y,{sx:{display:`grid`,gridTemplateColumns:`auto 1fr auto`,gridColumnGap:`0.5em`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{gridRow:1,gridColumn:1},children:(0,U.jsxs)(J,{variant:`body2`,children:[`Completed Parts: `,t,`/`,r]})}),(0,U.jsx)(Y,{sx:{gridRow:1,gridColumn:2},children:(0,U.jsx)(ix,{variant:`determinate`,value:t/r*100,color:`secondary`})}),(0,U.jsx)(Y,{sx:{gridRow:1,gridColumn:3},children:(0,U.jsx)(J,{variant:`body2`,children:JI.format(t/r)})}),(0,U.jsx)(Y,{sx:{gridRow:2,gridColumn:1},children:(0,U.jsxs)(J,{variant:`body2`,children:[`Simulated Parts: `,n,`/`,r]})}),(0,U.jsx)(Y,{sx:{gridRow:2,gridColumn:2},children:(0,U.jsx)(ix,{variant:`determinate`,value:n/r*100,color:`secondary`})}),(0,U.jsx)(Y,{sx:{gridRow:2,gridColumn:3},children:(0,U.jsx)(J,{variant:`body2`,children:JI.format(n/r)})})]})})});function Fie(){let{ref:e,width:t,height:n}=Nj({refreshMode:`debounce`,refreshRate:100});return(0,U.jsxs)(`main`,{style:{height:`calc(100vh - 64px)`,display:`flex`,flexDirection:`column`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(YI,{})}),(0,U.jsx)(`div`,{ref:e,style:{flexGrow:1,overflow:`hidden`,margin:`8px`},children:t&&n&&(0,U.jsx)(xF,{width:t,height:n})})]})}function Iie(){let{ref:e,width:t}=Nj({refreshMode:`debounce`,refreshRate:100,handleHeight:!1});return(0,U.jsxs)(`main`,{style:{padding:`8px`},children:[(0,U.jsx)(YI,{}),(0,U.jsx)(`div`,{ref:e,style:{overflow:`hidden`},children:t&&(0,U.jsx)(xF,{width:t,height:500})})]})}function Lie(){return qI(`Dashboard`),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Y,{sx:{display:{xs:`none`,md:`block`}},children:(0,U.jsx)(Fie,{})}),(0,U.jsx)(Y,{sx:{display:{xs:`block`,md:`none`}},children:(0,U.jsx)(Iie,{})})]})}var XI=P([]),ZI=XI,QI=P([]),Rie=QI;function*$I(e){for(let t of e)for(let e=0;e<t.procsAndPaths.length;e++){let n=t.procsAndPaths[e];for(let r=0;r<n.paths.length;r++){let i=n.paths[r],a=0;for(let e of i.stops)a+=Kk(e.expectedCycleTime);let o=0;for(let n of i.simulatedProduction||[])yield{partName:t.partName,process:e+1,finalProcess:e===t.procsAndPaths.length-1,completeTime:n.timeUTC,quantity:n.quantity-o,expectedMachineMins:a},o=n.quantity}}}var zie=P(null,(e,t,n)=>{t(XI,e=>[...e,...$I(Object.values(n.jobs))])}),Bie=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs){let e=n.newJobs.jobs;t(XI,t=>{if(i){let n=RE(r,-30),i=Q.of(t).minBy(e=>e.completeTime.getTime());if((i===void 0||i.completeTime>=n)&&e.length===0)return t;t=t.filter(e=>e.completeTime>=n)}return[...t,...$I(e)]})}}),Vie=P(null,(e,t,n)=>{t(QI,Array.from($I(Object.values(n.jobs))))}),eL=P(ok.empty()),Hie=eL,tL=P(ok.empty()),Uie=tL;function nL(e){if(e.elapsed===``)return null;let t=Gk(e.elapsed);if(t<=0)return null;switch(e.type){case V.RemoveFromQueue:return[e.counter,{buffer:{type:`Queue`,queue:e.loc},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case V.PalletInStocker:return!e.startofcycle&&e.result===`WaitForMachine`?[e.counter,{buffer:{type:`StockerWaitForMC`,stockerNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}]:e.startofcycle?null:[e.counter,{buffer:{type:`StockerWaitForUnload`,stockerNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];case V.PalletOnRotaryInbound:return e.startofcycle?null:[e.counter,{buffer:{type:`Rotary`,machineGroup:e.loc,machineNum:e.locnum},endTime:e.endUTC,elapsedSeconds:t,numMaterial:e.material.length}];default:return null}}var Wie=P(null,(e,t,n)=>{t(eL,e=>e.union(Q.of(n).collect(nL).toHashMap(e=>e)))}),Gie=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(!n.logEntry)return;let a=nL(n.logEntry);a&&t(eL,e=>{if(i){let t=RE(r,-30);e=e.filter(e=>e.endTime>=t)}return e.set(a[0],a[1])})}),Kie=P(null,(e,t,n)=>{t(tL,Q.of(n).collect(nL).toHashMap(e=>e))}),qie=P(null),rL=P(null,(e,t,n)=>{t(qie,n)}),iL=function(e){return e[e.Triggered=0]=`Triggered`,e[e.Forced=1]=`Forced`,e[e.Completed=2]=`Completed`,e}({}),aL=class{constructor(e,t){this.part=e,this.inspType=t}compare(e){let t=this.part.localeCompare(e.part);return t===0?this.inspType.localeCompare(e.inspType):t}hash(){return xO(this.part,this.inspType)}toString(){return`{part: ${this.part}}, inspType: ${this.inspType}}`}},oL=P(ok.empty()),sL=oL,cL=P(ok.empty()),Jie=cL;function lL(e){return e.type!==V.Inspection&&e.type!==V.InspectionForce&&e.type!==V.InspectionResult?[]:e.material.map(t=>{if(e.type===V.Inspection){let n=JSON.parse((e.details||{}).ActualPath||`[]`),r=Array.isArray(n)?n:[],i=[];for(let e of r)i.push(Ne.fromJS(e));let a=(e.details||{}).InspectionType||``,o;return o=e.result.toLowerCase()===`true`||e.result===`1`,{key:new aL(t.part,a),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:0,actualPath:i,toInspect:o},part:t.part,inspType:a}}}else if(e.type===V.InspectionForce){let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new aL(t.part,e.program),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:1,toInspect:n},part:t.part,inspType:e.program}}}else{let n;return n=e.result.toLowerCase()===`true`||e.result===`1`,{key:new aL(t.part,e.program),entry:{cntr:e.counter,time:e.endUTC,materialID:t.id,serial:t.serial,workorder:t.workorder,result:{type:2,success:n},part:t.part,inspType:e.program}}}})}var Yie=P(null,(e,t,n)=>{t(oL,e=>e.union(Q.of(n).flatMap(lL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t)))}),Xie=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=lL(n.logEntry);if(e.length===0)return;t(oL,t=>{if(i){let e=RE(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size===0?null:n})}return t.union(Q.of(e).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry),(e,t)=>e.union(t))})}else if(n.editMaterialInLog){let e=n.editMaterialInLog.editedEvents;t(oL,t=>t.collectValues(t=>{for(let n of e){let e=n?.material[0],r=t.get(n.counter);if(r!==void 0&&e){let i={...r,materialID:e.id,serial:e.serial,workorder:e.workorder};t=t.set(n.counter,i)}}return t}))}}),Zie=P(null,(e,t,n)=>{t(cL,Q.of(n).flatMap(lL).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry))}),uL=P({matsById:ok.empty(),matIdsForJob:ok.empty()}),dL=uL,fL=P({matsById:ok.empty(),matIdsForJob:ok.empty()}),pL=fL;function mL(e){return{materialID:e.materialID,jobUnique:e.jobUnique,partName:e.partName,startedProcess1:e.process>0,serial:e.serial,workorderId:e.workorderId,signaledInspections:e.signaledInspections,quarantineAfterUnload:e.quarantineAfterUnload}}function hL(e,t){let n=e.matsById,r=e.matIdsForJob;if(t.startofcycle||t.material.length===0)return e;for(let e of t.material){if(e.uniq&&e.uniq!==``){let t=r.get(e.uniq);t===void 0?r=r.set(e.uniq,ZO.empty().add(e.id)):t.has(e.id)||(r=r.set(e.uniq,t.add(e.id)))}let i=n.get(e.id),a;switch(a=i===void 0?{materialID:e.id,jobUnique:e.uniq,partName:e.part,last_event:t.endUTC,startedProcess1:!1,numProcesses:e.numproc,unloaded_processes:{},signaledInspections:[],quarantineAfterUnload:null,completedInspections:{}}:{...i,last_event:t.endUTC},t.type){case V.PartMark:a={...a,serial:t.result};break;case V.OrderAssignment:a={...a,workorderId:t.result};break;case V.Inspection:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=(t.details||{}).InspectionType;e&&(a={...a,signaledInspections:[...a.signaledInspections,e]})}break;case V.InspectionForce:if(t.result.toLowerCase()===`true`||t.result===`1`){let e=t.program;a={...a,signaledInspections:[...a.signaledInspections,e]}}break;case V.InspectionResult:{let e=t.result.toLowerCase()==`true`||t.result===`1`;a={...a,completedInspections:{...a.completedInspections,[t.program]:{time:t.endUTC,success:e}},completed_inspect_time:t.endUTC};break}case V.LoadUnloadCycle:t.result===`UNLOAD`?(a={...a,unloaded_processes:{...a.unloaded_processes,[e.proc]:t.endUTC},quarantineAfterUnload:!1,currently_quarantined:!1},a=e.proc===e.numproc?{...a,last_unload_time:t.endUTC,completed_last_proc_machining:!0}:{...a,last_unload_time:t.endUTC}):t.result===`LOAD`&&(a={...a,startedProcess1:!0,quarantineAfterUnload:!1,currently_quarantined:!1});break;case V.MachineCycle:a.currently_quarantined&&(a={...a,currently_quarantined:!1});break;case V.AddToQueue:t.program===`Quarantine`&&(a={...a,currently_quarantined:!0});break;case V.CloseOut:a={...a,closeout_completed:t.endUTC,closeout_failed:t.result===`Failed`};break;case V.SignalQuarantine:a={...a,quarantineAfterUnload:!0}}n=n.set(e.id,a)}return{matsById:n,matIdsForJob:r}}function gL(e,{matIdsForJob:t,matsById:n}){let r=n.valuesToLazySeq().filter(t=>t.last_event<e).toRSet(e=>e.materialID);return r.size>0&&(t=t.collectValues(e=>{let t=Q.of(r).fold(e,(e,t)=>e.delete(t));return t.size>0?t:null})),n=n.filter(t=>t.last_event>=e),{matIdsForJob:t,matsById:n}}function _L(e,t){let n=t.matIdsForJob,r=t.matsById.get(e.oldMaterialID)??null,i=t.matsById.get(e.newMaterialID)??null;if(r===null)return t;let a=r,o;if(o=i===null?{materialID:e.newMaterialID,jobUnique:a.jobUnique,partName:a.partName,last_event:a.last_event,numProcesses:a.numProcesses,startedProcess1:!0,unloaded_processes:{},signaledInspections:[],quarantineAfterUnload:null,completedInspections:{}}:i,a.jobUnique&&a.jobUnique!==``&&(!o.jobUnique||o.jobUnique===``)){let e=n.get(a.jobUnique);e!==void 0&&(n=n.set(a.jobUnique,e.delete(a.materialID).add(o.materialID))),o={...o,jobUnique:a.jobUnique},a={...a,jobUnique:``}}let s=a.unloaded_processes;a={...a,unloaded_processes:o.unloaded_processes},o={...o,unloaded_processes:s};for(let t of e.editedEvents){let n=t.material.find(t=>t.id===e.newMaterialID);switch(n&&(o={...o,serial:n.serial??o.serial,workorderId:n.workorder??o.workorderId}),t.type){case V.Inspection:case V.InspectionForce:{let e=t.program,n;n=t.result.toLowerCase()===`true`||t.result===`1`,n&&(a={...a,signaledInspections:Q.of(a.signaledInspections).filter(t=>t!==e).toRArray()},o={...o,signaledInspections:Q.of([...o.signaledInspections,e]).distinct().toSortedArray(e=>e)})}}}return{matsById:t.matsById.set(a.materialID,a).set(o.materialID,o),matIdsForJob:n}}var vL=P(null,(e,t,n)=>{t(uL,e=>n.reduce(hL,e))}),yL=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry){let e=n.logEntry;t(uL,t=>{let n=hL(t,e);return n===t||!i?t:gL(RE(r,-30),n)})}else if(n.editMaterialInLog){let e=n.editMaterialInLog;t(uL,t=>_L(e,t))}}),bL=P(null,(e,t,n)=>{t(fL,n.reduce(hL,{matsById:ok.empty(),matIdsForJob:ok.empty()}))}),xL=P(new Set),SL=xL,CL=P(new Set),wL=CL,TL=P(new Set),EL=TL,DL=P(new Set),OL=DL,kL=P(null,(e,t,{evt:n})=>{n.newJobs?NL(t,n.newJobs.jobs):n.logEntry?FL(t,[n.logEntry]):n.newCurrentStatus&&PL(e,t,n.newCurrentStatus)}),AL=P(null,(e,t,n)=>{NL(t,Object.values(n.jobs))}),jL=P(null,(e,t,n)=>FL(t,n)),ML=P(null,PL);function NL(e,t){e(TL,e=>{let n=new Set;for(let r of t)for(let t of r.procsAndPaths[0].paths)t.casting&&t.casting!==``&&!e.has(t.casting)&&n.add(t.casting);return n.size===0?e:new Set([...e,...n])})}function PL(e,t,n){NL(t,Object.values(n.jobs));let r=e(xL),i=e(CL),a=new Set,o=new Set;for(let[e,t]of Q.ofObject(n.queues))t.role===ct.RawMaterial?r.has(e)||a.add(e):t.role===ct.InProcessTransfer&&(i.has(e)||o.add(e));a.size>0&&t(xL,new Set([...r,...a])),o.size>0&&t(CL,new Set([...i,...o]))}function FL(e,t){e(DL,e=>{let n=new Set;for(let r of t)switch(r.type){case V.Inspection:{let t=(r.details||{}).InspectionType;t&&!e.has(t)&&n.add(t)}break;case V.InspectionForce:case V.InspectionResult:{let t=r.program;e.has(t)||n.add(t)}break}return n.size===0?e:new Set([...e,...n])})}var IL=P(ok.empty()),LL=IL;function RL(e,t,n){if(e.tooluse===void 0||e.tooluse.length===0||e.type!==V.MachineCycle)return n;let r=e.material.length>0?t.get(qk.ofLogCycle(e)):void 0,i=Kk(e.elapsed);if(r===void 0||Qk(r,i))return n;let a=qk.ofLogCycle(e),o=Q.of(e.tooluse).groupBy(e=>e.tool).map(([e,t])=>({toolName:e,cycleUsageMinutes:Q.of(t).sumBy(e=>e.toolUseDuringCycle&&e.toolUseDuringCycle!==``?Kk(e.toolUseDuringCycle):0),cycleUsageCnt:Q.of(t).sumBy(e=>e.toolUseCountDuringCycle??0),toolChangedDuringMiddleOfCycle:Q.of(t).some(e=>e.toolChangeOccurred??!1)})).toRArray();return o.length===0&&n.has(a)?n:n.modify(a,t=>{if(t){let n=t.recentCycles.slice(-4);return n.push({tools:o}),{machines:t.machines.add(mA(e.loc,e.locnum)),recentCycles:n}}else return{machines:ek.empty().add(mA(e.loc,e.locnum)),recentCycles:[{tools:o}]}})}var zL=P(null,(e,t,n)=>{let r=e(Yk);t(IL,e=>n.reduce((e,t)=>RL(t,r,e),e))}),BL=P(null,(e,t,{evt:n})=>{if(n.logEntry){let r=n.logEntry,i=e(Yk);t(IL,e=>RL(r,i,e))}}),VL=P(ok.empty()),HL=VL,UL=P(ok.empty()),WL=UL;function GL(e){return{cntr:e.counter,x:e.endUTC,y:Kk(e.elapsed),active:Kk(e.active),mats:e.material}}var KL=P(null,(e,t,n)=>{t(VL,e=>e.union(Q.of(n).filter(e=>!e.startofcycle&&e.type===V.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,GL),(e,t)=>e.union(t)))}),qL=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===V.PalletCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(VL,t=>{if(i){let e=RE(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.x>=e);return n.size>0?n:null})}return t.modify(e.pal,t=>(t??ok.empty()).set(e.counter,GL(e)))})}}),JL=P(null,(e,t,n)=>{t(UL,Q.of(n).filter(e=>!e.startofcycle&&e.type===V.PalletCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,GL))}),YL=P(ok.empty()),XL=YL,ZL=P(e=>e(YL).size>0),QL=P(ok.empty()),$L=QL,eR=P(e=>e(QL).size>0);function tR(e){return{cntr:e.counter,x:e.endUTC,y:Kk(e.elapsed),active:Kk(e.active),mats:e.material}}var nR=P(null,(e,t,n)=>{t(YL,e=>e.union(Q.of(n).filter(e=>!e.startofcycle&&e.type===V.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,tR),(e,t)=>e.union(t)))}),rR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===V.BasketCycle&&n.logEntry.pal!==0){let e=n.logEntry;t(YL,t=>{if(i){let e=RE(r,-30);t=t.collectValues(t=>{let n=t.filter(t=>t.x>=e);return n.size>0?n:null})}return t.modify(e.pal,t=>(t??ok.empty()).set(e.counter,tR(e)))})}}),iR=P(null,(e,t,n)=>{t(QL,Q.of(n).filter(e=>!e.startofcycle&&e.type===V.BasketCycle&&e.pal!==0).toLookupMap(e=>e.pal,e=>e.counter,tR))}),aR=class e{constructor(e,t){this.group=e,this.num=t}static ofLogCycle(t){return new e(t.loc,t.locnum)}hash(){return xO(this.group,this.num)}compare(e){return this.group===e.group?this.num-e.num:this.group.localeCompare(e.group)}toString(){return this.group+` #`+this.num.toString()}},oR={replacements:nk.empty(),recentUse:ok.empty()},sR=P(oR),cR=P(e=>e(sR).replacements),lR=P(oR),uR=P(e=>e(lR).replacements);function dR(e,t){let n=aR.ofLogCycle(t);return{replacements:e.replacements.alter(n,r=>{let i=[];for(let r of t.tooluse??[]){let t=r.toolUseDuringCycle!==null&&r.toolUseDuringCycle!==void 0?Kk(r.toolUseDuringCycle):null,a=r.totalToolUseAtEndOfCycle!==null&&r.totalToolUseAtEndOfCycle!==void 0?Kk(r.totalToolUseAtEndOfCycle):null,o=r.toolUseCountDuringCycle??null,s=r.totalToolUseCountAtEndOfCycle??null;if((t||o)&&t===a&&o===s){let t=e.recentUse.get(n)?.find(e=>e.tool===r.tool&&e.pocket===r.pocket);if(t){let e=t.totalToolUseAtEndOfCycle?Kk(t.totalToolUseAtEndOfCycle):null;(e||t.totalToolUseCountAtEndOfCycle)&&i.push({tool:r.tool,pocket:r.pocket,type:`ReplaceBeforeCycleStart`,useAtReplacement:e,cntAtReplacement:t.totalToolUseCountAtEndOfCycle??null})}}else if(r.toolChangeOccurred&&(t&&r.configuredToolLife||o&&r.configuredToolLifeCount)){let e=r.configuredToolLife!==null&&r.configuredToolLife!==void 0?Kk(r.configuredToolLife):null,n=r.configuredToolLifeCount??null;i.push({tool:r.tool,pocket:r.pocket,type:`ReplaceInCycle`,totalUseAtBeginningOfCycle:e!==null&&t!==null?e-t+(a??0):null,totalUseAtEndOfCycle:a,totalCntAtBeginningOfCycle:n!==null&&o!==null?n-o+(s??0):null,totalCntAtEndOfCycle:s})}}return i.length>0?(r??nk.empty()).set(t.counter,{time:t.endUTC,replacements:i}):r}),recentUse:t.tooluse?e.recentUse.set(n,t.tooluse):e.recentUse}}var fR=P(null,(e,t,n)=>{t(sR,e=>Q.of(n).filter(e=>e.type===V.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(e,dR))}),pR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.logEntry&&!n.logEntry.startofcycle&&n.logEntry.type===V.MachineCycle&&n.logEntry.tooluse&&n.logEntry.tooluse.length>0){let e=n.logEntry;t(sR,t=>{if(i){let e=RE(r,-30);t={replacements:t.replacements.collectValues(t=>{let n=t.filter(t=>t.time>=e);return n.size>0?n:null}),recentUse:t.recentUse}}return dR(t,e)})}}),mR=P(null,(e,t,n)=>{t(lR,Q.of(n).filter(e=>e.type===V.MachineCycle&&!e.startofcycle&&!!e.tooluse&&e.tooluse.length>0).fold(oR,dR))}),hR=P(null),gR=hR;function _R(e,t,n,r){let i=e(gR);(i===null||i.simId<n)&&t(hR,{simId:n,usage:r})}var vR=P(null,(e,t,n)=>{!n.mostRecentSimulationId||!n.mostRecentSimDayUsage||n.mostRecentSimDayUsage.length===0||_R(e,t,n.mostRecentSimulationId,n.mostRecentSimDayUsage)}),yR=P(null,(e,t,{evt:n})=>{n.newJobs&&n.newJobs.simDayUsage&&n.newJobs.simDayUsage.length>0&&_R(e,t,n.newJobs.scheduleId,n.newJobs.simDayUsage)}),bR=P(nk.empty()),xR=Ak(P(async(e,{signal:t})=>{if(Vt===void 0)return nk.empty();let n=await Vt.unscheduledRebookings(t);return nk.build(n,e=>e.bookingId)}),e=>e??nk.empty()),SR=P(e=>{let t=e(bR),n=e(xR);return t.union(n,(e,t)=>e??t)}),CR=P(nk.empty()),wR=CR,TR=P(nk.empty()),ER=TR;function DR(e){let t=1;return e.details?.Quantity&&(t=parseInt(e.details.Quantity,10)),{bookingId:e.result,partName:e.program,quantity:t,timeUTC:e.endUTC,priority:e.locnum,notes:e.details?.Notes,workorder:e.details?.Workorder??e.material?.[0]?.workorder}}var OR=P(null,(e,t,n)=>{t(bR,e=>e.union(Q.of(n).filter(e=>e.type===V.Rebooking).toOrderedMap(e=>[e.result,DR(e)]))),t(CR,e=>e.union(Q.of(n).filter(e=>e.type===V.CancelRebooking).toOrderedMap(e=>[e.result,e.endUTC])))});function kR(e,t,n){e(TR,e=>(n&&(e=e.filter(e=>e.scheduledTime>=n)),e.union(t.flatMap(e=>(e.bookings??[]).map(t=>[t,{scheduledTime:e.routeStartUTC,jobUnique:e.unique}])).toOrderedMap(e=>e))))}var AR=P(null,(e,t,n)=>{kR(t,Q.ofObject(n.jobs).map(([,e])=>e))}),jR=P(null,(e,t,{evt:n,now:r,expire:i})=>{if(n.newJobs)kR(t,Q.of(n.newJobs.jobs),i?RE(r,-30):void 0);else if(n.logEntry){let e=n.logEntry;e.type===V.Rebooking?t(bR,t=>t.set(e.result,DR(e))):e.type===V.CancelRebooking&&t(CR,t=>t.set(e.result,e.endUTC))}});function MR(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),Ht.cancelRebooking(e).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}function NR(){let[e,t]=(0,L.useState)(!1);return[(0,L.useCallback)(e=>(t(!0),Ht.requestRebooking(e.part,e.qty&&!isNaN(e.qty)?e.qty:1,e.workorder,e.priority!==void 0&&e.priority!==null&&!isNaN(e.priority)?e.priority:void 0,e.notes).then(()=>{}).catch(console.log).finally(()=>t(!1))),[]),e]}var PR=P(null),FR=PR,IR=P(null,(e,t,n)=>{if(n.evt.newCurrentStatus&&t(rL,n.evt.newCurrentStatus.customState??null),t(Bie,n),t(xj,n),t(gk,n),t(Gie,n),t(Bk,n),t(yL,n),t(Xie,n),t(kL,n),t(BL,n),t(qL,n),t(rR,n),t(pR,n),t(jA,n),t(jR,n),t(yR,n),n.evt.logEntry){let e=n.evt.logEntry.counter;t(PR,t=>t===null?t:Math.max(t,e))}}),LR=P(null,(e,t,n)=>{let r=mk(e(dk),n);t(bj,r),t(zie,r),t(hk,r),t(AL,r),t(vR,r),t(AR,r)}),RR=P(null,(e,t,n)=>{t(oA,n),t(Wie,n),t(Yie,n),t(vL,n),t(jL,n),t(zL,n),t(KL,n),t(nR,n),t(fR,n),t(AA,n),t(OR,n);let r=Q.of(n).maxBy(e=>e.counter)?.counter??null;t(PR,e=>e===null?r:Math.max(e,r??-1))}),zR=P(null,(e,t,n)=>{t(zk,n),t(rL,n.customState??null),t(ML,n)}),BR=P(null,(e,t,n)=>{t(Sj,n),t(Vie,n),t(_k,n)}),VR=P(null,(e,t,n)=>{t(sA,n),t(Kie,n),t(Zie,n),t(bL,n),t(JL,n),t(iR,n),t(mR,n),t(MA,n)}),HR=P(`Last30`),UR=P(sD(new Date)),WR=P(e=>e(UR),(e,t,n)=>{t(HR,`SpecificMonth`),t(UR,n),e(KR)!==n&&!e(qR)&&ZR(n,t)}),GR=P(e=>e(HR)===`Last30`?{type:`Last30`}:{type:`SpecificMonth`,month:e(UR)}),KR=P(null),qR=P(!1),JR=qR,YR=P(null),XR=YR;function ZR(e,t){t(qR,!0),t(YR,null);let n=zE(e,1),r=Vt.history(e,n).then(e=>t(BR,e)),i=Ht.get(e,n).then(e=>t(VR,e));Promise.all([r,i]).then(()=>t(KR,e)).catch(e=>t(YR,e.message??`Error`)).finally(()=>t(qR,!1))}function QR(){let e=z(HR);return()=>e(`Last30`)}function $R(){return z(UR)}function ez(e){return uA(e)&&e.operation===`UNLOAD`}function tz(e){return Object.prototype.hasOwnProperty.call(e,`month`)}function nz(e,t,n,r){let i=tz(r)?r.month:r.thirtyDaysAgo,a=tz(r)?zE(r.month,1):RE(r.thirtyDaysAgo,31),o=0,s=new Map,c=0,l=new Map,u=e.filter(e=>e.endTime>=i&&e.endTime<=a&&!e.material.some(e=>t.has(e.part)));for(let e of u)if(ez(e)&&(o+=1),cA(e))c+=e.activeMinutes;else if(lA(e)){s.set(e.stationGroup,e.activeMinutes+(s.get(e.stationGroup)??0));let t=l.get(e.stationGroup);t?t.add(e.stationNumber):l.set(e.stationGroup,new Set([e.stationNumber]))}let d=Q.of(n).filter(([,e])=>{if(t.has(e.partName)||e.numProcesses===void 0)return!1;let n=e.unloaded_processes?.[e.numProcesses];return!!n&&n>=i&&n<=a}).toRMap(([,e])=>[e.partName,1],(e,t)=>e+t);return{parts:u.groupBy(e=>e.part).map(([e,t])=>({part:e,parts_completed:d.get(e)??0,machine:Q.of(t).filter(e=>lA(e)).buildOrderedMap(e=>e.stationGroup,(e,t)=>(e??0)+t.activeMinutes).mapValues((e,t)=>e/(s.get(t)??1)),labor:Q.of(t).filter(e=>cA(e)).sumBy(e=>e.activeMinutes/c),automation:o>0?t.reduce((e,t)=>ez(t)?e+1:e,0)/o:0})).toRArray(),machineQuantities:Q.of(l).toOrderedMap(([e,t])=>[e,t.size]),type:r}}function rz(e,t,n,r){let i=tz(e.type)?cD(e.type.month):30,a=n?n*i/365:0,o=e.machineQuantities.mapValues((e,n)=>(t[n]??0)*e*i/365);return{machineQuantities:e.machineQuantities,type:e.type,parts:e.parts.map(e=>({part:e.part,parts_completed:e.parts_completed,machine:e.machine.mapValues((t,n)=>e.parts_completed>0?t*(o.get(n)??0)/e.parts_completed:0),labor:e.parts_completed>0?e.labor*r/e.parts_completed:0,automation:e.parts_completed>0?e.automation*a/e.parts_completed:0}))}}function iz(e){let t=`<table>
|
|
260
|
-
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Quantity</th>`;for(let n of e.machineQuantities.keys())t+=`<th>`+n+` Cost %</th>`;t+=`<th>Labor Cost</th>`,t+=`<th>Automation Cost</th>`,t+=`</tr></thead>
|
|
261
|
-
<tbody>
|
|
262
|
-
`;let n=Q.of(e.parts).sortBy(e=>e.part),r=Intl.NumberFormat(void 0,{maximumFractionDigits:1});for(let i of n){t+=`<tr><td>`+i.part+`</td>`,t+=`<td>`+i.parts_completed.toString()+`</td>`;for(let n of e.machineQuantities.keys())t+=`<td>`+r.format(i.machine.get(n)??0)+`</td>`;t+=`<td>`+(i.parts_completed>0?r.format(i.labor):`0`)+`</td>`,t+=`<td>`+(i.parts_completed>0?r.format(i.automation):`0`)+`</td>`,t+=`</tr>
|
|
263
|
-
`}return t+=`</tbody>
|
|
264
|
-
</table>`,t}function az(e){XA(iz(e))}function oz(e){let t=`<table>
|
|
265
|
-
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Quantity</th>`;for(let n of e.machineQuantities.keys())t+=`<th>`+n+` Cost %</th>`;t+=`<th>Labor Cost %</th>`,t+=`<th>Automation Cost %</th>`,t+=`</tr></thead>
|
|
266
|
-
<tbody>
|
|
267
|
-
`;let n=Q.of(e.parts).sortBy(e=>e.part),r=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});for(let i of n){t+=`<tr><td>`+i.part+`</td>`,t+=`<td>`+i.parts_completed.toString()+`</td>`;for(let n of e.machineQuantities.keys())t+=`<td>`+r.format(i.machine.get(n)??0)+`</td>`;t+=`<td>`+r.format(i.labor)+`</td>`,t+=`<td>`+r.format(i.automation)+`</td>`,t+=`</tr>
|
|
268
|
-
`}return t+=`</tbody>
|
|
269
|
-
</table>`,t}function sz(e){XA(oz(e))}function cz(e,t,n){return parseInt(e.substr(t,n),16)}function lz(e){return e|=0,e<0?`00`:e<16?`0`+e.toString(16):e<256?e.toString(16):`ff`}function uz(e,t,n){return n=n<0?n+6:n>6?n-6:n,lz(255*(n<1?e+(t-e)*n:n<3?t:n<4?e+(t-e)*(4-n):e))}function dz(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t,n=e.length;if(n<6){let n=e[1],r=e[2],i=e[3],a=e[4]||``;t=`#`+n+n+r+r+i+i+a+a}return(n==7||n>8)&&(t=e),t}}function fz(e,t,n){let r;if(t==0){let e=lz(n*255);r=e+e+e}else{let i=n<=.5?n*(t+1):n+t-n*t,a=n*2-i;r=uz(a,i,e*6+2)+uz(a,i,e*6)+uz(a,i,e*6-2)}return`#`+r}function pz(e,t,n){let r=[.55,.5,.5,.46,.6,.55,.55][e*6+.5|0];return n=n<.5?n*r*2:r+(n-.5)*(1-r)*2,fz(e,t,n)}var mz=typeof window<`u`?window:typeof self<`u`?self:typeof global<`u`?global:{},hz={V:`jdenticon_config`,n:`config`},gz={};function _z(e,t){let n=typeof e==`object`&&e||gz[hz.n]||mz[hz.V]||{},r=n.lightness||{},i=n.saturation||{},a=`color`in i?i.color:i,o=i.grayscale,s=n.backColor,c=n.padding;function l(e,t){let n=r[e];return n&&n.length>1||(n=t),function(e){return e=n[0]+e*(n[1]-n[0]),e<0?0:e>1?1:e}}function u(e){let t=n.hues,r;return t&&t.length>0&&(r=t[0|.999*e*t.length]),typeof r==`number`?(r/360%1+1)%1:e}return{W:u,o:typeof a==`number`?a:.5,D:typeof o==`number`?o:0,p:l(`color`,[.4,.8]),F:l(`grayscale`,[.3,.9]),G:dz(s),X:typeof e==`number`?e:typeof c==`number`?c:t}}var vz=class{constructor(e,t){this.x=e,this.y=t}},yz=class{constructor(e,t,n,r){this.q=e,this.t=t,this.H=n,this.Y=r}I(e,t,n,r){let i=this.q+this.H,a=this.t+this.H,o=this.Y;return o===1?new vz(i-t-(r||0),this.t+e):o===2?new vz(i-e-(n||0),a-t-(r||0)):o===3?new vz(this.q+t,a-e-(n||0)):new vz(this.q+e,this.t+t)}},bz=new yz(0,0,0,0),xz=class{constructor(e){this.J=e,this.u=bz}g(e,t){let n=t?-2:2,r=[];for(let i=t?e.length-2:0;i<e.length&&i>=0;i+=n)r.push(this.u.I(e[i],e[i+1]));this.J.g(r)}h(e,t,n,r){let i=this.u.I(e,t,n,n);this.J.h(i,n,r)}i(e,t,n,r,i){this.g([e,t,e+n,t,e+n,t+r,e,t+r],i)}j(e,t,n,r,i,a){let o=[e+n,t,e+n,t+r,e,t+r,e,t];o.splice((i||0)%4*2,2),this.g(o,a)}K(e,t,n,r,i){this.g([e+n/2,t,e+n,t+r/2,e+n/2,t+r,e,t+r/2],i)}};function Sz(e,t,n,r){e%=14;let i,a,o,s,c,l;e?e==1?(o=0|n*.5,s=0|n*.8,t.j(n-o,0,o,s,2)):e==2?(o=0|n/3,t.i(o,o,n-o,n-o)):e==3?(c=n*.1,l=n<6?1:n<8?2:0|n*.25,c=c>1?0|c:c>.5?1:c,t.i(l,l,n-c-l,n-c-l)):e==4?(a=0|n*.15,o=0|n*.5,t.h(n-o-a,n-o-a,o)):e==5?(c=n*.1,l=c*4,l>3&&(l=0|l),t.i(0,0,n,n),t.g([l,l,n-c,l,l+(n-l-c)/2,n-c],!0)):e==6?t.g([0,0,n,0,n,n*.7,n*.4,n*.4,n*.7,n,0,n]):e==7?t.j(n/2,n/2,n/2,n/2,3):e==8?(t.i(0,0,n,n/2),t.i(0,n/2,n/2,n/2),t.j(n/2,n/2,n/2,n/2,1)):e==9?(c=n*.14,l=n<4?1:n<6?2:0|n*.35,c=n<8?c:0|c,t.i(0,0,n,n),t.i(l,l,n-l-c,n-l-c,!0)):e==10?(c=n*.12,l=c*3,t.i(0,0,n,n),t.h(l,l,n-c-l,!0)):e==11?t.j(n/2,n/2,n/2,n/2,3):e==12?(a=n*.25,t.i(0,0,n,n),t.K(a,a,n-a,n-a,!0)):!r&&(a=n*.4,o=n*1.2,t.h(a,a,o)):(i=n*.42,t.g([0,0,n,0,n,n-i*2,n-i,n,0,n]))}function Cz(e,t,n){e%=4;let r;e?e==1?t.j(0,n/2,n,n/2,0):e==2?t.K(0,0,n,n):(r=n/6,t.h(r,r,n-2*r)):t.j(0,0,n,n,0)}function wz(e,t){return e=t.W(e),[pz(e,t.D,t.F(0)),pz(e,t.o,t.p(.5)),pz(e,t.D,t.F(1)),pz(e,t.o,t.p(1)),pz(e,t.o,t.p(0))]}function Tz(e,t,n){let r=_z(n,.08);r.G&&e.m(r.G);let i=e.k,a=.5+i*r.X|0;i-=a*2;let o=new xz(e),s=0|i/4,c=0|a+i/2-s*2,l=0|a+i/2-s*2;function u(n,r,i,a,u){let p=cz(t,i,1),m=a?cz(t,a,1):0;e.L(d[f[n]]);for(let e=0;e<u.length;e++)o.u=new yz(c+u[e][0]*s,l+u[e][1]*s,s,m++%4),r(p,o,s,e);e.M()}let d=wz(cz(t,-7)/268435455,r),f=[],p;function m(e){if(e.indexOf(p)>=0){for(let t=0;t<e.length;t++)if(f.indexOf(e[t])>=0)return!0}}for(let e=0;e<3;e++)p=cz(t,8+e,1)%d.length,(m([0,4])||m([2,3]))&&(p=1),f.push(p);u(0,Cz,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),u(1,Cz,4,5,[[0,0],[3,0],[3,3],[0,3]]),u(2,Sz,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function Ez(e){var t=0,n=0,r=encodeURI(e)+`%80`,i=[],a,o=[],s=1732584193,c=4023233417,l=~s,u=~c,d=3285377520,f=[s,c,l,u,d],p=0,m=``;function h(e,t){return e<<t|e>>>32-t}for(;t<r.length;n++)i[n>>2]=i[n>>2]|(r[t]==`%`?parseInt(r.substring(t+1,t+=3),16):r.charCodeAt(t++))<<(3-(n&3))*8;for(a=((n+7>>6)+1)*16,i[a-1]=n*8-8;p<a;p+=16){for(t=0;t<80;t++)n=h(s,5)+d+(t<20?(c&l^~c&u)+1518500249:t<40?(c^l^u)+1859775393:t<60?(c&l^c&u^l&u)+2400959708:(c^l^u)+3395469782)+(o[t]=t<16?i[p+t]|0:h(o[t-3]^o[t-8]^o[t-14]^o[t-16],1)),d=u,u=l,l=h(c,30),c=s,s=n;f[0]=s=f[0]+s|0,f[1]=c=f[1]+c|0,f[2]=l=f[2]+l|0,f[3]=u=f[3]+u|0,f[4]=d=f[4]+d|0}for(t=0;t<40;t++)m+=(f[t>>3]>>>(7-(t&7))*4&15).toString(16);return m}function Dz(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function Oz(e){return Ez(e==null?``:``+e)}typeof document<`u`&&document.querySelectorAll.bind(document);function kz(e){return(e*10+.5|0)/10}var Az=class{constructor(){this.v=``}g(e){let t=``;for(let n=0;n<e.length;n++)t+=(n?`L`:`M`)+kz(e[n].x)+` `+kz(e[n].y);this.v+=t+`Z`}h(e,t,n){let r=+!n,i=kz(t/2),a=kz(t),o=`a`+i+`,`+i+` 0 1,`+r+` `;this.v+=`M`+kz(e.x)+` `+kz(e.y+t/2)+o+a+`,0`+o+-a+`,0`}},jz=class{constructor(e){this.A,this.B={},this.O=e,this.k=e.k}m(e){let t=/^(#......)(..)?/.exec(e),n=t[2]?cz(t[2],0)/255:1;this.O.m(t[1],n)}L(e){this.A=this.B[e]||(this.B[e]=new Az)}M(){}g(e){this.A.g(e)}h(e,t,n){this.A.h(e,t,n)}finish(){let e=this.B;for(let t in e)e.hasOwnProperty(t)&&this.O.P(t,e[t].v)}},Mz={R:`http://www.w3.org/2000/svg`,S:`width`,T:`height`},Nz=class{constructor(e){this.k=e,this.C=`<svg xmlns="`+Mz.R+`" width="`+e+`" height="`+e+`" viewBox="0 0 `+e+` `+e+`">`}m(e,t){t&&(this.C+=`<rect width="100%" height="100%" fill="`+e+`" opacity="`+t.toFixed(2)+`"/>`)}P(e,t){this.C+=`<path fill="`+e+`" d="`+t+`"/>`}toString(){return this.C+`</svg>`}};function Pz(e,t,n){let r=new Nz(t);return Tz(new jz(r),Dz(e)||Oz(e),n),r.toString()}function Fz(e){let t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;let n=String(e).match(/\d+/g);if(n==null||n.length<=2)return t;{let[e,t,...r]=n.map(e=>parseInt(e)),i=[e,t-1,...r];return new Date(Date.UTC(...i))}}var Iz=(e,t,n)=>{let r=e===1?t:t+`s`;return e+` `+r+` `+n};function Lz(){return Lz=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},Lz.apply(null,arguments)}var Rz=60,zz=Rz*60,Bz=zz*24,Vz=Bz*7,Hz=Bz*30,Uz=Bz*365,Wz=()=>Date.now();function Gz({date:e,formatter:t,component:n=`time`,live:r=!0,minPeriod:i=0,maxPeriod:a=Vz,title:o,now:s=Wz,...c}){let[l,u]=(0,L.useState)(s());(0,L.useEffect)(()=>{if(!r)return;let t=(()=>{let t=Fz(e).valueOf();if(!t)return console.warn(`[react-timeago] Invalid Date provided`),0;let n=Math.round(Math.abs(l-t)/1e3),r=Math.min(Math.max(n<Rz?1e3:n<zz?1e3*Rz:n<Bz?1e3*zz:1e3*Vz,i*1e3),a*1e3);return r?setTimeout(()=>{u(s())},r):0})();return()=>{t&&clearTimeout(t)}},[e,r,a,i,s,l]),(0,L.useEffect)(()=>{u(s())},[e]);let d=n,f=Fz(e).valueOf();if(!f)return null;let p=Math.round(Math.abs(l-f)/1e3),m=f<l?`ago`:`from now`,[h,g]=p<Rz?[Math.round(p),`second`]:p<zz?[Math.round(p/Rz),`minute`]:p<Bz?[Math.round(p/zz),`hour`]:p<Vz?[Math.round(p/Bz),`day`]:p<Hz?[Math.round(p/Vz),`week`]:p<Uz?[Math.round(p/Hz),`month`]:[Math.round(p/Uz),`year`],_=o===void 0?typeof e==`string`?e:Fz(e).toISOString().substring(0,16).replace(`T`,` `):o,v=d===`time`?{...c,dateTime:Fz(e).toISOString()}:c,y=(e=e,t=t,n=n,r=f,i=Iz,a=a)=>Iz(e,t,n,r,i,a),b=t||Iz,x;try{x=b(h,g,m,f,y,s),x||=Iz(h,g,m,f,y,s)}catch(e){console.error(`[react-timeago] Formatter threw an error:`,e),x=Iz(h,g,m,f,y,s)}return L.createElement(d,Lz({},v,{title:_}),x)}function Kz(){var e=[...arguments];return(0,L.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var qz=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Jz(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Yz(e){return`nodeType`in e}function Xz(e){return e?Jz(e)?e:Yz(e)?e.ownerDocument?.defaultView??window:window:window}function Zz(e){let{Document:t}=Xz(e);return e instanceof t}function Qz(e){return!Jz(e)&&e instanceof Xz(e).HTMLElement}function $z(e){return e instanceof Xz(e).SVGElement}function eB(e){return e?Jz(e)?e.document:Yz(e)?Zz(e)?e:Qz(e)||$z(e)?e.ownerDocument:document:document:document}var tB=qz?L.useLayoutEffect:L.useEffect;function nB(e){let t=(0,L.useRef)(e);return tB(()=>{t.current=e}),(0,L.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function rB(){let e=(0,L.useRef)(null);return[(0,L.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,L.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function iB(e,t){t===void 0&&(t=[e]);let n=(0,L.useRef)(e);return tB(()=>{n.current!==e&&(n.current=e)},t),n}function aB(e,t){let n=(0,L.useRef)();return(0,L.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function oB(e){let t=nB(e),n=(0,L.useRef)(null);return[n,(0,L.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function sB(e){let t=(0,L.useRef)();return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}var cB={};function lB(e,t){return(0,L.useMemo)(()=>{if(t)return t;let n=cB[e]==null?0:cB[e]+1;return cB[e]=n,e+`-`+n},[e,t])}function uB(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var dB=uB(1),fB=uB(-1);function pB(e){return`clientX`in e&&`clientY`in e}function mB(e){if(!e)return!1;let{KeyboardEvent:t}=Xz(e.target);return t&&e instanceof t}function hB(e){if(!e)return!1;let{TouchEvent:t}=Xz(e.target);return t&&e instanceof t}function gB(e){if(hB(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return pB(e)?{x:e.clientX,y:e.clientY}:null}var _B=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[_B.Translate.toString(e),_B.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),vB=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function yB(e){return e.matches(vB)?e:e.querySelector(vB)}var bB={display:`none`};function xB(e){let{id:t,value:n}=e;return L.createElement(`div`,{id:t,style:bB},n)}function SB(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return L.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function CB(){let[e,t]=(0,L.useState)(``);return{announce:(0,L.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var wB=(0,L.createContext)(null);function TB(e){let t=(0,L.useContext)(wB);(0,L.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function EB(){let[e]=(0,L.useState)(()=>new Set),t=(0,L.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,L.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var DB={draggable:`
|
|
270
|
-
To pick up a draggable item, press the space bar.
|
|
271
|
-
While dragging, use the arrow keys to move the item.
|
|
272
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
273
|
-
`},OB={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function kB(e){let{announcements:t=OB,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=DB}=e,{announce:a,announcement:o}=CB(),s=lB(`DndLiveRegion`),[c,l]=(0,L.useState)(!1);if((0,L.useEffect)(()=>{l(!0)},[]),TB((0,L.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=L.createElement(L.Fragment,null,L.createElement(xB,{id:r,value:i.draggable}),L.createElement(SB,{id:s,announcement:o}));return n?(0,b_.createPortal)(u,n):u}var AB;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(AB||={});function jB(){}function MB(e,t){return(0,L.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function NB(){var e=[...arguments];return(0,L.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var PB=Object.freeze({x:0,y:0});function FB(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function IB(e,t){let n=gB(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function LB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function RB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function zB(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function BB(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function VB(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var HB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=VB(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=FB(VB(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(LB)},UB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=zB(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=zB(r),o=i.reduce((e,t,r)=>e+FB(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(LB)};function WB(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var GB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=WB(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(RB)};function KB(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var qB=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&KB(r,a)){let n=zB(a).reduce((e,t)=>e+FB(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(LB)};function JB(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function YB(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:PB}function XB(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var ZB=XB(1);function QB(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function $B(e,t,n){let r=QB(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var eV={ignoreTransform:!1};function tV(e,t){t===void 0&&(t=eV);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Xz(e).getComputedStyle(e);t&&(n=$B(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function nV(e){return tV(e,{ignoreTransform:!0})}function rV(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function iV(e,t){return t===void 0&&(t=Xz(e).getComputedStyle(e)),t.position===`fixed`}function aV(e,t){t===void 0&&(t=Xz(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function oV(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Zz(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Qz(i)||$z(i)||n.includes(i))return n;let a=Xz(e).getComputedStyle(i);return i!==e&&aV(i,a)&&n.push(i),iV(i,a)?n:r(i.parentNode)}return e?r(e):n}function sV(e){let[t]=oV(e,1);return t??null}function cV(e){return!qz||!e?null:Jz(e)?e:Yz(e)?Zz(e)||e===eB(e).scrollingElement?window:Qz(e)?e:null:null}function lV(e){return Jz(e)?e.scrollX:e.scrollLeft}function uV(e){return Jz(e)?e.scrollY:e.scrollTop}function dV(e){return{x:lV(e),y:uV(e)}}var fV;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(fV||={});function pV(e){return!qz||!e?!1:e===document.scrollingElement}function mV(e){let t={x:0,y:0},n=pV(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var hV={x:.2,y:.2};function gV(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=hV);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=mV(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=fV.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=fV.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=fV.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=fV.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function _V(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function vV(e){return e.reduce((e,t)=>dB(e,dV(t)),PB)}function yV(e){return e.reduce((e,t)=>e+lV(t),0)}function bV(e){return e.reduce((e,t)=>e+uV(t),0)}function xV(e,t){if(t===void 0&&(t=tV),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);sV(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var SV=[[`x`,[`left`,`right`],yV],[`y`,[`top`,`bottom`],bV]],CV=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=oV(t),r=vV(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of SV)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},wV=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function TV(e){let{EventTarget:t}=Xz(e);return e instanceof t?e:eB(e)}function EV(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var DV;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(DV||={});function OV(e){e.preventDefault()}function kV(e){e.stopPropagation()}var AV;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(AV||={});var jV={start:[AV.Space,AV.Enter],cancel:[AV.Esc],end:[AV.Space,AV.Enter,AV.Tab]},MV=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case AV.Right:return{...n,x:n.x+25};case AV.Left:return{...n,x:n.x-25};case AV.Down:return{...n,y:n.y+25};case AV.Up:return{...n,y:n.y-25}}},NV=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new wV(eB(t)),this.windowListeners=new wV(Xz(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(DV.Resize,this.handleCancel),this.windowListeners.add(DV.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(DV.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&xV(n),t(PB)}handleKeyDown(e){if(mB(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=jV,coordinateGetter:a=MV,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:PB;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=fB(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=mV(n),p=_V(n),m={x:Math.min(i===AV.Right?p.right-p.width/2:p.right,Math.max(i===AV.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===AV.Down?p.bottom-p.height/2:p.bottom,Math.max(i===AV.Down?p.top:p.top+p.height/2,u.y))},h=i===AV.Right&&!s||i===AV.Left&&!c,g=i===AV.Down&&!l||i===AV.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===AV.Right&&e<=d.x||i===AV.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===AV.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===AV.Down&&e<=d.y||i===AV.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===AV.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,dB(fB(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};NV.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=jV,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function PV(e){return!!(e&&`distance`in e)}function FV(e){return!!(e&&`delay`in e)}var IV=class{constructor(e,t,n){n===void 0&&(n=TV(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=eB(i),this.documentListeners=new wV(this.document),this.listeners=new wV(n),this.windowListeners=new wV(Xz(i)),this.initialCoordinates=gB(r)??PB,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(DV.Resize,this.handleCancel),this.windowListeners.add(DV.DragStart,OV),this.windowListeners.add(DV.VisibilityChange,this.handleCancel),this.windowListeners.add(DV.ContextMenu,OV),this.documentListeners.add(DV.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(FV(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(PV(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(DV.Click,kV,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(DV.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=gB(e)??PB,s=fB(n,o);if(!t&&a){if(PV(a)){if(a.tolerance!=null&&EV(s,a.tolerance))return this.handleCancel();if(EV(s,a.distance))return this.handleStart()}if(FV(a)&&EV(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===AV.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},LV={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},RV=class extends IV{constructor(e){let{event:t}=e,n=eB(t.target);super(e,LV,n)}};RV.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var zV={move:{name:`mousemove`},end:{name:`mouseup`}},BV;(function(e){e[e.RightClick=2]=`RightClick`})(BV||={});var VV=class extends IV{constructor(e){super(e,zV,eB(e.event.target))}};VV.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===BV.RightClick?!1:(r?.({event:n}),!0)}}];var HV={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},UV=class extends IV{constructor(e){super(e,HV)}static setup(){return window.addEventListener(HV.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(HV.move.name,e)};function e(){}}};UV.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var WV;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(WV||={});var GV;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(GV||={});function KV(e){let{acceleration:t,activator:n=WV.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=GV.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=JV({delta:d,disabled:!a}),[m,h]=rB(),g=(0,L.useRef)({x:0,y:0}),_=(0,L.useRef)({x:0,y:0}),v=(0,L.useMemo)(()=>{switch(n){case WV.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case WV.DraggableRect:return i}},[n,i,c]),y=(0,L.useRef)(null),b=(0,L.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,L.useMemo)(()=>s===GV.TreeOrder?[...l].reverse():l,[s,l]);(0,L.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=gV(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var qV={x:{[fV.Backward]:!1,[fV.Forward]:!1},y:{[fV.Backward]:!1,[fV.Forward]:!1}};function JV(e){let{delta:t,disabled:n}=e,r=sB(t);return aB(e=>{if(n||!r||!e)return qV;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[fV.Backward]:e.x[fV.Backward]||i.x===-1,[fV.Forward]:e.x[fV.Forward]||i.x===1},y:{[fV.Backward]:e.y[fV.Backward]||i.y===-1,[fV.Forward]:e.y[fV.Forward]||i.y===1}}},[n,t,r])}function YV(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return aB(e=>t==null?null:r??e??null,[r,t])}function XV(e,t){return(0,L.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var ZV;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(ZV||={});var QV;(function(e){e.Optimized=`optimized`})(QV||={});var $V=new Map;function eH(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,L.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,L.useRef)(e),d=g(),f=iB(d),p=(0,L.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,L.useRef)(null),h=aB(t=>{if(d&&!n)return $V;if(!t||t===$V||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new CV(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,L.useEffect)(()=>{u.current=e},[e]),(0,L.useEffect)(()=>{d||p()},[n,d]),(0,L.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,L.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case ZV.Always:return!1;case ZV.BeforeDragging:return n;default:return!n}}}function tH(e,t){return aB(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function nH(e,t){return tH(e,t)}function rH(e){let{callback:t,disabled:n}=e,r=nB(t),i=(0,L.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,L.useEffect)(()=>()=>i?.disconnect(),[i]),i}function iH(e){let{callback:t,disabled:n}=e,r=nB(t),i=(0,L.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,L.useEffect)(()=>()=>i?.disconnect(),[i]),i}function aH(e){return new CV(tV(e),e)}function oH(e,t,n){t===void 0&&(t=aH);let[r,i]=(0,L.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=rH({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=iH({callback:a});return tB(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function sH(e){return YB(e,tH(e))}var cH=[];function lH(e){let t=(0,L.useRef)(e),n=aB(n=>e?n&&n!==cH&&e&&t.current&&e.parentNode===t.current.parentNode?n:oV(e):cH,[e]);return(0,L.useEffect)(()=>{t.current=e},[e]),n}function uH(e){let[t,n]=(0,L.useState)(null),r=(0,L.useRef)(e),i=(0,L.useCallback)(e=>{let t=cV(e.target);t&&n(e=>e?(e.set(t,dV(t)),new Map(e)):null)},[]);return(0,L.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=cV(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,dV(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{cV(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,L.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>dB(e,t),PB):vV(e):PB,[e,t])}function dH(e,t){t===void 0&&(t=[]);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{n.current=null},t),(0,L.useEffect)(()=>{let t=e!==PB;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?fB(e,n.current):PB}function fH(e){(0,L.useEffect)(()=>{if(!qz)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function pH(e,t){return(0,L.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function mH(e){return(0,L.useMemo)(()=>e?rV(e):null,[e])}var hH=[];function gH(e,t){t===void 0&&(t=tV);let[n]=e,r=mH(n?Xz(n):null),[i,a]=(0,L.useState)(hH);function o(){a(()=>e.length?e.map(e=>pV(e)?r:new CV(t(e),e)):hH)}let s=iH({callback:o});return tB(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function _H(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Qz(t)?t:e}function vH(e){let{measure:t}=e,[n,r]=(0,L.useState)(null),i=iH({callback:(0,L.useCallback)(e=>{for(let{target:n}of e)if(Qz(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=oB((0,L.useCallback)(e=>{let n=_H(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,L.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var yH=[{sensor:RV,options:{}},{sensor:NV,options:{}}],bH={current:{}},xH={draggable:{measure:nV},droppable:{measure:nV,strategy:ZV.WhileDragging,frequency:QV.Optimized},dragOverlay:{measure:tV}},SH=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},CH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new SH,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:jB},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:xH,measureDroppableContainers:jB,windowRect:null,measuringScheduled:!1},wH={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:jB,draggableNodes:new Map,over:null,measureDroppableContainers:jB},TH=(0,L.createContext)(wH),EH=(0,L.createContext)(CH);function DH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new SH}}}function OH(e,t){switch(t.type){case AB.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case AB.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case AB.DragEnd:case AB.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case AB.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new SH(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case AB.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new SH(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case AB.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new SH(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function kH(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,L.useContext)(TH),a=sB(r),o=sB(n?.id);return(0,L.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!mB(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=yB(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function AH(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function jH(e){return(0,L.useMemo)(()=>({draggable:{...xH.draggable,...e?.draggable},droppable:{...xH.droppable,...e?.droppable},dragOverlay:{...xH.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function MH(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,L.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;tB(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=YB(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=sV(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var NH=(0,L.createContext)({...PB,scaleX:1,scaleY:1}),PH;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(PH||={});var FH=(0,L.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=yH,collisionDetection:o=GB,measuring:s,modifiers:c,...l}=e,[u,d]=(0,L.useReducer)(OH,void 0,DH),[f,p]=EB(),[m,h]=(0,L.useState)(PH.Uninitialized),g=m===PH.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,L.useRef)({initial:null,translated:null}),C=(0,L.useMemo)(()=>_==null?null:{id:_,data:x?.data??bH,rect:S},[_,x]),w=(0,L.useRef)(null),[T,E]=(0,L.useState)(null),[D,O]=(0,L.useState)(null),ee=iB(l,Object.values(l)),te=lB(`DndDescribedBy`,t),k=(0,L.useMemo)(()=>b.getEnabled(),[b]),A=jH(s),{droppableRects:j,measureDroppableContainers:M,measuringScheduled:ne}=eH(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),re=YV(v,_),ie=(0,L.useMemo)(()=>D?gB(D):null,[D]),ae=ke(),N=nH(re,A.draggable.measure);MH({activeNode:_==null?null:v.get(_),config:ae.layoutShiftCompensation,initialRect:N,measure:A.draggable.measure});let oe=oH(re,A.draggable.measure,N),se=oH(re?re.parentElement:null),ce=(0,L.useRef)({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),P=b.getNodeFor(ce.current.over?.id),le=vH({measure:A.dragOverlay.measure}),ue=le.nodeRef.current??re,F=g?le.rect??oe:null,I=!!(le.nodeRef.current&&le.rect),de=sH(I?null:oe),fe=mH(ue?Xz(ue):null),pe=lH(g?P??re:null),me=gH(pe),he=AH(c,{transform:{x:y.x-de.x,y:y.y-de.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:oe,containerNodeRect:se,draggingNodeRect:F,over:ce.current.over,overlayNodeRect:le.rect,scrollableAncestors:pe,scrollableAncestorRects:me,windowRect:fe}),ge=ie?dB(ie,y):null,_e=uH(pe),ve=dH(_e),ye=dH(_e,[oe]),be=dB(he,ve),xe=F?ZB(F,he):null,Se=C&&xe?o({active:C,collisionRect:xe,droppableRects:j,droppableContainers:k,pointerCoordinates:ge}):null,R=BB(Se,`id`),[z,B]=(0,L.useState)(null),Ce=JB(I?he:dB(he,ye),z?.rect??null,oe),we=(0,L.useRef)(null),Te=(0,L.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=ee.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,b_.unstable_batchedUpdates)(()=>{r?.(i),h(PH.Initializing),d({type:AB.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(we.current),O(a)})},onMove(e){d({type:AB.DragMove,coordinates:e})},onEnd:s(AB.DragEnd),onCancel:s(AB.DragCancel)});we.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===AB.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=AB.DragCancel)}w.current=null,(0,b_.unstable_batchedUpdates)(()=>{d({type:e}),h(PH.Uninitialized),B(null),E(null),O(null),we.current=null;let t=e===AB.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ee=XV(a,(0,L.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Te(n,t))},[v,Te]));fH(a),tB(()=>{oe&&m===PH.Initializing&&h(PH.Initialized)},[oe,m]),(0,L.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:be.x,y:be.y},over:i};(0,b_.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[be.x,be.y]),(0,L.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(R),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,b_.unstable_batchedUpdates)(()=>{B(s),a?.(c),f({type:`onDragOver`,event:c})})},[R]),tB(()=>{ce.current={activatorEvent:D,active:C,activeNode:re,collisionRect:xe,collisions:Se,droppableRects:j,draggableNodes:v,draggingNode:ue,draggingNodeRect:F,droppableContainers:b,over:z,scrollableAncestors:pe,scrollAdjustedTranslate:be},S.current={initial:F,translated:xe}},[C,re,Se,xe,v,ue,F,j,b,z,pe,be]),KV({...ae,delta:y,draggingRect:xe,pointerCoordinates:ge,scrollableAncestors:pe,scrollableAncestorRects:me});let De=(0,L.useMemo)(()=>({active:C,activeNode:re,activeNodeRect:oe,activatorEvent:D,collisions:Se,containerNodeRect:se,dragOverlay:le,draggableNodes:v,droppableContainers:b,droppableRects:j,over:z,measureDroppableContainers:M,scrollableAncestors:pe,scrollableAncestorRects:me,measuringConfiguration:A,measuringScheduled:ne,windowRect:fe}),[C,re,oe,D,Se,se,le,v,b,j,z,M,pe,me,A,ne,fe]),Oe=(0,L.useMemo)(()=>({activatorEvent:D,activators:Ee,active:C,activeNodeRect:oe,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:z,measureDroppableContainers:M}),[D,Ee,C,oe,d,te,v,z,M]);return L.createElement(wB.Provider,{value:p},L.createElement(TH.Provider,{value:Oe},L.createElement(EH.Provider,{value:De},L.createElement(NH.Provider,{value:Ce},i)),L.createElement(kH,{disabled:n?.restoreFocus===!1})),L.createElement(kB,{...n,hiddenTextDescribedById:te}));function ke(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),IH=(0,L.createContext)(null),LH=`button`,RH=`Draggable`;function zH(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=lB(RH),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,L.useContext)(TH),{role:p=LH,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,L.useContext)(g?NH:IH),[v,y]=oB(),[b,x]=oB(),S=pH(o,t),C=iB(n);return tB(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,L.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===LH?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function BH(){return(0,L.useContext)(EH)}var VH=`Droppable`,HH={timeout:25};function UH(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=lB(VH),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,L.useContext)(TH),u=(0,L.useRef)({disabled:n}),d=(0,L.useRef)(!1),f=(0,L.useRef)(null),p=(0,L.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...HH,...i},_=iB(h??r),v=iH({callback:(0,L.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=oB((0,L.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=iB(t);return(0,L.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,L.useEffect)(()=>(s({type:AB.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:AB.UnregisterDroppable,key:a,id:r})),[r]),(0,L.useEffect)(()=>{n!==u.current.disabled&&(s({type:AB.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function WH(e){let{animation:t,children:n}=e,[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(null),s=sB(n);return!n&&!r&&s&&i(s),tB(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),L.createElement(L.Fragment,null,n,r?(0,L.cloneElement)(r,{ref:o}):null)}var GH={x:0,y:0,scaleX:1,scaleY:1};function KH(e){let{children:t}=e;return L.createElement(TH.Provider,{value:wH},L.createElement(NH.Provider,{value:GH},t))}var qH={position:`fixed`,touchAction:`none`},JH=e=>mB(e)?`transform 250ms ease`:void 0,YH=(0,L.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=JH}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...qH,width:s.width,height:s.height,top:s.top,left:s.left,transform:_B.Transform.toString(d),transformOrigin:i&&r?IB(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return L.createElement(n,{className:o,style:f,ref:t},a)}),XH={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:_B.Transform.toString(t)},{transform:_B.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function ZH(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return nB((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=_H(a);if(!c)return;let{transform:l}=Xz(a).getComputedStyle(a),u=QB(l);if(!u)return;let d=typeof t==`function`?t:QH(t);return xV(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function QH(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...XH,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var $H=0;function eU(e){return(0,L.useMemo)(()=>{if(e!=null)return $H++,$H},[e])}var tU=L.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=BH(),S=(0,L.useContext)(NH),C=eU(d?.id),w=AH(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=tH(f),E=ZH({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return L.createElement(KH,null,L.createElement(WH,{animation:E},d&&C?L.createElement(YH,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function nU(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function rU(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function iU(e){return e!==null&&e>=0}function aU(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function oU(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var sU={scaleX:1,scaleY:1},cU=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=lU(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...sU}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...sU}:a<r&&a>=i?{x:o.width+s,y:0,...sU}:{x:0,y:0,...sU}};function lU(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var uU=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=nU(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},dU={scaleX:1,scaleY:1},fU=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...dU}:null}let s=pU(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...dU}:r<t&&r>=a?{x:0,y:o.height+s,...dU}:{x:0,y:0,...dU}};function pU(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var mU=`Sortable`,hU=L.createContext({activeIndex:-1,containerId:mU,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:uU,disabled:{draggable:!1,droppable:!1}});function gU(e){let{children:t,id:n,items:r,strategy:i=uU,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=BH(),d=lB(mU,n),f=s.rect!==null,p=(0,L.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,L.useRef)(p),v=!aU(p,_.current),y=g!==-1&&h===-1||v,b=oU(a);tB(()=>{v&&m&&u(p)},[v,p,m,u]),(0,L.useEffect)(()=>{_.current=p},[p]);let x=(0,L.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:rU(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return L.createElement(hU.Provider,{value:x},t)}var _U=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return nU(n,r,i).indexOf(t)},vU=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},yU={duration:200,easing:`ease`},bU=`transform`,xU=_B.Transition.toString({property:bU,duration:0,easing:`linear`}),SU={roleDescription:`sortable`};function CU(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,L.useState)(null),s=(0,L.useRef)(n);return tB(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=tV(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,L.useEffect)(()=>{a&&o(null)},[a]),a}function wU(e){let{animateLayoutChanges:t=vU,attributes:n,disabled:r,data:i,getNewIndex:a=_U,id:o,strategy:s,resizeObserverConfig:c,transition:l=yU}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,L.useContext)(hU),y=TU(r,p),b=u.indexOf(o),x=(0,L.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,L.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=UH({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:ee,attributes:te,setNodeRef:k,listeners:A,isDragging:j,over:M,setActivatorNodeRef:ne,transform:re}=zH({id:o,data:x,attributes:{...SU,...n},disabled:y.draggable}),ie=Kz(E,k),ae=!!D,N=ae&&!m&&iU(f)&&iU(g),oe=!_&&j,se=N?(oe&&N?re:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,ce=iU(f)&&iU(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,P=D?.id,le=(0,L.useRef)({activeId:P,items:u,newIndex:ce,containerId:d}),ue=u!==le.current.items,F=t({active:D,containerId:d,isDragging:j,isSorting:ae,id:o,index:b,items:u,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:l,wasDragging:le.current.activeId!=null}),I=CU({disabled:!F,index:b,node:w,rect:C});return(0,L.useEffect)(()=>{ae&&le.current.newIndex!==ce&&(le.current.newIndex=ce),d!==le.current.containerId&&(le.current.containerId=d),u!==le.current.items&&(le.current.items=u)},[ae,ce,d,u]),(0,L.useEffect)(()=>{if(P===le.current.activeId)return;if(P!=null&&le.current.activeId==null){le.current.activeId=P;return}let e=setTimeout(()=>{le.current.activeId=P},50);return()=>clearTimeout(e)},[P]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:ce,items:u,isOver:T,isSorting:ae,isDragging:j,listeners:A,node:w,overIndex:g,over:M,setNodeRef:ie,setActivatorNodeRef:ne,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:I??se,transition:de()};function de(){if(I||ue&&le.current.newIndex===b)return xU;if(!(oe&&!mB(O)||!l)&&(ae||F))return _B.Transition.toString({...l,property:bU})}}function TU(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function EU(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var DU=[AV.Down,AV.Right,AV.Up,AV.Left],OU=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(DU.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case AV.Down:r.top<a.top&&t.push(n);break;case AV.Up:r.top>a.top&&t.push(n);break;case AV.Left:r.left>a.left&&t.push(n);break;case AV.Right:r.left<a.left&&t.push(n);break}});let c=UB({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=BB(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=oV(c).some((e,t)=>s[t]!==e),i=kU(e,t),a=AU(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:fB(u,l)}}}};function kU(e,t){return!EU(e)||!EU(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function AU(e,t){return!EU(e)||!EU(t)||!kU(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var jU=(0,L.createContext)(null),MU={didCatch:!1,error:null},NU=class extends L.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=MU}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(MU))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&PU(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(MU))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,L.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,L.createElement)(jU.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function PU(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function FU(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`?e.toString():JSON.stringify(e)??``}function IU(){return(0,U.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,U.jsx)(qm,{}),(0,U.jsx)(`p`,{children:`Loading`})]})}function LU({error:e}){return e===void 0?(0,U.jsx)(U.Fragment,{}):Rt.isApiException(e)?(0,U.jsx)(_v,{children:(0,U.jsxs)(xv,{children:[(0,U.jsx)(`h3`,{children:`FMS Insight Server Error`}),(0,U.jsx)(`p`,{children:e.response})]})}):e instanceof Error?(0,U.jsx)(_v,{children:(0,U.jsx)(xv,{children:e.message})}):(0,U.jsx)(_v,{children:(0,U.jsxs)(xv,{children:[(0,U.jsx)(`h3`,{children:`Unknown Error`}),(0,U.jsx)(`p`,{children:FU(e)})]})})}function RU(e){return(0,U.jsx)(NU,{FallbackComponent:LU,children:(0,U.jsx)(L.Suspense,{fallback:e.fallback??(0,U.jsx)(IU,{}),children:e.children})})}var zU=class extends L.PureComponent{render(){let e=this.props.size||50,t=Pz(this.props.part,e);return(0,U.jsx)(`div`,{style:{width:e,height:e},dangerouslySetInnerHTML:{__html:t}})}},BU=2,VU=Na`
|
|
274
|
-
from, to { transform: translate(0, 0) }
|
|
275
|
-
10% { transform: translate(${BU}px, 0) }
|
|
276
|
-
20% { transform: translate(0, 0) }
|
|
277
|
-
30% { transform: translate(${BU}px, 0) }
|
|
278
|
-
40% { transform: translate(0, 0) }
|
|
279
|
-
50% { transform: translate(${BU}px, 0) }
|
|
280
|
-
60% { transform: translate(0, 0) }
|
|
281
|
-
`,HU=`${VU} 1s ease-in-out infinite`;function UU(e){return`animationName`in e}function WU(e){let t=e.currentTarget.getAnimations().find(e=>UU(e)&&e.animationName===VU.name);if(t&&typeof t.startTime==`number`)t.startTime-=t.startTime%1e3;else if(t&&typeof t.startTime==`object`&&t.startTime instanceof CSSNumericValue){let e=t.startTime.to(`ms`).value;t.startTime=CSS.ms(e-e%1e3)}}var GU=K(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`1.25rem`,fontWeight:`500`};switch(e){case`normal`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.25rem`},[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`}};case`large`:return{fontSize:`1.5rem`,fontWeight:`500`,[t.breakpoints.up(`lg`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`2rem`}};case`x-large`:return{fontSize:`1.5rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.75rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.75rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.75rem`}}}}),KU=K(`div`,{shouldForwardProp:e=>e!==`fsize`})(({fsize:e,theme:t})=>{if(!e)return{fontSize:`0.75rem`,fontWeight:`500`};switch(e){case`normal`:return{fontSize:`0.75rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1rem`}};case`large`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`lg`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`1.75rem`}};case`x-large`:return{fontSize:`1rem`,fontWeight:`500`,[t.breakpoints.up(`md`)]:{fontSize:`1.5rem`},[t.breakpoints.up(`lg`)]:{fontSize:`2.5rem`},[t.breakpoints.up(`xl`)]:{fontSize:`3.5rem`}}}});function qU({mat:e,displayActionForSinglePallet:t,fsize:n}){let r=R(Fk),i=_A(R(vr).basketName);switch(e.action.type){case H.Loading:if(e.action.loadFromBasketId){if(e.action.loadOntoPalletNum===null||e.action.loadOntoPalletNum===void 0)return(0,U.jsxs)(KU,{fsize:n,children:[`Load into `,i,` `,e.action.loadFromBasketId]});if(t===void 0)return(0,U.jsxs)(KU,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to pal`,` `,e.action.loadOntoPalletNum??``]});if(t===e.action.loadOntoPalletNum){let t=e.action.loadOntoFace??0,a=e.action.loadOntoPalletNum?r.pallets[e.action.loadOntoPalletNum]?.faceNames?.[t-1]:null;return(0,U.jsxs)(KU,{fsize:n,children:[`Load from `,i,` `,e.action.loadFromBasketId,` to`,` `,a??`face ${t}`]})}else return null}switch(e.location.type){case at.OnPallet:if(t===void 0||t===e.location.palletNum){if(e.action.loadOntoFace===void 0||e.action.loadOntoFace===e.location.face)return e.action.processAfterLoad&&e.action.processAfterLoad!==e.process?(0,U.jsxs)(KU,{fsize:n,children:[`Reclamp material to process # `,e.action.processAfterLoad]}):null;{let t=e.action.loadOntoFace??0,i=e.location.palletNum?r.pallets[e.location.palletNum]?.faceNames?.[t-1]:null;return(0,U.jsxs)(KU,{fsize:n,children:[`Transfer to `,i??`face ${t}`]})}}else return null;default:{let i=e.action.loadOntoFace??0,a=e.action.loadOntoPalletNum?r.pallets[e.action.loadOntoPalletNum]?.faceNames?.[i-1]:null;return t===void 0?(0,U.jsxs)(KU,{fsize:n,children:[`Load to `,a??`face ${i}`,` of pal `,e.action.loadOntoPalletNum??``]}):t===e.action.loadOntoPalletNum?(0,U.jsxs)(KU,{fsize:n,children:[`Load to `,a??`face ${i}`]}):null}}case H.LoadingToBasket:return(0,U.jsxs)(KU,{fsize:n,children:[`Load into `,i,` `,e.action.loadToBasketId??``,e.action.loadToBasketSlot===void 0?``:` slot ${e.action.loadToBasketSlot}`]});case H.UnloadToInProcess:case H.UnloadToCompletedMaterial:return e.action.unloadToBasketId?(0,U.jsxs)(KU,{fsize:n,children:[`Unload to `,i,` `,e.action.unloadToBasketId,e.action.unloadToBasketSlot===void 0?``:` slot ${e.action.unloadToBasketSlot}`]}):e.action.unloadIntoQueue?(0,U.jsxs)(KU,{fsize:n,children:[`Unload into queue `,e.action.unloadIntoQueue]}):e.action.type===H.UnloadToCompletedMaterial&&e.location.type===at.InBasket?(0,U.jsxs)(KU,{fsize:n,children:[`Unload from `,i,` `,e.location.basketId,` to completed material`]}):e.location.type===at.InBasket?(0,U.jsxs)(KU,{fsize:n,children:[`Unload from `,i,` `,e.location.basketId]}):(0,U.jsx)(KU,{fsize:n,children:`Unload from pallet`});case H.Waiting:if(e.location.type===at.InQueue&&e.jobUnique&&e.jobUnique!==``)return(0,U.jsxs)(KU,{fsize:n,children:[`Waiting; next process is #`,e.process+1]});if(e.location.type===at.InBasket)return(0,U.jsxs)(KU,{fsize:n,children:[`In `,i,` `,e.location.basketId]});if(e.location.type===at.OnPallet&&(e.lastCompletedMachiningRouteStopIndex===null||e.lastCompletedMachiningRouteStopIndex===void 0))return(0,U.jsx)(KU,{fsize:n,children:`Waiting for machining`});break;case H.Machining:return(0,U.jsxs)(KU,{fsize:n,children:[`Machining program `,e.action.program??``]})}return null}function JU({mat:e}){let t=null;return e.signaledInspections.length>0&&(t=`Inspect: `+e.signaledInspections.join(`, `)),e.quarantineAfterUnload&&(t===null?t=`Material will quarantine after unload`:t+=`; Material will quarantine after unload`),t===null?null:(0,U.jsx)(tw,{title:t,children:(0,U.jsx)(DE,{})})}function YU({fsize:e,mat:t}){let n=R(Fk).jobs[t.jobUnique],r=t.path;if((t.action.type===H.Loading||t.action.type===H.LoadingToBasket)&&t.action.pathAfterLoad&&(r=t.action.pathAfterLoad),!n)return null;let i=n.procsAndPaths?.[0]?.paths?.[r-1];return i&&i.casting&&i.casting!==``?(0,U.jsx)(KU,{fsize:e,children:i.casting}):null}function XU({fsize:e,uniq:t}){let n=R(Fk).jobs[t],r=R(SR);if(n&&n.bookings&&n.bookings.length>0){let t=r.get(n.bookings[0]);if(t&&t.notes&&t.notes!==``)return(0,U.jsx)(KU,{fsize:e,style:{textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,maxWidth:`10em`},children:t.notes})}return null}function ZU(){let e=R(Fk),t=R(AI);if(!t)return null;let n=e.workorders?.find(e=>e.workorderId===t)?.comments??[];return(0,U.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`1em`},children:[(0,U.jsxs)(`p`,{children:[`Workorder: `,t]}),(0,U.jsx)(`ul`,{children:n.map((e,t)=>(0,U.jsx)(`li`,{children:e.comment},t))})]})}var QU=(0,L.forwardRef)(function(e,t){let n=z(SI),r=e.mat.completedInspections||{},i;return e.focusInspectionType&&r[e.focusInspectionType]?i=(0,U.jsxs)(KU,{fsize:e.fsize,children:[(0,U.jsx)(`span`,{children:`Inspection completed `}),(0,U.jsx)(Gz,{date:r[e.focusInspectionType].time})]}):e.focusInspectionType&&e.mat.last_unload_time?i=(0,U.jsxs)(KU,{fsize:e.fsize,children:[(0,U.jsx)(`span`,{children:`Unloaded `}),(0,U.jsx)(Gz,{date:e.mat.last_unload_time})]}):e.mat.closeout_completed&&(i=(0,U.jsxs)(KU,{fsize:e.fsize,children:[(0,U.jsxs)(`span`,{children:[e.mat.closeout_failed?`Failed `:``,`Closed Out `]}),(0,U.jsx)(Gz,{date:e.mat.closeout_completed})]})),(0,U.jsxs)(Vp,{ref:t,elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:e.isDragOverlay?void 0:`8px`,opacity:e.isActiveDrag?.2:1,animation:e.shake?HU:void 0,"&:hover":{animationPlayState:`paused`}},onAnimationIteration:WU,...e.dragRootProps,children:[e.showDragHandle?(0,U.jsx)(`div`,{ref:e.setDragHandleRef,role:`button`,tabIndex:0,style:{display:`flex`,flexDirection:`column`,justifyContent:`center`,cursor:e.isDragOverlay?`grabbing`:`grab`,touchAction:`none`},...e.dragHandleProps,children:(0,U.jsx)(BT,{fontSize:`large`,color:`action`})}):void 0,(0,U.jsx)(wm,{focusRipple:!0,sx:{width:`100%`},onClick:()=>n(e.inProcMat?{type:`InProcMat`,inproc:e.inProcMat}:{type:`MatSummary`,summary:e.mat}),children:(0,U.jsxs)(Y,{sx:{display:`flex`,textAlign:`left`,alignItems:`center`,width:`100%`},children:[(0,U.jsx)(zU,{part:e.mat.partName}),(0,U.jsxs)(Y,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,U.jsx)(GU,{fsize:e.fsize,children:e.mat.partName}),e.displayJob?(0,U.jsx)(KU,{fsize:e.fsize,children:e.mat.jobUnique&&e.mat.jobUnique!==``?`Assigned to `+e.mat.jobUnique:`Unassigned material`}):void 0,!e.hideEmptySerial||e.mat.serial?(0,U.jsxs)(KU,{fsize:e.fsize,children:[`Serial: `,e.mat.serial?e.mat.serial:`none`]}):void 0,e.mat.workorderId===void 0||e.mat.workorderId===``||e.mat.workorderId===e.mat.serial?void 0:(0,U.jsxs)(KU,{fsize:e.fsize,children:[`Workorder: `,e.mat.workorderId]}),e.mat.jobUnique!==void 0&&e.showRawMaterial&&e.inProcMat&&e.inProcMat.process===0?(0,U.jsx)(YU,{fsize:e.fsize,mat:e.inProcMat}):void 0,e.showJobComment&&e.mat.jobUnique&&e.mat.jobUnique!==``?(0,U.jsx)(XU,{fsize:e.fsize,uniq:e.mat.jobUnique}):void 0,e.inProcMat?(0,U.jsx)(qU,{mat:e.inProcMat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize}):void 0,e.inProcMat?.problem?(0,U.jsx)(KU,{fsize:e.fsize,children:(0,U.jsxs)(J,{variant:`body2`,color:`error`,sx:{fontWeight:`bold`},children:[`⚠ `,e.inProcMat.problem]})}):void 0,i]}),(0,U.jsxs)(Y,{sx:{marginLeft:`4px`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,alignItems:`flex-end`,alignSelf:`start`},children:[e.mat.serial&&e.mat.serial.length>=1&&!e.hideAvatar?(0,U.jsx)(`div`,{children:(0,U.jsx)(R_,{style:{width:`30px`,height:`30px`},children:e.mat.serial.slice(-1)})}):void 0,e.hideWarningIcon?void 0:(0,U.jsx)(`div`,{children:(0,U.jsx)(JU,{mat:e.mat})})]})]})})]})}),$U=(0,L.memo)(QU),eW=(0,L.memo)(function(e){return(0,U.jsx)(QU,{mat:mL(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,fsize:e.fsize,hideAvatar:e.hideAvatar,displayJob:e.displayJob,showDragHandle:e.showHandle,hideEmptySerial:e.hideEmptySerial,showRawMaterial:e.showRawMaterial,showJobComment:e.showJobComment,shake:e.shake})}),tW=(0,L.memo)(function(e){let t={mat:e.mat},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=wU({id:e.mat.materialID,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);let d={transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l};return(0,U.jsx)(QU,{ref:o,dragRootProps:{style:d},showDragHandle:!0,dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,mat:mL(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,hideAvatar:e.hideAvatar,displayJob:e.displayJob,hideEmptySerial:e.hideEmptySerial,fsize:e.fsize,shake:n?void 0:e.shake,showRawMaterial:e.showRawMaterial})});function nW(e){return(0,U.jsx)(QU,{mat:mL(e.mat),inProcMat:e.mat,displayActionForSinglePallet:e.displayActionForSinglePallet,showDragHandle:!0,hideAvatar:e.hideAvatar,displayJob:e.displayJob,fsize:e.fsize,hideEmptySerial:e.hideEmptySerial,isDragOverlay:!0})}var rW=(0,L.memo)(function(e){return(0,U.jsx)(Vp,{elevation:4,sx:{display:`flex`,minWidth:`10em`,padding:`8px`,margin:`8px`},children:(0,U.jsx)(tv,{badgeContent:e.material.length<2?0:e.material.length,color:`secondary`,children:(0,U.jsx)(wm,{focusRipple:!0,onClick:()=>e.onOpen(),children:(0,U.jsxs)(Y,{sx:{display:`flex`,textAlign:`left`},children:[(0,U.jsx)(zU,{part:e.partOrCasting}),(0,U.jsxs)(Y,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,U.jsx)(J,{variant:`h6`,children:e.partOrCasting}),(0,U.jsx)(KU,{fsize:e.fsize,children:e.assignedJobUnique&&e.assignedJobUnique!==``?`Assigned to `+e.assignedJobUnique:`Unassigned material`})]}),e.material.length>0&&e.material[0].serial&&e.material[0].serial.length>=1?(0,U.jsx)(`div`,{children:(0,U.jsx)(R_,{style:{width:`30px`,height:`30px`},children:e.material[0].serial.slice(-1)})}):void 0]})})})})}),iW=(0,L.memo)(function({partName:e,serial:t,subtitle:n,notes:r}){let i;return i=e===``?t??`Material`:t==null||t===``?r?`Add note for `+e:e:r?`Add note for `+t:e+` - `+t,(0,U.jsxs)(Y,{sx:{display:`flex`,textAlign:`left`},children:[e===``?(0,U.jsx)(_E,{}):(0,U.jsx)(zU,{part:e}),(0,U.jsxs)(Y,{sx:{marginLeft:`8px`,flexGrow:1},children:[(0,U.jsx)(J,{variant:`h6`,children:i}),n?(0,U.jsx)(J,{variant:`caption`,children:n}):void 0]})]})});function aW({notes:e}){let t=R(SI),n=R(bie),r=R(xie),i=``,a=null;switch(t?.type){case`InProcMat`:i=t.inproc.partName,a=t.inproc.serial;break;case`MatSummary`:i=t.summary.partName,a=t.summary.serial;break;case`MatDetails`:i=t.details.partName,a=t.details.serial;break;case`LogMat`:i=t.logMat.part,a=t.logMat.serial;break;case`Barcode`:a=t.barcode;break;case`ManuallyEnteredSerial`:case`AddMatWithEnteredSerial`:a=t.serial;break}return n.state===`hasData`&&n.data!==null&&(i=n.data.partName,a=n.data.serial??a),r.state===`hasData`&&r.data&&(a=r.data),(0,U.jsx)(iW,{notes:e,partName:i,serial:a})}function oW(){let e=R(PI);function t(t){return e.completedInspections.includes(t)?`black`:`red`}return e.signaledInspections.length===0?(0,U.jsx)(`small`,{children:`Inspections: none`}):(0,U.jsxs)(`small`,{children:[`Inspections:`,` `,e.signaledInspections.map((e,n)=>(0,U.jsxs)(`span`,{children:[n===0?``:`, `,(0,U.jsx)(`span`,{style:{color:t(e)},children:e})]},n))]})}function sW({highlightProcsGreaterOrEqualTo:e}){return(0,U.jsx)(bI,{entries:R(MI),copyToClipboard:!0,highlightProcsGreaterOrEqualTo:e})}function cW(){let e=R(OI),t=R(Fk).jobs,n=R(SR),r=e?t[e.jobUnique]:null;if(r&&r.bookings&&r.bookings.length>0){let e=n.get(r.bookings[0]);if(e&&e.notes&&e.notes!==``)return(0,U.jsx)(J,{variant:`caption`,sx:{width:`100%`,textWrap:`wrap`},children:e.notes})}return null}var lW=(0,L.memo)(function({highlightProcsGreaterOrEqualTo:e}){let t=R(SI),n=R(TI),r=R(wI);return t===null?null:n===null?t.type===`AddMatWithEnteredSerial`||t.type===`ManuallyEnteredSerial`?(0,U.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with serial `,t.serial,` not found.`]}):t.type===`Barcode`?r?(0,U.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` does not yet exist in the cell.`]}):(0,U.jsxs)(`div`,{style:{marginLeft:`1em`},children:[`Material with barcode `,t.barcode,` not found.`]}):(0,U.jsx)(`div`,{style:{marginLeft:`1em`},children:`Material not found.`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{style:{marginLeft:`1em`},children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`small`,{children:[`Workorder: `,n?.workorderId??`none`]})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(RU,{fallback:(0,U.jsxs)(`small`,{children:[`Inspections: `,(0,U.jsx)(qm,{size:`10`})]}),children:(0,U.jsx)(oW,{})})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(RU,{fallback:(0,U.jsx)(`div`,{}),children:(0,U.jsx)(cW,{})})})]}),(0,U.jsx)(RU,{fallback:(0,U.jsx)(qm,{}),children:(0,U.jsx)(sW,{highlightProcsGreaterOrEqualTo:e})})]})});function uW(e){let[t,n]=(0,L.useState)(``),r=R(Nk),[i]=Eie(),a=R(TI);return a===null?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ly,{children:(0,U.jsx)(lT,{sx:{mt:`5px`},multiline:!0,label:`Note`,autoFocus:!0,variant:`outlined`,value:t,onChange:e=>n(e.target.value)})}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{onClick:()=>{i({matId:a.materialID,process:0,operator:r,notes:t}),e.setNotesOpen(!1),n(``)},disabled:t===``,color:`secondary`,children:`Save`}),(0,U.jsx)(X,{onClick:()=>{e.setNotesOpen(!1),n(``)},color:`secondary`,children:`Cancel`})]})]})}function dW(){let e=R(SI);if(e===null)return null;let t;switch(e.type){case`Barcode`:t=`Loading material with barcode `+e.barcode+`...`;break;case`AddMatWithEnteredSerial`:case`ManuallyEnteredSerial`:t=`Loading material with serial `+e.serial+`...`;break;default:t=`Loading material...`;break}return(0,U.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[(0,U.jsx)(qm,{}),(0,U.jsx)(`div`,{style:{marginTop:`1em`},children:t})]})}function fW({setNotesOpen:e}){let t=R(TI);return t===null||t.materialID<0?null:(0,U.jsx)(X,{onClick:()=>e(!0),color:`primary`,children:`Add Note`})}var pW=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=B(SI);function a(){i(null),e.onClose&&e.onClose()}let o,s;return r&&(o=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:(0,U.jsx)(aW,{})}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(RU,{fallback:(0,U.jsx)(dW,{}),children:[(0,U.jsx)(lW,{highlightProcsGreaterOrEqualTo:e.highlightProcsGreaterOrEqualTo}),(0,U.jsx)(RU,{fallback:(0,U.jsx)(qm,{}),children:e.extraDialogElements})]})}),(0,U.jsxs)(jy,{children:[r&&(e.buttons||e.allowNote)?(0,U.jsx)(NU,{fallback:(0,U.jsx)(`div`,{}),children:(0,U.jsxs)(L.Suspense,{fallback:(0,U.jsx)(`div`,{}),children:[r&&e.allowNote?(0,U.jsx)(fW,{setNotesOpen:n}):void 0,e.buttons]})}):null,(0,U.jsx)(X,{onClick:a,color:`secondary`,children:`Close`})]})]}),e.allowNote&&(s=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:(0,U.jsx)(aW,{notes:!0})}),(0,U.jsxs)(RU,{fallback:(0,U.jsx)(Ly,{children:(0,U.jsx)(qm,{})}),children:[(0,U.jsx)(uW,{setNotesOpen:n}),`;`]})]}))),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Dy,{open:r!==null,onClose:a,maxWidth:`lg`,children:o}),e.allowNote?(0,U.jsx)(Dy,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:s}):void 0]})}),mW=wk(`MachineCostPerYear`,{}),hW=wk(`AutomationCostPerYear`,null),gW=wk(`Last30LaborCost`,null),_W=sk(e=>wk(`PerMonthLabor-`+e.getFullYear().toString()+`-`+e.getMonth().toString(),null)),vW=P(e=>e(e(GR).type===`Last30`?lk:pk).valuesToLazySeq().filter(e=>e.procsAndPaths.length===1&&e.procsAndPaths[0].paths.length===1&&e.procsAndPaths[0].paths[0].stops.length===1&&Gk(e.procsAndPaths[0].paths[0].stops[0].expectedCycleTime)===0).toHashSet(e=>e.partName)),yW=P(e=>{let t=e(GR),n=e(t.type===`Last30`?SA:TA),r=e(t.type===`Last30`?dL:pL),i=e(vW),a=RE(lD(),-30),o=t.type===`Last30`?null:t.month;return nz(n.valuesToLazySeq(),i,r.matsById,o?{month:o}:{thirtyDaysAgo:a})}),bW=P(e=>{let t=e(GR),n=e(mW),r=e(hW),i=e(t.type===`Last30`?gW:_W(t.month));return rz(e(yW),n,r,i??0)});function xW(){let[e,t]=(0,L.useState)(null),[n,r]=B(hW);return(0,U.jsx)(lT,{id:`auotmation-cost-year`,type:`number`,label:`Cost for automated handling system per year`,style:{marginTop:`1.5em`},variant:`outlined`,value:e===null?n??``:isNaN(e)?``:e,onChange:e=>t(parseFloat(e.target.value)),onBlur:()=>{e!=null&&r(isNaN(e)?null:e),t(null)},slotProps:{htmlInput:{min:0}}})}function SW(){let e=R(GR),t=e.type===`Last30`?null:e.month,[n,r]=(0,L.useState)(null),[i,a]=B(t===null?gW:_W(t));return(0,U.jsx)(lT,{type:`number`,label:`Total labor cost for `+(t===null?`last 30 days`:t.toLocaleDateString(void 0,{month:`long`,year:`numeric`})),variant:`outlined`,value:n===null?i??``:isNaN(n)?``:n,onChange:e=>r(parseFloat(e.target.value)),onBlur:()=>{n!=null&&a(isNaN(n)?null:n),r(null)},slotProps:{htmlInput:{min:0}}})}function CW(e){let[t,n]=(0,L.useState)(null),[r,i]=B(mW);return(0,U.jsx)(lT,{type:`number`,variant:`outlined`,label:`Cost for `+e.machineGroup+` per station per year`,style:{marginTop:`1.5em`},value:t===null?r[e.machineGroup]??``:isNaN(t)?``:t,onChange:e=>n(parseFloat(e.target.value)),onBlur:()=>{if(t!=null){let n={...r};isNaN(t)?delete n[e.machineGroup]:n[e.machineGroup]=t,i(n)}n(null)},slotProps:{htmlInput:{min:0}}})}function wW(){let e=R(bW);return(0,U.jsx)(U.Fragment,{children:e.machineQuantities.keysToAscLazySeq().map((t,n)=>(0,U.jsx)(CW,{machineQuantities:e.machineQuantities,machineGroup:t},n))})}var TW=Intl.NumberFormat(void 0,{minimumFractionDigits:1,maximumFractionDigits:1}),EW=new Intl.NumberFormat(void 0,{style:`percent`,minimumFractionDigits:1,maximumFractionDigits:1});function DW(){qI(`Cost Percentages`);let e=R(yW);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(J,{variant:`subtitle1`,children:`Part Cost Percentage Breakdown`}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>sz(e),size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(`main`,{children:(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Part`}),(0,U.jsx)(Z,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,U.jsxs)(Z,{align:`right`,children:[e,` Cost %`]},e)),(0,U.jsx)(Z,{align:`right`,children:`Labor Cost %`}),(0,U.jsx)(Z,{align:`right`,children:`Automation Cost %`})]})}),(0,U.jsx)(Sw,{children:Q.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:t.part,size:25})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{variant:`body2`,component:`span`,sx:{display:`block`},children:t.part})})]})}),(0,U.jsx)(Z,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,U.jsx)(Z,{align:`right`,children:EW.format(t.machine.get(e)??0)},e)),(0,U.jsx)(Z,{align:`right`,children:EW.format(t.labor)}),(0,U.jsx)(Z,{align:`right`,children:EW.format(t.automation)})]},n))})]})})]})}function OW(){let e=R(bW);return(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Part`}),(0,U.jsx)(Z,{align:`right`,children:`Completed Quantity`}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,U.jsxs)(Z,{align:`right`,children:[e,` Cost`]},e)),(0,U.jsx)(Z,{align:`right`,children:`Labor Cost`}),(0,U.jsx)(Z,{align:`right`,children:`Automation Cost`}),(0,U.jsxs)(Z,{align:`right`,children:[(0,U.jsx)(`span`,{children:`Total`}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>az(e),size:`large`,children:(0,U.jsx)($T,{})})})]})]})}),(0,U.jsx)(Sw,{children:Q.of(e.parts).sortBy(e=>e.part).map((t,n)=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:t.part,size:25})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{variant:`body2`,component:`span`,sx:{display:`block`},children:t.part})})]})}),(0,U.jsx)(Z,{align:`right`,children:t.parts_completed}),e.machineQuantities.keysToAscLazySeq().map(e=>(0,U.jsx)(Z,{align:`right`,children:TW.format(t.machine.get(e)??0)},e)),(0,U.jsx)(Z,{align:`right`,children:TW.format(t.labor)}),(0,U.jsx)(Z,{align:`right`,children:TW.format(t.automation)}),(0,U.jsx)(Z,{align:`right`,children:TW.format(t.machine.valuesToAscLazySeq().sumBy(e=>e)+t.labor+t.automation)})]},n))})]})}var kW=(0,L.memo)(function(){return qI(`Cost Per Piece`),(0,U.jsx)(Y,{component:`main`,sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`20px`},children:(0,U.jsxs)(nw,{direction:`column`,spacing:4,children:[(0,U.jsxs)(nw,{direction:`column`,spacing:2,children:[(0,U.jsx)(SW,{}),(0,U.jsx)(xW,{}),(0,U.jsx)(wW,{})]}),(0,U.jsx)(OW,{})]})})}),AW=[{type:`Subheader`,caption:`Shop Floor`},{type:`Link`,route:{route:$.Station_LoadMonitor,loadNum:1,queues:[],completed:!1},icon:(0,U.jsx)(LT,{}),label:`Load Station`},{type:`Link`,route:{route:$.Station_Queues,queues:[]},icon:(0,U.jsx)(KT,{}),label:`Queue Management`},{type:`Link`,route:{route:$.Station_InspectionMonitor},icon:(0,U.jsx)(eE,{}),label:`Inspection Stand`},{type:`Link`,route:{route:$.Station_Closeout},icon:(0,U.jsx)(dE,{}),label:`Close Out`},{type:`Link`,route:{route:$.Tools_Dashboard},icon:(0,U.jsx)(wT,{}),label:`Tool Management`},{type:`Link`,route:{route:$.Station_Overview},icon:(0,U.jsx)(DT,{}),label:`System Overview`},{type:`Subheader`,caption:`Daily Monitoring`},{type:`Link`,route:{route:$.Operations_Dashboard},icon:(0,U.jsx)(yE,{}),label:`Operation Management`},{type:`Link`,route:{route:$.Engineering_Cycles},icon:(0,U.jsx)(cE,{}),label:`Engineering`},{type:`Link`,route:{route:$.Quality_Dashboard},icon:(0,U.jsx)(SE,{}),label:`Quality Analysis`},{type:`Link`,route:{route:$.Sales_Dashboard},icon:(0,U.jsx)(fE,{}),label:`Sales`},{type:`Subheader`,caption:`Monthly Review`},{type:`Link`,route:{route:$.Analysis_Buffers},icon:(0,U.jsx)(tE,{}),label:`Flexibility Analysis`}];function jW(e){let t=(0,U.jsx)(Vp,{children:(0,U.jsx)(gx,{component:`nav`,dense:!0,children:(e.modes??AW).map((t,n)=>t.type===`Subheader`?(0,U.jsx)(w_,{children:t.caption},n):(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{onClick:()=>e.setRoute(t.route),children:[(0,U.jsx)(Fx,{children:t.icon}),(0,U.jsx)(Bx,{children:t.label})]})},n))})});return(0,U.jsx)(`main`,{style:{display:`flex`,justifyContent:`center`},children:(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,U.jsx)(J,{variant:`h4`,style:{marginTop:`2em`},children:`Select user and computer location`}),(0,U.jsxs)(J,{variant:`caption`,style:{marginBottom:`2em`,maxWidth:`30em`,marginLeft:`auto`,marginRight:`auto`},children:[`We recommend that after selecting one of the following modes, you bookmark the page and visit it directly.`,(0,U.jsx)(`a`,{href:`https://fms-insight.seedtactics.com/docs/client-dashboard.html`,children:`Learn More`})]})]}),t]})})}var MW=[[`All`,`*`,`*`,` `,0,`All`],[`AllReadable`,`*`,`r`,` `,0,`All Readable`],[`AllCreatable`,`*`,`w`,` `,0,`All Creatable`],[`AllLinear`,`*`,`l`,` `,0,`All Linear`],[`AllMatrix`,`*`,`m`,` `,0,`All Matrix`],[`AllGS1`,`*`,`G`,` `,0,`All GS1`],[`AllRetail`,`*`,`R`,` `,0,`All Retail`],[`AllIndustrial`,`*`,`I`,` `,0,`All Industrial`],[`Codabar`,`F`,` `,`lrw `,18,`Codabar`],[`Code39`,`A`,` `,`lrw I`,8,`Code 39`],[`Code39Std`,`A`,`s`,`lrw I`,8,`Code 39 Standard`],[`Code39Ext`,`A`,`e`,`lr I`,9,`Code 39 Extended`],[`Code32`,`A`,`2`,`lr I`,129,`Code 32`],[`PZN`,`A`,`p`,`lr I`,52,`Pharmazentralnummer`],[`Code93`,`G`,` `,`lrw I`,25,`Code 93`],[`Code128`,`C`,` `,`lrwGI`,20,`Code 128`],[`ITF`,`I`,` `,`lrw I`,3,`ITF`],[`ITF14`,`I`,`4`,`lr I`,89,`ITF-14`],[`DataBar`,`e`,` `,`lr GR`,29,`DataBar`],[`DataBarOmni`,`e`,`o`,`lr GR`,29,`DataBar Omni`],[`DataBarStk`,`e`,`s`,`lr GR`,79,`DataBar Stacked`],[`DataBarStkOmni`,`e`,`O`,`lr GR`,80,`DataBar Stacked Omni`],[`DataBarLtd`,`e`,`l`,`lr GR`,30,`DataBar Limited`],[`DataBarExp`,`e`,`e`,`lr GR`,31,`DataBar Expanded`],[`DataBarExpStk`,`e`,`E`,`lr GR`,81,`DataBar Expanded Stacked`],[`EANUPC`,`E`,` `,`lr R`,15,`EAN/UPC`],[`EAN13`,`E`,`1`,`lrw R`,15,`EAN-13`],[`EAN8`,`E`,`8`,`lrw R`,10,`EAN-8`],[`EAN5`,`E`,`5`,`l R`,12,`EAN-5`],[`EAN2`,`E`,`2`,`l R`,11,`EAN-2`],[`ISBN`,`E`,`i`,`lr R`,69,`ISBN`],[`UPCA`,`E`,`a`,`lrw R`,34,`UPC-A`],[`UPCE`,`E`,`e`,`lrw R`,37,`UPC-E`],[`Telepen`,`B`,` `,`lr I`,32,`Telepen`],[`TelepenAlpha`,`B`,`0`,`lr I`,32,`Telepen Alpha`],[`TelepenNumeric`,`B`,`1`,`lr I`,87,`Telepen Numeric`],[`OtherBarcode`,`X`,` `,` r `,0,`Other barcode`],[`DXFilmEdge`,`X`,`x`,`lr `,147,`DX Film Edge`],[`PDF417`,`L`,` `,`mrw `,55,`PDF417`],[`CompactPDF417`,`L`,`c`,`mr `,56,`Compact PDF417`],[`MicroPDF417`,`L`,`m`,`mr `,84,`MicroPDF417`],[`Aztec`,`z`,` `,`mr G `,92,`Aztec`],[`AztecCode`,`z`,`c`,`mrwG `,92,`Aztec Code`],[`AztecRune`,`z`,`r`,`mr `,128,`Aztec Rune`],[`QRCode`,`Q`,` `,`mrwG `,58,`QR Code`],[`QRCodeModel1`,`Q`,`1`,`mr `,0,`QR Code Model 1`],[`QRCodeModel2`,`Q`,`2`,`mr `,58,`QR Code Model 2`],[`MicroQRCode`,`Q`,`m`,`mr `,97,`Micro QR Code`],[`RMQRCode`,`Q`,`r`,`mr G `,145,`rMQR Code`],[`DataMatrix`,`d`,` `,`mrwG `,71,`Data Matrix`],[`MaxiCode`,`U`,` `,`mr `,57,`MaxiCode`]],NW={DataBarExpanded:`DataBarExp`,DataBarLimited:`DataBarLtd`,"Linear-Codes":`AllLinear`,"Matrix-Codes":`AllMatrix`,Any:`All`,rMQRCode:`RMQRCode`};MW.map(e=>e[5]),MW.filter(e=>e[1]===`*`).map(e=>e[0]),MW.filter(e=>e[1]!==`*`).map(e=>e[0]),MW.filter(e=>e[2]===` `).map(e=>e[0]),MW.filter(e=>e[3][0]===`l`).map(e=>e[0]),MW.filter(e=>e[3][0]===`m`).map(e=>e[0]),MW.filter(e=>e[3][1]===`r`).map(e=>e[0]),MW.filter(e=>e[3][2]===`w`||e[4]!==0).map(e=>e[0]),MW.filter(e=>e[3][3]===`G`).map(e=>e[0]),MW.filter(e=>e[3][4]===`R`).map(e=>e[0]),MW.filter(e=>e[3][4]===`I`).map(e=>e[0]);function PW(e){return NW[e]??e}function FW(e){return e.map(PW).join(`,`)}var IW=[`LocalAverage`,`GlobalHistogram`,`FixedThreshold`,`BoolCast`];function LW(e){return IW.indexOf(e)}var RW=`Unknown.ASCII.ISO8859_1.ISO8859_2.ISO8859_3.ISO8859_4.ISO8859_5.ISO8859_6.ISO8859_7.ISO8859_8.ISO8859_9.ISO8859_10.ISO8859_11.ISO8859_13.ISO8859_14.ISO8859_15.ISO8859_16.Cp437.Cp1250.Cp1251.Cp1252.Cp1256.Shift_JIS.Big5.GB2312.GB18030.EUC_JP.EUC_KR.UTF16BE.UTF8.UTF16LE.UTF32BE.UTF32LE.BINARY`.split(`.`);function zW(e){return e===`UnicodeBig`?RW.indexOf(`UTF16BE`):RW.indexOf(e)}var BW=[`Text`,`Binary`,`Mixed`,`GS1`,`ISO15434`,`UnknownECI`];function VW(e){return BW[e]}var HW=[`Ignore`,`Read`,`Require`];function UW(e){return HW.indexOf(e)}var WW=[`Plain`,`ECI`,`HRI`,`Escaped`,`Hex`,`HexECI`];function GW(e){return WW.indexOf(e)}var KW={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:`LocalAverage`,isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,validateOptionalChecksum:!1,returnErrors:!1,eanAddOnSymbol:`Ignore`,textMode:`HRI`,characterSet:`Unknown`,tryCode39ExtendedMode:!0};function qW(e){var t;return{...e,formats:FW(e.formats),binarizer:LW(e.binarizer),eanAddOnSymbol:UW(e.eanAddOnSymbol),textMode:GW(e.textMode),characterSet:zW(e.characterSet),tryCode39ExtendedMode:(t=e.tryCode39ExtendedMode)==null||t}}function JW(e){return{...e,format:e.format,symbology:e.symbology,contentType:VW(e.contentType)}}var YW={format:`QRCode`,readerInit:!1,forceSquareDataMatrix:!1,ecLevel:``,scale:1,sizeHint:0,rotate:0,invert:!1,withHRT:!1,withQuietZones:!0,addHRT:!1,addQuietZones:!0,options:``},XW={locateFile:(e,t)=>{let n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@3.1.1/dist/${n[1]}/${e}`:t+e}},ZW=new WeakMap;function QW(e,t){return Object.is(e,t)||Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>Object.hasOwn(t,n)&&e[n]===t[n])}function $W(e,{overrides:t,equalityFn:n=QW,fireImmediately:r=!1}={}){let[i,a]=ZW.get(e)??[XW],o=t??i,s;if(r){if(a&&(s=n(i,o)))return a;let t=e({...o});return ZW.set(e,[o,t]),t}(s??n(i,o))||ZW.set(e,[o])}function eG(e){let t=e.byteLength>>2,n=new Uint8Array(t);for(let r=0;r<t;r++){let t=r<<2;n[r]=306*e[t]+601*e[t+1]+117*e[t+2]+512>>10}return n}async function tG(e,t,n=KW){let r={...KW,...n},i=await $W(e,{fireImmediately:!0}),a,o;if(`width`in t&&`height`in t&&`data`in t){let{data:e,width:n,height:s}=t,c=eG(e),l=c.byteLength;if(o=i._malloc(l),!o)throw Error(`Failed to allocate ${l} bytes in WASM memory`);try{i.HEAPU8.set(c,o),a=i.readBarcodesFromPixmap(o,n,s,qW(r))}finally{i._free(o)}}else{let e,n;if(`buffer`in t)[e,n]=[t.byteLength,t];else if(`byteLength`in t)[e,n]=[t.byteLength,new Uint8Array(t)];else if(`size`in t)[e,n]=[t.size,new Uint8Array(await t.arrayBuffer())];else throw TypeError(`Invalid input type`);if(o=i._malloc(e),!o)throw Error(`Failed to allocate ${e} bytes in WASM memory`);try{i.HEAPU8.set(n,o),a=i.readBarcodesFromImage(o,e,qW(r))}finally{i._free(o)}}let s=[];for(let e=0;e<a.size();++e)s.push(JW(a.get(e)));return s}({...KW}),[...KW.formats],{...YW};async function nG(e={}){var t,n,r,i=e,a=!!globalThis.window,o=typeof Bun<`u`,s=!!globalThis.WorkerGlobalScope;!((n=globalThis.process)==null||(n=n.versions)==null)&&n.node&&((r=globalThis.process)==null||r.type);var c=`./this.program`,l,u=``;function d(e){return i.locateFile?i.locateFile(e,u):u+e}var f,p;if(a||s||o){try{u=new URL(`.`,l).href}catch{}s&&(p=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),f=async e=>{var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}console.log.bind(console);var m=console.error.bind(console),h,g=!1,_,v,y=!1;function b(){var e=er.buffer;ne=new Int8Array(e),j=new Int16Array(e),i.HEAPU8=oe=new Uint8Array(e),ae=new Uint16Array(e),M=new Int32Array(e),N=new Uint32Array(e),re=new Float32Array(e),ie=new Float64Array(e)}function x(){if(i.preRun)for(typeof i.preRun==`function`&&(i.preRun=[i.preRun]);i.preRun.length;)ue(i.preRun.shift());se(le)}function S(){y=!0,Ur.ya()}function C(){if(i.postRun)for(typeof i.postRun==`function`&&(i.postRun=[i.postRun]);i.postRun.length;)P(i.postRun.shift());se(ce)}function w(e){var t,n;(t=i.onAbort)==null||t.call(i,e),e=`Aborted(`+e+`)`,m(e),g=!0,e+=`. Build with -sASSERTIONS for more info.`;var r=new WebAssembly.RuntimeError(e);throw(n=v)==null||n(r),r}var T;function E(){return d(`zxing_reader.wasm`)}function D(e){if(e==T&&h)return new Uint8Array(h);if(p)return p(e);throw`both async and sync fetching of the wasm failed`}async function O(e){if(!h)try{var t=await f(e);return new Uint8Array(t)}catch{}return D(e)}async function ee(e,t){try{var n=await O(e);return await WebAssembly.instantiate(n,t)}catch(e){m(`failed to asynchronously prepare wasm: ${e}`),w(e)}}async function te(e,t,n){if(!e&&WebAssembly.instantiateStreaming)try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){m(`wasm streaming compile failed: ${e}`),m(`falling back to ArrayBuffer instantiation`)}return ee(t,n)}function k(){return{a:rr}}async function A(){function e(e,t){return Ur=e.exports,nr(Ur),b(),Ur}function t(t){return e(t.instance)}var n=k();return i.instantiateWasm?new Promise((t,r)=>{i.instantiateWasm(n,(n,r)=>{t(e(n,r))})}):(T??=E(),t(await te(h,T,n)))}var j,M,ne,re,ie,ae,N,oe,se=e=>{for(;e.length>0;)e.shift()(i)},ce=[],P=e=>ce.push(e),le=[],ue=e=>le.push(e),F=e=>Kn(e),I=()=>qn(),de=[],fe=0,pe=e=>{var t=new he(e);return t.get_caught()||(t.set_caught(!0),fe--),t.set_rethrown(!1),de.push(t),Un(e)},me=0,L=()=>{Wn(0,0);var e=de.pop();Jn(e.excPtr),me=0};class he{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){N[this.ptr+4>>2]=e}get_type(){return N[this.ptr+4>>2]}set_destructor(e){N[this.ptr+8>>2]=e}get_destructor(){return N[this.ptr+8>>2]}set_caught(e){e=+!!e,ne[this.ptr+12]=e}get_caught(){return ne[this.ptr+12]!=0}set_rethrown(e){e=+!!e,ne[this.ptr+13]=e}get_rethrown(){return ne[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){N[this.ptr+16>>2]=e}get_adjusted_ptr(){return N[this.ptr+16>>2]}}var ge=e=>Gn(e),_e=e=>{var t=me;if(!t)return ge(0),0;var n=new he(t);n.set_adjusted_ptr(t);var r=n.get_type();if(!r)return ge(0),t;for(var i of e){if(i===0||i===r)break;var a=n.ptr+16;if(Xn(i,r,a))return ge(i),t}return ge(r),t},ve=()=>_e([]),ye=e=>_e([e]),be=(e,t)=>_e([e,t]),xe=()=>{var e=de.pop();e||w(`no exception to throw`);var t=e.excPtr;throw e.get_rethrown()||(de.push(e),e.set_rethrown(!0),e.set_caught(!1),fe++),Yn(t),me=t,me},Se=(e,t,n)=>{throw new he(e).init(t,n),Yn(e),me=e,fe++,me},R=()=>fe,z=e=>{throw me||=e,me},B=()=>w(``),Ce={},we=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Te(e){return this.fromWireType(N[e>>2])}var Ee={},De={},Oe={},ke=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Ae=e=>{throw new ke(e)},je=(e,t,n)=>{e.forEach(e=>Oe[e]=t);function r(t){var r=n(t);r.length!==e.length&&Ae(`Mismatched type converter count`);for(var i=0;i<e.length;++i)Le(e[i],r[i])}var i=Array(t.length),a=[],o=0;{let e=t;for(let t=0;t<e.length;++t){let n=e[t];De.hasOwnProperty(n)?i[t]=De[n]:(a.push(n),Ee.hasOwnProperty(n)||(Ee[n]=[]),Ee[n].push(()=>{i[t]=De[n],++o,o===a.length&&r(i)}))}}a.length===0&&r(i)},V=e=>{var t=Ce[e];delete Ce[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));je([e],a,e=>{var a={};{let t=i;for(let n=0;n<t.length;++n){let r=t[n],o=e[n],s=r.getter,c=r.getterContext,l=e[n+i.length],u=r.setter,d=r.setterContext;a[r.fieldName]={read:e=>o.fromWireType(s(c,e)),write:(e,t)=>{var n=[];u(d,e,l.toWireType(n,t)),we(n)},optional:o.optional}}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:Te,destructorFunction:r}]})},Me=(e,t,n,r,i)=>{},Ne=e=>{for(var t=``;;){var n=oe[e++];if(!n)return t;t+=String.fromCharCode(n)}},Pe=class extends Error{constructor(e){super(e),this.name=`BindingError`}},Fe=e=>{throw new Pe(e)};function Ie(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=t.name;if(e||Fe(`type "${r}" must have a positive integer typeid pointer`),De.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;Fe(`Cannot register type '${r}' twice`)}if(De[e]=t,delete Oe[e],Ee.hasOwnProperty(e)){var i=Ee[e];delete Ee[e],i.forEach(e=>e())}}function Le(e,t){return Ie(e,t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})}var Re=(e,t,n,r)=>{t=Ne(t),Le(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(oe[e])},destructorFunction:null})},ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Be=e=>{function t(e){return e.$$.ptrType.registeredClass.name}Fe(t(e)+` instance already deleted`)},Ve=!1,He=e=>{},Ue=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},We=e=>{--e.count.value,e.count.value===0&&Ue(e)},Ge=e=>globalThis.FinalizationRegistry?(Ve=new FinalizationRegistry(e=>{We(e.$$)}),Ge=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};Ve.register(e,n,e)}return e},He=e=>Ve.unregister(e),Ge(e)):(Ge=e=>e,e),Ke=[],qe=()=>{for(;Ke.length;){var e=Ke.pop();e.$$.deleteScheduled=!1,e.delete()}},Je,Ye=()=>{let e=Xe.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof Xe)||!(e instanceof Xe))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return t===r&&n===i},clone(){if(this.$$.ptr||Be(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ge(Object.create(Object.getPrototypeOf(this),{$$:{value:ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Be(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Fe(`Object already scheduled for deletion`),He(this),We(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Be(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Fe(`Object already scheduled for deletion`),Ke.push(this),Ke.length===1&&Je&&Je(qe),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function Xe(){}var Ze=(e,t)=>Object.defineProperty(t,"name",{value:e}),Qe={},$e=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){var r=[...arguments];return e[t].overloadTable.hasOwnProperty(r.length)||Fe(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},et=(e,t,n)=>{i.hasOwnProperty(e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&Fe(`Cannot register public name '${e}' twice`),$e(i,e,e),i[e].overloadTable.hasOwnProperty(n)&&Fe(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].overloadTable[n]=t):(i[e]=t,i[e].argCount=n)},tt=48,nt=57,rt=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=tt&&t<=nt?`_${e}`:e};function it(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}var at=(e,t,n)=>{for(;t!==n;)t.upcast||Fe(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},ot=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function H(e,t){if(t===null)return this.isReference&&Fe(`null is not a valid ${this.name}`),0;t.$$||Fe(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||Fe(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return at(t.$$.ptr,n,this.registeredClass)}function st(e,t){var n;if(t===null)return this.isReference&&Fe(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&Fe(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||Fe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Fe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=at(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&Fe(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:Fe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var i=t.clone();n=this.rawShare(n,Rt.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:Fe(`Unsupported sharing policy`)}return n}function ct(e,t){if(t===null)return this.isReference&&Fe(`null is not a valid ${this.name}`),0;t.$$||Fe(`Cannot pass "${ot(t)}" as a ${this.name}`),t.$$.ptr||Fe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Fe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return at(t.$$.ptr,n,this.registeredClass)}var lt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=lt(e,t,n.baseClass);return r===null?null:n.downcast(r)},ut={},dt=(e,t)=>{for(t===void 0&&Fe(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=dt(e,t),ut[t]),pt=(e,t)=>((!t.ptrType||!t.ptr)&&Ae(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&Ae(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},Ge(Object.create(e,{$$:{value:t,writable:!0}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=ft(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=Qe[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=lt(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?pt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):pt(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var ht=()=>{Object.assign(gt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)==null||t.call(this,e)},readValueFromPointer:Te,fromWireType:mt})};function gt(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,!i&&t.baseClass===void 0?r?(this.toWireType=H,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null):this.toWireType=st}var _t=(e,t,n)=>{i.hasOwnProperty(e)||Ae(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)},vt={},yt=(e,t,n)=>{e=e.replace(/p/g,`i`);var r=vt[e];return r(t,...n)},bt=[],xt=e=>{var t=bt[e];return t||(bt[e]=t=tr.get(e)),t},St=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(arguments.length>3&&arguments[3]!==void 0&&arguments[3],e.includes(`j`))return yt(e,t,n);var r=xt(t)(...n);function i(e){return e}return i(r)},Ct=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return function(){return St(e,t,[...arguments],n)}},wt=function(e,t){arguments.length>2&&arguments[2]!==void 0&&arguments[2],e=Ne(e);function n(){return e.includes(`j`)?Ct(e,t):xt(t)}var r=n();return typeof r!=`function`&&Fe(`unknown function pointer with signature ${e}: ${t}`),r};class Tt extends Error{}var Et=e=>{var t=Bn(e),n=Ne(t);return Vn(t),n},Dt=(e,t)=>{var n=[],r={};function i(e){if(!r[e]&&!De[e]){if(Oe[e]){Oe[e].forEach(i);return}n.push(e),r[e]=!0}}throw t.forEach(i),new Tt(`${e}: `+n.map(Et).join([`, `]))},Ot=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=Ne(u),a=wt(i,a),s&&=wt(o,s),l&&=wt(c,l),f=wt(d,f);var p=rt(u);et(p,function(){Dt(`Cannot construct ${u} due to unbound types`,[r])}),je([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=Xe.prototype;var o=Ze(u,function(){if(Object.getPrototypeOf(this)!==c)throw new Pe(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new Pe(`${u} has no accessible constructor`);var e=[...arguments],t=d.constructor_body[e.length];if(t===void 0)throw new Pe(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new it(u,o,c,f,n,a,s,l);if(d.baseClass){var m;(m=d.baseClass).__derivedClasses??(m.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d)}var h=new gt(u,d,!0,!1,!1),g=new gt(u+`*`,d,!1,!1,!1),_=new gt(u+` const*`,d,!1,!0,!1);return Qe[e]={pointerType:g,constPointerType:_},_t(p,o),[h,g,_]})},kt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(N[t+r*4>>2]);return n};function At(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function jt(e,t,n,r,i,a){var o=t.length;o<2&&Fe(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var s=t[1]!==null&&n!==null,c=At(t),l=!t[0].isVoid,u=o-2,d=Array(u),f=[],p=[];return Ze(e,function(){p.length=0;var e;f.length=s?2:1,f[0]=i,s&&(e=t[1].toWireType(p,this),f[1]=e);for(var n=0;n<u;++n)d[n]=t[n+2].toWireType(p,n<0||arguments.length<=n?void 0:arguments[n]),f.push(d[n]);var a=r(...f);function o(n){if(c)we(p);else for(var r=s?1:2;r<t.length;r++){var i=r===1?e:d[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(i)}if(l)return t[0].fromWireType(n)}return o(a)})}var Mt=(e,t,n,r,i,a)=>{var o=kt(t,n);i=wt(r,i),je([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new Pe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Dt(`Cannot construct ${e.name} due to unbound types`,o)},je([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=jt(n,r,null,i,a),[])),[]})},Nt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Pt=(e,t,n,r,i,a,o,s,c,l)=>{var u=kt(n,r);t=Ne(t),t=Nt(t),a=wt(i,a,c),je([],[e],e=>{e=e[0];var r=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);function i(){Dt(`Cannot call ${r} due to unbound types`,u)}var l=e.registeredClass.instancePrototype,d=l[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(i.argCount=n-2,i.className=e.name,l[t]=i):($e(l,t,r),l[t].overloadTable[n-2]=i),je([],u,i=>{var s=jt(r,i,e,a,o,c);return l[t].overloadTable===void 0?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]}),[]})},Ft=[],It=[0,1,,1,null,1,!0,1,!1,1],Lt=e=>{e>9&&--It[e+1]===0&&(It[e]=void 0,Ft.push(e))},Rt={toValue:e=>(e||Fe(`Cannot use deleted val. handle = ${e}`),It[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=Ft.pop()||It.length;return It[t]=e,It[t+1]=1,t}}}},zt={name:`emscripten::val`,fromWireType:e=>{var t=Rt.toValue(e);return Lt(e),t},toWireType:(e,t)=>Rt.toHandle(t),readValueFromPointer:Te,destructorFunction:null},Bt=e=>Le(e,zt),Vt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(re[e>>2])};case 8:return function(e){return this.fromWireType(ie[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Ht=(e,t,n)=>{t=Ne(t),Le(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Vt(t,n),destructorFunction:null})},Ut=(e,t,n,r,i,a,o,s)=>{var c=kt(t,n);e=Ne(e),e=Nt(e),i=wt(r,i,o),et(e,function(){Dt(`Cannot call ${e} due to unbound types`,c)},t-1),je([],c,n=>{var r=[n[0],null].concat(n.slice(1));return _t(e,jt(e,r,null,i,a,o),t-1),[]})},Wt=(e,t,n)=>{switch(t){case 1:return n?e=>ne[e]:e=>oe[e];case 2:return n?e=>j[e>>1]:e=>ae[e>>1];case 4:return n?e=>M[e>>2]:e=>N[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Gt=(e,t,n,r,i)=>{t=Ne(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}Le(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:Wt(t,n,r!==0),destructorFunction:null})},Kt=(e,t,n)=>{let r=(e,t)=>{let n=0;return{next(){if(n>=e)return{done:!0};let r=n;return n++,{value:t(r),done:!1}},[Symbol.iterator](){return this}}};e[Symbol.iterator]||(e[Symbol.iterator]=function(){return r(this[t](),e=>this[n](e))})},qt=(e,t,n,r)=>{n=Ne(n),r=Ne(r),je([],[e,t],e=>{let t=e[0];return Kt(t.registeredClass.instancePrototype,n,r),[]})},Jt=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=N[e>>2],n=N[e+4>>2];return new r(ne.buffer,n,t)}n=Ne(n),Le(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Yt=Object.assign({optional:!0},zt),Xt=(e,t)=>{Le(e,Yt)},Zt=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},Qt=(e,t,n)=>Zt(e,oe,t,n),$t=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},en=globalThis.TextDecoder&&new TextDecoder,tn=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},nn=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;var i=tn(e,t,n,r);if(i-t>16&&e.buffer&&en)return en.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},rn=(e,t,n)=>e?nn(oe,e,t,n):``,an=(e,t)=>{t=Ne(t);var n=!0;Le(e,{name:t,fromWireType(e){var t=N[e>>2],r=e+4,i;if(n)i=rn(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode(oe[r+a])}return Vn(e),i},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i=typeof t==`string`;i||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||Fe(`Cannot pass non-string to std::string`),r=n&&i?$t(t):t.length;var a=Hn(4+r+1),o=a+4;if(N[a>>2]=r,i)if(n)Qt(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&(Vn(a),Fe(`String has UTF-16 code units that do not fit in 8 bits`)),oe[o+s]=c}else oe.set(t,o);return e!==null&&e.push(Vn,a),a},readValueFromPointer:Te,destructorFunction(e){Vn(e)}})},on=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,sn=(e,t,n)=>{var r=e>>1,i=tn(ae,r,t/2,n);if(i-r>16&&on)return on.decode(ae.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=ae[o];a+=String.fromCharCode(s)}return a},cn=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);j[t>>1]=o,t+=2}return j[t>>1]=0,t-r},ln=e=>e.length*2,un=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=N[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},dn=(e,t,n)=>{if(n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,M[t>>2]=o,t+=4,t+4>i)break}return M[t>>2]=0,t-r},fn=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},pn=(e,t,n)=>{n=Ne(n);var r,i,a;t===2?(r=sn,i=cn,a=ln):(r=un,i=dn,a=fn),Le(e,{name:n,fromWireType:e=>{var n=N[e>>2],i=r(e+4,n*t,!0);return Vn(e),i},toWireType:(e,r)=>{typeof r!=`string`&&Fe(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Hn(4+o+t);return N[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Vn,s),s},readValueFromPointer:Te,destructorFunction(e){Vn(e)}})},mn=(e,t,n,r,i,a)=>{Ce[e]={name:Ne(t),rawConstructor:wt(n,r),rawDestructor:wt(i,a),fields:[]}},hn=(e,t,n,r,i,a,o,s,c,l)=>{Ce[e].fields.push({fieldName:Ne(t),getterReturnType:n,getter:wt(r,i),getterContext:a,setterArgumentType:o,setter:wt(s,c),setterContext:l})},gn=(e,t)=>{t=Ne(t),Le(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},_n=[],vn=e=>{var t=_n.length;return _n.push(e),t},yn=(e,t)=>{var n=De[e];return n===void 0&&Fe(`${t} has unknown type ${Et(e)}`),n},bn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=yn(N[t+r*4>>2],`parameter ${r}`);return n},xn=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(N[t>>2]=Rt.toHandle(r)),i},Sn={},Cn=e=>{var t=Sn[e];return t===void 0?Ne(e):t},wn=(e,t,n)=>{var[r,...i]=bn(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return vn(Ze(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=Rt.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(Rt.toValue(t),s);break;case 3:d=s[0];break;case 1:d=Rt.toValue(t)[Cn(r)](...s);break}return xn(a,i,d)}))},Tn=e=>e?(e=Cn(e),Rt.toHandle(globalThis[e])):Rt.toHandle(globalThis),En=e=>{e>9&&(It[e+1]+=1)},Dn=(e,t,n,r,i)=>_n[e](t,n,r,i),On=e=>{we(Rt.toValue(e)),Lt(e)},kn=(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);N[e>>2]=l*60,M[t>>2]=Number(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?(Qt(d,n,17),Qt(f,r,17)):(Qt(d,r,17),Qt(f,n,17))},An=()=>2147483648,jn=(e,t)=>Math.ceil(e/t)*t,Mn=e=>{var t=(e-er.buffer.byteLength+65535)/65536|0;try{return er.grow(t),b(),1}catch{}},Nn=e=>{var t=oe.length;e>>>=0;var n=An();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),Mn(Math.min(n,jn(Math.max(e,i),65536))))return!0}return!1},Pn={},Fn=()=>c||`./this.program`,In=()=>{if(!In.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:Fn()};for(var t in Pn)Pn[t]===void 0?delete e[t]:e[t]=Pn[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);In.strings=n}return In.strings},Ln=(e,t)=>{var n=0,r=0;for(var i of In()){var a=t+n;N[e+r>>2]=a,n+=Qt(i,a,1/0)+1,r+=4}return 0},Rn=(e,t)=>{var n=In();N[e>>2]=n.length;var r=0;for(var i of n)r+=$t(i)+1;return N[t>>2]=r,0},zn=e=>e;if(Ye(),ht(),i.noExitRuntime&&i.noExitRuntime,i.print&&i.print,i.printErr&&(m=i.printErr),i.wasmBinary&&(h=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&(c=i.thisProgram),i.preInit)for(typeof i.preInit==`function`&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.shift()();var Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr;function nr(e){Bn=e.za,Vn=i._free=e.Aa,Hn=i._malloc=e.Ca,Un=e.Da,Wn=e.Ea,Gn=e.Fa,Kn=e.Ga,qn=e.Ha,Jn=e.Ia,Yn=e.Ja,Xn=e.Ka,vt.viijii=e.La,Zn=vt.viijjijjjjjj=e.Ma,Qn=vt.iiijj=e.Na,$n=vt.jiiii=e.Oa,vt.iiiiij=e.Pa,vt.iiiiijj=e.Qa,vt.iiiiiijj=e.Ra,er=e.xa,tr=e.Ba}var rr={q:pe,x:L,a:ve,i:ye,m:be,S:xe,p:Se,fa:R,d:z,ba:B,ua:V,aa:Me,oa:Re,sa:Ot,ra:Mt,H:Pt,ma:Bt,X:Ht,Y:Ut,A:Gt,qa:qt,u:Jt,ta:Xt,na:an,T:pn,I:mn,va:hn,pa:gn,O:wn,wa:Lt,F:Tn,U:En,N:Dn,ha:On,ca:kn,ga:Nn,da:Ln,ea:Rn,ka:wr,M:Dr,B:Nr,P:dr,V:Fr,s:Ir,b:or,C:Er,ia:jr,c:cr,Q:Mr,h:ur,j:_r,r:vr,R:Tr,t:br,G:xr,D:Sr,K:Lr,_:Br,Z:Vr,f:fr,l:ir,e:sr,W:Or,g:lr,L:Pr,k:ar,ja:kr,o:yr,y:mr,v:Cr,E:gr,w:Ar,n:pr,J:Rr,la:hr,$:zr,z:zn};function ir(e,t){var n=I();try{xt(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Wn(1,0)}}function ar(e,t,n,r,i){var a=I();try{xt(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Wn(1,0)}}function or(e,t){var n=I();try{return xt(e)(t)}catch(e){if(F(n),e!==e+0)throw e;Wn(1,0)}}function sr(e,t,n){var r=I();try{xt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Wn(1,0)}}function cr(e,t,n){var r=I();try{return xt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Wn(1,0)}}function lr(e,t,n,r){var i=I();try{xt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Wn(1,0)}}function ur(e,t,n,r){var i=I();try{return xt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Wn(1,0)}}function dr(e,t,n,r,i,a){var o=I();try{return xt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Wn(1,0)}}function fr(e){var t=I();try{xt(e)()}catch(e){if(F(t),e!==e+0)throw e;Wn(1,0)}}function pr(e,t,n,r,i,a,o,s,c,l,u){var d=I();try{xt(e)(t,n,r,i,a,o,s,c,l,u)}catch(e){if(F(d),e!==e+0)throw e;Wn(1,0)}}function mr(e,t,n,r,i,a,o){var s=I();try{xt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Wn(1,0)}}function hr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=I();try{xt(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}catch(e){if(F(_),e!==e+0)throw e;Wn(1,0)}}function gr(e,t,n,r,i,a,o,s,c){var l=I();try{xt(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Wn(1,0)}}function _r(e,t,n,r,i){var a=I();try{return xt(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Wn(1,0)}}function vr(e,t,n,r,i,a){var o=I();try{return xt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Wn(1,0)}}function yr(e,t,n,r,i,a){var o=I();try{xt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Wn(1,0)}}function br(e,t,n,r,i,a,o){var s=I();try{return xt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Wn(1,0)}}function xr(e,t,n,r,i,a,o,s){var c=I();try{return xt(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Wn(1,0)}}function Sr(e,t,n,r,i,a,o,s,c){var l=I();try{return xt(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Wn(1,0)}}function Cr(e,t,n,r,i,a,o,s){var c=I();try{xt(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Wn(1,0)}}function wr(e,t,n){var r=I();try{return xt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Wn(1,0)}}function Tr(e,t,n,r,i,a,o){var s=I();try{return xt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Wn(1,0)}}function Er(e,t,n,r){var i=I();try{return xt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Wn(1,0)}}function Dr(e,t,n,r){var i=I();try{return xt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Wn(1,0)}}function Or(e,t,n,r,i,a,o,s,c){var l=I();try{xt(e)(t,n,r,i,a,o,s,c)}catch(e){if(F(l),e!==e+0)throw e;Wn(1,0)}}function kr(e,t,n,r,i,a,o,s){var c=I();try{xt(e)(t,n,r,i,a,o,s)}catch(e){if(F(c),e!==e+0)throw e;Wn(1,0)}}function Ar(e,t,n,r,i,a,o,s,c,l){var u=I();try{xt(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(F(u),e!==e+0)throw e;Wn(1,0)}}function jr(e,t,n){var r=I();try{return xt(e)(t,n)}catch(e){if(F(r),e!==e+0)throw e;Wn(1,0)}}function Mr(e,t,n,r,i){var a=I();try{return xt(e)(t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Wn(1,0)}}function Nr(e,t,n,r,i,a){var o=I();try{return xt(e)(t,n,r,i,a)}catch(e){if(F(o),e!==e+0)throw e;Wn(1,0)}}function Pr(e,t,n,r,i,a,o){var s=I();try{xt(e)(t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Wn(1,0)}}function Fr(e,t,n,r){var i=I();try{return xt(e)(t,n,r)}catch(e){if(F(i),e!==e+0)throw e;Wn(1,0)}}function Ir(e){var t=I();try{return xt(e)()}catch(e){if(F(t),e!==e+0)throw e;Wn(1,0)}}function Lr(e,t,n,r,i,a,o,s,c,l,u,d){var f=I();try{return xt(e)(t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(F(f),e!==e+0)throw e;Wn(1,0)}}function Rr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=I();try{xt(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(F(g),e!==e+0)throw e;Wn(1,0)}}function zr(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){var b=I();try{Zn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y)}catch(e){if(F(b),e!==e+0)throw e;Wn(1,0)}}function Br(e,t,n,r,i,a,o){var s=I();try{return Qn(e,t,n,r,i,a,o)}catch(e){if(F(s),e!==e+0)throw e;Wn(1,0)}}function Vr(e,t,n,r,i){var a=I();try{return $n(e,t,n,r,i)}catch(e){if(F(a),e!==e+0)throw e;Wn(1,0)}}function Hr(){x();function e(){var e,t;i.calledRun=!0,!g&&(S(),(e=_)==null||e(i),(t=i.onRuntimeInitialized)==null||t.call(i),C())}i.setStatus?(i.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>i.setStatus(``),1),e()},1)):e()}var Ur=await A();return Hr(),t=y?i:new Promise((e,t)=>{_=e,v=t}),t}function rG(e){return $W(nG,e)}async function iG(e,t){return tG(nG,e,t)}var aG=[[`aztec`,`Aztec`],[`aztec_code`,`AztecCode`],[`aztec_rune`,`AztecRune`],[`code_128`,`Code128`],[`code_39`,`Code39`],[`code_39_standard`,`Code39Std`],[`code_39_extended`,`Code39Ext`],[`code_32`,`Code32`],[`pzn`,`PZN`],[`code_93`,`Code93`],[`codabar`,`Codabar`],[`databar`,`DataBar`],[`databar_omni`,`DataBarOmni`],[`databar_stacked`,`DataBarStk`],[`databar_stacked_omni`,`DataBarStkOmni`],[`databar_expanded`,`DataBarExp`],[`databar_expanded_stacked`,`DataBarExpStk`],[`databar_limited`,`DataBarLtd`],[`data_matrix`,`DataMatrix`],[`dx_film_edge`,`DXFilmEdge`],[`ean_13`,`EAN13`],[`ean_upc`,`EANUPC`],[`isbn`,`ISBN`],[`ean_8`,`EAN8`],[`itf`,`ITF`],[`itf_14`,`ITF14`],[`maxi_code`,`MaxiCode`],[`micro_qr_code`,`MicroQRCode`],[`pdf417`,`PDF417`],[`compact_pdf417`,`CompactPDF417`],[`micro_pdf417`,`MicroPDF417`],[`qr_code`,`QRCode`],[`qr_code_model_1`,`QRCodeModel1`],[`qr_code_model_2`,`QRCodeModel2`],[`rm_qr_code`,`RMQRCode`],[`upc_a`,`UPCA`],[`upc_e`,`UPCE`],[`telepen`,`Telepen`],[`telepen_alpha`,`TelepenAlpha`],[`telepen_numeric`,`TelepenNumeric`],[`other_barcode`,`OtherBarcode`],[`linear_codes`,`AllLinear`],[`matrix_codes`,`AllMatrix`],[`gs1_codes`,`AllGS1`],[`retail_codes`,`AllRetail`],[`industrial_codes`,`AllIndustrial`],[`any`,`All`]],oG=[...aG,[`unknown`]].map(e=>e[0]),sG=new Map(aG);function cG(e){for(let[t,n]of sG)if(e===n)return t;return`unknown`}function lG(e){if(uG(e))return{width:e.naturalWidth,height:e.naturalHeight};if(dG(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(fG(e))return{width:e.videoWidth,height:e.videoHeight};if(mG(e))return{width:e.width,height:e.height};if(gG(e))return{width:e.displayWidth,height:e.displayHeight};if(pG(e)||hG(e))return{width:e.width,height:e.height};throw TypeError(`The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.`)}function uG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLImageElement)}catch{return!1}}function dG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.SVGImageElement)}catch{return!1}}function fG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLVideoElement)}catch{return!1}}function pG(e){try{var t;return e instanceof(e==null||(t=e.ownerDocument)==null||(t=t.defaultView)==null?void 0:t.HTMLCanvasElement)}catch{return!1}}function mG(e){try{return e instanceof ImageBitmap||Object.prototype.toString.call(e)===`[object ImageBitmap]`}catch{return!1}}function hG(e){try{return e instanceof OffscreenCanvas||Object.prototype.toString.call(e)===`[object OffscreenCanvas]`}catch{return!1}}function gG(e){try{return e instanceof VideoFrame||Object.prototype.toString.call(e)===`[object VideoFrame]`}catch{return!1}}function _G(e){try{return e instanceof Blob||Object.prototype.toString.call(e)===`[object Blob]`}catch{return!1}}function vG(e){try{return e instanceof ImageData||Object.prototype.toString.call(e)===`[object ImageData]`}catch{return!1}}function yG(e,t){try{let n=new OffscreenCanvas(e,t);if(n.getContext(`2d`)instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{let n=document.createElement(`canvas`);return n.width=e,n.height=t,n}}async function bG(e){if(uG(e)&&!await wG(e))throw new DOMException(`Failed to load or decode HTMLImageElement.`,`InvalidStateError`);if(dG(e)&&!await TG(e))throw new DOMException(`Failed to load or decode SVGImageElement.`,`InvalidStateError`);if(gG(e)&&EG(e))throw new DOMException(`VideoFrame is closed.`,`InvalidStateError`);if(fG(e)&&(e.readyState===0||e.readyState===1))throw new DOMException(`Invalid element or state.`,`InvalidStateError`);if(mG(e)&&OG(e))throw new DOMException(`The image source is detached.`,`InvalidStateError`);let{width:t,height:n}=lG(e);if(t===0||n===0)return null;let r=yG(t,n).getContext(`2d`);r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException(`Source would taint origin.`,`SecurityError`)}}async function xG(e){let t;try{t=await createImageBitmap(e)}catch{try{if(globalThis.Image){t=new Image;let n=``;try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException(`Failed to load or decode Blob.`,`InvalidStateError`)}}return await bG(t)}function SG(e){let{width:t,height:n}=e;if(t===0||n===0)return null;let r=e.getContext(`2d`);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException(`Source would taint origin.`,`SecurityError`)}}async function CG(e){if(_G(e))return await xG(e);if(vG(e)){if(DG(e))throw new DOMException(`The image data has been detached.`,`InvalidStateError`);return e}return pG(e)||hG(e)?SG(e):await bG(e)}async function wG(e){try{return await e.decode(),!0}catch{return!1}}async function TG(e){try{return await e.decode?.call(e),!0}catch{return!1}}function EG(e){return e.format===null}function DG(e){return e.data.buffer.byteLength===0}function OG(e){return e.width===0&&e.height===0}function kG(e,t){return AG(e)?new DOMException(`${t}: ${e.message}`,e.name):jG(e)?new e.constructor(`${t}: ${e.message}`):Error(`${t}: ${e}`)}function AG(e){return e instanceof DOMException||Object.prototype.toString.call(e)===`[object DOMException]`}function jG(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}function MG(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function NG(e,t,n){MG(e,t),t.set(e,n)}function PG(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function FG(e,t,n){return e.set(PG(e,t),n),n}function IG(e,t){return e.get(PG(e,t))}var LG=new WeakMap,RG=class{constructor(e={}){NG(this,LG,void 0);try{var t;let n=e==null||(t=e.formats)==null?void 0:t.filter(e=>e!==`unknown`);if(n?.length===0)throw TypeError(`Hint option provided, but is empty.`);for(let e of n??[])if(!sG.has(e))throw TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${e}' is not a valid enum value of type BarcodeFormat.`);FG(LG,this,n??[]),rG({fireImmediately:!0}).catch(()=>{})}catch(e){throw kG(e,`Failed to construct 'BarcodeDetector'`)}}static async getSupportedFormats(){return oG.filter(e=>e!==`unknown`)}async detect(e){try{let t=await CG(e);if(t===null)return[];let n,r={textMode:`Plain`,formats:IG(LG,this).map(e=>sG.get(e))};try{n=await iG(t,r)}catch(e){throw console.error(e),new DOMException(`Barcode detection service unavailable.`,`NotSupportedError`)}return n.map(e=>{let{topLeft:{x:t,y:n},topRight:{x:r,y:i},bottomLeft:{x:a,y:o},bottomRight:{x:s,y:c}}=e.position,l=Math.min(t,r,a,s),u=Math.min(n,i,o,c),d=Math.max(t,r,a,s),f=Math.max(n,i,o,c);return{boundingBox:new DOMRectReadOnly(l,u,d-l,f-u),rawValue:e.text,format:cG(e.format),cornerPoints:[{x:t,y:n},{x:r,y:i},{x:s,y:c},{x:a,y:o}]}})}catch(e){throw kG(e,`Failed to execute 'detect' on 'BarcodeDetector'`)}}},zG=!0,BG=!0;function VG(e,t,n){let r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function HG(e,t,n){if(!e.RTCPeerConnection)return;if(!Object.getOwnPropertyDescriptor(EventTarget.prototype,`addEventListener`).writable){GG(`Unable to polyfill events`);return}let r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);let a=e=>{let t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,a),i.apply(this,[e,a])};let a=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t]||!this._eventMap[t].has(n))return a.apply(this,arguments);let r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[e,r])},Object.defineProperty(r,`on`+t,{get(){return this[`_on`+t]},set(e){this[`_on`+t]&&(this.removeEventListener(t,this[`_on`+t]),delete this[`_on`+t]),e&&this.addEventListener(t,this[`_on`+t]=e)},enumerable:!0,configurable:!0})}function UG(e){return typeof e==`boolean`?(zG=e,e?`adapter.js logging disabled`:`adapter.js logging enabled`):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function WG(e){return typeof e==`boolean`?(BG=!e,`adapter.js deprecation warnings `+(e?`disabled`:`enabled`)):Error(`Argument type: `+typeof e+`. Please use a boolean.`)}function GG(){if(typeof window==`object`){if(zG)return;typeof console<`u`&&typeof console.log==`function`&&console.log.apply(console,arguments)}}function KG(e,t){BG&&console.warn(e+` is deprecated, please use `+t+` instead.`)}function qG(e){let t={browser:null,version:null};if(e===void 0||!e.navigator||!e.navigator.userAgent)return t.browser=`Not a browser.`,t;let{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){let e=n.userAgentData.brands.find(e=>e.brand===`Chromium`);if(e){let t=parseInt(e.version,10);if(t>=90)return{browser:`chrome`,version:t}}}if(n.mozGetUserMedia)t.browser=`firefox`,t.version=parseInt(VG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser=`chrome`,t.version=parseInt(VG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser=`safari`,t.version=parseInt(VG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&`currentDirection`in e.RTCRtpTransceiver.prototype,t._safariVersion=VG(n.userAgent,/Version\/(\d+(\.?\d+))/,1);else return t.browser=`Not a supported browser.`,t;return t}function JG(e){return Object.prototype.toString.call(e)===`[object Object]`}function YG(e){return JG(e)?Object.keys(e).reduce(function(t,n){let r=JG(e[n]),i=r?YG(e[n]):e[n],a=r&&!Object.keys(i).length;return i===void 0||a?t:Object.assign(t,{[n]:i})},{}):e}function XG(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith(`Id`)?XG(e,e.get(t[r]),n):r.endsWith(`Ids`)&&t[r].forEach(t=>{XG(e,e.get(t),n)})}))}function ZG(e,t,n){let r=n?`outbound-rtp`:`inbound-rtp`,i=new Map;if(t===null)return i;let a=[];return e.forEach(e=>{e.type===`track`&&e.trackIdentifier===t.id&&a.push(e)}),a.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&XG(e,n,i)})}),i}var QG=GG;function $G(e,t){if(t.version>=64)return;let n=e&&e.navigator;if(!n.mediaDevices)return;let r=function(e){if(typeof e!=`object`||e.mandatory||e.optional)return e;let t={};return Object.keys(e).forEach(n=>{if(n===`require`||n===`advanced`||n===`mediaSource`)return;let r=typeof e[n]==`object`?e[n]:{ideal:e[n]};r.exact!==void 0&&typeof r.exact==`number`&&(r.min=r.max=r.exact);let i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):t===`deviceId`?`sourceId`:t};if(r.ideal!==void 0){t.optional=t.optional||[];let e={};typeof r.ideal==`number`?(e[i(`min`,n)]=r.ideal,t.optional.push(e),e={},e[i(`max`,n)]=r.ideal,t.optional.push(e)):(e[i(``,n)]=r.ideal,t.optional.push(e))}r.exact!==void 0&&typeof r.exact!=`number`?(t.mandatory=t.mandatory||{},t.mandatory[i(``,n)]=r.exact):[`min`,`max`].forEach(e=>{r[e]!==void 0&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if(e=JSON.parse(JSON.stringify(e)),e&&typeof e.audio==`object`){let t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e=JSON.parse(JSON.stringify(e)),t(e.audio,`autoGainControl`,`googAutoGainControl`),t(e.audio,`noiseSuppression`,`googNoiseSuppression`),e.audio=r(e.audio)}if(e&&typeof e.video==`object`){let a=e.video.facingMode;a&&=typeof a==`object`?a:{ideal:a};let o=t.version<66;if(a&&(a.exact===`user`||a.exact===`environment`||a.ideal===`user`||a.ideal===`environment`)&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!o)){delete e.video.facingMode;let t;if(a.exact===`environment`||a.ideal===`environment`?t=[`back`,`rear`]:(a.exact===`user`||a.ideal===`user`)&&(t=[`front`]),t)return n.mediaDevices.enumerateDevices().then(n=>{n=n.filter(e=>e.kind===`videoinput`);let o=n.find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!o&&n.length&&t.includes(`back`)&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=r(e.video),QG(`chrome: `+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return QG(`chrome: `+JSON.stringify(e)),i(e)},a=function(e){return t.version>=64?e:{name:{PermissionDeniedError:`NotAllowedError`,PermissionDismissedError:`NotAllowedError`,InvalidStateError:`NotAllowedError`,DevicesNotFoundError:`NotFoundError`,ConstraintNotSatisfiedError:`OverconstrainedError`,TrackStartError:`NotReadableError`,MediaDeviceFailedDueToShutdown:`NotAllowedError`,MediaDeviceKillSwitchOn:`NotAllowedError`,TabCaptureError:`AbortError`,ScreenCaptureError:`AbortError`,DeviceCaptureError:`AbortError`}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&`: `)+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(a(e))})})}.bind(n),n.mediaDevices.getUserMedia){let e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException(``,`NotFoundError`);return e},e=>Promise.reject(a(e))))}}}var eK=s({fixNegotiationNeeded:()=>cK,shimAddTrackRemoveTrack:()=>oK,shimAddTrackRemoveTrackWithNative:()=>aK,shimGetSendersWithDtmf:()=>rK,shimGetUserMedia:()=>$G,shimMediaStream:()=>tK,shimOnTrack:()=>nK,shimPeerConnection:()=>sK,shimSenderReceiverGetStats:()=>iK});function tK(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function nK(e,t){if(!(t.version>102))if(typeof e==`object`&&e.RTCPeerConnection&&!(`ontrack`in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener(`track`,this._ontrack),this.addEventListener(`track`,this._ontrack=e)},enumerable:!0,configurable:!0});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener(`addtrack`,n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};let i=new Event(`track`);i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};let i=new Event(`track`);i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener(`addstream`,this._ontrackpoly)),t.apply(this,arguments)}}else HG(e,`track`,e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function rK(e){if(typeof e==`object`&&e.RTCPeerConnection&&!(`getSenders`in e.RTCPeerConnection.prototype)&&`createDTMFSender`in e.RTCPeerConnection.prototype){let t=function(e,t){return{track:t,get dtmf(){return this._dtmf===void 0&&(t.kind===`audio`?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};let r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);let t=this._senders.indexOf(e);t!==-1&&this._senders.splice(t,1)}}let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{let t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if(typeof e==`object`&&e.RTCPeerConnection&&`getSenders`in e.RTCPeerConnection.prototype&&`createDTMFSender`in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!(`dtmf`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind===`audio`?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function iK(e,t){if(t.version>=67||!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!(`getStats`in e.RTCRtpSender.prototype)){let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>ZG(t,e.track,!0))}}if(!(`getStats`in e.RTCRtpReceiver.prototype)){let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),HG(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(t=>ZG(t,e.track,!1))}}if(!(`getStats`in e.RTCRtpSender.prototype&&`getStats`in e.RTCRtpReceiver.prototype))return;let n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e=arguments[0],t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException(`There are more than one sender or receiver for the track.`,`InvalidAccessError`)):t?t.getStats():n?n.getStats():Promise.reject(new DOMException(`There is no sender or receiver for the track.`,`InvalidAccessError`))}return n.apply(this,arguments)}}function aK(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?this._shimmedLocalStreams[n.id].indexOf(r)===-1&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};let n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)});let t=this.getSenders();n.apply(this,arguments);let r=this.getSenders().filter(e=>t.indexOf(e)===-1);this._shimmedLocalStreams[e.id]=[e].concat(r)};let r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{let n=this._shimmedLocalStreams[t].indexOf(e);n!==-1&&this._shimmedLocalStreams[t].splice(n,1),this._shimmedLocalStreams[t].length===1&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function oK(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return aK(e);let n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException(`Track already exists.`,`InvalidAccessError`)}),!this._reverseStreams[t.id]){let n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);let r=[].slice.call(arguments,1);if(r.length!==1||!r[0].getTracks().find(e=>e===t))throw new DOMException(`The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.`,`NotSupportedError`);if(this.getSenders().find(e=>e.track===t))throw new DOMException(`Track already exists.`,`InvalidAccessError`);this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event(`negotiationneeded`))});else{let r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)};function a(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,`g`),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{let r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,`g`),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}[`createOffer`,`createAnswer`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){let e=arguments;return arguments.length&&typeof arguments[0]==`function`?n.apply(this,[t=>{let n=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>a(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});let s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type||(arguments[0]=o(this,arguments[0])),s.apply(this,arguments)};let c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,`localDescription`);Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){let e=c.get.apply(this);return e.type===``?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if(this.signalingState===`closed`)throw new DOMException(`The RTCPeerConnection's signalingState is 'closed'.`,`InvalidStateError`);if(!e._pc)throw new DOMException(`Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.`,`TypeError`);if(e._pc!==this)throw new DOMException(`Sender was not created by this connection.`,`InvalidAccessError`);this._streams=this._streams||{};let t;Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(t.getTracks().length===1?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event(`negotiationneeded`)))}}function sK(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function cK(e,t){t.version>102||HG(e,`negotiationneeded`,e=>{let n=e.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics===`plan-b`)&&n.signalingState!==`stable`))return e})}function lK(e,t){let n=e&&e.navigator;if(!n.mediaDevices)return;let r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){KG(`navigator.getUserMedia`,`navigator.mediaDevices.getUserMedia`),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&`autoGainControl`in n.mediaDevices.getSupportedConstraints())){let e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return typeof n==`object`&&typeof n.audio==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,`autoGainControl`,`mozAutoGainControl`),e(n.audio,`noiseSuppression`,`mozNoiseSuppression`)),t(n)},r&&r.prototype.getSettings){let t=r.prototype.getSettings;r.prototype.getSettings=function(){let n=t.apply(this,arguments);return e(n,`mozAutoGainControl`,`autoGainControl`),e(n,`mozNoiseSuppression`,`noiseSuppression`),n}}if(r&&r.prototype.applyConstraints){let t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return this.kind===`audio`&&typeof n==`object`&&(n=JSON.parse(JSON.stringify(n)),e(n,`autoGainControl`,`mozAutoGainControl`),e(n,`noiseSuppression`,`mozNoiseSuppression`)),t.apply(this,[n])}}}}function uK(e,t){e.navigator.mediaDevices&&(e.navigator.mediaDevices&&`getDisplayMedia`in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){let e=new DOMException(`getDisplayMedia without video constraints is undefined`);return e.name=`NotFoundError`,e.code=8,Promise.reject(e)}return n.video===!0?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)}))}var dK=s({shimAddTransceiver:()=>yK,shimCreateAnswer:()=>SK,shimCreateOffer:()=>xK,shimGetDisplayMedia:()=>uK,shimGetParameters:()=>bK,shimGetStats:()=>mK,shimGetUserMedia:()=>lK,shimOnTrack:()=>fK,shimPeerConnection:()=>pK,shimRTCDataChannel:()=>vK,shimReceiverGetStats:()=>gK,shimRemoveStream:()=>_K,shimSenderGetStats:()=>hK});function fK(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function pK(e,t){typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection)||(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&[`setLocalDescription`,`setRemoteDescription`,`addIceCandidate`].forEach(function(t){let n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new(t===`addIceCandidate`?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}))}function mK(e,t){if(typeof e!=`object`||!(e.RTCPeerConnection||e.mozRTCPeerConnection)||t.version>=151)return;let n={inboundrtp:`inbound-rtp`,outboundrtp:`outbound-rtp`,candidatepair:`candidate-pair`,localcandidate:`local-candidate`,remotecandidate:`remote-candidate`},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,i,a]=arguments;return this.signalingState===`closed`?Promise.resolve(new Map):r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if(t.name!==`TypeError`)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,a)}}function hK(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpSender.prototype)return;let t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});let n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function gK(e){if(!(typeof e==`object`&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&`getStats`in e.RTCRtpReceiver.prototype)return;let t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),HG(e,`track`,e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function _K(e){!e.RTCPeerConnection||`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){KG(`removeStream`,`removeTrack`),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function vK(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function yK(e,t){if(!(typeof e==`object`&&e.RTCPeerConnection)||t.version>=110)return;let n=e.RTCPeerConnection.prototype.addTransceiver;n&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;e===void 0&&(e=[]),e=[...e];let t=e.length>0;t&&e.forEach(e=>{if(`rid`in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError(`Invalid RID value provided.`);if(`scaleResolutionDownBy`in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError(`scale_resolution_down_by must be >= 1.0`);if(`maxFramerate`in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError(`max_framerate must be >= 0.0`)});let r=n.apply(this,arguments);if(t){let{sender:t}=r,n=t.getParameters();(!(`encodings`in n)||n.encodings.length===1&&Object.keys(n.encodings[0]).length===0)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function bK(e,t){if(!(typeof e==`object`&&e.RTCRtpSender)||t.version>=110)return;let n=e.RTCRtpSender.prototype.getParameters;n&&(e.RTCRtpSender.prototype.getParameters=function(){let e=n.apply(this,arguments);return`encodings`in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function xK(e,t){if(!(typeof e==`object`&&e.RTCPeerConnection)||t.version>=110)return;let n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function SK(e,t){if(!(typeof e==`object`&&e.RTCPeerConnection)||t.version>=110)return;let n=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}var CK=s({shimAudioContext:()=>MK,shimCallbacksAPI:()=>EK,shimConstraints:()=>OK,shimCreateOfferLegacy:()=>jK,shimGetUserMedia:()=>DK,shimLocalStreamsAPI:()=>wK,shimRTCIceServerUrls:()=>kK,shimRemoteStreamsAPI:()=>TK,shimTrackEventTransceiver:()=>AK});function wK(e){if(!(typeof e!=`object`||!e.RTCPeerConnection)){if(`getLocalStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||=[],this._localStreams}),!(`addStream`in e.RTCPeerConnection.prototype)){let t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||=[],this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}`removeStream`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||=[];let t=this._localStreams.indexOf(e);if(t===-1)return;this._localStreams.splice(t,1);let n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function TK(e){if(!(typeof e!=`object`||!e.RTCPeerConnection)&&(`getRemoteStreams`in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!(`onaddstream`in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener(`addstream`,this._onaddstream),this.removeEventListener(`track`,this._onaddstreampoly)),this.addEventListener(`addstream`,this._onaddstream=e),this.addEventListener(`track`,this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||=[],this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let t=new Event(`addstream`);t.stream=e,this.dispatchEvent(t)})})}});let t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener(`track`,this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||=[],e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);let n=new Event(`addstream`);n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function EK(e){if(typeof e!=`object`||!e.RTCPeerConnection)return;let t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(e,t){let r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){let n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,n){let r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){let r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){let r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function DK(e){let t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){let e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(OK(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function OK(e){return e&&e.video!==void 0?Object.assign({},e,{video:YG(e.video)}):e}function kK(e){if(!e.RTCPeerConnection)return;let t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){let t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];r.urls===void 0&&r.url?(KG(`RTCIceServer.url`,`RTCIceServer.urls`),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,`generateCertificate`in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get(){return t.generateCertificate}})}function AK(e){typeof e==`object`&&e.RTCTrackEvent&&`receiver`in e.RTCTrackEvent.prototype&&!(`transceiver`in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function jK(e){let t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){e.offerToReceiveAudio!==void 0&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let t=this.getTransceivers().find(e=>e.receiver.track.kind===`audio`);e.offerToReceiveAudio===!1&&t?t.direction===`sendrecv`?t.setDirection?t.setDirection(`sendonly`):t.direction=`sendonly`:t.direction===`recvonly`&&(t.setDirection?t.setDirection(`inactive`):t.direction=`inactive`):e.offerToReceiveAudio===!0&&!t&&this.addTransceiver(`audio`,{direction:`recvonly`}),e.offerToReceiveVideo!==void 0&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let n=this.getTransceivers().find(e=>e.receiver.track.kind===`video`);e.offerToReceiveVideo===!1&&n?n.direction===`sendrecv`?n.setDirection?n.setDirection(`sendonly`):n.direction=`sendonly`:n.direction===`recvonly`&&(n.setDirection?n.setDirection(`inactive`):n.direction=`inactive`):e.offerToReceiveVideo===!0&&!n&&this.addTransceiver(`video`,{direction:`recvonly`})}return t.apply(this,arguments)}}function MK(e){typeof e!=`object`||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var NK=o(((e,t)=>{var n={};n.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split(`
|
|
282
|
-
`).map(e=>e.trim())},n.splitSections=function(e){return e.split(`
|
|
283
|
-
m=`).map((e,t)=>(t>0?`m=`+e:e).trim()+`\r
|
|
284
|
-
`)},n.getDescription=function(e){let t=n.splitSections(e);return t&&t[0]},n.getMediaSections=function(e){let t=n.splitSections(e);return t.shift(),t},n.matchPrefix=function(e,t){return n.splitLines(e).filter(e=>e.indexOf(t)===0)},n.parseCandidate=function(e){let t;t=e.indexOf(`a=candidate:`)===0?e.substring(12).split(` `):e.substring(10).split(` `);let n={foundation:t[0],component:{1:`rtp`,2:`rtcp`}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case`raddr`:n.relatedAddress=t[e+1];break;case`rport`:n.relatedPort=parseInt(t[e+1],10);break;case`tcptype`:n.tcpType=t[e+1];break;case`ufrag`:n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:n[t[e]]===void 0&&(n[t[e]]=t[e+1]);break}return n},n.writeCandidate=function(e){let t=[];t.push(e.foundation);let n=e.component;n===`rtp`?t.push(1):n===`rtcp`?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);let r=e.type;return t.push(`typ`),t.push(r),r!==`host`&&e.relatedAddress&&e.relatedPort!==void 0&&(t.push(`raddr`),t.push(e.relatedAddress),t.push(`rport`),t.push(e.relatedPort)),e.tcpType&&e.protocol.toLowerCase()===`tcp`&&(t.push(`tcptype`),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push(`ufrag`),t.push(e.usernameFragment||e.ufrag)),`candidate:`+t.join(` `)},n.parseIceOptions=function(e){return e.substring(14).split(` `)},n.parseRtpMap=function(e){let t=e.substring(9).split(` `),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split(`/`),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=t.length===3?parseInt(t[2],10):1,n.numChannels=n.channels,n},n.writeRtpMap=function(e){let t=e.payloadType;e.preferredPayloadType!==void 0&&(t=e.preferredPayloadType);let n=e.channels||e.numChannels||1;return`a=rtpmap:`+t+` `+e.name+`/`+e.clockRate+(n===1?``:`/`+n)+`\r
|
|
285
|
-
`},n.parseExtmap=function(e){let t=e.substring(9).split(` `);return{id:parseInt(t[0],10),direction:t[0].indexOf(`/`)>0?t[0].split(`/`)[1]:`sendrecv`,uri:t[1],attributes:t.slice(2).join(` `)}},n.writeExtmap=function(e){return`a=extmap:`+(e.id||e.preferredId)+(e.direction&&e.direction!==`sendrecv`?`/`+e.direction:``)+` `+e.uri+(e.attributes?` `+e.attributes:``)+`\r
|
|
286
|
-
`},n.parseFmtp=function(e){let t={},n,r=e.substring(e.indexOf(` `)+1).split(`;`);for(let e=0;e<r.length;e++)n=r[e].trim().split(`=`),t[n[0].trim()]=n[1];return t},n.writeFmtp=function(e){let t=``,n=e.payloadType;if(e.preferredPayloadType!==void 0&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){let r=[];Object.keys(e.parameters).forEach(t=>{e.parameters[t]===void 0?r.push(t):r.push(t+`=`+e.parameters[t])}),t+=`a=fmtp:`+n+` `+r.join(`;`)+`\r
|
|
287
|
-
`}return t},n.parseRtcpFb=function(e){let t=e.substring(e.indexOf(` `)+1).split(` `);return{type:t.shift(),parameter:t.join(` `)}},n.writeRtcpFb=function(e){let t=``,n=e.payloadType;return e.preferredPayloadType!==void 0&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+=`a=rtcp-fb:`+n+` `+e.type+(e.parameter&&e.parameter.length?` `+e.parameter:``)+`\r
|
|
288
|
-
`}),t},n.parseSsrcMedia=function(e){let t=e.indexOf(` `),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(`:`,t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},n.parseSsrcGroup=function(e){let t=e.substring(13).split(` `);return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},n.getMid=function(e){let t=n.matchPrefix(e,`a=mid:`)[0];if(t)return t.substring(6)},n.parseFingerprint=function(e){let t=e.substring(14).split(` `);return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},n.getDtlsParameters=function(e,t){return{role:`auto`,fingerprints:n.matchPrefix(e+t,`a=fingerprint:`).map(n.parseFingerprint)}},n.writeDtlsParameters=function(e,t){let n=`a=setup:`+t+`\r
|
|
289
|
-
`;return e.fingerprints.forEach(e=>{n+=`a=fingerprint:`+e.algorithm+` `+e.value+`\r
|
|
290
|
-
`}),n},n.parseCryptoLine=function(e){let t=e.substring(9).split(` `);return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},n.writeCryptoLine=function(e){return`a=crypto:`+e.tag+` `+e.cryptoSuite+` `+(typeof e.keyParams==`object`?n.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?` `+e.sessionParams.join(` `):``)+`\r
|
|
291
|
-
`},n.parseCryptoKeyParams=function(e){if(e.indexOf(`inline:`)!==0)return null;let t=e.substring(7).split(`|`);return{keyMethod:`inline`,keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(`:`)[0]:void 0,mkiLength:t[2]?t[2].split(`:`)[1]:void 0}},n.writeCryptoKeyParams=function(e){return e.keyMethod+`:`+e.keySalt+(e.lifeTime?`|`+e.lifeTime:``)+(e.mkiValue&&e.mkiLength?`|`+e.mkiValue+`:`+e.mkiLength:``)},n.getCryptoParameters=function(e,t){return n.matchPrefix(e+t,`a=crypto:`).map(n.parseCryptoLine)},n.getIceParameters=function(e,t){let r=n.matchPrefix(e+t,`a=ice-ufrag:`)[0],i=n.matchPrefix(e+t,`a=ice-pwd:`)[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},n.writeIceParameters=function(e){let t=`a=ice-ufrag:`+e.usernameFragment+`\r
|
|
292
|
-
a=ice-pwd:`+e.password+`\r
|
|
293
|
-
`;return e.iceLite&&(t+=`a=ice-lite\r
|
|
294
|
-
`),t},n.parseRtpParameters=function(e){let t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e)[0].split(` `);t.profile=r[2];for(let i=3;i<r.length;i++){let a=r[i],o=n.matchPrefix(e,`a=rtpmap:`+a+` `)[0];if(o){let r=n.parseRtpMap(o),i=n.matchPrefix(e,`a=fmtp:`+a+` `);switch(r.parameters=i.length?n.parseFmtp(i[0]):{},r.rtcpFeedback=n.matchPrefix(e,`a=rtcp-fb:`+a+` `).map(n.parseRtcpFb),t.codecs.push(r),r.name.toUpperCase()){case`RED`:case`ULPFEC`:t.fecMechanisms.push(r.name.toUpperCase());break;default:break}}}n.matchPrefix(e,`a=extmap:`).forEach(e=>{t.headerExtensions.push(n.parseExtmap(e))});let i=n.matchPrefix(e,`a=rtcp-fb:* `).map(n.parseRtcpFb);return t.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),t},n.writeRtpDescription=function(e,t){let r=``;r+=`m=`+e+` `,r+=t.codecs.length>0?`9`:`0`,r+=` `+(t.profile||`UDP/TLS/RTP/SAVPF`)+` `,r+=t.codecs.map(e=>e.preferredPayloadType===void 0?e.payloadType:e.preferredPayloadType).join(` `)+`\r
|
|
295
|
-
`,r+=`c=IN IP4 0.0.0.0\r
|
|
296
|
-
`,r+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
297
|
-
`,t.codecs.forEach(e=>{r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)});let i=0;return t.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+=`a=maxptime:`+i+`\r
|
|
298
|
-
`),t.headerExtensions&&t.headerExtensions.forEach(e=>{r+=n.writeExtmap(e)}),r},n.parseRtpEncodingParameters=function(e){let t=[],r=n.parseRtpParameters(e),i=r.fecMechanisms.indexOf(`RED`)!==-1,a=r.fecMechanisms.indexOf(`ULPFEC`)!==-1,o=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`cname`),s=o.length>0&&o[0].ssrc,c,l=n.matchPrefix(e,`a=ssrc-group:FID`).map(e=>e.substring(17).split(` `).map(e=>parseInt(e,10)));l.length>0&&l[0].length>1&&l[0][0]===s&&(c=l[0][1]),r.codecs.forEach(e=>{if(e.name.toUpperCase()===`RTX`&&e.parameters.apt){let n={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(n.rtx={ssrc:c}),t.push(n),i&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:s,mechanism:a?`red+ulpfec`:`red`},t.push(n))}}),t.length===0&&s&&t.push({ssrc:s});let u=n.matchPrefix(e,`b=`);return u.length&&(u=u[0].indexOf(`b=TIAS:`)===0?parseInt(u[0].substring(7),10):u[0].indexOf(`b=AS:`)===0?parseInt(u[0].substring(5),10)*1e3*.95-2e3*8:void 0,t.forEach(e=>{e.maxBitrate=u})),t},n.parseRtcpParameters=function(e){let t={},r=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`cname`)[0];r&&(t.cname=r.value,t.ssrc=r.ssrc);let i=n.matchPrefix(e,`a=rtcp-rsize`);return t.reducedSize=i.length>0,t.compound=i.length===0,t.mux=n.matchPrefix(e,`a=rtcp-mux`).length>0,t},n.writeRtcpParameters=function(e){let t=``;return e.reducedSize&&(t+=`a=rtcp-rsize\r
|
|
299
|
-
`),e.mux&&(t+=`a=rtcp-mux\r
|
|
300
|
-
`),e.ssrc!==void 0&&e.cname&&(t+=`a=ssrc:`+e.ssrc+` cname:`+e.cname+`\r
|
|
301
|
-
`),t},n.parseMsid=function(e){let t,r=n.matchPrefix(e,`a=msid:`);if(r.length===1)return t=r[0].substring(7).split(` `),{stream:t[0],track:t[1]};let i=n.matchPrefix(e,`a=ssrc:`).map(e=>n.parseSsrcMedia(e)).filter(e=>e.attribute===`msid`);if(i.length>0)return t=i[0].value.split(` `),{stream:t[0],track:t[1]}},n.parseSctpDescription=function(e){let t=n.parseMLine(e),r=n.matchPrefix(e,`a=max-message-size:`),i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);let a=n.matchPrefix(e,`a=sctp-port:`);if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:t.fmt,maxMessageSize:i};let o=n.matchPrefix(e,`a=sctpmap:`);if(o.length>0){let e=o[0].substring(10).split(` `);return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},n.writeSctpDescription=function(e,t){let n=[];return n=e.protocol===`DTLS/SCTP`?[`m=`+e.kind+` 9 `+e.protocol+` `+t.port+`\r
|
|
302
|
-
`,`c=IN IP4 0.0.0.0\r
|
|
303
|
-
`,`a=sctpmap:`+t.port+` `+t.protocol+` 65535\r
|
|
304
|
-
`]:[`m=`+e.kind+` 9 `+e.protocol+` `+t.protocol+`\r
|
|
305
|
-
`,`c=IN IP4 0.0.0.0\r
|
|
306
|
-
`,`a=sctp-port:`+t.port+`\r
|
|
307
|
-
`],t.maxMessageSize!==void 0&&n.push(`a=max-message-size:`+t.maxMessageSize+`\r
|
|
308
|
-
`),n.join(``)},n.generateSessionId=function(){return Math.random().toString().substr(2,22)},n.writeSessionBoilerplate=function(e,t,r){let i,a=t===void 0?2:t;return i=e||n.generateSessionId(),`v=0\r
|
|
309
|
-
o=`+(r||`thisisadapterortc`)+` `+i+` `+a+` IN IP4 127.0.0.1\r
|
|
310
|
-
s=-\r
|
|
311
|
-
t=0 0\r
|
|
312
|
-
`},n.getDirection=function(e,t){let r=n.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case`a=sendrecv`:case`a=sendonly`:case`a=recvonly`:case`a=inactive`:return r[e].substring(2);default:}return t?n.getDirection(t):`sendrecv`},n.getKind=function(e){return n.splitLines(e)[0].split(` `)[0].substring(2)},n.isRejected=function(e){return e.split(` `,2)[1]===`0`},n.parseMLine=function(e){let t=n.splitLines(e)[0].substring(2).split(` `);return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(` `)}},n.parseOLine=function(e){let t=n.matchPrefix(e,`o=`)[0].substring(2).split(` `);return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},n.isValidSDP=function(e){if(typeof e!=`string`||e.length===0)return!1;let t=n.splitLines(e);for(let e=0;e<t.length;e++)if(t[e].length<2||t[e].charAt(1)!==`=`)return!1;return!0},typeof t==`object`&&(t.exports=n)})),PK=s({removeExtmapAllowMixed:()=>VK,shimAddIceCandidateNullOrEmpty:()=>HK,shimConnectionState:()=>BK,shimMaxMessageSize:()=>RK,shimParameterlessSetLocalDescription:()=>UK,shimRTCIceCandidate:()=>IK,shimRTCIceCandidateRelayProtocol:()=>LK,shimSendThrowTypeError:()=>zK}),FK=l(NK());function IK(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&`foundation`in e.RTCIceCandidate.prototype)return;let t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if(typeof e==`object`&&e.candidate&&e.candidate.indexOf(`a=`)===0&&(e=JSON.parse(JSON.stringify(e)),e.candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let n=new t(e),r=FK.default.parseCandidate(e.candidate);for(let e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,HG(e,`icecandidate`,t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:`false`}),t))}function LK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&`relayProtocol`in e.RTCIceCandidate.prototype||HG(e,`icecandidate`,e=>{if(e.candidate){let t=FK.default.parseCandidate(e.candidate.candidate);t.type===`relay`&&(e.candidate.relayProtocol={0:`tls`,1:`tcp`,2:`udp`}[t.priority>>24])}return e})}function RK(e,t){if(!e.RTCPeerConnection||t.browser===`chrome`&&t.version>102||t.browser===`firefox`&&t.version>=113)return;`sctp`in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return this._sctp===void 0?null:this._sctp}});let n=function(e){if(!e||!e.sdp)return!1;let t=FK.default.splitSections(e.sdp);return t.shift(),t.some(e=>{let t=FK.default.parseMLine(e);return t&&t.kind===`application`&&t.protocol.indexOf(`SCTP`)!==-1})},r=function(e){let t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(t===null||t.length<2)return-1;let n=parseInt(t[1],10);return n===n?n:-1},i=function(e){let n=65536;return t.browser===`firefox`&&(n=t.version<57?e===-1?16384:2147483637:t.version<60?t.version===57?65535:65536:2147483637),n},a=function(e,n){let r=65536;t.browser===`firefox`&&t.version===57&&(r=65535);let i=FK.default.matchPrefix(e.sdp,`a=max-message-size:`);return i.length>0?r=parseInt(i[0].substring(19),10):t.browser===`firefox`&&n!==-1&&(r=2147483637),r},o=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,t.browser===`chrome`&&t.version>=76){let{sdpSemantics:e}=this.getConfiguration();e===`plan-b`&&Object.defineProperty(this,"sctp",{get(){return this._sctp===void 0?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){let e=r(arguments[0]),t=i(e),n=a(arguments[0],e),o;o=t===0&&n===0?1/0:t===0||n===0?Math.max(t,n):Math.min(t,n);let s={};Object.defineProperty(s,"maxMessageSize",{get(){return o}}),this._sctp=s}return o.apply(this,arguments)}}function zK(e,t){if(!(e.RTCPeerConnection&&`createDataChannel`in e.RTCPeerConnection.prototype)||t.browser===`chrome`&&t.version>=149||t.browser===`firefox`&&t.version>60)return;function n(e,t){let n=e.send;e.send=function(){let r=arguments[0],i=r.length||r.size||r.byteLength;if(e.readyState===`open`&&t.sctp&&i>t.sctp.maxMessageSize)throw TypeError(`Message too large (can send a maximum of `+t.sctp.maxMessageSize+` bytes)`);return n.apply(e,arguments)}}let r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=r.apply(this,arguments);return n(e,this),e},HG(e,`datachannel`,e=>(n(e.channel,e.target),e))}function BK(e){if(!e.RTCPeerConnection||`connectionState`in e.RTCPeerConnection.prototype)return;let t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:`connected`,checking:`connecting`}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener(`connectionstatechange`,this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener(`connectionstatechange`,this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),[`setLocalDescription`,`setRemoteDescription`].forEach(e=>{let n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{let t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;let n=new Event(`connectionstatechange`,e);t.dispatchEvent(n)}return e},this.addEventListener(`iceconnectionstatechange`,this._connectionstatechangepoly)),n.apply(this,arguments)}})}function VK(e,t){if(!e.RTCPeerConnection||t.browser===`chrome`&&t.version>=71||t.browser===`safari`&&t._safariVersion>=13.1)return;let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&t.sdp.indexOf(`
|
|
313
|
-
a=extmap-allow-mixed`)!==-1){let n=t.sdp.split(`
|
|
314
|
-
`).filter(e=>e.trim()!==`a=extmap-allow-mixed`).join(`
|
|
315
|
-
`);e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function HK(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.addIceCandidate;!n||n.length===0||(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(t.browser===`chrome`&&t.version<78||t.browser===`firefox`&&t.version<68||t.browser===`safari`)&&arguments[0]&&arguments[0].candidate===``?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function UK(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let n=e.RTCPeerConnection.prototype.setLocalDescription;!n||n.length===0||(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if(typeof e!=`object`||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case`stable`:case`have-local-offer`:case`have-remote-pranswer`:e.type=`offer`;break;default:e.type=`answer`;break}return e.sdp||e.type!==`offer`&&e.type!==`answer`?n.apply(this,[e]):(e.type===`offer`?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}function WK({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let n=GG,r=qG(e),i={browserDetails:r,commonShim:PK,extractVersion:VG,disableLog:UG,disableWarnings:WG,sdp:FK};switch(r.browser){case`chrome`:if(!eK||!sK||!t.shimChrome)return n(`Chrome shim is not included in this adapter release.`),i;if(r.version===null)return n(`Chrome shim can not determine version, not shimming.`),i;n(`adapter.js shimming chrome.`),i.browserShim=eK,HK(e,r),UK(e,r),$G(e,r),tK(e,r),sK(e,r),nK(e,r),oK(e,r),rK(e,r),iK(e,r),cK(e,r),IK(e,r),LK(e,r),BK(e,r),RK(e,r),zK(e,r),VK(e,r);break;case`firefox`:if(!dK||!pK||!t.shimFirefox)return n(`Firefox shim is not included in this adapter release.`),i;n(`adapter.js shimming firefox.`),i.browserShim=dK,HK(e,r),UK(e,r),lK(e,r),pK(e,r),mK(e,r),fK(e,r),_K(e,r),hK(e,r),gK(e,r),vK(e,r),yK(e,r),bK(e,r),xK(e,r),SK(e,r),IK(e,r),BK(e,r),RK(e,r),zK(e,r);break;case`safari`:if(!CK||!t.shimSafari)return n(`Safari shim is not included in this adapter release.`),i;n(`adapter.js shimming safari.`),i.browserShim=CK,HK(e,r),UK(e,r),kK(e,r),jK(e,r),EK(e,r),wK(e,r),TK(e,r),AK(e,r),DK(e,r),MK(e,r),IK(e,r),LK(e,r),RK(e,r),zK(e,r),VK(e,r);break;default:n(`Unsupported browser!`);break}return i}WK({window:typeof window>`u`?void 0:window}),typeof window<`u`&&`BarcodeDetector`in window;var GK=3e3,KK=500;function qK(e={}){let{startTimeoutMs:t=GK,settleDelayMs:n=KK}=e,r=(0,L.useRef)(Promise.resolve({type:`stop`,data:{}})),i=(0,L.useRef)(null),a=(0,L.useRef)(null),[o,s]=(0,L.useState)({}),[c,l]=(0,L.useState)({}),u=(0,L.useCallback)(async(e,r)=>{if(!window.isSecureContext)throw Error(`camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.`);if(navigator?.mediaDevices?.getUserMedia===void 0)throw Error(`this browser has no Stream API support`);let o=await navigator.mediaDevices.getUserMedia({audio:!1,video:r});e.srcObject=o;let c;try{await Promise.race([e.play(),new Promise((e,n)=>{c=setTimeout(()=>n(Error(`Loading camera stream timed out after ${t} ms.`)),t)})])}finally{c!==void 0&&clearTimeout(c)}n>0&&await new Promise(e=>setTimeout(e,n));let[u]=o.getVideoTracks();return l(u.getSettings()),s(u.getCapabilities?.()??{}),i.current=o,a.current=u,{type:`start`,data:{videoEl:e,stream:o,constraints:r}}},[t,n]),d=(0,L.useCallback)(async(e,t)=>{e.srcObject=null,e.removeAttribute(`src`),e.load();for(let e of t.getTracks())t.removeTrack(e),e.stop();return i.current=null,a.current=null,l({}),{type:`stop`,data:{}}},[]),f=(0,L.useCallback)(async(e,{constraints:t,restart:n=!1})=>{let i=null;r.current=r.current.then(r=>{if(r.type===`start`){let{data:{videoEl:i,stream:a,constraints:o}}=r;return!n&&e===i&&t===o?r:d(i,a).then(()=>u(e,t))}return u(e,t)}).catch(e=>(i=e,{type:`stop`,data:{}}));let a=await r.current;if(i)throw i;if(a.type===`stop`)throw Error(`Something went wrong with the camera task queue (start task).`)},[u,d]),p=(0,L.useCallback)(async()=>{if(r.current=r.current.then(e=>{if(e.type===`stop`)return e;let{data:{videoEl:t,stream:n}}=e;return d(t,n)}),(await r.current).type===`start`)throw Error(`Something went wrong with the camera task queue (stop task).`)},[d]),m=(0,L.useCallback)(async e=>{let t=null;if(r.current=r.current.then(async n=>{let r=a.current;if(!r||n.type!==`start`)return t=Error(`No active video track found.`),n;try{e.advanced?.[0]?.zoom&&r.getCapabilities().torch&&(await r.applyConstraints({advanced:[{torch:!1}]}),l(r.getSettings())),await r.applyConstraints(e),s(r.getCapabilities()),l(r.getSettings())}catch(e){t=e}return n}),await r.current,t)throw t},[]),h=(0,L.useCallback)(async()=>{try{await r.current}catch{}},[]);return(0,L.useEffect)(()=>()=>{p()},[p]),{capabilities:o,settings:c,startCamera:f,stopCamera:p,updateConstraints:m,flush:h,getStream:()=>i.current}}var JK=`data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKCAOBeMcR4X9C44BwABCgGAsGYCgTwHAcAwXAiAwSAQV///CJP9lwMBQAwAAAWGo5lVLCcaeneVhJAVGai3//ioaUEf//gaTAYGCj8BnEwfrIqDcsIQb/vmhU/8fAs0G8YGGwKST8Igj4GCATipksVzY8p//90FWJwh45AkX//4fCF9wMEgkL3uQc+gbGJ8t4MBAMBP/hEXf9FRuWBcAfIFjYzQdoLCBwh7IWVlxaX/w8oMCP/+EQT5poGB1Ir90DhiV6af/jFYBpT2BgoQyyt2M0ToBdEaZyzt8nTo3xdNDCTSd//o6F06CjooxRr4jVF/0bOKD6OMUNDRxiMUVFR0FFQPhGXRjDpr4MAEA4wIQUhYOIw//PkZE4nrg08sOx4ACQ0CopD2aAAlwTTBxQeMcwd8w8gZTAgABXwGABOkzpI0wAQAExnWfP4x8ZjKunWdZ1o1Qe6lFGKCNULORQCELAAPnRUf/GIx/0FHGfo3SdZ0qP2cukXKLlRtBKFgAQwCkwJgFRYBEEATmDsLSY2QiQYCEnEra+UZo6F1aKMRr6GhoaP/+j//ov+i+hjLqBgMkYoqChoo1GqCjoY06TpRqjjLOYzRRmMuizmgdKhdF8kjTAAAPMCwGswzglgwAJfzqxmioKH/////////////+ijLOAwFmN0f/////////Q///8ZjP/9DGYyFwIDBeB3MA4AlBWidKM5spykAUAQOCakK+udGqN8VDYjTRuN//0bVX//6Kio4xQFv//nf//kKOoAEIB6SY6hcxenp85///4/DEPf/84Xvl4vF4dwtxfEJgCYQHMSgKCROp4+fn////L4tQf0unz89OecLxeL0ul09y6enzp4dIhKAQFA5hKfLu1nU7/Wr71rRKJUBQSUVt////l08GUPVWgAAYAeNKsxbQNAAhQx3/oKGMM6dZ1Yy6sajMbfKio7lNcv0sScZ47lNcw32ekVFMP9fp/f+mklI6at6u/dBMQuW6y+C5BcgwAA//PkZEomGg1HYGe0riWsCqbEwiY0BJFJMxrCcxGgQ2VK8xxCF1wsABgQBBgQBAYAFCkYCgALkK4fJ00E5ctJN1Uxy5au3XoGcM4dSN0EYZwzhW0WCh1PZwzhnFFQxtnbO2d0Kt6CdXbruggkTEX5Rs4TEQUVsdVXaCcuWXIBQUGmwmgoAGcJiM4dSioHQdBnEY+hjcbov//jcb/43G43G/jCRibfxugdBnDqULO2duvQumztncbo4xGKKNxugooxGIxQULoOgFgUMTA/jbrxiMDmETL+eLhcPThzOeeOZfL5fIcBYuXD/OHv8t//LJFxjxQYHHKDGFkZMtlmKM0RgQfbVtxFIHbQBDRuzRguEI1c9XZ/rWmrZfVU3Oc/9utNNygRQkCoHlAYstNN6DJ1IINpoINppv+WG/+g2mmnUmmmpBAoJIJhnwB5xkymn606Df/t000xhU03UXC5Ol8uFyXy+Xy/l8v5w4cLk4XAvwAYUvl/QL5fTdlKZkEEEEGumaKaX00zIOemf6CH///ywI3LKpiQ2Ef4xYWMSDyI0XwzikpL0ajVHZ3j9DGIjeuXcNfjn96/S/TUz/X/vX////5K/r+v7Jn+LlAoGZOIQIwMKBQM/yppKYURmhGZkR2b//PkZE0mHg1HEG8wyiD7mlwAyDU8nJHi5htakZmZGNiRcpkJhBmUmZYQcM1VDEEBggNDV/ASEZRYKFZIhkXKLlKmk7IVTKmZNJ5KhiqVUqpX+k7+qlVKyV/ZIqZDFDWTJlFyi5TJpKhiXKBQyZzIS5JhBoayV/AQWVpGWkcYTV5O/rIVSv8/0nkr+v6/vyR/X9f1/ZN8kf5/n99/n+f5/lTKmf9/mRP8yFUqpWSv4yJUqpX9kj/MmZNJ5K/z/P9J5P/v6yFUz/CEoywgUMqZkz/FssECIsVq0aPRrRRatFFFykQZJ2Ukl///5KjmksOaA7ALROJLDnEsLbq3GTMVrwb/0dGzmM0DlfBlHQOmrdR0MYi92TX6b/cmDHLclyUVYO/4O8sFTKFTKFf8yhUyhUyhXzKlDKlCsr/+ZUoVlSsr/+ZQqZUoZUoceMfcoZUoZUoVlfOPGcmDHKcpynKg9yXJcr3JclyXJclyYO+DXJclyfgxFZVb3KcqD/g2MxzsY72L9LubPR0dCyf5K5NNd+Tv9GXRdV0XJclyfcl/n+k8kf6SX/iVynvXf///4Mg/1OkxguYzmM5jMcLHMxwwGhgNCwXMLAcwMXTLi1MD7w7tmTdBvMmE0xQFzCwHMDAd//PkZGMpigkmAGOUvCfTgcgAuC+ITswMFzC4oMLhYMByn0xvU+p9Tr0xUxf/0xv///1PBYDhgNTFTFTGTGTGTGTGTGTGTGC4GTFMDAcLAdMVMVMULAcMBpgYDhcDGFwsYXFBikLGFwMGA4MBxgcDKfTEMUoAx2BisD+mKp5Tv1OkxkxkxkxkxkxkxkxlO0xVPJi/6nv////U7CwHTFTFTGTGTGTGU+p71PpjJipihYDpipi/6n1Ov//C4GC4GTGTGTGTFU8WBSZdLhWB//yKlotyLZFiLf8tyyRUipFSKkVGRBZQMiWC3yx//wxUGKsSvDFQGHUAL3QMsHDFIYpCYy2Bmagy6BjLgy6Bh3od58DCLAizBgRb+EQiyEQiwGBFuDAi3/////20QqSBJf/qcumv/////wMZdGXAYMu1gYy6MuBEZdBgy4BjLgy6BjLgy6BjLgy6BjLQy6DBlz2cJDLgRGXAMZdGXAYMuhMZcCIy6sJGaoGMuppwNRl3WBjLgy63wiEWAwIt/+EQi0IhFsDCLAi0GBFkGBFgMJCqaqYAgAYIhBBvwf7kwcqRq7V3IctacvlN6NxqgooxRRuNRiijEZjMGRuMvz9FGozQ+1X2qe1T1S//+VhaWAtKwtML//PkZEIkbgcaAHc1xCJrjeAAtfuUAtLAWf///mWePH95ZFgsyssvM88+jzO6K+z7OM48sH+WDiweZx5YOK+zxWLGJWsa6xadAv02fTZLSpsFpvLSga0tMgWgUgWmwgUmyWl8tMgWWmLSoFJsoFlpSwsmyBg4HhEdgwHAYPBwGDgeBg8HwMHg4DB4PBgOAwcOwMHLwDn5lAwcDgiDgYDwMHA/4MB3//+EQeDAdwiDwYLPhEWQYLODBYERZBgt8Ii34GLBaB5pfAZ0FvEAQ/UfwxULlx+IXx+8f5CELH8fxKhAIDFoHBEDRc3////gwHgaRXgMHYMB2EU/gwZ/gYbw3gY3QbgYNgbgYiAbgwN3/+EQbBEG4MBuDAbAwG4RBtAwbg2////+B9B6F//////////hEdD//////////8DRahEQGCInMNg3LBElgNjDciCwG/lgNiwGxWG///mG4bf/+WA3Kw3KyIMNw2Kw3MNg3MNg3MNiIMiQ2OK0xMiA3KyJLAEZgRARmBEDEYFwBBgEgEeomowol5YAJKwCDAIAJ8sAE+gGBgCJYAQUZ/13LubMu5dyiYOAhKwEFGf9AOoz/g4CFAIol/lgAjysAgsAElYBP////lgJksBM//lgRUxF//PkZGApggsIAHt2wiNLoggAqCz8RFSwIqYioipkjEjHCCSN/+WJg5iYOYmPK5krmTmZk5mZ8sTJYmf8yJiNiIisi/ywRmRkZkZGZGRmRERkREZERGRERkREZERGxEf///hETIMEyBiZEyBiZEzwiJgDEwU4DV2gQGFOBgmP8GAiAwRAiBgIgYCIGAi/4MBHAwRgjAwRgjwMEQIgMcgY8DBGCMDBGCMDEyJn///+BiYQIBlObj4eYLIwsjAOBGFkYBoEQ84eULIw88LIA88PKHnw8sPKFkeHlANAiAaFUDAiMYPIHmDzBZBhZB///8GBOA1sH/Awni7AwnhPCITwYE/CKzBgt8Ig8GA4Ig6EQdww4Yb+F1sIgtwYCwGAsAwWAsBgLAYCwDBYCwDBaHUDF+VEDKgC2BgtBaDAWgYLQW////gYLAWQMFgLAMFoLcGAt////4RMABmBSj4NgwMOGHBsHhdcLrwbB4XXC6+F14YcLrww4Ng8MOGHBsHww4Ng8AUC4AoMQMC4fgw3wutV4QIsAgFYIBWCCVgHeVgHeWABCwAIVgH+YBwB5aRAstKgV6Ba1oMg9avtUVN/qdLWciD/cqD3Jg6DFPuTB/////lYAn//mC8C+YLwL5gvgvGC//PkZFEpLgMKYXt2xB5LogAArbdc+C8VgvlYL/mC8C+YLwL5YBfMNgNkwXixDWoHPMc4VUxVA2TBeDZPYXzXl815fK14sLxYXvK1//NeXzXl815fMtdDLSw3UsMtLCstMtLDLSwsFhWWlgt//8sFhW6f/////+WF7zXl8sL5ry+Vrxry+WF/wMLwX4MC+EQv/AwvBfAxsjYAyqpKA0lpLAwvBfBgXv///4RA2DANAYGgNgYGgNgYGwN+EQvf/BgXwYF//8DC+F4Dd6NgGBf4AgFwbB0MMF1wuuDYMBsGwusDYOBsHA2Dvg2DQuuDYOhdcMMF14YYDGYDEGwfhhgbB0MN///4RBaEQWgZByoYRWYMFvwiDsGwaF1gbB34GDwdC64XW/w1aKxDVgatir4YcLrQbBwNg7////////////+ESfgZPyff/////////4MFmBvvMAERZ8CC5adNj02E2S0qbCBSBZaYtN///oFlpU2QMXIFAYuQK9AtAo7IxLTpsIFJs/5aZRxQawaxGfIg9CsrI+PUqkWdOHp7ODsOl6cOHZ4dsulfLI9/8BAAgMBACsBLACVgBjoAWAE5OTM6WDAR0zodMdHCsJLASWAjzCQgsBJhASWAjysI8wkJMICU//PkZFkeqgcaYDd1th6DogAAqCuIxQwtDA5MdMULgyY6YqnXqdep5TpMdMVRNRL/UT9AN6jCiSjKAZRNRhAMomgFQDfCIJwYCQiCAiCMGAkGAgDBJUA3eVAMEgj////8SrDFIYqh5g8kPMHkDzB5OFkYeYPJ+HlDzB5+AYVQDibCyIPLLEZIsjIliWS0WywWyyWuWCyWJaLZbLJYDHgLAItFvy3///4eYPKBlQTh5QYEODBb//hhoNg7/C62DYPFUKwKsVgNWBq8VkVcVkVUVYrH//hGff/8Iz8GT7//////wiX4ML3gwvgwvf4ML3gZeqoHVGyBl4vgZfL2F1oNg4Lrg2DcLrg2DQw0Lrhh8Lr4YcMNBsGhdcGBcMOGGAFGAGMQsF1guuGG4XXV/4uQXOLmF1kL/8lCXkuSk4O8/FzHzuP0hIucf/CIFAMCgFPgYFAKAwCgGBQCgGHYO4GBVM4GgQI4RCMEQKQOtQjUI1CNcI14MqDKwDIAGQDzh5wsjDyw8uHmDzYeUPN+DEYRRhFEIowYgDQgIhWDApgwKAwKQYFAYFQMKkYDOxHAzsRgMKBUGBX/h5v+Hm4ecPNh5A8wBwjhZHhZAHlDzBZAFkAeQPKHnCyILIAsih5QsgDz//PkZLQgIgsMAFp1xCGLogAAA2rkB5w8oeYLIQ8kPMHkCyGHnAMKoGmAgFkUPMHmDYAtfHPHNkr/JYl8c8lCWHPHMkqSo5onMAkBDnfJX//8IgDBgBhEdAaxSQMHUGAEIgAV4risCcipBOMVRVBO////hEvAxsAwvf////8MPDDww4XWC64XXDDww4YcMPC6wYb/wYGgiGwMplMDYhTCIaCIaBga/////8GA+EQdgYPB4MB4GDwdhEH8Ig8Ig8GA6EQcEQf8DBxlBjoAweDuFwgCQXiL//iLiKCKCL4XCiKRFwEgoRT4iqpMQU1FMy4xMDCqqqqqqqr////xuDd8fv/DVwrArEIg6EQdhEHAYPBwMB+ERYBi0WAwWAZ0FoGLYOB+JfgZ0FoGdBaDBYbn+WHm9xW7/Nzzc83PLDzc8reWlA7S0oHamx//6BflpU2C0qbBaf/8yk/ysn+VkMhTKQrKVk8yE8rIVkKyYsAn/5WC+YICmCApWCGTkxtKMcVWlgFMEBTBAX////0C0C0C/////////LTFpvTZLTlpv/0Ci0xaYtOgWmymyWkAxcWmTZTYTY8tMmygUWmLTIFpsFpv9NnywLmLCx2RgWmQKTZ98UjnzZ1/++D4M6/////3//PkZOgjIg8IAFcbxCaTogAAoCuIzfJ8vfJ8Wcs5fBnD5//++L5f////////6nCKv//+o0o0FUYwqDNGCwgUMKC0VVGkVv//4Yf8LrxVCriqDVoasDVuKsNWw1bisBqwVkVkVX//gy/4YYMMGGhhgwwNg4LrhdcLrAYWGAA0zBsH4Ng3C6/////4MAoGBQIDAKBgUCAwCgYEAsDAoEAwKBAYBYMAoGBQIBgUCYGBQIBgUCwiBAYBYMAoRAgRAoGBBMBooCAYFAkIgTEUxFv/EWxFxFhFoi0LhQuFiLCL/EWqTEFNRTMuMTAwqqqq//////8TWJriV/hERAwRgYiEYGIhGBmIRgYiEYMEQMEcDMSiA1GYwMR+UDMTkA7KIgMRGIGGM0SIrRGjRlhEV4jxov8rR/5YRFhEdQSViCsR5iRJWIKxPlgQYgSViSsR5WJMQJLC78IiKERF4REeERGEREERHwMRGOBmIRhERhERAwRAYiEQGIhGBmIRAajkgG5TEEREDBHwYIwYI4REXCIV/4MCmDArgwKAYUO/gYVCkGBUGBTgYUCsGBUIhUDCoUCIVBgVBgVBgUhEKQMKhUDCoUBgVAwoFAYFcGBQDI6oA5+qQiFAMjBUGBXCyEPIFkOH//PkZPMj6gr6AFdVwifkBdwAoC2Ilh5/8PPh5Qsih5IeUA0TAZrE8PP////wMRiIIqID8piAxEIwMxCMDEQjCIj//BiIDRo8Iogii/4MKwYVhEoESkDEiIGJEgYlfBgmDBIMEAYgSBiBIREAwSERH/8I7wPfuCO4I7v/8GBvAw3Bv/////gwN34RBuBg2BuBg2BuBg2BuEQbhEG+EQbAwG4MBtwiDaDAbhEGwMBuDAbAwG4GDYG8DBsDcDBuNwDRWDcIg2AwbA34RBv///CINvCINgMRIN/////wiG4DDeG+TEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/zB4OLAP8rBxWDisHlYOKxb5WLTFgsMWiw18LDOnjPxZoxadDOgsLAtLAbKymVhsrDZWG/LAb8w2GywGysNlgNFgNGFwuBQuWnTZLToFFpisLJsFp0Cy0voFAQLFZkMCAQwIBCsC/5WBCwBCwBCwBCsCeVgUwIBCwBDEwEMCAQrAhgUClgCFgTlgCGJgJ5gQTGJwKWAKYFApgQTGBQL5kY0HMjQYnAhWJvKwIWAIVgQrApYAhWBPBgECIEBgE/8IgXhECQiBAMCkcDEwEwMCAQGAQIhoIhsGBsIhvgwN//PkZN4irgr2AAOVqiUThegAnCtMgwNwiG/8IhuDA1hENhENgYbKYHb2IBhoNhENAwN////8IhsDKZS////8IhuBhspgc0KQRDWEQ3///CNf4GAIMDAwgAwAAwhAwAwYAIgwiHBgAMAYGAAGHv///CIBqBqESDEIgRYGoGHBiDEIgGoGgMAYgxgwgxCIETwYFYMCoMCuDApBgU8DCoU//gY3G//wYFOBhUKBEKQYFfBgV8IhSEQoBkYK8IhT/wMKhXBgUCIU4RCoRCvgYVCsDCp3A1SqAYFAiFP////gY3G1TEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgwCAwCBEC///////8IgUIgWEQIBgUCAwTQMCAQDAoEhECAYFIwGaRMBotWAasdwH/KqBmhFgaKI4GRgKVpjCBTCBPMJHNMFMIFKwnlgJ5hUxhUwGWlpAMuMuWLTFpvQKQLQKLTIFJsoFIFFZb/8woQwoT///MIF8rC+WAphAphAppgpYClgsmwBC6bHoFFpUCi0wGXFguWCwFLgUsgX6BZaVNj0Ci03//+EQKEQKEQLCIFAxMBcDAgFAwIBQYBODAKBgUCAYEAuDAKBgUCAYFAgRAngwCgwCwiBIRAmE//PkZN4iogj2AFdVxiUrhewAhOkwQIBgQ0gbOI4GRhOBiYCgYEAv////CIFAyMBQYBf///CIF8IgUDAgFBgEAwIRwMCCcDEwFAwIBf///CIEQGMDGEXCKBpCIDCEQDCAsYInDFQMMAuYSoTQMVfBlf//+DKfBgAiGDAQMIMIgCIQYADAEGAgwP////8ItgNu2/8DAAAiABgHhECBgQGEQARA8GAeEQIMABECEQIMAwYBBgCDAARA4GAAgYACDAARAwiAgwDhED4RABEBCIGBgDoH2dgZwCBgAP//BhX/+DCiTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqF1ww////////hdeGGDDBhwjeF102E2fTYAowMLjE0zTDfyyMYjEDJTwMLSwFi0/gQLoFIFpsegWmyBQsWlQL9ApNgtIWn8tMgX6BaBX+WmQL9Nn02f9NktIgUgWmwWl9Avy06bCBSbJaUtImyWkQKLTIFgYWoFFpAKFwMLzZgwAwvLTIFlpU2fQLQK///4Yf4YaF1sLrg2DAuuDYNDDQw4NgwLrhh4XXC64Ng3C60MNwbB4XWC64YcMODYPCJYDlMQBlwRLg2DOF1v/////PkZM0eKgz0AE+UuCnLFfAAk3Fsg2DAYX/ww//4YaGGDDhdbDDACFwMuXA2DADlygusDYOBsGhhv//wNU/CKQusF1oXX+F1wuuGGC6wXWDDBdbC6wXXhHv//4AHIFgC0BZAA4Ba4FkADwFsC3AtQAOcC0BYAtgAcAA9+BYAsgW4FvgWOABwC1oq+it4RT0VVG0VFGkVywo1/RWU4U59TlFb1GvRX////QK9Nj/9AtNn02fTY9NhNlAr/QK//TYTZLSJsIFemx///oF/5aZNj02U2C0yBaBfoFAS6bKBfoFVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQiA8GAO/4RAf//////wYA4GAO+EQHAwB4GDoB4GA4HQRB0BhlDIBpEAcBgPDIBgPAeDAHIFAYuLTpspsJsFpi0haRApAtAstIYKClgF/ysF/ysE/ysF//LAJ6plTlYC1ZUypmqtWVK1VqyplSFgBaqqcwAAVIqcrEBAAKmMBERCQhwD5iICIQEyABMAABBVGXF4gIA4DLAAWAEQgLVSsBaq1ZUv+YKClgELAJ////5YBP//LAL5WC+Vgn+WAX/LT+gW//PkZMIhLgrsAFt1yiD7FiB6A9qwmwViybCbCbCBSBabCBSBabPpsegWmwWn9ApApApNgCGBmEwWlLSpsf////hEHgYOB3////4GDkiBxMHhEdgYOB4GDwcBg4HW23gooFYHd/+BnAz8O8Vv//FaBm4rBWh38es2zbAtD1m2PVBqBrBqBrAF7AF3/5el84MkuHTgyy+dL0dRnEajMIyOn8RsZ5HGG/kbIpHIkYUiD0y2WctlZaWSwrKx6FZbxnL54ul04eLhw9Ol84dl86cOHT3Ipb5Z8qKpVx6/j0EkLctVTEFNRTMuMTAwgWQLQAHgLf/////4Fn+EQESEcIgInCIRW9TkrCzH0YIjjWtI+YeCD0woLCBQwsKRWUaRVCBZFZRtRtFRTlTlThRtAr0C0C//02E2fTZQK/0Ck2f9TlFRTlTlFT/9TlFVFRFb/9ThThynIQbWkAREue5S11rKdlkDEVABh61ExYPU+tOD4MQgcn4iwigivxFRFoXDcRQLhoiwioXCeAkFBcNiL8RURQBIKEVEWiLBcKIqIpEXC4QReIoIpCIKAQMxFAFAsIuIr/4YYLr//ww4XWBgwC64XX/hhgw3hhwuv8MNhhguvhdcAUYgaYTAAoWDDg2DQbBg//PkZPYe6gzuADd1uDKsBhBAe89cYYdGjtDT2hDmlD2leaOv9oX0OX/0NNLplNf8ewakNWGrTfTRpphNJtfaeh7T1/tStdtTpqN532lpX/1/kmQ5eaf2hoaV9paGleJAvd0rer2pWu1ar2vk56vVrV5Hj1Nop+/lfv5Zpkem5kX/2vtata2rq783nbvtbW6VjW6a2rq13+rO6VysV58K7tbp0ru6Vrtqa1a67tr6sau1ulYrnfa2v927Vrt21NSuN5X927/D4diAQANh4gEIfxB+IQG/D/4gDw/iGIRD+HRATEFNRTMuMTAwqqqqqqqqqqqqqqqqqiIEK/ititFX///8VcVuK38VsVhXBOQTpq/qm8QCAcBmIxgdfFZCHECpxFBFAuFEUC4cLhsRTEVEUDVoDQD+KrFYirFX+KwKoVgVUVUVeKwGrhWRWBViqFYDV4rMViKyGroauBg/A0YThVgNAEVQqw1fisis4quKxxWYrAatxWIqoqg1dFYxVxWIrAavAaAArIrAqoqhWYrIqvxWMVYrARCADhcKoVYavDVgqhV4qorIrHFWKuKxFViscVUVYasAaAfFY/4YcMNhdfwuuGGC64YfDDA2DwusANygbBwAxhAECwNg8MOF1hD4//PkZOkc4g7yBjd1sDNkDhgqYwtcYoUyiQ0NCkxQ0NCQkSIbGKIyRGEo5mUaNEhGKEHMmaGhI0UokORvMmZmZSZSiMZQkRnKKZkzRoSNCQpQ0NEZoaNFJkhh3KOUJEhIcoSJCQkIzlDlEjMDMyMpQ0JCQzNCRGaNCRISEZoZihoaIwlEHKNGiMzFEjRmSIwlHMyZmcyiGyMxRyhIkIxRSZokSEYGBkiRojAPESNGjQxvKHMmMoSKTJCQkIwlFKLDYWGhoZhYWAAUGBsAwsMDYUAcK4XDPhQVwwLAH/DfgHC6TEFNRaqqBgjwYI//wYI/8GCL///+DBFhERgwRcIiPAzGYgMRKIDcskBgjAxEIwYI4GiRwNEjhFH4MRwYjA0aOEUf8Io/BiLgxGEUYRRQij/BiKDEYMR+DBGBiMRQiIgYIwiIwYIgiIgMRGIDUSjhEReEREBiIRAwR/wYI/8IiP4MEcGCIIiOERH8GCIIiMIiIIiODBHBgjBgjwiIoREcIiOEREDBFCKiAxHJcIiMGCMGCLwYI8IiPhERgwRAwRAYjEUIiIGCP/AxGIgiIsGCL//4REYMEXhERBERhExhExAzyAZiEWDBGERGeKsVsVRVFcVwTnFcVxVgnYqipFUV//PkZPkcfgzeAFaVxDgUBgAgatvIYrgnYqgnQJyK4riqK4rwTsVor4rQAjABAgnQritFSKoqQTsE5C1haxfF7F4XQtULSFqC1i4LwWkXIWkXRdF+LwqAnME4iqCdwToVuK+HAERWAkAlgJB0OB3Doc8OYc8VCsVgIB3DuHAERUAkAkHMOBwOAIisO4dwEAEAEg6AkAl4CeHA4AkKhXioBIOiv8OB3F+LgWkXxeF8XouxcF0XBeF8XBdF8XhdAdouC8AEsXYWsXOKsVBU/FaKmK/FTxXFbFUVPiv/8VfxXitVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAXX/8MN/wwwYf//DDBh4Yf/+DYODDfCIFAwKBQiaANFgUDAgFAwIBcADwFuBY/At8C1wLfgAdAtwLGBawLcC3AsgWeBYwLX4XW8LrBhgiFgMlhYLrhh4XWhdb8MOGGhdcMP4YaF1gw8LrwuvhhoYYLrYXWDDBdcGwfC60MN/ww8GwZ4XXC64GZQsF1wbBnDD4XXg2DcLrBdaDYPhhgusF1uGGC64YfhhoNg0LrQwwYcMNC62F1/g2DYXW4XXC6+GH8DTIW4YeB/wR/wjwR+DP/y06bJaRAtAtAtAs//PkZNwY2grqBFW1xDhTRegABLBstL6BRaVAstN5aYtN/psIFf5aQtIgWgUWk8tImyWkQL9Avy0qbKbKbJaf02f/0CkCy05adAsC3K7+mx5aVAv0C/TZ8tOmymwB2pspsFpPLSlpy0qbCBSBXlpk2E2E2C0paUtP6Bfpslp0CkCy0ibJaZAosWQLLTJsemwgUmz6BZaYtOgUWmLTpsJsoFJslpPLT+mwmz//6Bfpsf6BSBSbCBXoFeWk9NhNhAr0Cy0/+WnTZ8tJ/oFf6bP+myWn//8tMmz/lpf//////8sPTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBgJwiCYMBP//gwE//////wiCAMEgkIggIqIDKpUCIIgwE8IzA4j+EYhGAZMIyDJA5gGRhGcIyDIhEQiIGAgwIRDwiAGAAwYMHBghGAZMGRCMhGYRgGRA5gIyDIwZPBk/wZIRmEY/gyOBxIMgIzCMgcTgwRBgjwYJBgngwTwYJhEQBiBGERMIrwOouAxAgGCQYIhERhEQDBGDBAREgwTCIgGCQYJgwSDBHwiI4MEAwSBiRHCIkGCYGJEQiI/Bgn4REYREeBiBIH6XhERhETwogoy04mpZibFmJuWYmx8n//PkZN4ZrgrkAFZUyDcjofgAA9qc0HafZ8HwNrjaG3xtjaDtJwTo+D55Ow7fxNRNSyLPlqJsAr/lmA/FmWYm5acTQVgTkVQTnBOQTgVxVBOBVFWK4J3FUE7gBABOwToVQTsVhUFcVRXBOhUBORWiuKkVYrCqK+KoqgnQrAnEV+K8E7FQE5xWBOQToVQTsVRW8V4qRUFYVgTsVhXioKgrCqKwqAnYqCtBOhUioK+CcisK8VRUFSKnirFQVBVFcE6FcVoJwKoqCrFXFUE7gnAqiuCcQTsE7xU8VP8VYrgnYrCuTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn3/l/J/8vHL5f/BhwCETgGpIDOATgEIOFoDcHzgEIDgC+pG7eve1S/6tat7rXupDXSStWoIpGS4TSMQNIySMwpIyAaRkkZ8GJGdBtbwYkZ63tCKRkoIpGWDEjLCKRmEkjOvsEUjJOsIpGa6bOrgxIzsEkjIGJGYUkZVKCKRmqoDkgEjMJJGSYMSMAikZJ3qhp0dq9ru3X1I36FujPbXuxwKbr//waABfg0AC6DUDUDXBqBoAmQawJiGrhqDUGoN//PkZL8USgKcAAblrroTgfQAbhtQAag1QawaYNIAuQa12Lv9si7F2NnXa2Vsi7i/DZl2tlL9l+vL8tlUTUTUTUYQDIBlGUAyifqJKJqJ+p5Mf/U7TETEU7CxkxVO1PKdqeU8u4vq2ddnrsbM2Zs/tl9s67V2NlbIu5sgaA1Q14ExAmAaA0BrDVDXhpgTPDQGuBMA0gTKGgCYgTHDQGrDUGgNcNQaw1hoAmcNIaRIAtALVEgC1gteI8FpBaBIAtcRwkAWgFpBaILVBaIkAWgRwjhIiPEeDXwa/4NUGr+DRwaKBgX/8IhP//wiF8GBMGBP/wYEhEKEQmEQuDAoGFTAwLgwLhG/4MvCM8GSDJCNwZQOXg2DwbB8MPDDhhuGGBsHhh8Lrf4MCQYFCIUGJgiE8GBQMIFhELDDhdaGHhdYGwaGGDDhhuDYMBsHg2D8MMGHBsH8GwYDYMhEKEQgMCeDAsIhAiFBgQIhAYFhEKDAkGBMIhYGEC4GFCBELgYUKDAuEQsGBQMKEwiEBgUGBcIhQYFwYFAwgWDAoRC8GBAYE4RCgwKEQvhEJgYUIBhQkIhAiECIUGBIMC4RCgwJCIUGBAiFgaYLwiEA5cGXCNhGBGwZAw4Ng0MPBkqNqcoqorlh//PkZP8cygrkAFI0wjo7lfAAjhq4SnPor//psoFemygWmwWm/0C0Ci05adApNn/TZQLU5RU9FRFVFdTn1OFG1Gywv/UbUa9Ff0VoFgCwBbAtQLUCzAtgAchHAN8ImAbgBvwDd4RwjQDeAN8I0ImEQEQAbwRgiQjBHhHAN0A3vgG6Ab/CIhEgG5AN6EQESAbmEYI4RABvYRoRABuYRgDehEQiAiIRABvcA3QiQDfwjwDfCICPCJCJCJ4RwiYRwjBEwDehEYRgDfCNCOEQEQEcI+BagAd4FrAscCxAswLfwLAFgC1wLNVMQU1FMy4xMDBVVVVVVVVVBlBkwO3wZAZMIz//////+DJwO0IwI0DsA7cGUI34Rn4RgMuEZgywZQjAZP/hGAcmDKEYDIB28GQGQGXhGgcgRoMgRoHYBywZAZYMmBygyQYFCIUDChQYE4MCgaYJ/gwKEQsGBAiEBgXAwgQLrhdcGwcGHBsGA2Dgw4YYGwZC6/hdYMMF14YcLrYYcMPDDhdYGweF1oYb4MCwYEwYEgwJBgTCIQGBIRC/BgQDCBcIhAMKFhEKDAsGBQYFAwgTgwKDAoMCQiEgwIBhAnCIUGBQiFwiEBicIhAiFhEIgIoBooGieDPA+4GeDPCP//PkZOobXgrkAEY0jjazieQgBKKIBGgyBGhGhGgyAdoMmEaDIB2gyhGwZYMsI0GSDIEaDKB2QOWEaDKB2hGgygcoHYBygdkDtgygcngyAyhG4MgMgRgRmDJCNBkA7QjAZIRoRoMuByhGgyAyAyhGwZYHKByAcgMgRoHIEbCNCNA7fCNA7AZAO0GSEYEaDLA7cDthGgyAyAyQjAOwGUIyDKEYEaEYEYEaEbA5AZQZAZAZIMgRkGXBlBkCMgyAyQZYMngcmEb8GUGQIyDIBywZAZOEZhGBGwO2EbwjcI3hGYMqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqquDqz8GMDQIvBj///+DGDEGAMAifBj8IuEThFCIEQGPCLwiQYBFCKESDCETBhhGAZGEZ4MjgcSEY4GoRQigxCIEQGPCKBiBrgxwiBEwMIRAY4MQNMIkImDEGIRYMIRYRAYhFBjwYwNQYgwBgBh4GAMQiwYgxA0gahFBgBjgYBFhFhFCKEWBgEWEUGEIgMQYQMYRAMQigxhFBh4GkIgRIRYRAY4RIMQYgYhFA18IoMQYQihFhEgwhFCIDEGIRQieBiEUIoRQYhEwYDAFwGrBog0waAaQawacGsGiDQp9MZMVT3piJjJjK//PkZOYZBgjoaUJQ0DprofQgbhq0dep71PqeU69TpMdMVT6n1OlPKdJjpiKdFZkxlPKdJiJj+mKp/0xFPBoAmYaw0BpwJhDSBMQ1BqAmIEzDSGgNXDRDRhp+GsNMNAEyAmYagJkBMA1BpDXAmECZhoDXhqAmYawJjgTICZBrDSGsNAExDVDQGqGgNHDWBMIaQ0BrAmcCYgTHAmIEzDWGgNYaOBMw0BqDSBMYaA04aA1hqwJhw0ATKGqBM8NYEz4aQJkGoNMNIag1+GsCY+BMQJlDVw0cCYfDXw1ho4aQ0gTCTEFNRTMuMTAwqqoD37wjuhHf/////hGf////hHf/gycEZwRn4MnYMncIzsGTwOdOA507A507hGeEZ8GTuDJ4Rn4HPn4Mn4RnhGcDJwM3YM3gzdBm6DNwR3QjvA927Bm//Bm7Bm/Bm8GbgZvBm4GboR3gzeEd+DN8GbvBm6EZ+Bzp4Mn4HOnBGfA588IzsDnTgZPCM8Iz+EZ/CM4DnTgOdPBk8Iz4RJwGTidBi7AycTgiT4RJ8GE6ESdhEngZPJwGTieDCcESfwYToMJ3AycTwiTsDJ5OhEnwibwYb+ETdwibwibvCJuwYb/4RN/Btf/jYGyNv8bHLUtSzE0/LQBW//PkZPQcHgjQAFKVrjfDmgAge1eMLITcshNy1LX8si0LUTQtCyLQTUteWQmvLItSz4mgmnTJops0umEymDSPsnR9HwfB8k7Pvn0fAvwtcLXF/F+L4vQtQWuFoC0BaReF7AeBfwtcXBdF4XheFwXAtAui9C1haRdi6LwvirgnUE6FcVBVisKgrCvioK+KoqiqAhh3AQFXhwVYrFYCWHMOioVAI4dFWHPDgCAdDgdDmHcBIBEO+HRWAiKsBMO4dFQCAdATw6HBWHBWAgHBUHMOf/gICsOCoV4qw7+KxWHA6KhVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVC11Fz1+NP+/Xkqpr9OfuhQ6lZNWf+XsZc/si+KNoOj/Ntai9j7IISgZAklTqQhjToNTeQoreRdaSDODWvYAVFaWWkQmVuZPP8bRUzq896vc+XS6mm5gnnW7JLnV4z9N5XnW4k86x+uyHyxnWkmdborzraff2SvOtvljOtjd/5XRW8MivOsry/K3gUzrFPS1eFTOttTsul1+lLGdbV3c53h51mdbK7xPOr1SpnWlM63kedZnV4XPK86onnW7myrnWTmRTOqascoabXd/L+yuzS95dv1efjhl92ntYyTuIb6wuWRZFmWRa//PkZOcb/gqMACDf1LTLofggA9qc/gKRZiblqWYm3E24moSQnR9BJj6JwfBaFqWZZFoWvLUshNPxNuWn6bTZHgozRTSaNAY5oGjFQVgTkE6FUVorioK8VBXBO8VRUioAhxVioK4qAnIrYrCqKsVRVBORXBORVFcVcVwTgVBUBORUisK4rCoKwrxXFYE4FYVATjFcVhX4rcVBVFQV4rxVFSKwqCpFcV+K8VhXFYV4qivFUE4FaCdivBORUBOfBOgToE6FUVYqisKgqCtxWFbFQVxXisKgqRU4qioKuKwqCvxVBkH/4Mgf4Rg4RgfgxZBizhFYEVuDFvhFbBi3CKyEVsGLf/4MgAxaDFoGsWYMWgaxYBrFngxaDFnCKwIrAYswNas+DFgRWYGtWYMWBFZgxbgaxbgxZCKwGLIRWgxZCK2EVmDFmDFgMW4GtW8IrAYtBi3Bi0GLAYsCK0IrQit4MWeEVgRW+DFsI9cDW9AYtgxZhFaBrVgMWgxaDFvCKwIrIGtWhFaBrFuEVvBi3hFZA1i0IrYMWYMWAxaEVkGLAisCKzBizCK0DWrIRg+EYIRgQjABkHwODABkDhGDwODBgyAEYIRoRvww4YcKILYKILfhRg5htjY4OQbQ2hNAH8su//PkZP8cRgjWAFAUYjwDofQAi9pcJry1E1LUsuWvE2E0LQTcB+E2LMTctQFEEcWnFYVwTkAI4rRWFYE6BOhWwToBBAQgnIrisETANwIiAb/COEQEbgG+EcA38A3wjhGCMEeEaEeKoJwK4J2KoARBVBOIJ1FWKoJ0CcCuCdRWFcV4rioK4rAnYJ2K0V8VYr8E4xWFUVBVFQE6FXBORWFSKorxVFcVwToE5wTvBOoqwToVIJziuKwJxAQgnUVBUgnAqQCaCdxWirFaKwrRWFcE7FfFeK4rgnIrAnYrCoKoqgnAqCrip4qgnCr/////8Iu8BjvP4Ry5/8Izggc4Zw4RnD/hGcP8GThBk4eDJwgycIMnDwjOD4MnBA3eu9hF3kGO8gx3vBjvAN3jvMGO8CLvAY72DHeAbvXe+DHehF3kGO8gbvHeBF3oG713gG713vgx3oMd5BjvAi7wGO9A3eu8BjvMDd470Iu9wN3jvQY7wGO9wN3jvIRd4Bu9d6Bu9d6DHeAbvHewi7yEXecGO9BjvQN3rvIG7zykGO9A3eO9CLvYMd6EXegx3gG7x3kDd470Dd472DHewY7yDHeAKomwmhZFkAof8tCy4m5aCbcTUswFYsy0/LQTX9NBqBgJgYaY//PkZPcaTdCuAFgWlkI0DfQAe9r8Jxz6CShr8++JsArgjxNBNC0LQsyyLMsgRxallyyLIsi0LUTUtS0AVwFPia8si0LMTXiacsxNizLMTYTcsi1LMsy0E2LUsuJqJvxNyy/E1LMteWgm4mpZlkJuWRZFmWnLQTfgncVATkVcVQTsVIqQToVxWFeK4rwTmATCsCcAnQJyKoriqKwrxWiqKoqwToVRWBORWBOBVFSKgq4qAnAqAnArRVgnIJ3FYVQAgCriqK4qYqivBOsVoJwKgJ3FYVBWFfBOIqCoCcivipxUFSCd4qRV4rCvFaCc/BOhW8VxWFUVhX4r1eX/+DHgaYMOEX/CJgwwYQY8GODH/wYf4RAiQiAxCKBj4GAMYRQiwYcGEGMIoMfhECIBgEXAwCJhEA1BjhF+BhCIDEGARYGoRAYgxCLwYeESEUGMDEIoGAMAiAwBiBrCJ8GMGGEWEUGIRYMAYAxCKBiBgBqDDA1wiBEBiDAIsGIMANANMIoMAYhEBh4GMGMGARfAxBj8GAMANYRAYBFAwCIBhgYhEwNQMYGIRAMAiwNYRQi4RQYwYgahEBiBqBgESEUIqa6Z6bTBpGkmUwmkwaZpJlNCkifmkaaaBymgm0wmRPxSDTTa//PkZOYYTgboZUAQIkCEFgAAe898YTZpJtMJhNilphNdMJhMGgmemDSNJNmkaX6aNJN9MJhMc0E2mzSNJMpg0umU2mDS5oJlNJtNJnpg0DSTBoml0wmzTE8TRpGgm00mkzzRNNMJg0jQTSb/NFNdNGl02KTzRTfTPTSbTKZNLphNJpNmgmUymkwaaaTKZ/TSYTBoJr/ifptMpr9MJlNptMpg0kymumEwmf+mEwmOmkymTT5ppv80eaHTCYTHTSaNBNJtN80/0yaBoJo0k2aPTPNA0OaSaTJoplMJv9MgBAB4MBUGwbwVwUBkFAYDAU4NBoMBqhAELk//h/y1/vz6/6zMnEglwqnIsVSHBzAMMIqXiLgxS8ucoLCKl7VwipeupwYpeAxS8Z22hSl4U+qE1L2goKUva1GUJqXqwkpeAxS81IQpS8smBqXql6E1LyEVLxdEJqXoSUvAmpeJhFS8rpH3CKl6EVLxPWFKXgDUvVL1LCal4kuDFL2EVLxFlPClLyEVL2FKXhdwYpeswGpeqXkGKXqLAxS8wYpeqWk8KUvATUvQYpehJS9Bil6yoUpegipeZT2x1vN5NR2X3KrRuXjFmaS0AUCyE1BHflmWZacTYsvy05ZgAIs+WQCqJoWZ//PkZOwZ+gaYBgbm6EQMAfQAe9r8ZCbiaFkWv5ZibialoArlryyDtCSnyfR8hrE7PpNmiaIxDTGKafTJalqJoJoWQm4mnLUtSzE1LUsxNyy4mpZlqJpy14mgD8WpagKvLIEcJuWnLItBNhNhNxNgH8tSyLMTflmA/iaCaFqJqWf4mxZFmCdCvFWKwqivgnQJzFfwToAIwqgnOKgqCoK4J2KwqisKwJwKwqCqKgJwK4rYqirgnIJ2K8VhVwTmKorYrioK4JwKwrRWFQE5FUE6BOwTgV4qYqiuCdAnYqAnMVBVFUVATkVBVirioKoqCviuK8VwTjxWFfivFUVxXBOcVuKvFaKoqiuCdeEW3Bjb/gxvhFvCLYGN8GNwi3CLf8DbtuEW//CM7+DG+EW+DG8DbNgi3CLfA2zYItwY3gbZuDG8GT/Bk+DJ+DJ/hGdCM+EZwMnQZP8GT8GToRngc6dBk4IzwZOBk8GTvhGdBk+DG8Dbt8DbtgY2CLbBjYGNwi2A2zYDbN4RbhFtA2zcDbNwNu3CLaEW4RbeEW2DG8DbNwY3BjYDbNgY3A2zYItwi3CLbgbdvA27YGN/CLaDG4RbgxsDG4Rb8ItsI7oR3cGb00m0wmTT6aTZoJgUpMc0kwaa//PkZNcYqeLUAAAUHjw8DgQAe88cYTXTXNBpXiQdfLVpLJoaCSJs0TQNAbRpJpDWleaGlDmlfQ9fQ7tBZoa0IeOw3Ccq44TcHgrufDVzQNA0Om0wmDTNE0EymkymumU2mU0aSY6ZE8NFMmiaaYNDptMGn+aJpdNptNps0OmU0J50wNtMGmmEz/zQTJpppNplMJlM9M8FAYCoKAAApgqDIMACwAQbBsAMGQAQaCkGg0GgyCkGeCgNABwAAUgrwA+CoAQNAeHCAOAeAyIQHBwgDg4QYDAGgMEEOEAeA0Q4DxAHh0PEMGYMBsFQYDPgoDMGQV4NBqryAZfhGfwjMDl4Rv/wjcGT/4R/CPBH//hH4H3gzv4M7A+/gzoR4GdBnAf+DPBnwj4M7BnwivA1QIpCKcIpgaqDFgaqBogMWBqgGqgxQinA0XBi8IqEUCKBFcD7/CPwj0I+DPA/8GfBnQZ8I+EeCPwZ4R6EfhGcI0GSDIDJCNCMBkgdsIwGQDkBk4HIEZgy4RoHZwZQjcDtCMgcoRgRoRgHKDJBl4RgHIDKDIEYEaEZgyYMoRsIwGQGQIwGUGUI3A5AZMI2EaDLBlwjQZQjAjAZQoqIqqN+pypx/qNIqoqqNKNKcqchwGrCAPqN//PkZOsaCgjiBUZRnkhEBfAgw9tw+iu1RUqp2qNUNalOVG1GkV/U58sLU48sLLCiwFU4hAYA+qQQgasVhVIYQNWKwmAKpvasNoHIDm4OQHIDlGwNgbH4D+JuWQm4mhZFoJsWgm4I4TcbA2xtA5ODnGyNoHJ+NgHKDl/LMBXLUtS04mvLQteAqCaCbFoWQmha8bQ2Acg2ht8bI2RsjaGyNrjYGwNvjbByja/GxFYE4ipBOIrwTiK4J2KuK8BAK4rAnAJwKkE4FYE7FUVgEIqgIRVBO4qRXFQVBVBOMVwCcE5itBOoqAnQqCpBOIrxVBOoJ0KwJxgnQrCuKsVBXioCcCqCdAnYJyKsVYqipBOgjwiAj/8InhH4RMIkIioAC4RiJCMRP////CNk//Blkv4M6F8I9C/8GWT/8I2SwjZOEbJQZZIGWShGyYMsnwj0P///CPQ/hGyQRsn8I2SCNkgOyVkoMsnhGyQMslCNkoMsl4MsnhGyXCNk4MsmEbJ/wZZP8I2SA7JWTgyyQMiKDIieEYiAcRIihGIkIxFwZEUIxEA4iREgcRYihGIoHESIkDiJEUIxFwjEQIxEwZEWDIihGIoRiKEYiHcYJRIr9kzDmO5cIaApXE/NA0TTTKZGym/0//PkZMQWjdCsAwAWCsQ8Cfwoe89cyaXTKZACgKxsmybQFQCyPQPUbRtA9x6QAoegHKmRtClpk0RSkwaCYE/GyaaZ6ZFJTaaTCbTabTBomgmk2mxS0x0waSaTI2gcgOcT0T5MiedM9M9NCfCeGgNhMJlNJoT1MdNJhMjaNPptNGkmhtpnmgmv+KQmRSE0aaY6ZTKZTRoJg0U0aBopg0emU1/xPzTTaa5o80DRTZoJs0TRNEUhMikJs0P0x0wmkwmUymkwaKb5pppNJg0OaInhpGgmeaSbTBp9N/ptNJo0DTNAbOCkGAwGABgA4NgwAAAMAPBgAQKAyDAZgoCkFINAABWAEDAUBTAABgMBTgqACDcGAAQYDAUqLUlVt///+Bj4MIRcGH/hE//hEwY/wi8GPBj8GH8IgRcIv4RYMQi+DAIsIsIn8GHCLCJCJ/BhBgBpgwwifhFhEhF/gwCIDAGIMIMAMQYBFhFBgDH4GAMQiQNAYAwwYBECIAMIAMAAiHBgAMIAiAIg4MABgABhADAhEAGAARCBhCEQhEIMABh6EQAwIMABgCEQwMAQYD4MDCIcGACIQiHwYGDAhEOEQ4MAENB8hJD7PsnXJ0fZ98+D6LItQR3PgnZHmgPYYRopk0xj//PkZMkU/gLsKkITrkL0CfzIetvgJtNdNGkmkwCPLITf8s+WpaFmApAjgFUsyz49jSTCaGMmkyaRZlkJsWpaiagKBZlmWomh8c+CdcnROj4Pk+Akh9E6DsJ0fJ8c+OTs+idk4J2Tg+j7Pr8nB9nwfAa59k7598+D74Sk+eEkFQdDmKsOhwBEVYCeAiAmAiHcBEV4CYCIWmCHF6FqC0haRcF4XYvxfF2LwvC+FqC0xcC0C/FwLSFoF0XBfi7C0xei8LwvcLQLoWoXheC0BaIWoXBdiNiMY6cZ8RkZxnjqOojAz4zx0HUdBGozjoMw6iMjpxdi+L4uC5F/xd/haIui/bZ/+DGBp4RYMQYgw8Ivgw/CJ4RfBh/hECKBgEUGODH8InhFwY4GoMcIgRIMcInCIBrBhCIESESBp+DEGARfhEA1gxBjBj4RAYQYgxgYwiYRcIgMAiAwBjCJgYAawYYRQMQMAYhFgagYhEA0AxA1A1CJBhBgEXwMQNAihFhFAxwYAwgaYMPCJA1hEBiBrwYQiwYwiBFwYhFgxgawihFCLA0gYAwCKESBoBpCJ4MIRcGOEVB9ALR8BJj7/PonB9HyEoJwfZ9E4Dt5OeTnlqJtxNAH7nwfHPonJ8E759E6PoJI//PkZOAWKgjoZUAQYka0Ffgge9VcfZOCdE7J0To+Cc8JWTo+D7J0EqPoO0+T5PsJSfJ9n0TkJUfJOeTknPPo+z6J2Ts+ycE759/k7Pg+z5J2TonBOeTkJUTg+T5DtJ0Tvk5Pjk5DXPg+idH2HYfR9E6PgnR9k5JyfZ9cnR9cNYJSfROidE6Ps+Cdn0fB8E6DtPs+CdHwfH5OAlR8nyfB98+SdE4J0ff5OidH2TknfPkJMfYSg+Cd8+D6PsnP/JwTk++fYSQO0+D5J0fZ8HwTjn2AWDgdAL8ApALQCkO8GACwMgyAVBiAVhzwY4BeDIMgFMOh0ArDgc4BeAV4cgFsOhz/wP225HGw7wCsO4M8AqHP/+DEGQ7/8OgzgFoM4Bf4MhwO4BT4cDmHcGfDnw78GcVhUFTFXFeKoqYJ3isKuKkVgTsVoqCsKwrCoKsVQTqKorYWoXhfxeF/xdi58XOL4WmLnFYVQToE4FXiuK0VwTnFQVRVFcVhU4JzFfDgdhzBnDuHfALgyDAMQZBgGQCgBUAoDAMh3BkAsDMGcGAYgxBn+HAC0ArwCwMAS5adAry0yBSBfoFBVaKqKwVUVrRXUa9FUOEqVUjV3ySPLkvkzlNlNn02E2S06pvVKWACECpW//PkZN8VDgj+zymq5krb1ewAxJvkqe1XysDVFSqlVIo2o0ispyFVoqKNIrKcqNKcKcFhSjaKiKyKhYWiv6nCnCKijajSnPorKNKcKcqcIrqNoqKNqcKNoqKNKNqNKcIqKN//orf6BSbKbKBSBXlp0CvQKTYTZ/0C/LTxFxFoigioigCLC4cRYRWItEXC4cRcI0IoFwwXCiKwjQXC8LhRFcRcRQRSFwoikRcLhxFRFguHiKRF8E7FYVhVBOgCYVRUACKKgqgE0E6ACJFYVoJ0CcgnQrAnMVwTgE6ioKoRwDdhHhG4RARgDcCMEaEYIiAbwRIRuESEcIwRwiYRwjQjBEgWoFuBa4FngWkIQQigwhEwigx/CL/4RfCKEQGP/wYiEUwYHwYGDAwYAGA4RCEQBEGB0rCNcGU4RrBlcIsGGDCESBiEWDCBhCIEWBiDAGHCKEUGEGEGMIgMAiwigxCIDADQGIRfCIEQDXgYYRfBgBoESEXwY/CJCKEQIsGIRODEGIRQYgw8IgRYMMGAGGDEDGDAIoMcDQIkGMGGBrgwCKDAIsIkDUDWDGDDA1hE4RQMQYgwBhhFBhBh4MAMYRMIoRAiAxBjhF4mhZFpxNBNy0LQTUTXhKglR9FqWpaAP5Zi//PkZNYXkgTkGEJwlkXcDfQAe9r8bCa/k5JwTriacsizBHE6CSH1w7efHLPgjuJqWnLITYTX8tRNAH/ialqJuJuWZaFkCO4m5aE7J2TonB8E559nyEnJyfB8FmJrxNxNhNS1E3LT8sxNC0E0LTlqJuWQm3E15ZiaFqWRZiaCagP5aCblkKoqCsCdioKoqwToE6FcVwAhRWBOIrCpFbgnEVRVFUVIJ2K4rAnIqioKgrcV4riuK0E4FcVQTsVxUBOoJ3FUE7itFYE7FYVRXFUVwTkVoqAnYJxBO4rReF4XYWsLWLoui4LwuC9AdsLQL0LQA9C8Lgvi6LguBahfFwXAtIvQQ4vCqKwrxX/8E5xXit4JwKzBnwj+DF+F1guvBiQYkDRIR8I/gz8Gd4R/wYsGLBi8I8DPBneDPBnwZ/8I8DP8I8B/0Gd+DPA+8I/+Ef+DOgzvwj4R/hHoM+Ee4M4D74M+Ef/A/7gfcDPBn4R7BnfCPgz4M7Bngf8DPwjwR6B/3CPwj0Gfgz+EfBnhH8GfwioRQGIBqgRUDVAYoGiBFcIoBqoMWEUA1UDRYRUIqEUA1WBooGiAaqBogRUGJwigM8I/gz+DOCPwj/Bnwj3BnBHgZ4M4I+DOhHhNCz5aiaCb//PkZM0YugrgAAASBEUEBfQAe9rclmWompZ8shNyzLMsy1LMBUAfhNxNicBJCcE5J0JpyyLMTcBVLXloCO5aCagKACiAqflqWYmvE3E3BHlmArFnxNRNC1LUBS5aFoWhZFmWR8k5CTnxz4PonZ8E5Pg+j4LUshNQH4TYtSzLMshNBNhNSyAViyE0FQE4FYVoJ0CcRUgnYqisKoJxFWAhiuKgrCtFUE7FQE5iqKgqRVFWKorwTsVxVFYE7FTFTBOxVgnAqRXBOPisK4BOK0VoriuK0E5BOxUivFcE5FYE5FQVBXFQE6FQVBVFYVxWioCcCoLovi4LoWiL0LSL+LouBaIvBahdi6LoWgEMFoC1hacXxdC14uipiqKn8VPFbiqKsVb//Bm/+EXgx4RdhFb///hE1/8GLP//CKwIrQjoGa/wPewZqEdYM1wZqDNAetgzWEd8GagzYM2DN4M1wjoI7Bm+DNhHcD3rA9awZuEdwZvCOwjsGaA964M1A978I7hHQR0DNge98I6hHYR1wZrBmwPWgPWwZsI7wjqB63COvgzQR3BmwZsGaget8D3rCOgZoGa4R1gzYM0EdwZsI6CO+DN4R1wZsD3oGaBmwjqEdAzXCO/4R0DNAzYR0WgI8TQT//PkZL4XFgTcAE6Tekf8EfQAe9t8YTXiagKwCsJuWXLMTUtC1LMTT8TYTUJP+fAdomomoD8JuWoCgWoI7iaFkJqJqfZ8hrk4CSE5Pk+Cdk5PgnBOT7JwTg+uWZaiaCbcsgFAsy0LPlmJsWYmom5ZFmWpaibiaAjy15ZFkWQm5Zll+JsJqJvy1E0CThJz65OQlJ8H2TknZOT759k6J3z4PgTQTcsy0LITflmWfLUsiyLITYTcTT8syzLQsi0LMEcWZa8tSyE1LTibibFqWYI/8shNCyE1LQsy1LUTUBTLLloWXLUsiyLUtBN+JqJvy1E05Z8TcsxNeWn/LTnxydHwfZ9n1ydk4PsnHJyfR9E4JwTgnB8k4588nB9cnR8c+D7PjxV4q4r8VsVgTgE4/itFShX/xV4rirxVFWKoq4qfxX8E6xVxUBOYrCtwTvwTj/xV8E5/irBOsVuKwqRXFTFQVorCrFf/xWioKwrCtioCcxUFUVAToE4FUVxWFQVhUBO4rgnUVIJyKkVgToE4ipFUVoq4qisKsE64qCoCdxUFUVxXFUE78VxWFQV4qiuKgqiuK4CCK2KoqirBOATsE4FWK4qxVFUVhVFYE4gnIriuCcQTiK4rCoCdCtirBORUiqK2//PkZLAWsgzuADQNNkZj/fjIe9r8K/FXFUVwSE5aiaAKgmhaFpxNQkp8n3z5PsJOGsffLQsyyE1LItS1E1Af+CPLMTUTfibFmJoWQmxanzydHwTsnASknBaCalqWom5ZcsxNyc8nASsnHDt59BrhJgkpOicBKg7D7JyfZ8E5Pk+Cd8EeWXE0LQsiyLQtSyLIsi0LUTYsy0E3LITQshNiyLUsiy4I78shNy0LMVcE6ipgnArRVgncE4wTsVIrCqCcCtBOYrwTgE7iuKwqCoKwrcE7BOQTqKgqiqFpBEC1gPYD3F0X4WoLTF0Xxei6FqC0BaAtQWgXxdwtWFqC0haBW/FQVRUBOBUFcE6ioCcAnEVRX4rYrxWFUVBViuLsXgtAuC6FoBDBaYvi7F8XxexdF8XhcFyI//gx//CJBhgxhEwY/+EXwYgx8ImDH8GPhE8GPhEwigwhFwNQNQNfhE+DGDAGHCIBrhEhEBh4RQMAY/gYBFBhhEAxCIDCEUDEDHBiEUIoRQY+DCBp4McGEIgGgMcGIGMGIGIGgRQYgxCKBiBjBgDGESDADWBgEUDEIuDADWBpBiEUDEDDgYgwBgDEDQDUGIGgRAYQYAxCKBhCKEThEBgBiEUGIRQMQiQiwNAY//PkZKwWNgjoZUAQREakFfQAe9t8YMfwi4GBaFoJsWpaFlyyBHctCzE25ZiaFoAocsy1E24Sk+idk6LMTYTYTQsyyLUtCyLQTUswFYJMGuTg+CdHwErPotAFAsuJtxNCz4m4mvBHiafloWZZ8YppBqzTNI0jTNBMpg0jTTZZFqWfE3Af/xNf+WomhZ8suWZZCb8tC1LQtS14m/LQtBNhNOfR8hKCc8nHJ2EqCUE5CSHxydk6Pg+D7Ps+Sdk6LUTQTcTcTctSz4mwmha8TXlmJvyy5ZiaFl+WpZFoWZa8TQshNCz4mhalmJsWfLQsuWRactBNRNC1E1LLlly0E2PgJWfR8h2H2fJOSdnx+fXPs+T5PgNbnzz6Po+T7JwTk+z4PonROglJ84qCvxXxUirFX4q4qeCd1f8InCI/4R/CP//4RMI/CMEYI4RAR8I8IjCJ4REI/gG8ESEfCOERCP4R/+EaERCPCNCNCI4BvQjYRMHINobIOfjZBzDZG3xtja42gcw2PwcvG2Nng5+NgbY2wcn42htDYGwNrjYGwNsbX42vxscbI2gc3Bzg5Qcg2uNvjaGwNgbI2+Dl4OUbI2Qc42RsjbBy//g5eAboR4RwjQDeCP+EcI8IwBuwjwjBEBEA//PkZKoZMgrqADXt9EV8FfQAe9scG+EThEBGCMESESEbhEQjwjwjwjBHCIwiQDcCNCI/hHE0/LQBSLITf/lqWoSvk7LT8BWLMtRNAk58E7Po+CyLQTcsyyLUsi0Afi1LUTUTUtBNS05aFkWpZHzwkoSgnB9HwfQSsTYsizLQtRNRNgFf/8NcJWEmAWCdn0To+T4CUHyGtxNiyLT/lmJqJqJqWgmpZFqJsWgmwmwmwmv5ZiaibiactBNv/yyLTiaFkWZagKgCmJqWQmgmom3E0LTibAKfE0LLiuKgrYqipBO4JzFUE5BORXBOhVioKwqRWBOYJyKkE6BOIrYqCqCcxVxVFUV8E4FSCdcVgAgCuKkLTBDC6CHi+LwuRfha4uC+FpF8XQtAWgB2wtAWoXBchaBfwtQWnFSCdxVxXFUVhUFYV4rgnOK3wTiKir//1eDCsf//7/+wOYd///ei/f6lmiqGXpyOlCSRm+yP3UtDhFIzqBhwCFHAGFHABYGcAnAAMOAAYcAAw4BYKOAIROANgicAQYcABE4AAzgE4B+1wmcAwYcAK+sDOADgFLCJwAlWBnABwABnABwDWraETgEDOADgDBiRkgoJpGaP+64RSMoRSMGBiRkkwMSMlq7AxIy4//PkZJUYEgieBFw3fkL8FgAied8AROAAicA8DOATgAGHAAROAFwM4BOAGBhwADDgAGHANQUcAgicAYROAfgw4AIkbPNNNpo0TSNBNJgUs0l7lomEwmRSOaRp80zQFK4nvTInnTEGgwGwAwYmOmkyaInppJpMJg0k1+KUaaaTCb42U0mBsGiaSaNNNpo0OaKZNE0jTTSY5oGmaZpJrphM9MGkmDQTCZBzpg0OKR+mBtdMJobfTSbTfG2KSaBpGgaZomiaBomn02mOmkwmjSNPpjmmaKZNA0zSNFNCeClJkT40DTTCY5oJk0kyaJpdMppMdMdN80TR6ZTXTfNJNmimumem+aKZTKaTaaTRops0kwaZppk0+aSa6ZTKYTfTfTPTHTKa5omgmEyaJo9NmkaRp/pnmmaf6aNNMplMplMdMpv8TxMJlNplNJn9MdM1OM6hWa/EjiRiRiO/xIcSP+GgCZQ1+GvDRDV//4aP///4I8EwTwTBLwS/4AHgnBHBHgiwR4JgAgS4IwAYPA8ADg+AAAAFwfB4L4WADC2AGAGFwsFwuD2FgAcAPC+F/B8L4X/B7B4L4WwuD+AGDwXACAAC2D2AEFgfCwAAAAXB8LhcLeDwXCwPYPA+ACACD+AH4XwA//PkZJMVIgb2ejVLxkBMEgTIe898vwv4X/ACB/C4WwtgBg/gA4PA9gBeFhLRTXTRomkmP0yJ6J+mPy0NA0OvibNDQmfzTNNMjaFKNATxMiemiaRoGkmE2mkwmTRTHNBMGiaCZTSZTZomh0PaV9fX2hoX14kzSmOaCY5pJr80U0aPTfNFMps0jSNJMmiaSaTKb6aTKYNLphMpg0eaJoGkJ8aBoppMppMJg00xzTTabNFNJpNJpNpnpg0DT6bTRoppoJMWrSh/690NQ5paV5D2le/LND2hoQxDF/rzR1/r/aWhfaWleQxfXmheaevNDS0tLQ0ryGoch/X15D+vLy+0oc0ry/19DUOXuvIc0oav9oXkNX1/r3X18QCGHQGQHB8PiAPAaHgPDsBgcH+Hqv//+DJ0GNuEW4MbQY2wZO4Rn///4R34R3Qjv//8Gbv//8GbgZuwZvCO4GbsD37+Ed3A586DJ4Rn8DnToRn8GTsGT8GToRn4HOngyf4HOnBGeDJ0IzgjOCM8DnTwjOgydwOdP4RnYMncDbtwY2A27cItgNs3CLeDGwMbwY3CLaEWwRbQi3A27eDG0GN4G2bBFvA2zcItgY3A27YGN4G2bAxtA58/gc6eDJwHOnAyfCM7A588//PkZLMYngTSAFAUhEYcDfggw9V8DnzwOdOBk8IzuEZ4MnAyfgychsy7F3oE13Nl9sy7myrsL6qqOU5anCqkHqNDI3KVUTEU8GNU7U6gxyHKchyVV/Xa2Zspfds3rubK2VsjZmztk9djZi/TZV2NnXYu0vsm0yaBoDZNEbA2k0aKZNjmwbH/Nvm2bRtGyBVArD1G0bQPUevg9h6/+PRzZNkCrzZNgesegesermyPQPXzbHpNvm0PQPUPSbJs82TaHqAtj082h6DaNn8eo2DbHrHpNjj1m1zYHqNo2jYNnmwbPNgek2ja5sj0D1m0bJs80xtJlMdMCeps0U0meaaa6b5p/mmmU3zRTfNFN/pgHPzQNPmkaaaTXTKbTRoJk0zS6b/NBNdNJlNGj02aH6Z4IgAEEYJ4I+CMEQJcEUEXBOpHDX/w1Q0Q1Q1cNWGvw0Q0/hp/AmIaA0cCYhow0w1/w0hoDRhpw1w1BrgTLDXw1BrhrDQGgNQEzAmOGuGiGgNfgTHDQGoCZw1w0BrDWBMIEzDVDTDUGgNfAFwGjBrg1A1YNcGsAXAaQaABcBqg1g1QagaINYaoEyw1Bow1YaA1hoDSBMw1gTICYQJkGrDQGoNGGmGsNcNQawJkGuBM4aIa//PkZKAYngTsATQNQkKMFgDifh7AYagJkGsCZ+GkNWGiGsNAaYaOGgCYgTENQaw0Yaw1Q1Q0/hqw1BkAfmkaCb6ZTCY6bNBNLwmqGA5fzSTCb/lgwXOmMmMmTQ5pmkmUwmkymfzRTaZFJ6aNM002NrppMpg0kwKQmE2m0yKUaKaE95o9MJj9N9NJk0UymOaSaE/TabNNNmmmk2mU2aHTKZTCaNDjaTJoGimkyNvpk0TRTHTf6bTRopg001+mU0aXNBMjYNA0k2mjR5pfps0U100mUz0ym02mDRTHTaaTRpplMc0kz0ySA000mDSTKbNI002mzQTHTaYTf//NA0zQTBodNJk0UyKSaaZNJMprmkaP5oGmKUmEymUyaCbTHNBMJlN80DRNBMmkm/00mUwaZpprplNpvmiaJo80+aSa//TaY/6ZaH//wY4ReEX4RIMfwiAxBh/BhCJ/+ESDDwYcIn+EQIoMAiQYAw8IsGIGGETBj4MP4MQiAxhEAwAxAxBjBiEUIgMIMcDCDAGIMcGMDEGGBgEUDTwNfAx4MAiwiQYgwBgEUIgMIRAiQYhFwYAwBhA1CKDEIoGoGgMQi4MeDADGEQIkIgGMDCDAIoMAiQiAYwYYMQNQigwCJBiDEGAR//PkZJwV+gzoZUAQRkZsCfQAe9tcQYgx8GEGIMQiwMAY4MANAMcIoMSyE1E1/LMTUtCz5OD5PkJJz5Pk+uA/FqWRaib8TUTUTQtC05alqWYm4momgI8TYsxNCzE3LUtQFEsgFM+z6J0fB8nz+TsNcnB9BK+Tk+g7CdhJT6LTiaFqWYI7lqWoCvy05ZlnxNy0/LUshNBNvwR4moCj+Wv5ZlkJqWpalkCOE1E1LQsiyLITUBULLlqWZZlmJsWhZcsi1/4CiWpalkJqJuWvLXlkJsJpyy4mwm5ZlmJuWXLUTQteWgmgmwCsJoWfE3LMsiyLP8TTlkJuAolqJryzE1LTibCbloJuWhZFoWYmxZ8TcXIvxeC0i+FrF0B2i4L8LSL4uBaIDyCHF8XRfF6FqgiwtIuYWoXIrYqAncVvxVip8VIqCvUxPqtFbFf/4q/8V/8V/iririr8VATjxXipxWgnYq+KwqfFTFQVoq+KsVBW8VhUisKuK0VRXivFYE4FTBOhVFcVRV4riuCdCuCdCtwTiCcCqCcgnYqxWFcVIJwKsVxWisK8VxVgnArYqRWFeK0V4qgnQrgnYrfBOoqAnAq4J0CciqKviuK3BOoJyKsE4FUVoqisK2KwrAnArgBAFSK4//PkZJ0VagjyJgGtbkOkFfwAbh4AqRViuK4J0KgrCrFUVxVjOEeDQgjlcT4T40xtjaNI0uaI2QciGNJIl4kJZtCGIaSckIm6GL3TQ2zRTY2UwmjSNE0fxS02aY2BsJs0/+mzSE8TQpHTKZTaaG0aQpApZp/mmm+aHTfTCZGwNgUk0E0aRp/ilJlNJgT5MmkJ9zQNA0TQTH6ZG2mk0mk0mk3zQTKY/G3zQTHTabTBpGgmU0aKaTJpJpNJtMphNjYTfNE0emkymE2mEyaCbNBNfmkaJpdNJnpg0k0mDTTCbTaZTBp80k2aCbTfNE00yaCb6bTZoplMmmaKZTKaTJpmiaHTXNJNdMDbTab6Y6Z6ZNNMJhMJhN9NJrmim02m0ymU300aPTSa6Y//5pJpNdN/9NppxWxU4Jx/xWxU/xU4qcV/ipiuKwqxWFbioK/8VIqivFTwTkVgTkVor4JxFXxX8VcVxUFQE4FaCcwTvBOIqwToVuKwqCtFUVYqxXxWFeK0E7FQVYrwTnwTsV4rCqCcfFaCcRVFQE5gnAr4JyK4r4Jz4J0Koqip4rCvisKoJ3xWBOME7iuKgriuKgrAnAqgnArxXiqCcgnYJzFQVQTmAEIVYrwToAIYrwTiKkVQTkE5//PkZK4XGgzsADQNAkIcCfwAe898FXFTFYVxXxUFQVkzzS5oilg5TTTY2kyaJpJtNGgJ8aKaTQ2k2aCaNI0eaSYNJM/tKHEiQxfJG09MmgaSYTRppg0TRNNMJlMptMCfppNprmiaA2jQNLmmaRppk0jRFLNP9NJhMGmaQpZpJhNCkGkmE0J+mxSk0m0x02mjRTKbTCZ42EwaQpJpptNprmgaRpmim00J4mzSNM0kymkyKWmE0muaKYGwNjmgafTPNE0U0mUwJ7+mem01+J8mhSk2mjRTSb6aTCbNBM9MpjpjppMpk0E2mE2mE2mjSTfTaZ6YNFMcT1MpnprptNmim0wmE100aSaTRo9MGjzTTHTaaTfTSaNLpoFMAAFYNBQGwAvwAYM4NgqqkjaAN3d3d3etERNK5CZ/3Ctf8AaiAc/u7vaIn/+8XPv//+GDKv8W1/+AC8K4Yw+94xe940jgceOBwOcRaxGwH4EuNIjBfxazB8HhkwVjIAII/vDkjG/wAcJPeF5e98hNgSYLWMFvhZ73pX06aoehpmh01hMJtM9K3TKY9E10x+memvlIpZM9MUTCbShbUrtM+n5ophNZuXK+0wmemumMCemkmvc0Uwm/lJJlLe5oJZI0SyW6R0mE//PkZLcXlgrzECFvrEmMEfgAfh7k2aORpbTYUo9SBNsekGYNVKgqg6hrUXK4Q42DOwPWbILEzBSumEgkWJPU8S72G5wUuGDwguEKa1Q0UykS3Bn7FJNgg5qoEgpsGabBtGabZt7NrKCNgLYes1idmabBtm2bZsBRm0PQbF9mwPSPUBbMwzB6QojYM42ePTzbMwzR6TaNs1eBVNv81yDUJ2QYhJtD0m0PVe+x6T2M8HsbFwsh6B6D7HpugT2uZhO6HqZhmE7ISZhhkFNcghtmybBnnsD1Ho49ZtG2bZs5PVBc2EEepCaEHNjj1EJHq5smabZtmwbNEEPR+bJse9z2PY2T1SN0rdNJq6yXI06COvNJj9MGmkkGmUj7pI0TToNGlEsNEnCW10ymi5FtNFKpvps0kz0uW3aaTF00mTSzdNJu0KFYz1KjaGAhyoQCFGM//zFARgIUZ/oZpdCttay6M5drW1joSj6Ekk1b7J7R7aoQNlPrWBKLTTzOsGT5yYxLrtHTy2iUxEkES0HIBVD066VjGj31odPkkSjJtbWs6OIjKmlXHR9K5MTv5pdZolE10kk2lly74TFx5KTXeTGLrS6ExiucvJSSDUdXZm3NLn1rtYBCUEoRj77WOhCPc+g5//PkZJ8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq`,YK={NotAllowedError:`permission-denied`,PermissionDeniedError:`permission-denied`,NotFoundError:`no-camera`,DevicesNotFoundError:`no-camera`,NotReadableError:`in-use`,TrackStartError:`in-use`,OverconstrainedError:`overconstrained`,ConstraintNotSatisfiedError:`overconstrained`,AbortError:`aborted`,SecurityError:`security`,TypeError:`type-error`};function XK(e){if(e instanceof DOMException||e instanceof Error){let t=e.name??``,n=e.message??String(e);return n.includes(`secure context`)?{kind:`insecure-context`,message:n,cause:e}:n.includes(`Stream API`)?{kind:`unsupported`,message:n,cause:e}:{kind:YK[t]??`unknown`,message:n,cause:e}}return{kind:`unknown`,message:typeof e==`string`?e:`Unknown scanner error`,cause:e}}var ZK=[];function QK(e){let{videoElementRef:t,onScan:n,onFound:r,onError:i,retryDelay:a=100,scanDelay:o=0,formats:s=ZK,allowMultiple:c=!1,sound:l=!0}=e,u=(0,L.useMemo)(()=>[...s].sort().join(`|`),[s]),d=(0,L.useRef)(null),f=(0,L.useRef)(null),p=(0,L.useRef)(null);typeof window<`u`&&d.current===null&&(d.current=new RG({formats:s})),(0,L.useEffect)(()=>{typeof window>`u`||(d.current=new RG({formats:s}))},[u]),(0,L.useEffect)(()=>{if(typeof window>`u`||!l){f.current=null;return}return f.current=new Audio(typeof l==`string`?l:JK),()=>{f.current?.pause(),f.current=null}},[l]);let m=(0,L.useCallback)(e=>async s=>{let u=d.current;if(t.current===null||t.current.readyState<=1||u===null)return;let{lastScan:h,contentBefore:g,lastScanHadContent:_}=e;if(s-h<a){p.current=window.requestAnimationFrame(m(e));return}let v;try{v=await u.detect(t.current)}catch(e){i?.(XK(e));return}let y=v.some(e=>!g.has(e.rawValue)),b=v.length>0,x=e.lastOnScan,S=s-x>=o;(y||c&&b&&S)&&(l&&f.current?.paused&&f.current.play().catch(e=>console.error(`Error playing the sound`,e)),x=s,n(v)),(b||_)&&r(v);let C=y?new Set(v.map(e=>e.rawValue)):g,w={lastScan:s,lastOnScan:x,lastScanHadContent:b,contentBefore:C};p.current=window.requestAnimationFrame(m(w))},[n,r,i,a,c,o,l]);return{startScanning:(0,L.useCallback)(()=>{if(typeof window>`u`)return;let e=performance.now(),t={lastScan:e,lastOnScan:e,contentBefore:new Set,lastScanHadContent:!1};p.current=window.requestAnimationFrame(m(t))},[m]),stopScanning:(0,L.useCallback)(()=>{p.current!==null&&(window.cancelAnimationFrame(p.current),p.current=null)},[])}}var $K={finder:!0,torch:!0,tracker:void 0,onOff:!1,zoom:!1},eq={facingMode:`environment`,width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},tq={container:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,aspectRatio:`1/1`},video:{width:`100%`,height:`100%`,objectFit:`cover`,overflow:`hidden`}},nq=e=>e instanceof Date,rq=e=>e==null,iq=e=>typeof e==`object`,aq=e=>!rq(e)&&!Array.isArray(e)&&iq(e)&&!nq(e),oq=e=>rq(e)||!iq(e);function sq(e,t){if(oq(e)||oq(t))return e===t;if(nq(e)&&nq(t))return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!sq(e[n],t[n]))return!1;return!0}if(!aq(e)||!aq(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;let o=new Set(a);for(let e of i){if(!o.has(e))return!1;if(e===`ref`)continue;let t=n[e],i=r[e],a=aq(t)&&aq(i),s=Array.isArray(t)&&Array.isArray(i),c=nq(t)&&nq(i);if(a||s||c){if(!sq(t,i))return!1}else if(t!==i)return!1}return!0}function cq(e){let{disabled:t=!1,className:n,style:r}=e;return(0,U.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:n,style:{stroke:t?`grey`:`yellow`,fill:`none`,strokeLinejoin:`round`,strokeLinecap:`round`,strokeWidth:1.5,...r},width:`28px`,height:`28px`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{d:`M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007`})})}function lq(e){let{disabled:t=!1,className:n,style:r}=e;return(0,U.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,className:n,style:{stroke:t?`grey`:`yellow`,fill:`none`,strokeLinejoin:`round`,strokeLinecap:`round`,strokeWidth:1.5,...r},width:`28px`,height:`28px`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,U.jsx)(`path`,{d:`M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z`}),(0,U.jsx)(`path`,{d:`M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z`})]})}var uq={bottom:85,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function dq(e){let{scanning:t,startScanning:n,stopScanning:r}=e,[i,a]=(0,L.useState)(!1),o=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>{o.current!==null&&clearTimeout(o.current)},[]);function s(){i||(a(!0),t?r():n(),o.current!==null&&clearTimeout(o.current),o.current=setTimeout(()=>{a(!1),o.current=null},1e3))}return(0,U.jsx)(`button`,{type:`button`,"aria-label":t?`Turn camera off`:`Turn camera on`,"aria-pressed":t,disabled:i,onClick:s,style:{...uq,cursor:i?`default`:`pointer`},children:t?(0,U.jsx)(cq,{disabled:i}):(0,U.jsx)(lq,{disabled:i})})}function fq(e){let{className:t,style:n}=e;return(0,U.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:n,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{strokeWidth:.2,stroke:`yellow`,fill:`yellow`,d:`M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z`})})}function pq(e){let{className:t,style:n}=e;return(0,U.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:n,xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{strokeWidth:.2,stroke:`yellow`,fill:`yellow`,d:`M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z`})})}var mq={bottom:35,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`};function hq(e){let{status:t,scanning:n,torchToggle:r}=e;return n?(0,U.jsx)(`button`,{type:`button`,"aria-label":t?`Turn flashlight off`:`Turn flashlight on`,"aria-pressed":t,onClick:()=>r(!t),style:mq,children:t?(0,U.jsx)(fq,{}):(0,U.jsx)(pq,{})}):null}function gq(e){let{className:t,disabled:n=!1,style:r}=e;return(0,U.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:{stroke:n?`grey`:`yellow`,fill:n?`grey`:`yellow`,...r},xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{strokeWidth:.3,d:`M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z`})})}function _q(e){let{className:t,disabled:n=!1,style:r}=e;return(0,U.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:`30px`,height:`30px`,viewBox:`0 0 24 24`,className:t,style:{stroke:n?`grey`:`yellow`,fill:n?`grey`:`yellow`,...r},xmlns:`http://www.w3.org/2000/svg`,children:(0,U.jsx)(`path`,{strokeWidth:.3,d:`M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z`})})}var vq={bottom:130,right:8,position:`absolute`,zIndex:2,background:`transparent`,border:0,padding:4,margin:0,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},yq={...vq,bottom:180};function bq(e){let{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t)return null;let a=n.step>0?n.step:1;function o(){r(Math.min(i+a,n.max))}function s(){r(Math.max(i-a,n.min))}let c=i<=n.min,l=i>=n.max;return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,disabled:c,onClick:s,style:{...vq,cursor:c?`default`:`pointer`},children:(0,U.jsx)(_q,{disabled:c})}),(0,U.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,disabled:l,onClick:o,style:{...yq,cursor:l?`default`:`pointer`},children:(0,U.jsx)(gq,{disabled:l})})]})}var xq={fullContainer:{width:`100%`,height:`100%`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`},innerContainer:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,position:`relative`},overlay:{position:`absolute`,top:0,right:0,bottom:0,left:0,pointerEvents:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`},borderBox:{position:`relative`,width:`70%`,aspectRatio:`1 / 1`,border:`2px dashed rgba(239, 68, 68, 0.4)`,borderRadius:`0.5rem`},cornerTopLeft:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,top:0,left:0,borderBottomColor:`transparent`,borderRightColor:`transparent`,borderTopLeftRadius:`0.5rem`},cornerTopRight:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,top:0,right:0,borderBottomColor:`transparent`,borderLeftColor:`transparent`,borderTopRightRadius:`0.5rem`},cornerBottomLeft:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,bottom:0,left:0,borderTopColor:`transparent`,borderRightColor:`transparent`,borderBottomLeftRadius:`0.5rem`},cornerBottomRight:{position:`absolute`,width:`15%`,height:`15%`,border:`4px solid #ef4444`,bottom:0,right:0,borderTopColor:`transparent`,borderLeftColor:`transparent`,borderBottomRightRadius:`0.5rem`}};function Sq(e){let{scanning:t,capabilities:n,onOff:r,torch:i,zoom:a,startScanning:o,stopScanning:s}=e;return(0,U.jsx)(`div`,{style:xq.fullContainer,children:(0,U.jsxs)(`div`,{style:xq.innerContainer,children:[(0,U.jsx)(`div`,{style:xq.overlay,children:(0,U.jsxs)(`div`,{style:xq.borderBox,children:[(0,U.jsx)(`div`,{style:xq.cornerTopLeft}),(0,U.jsx)(`div`,{style:xq.cornerTopRight}),(0,U.jsx)(`div`,{style:xq.cornerBottomLeft}),(0,U.jsx)(`div`,{style:xq.cornerBottomRight})]})}),r&&(0,U.jsx)(dq,{scanning:t,startScanning:o,stopScanning:s}),i&&n.torch&&(0,U.jsx)(hq,{scanning:t,status:i.status,torchToggle:i.toggle}),a&&n.zoom&&(0,U.jsx)(bq,{scanning:t,capabilities:n.zoom,value:a.value,onZoom:a.onChange})]})})}var Cq={position:`absolute`,width:`100%`,height:`100%`},wq={position:`absolute`,width:`100%`,height:`100%`},Tq={position:`absolute`,width:`100%`,height:`100%`};function Eq(e){if(e===null)return;let t=e.getContext(`2d`);t!==null&&t.clearRect(0,0,e.width,e.height)}function Dq(e,t,n,r){if(n===null||t===null)return;if(e.length===0||r===void 0){Eq(n);return}let i=t.offsetWidth,a=t.offsetHeight,o=t.videoWidth,s=t.videoHeight;if(o===0||s===0){Eq(n);return}let c=Math.max(i/o,a/s),l=o*c,u=s*c,d=l/o,f=u/s,p=(i-l)/2,m=(a-u)/2,h=({x:e,y:t})=>({x:Math.floor(e*d),y:Math.floor(t*f)}),g=({x:e,y:t})=>({x:Math.floor(e+p),y:Math.floor(t+m)}),_=e.map(e=>{let{boundingBox:t,cornerPoints:n}=e,{x:r,y:i}=g(h({x:t.x,y:t.y})),{x:a,y:o}=h({x:t.width,y:t.height});return{...e,cornerPoints:n.map(e=>g(h(e))),boundingBox:DOMRectReadOnly.fromRect({x:r,y:i,width:a,height:o})}});n.width=i,n.height=a;let v=n.getContext(`2d`);v!==null&&r(_,v)}var Oq=(0,L.forwardRef)(function(e,t){let{onScan:n,constraints:r,formats:i=[`any`],paused:a=!1,components:o,tracker:s,children:c,styles:l,classNames:u,allowMultiple:d,scanDelay:f,retryDelay:p,onError:m,sound:h,startTimeoutMs:g,settleDelayMs:_}=e,v=(0,L.useRef)(null),y=(0,L.useRef)(null),b=(0,L.useRef)(null),x=(0,L.useMemo)(()=>{let e={...eq,...r};return r?.deviceId&&delete e.facingMode,e},[r]),S=(0,L.useMemo)(()=>({...$K,...o}),[o]),C=s??S.tracker,[w,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(!1),[O,ee]=(0,L.useState)(x),te=qK({startTimeoutMs:g,settleDelayMs:_}),k=(0,L.useRef)(te),A=(0,L.useRef)(n),j=(0,L.useRef)(m),M=(0,L.useRef)(C);(0,L.useEffect)(()=>{k.current=te},[te]),(0,L.useEffect)(()=>{A.current=n},[n]),(0,L.useEffect)(()=>{j.current=m},[m]),(0,L.useEffect)(()=>{M.current=C},[C]);let ne=(0,L.useCallback)(e=>{A.current?.(e)},[]),re=(0,L.useCallback)(e=>{j.current?.(e)},[]),{startScanning:ie,stopScanning:ae}=QK({videoElementRef:v,onScan:ne,onFound:(0,L.useCallback)(e=>{Dq(e,v.current,b.current,M.current)},[]),onError:re,formats:i,retryDelay:p??(C===void 0?500:33),scanDelay:f,allowMultiple:d,sound:h});(0,L.useEffect)(()=>(T(!0),()=>{T(!1)}),[]),(0,L.useEffect)(()=>{sq(x,O)||ee(x)},[x,O]);let N=(0,L.useMemo)(()=>({constraints:O,shouldStream:w&&!a}),[O,w,a]),oe=(0,L.useCallback)(async()=>{let e=v.current,t=y.current;if(e===null||t===null)return;let n=t.getContext(`2d`);if(n!==null)try{N.shouldStream?(await k.current.stopCamera(),D(!1),await k.current.startCamera(e,{constraints:N.constraints}),D(!0)):(e.videoWidth>0&&e.videoHeight>0&&(t.width=e.videoWidth,t.height=e.videoHeight,n.drawImage(e,0,0,e.videoWidth,e.videoHeight)),await k.current.stopCamera(),D(!1))}catch(e){D(!1),j.current?.(XK(e))}},[N]);(0,L.useEffect)(()=>{oe()},[oe]);let se=(0,L.useMemo)(()=>N.shouldStream&&E,[N.shouldStream,E]);(0,L.useEffect)(()=>(se&&(Eq(y.current),Eq(b.current),ie()),()=>{ae()}),[se,ie,ae]),(0,L.useImperativeHandle)(t,()=>({getVideoElement:()=>v.current,getStream:()=>k.current.getStream()}),[]);let ce=(0,L.useMemo)(()=>({...tq.container,...l?.container}),[l?.container]),P=(0,L.useMemo)(()=>({...tq.video,...l?.video,visibility:a?`hidden`:`visible`}),[l?.video,a]),le=(0,L.useMemo)(()=>({...wq,display:a?`block`:`none`}),[a]);return(0,U.jsxs)(`div`,{style:ce,className:u?.container,children:[(0,U.jsx)(`video`,{ref:v,style:P,className:u?.video,autoPlay:!0,muted:!0,playsInline:!0}),(0,U.jsx)(`canvas`,{ref:y,style:le}),(0,U.jsx)(`canvas`,{ref:b,style:Tq}),(0,U.jsxs)(`div`,{style:Cq,children:[S.finder&&(0,U.jsx)(Sq,{scanning:E,capabilities:te.capabilities,onOff:S.onOff,zoom:S.zoom&&te.settings.zoom?{value:te.settings.zoom,onChange:async e=>{try{await te.updateConstraints({...O,advanced:[{zoom:e}]})}catch(e){j.current?.(XK(e))}}}:void 0,torch:S.torch?{status:te.settings.torch??!1,toggle:async e=>{try{await te.updateConstraints({...O,advanced:[{torch:e}]})}catch(e){j.current?.(XK(e))}}}:void 0,startScanning:async()=>await oe(),stopScanning:async()=>{try{await te.stopCamera(),Eq(b.current),D(!1)}catch(e){j.current?.(XK(e))}}}),c]})]})}),kq=(0,L.memo)(function(){let e=z(SI);return(0,L.useEffect)(()=>{let t,n=!1,r=``,i=null;function a(){r=``,n=!1}function o(){r=``,n=!0,t=window.setTimeout(a,3*1e3)}function s(){t&&=(clearTimeout(t),void 0),n=!1,e({type:`Barcode`,barcode:r,toQueue:null})}function c(e){e.key===`!`?i=Date.now():e.code===`F1`&&!n||e.key===`*`&&!n&&i!==null&&Date.now()-i<1e3?(o(),e.stopPropagation(),e.preventDefault()):n&&e.code===`Enter`?(s(),e.stopPropagation(),e.preventDefault()):n&&e.key&&e.key.length===1&&/[a-zA-Z0-9-|_,;]/.test(e.key)&&(r+=e.key,e.stopPropagation(),e.preventDefault())}return document.addEventListener(`keydown`,c,{capture:!0}),()=>document.removeEventListener(`keydown`,c)},[e]),null}),Aq=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),n=z(SI),[r,i]=(0,L.useState)(``);if(window.location.protocol!==`https:`)return null;function a(e){e.length>0&&e[0].rawValue!==null&&e[0].rawValue!==``&&(n({type:`Barcode`,barcode:e[0].rawValue,toQueue:null}),t(!1),i(``))}function o(){r!==``&&n({type:`Barcode`,barcode:r,toQueue:null}),t(!1),i(``)}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Dy,{open:e,onClose:()=>t(!1),children:[(0,U.jsx)(By,{children:`Scan a QR Code`}),(0,U.jsxs)(Ly,{children:[(0,U.jsx)(Y,{sx:{width:`15em`,height:`15em`},children:e?(0,U.jsx)(Oq,{onScan:a}):void 0}),(0,U.jsx)(Y,{sx:{marginTop:`1em`},children:(0,U.jsx)(lT,{label:`Manual Entry`,value:r,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>i(e.target.value)})})]}),(0,U.jsxs)(jy,{children:[r===``?void 0:(0,U.jsx)(X,{onClick:o,children:`Submit`}),(0,U.jsx)(X,{onClick:()=>t(!1),children:`Cancel`})]})]}),(0,U.jsx)(tw,{title:`Scan QR Code`,children:(0,U.jsx)($m,{onClick:()=>t(!0),size:`large`,children:(0,U.jsx)(kT,{})})})]})}),jq=P(null),Mq=(0,L.memo)(function(){let[e,t]=B(jq),[n,r]=(0,L.useState)(``),i=z(SI);function a(n){e!==null&&n.length>0&&n[0].rawValue!==null&&n[0].rawValue!==``&&(i({type:`Barcode`,barcode:n[0].rawValue,toQueue:e}),t(null),r(``))}function o(){n!==``&&e!==null&&i({type:`Barcode`,barcode:n,toQueue:e}),t(null),r(``)}return(0,U.jsxs)(Dy,{open:e!==null,onClose:()=>t(null),maxWidth:`md`,children:[(0,U.jsxs)(By,{children:[`Scan a Barcode To Add To `,e]}),(0,U.jsxs)(Ly,{children:[window.location.protocol===`https:`?(0,U.jsx)(Y,{sx:{width:`15em`,height:`15em`},children:e===null?void 0:(0,U.jsx)(Oq,{onScan:a})}):void 0,(0,U.jsx)(Y,{sx:{marginTop:`1em`},children:(0,U.jsx)(lT,{label:`Manual Entry`,value:n,variant:`outlined`,fullWidth:!0,onKeyDown:e=>{e.key===`Enter`&&o()},onChange:e=>r(e.target.value)})})]}),(0,U.jsxs)(jy,{children:[n===``?void 0:(0,U.jsx)(X,{onClick:o,children:`Submit`}),(0,U.jsx)(X,{onClick:()=>t(null),children:`Cancel`})]})]})});function Nq(e,t,n,r){let i=Q.of(t).flatMap(([e,t])=>Q.ofObject(t.unloaded_processes??{}).map(([n,r])=>({matId:e,proc:parseInt(n),uniq:t.jobUnique}))).toLookupMap(e=>e.uniq,e=>e.proc,()=>1,(e,t)=>e+t),a=new Map;if(r)for(let[e,t]of Q.ofObject(r.jobs)){let n=Q.of(t.procsAndPaths[0]?.paths??[]).collect(e=>e.casting===``?null:e.casting).head();a.set(e,{partName:t.partName,comment:t.comment,routeStartTime:t.routeStartUTC,historicJob:null,inProcJob:t,casting:n??``,scheduledQty:t.cycles??0,decrementedQty:Q.of(t.decrements||[]).sumBy(e=>e.quantity),completedQty:Q.of(t.completed?.[t.completed?.length-1]??[]).sumBy(e=>e),inProcessQty:0,remainingQty:t.remainingToStart??0,darkRow:!1})}for(let[t,r]of n){let n=a.get(t);if(n)n.historicJob=r;else if(!e||r.routeStartUTC>=e.start&&r.routeStartUTC<=e.end){let e=Q.of(r.procsAndPaths[0]?.paths??[]).collect(e=>e.casting===``?null:e.casting).head();a.set(t,{partName:r.partName,comment:r.comment,routeStartTime:r.routeStartUTC,historicJob:r,inProcJob:null,casting:e??``,scheduledQty:r.cycles??0,decrementedQty:Q.of(r.decrements||[]).sumBy(e=>e.quantity),completedQty:i.get(t)?.get(r.procsAndPaths.length)??0,inProcessQty:0,darkRow:!1,remainingQty:0})}}if(r){for(let e of r.material)if(e.jobUnique){let t=a.get(e.jobUnique);t&&(t.inProcessQty+=1)}}let o=Q.of(a.values()).toSortedArray({desc:e=>e.routeStartTime.getTime()},e=>e.partName),s=null,c=!0;for(let e of o)s!=(e.historicJob?.scheduleId??e.inProcJob?.scheduleId??null)&&(c=!c,s=e.historicJob?.scheduleId??e.inProcJob?.scheduleId??null),e.darkRow=c;return o}function Pq(e,t){let n=`<table>
|
|
316
|
-
<thead><tr>`;n+=`<th>Date</th>`,n+=`<th>Part</th>`,t&&(n+=`<th>Material</th>`),n+=`<th>Note</th>`,n+=`<th>Scheduled</th>`,n+=`<th>Removed</th>`,n+=`<th>Completed</th>`,n+=`<th>In Process</th>`,n+=`</tr></thead>
|
|
317
|
-
<tbody>
|
|
318
|
-
`;for(let r of e)n+=`<tr><td>`+r.routeStartTime.toString()+`</td>`,n+=`<td>`+r.partName+`</td>`,t&&(n+=`<td>`+(r.casting??r.partName)+`</td>`),n+=`<td>`+(r.comment??``)+`</td>`,n+=`<td>`+r.scheduledQty.toFixed(0)+`</td>`,n+=`<td>`+r.decrementedQty.toFixed(0)+`</td>`,n+=`<td>`+r.completedQty.toFixed(0)+`</td>`,n+=`<td>`+r.inProcessQty.toFixed(0)+`</td>`,n+=`</tr>
|
|
319
|
-
`;return n+=`</tbody>
|
|
320
|
-
</table>`,n}function Fq(e,t){XA(Pq(e,t))}var Iq=wk(`fmsinsight.hide-nonloading-loadstation`,!1);function Lq(e){return`${e.palletNums&&e.palletNums.length>1?`Pallets `+e.palletNums.map(e=>e.toString()).join(`,`):e.palletNums&&e.palletNums.length==1?`Pallet `+e.palletNums[0].toString():`Pallet`}; ${e.stops.map(e=>e.stationGroup+`#`+(e.stationNums??[]).join(`,`)).join(`->`)}`}function Rq(e,t,n){let r=Q.ofObject(e.jobs).filter(([,e])=>e.procsAndPaths[0].paths.some(e=>e.casting===n)).toHashSet(([,e])=>e.partName),i=e.workorders?.find(e=>e.workorderId===t&&(e.part===n||r.has(e.part)));return i?`Started: ${i.material?.length??0}; Planned: ${i.plannedQuantity}`:null}function zq(e,t,n){let r=t?.workorder;return Q.of(t?.possibleCastingsByQueue?.[n]??[]).map(t=>({casting:t,message:r?Rq(e,r,t):null})).toSortedArray(e=>e.casting)}function Bq(e,t,n,r){return Q.of(n?.possibleJobsByQueue?.[r]??[]).groupBy(e=>e.jobUnique).collect(([n,r])=>{let i=e.jobs[n]??t.get(n);return{jobUnique:n,job:i??null,workorder:Q.of(r).collect(e=>e.workorder).head()??null,machinedProcs:r.map(e=>({lastProc:e.lastCompletedProcess,details:i?.procsAndPaths[e.lastCompletedProcess].paths.map(Lq).join(` | `)??``}))}}).toSortedArray(e=>e.job?.partName??e.jobUnique)}function Vq(e){let t=R(lk),n=R(Fk),r=R(wI),i=R(SL);return(0,L.useMemo)(()=>r===null||e===null?{castings:[],jobs:[]}:{castings:i.has(e)?zq(n,r,e):[],jobs:Bq(n,t,r,e)},[n,t,e,r,i])}function Hq(e,t){return t.jobUnique===e&&t.location.type===at.InQueue&&t.action.type!==H.Loading&&t.action.type!==H.LoadingToBasket&&t.process===0}function Uq(e,t){return t.partName===e&&t.location.type===at.InQueue&&t.action.type!==H.Loading&&t.action.type!==H.LoadingToBasket&&t.process===0&&!t.jobUnique}function Wq(e,t,n){return Q.ofObject(e).filter(([,e])=>e.remainingToStart===void 0||e.remainingToStart>0).collect(([,e])=>{let r=(e.procsAndPaths?.[0]?.paths??[]).filter(e=>e.inputQueue===n);if(r.length===0)return null;let i=Q.of(r).collect(e=>e.casting&&e.casting!==``?e.casting:void 0).head()??e.partName;return{job:e,startingTime:Q.of(r).map(e=>e.simulatedStartingUTC).minBy(e=>e),rawMatName:i,remainingToStart:e.remainingToStart??0,assignedRaw:Q.of(t).filter(t=>Hq(e.unique,t)).length(),availableUnassigned:Q.of(t).filter(e=>Uq(i,e)).length()}}).toSortedArray(e=>{let t=Q.of(e.job.precedence?.[0]??[]).minBy(e=>e);return!t||t<0?2**53-1:t})}function Gq(e,t,n,r){let i=[],a=[...e];a.sort((e,t)=>e.localeCompare(t));for(let e of a)if(n.has(e)){let n=nk.empty(),r=new Map;for(let i of t.material)if(i.location.type===at.InQueue&&i.location.currentQueue===e&&i.location.queuePosition!==void 0)if(i.serial&&i.serial!==``||i.action.type!==H.Waiting)n=n.set(i.location.queuePosition,i);else{let e=r.get(i.partName);e||(e=new Map,r.set(i.partName,e));let t=i.jobUnique||null,n=e.get(t);n?n.push(i):e.set(t,[i])}let a=[];for(let[e,t]of r)for(let[n,r]of t)a.push({partOrCasting:e,assignedJobUnique:n,material:r});a.sort((e,t)=>{let n=e.partOrCasting.localeCompare(t.partOrCasting);return n===0?(e.assignedJobUnique||``).localeCompare(t.assignedJobUnique||``):n}),i.push({label:e,free:!1,rawMaterialQueue:!0,inProcQueue:!1,material:[...n.values()],groupedRawMat:a})}else i.push({label:e,free:!1,rawMaterialQueue:!1,inProcQueue:r.has(e),material:Q.of(t.material).filter(t=>t.location.type===at.InQueue&&t.location.currentQueue===e&&t.location.queuePosition!==void 0).toSortedArray(e=>e.location.queuePosition??0)});return i}async function Kq(e){let t=[];for(let n of Q.of(e).chunk(15))t.push(...await Ht.logForMaterials(n.map(e=>e.materialID)));t.sort((e,t)=>e.endUTC.getTime()-t.endUTC.getTime());let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.type===V.AddToQueue||r.type===V.RemoveFromQueue){let i=[...r.material];for(;e+1<t.length&&t[e+1].type===r.type&&oD(t[e+1].endUTC,r.endUTC)<10;)i.push(...t[e+1].material),e+=1;i.length===r.material.length?n.push(r):n.push({...r,material:i})}else n.push(t[e])}return n}function qq(e){return e.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}function Jq(e){let t=e.job.completed?.[e.procIdx]?.[e.pathIdx];return t===void 0?null:(0,U.jsxs)(`div`,{children:[`Completed: `,t]})}function Yq(e){let t=R(vr),n=e=>e.map(e=>hA(e,t.loadStationNames)).join(`, `);return(0,U.jsx)(`div`,{children:(0,U.jsxs)(`dl`,{children:[(0,U.jsx)(`dt`,{children:`Job ID`}),(0,U.jsx)(`dd`,{children:e.job.unique}),(0,U.jsx)(`dt`,{children:`Time`}),(0,U.jsxs)(`dd`,{children:[qq(e.job.routeStartUTC),` to `,qq(e.job.routeEndUTC)]}),e.job.cycles?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{children:`Quantity`}),(0,U.jsx)(`dd`,{children:e.job.cycles})]}):void 0,e.job.comment!==void 0&&e.job.comment!==``?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{children:`Comment`}),(0,U.jsx)(`dd`,{children:e.job.comment})]}):void 0,e.job.assignedWorkorders&&e.job.assignedWorkorders.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{children:`Workorders`}),(0,U.jsx)(`dd`,{children:e.job.assignedWorkorders.join(`, `)})]}):void 0,e.job.procsAndPaths.map((t,r)=>(0,U.jsx)(L.Fragment,{children:t.paths.map((i,a)=>(0,U.jsxs)(L.Fragment,{children:[(0,U.jsxs)(`dt`,{children:[`Process `,r+1,t.paths.length>1?`, Path `+(a+1).toString():void 0]}),(0,U.jsxs)(`dd`,{children:[(0,U.jsx)(Jq,{job:e.job,procIdx:r,pathIdx:a}),(0,U.jsxs)(`div`,{children:[`Estimated Start: `,qq(i.simulatedStartingUTC)]}),(0,U.jsxs)(`div`,{children:[`Pallets: `,(i.palletNums??[]).map(e=>e.toString()).join(`,`)]}),i.fixture?(0,U.jsxs)(`div`,{children:[`Fixture: `,i.fixture,` `,i.face===void 0?void 0:`, Face: `+i.face.toString()]}):void 0,i.inputQueue?(0,U.jsxs)(`div`,{children:[`Input Queue: `,i.inputQueue]}):void 0,i.casting?(0,U.jsxs)(`div`,{children:[`Raw Material: `,i.casting]}):void 0,t.basketLoadStations&&t.basketLoadStations.length>0&&t.expectedBasketLoadTime?(0,U.jsxs)(`div`,{children:[`Basket Load Stations: `,n(t.basketLoadStations),` |`,` `,Kk(t.expectedBasketLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,(0,U.jsxs)(`div`,{children:[`Load Stations: `,n(i.load),` |`,` `,Kk(i.expectedLoadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}),i.stops.map((e,t)=>(0,U.jsx)(L.Fragment,{children:(0,U.jsxs)(`div`,{children:[e.stationGroup,`: `,(e.stationNums??[]).join(`,`),` | Program:`,` `,e.program,e.programRevision?` rev`+e.programRevision.toString():void 0,` `,`|`,` `,(Kk(e.expectedCycleTime)/i.partsPerPallet).toFixed(1),` `,`mins`,i.partsPerPallet>1?` per piece`:``]})},t)),(0,U.jsxs)(`div`,{children:[`Unload Stations: `,n(i.unload),` |`,` `,Kk(i.expectedUnloadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}),t.basketUnloadStations&&t.basketUnloadStations.length>0&&t.expectedBasketUnloadTime?(0,U.jsxs)(`div`,{children:[`Basket Unload Stations: `,n(t.basketUnloadStations),` |`,` `,Kk(t.expectedBasketUnloadTime).toFixed(1),` mins`,i.partsPerPallet>1?` per piece`:``]}):void 0,i.outputQueue?(0,U.jsxs)(`div`,{children:[`Output Queue: `,i.outputQueue]}):void 0,i.inspections&&i.inspections.length>0?(0,U.jsxs)(`div`,{children:[`Inspections: `,i.inspections.map(e=>e.inspectionType).join(`,`)]}):void 0]})]},a))},r))]})})}function Xq(e){let t=_A(R(vr).basketName);return e.inProcMat!==null&&e.inProcMat.location.type===at.OnPallet?(0,U.jsxs)(`span`,{children:[`On pallet `,e.inProcMat.location.palletNum??``]}):e.inProcMat!==null&&e.inProcMat.location.type===at.InQueue?(0,U.jsxs)(`span`,{children:[`In queue `,e.inProcMat.location.currentQueue??``]}):e.inProcMat!==null&&e.inProcMat.location.type===at.InBasket?(0,U.jsxs)(`span`,{children:[`In `,t,` `,e.inProcMat.location.basketId??``]}):e.matSummary?.completed_last_proc_machining?(0,U.jsx)(`span`,{children:`Completed`}):e.matSummary!==null&&!e.matSummary.startedProcess1?(0,U.jsx)(`span`,{children:`Not yet started`}):(0,U.jsx)(`span`,{})}function Zq(e){let t=R(Fk).material,n=z(SI),r=Q.of(e.matIdsForJob.get(e.unique)??ZO.empty()).collect(t=>e.matsFromEvents.get(t)).toRArray();if(r===null||r.length===0)return(0,U.jsx)(`div`,{});let i=Q.of(t).toHashMap(e=>[e.materialID,e],(e,t)=>e),a=Q.of(r).some(e=>e.workorderId!==void 0&&e.workorderId!==``&&e.workorderId!==e.serial);return(0,U.jsx)(`div`,{children:(0,U.jsxs)(yw,{size:`small`,style:{width:e.fullWidth?`100%`:`auto`},children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[a?(0,U.jsx)(Z,{children:`Workorder`}):void 0,(0,U.jsx)(Z,{children:`Serial`}),(0,U.jsx)(Z,{children:`Status`}),(0,U.jsx)(Z,{padding:`checkbox`})]})}),(0,U.jsx)(Sw,{children:r.map(t=>(0,U.jsxs)(Mw,{children:[a?(0,U.jsx)(Z,{children:t.workorderId??``}):void 0,(0,U.jsx)(Z,{children:t.serial??``}),(0,U.jsx)(Z,{children:(0,U.jsx)(Xq,{matSummary:e.matsFromEvents.get(t.materialID)??null,inProcMat:i.get(t.materialID)??null})}),(0,U.jsx)(Z,{padding:`checkbox`,children:(0,U.jsx)($m,{onClick:()=>n({type:`MatSummary`,summary:t}),size:`large`,children:(0,U.jsx)(lE,{fontSize:`inherit`})})})]},t.materialID))})]})})}function Qq(e){let t=R(GR),n=R(e.checkAnalysisMonth&&t.type===`SpecificMonth`?pL:dL);return(0,U.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-evenly`},children:e.job===null?void 0:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Yq,{job:e.job}),(0,U.jsx)(Zq,{unique:e.job.unique,fullWidth:!1,matsFromEvents:n.matsById,matIdsForJob:n.matIdsForJob})]})})}function $q(e){return typeof e==`object`&&!!e&&`mat`in e}function eJ(e){return typeof e==`number`?e:null}var tJ=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(void 0),[r]=zI(),i=z(Hk),a=R(Nk),o=(0,L.useMemo)(()=>e.matIds.slice(),[e.matIds]);return(0,U.jsx)(FH,{sensors:NB(MB(RV),MB(NV,{coordinateGetter:OU})),collisionDetection:HB,onDragStart:({active:e})=>n($q(e.data.current)?e.data.current.mat:void 0),onDragCancel:()=>n(void 0),onDragEnd:({active:t,over:o})=>{let s=eJ(t.id),c=o?eJ(o.id):null;if(o&&t.id!==o.id&&s!==null&&c!==null){let t=e.matIds.indexOf(c);r({materialId:s,queue:e.queueName,queuePosition:t,operator:a}),i({queue:e.queueName,matId:s,newIdx:t})}n(void 0)},children:(0,U.jsxs)(gU,{items:o,strategy:e.direction===`vertical`?fU:uU,children:[e.children,(0,U.jsx)(tU,{children:t===void 0?void 0:e.renderDragOverlay(t)})]})})}),nJ=`printWindow`;function rJ(e){let t=document.createElement(`iframe`);return t.width=`${document.documentElement.clientWidth}px`,t.height=`${document.documentElement.clientHeight}px`,t.style.position=`absolute`,t.style.top=`-${document.documentElement.clientHeight+100}px`,t.style.left=`-${document.documentElement.clientWidth+100}px`,t.id=nJ,t.srcdoc=`<!DOCTYPE html>`,e&&(e.allow&&(t.allow=e.allow),e.referrerPolicy!==void 0&&(t.referrerPolicy=e.referrerPolicy),e.sandbox!==void 0&&(t.sandbox=e.sandbox)),t}function iJ({level:e=`error`,messages:t,suppressErrors:n=!1}){n||(e===`error`?console.error(t):e===`warning`?console.warn(t):console.debug(t))}function aJ(e,t){if(t||!e){let e=document.getElementById(nJ);e&&document.body.removeChild(e)}}function oJ(e){return e instanceof Error?e:Error(`Unknown Error`)}function sJ(e,t){let{documentTitle:n,onAfterPrint:r,onPrintError:i,preserveAfterPrint:a,print:o,suppressErrors:s}=t;setTimeout(()=>{if(e.contentWindow){let t=function(){r?.(),aJ(a)};if(e.contentWindow.focus(),o)o(e).then(t).catch(e=>{i?i(`print`,oJ(e)):iJ({messages:["An error was thrown by the specified `print` function"],suppressErrors:s})});else{if(e.contentWindow.print){let t=e.contentDocument?.title??``,r=e.ownerDocument.title,i=typeof n==`function`?n():n;i&&(e.ownerDocument.title=i,e.contentDocument&&(e.contentDocument.title=i)),e.contentWindow.print(),i&&(e.ownerDocument.title=r,e.contentDocument&&(e.contentDocument.title=t))}else iJ({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:s});cJ()?setTimeout(t,500):t()}}else iJ({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:s})},500)}function cJ(){return[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>(navigator.userAgent??navigator.vendor??(`opera`in window&&window.opera)).match(e))}function lJ(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null),r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function uJ(e,t,n){let r=lJ(e),i=lJ(t);if(r.length!==i.length){iJ({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",e,t],suppressErrors:n});return}for(let e=0;e<r.length;e++){let t=r[e],a=i[e],o=t.shadowRoot;if(o!==null){let e=a.attachShadow({mode:o.mode});e.innerHTML=o.innerHTML,uJ(o,e,n)}}}var dJ=`
|
|
321
|
-
@page {
|
|
322
|
-
/* Remove browser default header (title) and footer (url) */
|
|
323
|
-
margin: 0;
|
|
324
|
-
}
|
|
325
|
-
@media print {
|
|
326
|
-
body {
|
|
327
|
-
/* Tell browsers to print background colors */
|
|
328
|
-
color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */
|
|
329
|
-
print-color-adjust: exact; /* Firefox/Safari */
|
|
330
|
-
-webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
`;function fJ(e,t,n){let{contentNode:r,clonedContentNode:i,clonedImgNodes:a,clonedVideoNodes:o,numResourcesToLoad:s,originalCanvasNodes:c}=t,{bodyClass:l,fonts:u,ignoreGlobalStyles:d,pageStyle:f,nonce:p,suppressErrors:m,copyShadowRoots:h}=n,g=[],_=[];function v(t,r){if(g.includes(t)){iJ({level:`debug`,messages:[`Tried to mark a resource that has already been handled`,t],suppressErrors:m});return}r?(iJ({messages:[`"react-to-print" was unable to load a resource but will continue attempting to print the page`,...r],suppressErrors:m}),_.push(t)):g.push(t),g.length+_.length===s&&sJ(e,n)}e.onload=null;let y=e.contentDocument??e.contentWindow?.document;if(y){let t=y.body.appendChild(i);h&&uJ(r,t,!!m),u&&(e.contentDocument?.fonts&&e.contentWindow?.FontFace?u.forEach(t=>{let n=new FontFace(t.family,t.source,{weight:t.weight,style:t.style});e.contentDocument.fonts.add(n),n.loaded.then(()=>{v(n)}).catch(e=>{v(n,[`Failed loading the font:`,n,`Load error:`,oJ(e)])})}):(u.forEach(e=>{v(e)}),iJ({messages:[`"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page`],suppressErrors:m})));let n=f??dJ,s=y.createElement(`style`);p&&(s.setAttribute(`nonce`,p),y.head.setAttribute(`nonce`,p)),s.appendChild(y.createTextNode(n)),y.head.appendChild(s),l&&y.body.classList.add(...l.split(` `));let g=y.querySelectorAll(`canvas`);for(let e=0;e<c.length;++e){let t=c[e],n=g[e];if(n===void 0){iJ({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",t],suppressErrors:m});continue}let r=n.getContext(`2d`);r&&r.drawImage(t,0,0)}for(let e=0;e<a.length;e++){let t=a[e],n=t.getAttribute(`src`);if(!n)v(t,[`Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.`,t]);else{let e=new Image;e.onload=()=>{v(t)},e.onerror=(e,n,r,i,a)=>{v(t,[`Error loading <img>`,t,`Error`,a])},e.src=n}}for(let e=0;e<o.length;e++){let t=o[e];t.preload=`auto`;let n=t.getAttribute(`poster`);if(n){let e=new Image;e.onload=()=>{v(t)},e.onerror=(e,r,i,a,o)=>{v(t,[`Error loading video poster`,n,`for video`,t,`Error:`,o])},e.src=n}else t.readyState>=2?v(t):t.src?(t.onloadeddata=()=>{v(t)},t.onerror=(e,n,r,i,a)=>{v(t,[`Error loading video`,t,`Error`,a])},t.onstalled=()=>{v(t,[`Loading video stalled, skipping`,t])}):v(t,["Error loading video, `src` is empty",t])}let _=`select`,b=r.querySelectorAll(_),x=y.querySelectorAll(_);for(let e=0;e<b.length;e++)x[e].value=b[e].value;if(!d){let e=document.querySelectorAll(`style, link[rel~='stylesheet'], link[as='style']`);for(let t=0,n=e.length;t<n;++t){let n=e[t];if(n.tagName.toLowerCase()===`style`){let e=y.createElement(n.tagName),r=n.sheet;if(r){let i=``;try{let e=r.cssRules.length;for(let t=0;t<e;++t)typeof r.cssRules[t].cssText==`string`&&(i+=`${r.cssRules[t].cssText}\r
|
|
334
|
-
`)}catch(e){iJ({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",n,`Original error: ${oJ(e).message}`],level:`warning`})}e.setAttribute(`id`,`react-to-print-${t}`),p&&e.setAttribute(`nonce`,p),e.appendChild(y.createTextNode(i)),y.head.appendChild(e)}}else if(n.getAttribute(`href`))if(n.hasAttribute(`disabled`))iJ({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",n],level:`warning`}),v(n);else{let e=y.createElement(n.tagName);for(let t=0,r=n.attributes.length;t<r;++t){let r=n.attributes[t];r&&e.setAttribute(r.nodeName,r.nodeValue??``)}e.onload=()=>{v(e)},e.onerror=(t,n,r,i,a)=>{v(e,[`Failed to load`,e,`Error:`,a])},p&&e.setAttribute(`nonce`,p),y.head.appendChild(e)}else iJ({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",n],level:`warning`}),v(n)}}}s===0&&sJ(e,n)}function pJ(e,t,n){e.onload=()=>{fJ(e,t,n)},document.body.appendChild(e)}function mJ({contentRef:e,optionalContent:t,suppressErrors:n}){if(t&&typeof t==`function`)return e&&iJ({level:`warning`,messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t();if(e)return e.current;iJ({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}function hJ(e,t){let{contentRef:n,fonts:r,ignoreGlobalStyles:i,suppressErrors:a}=t,o=mJ({contentRef:n,optionalContent:e,suppressErrors:a});if(!o)return;let s=o.cloneNode(!0),c=document.querySelectorAll(`link[rel~='stylesheet'], link[as='style']`),l=s.querySelectorAll(`img`),u=s.querySelectorAll(`video`),d=r?r.length:0;return{contentNode:o,clonedContentNode:s,clonedImgNodes:l,clonedVideoNodes:u,numResourcesToLoad:(i?0:c.length)+l.length+u.length+d,originalCanvasNodes:o.querySelectorAll(`canvas`)}}function gJ({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:i,ignoreGlobalStyles:a,nonce:o,onAfterPrint:s,onBeforePrint:c,onPrintError:l,pageStyle:u,preserveAfterPrint:d,print:f,printIframeProps:p,suppressErrors:m}){return(0,L.useCallback)(h=>{aJ(d,!0);function g(){let c={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:i,ignoreGlobalStyles:a,nonce:o,onAfterPrint:s,onPrintError:l,pageStyle:u,preserveAfterPrint:d,print:f,suppressErrors:m},g=rJ(p),_=hJ(h,c);if(!_){iJ({messages:[`There is nothing to print`],suppressErrors:m});return}pJ(g,_,c)}c?c().then(()=>{g()}).catch(e=>{l?.(`onBeforePrint`,oJ(e))}):g()},[e,t,n,r,i,a,o,s,c,l,u,d,p,f,m])}var _J=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function e(n,r){t(this,e),this.data=n,this.text=r.text||n,this.options=r}})),vJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE39=void 0;var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(_J());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){o(n,e);function n(e,t){return i(this,n),e=e.toUpperCase(),t.mod43&&(e+=f(m(e))),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){for(var e=u(`*`),t=0;t<this.data.length;t++)e+=u(this.data[t])+`0`;return e+=u(`*`),{data:e,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(n.default),c=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),l=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function u(e){return d(p(e))}function d(e){return l[e].toString(2)}function f(e){return c[e]}function p(e){return c.indexOf(e)}function m(e){for(var t=0,n=0;n<e.length;n++)t+=p(e[n]);return t%=43,t}e.CODE39=s})),yJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t;function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r=e.SET_A=0,i=e.SET_B=1,a=e.SET_C=2;e.SHIFT=98;var o=e.START_A=103,s=e.START_B=104,c=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(t={},n(t,o,r),n(t,s,i),n(t,c,a),t),e.SWAP={101:r,100:i,99:a},e.A_START_CHAR=`Ð`,e.B_START_CHAR=`Ñ`,e.C_START_CHAR=`Ò`,e.A_CHARS=`[\0-_È-Ï]`,e.B_CHARS=`[ -È-Ï]`,e.C_CHARS=`(Ï*[0-9]{2}Ï*)`,e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]})),bJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(_J()),r=yJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){a(this,n);var r=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);this.shouldEncodeAsEan128()===!0&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}else if(t===r.SET_B)return e.shift()-32;else return(e.shift()-48)*10+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?((i===r.SET_A||i===r.SET_B)&&o===r.SHIFT&&(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=n.getBar(o),l=o*t;return{result:c+a.result,checksum:l+a.checksum}}}]),n}(n.default)})),xJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=yJ(),n=function(e){return e.match(RegExp(`^`+t.A_CHARS+`*`))[0].length},r=function(e){return e.match(RegExp(`^`+t.B_CHARS+`*`))[0].length},i=function(e){return e.match(RegExp(`^`+t.C_CHARS+`*`))[0]};function a(e,n){var r=n?t.A_CHARS:t.B_CHARS,i=e.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(i)return i[1]+`Ì`+o(e.substring(i[1].length));var s=e.match(RegExp(`^`+r+`+`))[0];return s.length===e.length?e:s+String.fromCharCode(n?205:206)+a(e.substring(s.length),!n)}function o(e){var t=i(e),o=t.length;if(o===e.length)return e;e=e.substring(o);var s=n(e)>=r(e);return t+String.fromCharCode(s?206:205)+a(e,s)}e.default=function(e){var s=void 0;if(i(e).length>=2)s=t.C_START_CHAR+o(e);else{var c=n(e)>r(e);s=(c?t.A_START_CHAR:t.B_START_CHAR)+a(e,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})}})),SJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(bJ()),n=r(xJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){if(i(this,t),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,n.default)(e),r));else var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return a(o)}return t}(t.default)})),CJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(bJ()),r=yJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),wJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(bJ()),r=yJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),TJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(bJ()),r=yJ();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(n,e);function n(e,t){return a(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default)})),EJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var t=a(SJ()),n=a(CJ()),r=a(wJ()),i=a(TJ());function a(e){return e&&e.__esModule?e:{default:e}}e.CODE128=t.default,e.CODE128A=n.default,e.CODE128B=r.default,e.CODE128C=i.default})),DJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIDE_BIN=`101`,e.MIDDLE_BIN=`01010`,e.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},e.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],e.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],e.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]})),OJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=DJ();e.default=function(e,n,r){var i=e.split(``).map(function(e,r){return t.BINARIES[n[r]]}).map(function(t,n){return t?t[e[n]]:``});if(r){var a=e.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)}})),kJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=DJ(),r=a(OJ()),i=a(_J());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){c(i,e);function i(e,t){o(this,i);var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>t.width*10?t.width*10:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,r.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,r.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:n.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:n.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:n.SIDE_BIN,options:t}]}},{key:`encodeFlat`,value:function(){return{data:[n.SIDE_BIN,this.leftEncode(),n.MIDDLE_BIN,this.rightEncode(),n.SIDE_BIN].join(``),text:this.text}}}]),i}(i.default)})),AJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},r=DJ(),i=a(kJ());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t*3:e+t},0)%10)%10};e.default=function(e){c(i,e);function i(e,t){o(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=l(e));var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===l(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default)})),jJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}else if(`value`in i)return i.value;else{var o=i.get;return o===void 0?void 0:o.call(r)}},r=i(kJ());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+t*3},0)%10)%10};e.default=function(e){s(r,e);function r(e,t){return a(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=c(e)),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===c(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default)})),MJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=DJ(),r=a(OJ()),i=a(_J());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=function(e){return e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t*9:e+t*3},0)%10};e.default=function(e){c(i,e);function i(e,t){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e=n.EAN5_STRUCTURE[l(this.data)];return{data:`1011`+(0,r.default)(this.data,e,`01`),text:this.text}}}]),i}(i.default)})),NJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=DJ(),r=a(OJ()),i=a(_J());function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){c(i,e);function i(e,t){return o(this,i),s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=n.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,r.default)(this.data,e,`01`),text:this.text}}}]),i}(i.default)})),PJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();e.checksum=l;var n=i(OJ()),r=i(_J());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=function(e){s(r,e);function r(e,t){a(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=l(e));var n=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>t.width*10?n.fontSize=t.width*10:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==l(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,n.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,n.default)(this.data.substr(6,6),`RRRRRR`),e+=`101`,{data:e,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,n.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,n.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,n.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(r.default);function l(e){var t=0,n;for(n=1;n<11;n+=2)t+=parseInt(e[n]);for(n=0;n<11;n+=2)t+=parseInt(e[n])*3;return(10-t%10)%10}e.default=c})),FJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=a(OJ()),r=a(_J()),i=PJ();function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function c(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],u=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],d=function(e){c(r,e);function r(e,t){o(this,r);var n=s(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=f(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else if(e.search(/^[01][0-9]{7}$/)!==-1)if(n.middleDigits=e.substring(1,e.length-1),n.upcA=f(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]===e[e.length-1])n.isValid=!0;else return s(n);else return s(n);return n.displayValue=t.displayValue,t.fontSize>t.width*10?n.fontSize=t.width*10:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return t(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),e+=`010101`,{data:e,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],t=this.upcA[this.upcA.length-1],r=u[parseInt(t)][parseInt(e)];return(0,n.default)(this.middleDigits,r)}}]),r}(r.default);function f(e,t){for(var n=l[parseInt(e[e.length-1])],r=``,a=0,o=0;o<n.length;o++){var s=n[o];s===`X`?r+=e[a++]:r+=s}return r=``+t+r,``+r+(0,i.checksum)(r)}e.default=d})),IJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UPCE=e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var t=s(AJ()),n=s(jJ()),r=s(MJ()),i=s(NJ()),a=s(PJ()),o=s(FJ());function s(e){return e&&e.__esModule?e:{default:e}}e.EAN13=t.default,e.EAN8=n.default,e.EAN5=r.default,e.EAN2=i.default,e.UPC=a.default,e.UPCE=o.default})),LJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.START_BIN=`1010`,e.END_BIN=`11101`,e.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]})),RJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=LJ(),r=i(_J());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(r,e);function r(){return a(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(r.default)})),zJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(RJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return Math.ceil(t/10)*10-t};e.default=function(e){o(n,e);function n(e,t){return i(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=s(e)),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===s(this.data)}}]),n}(n.default)})),BJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var t=r(RJ()),n=r(zJ());function r(e){return e&&e.__esModule?e:{default:e}}e.ITF=t.default,e.ITF14=n.default})),VJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(_J());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=c(n,4-n.length);for(var r=0;r<n.length;r++)e+=n[r]==`0`?`100`:`110`}return e+=`1001`,{data:e,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(n.default);function c(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}e.default=s})),HJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mod10=t,e.mod11=n;function t(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=r*2%10+Math.floor(r*2/10)}return(10-t%10)%10}function n(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11}})),UJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(VJ()),n=HJ();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return t}(t.default)})),WJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(VJ()),n=HJ();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return t}(t.default)})),GJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(VJ()),n=HJ();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return t}(t.default)})),KJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(VJ()),n=HJ();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(t,e);function t(e,r){return i(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return t}(t.default)})),qJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var t=o(VJ()),n=o(UJ()),r=o(WJ()),i=o(GJ()),a=o(KJ());function o(e){return e&&e.__esModule?e:{default:e}}e.MSI=t.default,e.MSI10=n.default,e.MSI11=r.default,e.MSI1010=i.default,e.MSI1110=a.default})),JJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pharmacode=void 0;var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(_J());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.pharmacode=function(e){o(n,e);function n(e,t){i(this,n);var r=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return t=t.slice(0,-2),{data:t,text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(n.default)})),YJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codabar=void 0;var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(_J());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.codabar=function(e){o(n,e);function n(e,t){i(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(n.default)})),XJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),e.BINARIES=`100010100.101001000.101000100.101000010.100101000.100100100.100100010.101010000.100010010.100001010.110101000.110100100.110100010.110010100.110010010.110001010.101101000.101100100.101100010.100110100.100011010.101011000.101001100.101000110.100101100.100010110.110110100.110110010.110101100.110100110.110010110.110011010.101101100.101100110.100110110.100111010.100101110.111010100.111010010.111001010.101101110.101110110.110101110.100100110.111011010.111010110.100110010.101011110`.split(`.`),e.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}})),ZJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=XJ(),r=i(_J());function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function o(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function s(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){s(r,e);function r(e,t){return a(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(r.default)})),QJ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(ZJ());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.default=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(n.default)})),$J=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var t=r(ZJ()),n=r(QJ());function r(e){return e&&e.__esModule?e:{default:e}}e.CODE93=t.default,e.CODE93FullASCII=n.default})),eY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GenericBarcode=void 0;var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=r(_J());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function o(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}e.GenericBarcode=function(e){o(n,e);function n(e,t){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(n.default)})),tY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=vJ(),n=EJ(),r=IJ(),i=BJ(),a=qJ(),o=JJ(),s=YJ(),c=$J(),l=eY();e.default={CODE39:t.CODE39,CODE128:n.CODE128,CODE128A:n.CODE128A,CODE128B:n.CODE128B,CODE128C:n.CODE128C,EAN13:r.EAN13,EAN8:r.EAN8,EAN5:r.EAN5,EAN2:r.EAN2,UPC:r.UPC,UPCE:r.UPCE,ITF14:i.ITF14,ITF:i.ITF,MSI:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:o.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode}})),nY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=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};e.default=function(e,n){return t({},e,n)}})),rY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=[];function n(e){if(Array.isArray(e))for(var r=0;r<e.length;r++)n(e[r]);else e.text=e.text||``,e.data=e.data||``,t.push(e)}return n(e),t}})),iY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}})),aY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&(n=t[n],typeof e[n]==`string`&&(e[n]=parseInt(e[n],10)));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e}})),oY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}})),sY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=r(aY()),n=r(oY());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r={};for(var i in n.default)n.default.hasOwnProperty(i)&&(e.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=e.getAttribute(`jsbarcode-`+i.toLowerCase())),e.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=e.getAttribute(`data-`+i.toLowerCase())));return r.value=e.getAttribute(`jsbarcode-value`)||e.getAttribute(`data-value`),r=(0,t.default)(r),r}e.default=i})),cY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var t=n(nY());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function i(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function a(e,n,a){for(var o=0;o<e.length;o++){var s=e[o],l=(0,t.default)(n,s.options),u=l.displayValue?c(s.text,l,a):0,d=s.data.length*l.width;s.width=Math.ceil(Math.max(u,d)),s.height=r(s,l),s.barcodePadding=i(u,d,l)}}function o(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t}function s(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t}function c(e,t,n){var r;if(n)r=n;else if(typeof document<`u`)r=document.createElement(`canvas`).getContext(`2d`);else return 0;r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}e.getMaximumHeightOfEncodings=s,e.getEncodingHeight=r,e.getBarcodePadding=i,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=o})),lY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(nY()),r=cY();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t,n,r){a(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n=this.canvas.getContext(`2d`),r=t.data,i=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop;n.fillStyle=e.lineColor;for(var a=0;a<r.length;a++){var o=a*e.width+t.barcodePadding;r[a]===`1`?n.fillRect(o,i,e.width,e.height):r[a]&&n.fillRect(o,i,e.width,e.height*r[a])}}},{key:`drawCanvasText`,value:function(e,t){var n=this.canvas.getContext(`2d`),r=e.fontOptions+` `+e.fontSize+`px `+e.font;if(e.displayValue){var i,a=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize;n.font=r,e.textAlign==`left`||t.barcodePadding>0?(i=0,n.textAlign=`left`):e.textAlign==`right`?(i=t.width-1,n.textAlign=`right`):(i=t.width/2,n.textAlign=`center`),n.fillText(t.text,i,a)}}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}()})),uY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=i(nY()),r=cY();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var o=`http://www.w3.org/2000/svg`;e.default=function(){function e(t,n,r){a(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){for(var r=n.data,i=t.textPosition==`top`?t.fontSize+t.textMargin:0,a=0,o=0,s=0;s<r.length;s++)o=s*t.width+n.barcodePadding,r[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,i,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),i,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r=this.document.createElementNS(o,`text`);if(t.displayValue){var i,a;r.setAttribute(`font-family`,t.font),r.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&r.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&r.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(i=0,r.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(i=n.width-1,r.setAttribute(`text-anchor`,`end`)):(i=n.width/2,r.setAttribute(`text-anchor`,`middle`)),r.setAttribute(`x`,i),r.setAttribute(`y`,a),r.appendChild(this.document.createTextNode(n.text)),e.appendChild(r)}}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,o),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(o,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,i){var a=this.document.createElementNS(o,`rect`);return a.setAttribute(`x`,e),a.setAttribute(`y`,t),a.setAttribute(`width`,n),a.setAttribute(`height`,r),i.appendChild(a),a}}]),e}()})),dY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t,r,i){n(this,e),this.object=t,this.encodings=r,this.options=i}return t(e,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),e}()})),fY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=i(lY()),n=i(uY()),r=i(dY());function i(e){return e&&e.__esModule?e:{default:e}}e.default={CanvasRenderer:t.default,SVGRenderer:n.default,ObjectRenderer:r.default}})),pY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function n(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function r(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(e){r(i,e);function i(e,r){t(this,i);var a=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return a.name=`InvalidInputException`,a.symbology=e,a.input=r,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return i}(Error),a=function(e){r(i,e);function i(){t(this,i);var e=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.name=`InvalidElementException`,e.message=`Not supported type to render on`,e}return i}(Error),o=function(e){r(i,e);function i(){t(this,i);var e=n(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.name=`NoElementException`,e.message=`No element to render on.`,e}return i}(Error);e.InvalidInputException=i,e.InvalidElementException=a,e.NoElementException=o})),mY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n=a(sY()),r=a(fY()),i=pY();function a(e){return e&&e.__esModule?e:{default:e}}function o(e){if(typeof e==`string`)return s(e);if(Array.isArray(e)){for(var a=[],l=0;l<e.length;l++)a.push(o(e[l]));return a}else if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLImageElement)return c(e);else if(e&&e.nodeName&&e.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&e instanceof SVGElement)return{element:e,options:(0,n.default)(e),renderer:r.default.SVGRenderer};else if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement)return{element:e,options:(0,n.default)(e),renderer:r.default.CanvasRenderer};else if(e&&e.getContext)return{element:e,renderer:r.default.CanvasRenderer};else if(e&&(e===void 0?`undefined`:t(e))===`object`&&!e.nodeName)return{element:e,renderer:r.default.ObjectRenderer};else throw new i.InvalidElementException}function s(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(o(t[r]));return n}}function c(e){var t=document.createElement(`canvas`);return{element:t,options:(0,n.default)(e),renderer:r.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,t.toDataURL())}}}e.default=o})),hY=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(){function e(t){n(this,e),this.api=t}return t(e,[{key:`handleCatch`,value:function(e){if(e.name===`InvalidInputException`)if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw e.message;else throw e;this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),e}()})),gY=l(o(((e,t)=>{var n=d(tY()),r=d(nY()),i=d(rY()),a=d(iY()),o=d(mY()),s=d(aY()),c=d(hY()),l=pY(),u=d(oY());function d(e){return e&&e.__esModule?e:{default:e}}var f=function(){},p=function(e,t,n){var r=new f;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,o.default)(e),r._encodings=[],r._options=u.default,r._errorHandler=new c.default(r),t!==void 0&&(n||={},n.format||=_(),r.options(n)[n.format](t,n).render()),r};for(var m in p.getModule=function(e){return n.default[e]},n.default)n.default.hasOwnProperty(m)&&h(n.default,m);function h(e,t){f.prototype[t]=f.prototype[t.toUpperCase()]=f.prototype[t.toLowerCase()]=function(n,i){var a=this;return a._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var o=(0,r.default)(a._options,i);o=(0,s.default)(o);var c=e[t],l=g(n,c,o);return a._encodings.push(l),a})}}function g(e,t,n){e=``+e;var a=new t(e,n);if(!a.valid())throw new l.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,i.default)(o);for(var s=0;s<o.length;s++)o[s].options=(0,r.default)(n,o[s].options);return o}function _(){return n.default.CODE128?`CODE128`:Object.keys(n.default)[0]}f.prototype.options=function(e){return this._options=(0,r.default)(this._options,e),this},f.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},f.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var e;for(var t in this._renderProperties){e=this._renderProperties[t];var i=(0,r.default)(this._options,e.options);i.format==`auto`&&(i.format=_()),this._errorHandler.wrapBarcodeCall(function(){var t=i.value,r=n.default[i.format.toUpperCase()],a=g(t,r,i);v(e,a,i)})}}},f.prototype.render=function(){if(!this._renderProperties)throw new l.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)v(this._renderProperties[e],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},f.prototype._defaults=u.default;function v(e,t,n){t=(0,i.default)(t);for(var o=0;o<t.length;o++)t[o].options=(0,r.default)(n,t[o].options),(0,a.default)(t[o].options);(0,a.default)(n);var s=e.renderer;new s(e.element,t,n).render(),e.afterRender&&e.afterRender()}typeof window<`u`&&(window.JsBarcode=p),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),p(n,e,t)}),t.exports=p}))(),1);function _Y(e){let t=(0,L.useRef)(null),n=(0,L.useCallback)(n=>{n&&(0,gY.default)(n,e.text,{format:`CODE128`}),t.current=n},[e.text]);return(0,L.useEffect)(()=>{t.current&&(0,gY.default)(t.current,e.text,{format:`CODE128`,fontSize:30})},[e.text]),(0,U.jsx)(`svg`,{ref:n})}function vY(e){return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,U.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,U.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:new Date().toLocaleString(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,U.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,U.jsx)(_Y,{text:e.materialName??e.partName}),e.count>=2?(0,U.jsx)(_Y,{text:e.count.toString()}):void 0]}),e.serial1&&e.serial1!==``?(0,U.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,U.jsx)(_Y,{text:e.serial1}),e.serial2&&e.serial2!==``?(0,U.jsx)(_Y,{text:e.serial2||``}):void 0]}):void 0,(0,U.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:e.uniq===null||e.uniq===``?(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),(0,U.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,U.jsx)(_Y,{text:e.partName}),(0,U.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e.uniq,e.jobCycles&&e.jobCycles>0?` (`+e.jobCycles.toString()+` scheduled)`:``]})]})]})}),e.note?(0,U.jsx)(`div`,{style:{marginBottom:`2em`},children:(0,U.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e.note})}):void 0,(0,U.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function yY(e){let t=R(Fk).jobs,n=(0,L.useMemo)(()=>Q.of(e.material||[]).filter(e=>e.jobUnique!==null&&e.jobUnique!==void 0&&e.jobUnique!==``).groupBy(e=>e.jobUnique).map(([e,n])=>[e,{cycles:t[e]?.cycles??0,length:n.length,part:n[0]?.partName??``,comment:t[e]?.comment,serial1:n[0]?.serial,serial2:n[n.length-1]?.serial}]).toSortedArray(([e,t])=>t.part),[e.material,t]);return!e.material||e.material.length===0?(0,U.jsx)(`div`,{}):n.length===0?(0,U.jsx)(vY,{partName:e.material[0].partName,materialName:e.materialName,count:e.material.length,uniq:null,note:null,operator:e.operator,serial1:e.material[0].serial,serial2:e.material[e.material.length-1]?.serial}):(0,U.jsx)(`div`,{children:n.map(([t,r],i)=>(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(vY,{partName:r.part,materialName:e.materialName,count:r.length,uniq:t,jobCycles:r.cycles,note:r.comment,operator:e.operator,serial1:r.serial1,serial2:r.serial2}),i<n.length-1?(0,U.jsx)(`div`,{style:{pageBreakAfter:`always`}}):void 0]},i))})}function bY(e){let t=(0,L.useMemo)(()=>Q.of(e.material||[]).filter(e=>e.jobUnique!==null&&e.jobUnique!==void 0&&e.jobUnique!==``).groupBy(e=>e.jobUnique).map(([e,t])=>[e,{length:t.length,part:t[0]?.partName??``}]).toSortedArray(([e,t])=>t.part),[e.material]),n=R(Fk).jobs,r=(0,L.useMemo)(()=>Q.of(e.material||[]).collect(e=>e.jobUnique?n[e.jobUnique]?.comment:void 0).distinct().toSortedArray(e=>e),[e.material,n]);return!e.material||e.material.length===0?(0,U.jsx)(`div`,{}):(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{style:{marginTop:`4em`,display:`flex`,justifyContent:`center`},children:(0,U.jsx)(`h2`,{children:`SeedTactic: FMS Insight`})}),(0,U.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:new Date().toLocaleString(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,U.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,U.jsx)(_Y,{text:e.materialName??e.material[0].partName}),e.material.length>=2?(0,U.jsx)(_Y,{text:e.material.length.toString()}):void 0]}),e.material[0].serial&&e.material[0].serial!==``?(0,U.jsxs)(`div`,{style:{marginTop:`2em`,display:`flex`,justifyContent:`space-around`},children:[(0,U.jsx)(_Y,{text:e.material[0].serial}),e.material.length>=2&&e.material[e.material.length-1].serial&&e.material[e.material.length-1].serial!==``?(0,U.jsx)(_Y,{text:e.material[e.material.length-1].serial||``}):void 0]}):void 0,(0,U.jsx)(`div`,{style:{marginTop:`2em`,marginLeft:`4em`,marginRight:`4em`,marginBottom:`9em`},children:t.length===0?(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:`Not currently assigned to any jobs`}):e.materialName?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,U.jsxs)(`div`,{style:{marginTop:`1em`,marginLeft:`2em`,display:`flex`,alignItems:`center`},children:[(0,U.jsx)(_Y,{text:t.part}),(0,U.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`x`,t.length]}),(0,U.jsxs)(`h3`,{style:{marginLeft:`4em`},children:[`assigned to `,e]})]},n))]}):t.length===1?(0,U.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,justifyContent:`space-around`},children:(0,U.jsxs)(`p`,{style:{fontSize:`x-large`},children:[(0,U.jsxs)(`span`,{children:[`Assigned to `,t[0][0]]}),t[0][1].length>1?(0,U.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t[0][1].length]}):void 0]})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:`Assigned To`}),t.map(([e,t],n)=>(0,U.jsxs)(`h3`,{style:{marginTop:`1em`,marginLeft:`2em`},children:[(0,U.jsx)(`span`,{children:e}),t.length>1?(0,U.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`x`,t.length]}):void 0]},n))]})}),r.length>0?(0,U.jsx)(`div`,{style:{marginBottom:`2em`},children:r.map((e,t)=>(0,U.jsx)(`p`,{style:{fontSize:`xxx-large`,textAlign:`center`},children:e},t))}):void 0,(0,U.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`},children:e.operator?(0,U.jsx)(`p`,{style:{fontSize:`x-large`},children:e.operator}):void 0})]})}function xY(e){return e.oneJobPerPage?(0,U.jsx)(yY,{...e}):(0,U.jsx)(bY,{...e})}function SY({mat:e,materialName:t,operator:n}){let r=(0,L.useRef)(null),i=gJ({contentRef:r,ignoreGlobalStyles:!0});return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{color:`primary`,onClick:()=>i(),children:`Print Label`}),(0,U.jsx)(`div`,{style:{display:`none`},children:(0,U.jsx)(`div`,{ref:r,children:(0,U.jsx)(xY,{materialName:t,material:Array.isArray(e)?e:[e],oneJobPerPage:!1,operator:n})})})]})}function CY(){let e=R(vr),t=R(TI),n=R(OI),[r,i,a]=RI();return!e.usingLabelPrinterForSerials||t===null||t.materialID<0?null:e.useClientPrinterForLabels?n===null?null:(0,U.jsx)(SY,{mat:n}):(0,U.jsx)(X,{color:`primary`,disabled:i||a,onClick:()=>r({materialId:t.materialID,proc:n?.process??0}),children:a?`Printed`:`Print Label`})}var wY=P(null),TY=P(null);function EY(){let[e,t]=B(TY),n=R(Fk),r=(0,L.useRef)(null),i=(0,L.useRef)(!1),a=gJ({contentRef:r,onAfterPrint:()=>t(null),ignoreGlobalStyles:!0}),o=e?n.material.filter(t=>e.materialIds.has(t.materialID)):null;return o?.length!==e?.materialIds.size&&(o=null),(0,L.useEffect)(()=>{if(e===null){i.current&&=!1;return}i.current||o===null||(a(),i.current=!0)},[e,o,i,a]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Dy,{open:e!==null,children:[(0,U.jsx)(By,{children:`Waiting for Material Assignment`}),(0,U.jsx)(Ly,{children:o===null?e===null?(0,U.jsx)(`div`,{}):(0,U.jsxs)(nw,{direction:`column`,spacing:2,sx:{mt:`0.5em`,mb:`0.5em`},children:[(0,U.jsx)(qm,{color:`secondary`}),(0,U.jsx)(`div`,{children:`Waiting for material assignment. This could take a while if a download is currently in progress.`})]}):(0,U.jsx)(`div`,{children:`Printing...`})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{color:`primary`,onClick:()=>t(null),children:`Cancel`})})]}),(0,U.jsx)(`div`,{style:{display:`none`},children:(0,U.jsx)(`div`,{ref:r,children:(0,U.jsx)(xY,{materialName:e?.selectedCasting,material:o,operator:e?.operator,oneJobPerPage:!0})})})]})}function DY({casting:e,queue:t}){let n=R(Fk),r=(0,L.useMemo)(()=>Wq(n.jobs,n.material,t).filter(t=>t.rawMatName===e),[n.jobs,n.material,e,t]);return r.length===0?null:(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Job`}),(0,U.jsx)(Z,{align:`right`,children:`Plan`}),(0,U.jsx)(Z,{align:`right`,children:`Remaining`}),(0,U.jsx)(Z,{align:`right`,children:`Assigned`}),(0,U.jsx)(Z,{align:`right`,children:`Required`}),(0,U.jsx)(Z,{align:`right`,children:`Available`})]})}),(0,U.jsxs)(Sw,{children:[r.map((e,t)=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.job.unique}),(0,U.jsx)(Z,{align:`right`,children:e.job.cycles}),(0,U.jsx)(Z,{align:`right`,children:e.remainingToStart}),(0,U.jsx)(Z,{align:`right`,children:e.assignedRaw}),(0,U.jsx)(Z,{align:`right`,children:Math.max(e.remainingToStart-e.assignedRaw,0)}),(0,U.jsx)(Z,{align:`right`,children:e.availableUnassigned})]},t)),r.length>=2?(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Total`}),(0,U.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.job.cycles)}),(0,U.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.remainingToStart)}),(0,U.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.assignedRaw)}),(0,U.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>Math.max(e.remainingToStart-e.assignedRaw,0))}),(0,U.jsx)(Z,{align:`right`,children:Q.of(r).sumBy(e=>e.availableUnassigned)})]}):void 0]})]})}var OY=(0,L.memo)(function(){let[e,t]=B(wY),n=R(Nk),r=R(vr),i=r.usingLabelPrinterForSerials&&r.useClientPrinterForLabels,[a]=BI(),o=z(TY),[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(!1),h=R(Fk),g=R(EL),_=(0,L.useMemo)(()=>Q.ofObject(h.jobs).flatMap(([,e])=>e.procsAndPaths[0].paths).filter(e=>e.casting!==void 0&&e.casting!==``).map(e=>({casting:e.casting??``,cnt:1})).concat(Q.of(g).map(e=>({casting:e,cnt:0}))).buildOrderedMap(e=>e.casting,(e,t)=>e===void 0?t.cnt:e+t.cnt).toAscLazySeq(),[h.jobs,g]);function v(){t(null),c(null),f(null),m(!1),u(null)}function y(){e!==null&&s!==null&&l!==null&&!isNaN(l)&&l>0&&a({casting:s,quantity:l,queue:e,workorder:null,operator:r.requireOperatorNamePromptWhenAddingMaterial?d:n}),v()}function b(){e!==null&&s!==null&&l!==null&&!isNaN(l)&&(m(!0),a({casting:s,quantity:l,queue:e,operator:n,workorder:null,onNewMaterial:e=>{o({selectedCasting:s,operator:r.requireOperatorNamePromptWhenAddingMaterial?d:n,materialIds:new Set(e.map(e=>e.materialID))}),v()},onError:()=>{v()}}))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Dy,{open:e!==null,onClose:()=>v(),maxWidth:`md`,children:[(0,U.jsx)(By,{children:`Add Raw Material`}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(nw,{direction:`column`,spacing:2,sx:{mt:`0.5em`},children:[(0,U.jsx)(lT,{style:{minWidth:`15em`},value:s||``,onChange:e=>c(e.target.value),select:!0,fullWidth:!0,label:`Raw Material`,slotProps:{select:{renderValue:s===null?void 0:()=>(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{style:{marginRight:`0.5em`},children:(0,U.jsx)(zU,{part:s,size:25})}),(0,U.jsx)(`div`,{children:s})]})}},children:_.map(([e,t],n)=>(0,U.jsxs)(GS,{value:e,children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(zU,{part:e})}),(0,U.jsx)(Bx,{primary:e,slotProps:{primary:{variant:`h4`}},secondary:t===0?`Not used by any current jobs`:`Used by ${t} current job${t>1?`s`:``}`})]},n))}),(0,U.jsx)(lT,{fullWidth:!0,type:`number`,label:`Quantity`,disabled:s===null,slotProps:{htmlInput:{min:`1`}},value:l===null||isNaN(l)||l<=0?``:l,onChange:e=>u(parseInt(e.target.value))}),r.requireOperatorNamePromptWhenAddingMaterial?(0,U.jsx)(lT,{fullWidth:!0,label:`Operator`,value:d||``,onChange:e=>f(e.target.value)}):void 0,s!==null&&e!==null?(0,U.jsx)(DY,{casting:s,queue:e}):void 0]})}),(0,U.jsxs)(jy,{children:[i?(0,U.jsxs)(X,{color:`primary`,disabled:p||s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:b,children:[p?(0,U.jsx)(qm,{size:10}):void 0,`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to`,` `,e]}):(0,U.jsxs)(X,{color:`primary`,disabled:s===null||l===null||isNaN(l)||r.requireOperatorNamePromptWhenAddingMaterial&&(d===null||d===``),onClick:y,children:[`Add `,l!==null&&!isNaN(l)?l.toString()+` `:``,`to`,` `,e]}),(0,U.jsx)(X,{color:`primary`,disabled:p&&i,onClick:v,children:`Cancel`})]})]}),(0,U.jsx)(EY,{})]})}),kY=(0,L.memo)(function(e){let t=R(vr),n=R(Fk).jobs,[r,i]=RI(),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)([]),[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(NaN),[p,m]=(0,L.useState)(void 0);(0,L.useEffect)(()=>{if(e.material===null)return;let t=!0;return o(!0),Kq(e.material).then(e=>{if(t){c(e);let t;for(let n of e)n.type===V.AddToQueue&&n.details?.operator!==void 0&&(t=n.details.operator);m(t)}}).catch(console.error).finally(()=>o(!1)),()=>{t=!1}},[e.material]);let h=(0,L.useMemo)(()=>{if(!e.material||e.material.length===0)return;let t=e.material[0].jobUnique;if(!(!t||t===``||!n[t]))return Q.of(n[t].procsAndPaths[0].paths).filter(e=>e.casting!==void 0&&e.casting!==``).head()?.casting},[e.material,n]);function g(){e.closeDialog(),u(!1),f(NaN),o(!1),c([])}function _(){l?isNaN(d)||(o(!0),Vt.bulkRemoveMaterialFromQueues(e.operator,Q.of(e.material||[]).take(d).map(e=>e.materialID).toRArray()).catch(console.error).finally(g)):u(!0)}let v=e.material?.[0];return(0,U.jsxs)(Dy,{open:e.material!==null,onClose:g,maxWidth:`md`,children:[(0,U.jsx)(By,{children:v&&e.material&&e.material.length>0?(0,U.jsx)(iW,{partName:v.partName,subtitle:e.material.length.toString()+(v.jobUnique&&v.jobUnique!==``?` assigned to `+v.jobUnique:` unassigned`)}):`Material`}),(0,U.jsxs)(Ly,{children:[a?(0,U.jsx)(qm,{color:`secondary`}):(0,U.jsx)(bI,{entries:s,copyToClipboard:!0}),l&&e.material?(0,U.jsx)(`div`,{style:{marginTop:`1em`},children:(0,U.jsx)(lT,{type:`number`,variant:`outlined`,fullWidth:!0,label:`Quantity to Remove`,slotProps:{htmlInput:{min:`1`,max:e.material.length.toString()}},value:isNaN(d)?``:d,onChange:e=>f(parseInt(e.target.value))})}):void 0]}),(0,U.jsxs)(jy,{children:[e.material&&e.material.length>0&&t.usingLabelPrinterForSerials?t.useClientPrinterForLabels?(0,U.jsx)(SY,{mat:e.material||[],materialName:h,operator:p}):(0,U.jsx)(X,{color:`primary`,disabled:i,onClick:()=>e.material&&e.material.length>0?r({materialId:e.material[0].materialID,proc:0}):void 0,children:`Print Label`}):void 0,(0,U.jsx)(X,{color:`primary`,onClick:_,disabled:a||l&&isNaN(d),children:a&&l?`Removing...`:l&&!isNaN(d)?`Remove ${d} material`:`Remove Material`}),(0,U.jsx)(X,{color:`primary`,onClick:g,children:`Close`})]})]})}),AY=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(!1),i=z(SI);function a(){r(!1),t(null)}function o(){e&&e!==``&&(i({type:`ManuallyEnteredSerial`,serial:e}),a())}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:`Enter Serial`,children:(0,U.jsx)($m,{onClick:()=>r(!0),size:`large`,children:(0,U.jsx)(_E,{})})}),(0,U.jsxs)(Dy,{open:n,onClose:a,maxWidth:`md`,children:[(0,U.jsx)(By,{children:`Enter a part's serial`}),(0,U.jsx)(Ly,{children:(0,U.jsx)(`div`,{style:{minWidth:`20em`},children:(0,U.jsx)(lT,{sx:{mt:`5px`},label:e===null||e===``?`Serial`:`Serial (press enter)`,value:e??``,fullWidth:!0,autoFocus:!0,onChange:e=>t(e.target.value),onKeyDown:t=>{t.key===`Enter`&&e&&e!==``&&(t.preventDefault(),o())}})})}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{onClick:o,disabled:e===null||e===``,color:`secondary`,children:`Open`}),(0,U.jsx)(X,{onClick:a,color:`secondary`,children:`Cancel`})]})]})]})}),jY=P(null),MY=(0,L.memo)(function(){let[e,t]=B(jY),n=z(SI),[r,i]=(0,L.useState)(void 0);function a(){r&&r!==``&&e!==null&&(n({type:`AddMatWithEnteredSerial`,serial:r,toQueue:e}),t(null),i(void 0))}function o(){t(null),i(void 0)}return(0,U.jsxs)(Dy,{open:e!==null,onClose:o,maxWidth:`md`,children:[(0,U.jsxs)(By,{children:[`Lookup Material To Add To `,e]}),(0,U.jsx)(Ly,{children:(0,U.jsx)(lT,{label:`Serial`,style:{marginTop:`0.5em`},autoFocus:!0,fullWidth:!0,value:r||``,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r&&r!==``&&(e.preventDefault(),a())}})}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{onClick:a,color:`secondary`,children:`Lookup Serial`}),(0,U.jsx)(X,{onClick:o,color:`primary`,children:`Cancel`})]})]})});function NY(e){let t=R(TI),n=R(OI),r=R(wI);return!(n!==null&&n.location.type===at.InQueue&&n.location.currentQueue&&e.includes(n.location.currentQueue)||n?.location.type===at.OnPallet||n?.action.type===H.Loading||n?.action.type===H.LoadingToBasket||t===null&&!r)}var PY=K(GT,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({theme:e,$expandedOpen:t})=>({transform:t?`rotate(0deg)`:`rotate(-90deg)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shortest})}));function FY({newMaterialTy:e,setNewMaterialTy:t,castings:n,indent:r}){return(0,U.jsx)(gx,{sx:r?e=>({pl:e.spacing(4)}):void 0,children:n.map(n=>(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{selected:e?.kind===`RawMat`&&e?.rawMatName===n.casting,onClick:()=>t({kind:`RawMat`,rawMatName:n.casting}),children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(zU,{part:n.casting})}),(0,U.jsx)(Bx,{primary:n.casting,secondary:n.message??void 0,slotProps:{primary:{variant:`h4`}}})]})},n.casting))})}function IY({newMaterialTy:e,setNewMaterialTy:t,curCollapse:n,setCurCollapse:r,indent:i,jobs:a}){return(0,U.jsx)(gx,{sx:i?e=>({pl:e.spacing(4)}):void 0,children:a.map((a,o)=>a.machinedProcs.length===1?(0,U.jsx)(`div`,{children:(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{alignItems:`flex-start`,selected:e?.kind===`JobAndProc`&&e?.jobUnique===a.jobUnique&&e?.last_proc===a.machinedProcs[0].lastProc,onClick:()=>t({kind:`JobAndProc`,jobUnique:a.jobUnique,last_proc:a.machinedProcs[0].lastProc,workorder:a.workorder}),children:[a.job?(0,U.jsx)(Fx,{children:(0,U.jsx)(zU,{part:a.job.partName})}):void 0,(0,U.jsx)(Bx,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:(0,U.jsxs)(J,{variant:`body2`,children:[a.machinedProcs[0].lastProc===0?`Raw Material`:`Last machined process `+a.machinedProcs[0].lastProc.toString(),`, `,a.job?.routeStartUTC.toLocaleDateString()??``,`,`,` `,a.machinedProcs[0].details]})})]})})},o):(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{onClick:()=>{e&&t(null),r(n&&n.kind===`Job`&&n.unique===a.jobUnique?null:{kind:`Job`,unique:a.jobUnique})},children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(PY,{$expandedOpen:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique})}),a.job?(0,U.jsx)(Fx,{children:(0,U.jsx)(zU,{part:a.job.partName})}):void 0,(0,U.jsx)(Bx,{primary:(a.job?.partName??``)+` (`+a.jobUnique+`)`,slotProps:{primary:{variant:`h4`}},secondary:a.job?.routeStartUTC.toLocaleDateString()})]})}),(0,U.jsx)(Lp,{in:n!==null&&n.kind===`Job`&&n.unique===a.jobUnique,timeout:`auto`,children:a.machinedProcs.map((n,r)=>(0,U.jsx)(`div`,{children:(0,U.jsx)(Ax,{sx:e=>({pl:e.spacing(i?8:4)}),children:(0,U.jsx)(xx,{selected:e?.kind===`JobAndProc`&&e?.jobUnique===a.jobUnique&&e?.last_proc===n.lastProc,onClick:()=>t({kind:`JobAndProc`,jobUnique:a.jobUnique,last_proc:n.lastProc,workorder:a.workorder}),children:(0,U.jsx)(Bx,{primary:n.lastProc===0?`Raw Material`:`Last machined process `+n.lastProc.toString(),secondary:n.details})})})},r))})]},o))})}function LY({newMaterialTy:e,options:t,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i}){return(0,U.jsxs)(gx,{children:[(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{onClick:()=>{e&&n(null),i(r&&r.kind===`RawMat`?null:{kind:`RawMat`})},children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(PY,{$expandedOpen:r!==null&&r.kind===`RawMat`})}),(0,U.jsx)(Bx,{primary:`Raw Material`})]})}),(0,U.jsx)(Lp,{in:r!==null&&r.kind===`RawMat`,timeout:`auto`,children:(0,U.jsx)(FY,{castings:t.castings,newMaterialTy:e,setNewMaterialTy:n,indent:!0})}),(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{onClick:()=>{e&&n(null),i(r&&(r.kind===`AllJobs`||r.kind===`Job`)?null:{kind:`AllJobs`})},children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(PY,{$expandedOpen:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`)})}),(0,U.jsx)(Bx,{primary:`Specify Job`})]})}),(0,U.jsx)(Lp,{in:r!==null&&(r.kind===`AllJobs`||r.kind===`Job`),timeout:`auto`,children:(0,U.jsx)(IY,{newMaterialTy:e,jobs:t.jobs,setNewMaterialTy:n,curCollapse:r,setCurCollapse:i,indent:!0})})]})}function RY({newMaterialTy:e,setNewMaterialTy:t,toQueue:n}){let r=R(kI),i=R(TI),[a,o]=(0,L.useState)(null),s=Vq(n);return i||r===null||n===null?null:s.castings.length===0&&s.jobs.length===0?(0,U.jsxs)(`div`,{children:[`No jobs are currently scheduled for `,n]}):s.jobs.length===0?(0,U.jsx)(FY,{newMaterialTy:e,setNewMaterialTy:t,castings:s.castings}):s.castings.length===0?(0,U.jsx)(IY,{jobs:s.jobs,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o}):(0,U.jsx)(LY,{options:s,newMaterialTy:e,setNewMaterialTy:t,curCollapse:a,setCurCollapse:o})}function zY({selectedQueue:e,setSelectedQueue:t,queueNames:n}){let r=(0,L.useRef)(null);return(0,L.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r]),(0,U.jsxs)(`div`,{ref:r,children:[(0,U.jsx)(`p`,{children:`Select a queue`}),(0,U.jsx)(gx,{children:n.map((n,r)=>(0,U.jsx)(xx,{selected:n===e,onClick:()=>t(n),children:n},r))})]})}function BY({enteredOperator:e,setEnteredOperator:t}){return R(vr).requireOperatorNamePromptWhenAddingMaterial?(0,U.jsx)(`div`,{style:{marginLeft:`1em`},children:(0,U.jsx)(lT,{fullWidth:!0,label:`Operator`,value:e||``,required:!0,onChange:e=>t(e.target.value)})}):null}function VY({st:e,queueNames:t,setState:n}){return NY(t)?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ZU,{}),t.length>1?(0,U.jsx)(zY,{selectedQueue:e.toQueue,setSelectedQueue:t=>{n({toQueue:t,newMaterialTy:null,enteredOperator:e.enteredOperator})},queueNames:t}):void 0,(0,U.jsx)(RY,{newMaterialTy:e.newMaterialTy,toQueue:t.length>1?e.toQueue:t[0]??null,setNewMaterialTy:t=>n({...e,newMaterialTy:t})}),(0,U.jsx)(BY,{enteredOperator:e.enteredOperator,setEnteredOperator:t=>n({...e,enteredOperator:t})})]}):null}function HY({st:{enteredOperator:e,newMaterialTy:t,toQueue:n},queueNames:r,onClose:i}){let a=R(vr),o=R(Nk),s=z(SI),c=R(kI),l=R(AI),u=R(TI),d=R(OI),f=R(NI),[p,m]=zI(),[h,g]=kie(),[_,v]=BI();if(!NY(r))return null;n===null&&r.length===1&&(n=r[0]);let y=``;if(u!==null){if(f&&f.process>=f.totalNumProcesses)return null;y=` To Run Process `+((f?.process??0)+1).toString()}else t?.kind===`JobAndProc`&&t?.last_proc!==void 0&&(y=` To Run Process `+(t.last_proc+1).toString()),t?.kind===`RawMat`&&t?.rawMatName&&(y=` As `+t.rawMatName);let b=``;!u&&c&&c!==``&&(b=` With Serial `+c);let x=d?.location.currentQueue??null;return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(tw,{title:n===null?`Select a queue to add the material to`:a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``)?`Please enter an operator name`:``,children:(0,U.jsx)(`span`,{children:(0,U.jsx)(X,{color:`primary`,disabled:n===null||m||g||v||u===null&&t===null||a.requireOperatorNamePromptWhenAddingMaterial&&(e===null||e===``),onClick:()=>{u?p({materialId:u.materialID,queue:n??``,queuePosition:-1,operator:e??o}):t&&t.kind===`JobAndProc`&&t.jobUnique?h({jobUnique:t.jobUnique,lastCompletedProcess:t.last_proc,serial:c??void 0,workorder:l??t?.workorder,queue:n??``,queuePosition:-1,operator:e??o}):t&&t.kind===`RawMat`&&t.rawMatName&&_({casting:t.rawMatName,quantity:1,queue:n??``,serials:c?[c]:void 0,workorder:l,operator:e??o}),s(null),i()},children:n===null?`Add to Queue`:(0,U.jsxs)(`span`,{children:[x===null?`Add To`:`Move From ${x} To`,` `,n,b,y]})})})})})}function UY(e){let t=R(vr),[n,r]=Die(),[i,a]=Oie(),o=R(OI),s=R(Fk),c=R(Nk);if(e&&(c=null),o===null||o.materialID<0)return null;let l=t.quarantineQueue?.length?t.quarantineQueue:null,u=Q.ofObject(s.jobs).flatMap(([e,t])=>t.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>{let t=[];return e.inputQueue!==void 0&&t.push(e.inputQueue),e.outputQueue!==void 0&&t.push(e.outputQueue),t}).concat(Q.ofObject(s.queues).filter(([,e])=>e.role===ct.RawMaterial||e.role===ct.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),d=Q.ofObject(s.queues).filter(([e,t])=>!u.has(e)).toRSet(([e,t])=>e),f=Q.ofObject(s.pallets).toOrderedMap(([e,t])=>[t.palletNum,t.currentPalletLocation]);if(o.location.type===at.InQueue&&o.location.currentQueue&&d.has(o.location.currentQueue))return{type:`Remove`,quarantine:()=>n(o.materialID,c),removing:r,quarantineQueueDestination:null};let p=null;switch(o.location.type){case at.OnPallet:if(t.allowQuarantineToCancelLoad){let e=o.location.palletNum&&f.get(o.location.palletNum)?.loc===nt.LoadUnload;p=o.action.type===H.Loading||e?`CancelLoad`:`SignalForScrap`}else{if(o.action.type===H.Loading)return null;let e=s.jobs[o.jobUnique];if(!e)return null;let t=e.procsAndPaths?.[o.process-1]?.paths?.[o.path-1];if(o.process!=e.procsAndPaths.length&&(!t||!t.outputQueue))return null;p=`SignalForScrap`}break;case at.InQueue:if((o.action.type===H.Loading||o.action.type===H.LoadingToBasket)&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===H.Loading||o.action.type===H.LoadingToBasket?`CancelLoad`:`Scrap`;break;case at.InBasket:if(o.action.type===H.Loading&&!t.allowQuarantineToCancelLoad)return null;p=o.action.type===H.Loading?`CancelLoad`:`Scrap`;break;case at.Free:p=`Scrap`;break}return p?{type:p,quarantine:e=>i(o.materialID,c,e),removing:a,quarantineQueueDestination:l}:null}function WY({onClose:e,ignoreOperator:t}){let[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(``),o=UY(!!t),s=z(SI);if(o===null)return null;let c,l;switch(o.type){case`Remove`:c=`Remove from system`,l=`Remove`;break;case`Scrap`:c=o.quarantineQueueDestination?`Move to ${o.quarantineQueueDestination}`:`Remove from queue`,l=o.quarantineQueueDestination?`Quarantine`:`Remove`;break;case`SignalForScrap`:c=o.quarantineQueueDestination?`After unload, move to ${o.quarantineQueueDestination}`:`After unload, remove the part as scrap`,l=o.quarantineQueueDestination?`Quarantine`:`Scrap`;break;case`CancelLoad`:c=o.quarantineQueueDestination?`Cancel load and move to ${o.quarantineQueueDestination}`:`Cancel load`,l=`Cancel Load`;break}function u(){o?.quarantine(i),s(null),r(!1),a(``),e?.()}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:c,children:(0,U.jsx)(X,{color:`primary`,disabled:o.removing,onClick:()=>r(!0),children:l})}),(0,U.jsxs)(Dy,{open:n,onClose:()=>r(!1),children:[(0,U.jsx)(By,{children:`Quarantine Material`}),(0,U.jsxs)(Ly,{children:[(0,U.jsx)(`p`,{children:c}),(0,U.jsx)(lT,{label:`Reason`,value:i,onChange:e=>a(e.target.value),fullWidth:!0,autoFocus:!0,multiline:!0})]}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{color:`primary`,onClick:u,children:l}),(0,U.jsx)(X,{color:`secondary`,onClick:()=>r(!1),children:`Cancel`})]})]})]})}function GY(e){let t=R(NI),n=R(wI),r=R(Fk),i=R(lk),a=Object.values(n?.possibleCastingsByQueue??{}).flatMap(e=>e),o=Object.values(n?.possibleJobsByQueue??{}).flatMap(e=>e).filter(e=>e.lastCompletedProcess===0).map(e=>({jobUnique:e.jobUnique,job:r.jobs[e.jobUnique]??i.get(e.jobUnique)??null})),s=t!==null&&t.process>=1,c=a.length>0||o.length>0;function l(t){e.setState({updating:!1,process:t.startsWith(`proc`)?parseInt(t.substring(4)):null,changeRawMat:t.startsWith(`rawMat`)?t.substring(6):null,changeJobUnique:t.startsWith(`job`)?t.substring(3):null})}return(0,U.jsx)(lT,{value:e.st?.process?`proc`+e.st.process.toString():e.st?.changeRawMat?`rawMat`+e.st.changeRawMat:e.st?.changeJobUnique?`job`+e.st.changeJobUnique:``,select:!0,onChange:e=>l(e.target.value),variant:`outlined`,label:e.st?.process||!c?`Invalidate Process`:e.st?.changeRawMat?`Change Raw Material`:e.st?.changeJobUnique?`Change Assigned Job`:s?``:`Change Assignment`,children:[s&&c?[(0,U.jsx)(w_,{children:`Invalidate Selected Process`},`procheader`)]:[],t?Q.ofRange(1,t.process+1).map(e=>(0,U.jsxs)(GS,{value:`proc`+e.toString(),children:[`Invalidate Process `,e]},e)).toRArray():[],s&&c?[(0,U.jsx)(w_,{children:`Change Material Type`},`matheader`)]:[],c?[...a.map(e=>(0,U.jsxs)(GS,{value:`rawMat`+e,children:[`Invalidate Everything And Change to `,e]},`rawMat`+e)),...o.map(({jobUnique:e,job:t})=>(0,U.jsxs)(GS,{value:`job`+e,children:[t?(0,U.jsx)(Fx,{children:(0,U.jsx)(zU,{part:t.partName})}):void 0,(0,U.jsx)(Bx,{primary:`Invalidate Everything And Change To Job `+e,secondary:t?.partName})]},`job`+e))]:[]]})}function KY(e){let t=R(TI),n=e.st!==null&&t!==null,r=(0,L.useRef)(null);return(0,L.useEffect)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[r,n]),n?(0,U.jsx)(Y,{ref:r,sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,marginTop:`1em`},children:(0,U.jsxs)(nw,{spacing:2,children:[(0,U.jsx)(`p`,{style:{maxWidth:`35em`},children:`An invalidated cycle remains in the event log, but is not considered when determining the next process to be machined on a piece of material.`}),(0,U.jsx)(GY,{st:e.st,setState:e.setState})]})}):(0,U.jsx)(`div`,{})}function qY(e){let t=R(vr),n=R(TI),r=R(OI),i=R(NI),a=R(wI),o=z(SI),s=R(Nk);if(e.loadStation&&!t.allowInvalidateMaterialAtLoadStation||!e.loadStation&&!t.allowInvalidateMaterialOnQueuesPage||n===null||r&&r.location.type===at.OnPallet||!(a!==null&&(!Q.ofObject(a.possibleCastingsByQueue??{}).isEmpty()||!Q.ofObject(a.possibleJobsByQueue??{}).isEmpty()))&&(i===null||i.process<1))return null;e.ignoreOperator&&(s=null);function c(){e.setState({process:null,updating:!1,changeRawMat:null,changeJobUnique:null})}function l(){n&&(e.st?.process||e.st?.changeRawMat||e.st?.changeJobUnique)&&(e.setState({...e.st,updating:!0}),Vt.invalidatePalletCycle(n.materialID,s,e.st?.changeRawMat,e.st?.changeJobUnique,e.st?.process??0).then(t=>{t?(o({type:`MatDetails`,details:t}),e.onClose()):(o(null),e.onClose())}).catch(t=>{console.log(t),o(null),e.onClose()}))}return(0,U.jsxs)(U.Fragment,{children:[e.st===null?(0,U.jsx)(X,{color:`primary`,onClick:c,children:`Invalidate Cycle`}):void 0,e.st===null?void 0:(0,U.jsx)(X,{color:`primary`,onClick:l,disabled:e.st.updating||e.st.process===null&&e.st.changeRawMat===null&&e.st.changeJobUnique===null,children:e.st.process===null?e.st.changeJobUnique===null?e.st.changeRawMat===null?`Invalidate Cycle`:`Invalidate And Change To `+e.st.changeRawMat:`Invalidate And Change To Job `+e.st.changeJobUnique:`Invalidate Process `+e.st.process.toString()})]})}function JY(e){return e==null||e==``}function YY(e,t){return n=>{if(JY(n.serial)||n.location.type===at.OnPallet||n.process!==e.process-1)return!1;if(JY(n.jobUnique)){if(JY(n.partName)||n.partName!==e.partName&&(!t||!Q.of(t.procsAndPaths).flatMap(e=>e.paths).some(e=>e.casting===n.partName)))return!1}else if(n.jobUnique!==e.jobUnique||n.path!==e.path)return!1;return!0}}function XY(e){let t=R(Fk),n=R(OI);if(n===null||e.st===null)return(0,U.jsx)(`div`,{});let r=t.jobs[n.jobUnique],i=t.material.filter(YY(n,r));return i.length===0?(0,U.jsx)(`p`,{style:{margin:`2em`},children:`No material with the same job is available for swapping. You must edit the pallet using the cell controller software to remove the material from the pallet. Insight will automatically refresh once the cell controller software is updated.`}):(0,U.jsxs)(`div`,{style:{margin:`2em`},children:[(0,U.jsx)(`p`,{children:`Swap serial on pallet with material from the same job.`}),(0,U.jsx)(`p`,{children:`If material on the pallet is from a different job, you cannot use this screen. Instead, the material must first be removed from the pallet using the cell controller software. Insight will automatically refresh when this occurs.`}),(0,U.jsx)(lT,{value:e.st?.selectedMatToSwap?.serial??``,select:!0,onChange:t=>e.st&&e.setState({...e.st,selectedMatToSwap:i.find(e=>e.serial===t.target.value)??null}),style:{width:`20em`},variant:`outlined`,label:`Select serial to swap with `+(n.serial??``),children:i.map(e=>(0,U.jsx)(GS,{value:e.serial,children:e.serial},e.materialID))})]})}function ZY(e){let t=R(vr),n=R(OI),r=z(SI),i=R(Nk);if(!t.allowSwapSerialAtLoadStation||(e.ignoreOperator&&(i=null),!n||n.location.type!==at.OnPallet||n.action.type===H.Loading||n.action.type===H.UnloadToCompletedMaterial||n.action.type===H.UnloadToInProcess))return null;function a(){n&&e.st&&e.st.selectedMatToSwap&&n.location.type===at.OnPallet&&(e.setState({selectedMatToSwap:e.st.selectedMatToSwap,updating:!0}),Vt.swapMaterialOnPallet(n.materialID,i,{pallet:n.location.palletNum??0,materialIDToSetOnPallet:e.st.selectedMatToSwap.materialID}).catch(console.log).finally(()=>{r(null),e.onClose()}))}return(0,U.jsxs)(U.Fragment,{children:[e.st===null?(0,U.jsx)(X,{color:`primary`,onClick:()=>e.setState({selectedMatToSwap:null,updating:!1}),children:`Swap Serial`}):void 0,e.st===null?void 0:(0,U.jsx)(X,{color:`primary`,onClick:a,disabled:e.st.selectedMatToSwap===null||e.st.updating,children:e.st.selectedMatToSwap===null?`Swap Serial`:`Swap with `+(e.st.selectedMatToSwap.serial??``)})]})}var QY=K(Mw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noBorderBottom:e,$highlightedRow:t,$noncompletedRow:n})=>({...e&&{"& > *":{borderBottom:`unset`}},backgroundColor:t?`#FF8A65`:n?`#E0E0E0`:void 0})),$Y=[/\bhold\b/,/\bmissing\b/,/\bwait\b/,/\bwaiting\b/,/\bnone\b/];function eX(e){let t=e.comment;return!t||t===``?!1:Q.of($Y).some(e=>e.test(t))}function tX(e){let t=(R(vr).allowEditJobPlanQuantityFromQueuesPage??null)!=null,[n,r]=(0,L.useState)(!1),i=e.job,a=eX(i.job);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(QY,{$noBorderBottom:!0,$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:i.job.partName,size:25})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{variant:`body2`,component:`span`,sx:{display:`block`},children:i.job.unique})})]})}),(0,U.jsx)(Z,{children:i.startingTime?i.startingTime.toLocaleString():``}),(0,U.jsx)(Z,{children:i.rawMatName===i.job.partName?i.rawMatName:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:i.rawMatName,size:25})}),(0,U.jsx)(J,{variant:`body2`,sx:{display:`block`},children:i.rawMatName})]})}),(0,U.jsxs)(Z,{children:[i.job.comment,(0,U.jsx)(tw,{title:`Edit`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>e.editNote(i.job),children:(0,U.jsx)(VT,{})})})]}),(0,U.jsxs)(Z,{align:`right`,children:[i.job.cycles??0,t?(0,U.jsx)(tw,{title:`Edit`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>e.editQty(i),children:(0,U.jsx)(VT,{})})}):void 0]}),(0,U.jsx)(Z,{align:`right`,children:i.remainingToStart}),(0,U.jsx)(Z,{align:`right`,children:i.assignedRaw}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:i.remainingToStart>0||i.assignedRaw>0?`${i.remainingToStart} - ${i.assignedRaw}`:``,children:(0,U.jsx)(`span`,{children:Math.max(i.remainingToStart-i.assignedRaw,0)})})}),(0,U.jsx)(Z,{align:`right`,children:i.availableUnassigned}),(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Show Details`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>r(!n),children:n?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})})})]}),(0,U.jsx)(QY,{$highlightedRow:a,$noncompletedRow:i.remainingToStart-i.assignedRaw>0,children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:10,children:(0,U.jsx)(Lp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(Qq,{job:i.job,checkAnalysisMonth:!1})})})})]})}function nX(e){let t=R(Fk),n=(0,L.useMemo)(()=>Wq(t.jobs,t.material,e.queue),[t,e.queue]);return n.length===0?null:(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Job`}),(0,U.jsx)(Z,{children:`Starting Time`}),(0,U.jsx)(Z,{children:`Material`}),(0,U.jsx)(Z,{children:`Note`}),(0,U.jsx)(Z,{align:`right`,children:`Planned Quantity`}),(0,U.jsx)(Z,{align:`right`,children:`Remaining To Start`}),(0,U.jsx)(Z,{align:`right`,children:`Assigned Raw Material`}),(0,U.jsx)(Z,{align:`right`,children:`Required`}),(0,U.jsx)(Z,{align:`right`,children:`Available Unassigned`}),(0,U.jsx)(Z,{})]})}),(0,U.jsx)(Sw,{children:n.map((t,n)=>(0,U.jsx)(tX,{job:t,editNote:e.editNote,editQty:e.editQty},n))})]})}var rX=(0,L.memo)(function({workorder:e,inProc:t}){let n=z(sX);return(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.workorderId}),(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:e.part,size:25})}),(0,U.jsx)(J,{variant:`body2`,sx:{display:`block`},children:e.part})]})}),(0,U.jsxs)(Z,{children:[e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment:``,(0,U.jsx)(tw,{title:`Edit`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>n(e),children:(0,U.jsx)(VT,{})})})]}),(0,U.jsx)(Z,{children:e.dueDate.toLocaleDateString()}),(0,U.jsx)(Z,{children:e.priority}),(0,U.jsx)(Z,{children:e.plannedQuantity}),(0,U.jsx)(Z,{children:e.completedQuantity}),(0,U.jsx)(Z,{children:t}),(0,U.jsx)(Z,{children:Math.max(0,e.plannedQuantity-e.completedQuantity-t)})]})}),iX=(0,L.memo)(function(){let e=R(Fk);if(!e.workorders||e.workorders.length===0)return null;let t=Q.of(e.workorders).sortBy(e=>e.dueDate.getTime(),e=>e.priority),n=Q.of(e.material).filter(e=>!!e.workorderId&&e.workorderId!==``).toLookupMap(e=>e.workorderId??``,e=>e.partName,()=>1,(e,t)=>e+t);return(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Workorder`}),(0,U.jsx)(Z,{children:`Part`}),(0,U.jsx)(Z,{children:`Comment`}),(0,U.jsx)(Z,{children:`Due Date`}),(0,U.jsx)(Z,{children:`Priority`}),(0,U.jsx)(Z,{children:`Planned Qty`}),(0,U.jsx)(Z,{children:`Completed Qty`}),(0,U.jsx)(Z,{children:`In Process`}),(0,U.jsx)(Z,{children:`Remaining To Assign`})]})}),(0,U.jsx)(Sw,{children:t.map(e=>(0,U.jsx)(rX,{workorder:e,inProc:n.get(e.workorderId)?.get(e.part)??0},`${e.workorderId}-${e.part}`))})]})}),aX=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),r=z(Lk);function i(){e.closeDialog(),n(null)}function a(){t===null||e.job===null||t===e.job.comment||(r(e.job.unique,t),i())}return(0,U.jsx)(Dy,{open:e.job!==null,onClose:i,children:e.job===null?void 0:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(zU,{part:e.job.partName,size:40})}),(0,U.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Note For `,e.job.unique]})]})}),(0,U.jsx)(Ly,{children:(0,U.jsx)(lT,{variant:`outlined`,fullWidth:!0,autoFocus:!0,value:t===null?e.job.comment||``:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.keyCode===13&&t!==null&&(a(),e.preventDefault())}})}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{color:`primary`,disabled:t===null,onClick:a,children:`Save Note`}),(0,U.jsx)(X,{color:`primary`,onClick:i,children:`Cancel`})]})]})})}),oX=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(null),a=R(vr).allowEditJobPlanQuantityFromQueuesPage??null;function o(){t||(e.closeDialog(),i(null))}async function s(){if(!(a===null||e.job===null||r==null||isNaN(r))){n(!0);try{await fetch(a,{method:`PUT`,headers:new Headers({"Content-Type":`application/json`}),body:JSON.stringify({Unique:e.job.job.unique,Quantity:r})}),e.closeDialog(),i(null)}finally{n(!1)}}}return(0,U.jsx)(Dy,{open:a!=null&&e.job!==null,onClose:o,children:e.job===null?void 0:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(zU,{part:e.job.job.partName,size:40})}),(0,U.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Edit Planned Quantity For `,e.job.job.unique]})]})}),(0,U.jsxs)(Ly,{children:[(0,U.jsxs)(`p`,{children:[e.job.job.cycles,` currently planned, `,e.job.remainingToStart,` remaining to start`]}),(0,U.jsx)(lT,{variant:`outlined`,fullWidth:!0,autoFocus:!0,type:`number`,value:r===null?``:r,onChange:e=>i(parseInt(e.target.value)),slotProps:{htmlInput:{style:{textAlign:`right`},min:(e.job.job.cycles??0)-e.job.remainingToStart}}})]}),(0,U.jsxs)(jy,{children:[(0,U.jsxs)(X,{color:`primary`,disabled:t||r===null||isNaN(r),onClick:()=>void s(),children:[t?(0,U.jsx)(qm,{size:10}):void 0,`Set Quantity`]}),(0,U.jsx)(X,{color:`primary`,disabled:t,onClick:o,children:`Cancel`})]})]})})}),sX=P(null);function cX(){let[e,t]=B(sX),[n,r]=(0,L.useState)(null),i=z(Rk);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,U.jsx)(Dy,{open:e!==null,onClose:a,children:e===null?void 0:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(zU,{part:e.part,size:40})}),(0,U.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,U.jsxs)(Ly,{children:[(0,U.jsx)(`ul`,{children:(e.comments??[]).map((e,t)=>(0,U.jsx)(`li`,{children:(0,U.jsxs)(J,{variant:`body1`,children:[e.timeUTC.toLocaleString(),`: `,e.comment]})},t))}),(0,U.jsx)(lT,{variant:`outlined`,sx:{mt:`1em`},fullWidth:!0,autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n!==null&&n!==``&&(o(),e.preventDefault())}})]}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{color:`primary`,onClick:o,children:`Save Comment`}),(0,U.jsx)(X,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}var lX=(0,L.memo)(function(e){let t=R(vr),n=z(wY),r=z(jY),i=z(jq);if(!t.addToQueueButton||t.addToQueueButton===Oe.DoNotShow)return null;function a(){switch(t.addToQueueButton){case Oe.DoNotShow:return;case Oe.AddBulkUnassigned:e.rawMatQueue?n(e.label):r(e.label);break;case Oe.LookupExistingSerial:r(e.label);return;case Oe.ManualBarcodeScan:i(e.label);return}}return e.rawMatQueue?(0,U.jsx)(tw,{title:`Add Raw Material`,children:(0,U.jsx)(Zy,{color:`secondary`,onClick:a,size:`large`,style:{marginBottom:`-30px`,zIndex:1},children:(0,U.jsx)(yT,{})})}):e.inProcQueue?(0,U.jsx)(tw,{title:`Add Material`,children:(0,U.jsx)(Zy,{color:`secondary`,onClick:a,size:`medium`,style:{marginBottom:`-30px`,zIndex:1},children:(0,U.jsx)(xT,{fontSize:`inherit`})})}):null});function uX(e){let t=R(SI);return t&&t.type===`AddMatWithEnteredSerial`||t&&t.type===`Barcode`&&t.toQueue?e.includes(t.toQueue)?[t.toQueue]:[]:e}var dX=(0,L.memo)(function({queueNames:e}){let[t,n]=(0,L.useState)({toQueue:null,enteredOperator:null,newMaterialTy:null}),[r,i]=(0,L.useState)(null),a=(0,L.useCallback)(()=>{n({toQueue:null,enteredOperator:null,newMaterialTy:null}),i(null)},[]);return e=uX(e),(0,U.jsx)(pW,{allowNote:!0,onClose:a,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(KY,{st:r,setState:i}),(0,U.jsx)(VY,{queueNames:e,st:t,setState:n})]}),buttons:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(CY,{}),(0,U.jsx)(WY,{onClose:a}),(0,U.jsx)(qY,{onClose:a,st:r,setState:i}),(0,U.jsx)(HY,{st:t,queueNames:e,onClose:a})]})})}),fX=e=>{let t=R(Nk),n=R(Fk),r=R(SL),i=R(wL),a=(0,L.useMemo)(()=>Gq(e.queues,n,r,i),[n,e.queues,r,i]),o=!Q.ofObject(n.jobs).isEmpty(),[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(()=>c(null),[]),[u,d]=(0,L.useState)(null),f=(0,L.useCallback)(()=>d(null),[]),[p,m]=(0,L.useState)(null),h=(0,L.useCallback)(()=>m(null),[]);return(0,U.jsxs)(Y,{sx:{padding:`8px`,width:`100%`},children:[a.map((e,t)=>(0,U.jsx)(`div`,{style:t<a.length-1?{borderBottom:`1px solid black`}:void 0,children:(0,U.jsx)(tJ,{matIds:e.material.map(e=>e.materialID),direction:`rect`,queueName:e.label,renderDragOverlay:t=>(0,U.jsx)(nW,{mat:t,hideEmptySerial:!0,displayJob:o&&e.rawMaterialQueue,fsize:`normal`}),children:(0,U.jsxs)(Y,{sx:{minHeight:`134px`},children:[(0,U.jsxs)(Y,{sx:{display:`flex`,margin:`4px`},children:[(0,U.jsx)(J,{variant:`h4`,sx:{flexGrow:1},children:e.label}),e.free?void 0:(0,U.jsx)(lX,{label:e.label,rawMatQueue:e.rawMaterialQueue,inProcQueue:e.inProcQueue})]}),(0,U.jsxs)(Y,{sx:{justifyContent:`flex-start`,display:`flex`,flexWrap:`wrap`},children:[e.material.map((t,n)=>(0,U.jsx)(tW,{mat:t,hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},n)),e.groupedRawMat&&e.groupedRawMat.length>0?e.groupedRawMat.map((n,r)=>n.material.length===1?(0,U.jsx)(eW,{mat:n.material[0],hideEmptySerial:!0,fsize:`normal`,displayJob:o&&e.rawMaterialQueue},r):(0,U.jsx)(rW,{partOrCasting:n.partOrCasting,assignedJobUnique:n.assignedJobUnique,material:n.material,fsize:`normal`,onOpen:()=>m(n.material)},t)):void 0,e.rawMaterialQueue?o?(0,U.jsx)(nX,{queue:e.label,editNote:c,editQty:d}):(0,U.jsx)(iX,{}):void 0]})]})})},t)),(0,U.jsx)(dX,{queueNames:e.queues}),(0,U.jsx)(MY,{}),(0,U.jsx)(Mq,{}),(0,U.jsx)(OY,{}),(0,U.jsx)(aX,{job:s,closeDialog:l}),(0,U.jsx)(oX,{job:u,closeDialog:f}),(0,U.jsx)(cX,{}),(0,U.jsx)(kY,{material:p,closeDialog:h,operator:t})]})};function pX(e){return qI(`Queues`),(0,U.jsx)(Y,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,U.jsx)(fX,{...e})})}var mX=K(Mw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({"& > *":{borderBottom:`unset`},...e.$darkRow&&{backgroundColor:`#F5F5F5`}})),hX=K(Mw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(e=>({...e.$darkRow&&{backgroundColor:`#F5F5F5`}}));function gX(e){let[t,n]=(0,L.useState)(!1),r=10;e.showMaterial&&(r+=1);let i=e.job;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(mX,{$darkRow:e.showDarkRow&&i.darkRow,children:[(0,U.jsx)(Z,{children:i.routeStartTime.toLocaleString()}),(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:i.partName,size:25})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{variant:`body2`,component:`span`,sx:{display:`block`},children:i.partName})})]})}),e.showMaterial?(0,U.jsx)(Z,{children:i.casting?(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:i.casting,size:25})}),(0,U.jsx)(J,{variant:`body2`,sx:{display:`block`},children:i.casting})]}):void 0}):void 0,(0,U.jsxs)(Z,{children:[i.comment,(0,U.jsx)(tw,{title:`Edit`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>e.setCurEditNoteJob(i),children:(0,U.jsx)(VT,{})})})]}),(0,U.jsx)(Z,{children:i.inProcJob===null?`Archived`:`Active`}),(0,U.jsx)(Z,{align:`right`,children:i.scheduledQty}),(0,U.jsx)(Z,{align:`right`,sx:{backgroundColor:i.decrementedQty>0?`#FF8A65`:void 0},children:i.decrementedQty}),(0,U.jsx)(Z,{align:`right`,children:i.completedQty}),(0,U.jsx)(Z,{align:`right`,children:i.inProcessQty}),(0,U.jsx)(Z,{align:`right`,children:i.remainingQty}),(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Show Details`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>n(!t),children:t?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})})})]}),(0,U.jsx)(hX,{$darkRow:e.showDarkRow&&i.darkRow,children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:r,children:(0,U.jsx)(Lp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(Qq,{job:i.inProcJob?i.inProcJob:i.historicJob,checkAnalysisMonth:!1})})})})]})}function _X(e,t,n,r){let i;switch(t){case 0:i=e=>e.routeStartTime.getTime();break;case 1:i=e=>e.partName;break;case 2:i=e=>e.casting;break;case 3:i=e=>e.comment??null;break;case 4:i=e=>e.scheduledQty;break;case 5:i=e=>e.decrementedQty;break;case 6:i=e=>e.completedQty;break;case 7:i=e=>e.inProcessQty;break;case 8:i=e=>e.remainingQty;break}return(r?Q.of(e):Q.of(e).filter(e=>e.inProcJob!==null)).toSortedArray(n===`asc`?{asc:i}:{desc:i})}function vX(e){return(0,U.jsx)(tw,{title:`Sort`,enterDelay:300,children:(0,U.jsx)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,children:(0,U.jsx)(zw,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})})})}var yX=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(vX,{align:`left`,col:0,...t,children:`Date`}),(0,U.jsx)(vX,{align:`left`,col:1,...t,children:`Part`}),e.showMaterial?(0,U.jsx)(vX,{align:`left`,col:2,...t,children:`Material`}):void 0,(0,U.jsx)(vX,{align:`left`,col:3,...t,children:`Note`}),(0,U.jsxs)(Z,{align:`left`,children:[`Active`,(0,U.jsx)(tw,{title:e.showArchived?`Hide Archived`:`Show Archived`,children:(0,U.jsx)($m,{size:`small`,onClick:t=>{e.setShowArchived(e=>!e),t.stopPropagation()},children:e.showArchived?(0,U.jsx)(TE,{}):(0,U.jsx)(EE,{})})})]}),(0,U.jsx)(vX,{align:`right`,col:4,...t,children:`Scheduled`}),(0,U.jsx)(vX,{align:`right`,col:5,...t,children:`Removed`}),(0,U.jsx)(vX,{align:`right`,col:6,...t,children:`Completed`}),(0,U.jsx)(vX,{align:`right`,col:7,...t,children:`In Process`}),(0,U.jsx)(vX,{align:`right`,col:8,...t,children:`Remaining To Run`}),(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>Fq(e.jobs,e.showMaterial),size:`large`,children:(0,U.jsx)($T,{})})})})]})})}),bX=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(`desc`),[o,s]=(0,L.useState)(!0),c=R(dL),l=R(lk),u=R(Fk),d=(0,L.useMemo)(()=>{for(let[,e]of l)for(let t of e.procsAndPaths[0]?.paths??[])if(t.casting!==null&&t.casting!==void 0&&t.casting!==``)return!0;return!1},[l]),f=(0,L.useMemo)(()=>Nq({start:RE(lD(),-6),end:RE(lD(),1)},c.matsById,l,u),[c.matsById,l,u]),p=(0,L.useMemo)(()=>_X(f,n,i,o),[f,n,i,o]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(yX,{jobs:f,showMaterial:d,sortBy:n,setSortBy:r,order:i,setOrder:a,showArchived:o,setShowArchived:s}),(0,U.jsx)(Sw,{children:p.map((e,r)=>(0,U.jsx)(gX,{job:e,showDarkRow:n===0,showMaterial:d,setCurEditNoteJob:t},e.inProcJob?.unique??e.historicJob?.unique??r))})]}),(0,U.jsx)(aX,{job:e?.historicJob??null,closeDialog:()=>t(null)})]})});function xX(){return qI(`Scheduled Jobs`),(0,U.jsx)(`main`,{style:{padding:`24px`},children:(0,U.jsx)(bX,{})})}var SX=`__FMS_INSIGHT_LOAD_STATION_BIN__`,CX=`__FMS_INSIGHT_PALLETS_BIN__`,wX=`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`,TX=`__FMS_INSIGHT_BASKETS_BIN__`,EX=wk(`material-bins`,[]);function DX(e,t,n){let r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r}function OX(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var kX=function(e){return e.LoadStations=`Bin_LoadStations`,e.Pallets=`Bin_Pallets`,e.ActiveQueues=`Bin_ActiveQueues`,e.Baskets=`Bin_Baskets`,e.QuarantineQueues=`Bin_Quarantine`,e}({});function AX(e){let t;return t=e.position.locationTitle&&e.position.locationTitle.length>0?e.position.locationTitle:e.position.location+` `+e.position.locationNum.toString(),e.position.zone&&(t+=`-${e.position.zone}`),t}function jX(e,t){let n=new Map,r=new Map,i=new Map,a=new Map,o=Q.ofObject(e.pallets).toRMap(([,e])=>[e.palletNum,e.palletNum.toString()+` (`+e.currentPalletLocation.group+` #`+e.currentPalletLocation.num.toString()+`)`]);for(let t of e.material)switch(t.location.type){case at.InQueue:if(t.action.type===H.Loading){let r=e.pallets[t.action.loadOntoPalletNum??0];if(r&&r.currentPalletLocation.loc===nt.LoadUnload){let e=r.currentPalletLocation.num;OX(n,e,t)}else OX(i,t.location.currentQueue||`Queue`,t)}else OX(i,t.location.currentQueue||`Queue`,t);break;case at.OnPallet:if(t.location.palletNum){let i=e.pallets[t.location.palletNum];i.currentPalletLocation.loc===nt.LoadUnload?OX(n,i.currentPalletLocation.num,t):OX(r,o.get(t.location.palletNum)??``,t)}else OX(r,`Pallet`,t);break;case at.Free:switch(t.action.type){case H.Loading:{let r=e.pallets[t.action.loadOntoPalletNum??0]?.currentPalletLocation.num;OX(n,r,t);break}case H.LoadingToBasket:{let r=e.baskets?.[t.action.loadToBasketId??0];r?.position.location===gt.LoadUnload?OX(n,r.position.locationNum,t):OX(i,`Free Material`,t);break}default:OX(i,`Free Material`,t);break}break;case at.InBasket:t.location.basketId!==void 0&&OX(a,t.location.basketId,t);break}let s=Q.ofObject(e.jobs).flatMap(([e,t])=>t.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>{let t=[];return e.inputQueue!==void 0&&t.push(e.inputQueue),e.outputQueue!==void 0&&t.push(e.outputQueue),t}).concat(Q.ofObject(e.queues).filter(([,e])=>e.role===ct.RawMaterial||e.role===ct.InProcessTransfer).map(([e,t])=>e)).toRSet(e=>e),c=Q.ofObject(e.queues).filter(([e,t])=>!s.has(e)).toRSet(([e,t])=>e),l=t.filter(e=>e===`__FMS_INSIGHT_LOAD_STATION_BIN__`||e===`__FMS_INSIGHT_PALLETS_BIN__`||e===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`||e===`__FMS_INSIGHT_BASKETS_BIN__`||c.has(e));l.indexOf(`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)<0&&l.unshift(wX),a.size>0&&l.indexOf(`__FMS_INSIGHT_BASKETS_BIN__`)<0&&l.unshift(TX),l.indexOf(`__FMS_INSIGHT_PALLETS_BIN__`)<0&&l.unshift(CX),l.indexOf(`__FMS_INSIGHT_LOAD_STATION_BIN__`)<0&&l.unshift(SX);for(let e of Q.of(c).sortBy(e=>e))l.indexOf(e)<0&&l.push(e);return l.map(t=>{if(t===`__FMS_INSIGHT_LOAD_STATION_BIN__`)return{type:`Bin_LoadStations`,binId:SX,byLul:n};if(t===`__FMS_INSIGHT_PALLETS_BIN__`)return{type:`Bin_Pallets`,binId:CX,byPallet:r};if(t===`__FMS_INSIGHT_ACTIVE_QUEUE_BIN__`)return{type:`Bin_ActiveQueues`,binId:wX,byQueue:Q.of(s).toRMap(e=>{let t=i.get(e)??[];return t.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),[e,t]},(e,t)=>e.concat(t))};if(t===`__FMS_INSIGHT_BASKETS_BIN__`)return{type:`Bin_Baskets`,binId:TX,byBasket:new Map(a),basketLocations:Q.ofObject(e.baskets??{}).collect(([e,t])=>parseInt(e)>0?[parseInt(e),AX(t)]:null).toRMap(e=>e)};{let e=t,n=i.get(e)??[];return n.sort((e,t)=>(e.location.queuePosition??0)-(t.location.queuePosition??0)),{type:`Bin_Quarantine`,binId:e,queueName:e,material:n}}})}function MX(e,t,n,r){return e.map(e=>{switch(e.type){case`Bin_Quarantine`:if(e.queueName===n){let n=e.material.filter(e=>e.materialID!==t.materialID);return n.splice(r,0,t),{...e,material:n}}else return{...e,material:e.material.filter(e=>e.materialID!==t.materialID)};default:return e}})}function NX(e,t){for(let n of t)switch(n.type){case`Bin_Quarantine`:for(let t=0;t<n.material.length;t++)if(n.material[t].materialID===e)return{bin:n,idx:t};break;default:break}return null}function PX(e,t){for(let n of t)if(n.type===`Bin_Quarantine`&&n.queueName===e)return{bin:n,idx:0};return null}var FX=(0,L.forwardRef)(function(e,t){return(0,U.jsxs)(Y,{sx:{margin:e.isDragOverlay?void 0:`0.75em`,opacity:e.isActiveDrag?.2:1,border:`1px solid black`,padding:`4px`},ref:t,...e.dragRootProps,children:[(0,U.jsx)(Y,{role:`button`,tabIndex:0,sx:{cursor:e.isDragOverlay?`grabbing`:`grab`},...e.dragHandleProps,children:(0,U.jsx)(J,{variant:`h4`,children:e.label})}),(0,U.jsx)(Y,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`nowrap`,width:`18em`,minHeight:`20em`},children:e.children})]})});function IX(e){let t={type:`container`,bin:e.bin},{active:n,isDragging:r,attributes:i,listeners:a,setNodeRef:o,setActivatorNodeRef:s,transform:c,transition:l}=wU({id:e.binId,data:t}),u={...a};for(let[e,t]of Object.entries(i))e.startsWith(`aria`)&&(u[e]=t);let d={transform:c?`translate3d(${Math.round(c.x)}px, ${Math.round(c.y)}px, 0)`:void 0,transition:n===null?void 0:l};return(0,U.jsx)(FX,{ref:o,dragRootProps:{style:d},dragHandleProps:u,setDragHandleRef:s,isActiveDrag:r,...e})}var LX=(0,L.memo)(function(e){return e.isDragOverlay?(0,U.jsx)(FX,{binId:e.binId,label:e.queue,isDragOverlay:!0,children:e.material.map(e=>(0,U.jsx)(eW,{mat:e,hideAvatar:!0,showHandle:!0},e.materialID))}):(0,U.jsx)(IX,{binId:e.binId,label:e.queue,bin:e.bin,children:(0,U.jsx)(gU,{items:e.material.map(e=>e.materialID),strategy:fU,children:e.material.map(e=>(0,U.jsx)(tW,{mat:e,hideAvatar:!0},e.materialID))})})});function RX(e,t){return e-t}function zX(e){return`Pallet `+e}function BX(e,t){let n=parseInt(e),r=parseInt(t);return isNaN(n)||isNaN(r)?e.localeCompare(t):n-r}function VX(e){return e}function HX(e,t){return e.localeCompare(t)}function UX(e,t){return e-t}var WX=class extends L.PureComponent{render(){return(0,U.jsx)(this.props.isDragOverlay?FX:IX,{label:this.props.name,binId:this.props.binId,bin:this.props.bin,isDragOverlay:this.props.isDragOverlay,children:Q.of(this.props.material).sortWith(([e,t],[n,r])=>this.props.compareLabel(e,n)).map(([e,t],n)=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(J,{variant:`caption`,children:this.props.renderLabel(e)}),t.map((e,t)=>(0,U.jsx)(eW,{mat:e,hideAvatar:!0},t))]},n))})}};function GX({matBin:e,isDragOverlay:t}){let n=R(vr),r=_A(n.basketName);switch(e.type){case kX.LoadStations:return(0,U.jsx)(WX,{name:`Load Stations`,binId:e.binId,renderLabel:e=>hA(e,n.loadStationNames),compareLabel:RX,material:e.byLul,bin:e,isDragOverlay:t});case kX.Pallets:return(0,U.jsx)(WX,{name:`Pallets`,binId:e.binId,renderLabel:zX,compareLabel:BX,material:e.byPallet,bin:e,isDragOverlay:t});case kX.ActiveQueues:return(0,U.jsx)(WX,{name:`Queues`,binId:e.binId,renderLabel:VX,compareLabel:HX,material:e.byQueue,bin:e,isDragOverlay:t});case kX.Baskets:return(0,U.jsx)(WX,{name:r+`s`,binId:e.binId,renderLabel:t=>r+` `+t.toString()+(typeof t==`number`&&e.basketLocations.get(t)?` (${e.basketLocations.get(t)})`:``),compareLabel:UX,material:e.byBasket,bin:e,isDragOverlay:t});case kX.QuarantineQueues:return(0,U.jsx)(LX,{binId:e.binId,queue:e.queueName,material:e.material,bin:e,isDragOverlay:t})}}var KX=(0,L.memo)(function(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(null);function i(){t(null),r(null)}return(0,U.jsx)(pW,{onClose:i,allowNote:!0,highlightProcsGreaterOrEqualTo:n?.process??void 0,extraDialogElements:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(XY,{st:e,setState:t}),n===null?null:(0,U.jsx)(KY,{st:n,setState:r})]}),buttons:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(WY,{onClose:i,ignoreOperator:!0}),(0,U.jsx)(ZY,{st:e,setState:t,onClose:i,ignoreOperator:!0}),(0,U.jsx)(qY,{st:n,setState:r,onClose:i,ignoreOperator:!0})]})})});function qX(e){return(0,L.useCallback)(t=>{if(typeof t.active.id==`string`)return HB({...t,droppableContainers:t.droppableContainers.filter(e=>typeof e.id==`string`)});let n=qB(t),r=BB(n.length>0?n:GB(t),`id`);if(r!=null){if(typeof r==`string`){let n=PX(r,e);n&&n.bin.material.length>0&&(r=HB({...t,droppableContainers:t.droppableContainers.filter(e=>e.id!==r&&n.bin.material.findIndex(t=>t.materialID===e.id)>=0)})[0]?.id)}return[{id:r}]}return[]},[e])}function JX(e){qI(`All Material`);let t=R(Fk),[n,r]=B(EX),[i]=zI(),a=z(Hk),[o,s]=(0,L.useState)(null),c=(0,L.useMemo)(()=>{let e=jX(t,n);return o&&o.type===`material`&&o.curOverBinId!==null?MX(e,o.mat,o.curOverBinId,o.initialIdx):e},[t,n,o]),l=e.displaySystemBins?c:c.filter(e=>e.type===kX.QuarantineQueues);return(0,U.jsxs)(FH,{collisionDetection:qX(c),measuring:{droppable:{strategy:ZV.Always}},onDragStart:({active:e})=>{typeof e.id==`string`&&typeof e.data.current==`object`&&e.data.current!==null&&`bin`in e.data.current?s({type:`column`,bin:e.data.current.bin}):typeof e.data.current==`object`&&e.data.current!==null&&`mat`in e.data.current&&s({type:`material`,mat:e.data.current.mat,curOverBinId:null,initialIdx:0})},onDragOver:({over:e})=>{if(!e||o===null||o.type===`column`)return;let t=typeof e.id==`string`?PX(e.id,c):NX(e.id,c);t&&t.bin.binId!==o.curOverBinId&&s({...o,curOverBinId:t.bin.binId,initialIdx:t.idx})},onDragEnd:({over:e})=>{if(o!==null){if(!e){s(null);return}if(o.type===`column`)typeof e.id==`number`?console.log(`Invalid, collision should never allow a column drag to be over a material`):r(DX(l.map(e=>e.binId),l.findIndex(e=>e.binId===o.bin.binId),l.findIndex(t=>t.binId===e.id)));else{let t=typeof e.id==`string`?PX(e.id,c):NX(e.id,c);t&&(i({materialId:o.mat.materialID,queue:t.bin.queueName,queuePosition:t.idx,operator:null}),a({queue:t.bin.queueName,matId:o.mat.materialID,newIdx:t.idx}))}s(null)}},onDragCancel:()=>s(null),children:[(0,U.jsx)(gU,{items:l.map(e=>e.binId),strategy:cU,children:(0,U.jsx)(Y,{component:`main`,sx:{display:`flex`,flexWrap:`nowrap`,backgroundColor:`#F8F8F8`,minHeight:{xs:`calc(100vh - 64px - 48px)`,md:`calc(100vh - 64px)`}},children:l.map(e=>(0,U.jsx)(GX,{matBin:e},e.binId))})}),(0,U.jsx)(tU,{children:o?.type===`material`?(0,U.jsx)(nW,{mat:o.mat,hideAvatar:!0}):o?.type===`column`?(0,U.jsx)(GX,{matBin:o.bin,isDragOverlay:!0}):void 0}),(0,U.jsx)(KX,{})]})}function YX(e){let t=[];for(let n of e)for(let e of n.stops)t.push(`P${n.pallet},M${e.stationNum}`);return t.join(` -> `)}function XX(e,t,n){let r=Q.of(e).collect(e=>e.result.type===iL.Completed&&!e.result.success?e.materialID:null).toRSet(e=>e);return Q.of(e).collect(e=>{if(t&&(e.time<t.start||e.time>t.end))return null;switch(e.result.type){case iL.Triggered:return{time:e.time,materialID:e.materialID,partName:e.part,serial:e.serial,workorder:e.workorder,toInspect:e.result.toInspect,path:YX(e.result.actualPath),failed:r.has(e.materialID)};default:return null}}).buildHashMap(e=>e.path,(e,t)=>{let n=e??[];return n.push(t),n}).mapValues(e=>({material:Q.of(e).toSortedArray(n,e=>e.time.getTime()),failedCnt:e.reduce((e,t)=>e+ +!!t.failed,0)}))}function ZX(e,t,n){return Q.of(e).collect(e=>e.time<t||e.time>n?null:e.result.type===iL.Completed&&!e.result.success?{time:e.time,materialID:e.materialID,serial:e.serial,workorder:e.workorder,inspType:e.inspType,part:e.part}:null).toSortedArray(e=>e.time.getTime())}function QX(e){for(let t of e)if(t.type===V.Inspection){let e=JSON.parse((t.details||{}).ActualPath||`[]`);if(!Array.isArray(e))continue;let n=[];for(let t of e)typeof t==`object`&&t&&n.push(Ne.fromJS(t));if(n.length>0)return n}return[]}function $X(e,t,n){let r=`<table>
|
|
335
|
-
<thead><tr>`;r+=`<th>Path</th><th>Date</th><th>Part</th><th>Inspection</th>`,r+=`<th>Serial</th><th>Workorder</th><th>Inspected</th><th>Failed</th>`,r+=`</tr></thead>
|
|
336
|
-
<tbody>
|
|
337
|
-
`;let i=XX(n,void 0,{asc:e=>e.time.getTime()}),a=Q.of(i.keys()).toSortedArray(e=>e);for(let n of a){let a=i.get(n);if(a)for(let i of a.material)r+=`<tr>`,r+=`<td>`+n+`</td>`,r+=`<td>`+i.time.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})+`</td>`,r+=`<td>`+e+`</td>`,r+=`<td>`+t+`</td>`,r+=`<td>`+(i.serial||``)+`</td>`,r+=`<td>`+(i.workorder||``)+`</td>`,r+=`<td>`+(i.toInspect?`inspected`:``)+`</td>`,r+=`<td>`+(i.failed?`failed`:``)+`</td>`,r+=`</tr>
|
|
338
|
-
`}return r+=`</tbody>
|
|
339
|
-
</table>`,r}function eZ(e,t,n){XA($X(e,t,n))}function tZ(e){let t=`<table>
|
|
340
|
-
<thead><tr>`;t+=`<th>Date</th><th>Part</th><th>Inspection</th><th>Serial</th><th>Workorder</th>`,t+=`</tr></thead>
|
|
341
|
-
<tbody>
|
|
342
|
-
`;for(let n of Q.of(e).sortBy({desc:e=>e.time.getTime()}))t+=`<tr>`,t+=`<td>`+n.time.toLocaleString()+`</td>`,t+=`<td>`+n.part+`</td>`,t+=`<td>`+n.inspType+`</td>`,t+=`<td>`+(n.serial||``)+`</td>`,t+=`<td>`+(n.workorder||``)+`</td>`,t+=`</tr>
|
|
343
|
-
`;return t+=`</tbody>
|
|
344
|
-
</table>`,t}function nZ(e){XA(tZ(e))}function rZ(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function iZ(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function aZ(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function oZ(e,t){return e.sourceLinks.length?e.depth:t-1}function sZ(e){return function(){return e}}function cZ(e,t){return uZ(e.source,t.source)||e.index-t.index}function lZ(e,t){return uZ(e.target,t.target)||e.index-t.index}function uZ(e,t){return e.y0-t.y0}function dZ(e){return e.value}function fZ(e){return e.index}function pZ(e){return e.nodes}function mZ(e){return e.links}function hZ(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function gZ({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function _Z(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=fZ,c=oZ,l,u,d=pZ,f=mZ,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),g(e),_(e),v(e),x(e),gZ(e),e}m.update=function(e){return gZ(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:sZ(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:sZ(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:sZ(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:sZ(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=hZ(n,t)),typeof i!=`object`&&(i=r.target=hZ(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function g({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(aZ(t.sourceLinks,dZ),aZ(t.targetLinks,dZ)):t.fixedValue}function _({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function y({nodes:t}){let r=rZ(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function b(e){let n=iZ(e,e=>(r-t-(e.length-1)*o)/aZ(e,dZ));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}O(i)}}function x(e){let n=y(e);o=Math.min(a,(r-t)/(rZ(n,e=>e.length)-1)),b(n);for(let e=0;e<p;++e){let t=.99**e,r=Math.max(1-t,(e+1)/p);C(n,t,r),S(n,t,r)}}function S(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=ee(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(uZ),w(i,n)}}function C(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=te(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,D(e)}l===void 0&&i.sort(uZ),w(i,n)}}function w(e,n){let i=e.length>>1,a=e[i];E(e,a.y0-o,i-1,n),T(e,a.y1+o,i+1,n),E(e,r,e.length-1,n),T(e,t,0,n)}function T(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function E(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function D({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(lZ);for(let{target:{targetLinks:t}}of e)t.sort(cZ)}}function O(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(lZ),n.sort(cZ)}function ee(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function te(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var vZ=Math.PI,yZ=2*vZ,bZ=1e-6,xZ=yZ-bZ;function SZ(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function CZ(){return new SZ}SZ.prototype=CZ.prototype={constructor:SZ,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>bZ)if(!(Math.abs(u*s-c*l)>bZ)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((vZ-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>bZ&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>bZ||Math.abs(this._y1-l)>bZ)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%yZ+yZ),d>xZ?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>bZ&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=vZ)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function wZ(e){return function(){return e}}function TZ(e){return e[0]}function EZ(e){return e[1]}var DZ=Array.prototype.slice;function OZ(e){return e.source}function kZ(e){return e.target}function AZ(e){var t=OZ,n=kZ,r=TZ,i=EZ,a=null;function o(){var o,s=DZ.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=CZ(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:wZ(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:wZ(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function jZ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function MZ(){return AZ(jZ)}function NZ(e){return[e.source.x1,e.y0]}function PZ(e){return[e.target.x0,e.y1]}function FZ(){return MZ().source(NZ).target(PZ)}var IZ=class{constructor(e,t){this.unique=e,this.name=t}compare(e){let t=this.unique.localeCompare(e.unique);return t===0?this.name.localeCompare(e.name):t}hash(){return xO(this.unique,this.name)}toString(){return`{unique: ${this.unique}}, name: ${this.name}}`}},LZ=class{constructor(e,t){this.from=e,this.to=t}compare(e){let t=this.from.compare(e.from);return t===0?this.to.compare(e.to):t}hash(){return xO(this.from,this.to)}toString(){return`{from: ${this.from.toString()}}, to: ${this.to.toString()}}`}};function RZ(e,t,n){let r=``,i=new IZ(``,`raw`),a=[];for(let t of e)for(let e of t.stops){let n=`P`+t.pallet+`,M`+e.stationNum.toString();r+=`->`+n;let o=new IZ(r,n);a.push(new LZ(i,o)),i=o}return t&&n!==void 0?n?a.push(new LZ(i,new IZ(`@@success`,`success`))):a.push(new LZ(i,new IZ(`@@failed`,`failed`))):a.push(new LZ(i,new IZ(`@@uninspected`,`uninspected`))),a}function zZ(e){let t=Q.of(e).filter(e=>e.result.type===iL.Completed).toRMap(e=>[e.materialID,e.result.type===iL.Completed&&e.result.success]),n=Q.of(e).flatMap(e=>e.result.type===iL.Triggered?RZ(e.result.actualPath,e.result.toInspect,t.get(e.materialID)??!1):[]),r=n.flatMap(e=>[e.from,e.to]).distinctBy(e=>e).map((e,t)=>({idx:t,node:e})),i=r.map(e=>({unique:e.node.unique,name:e.node.name})).toMutableArray(),a=r.toHashMap(e=>[e.node,e.idx],(e,t)=>e);return{nodes:i,links:n.toHashMap(e=>[e,1],(e,t)=>e+t).toLazySeq().map(([e,t])=>({source:a.get(e.from),target:a.get(e.to),value:t})).toMutableArray()}}var BZ=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!VZ(i,a)&&r||Object.defineProperty(e,n,a)},VZ=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},HZ=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},UZ=(e,t)=>`/* Wrapped ${e}*/\n${t}`,WZ=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),GZ=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),KZ=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=UZ.bind(null,r,t.toString());Object.defineProperty(i,"name",GZ);let{writable:a,enumerable:o,configurable:s}=WZ;Object.defineProperty(e,"toString",{value:i,writable:a,enumerable:o,configurable:s})};function qZ(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))BZ(e,t,r,n);return HZ(e,t),KZ(e,t,r),e}var JZ=2147483647,YZ=new WeakMap,XZ=new WeakMap,ZZ=new WeakMap;function QZ(e,t){let n=e.get(t);if(n){if(n.maxAge<=Date.now()){e.delete(t);return}return n}}function $Z(e,{cacheKey:t,cache:n=new Map,maxAge:r}={}){if(r===0)return e;if(typeof r==`number`&&Number.isFinite(r)){if(r>JZ)throw TypeError(`The \`maxAge\` option cannot exceed ${JZ}.`);if(r<0)throw TypeError("The `maxAge` option should not be a negative number.")}let i=function(...a){let o=t?t(a):a[0],s=QZ(n,o);if(s)return s.data;let c=e.apply(this,a),l=typeof r==`function`?r(...a):r;if(l!==void 0&&l!==1/0){if(!Number.isFinite(l))throw TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(l<=0)return c;if(l>JZ)throw TypeError(`The \`maxAge\` function result cannot exceed ${JZ}.`)}if(n.set(o,{data:c,maxAge:l===void 0||l===1/0?1/0:Date.now()+l}),l!==void 0&&l!==1/0){let e=setTimeout(()=>{n.delete(o),XZ.get(i)?.delete(e)},l);e.unref?.();let t=XZ.get(i)??new Set;t.add(e),XZ.set(i,t)}return c};return qZ(i,e,{ignoreNonConfigurable:!0}),YZ.set(i,n),ZZ.set(i,t??(e=>e[0])),i}function eQ(e){return typeof e==`string`}function tQ(e,t,n){return n.indexOf(e)===t}function nQ(e){return e.toLowerCase()===e}function rQ(e){return e.indexOf(`,`)===-1?e:e.split(`,`)}function iQ(e){if(!e)return e;if(e===`C`||e===`posix`||e===`POSIX`)return`en-US`;if(e.indexOf(`.`)!==-1){var t=e.split(`.`)[0],n=t===void 0?``:t;return iQ(n)}if(e.indexOf(`@`)!==-1){var r=e.split(`@`)[0],n=r===void 0?``:r;return iQ(n)}if(e.indexOf(`-`)===-1||!nQ(e))return e;var i=e.split(`-`),a=i[0],o=i[1];return`${a}-${(o===void 0?``:o).toUpperCase()}`}function aQ(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,r=n===void 0||n,i=t.fallbackLocale,a=i===void 0?`en-US`:i,o=[];if(typeof navigator<`u`){for(var s=navigator.languages||[],c=[],l=0,u=s;l<u.length;l++){var d=u[l];c=c.concat(rQ(d))}var f=navigator.language,p=f&&rQ(f);o=o.concat(c,p)}return r&&o.push(a),o.filter(eQ).map(iQ).filter(tQ)}var oQ=$Z(aQ,{cacheKey:JSON.stringify});function sQ(e){return oQ(e)[0]||null}var cQ=$Z(sQ,{cacheKey:JSON.stringify}),lQ=new Map;function uQ(e){return function(t,n){let r=t||cQ();lQ.has(r)||lQ.set(r,new Map);let i=lQ.get(r);if(!i.has(e)){let t=new Intl.DateTimeFormat(r||void 0,e);i.set(e,t.format.bind(t))}return i.get(e)(n)}}function dQ(e){let t=new Date(e);return new Date(t.setHours(12))}function fQ(e){return(t,n)=>uQ(e)(t,dQ(n))}var pQ={day:`numeric`},mQ={day:`numeric`,month:`long`,year:`numeric`},hQ={month:`long`},gQ={month:`long`,year:`numeric`},_Q={weekday:`short`},vQ={weekday:`long`},yQ={year:`numeric`},bQ=fQ(pQ),xQ=fQ(mQ),SQ=fQ(hQ),CQ=fQ(gQ),wQ=fQ(_Q),TQ=fQ(vQ),EQ=fQ(yQ);function DQ(e,t,n){return function(r,i=n){return t(e(r)+i)}}function OQ(e){return function(t){return new Date(e(t).getTime()-1)}}function kQ(e,t){return function(n){return[e(n),t(n)]}}function AQ(e){if(e instanceof Date)return e.getFullYear();if(typeof e==`number`)return e;let t=Number.parseInt(e,10);if(typeof e==`string`&&!Number.isNaN(t))return t;throw Error(`Failed to get year from date: ${e}.`)}function jQ(e){if(e instanceof Date)return e.getMonth();throw Error(`Failed to get month from date: ${e}.`)}function MQ(e){if(e instanceof Date)return e.getDate();throw Error(`Failed to get year from date: ${e}.`)}function NQ(e){let t=AQ(e),n=t+(-t+1)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var PQ=DQ(AQ,NQ,-100),FQ=DQ(AQ,NQ,100),IQ=OQ(FQ),LQ=DQ(AQ,IQ,-100),RQ=kQ(NQ,IQ);function zQ(e){let t=AQ(e),n=t+(-t+1)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var BQ=DQ(AQ,zQ,-10),VQ=DQ(AQ,zQ,10),HQ=OQ(VQ),UQ=DQ(AQ,HQ,-10),WQ=kQ(zQ,HQ);function GQ(e){let t=AQ(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var KQ=DQ(AQ,GQ,-1),qQ=DQ(AQ,GQ,1),JQ=OQ(qQ),YQ=DQ(AQ,JQ,-1),XQ=kQ(GQ,JQ);function ZQ(e,t){return function(n,r=t){let i=AQ(n),a=jQ(n)+r,o=new Date;return o.setFullYear(i,a,1),o.setHours(0,0,0,0),e(o)}}function QQ(e){let t=AQ(e),n=jQ(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}var $Q=ZQ(QQ,-1),e$=ZQ(QQ,1),t$=OQ(e$),n$=ZQ(t$,-1),r$=kQ(QQ,t$);function i$(e,t){return function(n,r=t){let i=AQ(n),a=jQ(n),o=MQ(n)+r,s=new Date;return s.setFullYear(i,a,o),s.setHours(0,0,0,0),e(s)}}function a$(e){let t=AQ(e),n=jQ(e),r=MQ(e),i=new Date;return i.setFullYear(t,n,r),i.setHours(0,0,0,0),i}var o$=OQ(i$(a$,1)),s$=kQ(a$,o$);function c$(e){return MQ(t$(e))}var l$={GREGORY:`gregory`,HEBREW:`hebrew`,ISLAMIC:`islamic`,ISO_8601:`iso8601`},u$={gregory:[`en-CA`,`en-US`,`es-AR`,`es-BO`,`es-CL`,`es-CO`,`es-CR`,`es-DO`,`es-EC`,`es-GT`,`es-HN`,`es-MX`,`es-NI`,`es-PA`,`es-PE`,`es-PR`,`es-SV`,`es-VE`,`pt-BR`],hebrew:[`he`,`he-IL`],islamic:[`ar`,`ar-AE`,`ar-BH`,`ar-DZ`,`ar-EG`,`ar-IQ`,`ar-JO`,`ar-KW`,`ar-LY`,`ar-OM`,`ar-QA`,`ar-SA`,`ar-SD`,`ar-SY`,`ar-YE`,`dv`,`dv-MV`,`ps`,`ps-AR`]},d$=[0,1,2,3,4,5,6],f$=d$[0],p$=d$[5],m$=d$[6];function h$(e,t=l$.ISO_8601){let n=e.getDay();switch(t){case l$.ISO_8601:return(n+6)%7;case l$.ISLAMIC:return(n+1)%7;case l$.HEBREW:case l$.GREGORY:return n;default:throw Error(`Unsupported calendar type.`)}}function g$(e){return AQ(NQ(e))}function _$(e){return AQ(zQ(e))}function v$(e,t=l$.ISO_8601){let n=AQ(e),r=jQ(e),i=e.getDate()-h$(e,t);return new Date(n,r,i)}function y$(e,t=l$.ISO_8601){let n=t===l$.GREGORY?l$.GREGORY:l$.ISO_8601,r=v$(e,t),i=AQ(e)+1,a,o;do a=new Date(i,0,n===l$.ISO_8601?4:1),o=v$(a,t),--i;while(e<o);return Math.round((r.getTime()-o.getTime())/(864e5*7))+1}function b$(e,t){switch(e){case`century`:return NQ(t);case`decade`:return zQ(t);case`year`:return GQ(t);case`month`:return QQ(t);case`day`:return a$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function x$(e,t){switch(e){case`century`:return PQ(t);case`decade`:return BQ(t);case`year`:return KQ(t);case`month`:return $Q(t);default:throw Error(`Invalid rangeType: ${e}`)}}function S$(e,t){switch(e){case`century`:return FQ(t);case`decade`:return VQ(t);case`year`:return qQ(t);case`month`:return e$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function C$(e,t){switch(e){case`decade`:return BQ(t,-100);case`year`:return KQ(t,-10);case`month`:return $Q(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function w$(e,t){switch(e){case`decade`:return VQ(t,100);case`year`:return qQ(t,10);case`month`:return e$(t,12);default:throw Error(`Invalid rangeType: ${e}`)}}function T$(e,t){switch(e){case`century`:return IQ(t);case`decade`:return HQ(t);case`year`:return JQ(t);case`month`:return t$(t);case`day`:return o$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function E$(e,t){switch(e){case`century`:return LQ(t);case`decade`:return UQ(t);case`year`:return YQ(t);case`month`:return n$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function D$(e,t){switch(e){case`decade`:return UQ(t,-100);case`year`:return YQ(t,-10);case`month`:return n$(t,-12);default:throw Error(`Invalid rangeType: ${e}`)}}function O$(e,t){switch(e){case`century`:return RQ(t);case`decade`:return WQ(t);case`year`:return XQ(t);case`month`:return r$(t);case`day`:return s$(t);default:throw Error(`Invalid rangeType: ${e}`)}}function k$(e,t,n){let r=[t,n].sort((e,t)=>e.getTime()-t.getTime());return[b$(e,r[0]),T$(e,r[1])]}function A$(e,t,n){return n.map(n=>(t||EQ)(e,n)).join(` – `)}function j$(e,t,n){return A$(e,t,RQ(n))}function M$(e,t,n){return A$(e,t,WQ(n))}function N$(e){return e.getDay()===new Date().getDay()}function P$(e,t=l$.ISO_8601){let n=e.getDay();switch(t){case l$.ISLAMIC:case l$.HEBREW:return n===p$||n===m$;case l$.ISO_8601:case l$.GREGORY:return n===m$||n===f$;default:throw Error(`Unsupported calendar type.`)}}var F$=`react-calendar__navigation`;function I$({activeStartDate:e,drillUp:t,formatMonthYear:n=CQ,formatYear:r=EQ,locale:i,maxDate:a,minDate:o,navigationAriaLabel:s=``,navigationAriaLive:c,navigationLabel:l,next2AriaLabel:u=``,next2Label:d=`»`,nextAriaLabel:f=``,nextLabel:p=`›`,prev2AriaLabel:m=``,prev2Label:h=`«`,prevAriaLabel:g=``,prevLabel:_=`‹`,setActiveStartDate:v,showDoubleView:y,view:b,views:x}){let S=x.indexOf(b)>0,C=b!==`century`,w=x$(b,e),T=C?C$(b,e):void 0,E=S$(b,e),D=C?w$(b,e):void 0,O=(()=>{if(w.getFullYear()<0)return!0;let t=E$(b,e);return o&&o>=t})(),ee=C&&(()=>{if(T.getFullYear()<0)return!0;let t=D$(b,e);return o&&o>=t})(),te=a&&a<E,k=C&&a&&a<D;function A(){v(w,`prev`)}function j(){v(T,`prev2`)}function M(){v(E,`next`)}function ne(){v(D,`next2`)}function re(e){let t=(()=>{switch(b){case`century`:return j$(i,r,e);case`decade`:return M$(i,r,e);case`year`:return r(i,e);case`month`:return n(i,e);default:throw Error(`Invalid view: ${b}.`)}})();return l?l({date:e,label:t,locale:i||cQ()||void 0,view:b}):t}function ie(){let n=`${F$}__label`;return(0,U.jsxs)(`button`,{"aria-label":s,"aria-live":c,className:n,disabled:!S,onClick:t,style:{flexGrow:1},type:`button`,children:[(0,U.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--from`,children:re(e)}),y?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`${n}__divider`,children:` – `}),(0,U.jsx)(`span`,{className:`${n}__labelText ${n}__labelText--to`,children:re(E)})]}):null]})}return(0,U.jsxs)(`div`,{className:F$,children:[h!==null&&C?(0,U.jsx)(`button`,{"aria-label":m,className:`${F$}__arrow ${F$}__prev2-button`,disabled:ee,onClick:j,type:`button`,children:h}):null,_!==null&&(0,U.jsx)(`button`,{"aria-label":g,className:`${F$}__arrow ${F$}__prev-button`,disabled:O,onClick:A,type:`button`,children:_}),ie(),p!==null&&(0,U.jsx)(`button`,{"aria-label":f,className:`${F$}__arrow ${F$}__next-button`,disabled:te,onClick:M,type:`button`,children:p}),d!==null&&C?(0,U.jsx)(`button`,{"aria-label":u,className:`${F$}__arrow ${F$}__next2-button`,disabled:k,onClick:ne,type:`button`,children:d}):null]})}function L$(e){return`${e}%`}function R$({children:e,className:t,count:n,direction:r,offset:i,style:a,wrap:o,...s}){return(0,U.jsx)(`div`,{className:t,style:{display:`flex`,flexDirection:r,flexWrap:o?`wrap`:`nowrap`,...a},...s,children:L.Children.map(e,(e,t)=>{let r=i&&t===0?L$(100*i/n):null;return(0,L.cloneElement)(e,{...e.props,style:{flexBasis:L$(100/n),flexShrink:0,flexGrow:0,overflow:`hidden`,marginLeft:r,marginInlineStart:r,marginInlineEnd:0}})})})}function z$(e,t,n){return t&&t>e?t:n&&n<e?n:e}function B$(e,t){return t[0]<=e&&t[1]>=e}function V$(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function H$(e,t){return B$(e[0],t)||B$(e[1],t)}function U$(e,t,n){let r=H$(t,e),i=[];if(r){i.push(n);let r=B$(e[0],t),a=B$(e[1],t);r&&i.push(`${n}Start`),a&&i.push(`${n}End`),r&&a&&i.push(`${n}BothEnds`)}return i}function W$(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function G$(e){if(!e)throw Error(`args is required`);let{value:t,date:n,hover:r}=e,i=`react-calendar__tile`,a=[i];if(!n)return a;let o=new Date,s=(()=>{if(Array.isArray(n))return n;let{dateType:t}=e;if(!t)throw Error(`dateType is required when date is not an array of two dates`);return O$(t,n)})();if(B$(o,s)&&a.push(`${i}--now`),!t||!W$(t))return a;let c=(()=>{if(Array.isArray(t))return t;let{valueType:n}=e;if(!n)throw Error(`valueType is required when value is not an array of two dates`);return O$(n,t)})();V$(c,s)?a.push(`${i}--active`):H$(c,s)&&a.push(`${i}--hasActive`);let l=U$(c,s,`${i}--range`);if(a.push(...l),r&&(Array.isArray(t)?t:[t]).length===1){let e=U$(r>c[0]?[c[0],r]:[r,c[0]],s,`${i}--hover`);a.push(...e)}return a}function K$({className:e,count:t=3,dateTransform:n,dateType:r,end:i,hover:a,offset:o,renderTile:s,start:c,step:l=1,value:u,valueType:d}){let f=[];for(let e=c;e<=i;e+=l){let t=n(e);f.push(s({classes:G$({date:t,dateType:r,hover:a,value:u,valueType:d}),date:t}))}return(0,U.jsx)(R$,{className:e,count:t,offset:o,wrap:!0,children:f})}function q$(e){let{activeStartDate:t,children:n,classes:r,date:i,formatAbbr:a,locale:o,maxDate:s,maxDateTransform:c,minDate:l,minDateTransform:u,onClick:d,onMouseOver:f,style:p,tileClassName:m,tileContent:h,tileDisabled:g,view:_}=e,v=(0,L.useMemo)(()=>typeof m==`function`?m({activeStartDate:t,date:i,view:_}):m,[t,i,m,_]),y=(0,L.useMemo)(()=>typeof h==`function`?h({activeStartDate:t,date:i,view:_}):h,[t,i,h,_]);return(0,U.jsxs)(`button`,{className:W(r,v),disabled:l&&u(l)>i||s&&c(s)<i||g?.({activeStartDate:t,date:i,view:_}),onClick:d?e=>d(i,e):void 0,onFocus:f?()=>f(i):void 0,onMouseOver:f?()=>f(i):void 0,style:p,type:`button`,children:[a?(0,U.jsx)(`abbr`,{"aria-label":a(o,i),children:n}):n,y]})}var J$=`react-calendar__century-view__decades__decade`;function Y$({classes:e=[],currentCentury:t,formatYear:n=EQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(J$),NQ(i).getFullYear()!==t&&o.push(`${J$}--neighboringCentury`),(0,U.jsx)(q$,{...r,classes:o,maxDateTransform:HQ,minDateTransform:zQ,view:`century`,children:M$(a,n,i)})}function X$(e){let{activeStartDate:t,hover:n,showNeighboringCentury:r,value:i,valueType:a,...o}=e,s=g$(t);return(0,U.jsx)(K$,{className:`react-calendar__century-view__decades`,dateTransform:zQ,dateType:`decade`,end:s+(r?119:99),hover:n,renderTile:({date:e,...n})=>(0,U.jsx)(Y$,{...o,...n,activeStartDate:t,currentCentury:s,date:e},e.getTime()),start:s,step:10,value:i,valueType:a})}function Z$(e){function t(){return(0,U.jsx)(X$,{...e})}return(0,U.jsx)(`div`,{className:`react-calendar__century-view`,children:t()})}var Q$=`react-calendar__decade-view__years__year`;function $$({classes:e=[],currentDecade:t,formatYear:n=EQ,...r}){let{date:i,locale:a}=r,o=[];return e&&o.push(...e),o.push(Q$),zQ(i).getFullYear()!==t&&o.push(`${Q$}--neighboringDecade`),(0,U.jsx)(q$,{...r,classes:o,maxDateTransform:JQ,minDateTransform:GQ,view:`decade`,children:n(a,i)})}function e1(e){let{activeStartDate:t,hover:n,showNeighboringDecade:r,value:i,valueType:a,...o}=e,s=_$(t);return(0,U.jsx)(K$,{className:`react-calendar__decade-view__years`,dateTransform:GQ,dateType:`year`,end:s+(r?11:9),hover:n,renderTile:({date:e,...n})=>(0,U.jsx)($$,{...o,...n,activeStartDate:t,currentDecade:s,date:e},e.getTime()),start:s,value:i,valueType:a})}function t1(e){function t(){return(0,U.jsx)(e1,{...e})}return(0,U.jsx)(`div`,{className:`react-calendar__decade-view`,children:t()})}var n1=`react-calendar__month-view__days__day`;function r1({calendarType:e,classes:t=[],currentMonthIndex:n,formatDay:r=bQ,formatLongDate:i=xQ,...a}){let{date:o,locale:s}=a,c=[];return t&&c.push(...t),c.push(n1),P$(o,e)&&c.push(`${n1}--weekend`),o.getMonth()!==n&&c.push(`${n1}--neighboringMonth`),(0,U.jsx)(q$,{...a,classes:c,formatAbbr:i,maxDateTransform:o$,minDateTransform:a$,view:`month`,children:r(s,o)})}function i1(e){let{activeStartDate:t,calendarType:n,hover:r,showFixedNumberOfWeeks:i,showNeighboringMonth:a,value:o,valueType:s,...c}=e,l=AQ(t),u=jQ(t),d=i||a,f=h$(t,n),p=d?0:f,m=(d?-f:0)+1;return(0,U.jsx)(K$,{className:`react-calendar__month-view__days`,count:7,dateTransform:e=>{let t=new Date;return t.setFullYear(l,u,e),a$(t)},dateType:`day`,hover:r,end:(()=>{if(i)return m+42-1;let e=c$(t);if(a){let t=new Date;return t.setFullYear(l,u,e),t.setHours(0,0,0,0),e+(7-h$(t,n)-1)}return e})(),renderTile:({date:e,...r})=>(0,U.jsx)(r1,{...c,...r,activeStartDate:t,calendarType:n,currentMonthIndex:u,date:e},e.getTime()),offset:p,start:m,value:o,valueType:s})}var a1=`react-calendar__month-view__weekdays`,o1=`${a1}__weekday`;function s1(e){let{calendarType:t,formatShortWeekday:n=wQ,formatWeekday:r=TQ,locale:i,onMouseLeave:a}=e,o=QQ(new Date),s=AQ(o),c=jQ(o),l=[];for(let e=1;e<=7;e+=1){let a=new Date(s,c,e-h$(o,t)),u=r(i,a);l.push((0,U.jsx)(`div`,{className:W(o1,N$(a)&&`${o1}--current`,P$(a,t)&&`${o1}--weekend`),children:(0,U.jsx)(`abbr`,{"aria-label":u,title:u,children:n(i,a).replace(`.`,``)})},e))}return(0,U.jsx)(R$,{className:a1,count:7,onFocus:a,onMouseOver:a,children:l})}var c1=`react-calendar__tile`;function l1(e){let{onClickWeekNumber:t,weekNumber:n}=e,r=(0,U.jsx)(`span`,{children:n});if(t){let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,U.jsx)(`button`,{...a,className:c1,onClick:e=>n(i,t,e),type:`button`,children:r})}else{let{date:t,onClickWeekNumber:n,weekNumber:i,...a}=e;return(0,U.jsx)(`div`,{...a,className:c1,children:r})}}function u1(e){let{activeStartDate:t,calendarType:n,onClickWeekNumber:r,onMouseLeave:i,showFixedNumberOfWeeks:a}=e,o=(()=>{if(a)return 6;let e=c$(t)-(7-h$(t,n));return 1+Math.ceil(e/7)})(),s=(()=>{let e=AQ(t),r=jQ(t),i=MQ(t),a=[];for(let t=0;t<o;t+=1)a.push(v$(new Date(e,r,i+t*7),n));return a})();return(0,U.jsx)(R$,{className:`react-calendar__month-view__weekNumbers`,count:o,direction:`column`,onFocus:i,onMouseOver:i,style:{flexBasis:`calc(100% * (1 / 8)`,flexShrink:0},children:s.map(e=>y$(e,n)).map((e,t)=>{let n=s[t];if(!n)throw Error(`date is not defined`);return(0,U.jsx)(l1,{date:n,onClickWeekNumber:r,weekNumber:e},e)})})}function d1(e){if(e){for(let[t,n]of Object.entries(u$))if(n.includes(e))return t}return l$.ISO_8601}function f1(e){let{activeStartDate:t,locale:n,onMouseLeave:r,showFixedNumberOfWeeks:i}=e,{calendarType:a=d1(n),formatShortWeekday:o,formatWeekday:s,onClickWeekNumber:c,showWeekNumbers:l,...u}=e;function d(){return(0,U.jsx)(s1,{calendarType:a,formatShortWeekday:o,formatWeekday:s,locale:n,onMouseLeave:r})}function f(){return l?(0,U.jsx)(u1,{activeStartDate:t,calendarType:a,onClickWeekNumber:c,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function p(){return(0,U.jsx)(i1,{calendarType:a,...u})}let m=`react-calendar__month-view`;return(0,U.jsx)(`div`,{className:W(m,l?`${m}--weekNumbers`:``),children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-end`},children:[f(),(0,U.jsxs)(`div`,{style:{flexGrow:1,width:`100%`},children:[d(),p()]})]})})}var p1=`react-calendar__year-view__months__month`;function m1({classes:e=[],formatMonth:t=SQ,formatMonthYear:n=CQ,...r}){let{date:i,locale:a}=r;return(0,U.jsx)(q$,{...r,classes:[...e,p1],formatAbbr:n,maxDateTransform:t$,minDateTransform:QQ,view:`year`,children:t(a,i)})}function h1(e){let{activeStartDate:t,hover:n,value:r,valueType:i,...a}=e,o=AQ(t);return(0,U.jsx)(K$,{className:`react-calendar__year-view__months`,dateTransform:e=>{let t=new Date;return t.setFullYear(o,e,1),QQ(t)},dateType:`month`,end:11,hover:n,renderTile:({date:e,...n})=>(0,U.jsx)(m1,{...a,...n,activeStartDate:t,date:e},e.getTime()),start:0,value:r,valueType:i})}function g1(e){function t(){return(0,U.jsx)(h1,{...e})}return(0,U.jsx)(`div`,{className:`react-calendar__year-view`,children:t()})}var _1=`react-calendar`,v1=[`century`,`decade`,`year`,`month`],y1=[`decade`,`year`,`month`,`day`],b1=new Date;b1.setFullYear(1,0,1),b1.setHours(0,0,0,0);var x1=new Date(864e13);function S1(e){return e instanceof Date?e:new Date(e)}function C1(e,t){return v1.slice(v1.indexOf(e),v1.indexOf(t)+1)}function w1(e,t,n){return C1(t,n).indexOf(e)!==-1}function T1(e,t,n){return e&&w1(e,t,n)?e:n}function E1(e){return y1[v1.indexOf(e)]}function D1(e,t){let n=Array.isArray(e)?e[t]:e;if(!n)return null;let r=S1(n);if(Number.isNaN(r.getTime()))throw Error(`Invalid date: ${e}`);return r}function O1({value:e,minDate:t,maxDate:n,maxDetail:r},i){let a=D1(e,i);if(!a)return null;let o=E1(r);return z$((()=>{switch(i){case 0:return b$(o,a);case 1:return T$(o,a);default:throw Error(`Invalid index value: ${i}`)}})(),t,n)}var k1=e=>O1(e,0),A1=e=>O1(e,1),j1=e=>[k1,A1].map(t=>t(e));function M1({maxDate:e,maxDetail:t,minDate:n,minDetail:r,value:i,view:a}){return b$(T1(a,r,t),k1({value:i,minDate:n,maxDate:e,maxDetail:t})||new Date)}function N1({activeStartDate:e,defaultActiveStartDate:t,defaultValue:n,defaultView:r,maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c,view:l}){let u=T1(l,s,a),d=e||t;return d?b$(u,d):M1({maxDate:i,maxDetail:a,minDate:o,minDetail:s,value:c||n,view:l||r})}function P1(e){return e&&(!Array.isArray(e)||e.length===1)}function F1(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}var I1=(0,L.forwardRef)(function(e,t){let{activeStartDate:n,allowPartialRange:r,calendarType:i,className:a,"data-testid":o,defaultActiveStartDate:s,defaultValue:c,defaultView:l,formatDay:u,formatLongDate:d,formatMonth:f,formatMonthYear:p,formatShortWeekday:m,formatWeekday:h,formatYear:g,goToRangeStartOnSelect:_=!0,inputRef:v,locale:y,maxDate:b=x1,maxDetail:x=`month`,minDate:S=b1,minDetail:C=`century`,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,onActiveStartDateChange:k,onChange:A,onClickDay:j,onClickDecade:M,onClickMonth:ne,onClickWeekNumber:re,onClickYear:ie,onDrillDown:ae,onDrillUp:N,onViewChange:oe,prev2AriaLabel:se,prev2Label:ce,prevAriaLabel:P,prevLabel:le,returnValue:ue=`start`,selectRange:F,showDoubleView:I,showFixedNumberOfWeeks:de,showNavigation:fe=!0,showNeighboringCentury:pe,showNeighboringDecade:me,showNeighboringMonth:he=!0,showWeekNumbers:ge,tileClassName:_e,tileContent:ve,tileDisabled:ye,value:be,view:xe}=e,[Se,R]=(0,L.useState)(s),[z,B]=(0,L.useState)(null),[Ce,we]=(0,L.useState)(Array.isArray(c)?c.map(e=>e===null?null:S1(e)):c==null?null:S1(c)),[Te,Ee]=(0,L.useState)(l),De=n||Se||N1({activeStartDate:n,defaultActiveStartDate:s,defaultValue:c,defaultView:l,maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:be,view:xe}),Oe=(()=>{let e=F&&P1(Ce)||be===void 0?Ce:be;return e?Array.isArray(e)?e.map(e=>e===null?null:S1(e)):e===null?null:S1(e):null})(),ke=E1(x),Ae=T1(xe||Te,C,x),je=C1(C,x),V=F?z:null,Me=je.indexOf(Ae)<je.length-1,Ne=je.indexOf(Ae)>0,Pe=(0,L.useCallback)(e=>(()=>{switch(ue){case`start`:return k1;case`end`:return A1;case`range`:return j1;default:throw Error(`Invalid returnValue.`)}})()({maxDate:b,maxDetail:x,minDate:S,value:e}),[b,x,S,ue]),Fe=(0,L.useCallback)((e,t)=>{R(e);let n={action:t,activeStartDate:e,value:Oe,view:Ae};k&&!F1(De,e)&&k(n)},[De,k,Oe,Ae]),Ie=(0,L.useCallback)((e,t)=>{let n=(()=>{switch(Ae){case`century`:return M;case`decade`:return ie;case`year`:return ne;case`month`:return j;default:throw Error(`Invalid view: ${Ae}.`)}})();n&&n(e,t)},[j,M,ne,ie,Ae]),Le=(0,L.useCallback)((e,t)=>{if(!Me)return;Ie(e,t);let n=je[je.indexOf(Ae)+1];if(!n)throw Error(`Attempted to drill down from the lowest view.`);R(e),Ee(n);let r={action:`drillDown`,activeStartDate:e,value:Oe,view:n};k&&!F1(De,e)&&k(r),oe&&Ae!==n&&oe(r),ae&&ae(r)},[De,Me,k,Ie,ae,oe,Oe,Ae,je]),Re=(0,L.useCallback)(()=>{if(!Ne)return;let e=je[je.indexOf(Ae)-1];if(!e)throw Error(`Attempted to drill up from the highest view.`);let t=b$(e,De);R(t),Ee(e);let n={action:`drillUp`,activeStartDate:t,value:Oe,view:e};k&&!F1(De,t)&&k(n),oe&&Ae!==e&&oe(n),N&&N(n)},[De,Ne,k,N,oe,Oe,Ae,je]),ze=(0,L.useCallback)((e,t)=>{let n=Oe;Ie(e,t);let i=F&&!P1(n),a;if(F)if(i)a=b$(ke,e);else{if(!n)throw Error(`previousValue is required`);if(Array.isArray(n))throw Error(`previousValue must not be an array`);a=k$(ke,n,e)}else a=Pe(e);let o=!F||i||_?M1({maxDate:b,maxDetail:x,minDate:S,minDetail:C,value:a,view:Ae}):null;t.persist(),R(o),we(a);let s={action:`onChange`,activeStartDate:o,value:a,view:Ae};if(k&&!F1(De,o)&&k(s),A)if(F){if(!P1(a))A(a||null,t);else if(r){if(Array.isArray(a))throw Error(`value must not be an array`);A([a||null,null],t)}}else A(a||null,t)},[De,r,Pe,_,b,x,S,C,k,A,Ie,F,Oe,ke,Ae]);function Be(e){B(e)}function Ve(){B(null)}(0,L.useImperativeHandle)(t,()=>({activeStartDate:De,drillDown:Le,drillUp:Re,onChange:ze,setActiveStartDate:Fe,value:Oe,view:Ae}),[De,Le,Re,ze,Fe,Oe,Ae]);function He(e){let t={activeStartDate:e?S$(Ae,De):b$(Ae,De),hover:V,locale:y,maxDate:b,minDate:S,onClick:Me?Le:ze,onMouseOver:F?Be:void 0,tileClassName:_e,tileContent:ve,tileDisabled:ye,value:Oe,valueType:ke};switch(Ae){case`century`:return(0,U.jsx)(Z$,{formatYear:g,showNeighboringCentury:pe,...t});case`decade`:return(0,U.jsx)(t1,{formatYear:g,showNeighboringDecade:me,...t});case`year`:return(0,U.jsx)(g1,{formatMonth:f,formatMonthYear:p,...t});case`month`:return(0,U.jsx)(f1,{calendarType:i,formatDay:u,formatLongDate:d,formatShortWeekday:m,formatWeekday:h,onClickWeekNumber:re,onMouseLeave:F?Ve:void 0,showFixedNumberOfWeeks:de===void 0?I:de,showNeighboringMonth:he,showWeekNumbers:ge,...t});default:throw Error(`Invalid view: ${Ae}.`)}}function Ue(){return fe?(0,U.jsx)(I$,{activeStartDate:De,drillUp:Re,formatMonthYear:p,formatYear:g,locale:y,maxDate:b,minDate:S,navigationAriaLabel:w,navigationAriaLive:T,navigationLabel:E,next2AriaLabel:D,next2Label:O,nextAriaLabel:ee,nextLabel:te,prev2AriaLabel:se,prev2Label:ce,prevAriaLabel:P,prevLabel:le,setActiveStartDate:Fe,showDoubleView:I,view:Ae,views:je}):null}return(0,U.jsxs)(`div`,{className:W(_1,F&&(Array.isArray(Oe)?Oe:[Oe]).length===1&&`${_1}--selectRange`,I&&`${_1}--doubleView`,a),"data-testid":o,ref:v,children:[Ue(),(0,U.jsxs)(`div`,{className:`${_1}__viewContainer`,onBlur:F?Ve:void 0,onMouseLeave:F?Ve:void 0,children:[He(),I?He(!0):null]})]})}),L1=K(Z,{shouldForwardProp:e=>e!==`expand`})(({expand:e})=>({width:e?`100%`:void 0}));function R1({open:e}){let t=z(e);return(0,U.jsx)(tw,{title:`Filter`,enterDelay:300,children:(0,U.jsx)($m,{onClick:()=>t(!0),size:`small`,children:(0,U.jsx)(qT,{})})})}function z1(e){let t=e.copyToClipboardRows;return(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[e.columns.map(t=>(0,U.jsxs)(L1,{align:t.numeric?`right`:`left`,expand:t.expanded,sortDirection:e.sort.orderBy===t.id&&e.sort.order,children:[(0,U.jsx)(tw,{title:`Sort`,placement:t.numeric?`bottom-end`:`bottom-start`,enterDelay:300,children:(0,U.jsx)(zw,{active:e.sort.orderBy===t.id,direction:e.sort.order,onClick:()=>e.sort.handleRequestSort(t.id),children:t.label})}),t.openFilterDialog?(0,U.jsx)(R1,{open:t.openFilterDialog}):void 0]},t.id)),e.showDetailsCol?(0,U.jsx)(L1,{padding:`checkbox`,children:t?(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>X1(e.columns,t),size:`large`,children:(0,U.jsx)($T,{})})}):void 0}):void 0]})})}var B1=new Intl.DateTimeFormat([],{year:`numeric`,month:`short`,day:`numeric`}),V1=new Intl.DateTimeFormat([],{year:`numeric`,month:`long`}),H1=K(I1)(({theme:e})=>({width:`350px`,"& .react-calendar__month-view__weekdays":{textAlign:`center`,textTransform:`uppercase`,fontWeight:`bold`},"& .react-calendar__tile":{textAlign:`center`,padding:`.75em .5em`,margin:0,border:0,background:`none`,outline:`none`,cursor:`pointer`,"&:hover":{backgroundColor:`rgb(230, 230, 230)`},"&--active":{backgroundColor:e.palette.primary.light,"&:hover":{backgroundColor:e.palette.primary.dark}}},"&.react-calendar--selectRange .react-calendar__tile--hover":{backgroundColor:`rgb(230, 230, 230)`}}));function U1(e){let[t,n]=(0,L.useState)(!1),r=e.zoom.current_date_zoom?e.zoom.current_date_zoom.start:e.zoom.default_date_range[0],i=RE(e.zoom.current_date_zoom?e.zoom.current_date_zoom.end:e.zoom.default_date_range[1],-1);function a(t){e.zoom.set_date_zoom_range({start:t[0],end:RE(t[1],1)}),n(!1)}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{children:[B1.format(e.zoom.current_date_zoom?.start??e.zoom.default_date_range[0]),` `,`- `,B1.format(e.zoom.current_date_zoom?.end??e.zoom.default_date_range[1])]}),(0,U.jsx)(tw,{title:`Zoom To Date Range`,children:(0,U.jsx)($m,{onClick:()=>n(!0),size:`large`,children:(0,U.jsx)(OE,{})})}),(0,U.jsx)(tw,{title:`Reset Date Range`,children:(0,U.jsx)($m,{onClick:()=>e.zoom.set_date_zoom_range(void 0),size:`large`,children:(0,U.jsx)(kE,{})})}),(0,U.jsxs)(Dy,{open:t,onClose:()=>n(!1),children:[(0,U.jsxs)(By,{children:[`Select Date Range `,V1.format(e.zoom.default_date_range[0])]}),(0,U.jsx)(Ly,{children:(0,U.jsx)(H1,{minDate:e.zoom.default_date_range[0],maxDate:e.zoom.default_date_range[1],calendarType:`gregory`,selectRange:!0,showNavigation:!1,showNeighboringMonth:!1,value:[r,i],onChange:e=>{Array.isArray(e)&&e[0]instanceof Date&&e[1]instanceof Date&&a([e[0],e[1]])}})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>n(!1),children:`Close`})})]})]})}var W1=(0,L.memo)(function({zoom:e,tpage:t,count:n}){let r;return e&&e.type===`Last30Days`?r=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:`Last 24 hours`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(1),style:{color:`rgba(0, 0, 0, 0.54)`},children:`24h`})}),(0,U.jsx)(tw,{title:`Last 2 days`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(2),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2d`})}),(0,U.jsx)(tw,{title:`Last 3 days`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(3),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3d`})}),(0,U.jsx)(tw,{title:`Last 4 days`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(4),style:{color:`rgba(0, 0, 0, 0.54)`},children:`4d`})}),(0,U.jsx)(tw,{title:`Last 5 days`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(5),style:{color:`rgba(0, 0, 0, 0.54)`},children:`5d`})}),(0,U.jsx)(tw,{title:`Last 6 days`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(6),style:{color:`rgba(0, 0, 0, 0.54)`},children:`6d`})}),(0,U.jsx)(tw,{title:`Last 1 week`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(7),style:{color:`rgba(0, 0, 0, 0.54)`},children:`1w`})}),(0,U.jsx)(tw,{title:`Last 2 weeks`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(14),style:{color:`rgba(0, 0, 0, 0.54)`},children:`2w`})}),(0,U.jsx)(tw,{title:`Last 3 weeks`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(21),style:{color:`rgba(0, 0, 0, 0.54)`},children:`3w`})}),(0,U.jsx)(tw,{title:`Last 30 days`,children:(0,U.jsx)(X,{onClick:()=>e.set_days_back(null),style:{color:`rgba(0, 0, 0, 0.54)`},children:`30d`})})]}):e&&e.type===`ZoomIntoRange`?r=(0,U.jsx)(U1,{zoom:e}):e&&e.type===`ExtendDays`&&(r=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:`Extend 1 day previous`,children:(0,U.jsx)($m,{onClick:()=>e.extend(-1),size:`large`,children:(0,U.jsx)(xE,{})})}),(0,U.jsx)(J,{variant:`caption`,children:e.curStart.toLocaleDateString()+` to `+e.curEnd.toLocaleDateString()}),(0,U.jsx)(tw,{title:`Extend 1 day`,children:(0,U.jsx)($m,{onClick:()=>e.extend(1),size:`large`,children:(0,U.jsx)(bE,{})})})]})),(0,U.jsxs)(Ew,{children:[(0,U.jsx)(J,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,U.jsx)(zC,{style:{marginLeft:8,marginRight:`1em`},value:t.rowsPerPage,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,U.jsx)(uf,{}),onChange:e=>{t.setRowsPerPage(e.target.value);let r=Math.ceil(n/e.target.value)-1;t.page>r&&t.setPage(r)},children:[10,15,20,50].map(e=>(0,U.jsx)(GS,{value:e,children:e},e))}),(0,U.jsx)(J,{color:`textSecondary`,variant:`caption`,children:`${n===0?0:t.page*t.rowsPerPage+1}-${Math.min(n,(t.page+1)*t.rowsPerPage)} of ${n}`}),(0,U.jsx)($m,{onClick:()=>t.setPage(0),disabled:t.page===0,"aria-label":`First Page`,size:`large`,children:(0,U.jsx)(JT,{})}),(0,U.jsx)($m,{onClick:()=>t.setPage(t.page-1),disabled:t.page===0,"aria-label":`Previous Page`,size:`large`,children:(0,U.jsx)(rE,{})}),(0,U.jsx)($m,{onClick:()=>t.setPage(t.page+1),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Next Page`,size:`large`,children:(0,U.jsx)(iE,{})}),(0,U.jsx)($m,{onClick:()=>t.setPage(Math.max(0,Math.ceil(n/t.rowsPerPage)-1)),disabled:t.page>=Math.ceil(n/t.rowsPerPage)-1,"aria-label":`Last Page`,size:`large`,children:(0,U.jsx)(oE,{})}),e?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{style:{flexGrow:1}}),r]}):void 0]})}),G1=class extends L.PureComponent{render(){let e=this.props.onClickDetails,t=[...this.props.pageData],n=this.props.rowsPerPage===void 0?0:Math.max(0,this.props.rowsPerPage-t.length);return(0,U.jsxs)(Sw,{children:[t.map((t,n)=>(0,U.jsxs)(Mw,{children:[this.props.columns.map(e=>(0,U.jsx)(L1,{align:e.numeric?`right`:`left`,expand:e.expanded,children:e.Cell?(0,U.jsx)(e.Cell,{row:t}):e.getDisplay(t)},e.id)),e?(0,U.jsx)(L1,{padding:`checkbox`,children:(0,U.jsx)($m,{onClick:n=>e(n,t),size:`large`,children:(0,U.jsx)(lE,{})})}):void 0]},n)),n>0?(0,U.jsx)(Mw,{style:{height:53*n},children:(0,U.jsx)(Z,{colSpan:this.props.columns.length+ +!!this.props.onClickDetails,style:{textAlign:`center`},children:t.length===0?this.props.emptyMessage:void 0})}):void 0]})}};function K1(e){let[t,n]=(0,L.useState)(void 0);return(0,L.useMemo)(()=>{let r;return r=e.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({start:RE(t,-e),end:VE(t,1)})}else n(void 0)}}:{type:`ZoomIntoRange`,default_date_range:[e.month,zE(e.month,1)],current_date_zoom:t,set_date_zoom_range:n},{zoom:r,zoomRange:t}},[e,t,n])}function q1(){let[e,t]=(0,L.useState)(0),[n,r]=(0,L.useState)(10);return(0,L.useMemo)(()=>({page:e,setPage:t,rowsPerPage:n,setRowsPerPage:r}),[e,t,n,r])}function J1(e,t,n){let[r,i]=(0,L.useState)(e),[a,o]=(0,L.useState)(n??`asc`);return(0,L.useMemo)(()=>{function e(e){r===e?o(a===`asc`?`desc`:`asc`):(i(e),o(`asc`))}let n={asc:t[0].getForSort??t[0].getDisplay};for(let e of t)e.id===r&&a===`asc`?n={asc:e.getForSort??e.getDisplay}:e.id===r&&(n={desc:e.getForSort??e.getDisplay});return{orderBy:r,order:a,sortOn:n,handleRequestSort:e}},[r,i,a,o,t])}function Y1(e,t){let n=`<table>
|
|
345
|
-
<thead><tr>`;for(let t of e)t.ignoreDuringExport||(n+=`<th>`+t.label+`</th>`);n+=`</tr></thead>
|
|
346
|
-
<tbody>
|
|
347
|
-
`;for(let r of t){n+=`<tr>`;for(let t of e)if(!t.ignoreDuringExport){let e=t.getForExport?t.getForExport(r):t.getDisplay(r);n+=`<td>`+e+`</td>`}n+=`</tr>
|
|
348
|
-
`}return n+=`</tbody>
|
|
349
|
-
</table>`,n}function X1(e,t){XA(Y1(e,t))}var Z1=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:1,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:2,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``},{id:3,numeric:!1,label:`Inspected`,getDisplay:e=>e.toInspect?`inspected`:``},{id:4,numeric:!1,label:`Failed`,getDisplay:e=>e.failed?`failed`:``}];function Q1(e,t,n){let[r,i]=(0,L.useState)(void 0),a;return e&&e===`Last30Days`?a={type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;i({start:RE(t,-e),end:VE(t,1)})}else i(void 0)}}:e&&e===`ZoomIntoRange`?a={type:`ZoomIntoRange`,default_date_range:n,current_date_zoom:r,set_date_zoom_range:i}:e&&t&&e===`ExtendDays`&&(a={type:`ExtendDays`,curStart:n[0],curEnd:n[1],extend:t}),{zoom:a,zoomRange:r}}var $1=(0,L.memo)(function(e){let t=z(SI),n=J1(0,Z1),[r,i]=(0,L.useState)(ok.empty()),[a,o]=(0,L.useState)(10),[s,c]=(0,L.useState)(void 0),l=Q1(e.zoomType,e.extendDateRange,e.default_date_range),u=XX(e.points,l.zoomRange,n.sortOn);return(0,U.jsx)(`div`,{style:{width:`100%`,marginTop:`1em`},children:Q.of(u).toSortedArray(([e])=>e).map(([u,d])=>{let f=Math.min(r.get(u)??0,Math.ceil(d.material.length/a));return(0,U.jsxs)(Jp,{expanded:u===s,onChange:(e,t)=>c(t?u:void 0),children:[(0,U.jsxs)(Am,{expandIcon:(0,U.jsx)(GT,{}),children:[(0,U.jsx)(J,{variant:`h6`,style:{flexBasis:`33.33%`,flexShrink:0},children:u}),(0,U.jsxs)(J,{variant:`caption`,children:[d.material.length,` total parts, `,d.failedCnt,` failed`]})]}),(0,U.jsx)(nee,{children:(0,U.jsxs)(`div`,{style:{width:`100%`},children:[(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:Z1,sort:n,showDetailsCol:!0}),(0,U.jsx)(G1,{columns:Z1,pageData:Q.of(d.material).drop(f*a).take(a),rowsPerPage:a,onClickDetails:e.hideOpenDetailColumn?void 0:(e,n)=>t({type:`MatSummary`,summary:{materialID:n.materialID,partName:n.partName,serial:n.serial,workorderId:n.workorder}})})]}),(0,U.jsx)(W1,{tpage:{page:f,rowsPerPage:a,setPage:e=>i(r.set(u,e)),setRowsPerPage:o},count:d.material.length,zoom:l.zoom})]})})]},u)})})}),e0=20,t0=20,n0=120,r0=20;function i0({link:e,path:t,strokeWidth:n,setTooltip:r}){let[i,a]=(0,L.useState)(!1);if(t===null)return null;function o(t){let n=Cj(t);n!==null&&(r({left:n.x,top:n.y,data:e}),a(!0))}function s(){a(!1),r(null)}return(0,U.jsx)(`path`,{d:t,stroke:i?Mr[600]:Mr[300],strokeWidth:n,opacity:.2,fill:`none`,onMouseMove:o,onMouseLeave:s})}function a0({node:e}){return e.x1===void 0||e.x0===void 0||e.y1===void 0||e.y0===void 0?null:(0,U.jsxs)(`g`,{transform:`translate(${e.x0}, ${e.y0})`,children:[(0,U.jsx)(`rect`,{width:e.x1-e.x0,height:e.y1-e.y0,fill:Mr[800],opacity:.8,stroke:`none`}),(0,U.jsx)(`text`,{x:18,y:(e.y1-e.y0)/2,children:e.name})]})}var o0=(0,L.memo)(function({data:e,setTooltip:t,parentHeight:n,parentWidth:r}){let{nodes:i,links:a}=(0,L.useMemo)(()=>{let t=zZ(e);if(t.nodes.length===0)return{nodes:[],links:[]};let i=_Z().nodeWidth(10).nodePadding(10).nodeAlign(oZ).extent([[e0,t0],[r-n0,n-r0-t0]])({nodes:t.nodes,links:t.links});return{nodes:i.nodes,links:i.links.flatMap(e=>typeof e.source==`object`&&typeof e.target==`object`&&e.width!==void 0?[{...e,source:e.source,target:e.target,width:e.width}]:[])}},[e,r,n]),o=FZ();return(0,U.jsxs)(`svg`,{width:r,height:n,children:[(0,U.jsx)(`g`,{children:i.map((e,t)=>(0,U.jsx)(a0,{node:e},t))}),(0,U.jsx)(`g`,{children:a.map((e,n)=>(0,U.jsx)(i0,{link:e,path:o(e),strokeWidth:Math.max(e.width??1,1),setTooltip:t},n))})]})});function s0({tooltip:e}){return e===null?null:(0,U.jsxs)(`div`,{children:[e.data.source.name,` ➞ `,e.data.target.name,`: `,e.data.value,` parts`]})}var c0=(0,L.memo)(function({data:e}){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t);return(0,U.jsx)(`div`,{style:{position:`relative`},children:(0,U.jsx)(Ij,{sx:{height:{xs:`calc(100vh - 230px)`,md:`calc(100vh - 182px)`,xl:`calc(100vh - 130px)`},width:`100%`},chart:({height:t,width:r})=>(0,U.jsx)(o0,{data:e,setTooltip:n,parentHeight:t,parentWidth:r}),tooltipAtom:t,TooltipContent:s0})})}),l0=bk(e=>e(WI)?`aaa`:void 0),u0=bk(e=>e(WI)?`CMM`:void 0),d0=P(!1);function f0(e){let[t,n]=B(l0),[r,i]=B(u0),[a,o]=B(d0),s,c=e.restrictToPart||t;c&&r&&(s=e.inspectionlogs.get(new aL(c,r))?.valuesToLazySeq()??[]);let l=e.inspectionlogs.keysToLazySeq().map(e=>e.part).distinct().toSortedArray(e=>e),u=e.inspectionlogs.keysToLazySeq().map(e=>e.inspType).distinct().toSortedArray(e=>e);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[e.subtitle?(0,U.jsx)(J,{variant:`subtitle1`,children:e.subtitle}):void 0,(0,U.jsx)(Y,{sx:{flexGrow:1}}),e.onlyTable?void 0:(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:a?`table`:`sankey`,onChange:e=>o(e.target.value===`table`),children:[(0,U.jsx)(GS,{value:`sankey`,children:`Sankey`},`sankey`),(0,U.jsx)(GS,{value:`table`,children:`Table`},`table`)]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{name:`inspection-sankey-select-type`,autoWidth:!0,displayEmpty:!0,style:{marginRight:`1em`,marginLeft:`1em`},value:r||``,onChange:e=>i(e.target.value),children:[r?void 0:(0,U.jsx)(GS,{value:``,children:(0,U.jsx)(`em`,{children:`Select Inspection Type`})},0),u.map(e=>(0,U.jsx)(GS,{value:e,children:e},e))]})}),e.restrictToPart===void 0?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{name:`inspection-sankey-select-part`,autoWidth:!0,displayEmpty:!0,value:c||``,onChange:e=>n(e.target.value),children:[c?void 0:(0,U.jsx)(GS,{value:``,children:(0,U.jsx)(`em`,{children:`Select Part`})},0),l.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e,size:30}),(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})]})},e))]})}):void 0,s?(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>s?eZ(c||``,r||``,s):void 0,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})}):void 0]}),(0,U.jsx)(`main`,{children:s?a||e.onlyTable?(0,U.jsx)($1,{zoomType:e.zoomType,points:s,default_date_range:e.default_date_range,extendDateRange:e.extendDateRange,hideOpenDetailColumn:e.hideOpenDetailColumn}):(0,U.jsx)(c0,{data:s}):void 0})]})}var p0=P(null),m0=Ak(P(async(e,{signal:t})=>{let n=e(p0);if(n==null||Ht===void 0)return ok.empty();let r=await Ht.get(n.curStart,n.curEnd,t);return Q.of(r).flatMap(lL).filter(e=>e.key.part===n.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??ok.empty()),h0=Ak(P(async e=>{let t=e(p0);if(t==null)return ok.empty();let n=[];for(let e of Gt)n.push(await e.get(t.curStart,t.curEnd));return Q.of(n).flatMap(e=>e).flatMap(lL).filter(e=>e.key.part===t.part).toLookupMap(e=>e.key,e=>e.entry.cntr,e=>e.entry)}),e=>e??ok.empty()),g0=P(e=>ok.union((e,t)=>e.union(t),e(m0),e(h0)));function _0(e){return t=>t===null?null:e<0?{curStart:RE(t.curStart,e),curEnd:t.curEnd,part:t.part}:{curStart:t.curStart,curEnd:RE(t.curEnd,e),part:t.part}}var v0=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime()},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.part},{id:2,numeric:!1,label:`Inspection`,getDisplay:e=>e.inspType},{id:3,numeric:!1,label:`Serial`,getDisplay:e=>e.serial||``},{id:4,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder||``}];function y0(e){let t=KI(),n=J1(0,v0),r=q1(),i=z(SI),a=Math.min(r.page,Math.ceil(e.failed.length/r.rowsPerPage)),o=Q.of(e.failed).sortBy(n.sortOn);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:v0,sort:n,showDetailsCol:!t}),(0,U.jsx)(G1,{columns:v0,pageData:o.drop(a*r.rowsPerPage).take(r.rowsPerPage),rowsPerPage:r.rowsPerPage,onClickDetails:t?void 0:(e,t)=>{i({type:`MatSummary`,summary:{materialID:t.materialID,partName:t.part,serial:t.serial,workorderId:t.workorder}})}})]}),(0,U.jsx)(W1,{tpage:{...r,page:a},count:e.failed.length})]})}function b0(){let e=R(sL),t=(0,L.useMemo)(()=>{let t=lD();return ZX(Q.of(e).flatMap(([e,t])=>t.valuesToLazySeq()),RE(t,-4),RE(t,1))},[e]);return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(J,{variant:`subtitle1`,children:`Inspections marked as failed in the last 5 days`}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>nZ(t),size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(y0,{failed:t})]})}function x0(){let e=KI(),t=z(SI),[n,r]=(0,L.useState)(e?`00000000i9`:``),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null);function c(){n&&n!==``&&(a(!0),s(null),Ht.materialForSerial(n).then(e=>{let i=Q.of(e).maxBy(e=>e.materialID);i?(t({type:`MatDetails`,details:i}),r(``),s(null)):s(`No material found with serial `+n)}).catch(e=>{Rt.isApiException(e)?s(e.response):e instanceof Error?s(e.message):s(e)}).finally(()=>a(!1)))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`,marginLeft:`auto`,marginRight:`auto`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(lT,{label:n===``?`Serial`:`Serial (press enter)`,value:n,onChange:e=>r(e.target.value),onKeyPress:e=>{e.key===`Enter`&&n!==``&&(e.preventDefault(),c())}})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(X,{variant:`contained`,color:`secondary`,disabled:n===``||i,onClick:c,children:i?(0,U.jsxs)(nw,{direction:`row`,spacing:2,children:[(0,U.jsx)(qm,{}),` Searching`]}):(0,U.jsx)(U.Fragment,{children:`Lookup`})})})]}),o&&o!==``?(0,U.jsx)(`div`,{children:o}):void 0]})}function S0(e){let t=e[0];if(t===void 0)return lD();let n=t.endUTC;for(let t of e)t.type===V.MachineCycle&&(n=t.endUTC);return n}function C0(){let e=R(EI),t=R(MI);return e?(0,U.jsx)(iW,{partName:e.partName,serial:e.serial,subtitle:`Path `+YX(QX(t))+` at `+S0(t).toLocaleString()}):(0,U.jsx)(`div`,{children:`Serial Details`})}function w0({setStep:e}){let t=R(EI),n=R(MI),r=z(p0),i=z(SI);return(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{mt:`2em`},children:[t?(0,U.jsx)(X,{variant:`contained`,color:`secondary`,onClick:()=>{let i=S0(n);r({part:t?.partName??``,curStart:qE(RE(i,-5)),curEnd:aD(RE(i,5))}),e(2)},children:`Lookup Similar Paths`}):void 0,(0,U.jsx)(X,{variant:`contained`,style:{marginLeft:`2em`},onClick:()=>{i(null),r(null),e(0)},children:`Reset`})]})}function T0(e){let t=R(TI),n=R(MI),[r,i]=B(p0),a=R(g0),o=z(SI);if(t===null)return null;function s(e){i(_0(e))}return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(f0,{inspectionlogs:a,restrictToPart:t.partName,subtitle:`Paths for `+t.partName+` around `+S0(n).toLocaleString(),default_date_range:r?[r.curStart,r.curEnd]:[],zoomType:r?`ExtendDays`:void 0,extendDateRange:s,hideOpenDetailColumn:!0,onlyTable:!0}),(0,U.jsx)(X,{variant:`contained`,style:{marginTop:`2em`},onClick:()=>{o(null),i(null),e.setStep(0)},children:`Reset`})]})}function E0(){let[e,t]=(0,L.useState)(0),n=R(SI),r=e;return r===0&&n&&(r=1),(0,U.jsxs)(nw,{direction:`column`,spacing:2,children:[(0,U.jsxs)(one,{activeStep:r,orientation:`horizontal`,children:[(0,U.jsx)(ow,{children:(0,U.jsx)(uw,{children:`Select Material`})}),(0,U.jsx)(ow,{children:(0,U.jsx)(uw,{children:(0,U.jsx)(C0,{})})}),(0,U.jsx)(ow,{children:(0,U.jsx)(uw,{children:`Lookup similar paths`})})]}),r===0?(0,U.jsxs)(nw,{direction:`column`,spacing:4,children:[(0,U.jsx)(J,{children:`Enter a serial number, scan a barcode, or click on a material in the table below to see details.`}),(0,U.jsx)(x0,{}),(0,U.jsx)(b0,{})]}):r===1?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(RU,{fallback:(0,U.jsx)(dW,{}),children:(0,U.jsx)(lW,{})}),(0,U.jsx)(w0,{setStep:t})]}):r===2?(0,U.jsx)(RU,{children:(0,U.jsx)(T0,{setStep:t})}):void 0]})}function D0(){return qI(`Quality Material`),(0,U.jsx)(`main`,{style:{padding:`24px`},children:(0,U.jsx)(E0,{})})}var O0=(0,L.memo)(function(){qI(`Paths`);let e=R(sL);return(0,U.jsx)(f0,{inspectionlogs:(0,L.useMemo)(()=>{let t=lD(),n=RE(t,-6),r=RE(t,1);return e.collectValues(e=>{let t=e.filter(e=>e.time>=n&&e.time<=r);return t.size===0?null:t})},[e]),default_date_range:[RE(lD(),-6),RE(lD(),1)],subtitle:`Paths from the last 7 days`})}),k0=P(!1);function A0(e){let t=``;return e.comments&&e.comments.length>0&&(t=`; `+e.comments[e.comments.length-1].comment),`Due ${e.dueDate.toLocaleDateString()}; Completed ${e.completedQuantity} of ${e.plannedQuantity}${t}`}function j0({work:e}){return e.plannedQuantity<=e.completedQuantity?(0,U.jsx)(AT,{}):(0,U.jsx)(yE,{})}function M0(){let[e,t]=(0,L.useState)(null),n=R(TI),[r]=LI(),i=z(k0);return(0,U.jsx)(lT,{sx:{mt:`5px`},label:e===null||e===``?`Workorder`:`Workorder (press enter)`,value:e??``,onChange:e=>t(e.target.value),onKeyPress:t=>{t.key===`Enter`&&n&&e&&e!==``&&(t.preventDefault(),r(n,e),i(!1))}})}function N0(){let e=R(TI),t=R(wie),n=z(k0),[r]=LI();return(0,U.jsx)(gx,{children:(t??[]).map(t=>(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{onClick:()=>{e&&r(e,t.workorderId),n(!1)},children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(j0,{work:t})}),(0,U.jsx)(Bx,{primary:t.workorderId,secondary:A0(t)})]})},t.workorderId))})}var P0=(0,L.memo)(function(){let[e,t]=B(k0),n;return n=e?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:`Select Workorder`}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(RU,{children:[(0,U.jsx)(M0,{}),(0,U.jsx)(N0,{})]})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,U.jsx)(`p`,{children:`None`}),(0,U.jsx)(Dy,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),F0=P(!1);function I0(){let[e,t]=(0,L.useState)(null),n=R(TI),[r]=FI(),i=z(F0);return(0,U.jsx)(lT,{sx:{mt:`5px`},label:e===``||e===null?`Inspection Type`:`Inspection Type (press enter)`,value:e??``,onChange:e=>t(e.target.value),onKeyPress:t=>{t.key===`Enter`&&n&&e&&e!==``&&(t.preventDefault(),r({mat:n,inspType:e,inspect:!0}),i(!1))}})}function L0(){let e=R(TI),[t]=FI(),n=R(OL),r=Q.of(n).sortBy(e=>e),i=z(F0);return e===null?null:(0,U.jsx)(gx,{children:r.map(n=>(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{onClick:()=>{t({mat:e,inspType:n,inspect:!0}),i(!1)},children:[(0,U.jsx)(Fx,{children:(0,U.jsx)(_E,{})}),(0,U.jsx)(Bx,{primary:n})]})},n))})}function R0(){let e=z(F0),t=R(OI);return t===null||t.materialID<0?null:(0,U.jsx)(X,{color:`primary`,onClick:()=>e(!0),children:`Signal Inspection`})}var z0=(0,L.memo)(function(){let[e,t]=B(F0),n;return n=e?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:`Select Inspection Type`}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(RU,{children:[(0,U.jsx)(I0,{}),(0,U.jsx)(L0,{})]})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>t(!1),color:`primary`,children:`Cancel`})})]}):(0,U.jsx)(`p`,{children:`None`}),(0,U.jsx)(Dy,{open:e,onClose:()=>t(!1),maxWidth:`md`,children:n})}),B0=function(e){return e[e.Material=0]=`Material`,e[e.FreeMaterialZone=1]=`FreeMaterialZone`,e[e.CompletedCollapsedMaterialZone=2]=`CompletedCollapsedMaterialZone`,e[e.CompletedExpandedMaterialZone=3]=`CompletedExpandedMaterialZone`,e[e.PalletFaceZone=4]=`PalletFaceZone`,e[e.QueueZone=5]=`QueueZone`,e[e.BasketZone=6]=`BasketZone`,e}({});function V0(e){switch(e.type){case 0:return`Material-`+(e.identifier??(e.material?.materialID??-1).toString());case 1:return`FreeMaterialZone`;case 2:return`CompletedCollapsedMaterialZone`;case 3:return`CompletedExpandedMaterialZone`;case 4:return`PalletFaceZone-`+e.face.toString();case 5:return`QueueZone-`+e.queue;case 6:return`BasketZone-`+e.basketId.toString()}}function H0(e){switch(e.type){case 0:return[e.type,e.material,e.identifier];case 1:case 2:case 3:return[e.type,null];case 4:return[e.type,e.face];case 5:return[e.type,e.queue];case 6:return[e.type,e.basketId]}}function U0(e){let t,n,r=new Map,i=new Map,a=new Map,o=[];for(let s of e.values())switch(s.type){case 1:t=s.elem;break;case 2:case 3:n=s.elem;break;case 4:r.set(s.face,s.elem);break;case 5:i.set(s.queue,s.elem);break;case 6:a.set(s.basketId,s.elem);break;case 0:s.material&&o.push([s.elem,s.material]);break}return{freeMaterial:t,completedMaterial:n,faces:r,queues:i,baskets:a,material:o}}function W0(e,t){if(!e)return[];let n=U0(t);if(!n.completedMaterial)return[];let r=[],i=new Map,a=new Map,o=new Map,s=0;for(let[t,c]of Q.of(n.material).sortBy(([e])=>e.left,([e])=>e.top))switch(c.action.type){case H.UnloadToCompletedMaterial:case H.UnloadToInProcess:if(c.action.unloadToBasketId){let i=n.baskets.get(c.action.unloadToBasketId),a=o.get(c.action.unloadToBasketId)??0;o.set(c.action.unloadToBasketId,a+1),r.push({fromX:t.left,fromY:t.top+t.height/2,toX:i===void 0?e.left+2:i.right-5,toY:i===void 0?t.top+t.height/2:i.top+20*(a+1),curveDirection:1})}else if(c.action.type===H.UnloadToCompletedMaterial&&(!c.action.unloadIntoQueue||c.action.unloadIntoQueue===``))r.push({fromX:t.right,fromY:t.top+t.height/2,toY:t.top+t.height/2,toX:n.completedMaterial?n.completedMaterial.left+2:e.right-10,curveDirection:1});else{let i,o;c.action.unloadIntoQueue?(i=n.queues.get(c.action.unloadIntoQueue),o=a.get(c.action.unloadIntoQueue)??0,a.set(c.action.unloadIntoQueue,o+1)):(i=n.freeMaterial,o=s,s+=1),r.push({fromX:t.left,fromY:t.top+t.height/2,toX:i===void 0?e.left+2:i.right-5,toY:i===void 0?t.top+t.height/2:i.top+20*(o+1),curveDirection:1})}break;case H.Loading:if(c.action.loadFromBasketId&&c.action.loadOntoFace){let e=n.faces.get(c.action.loadOntoFace);if(e!==void 0){let n=i.get(c.action.loadOntoFace)??0;i.set(c.action.loadOntoFace,n+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:e.left+20,toY:e.top+50+20*n,curveDirection:-1})}}else if(c.action.loadFromBasketId){let i=n.baskets.get(c.action.loadFromBasketId),a=o.get(c.action.loadFromBasketId)??0;o.set(c.action.loadFromBasketId,a+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:i===void 0?e.right-10:i.left+20,toY:i===void 0?t.top+t.height/2:i.top+50+20*a,curveDirection:-1})}else if(c.action.loadOntoFace)if(c.location.type===at.OnPallet)if(c.location.palletNum===c.action.loadOntoPalletNum&&c.location.face===c.action.loadOntoFace)r.push({fromX:t.right,fromY:t.top+t.height*3/4,toX:t.left+t.width*7/8,toY:t.bottom,curveDirection:-1});else{let e=n.faces.get(c.action.loadOntoFace);e&&(c.action.loadOntoFace<(c.location.face??0)?r.push({fromX:t.left,fromY:t.top+t.height/2,toX:t.left,toY:e.bottom+20,curveDirection:-1}):r.push({fromX:t.left,fromY:t.top+t.height/2,toX:t.left,toY:e.top-20,curveDirection:1}))}else{let e=n.faces.get(c.action.loadOntoFace);if(e!==void 0){let n=i.get(c.action.loadOntoFace)??0;i.set(c.action.loadOntoFace,n+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:e.left+20,toY:e.top+50+20*n,curveDirection:-1})}}break;case H.LoadingToBasket:{let i=c.action.loadToBasketId;if(i===void 0)break;let a=n.baskets.get(i),s=o.get(i)??0;o.set(i,s+1),r.push({fromX:t.right,fromY:t.top+t.height/2,toX:a===void 0?e.right-10:a.left+20,toY:a===void 0?t.top+t.height/2:a.top+50+20*s,curveDirection:-1});break}}return r.map(t=>({fromX:t.fromX-e.left,fromY:t.fromY-e.top,toX:t.toX-e.left,toY:t.toY-e.top,curveDirection:t.curveDirection}))}function G0(e){let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:t.width,height:t.height,bottom:t.bottom+window.scrollY,right:t.right+window.scrollX}}function K0(e){let t=(e.fromX+e.toX)/2,n=(e.fromY+e.toY)/2,r=Math.atan2(e.toY-e.fromY,e.toX-e.fromX)+Math.PI*e.curveDirection/2,i=t+50*Math.cos(r),a=n+50*Math.sin(r);return`M${e.fromX},${e.fromY} Q ${i} ${a} ${e.toX} ${e.toY}`}var q0=(0,L.memo)(function({container:e,arrowsWithRefs:t}){let[,n]=(0,L.useState)({height:window.innerHeight,width:window.innerWidth});return(0,L.useEffect)(()=>{function e(){n({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),(0,U.jsx)(`g`,{children:W0(e.current?G0(e.current):null,t.collectValues(e=>e.elem.current?{...e,elem:G0(e.elem.current)}:null)).map((e,t)=>(0,U.jsx)(`path`,{style:{fill:`none`,stroke:`rgba(0,0,0,0.15)`,strokeWidth:2},d:K0(e),markerEnd:`url(#arrow)`},t))})}),J0=(0,L.createContext)(void 0),Y0=(0,L.memo)(function({children:e,hideArrows:t,whiteBackground:n}){let r=(0,L.useRef)(null),[i,a]=(0,L.useState)(ok.empty()),o=(0,L.useMemo)(()=>({registerNode(e,t,n){a(t&&n?r=>r.set(e,{...t,elem:n}):t=>t.delete(e))}}),[a]);return(0,U.jsxs)(`div`,{style:{position:`relative`},children:[(0,U.jsxs)(`svg`,{style:{position:`absolute`,pointerEvents:`none`,width:`100%`,height:`100%`,top:0,right:0,zIndex:-1,backgroundColor:n?`white`:`#F8F8F8`},children:[(0,U.jsx)(`defs`,{children:(0,U.jsx)(`marker`,{id:`arrow`,markerWidth:6,markerHeight:10,refX:`0`,refY:`3`,orient:`auto`,markerUnits:`strokeWidth`,children:(0,U.jsx)(`path`,{d:`M0,0 L0,6 L5,3 z`,fill:`rgba(0,0,0,0.15)`})})}),t?void 0:(0,U.jsx)(q0,{container:r,arrowsWithRefs:i})]}),(0,U.jsx)(`div`,{ref:r,children:(0,U.jsx)(J0.Provider,{value:o,children:e})})]})});function X0(e){let t=(0,L.useContext)(J0);if(!t)throw Error(`useMoveMaterialArrowRef must be used within a MoveMaterialArrowContainer`);let n=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let r=V0(e);return t.registerNode(r,e,n),()=>{t.registerNode(r,null,null)}},[t,...H0(e)]),n}function Z0({kind:e,children:t}){return(0,U.jsx)(`div`,{ref:X0(e),"data-move-material-identifier":V0(e),children:t})}var Q0=45,$0=55;function e2(){let e=R(Fk),t=R(lk),n=R(vr),r=Q.of(e.material).filter(e=>e.location.type===at.OnPallet||e.action.type===H.Loading).toRLookup(e=>e.location.palletNum??e.action.loadOntoPalletNum??0),i=Q.of(e.material).filter(e=>e.location.type===at.InBasket&&e.location.basketId!==null&&e.location.basketId!==void 0||e.action.type===H.LoadingToBasket&&e.action.loadToBasketId!==null&&e.action.loadToBasketId!==void 0).toRLookup(e=>e.location.basketId??e.action.loadToBasketId??0),a=Q.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===nt.LoadUnload).toOrderedMap(([e,t])=>[t.currentPalletLocation.num,{lulNum:t.currentPalletLocation.num,pal:{pallet:t,mats:r.get(t.palletNum)??[]},basket:null,staging:[],sources:[]}]),o=Q.ofObject(e.pallets).filter(([,e])=>e.currentPalletLocation.loc===nt.Machine||e.currentPalletLocation.loc===nt.MachineQueue).map(([e,t])=>t).groupBy(e=>e.currentPalletLocation.group,e=>e.currentPalletLocation.num).toLookupOrderedMap(([[e,t],n])=>e,([[e,t],n])=>t,([[t,n],i])=>{let a=i.find(e=>e.currentPalletLocation.loc===nt.Machine),o=a?r.get(a.palletNum)??[]:null,s=i.find(e=>e.currentPalletLocation.loc===nt.MachineQueue),c=s?r.get(s.palletNum)??[]:null,l=!0,u=c?.[0];if(u&&u.lastCompletedMachiningRouteStopIndex!==null&&u.lastCompletedMachiningRouteStopIndex!==void 0){let r=e.jobs[u.jobUnique]?.procsAndPaths?.[u.process-1]?.paths?.[u.path-1]?.stops?.[u.lastCompletedMachiningRouteStopIndex];r.stationGroup===t&&r.stationNums.includes(n)&&(l=!1)}return l?{name:t+` `+n.toString(),inbound:s?{pallet:s,mats:c??[]}:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:null}:{name:t+` `+n.toString(),inbound:null,worktable:a?{pallet:a,mats:o??[]}:null,outbound:s?{pallet:s,mats:c??[]}:null}}),s=Q.ofObject(e.pallets).filter(([e,t])=>t.currentPalletLocation.loc===nt.Buffer||t.currentPalletLocation.loc===nt.Cart).collect(([e,t])=>{let n=r.get(t.palletNum);return!n||n.length===0?null:{pallet:t,mats:n}}).toOrderedMap(e=>[e.pallet.palletNum,e]),c=1,l=1,u=RE(new Date,-7),d=t.valuesToLazySeq().filter(e=>e.routeEndUTC>u).concat(Q.ofObject(e.jobs).map(([e,t])=>t)).flatMap(e=>e.procsAndPaths).toRArray();for(let e of d)for(let t of(e.basketLoadStations??[]).concat(e.basketUnloadStations??[]))c=Math.max(c,t);let f=Q.of(d).flatMap(e=>e.paths);for(let e of f){for(let t of e.load.concat(e.unload))c=Math.max(c,t);e.face&&(l=Math.max(l,e.face));for(let t of e.stops)o=o.alter(t.stationGroup,e=>{e??=nk.empty();for(let n of t.stationNums)e=e.alter(n,e=>e||{name:t.stationGroup+` `+n.toString(),inbound:null,worktable:null,outbound:null});return e})}for(let e=1;e<=c;e++)a=a.alter(e,t=>t||{lulNum:e,pal:null,basket:null,staging:[],sources:[]});for(let t of Object.values(e.pallets))l=Math.max(l,t.numFaces);for(let t of e.material)t.location.face!==null&&t.location.face!==void 0&&(l=Math.max(l,t.location.face));let p=nk.empty();if(e.machineLocations&&e.machineLocations.length>0)for(let t of e.machineLocations){o=o.alter(t.machineGroup,e=>{if(!e||t.machineNum===void 0)return e;let n=e.delete(t.machineNum);if(n.size!==0)return n});for(let n of t.possibleLoadStations){let r;a=a.alter(n,e=>{r=e});let i=Q.of(r?.pal?.mats??[]).toLookup(n=>{if(n.action.type===H.Machining)return`Machining`;if(n.action.type!==H.Waiting)return`Loading`;if(n.lastCompletedMachiningRouteStopIndex!==null&&n.lastCompletedMachiningRouteStopIndex!==void 0){let r=e.jobs[n.jobUnique]?.procsAndPaths?.[n.process-1]?.paths?.[n.path-1]?.stops?.[n.lastCompletedMachiningRouteStopIndex];if(!r||r.stationGroup===t.machineGroup&&r.stationNums.includes(t.machineNum))return`Loading`}return`Ready`}),o={lulNum:n,machineMoving:t.moving,machineCurrentlyAtLoad:n===t.currentLoadStation?{group:t.machineGroup,num:t.machineNum}:null,readyMats:i.get(`Ready`)??[],machiningMats:i.get(`Machining`)??[],loadingMats:i.get(`Loading`)??[]};p=p.set(n,o)}}let m=new Map,h=new Map,g=new Map,_=0,v=0;for(let t of Q.ofObject(e.baskets??{}).map(([e,t])=>t).sortBy(e=>e.basketId)){let e={basket:t,mats:i.get(t.basketId)??[]};switch(t.position.location){case gt.Storage:e.mats.length>0?v+=1:_+=1;break;case gt.LoadUnload:case gt.LoadStationStaging:{let n=t.position.locationNum;if(n===null){g.set(t.basketId,e);break}let r=t.position.location===gt.LoadUnload?h:m,i=r.get(n)??[];i.push(e),r.set(n,i);break}case gt.InTransit:g.set(t.basketId,e);break}}let y=0,b=0;return a=a.mapValues(e=>{let t=new Map,r=Q.of(e.pal?.mats??e.basket?.mats??[]).filter(e=>e.location.type!==at.OnPallet).toRArray();for(let e of r){if(e.location.type===at.Free){let n=`free`,r=t.get(n)??{label:`To Load`,mats:[]};r.mats.push(e),t.set(n,r);continue}if(e.action.loadFromBasketId!==null&&e.action.loadFromBasketId!==void 0){let r=`basket:${e.action.loadFromBasketId}`,i=t.get(r)??{label:`From ${_A(n.basketName)} ${e.action.loadFromBasketId}`,mats:[]};i.mats.push(e),t.set(r,i);continue}if(e.location.type===at.InQueue&&e.location.currentQueue){let n=`queue:${e.location.currentQueue}`,r=t.get(n)??{label:`From ${e.location.currentQueue}`,mats:[]};r.mats.push(e),t.set(n,r)}}let i=Q.of(h.get(e.lulNum)??[]).sortBy(e=>e.basket.position.locationNum).toRArray();for(let e of i.slice(1))g.set(e.basket.basketId,e);let a=new Set(Q.of(e.pal?.mats??[]).collect(e=>e.action.loadFromBasketId??null).toRArray()),o=Q.of(m.get(e.lulNum)??[]).filter(e=>!a.has(e.basket.basketId)).sortBy(e=>e.basket.position.locationNum).toRArray();y=Math.max(y,o.length);let s=Q.of(t).map(([e,t])=>({key:e,label:t.label,mats:t.mats})).sortBy(e=>e.label).toRArray();return b=Math.max(b,s.length),{...e,basket:i[0]??null,staging:o,sources:s}}),{machines:o.mapValues(e=>e.valuesToAscLazySeq().toRArray()),loads:a.valuesToAscLazySeq().toRArray(),stockerPals:s.valuesToAscLazySeq().toRArray(),floatingBaskets:Q.of(g.values()).toRArray(),storageBaskets:_+v>0?{empty:_,filled:v}:null,machineAtLoad:p.valuesToAscLazySeq().toRArray(),maxNumFacesOnPallet:l,maxNumStagingRows:y,maxNumSourceRows:b}}function t2({mats:e}){let[t,n]=(0,L.useState)(!1),r=(0,L.useRef)(null),i=(0,L.useRef)(null),[a,o]=(0,L.useState)(!1),s=z(SI),c=R(Fk);function l(){r.current!==null&&(clearTimeout(r.current),r.current=null),n(!0)}function u(){r.current=setTimeout(()=>{n(!1),r.current=null},200)}function d(){e.length===1?s({type:`MatDetails`,details:e[0]}):o(!0)}function f(e,t){return t==null?null:(e!=null&&e!=null?c.pallets[e]?.faceNames?.[t-1]:null)??`Face: `+t.toString()}return(0,U.jsxs)(Y,{sx:{width:Q0,height:Q0,overflow:`visible`},children:[(0,U.jsx)(Vp,{elevation:4,onPointerEnter:l,onPointerLeave:u,sx:{position:`relative`,zIndex:t?10:0,width:`max-content`,height:`max-content`},children:(0,U.jsx)(tv,{badgeContent:e.length>1?e.length:0,color:`secondary`,children:(0,U.jsx)(wm,{focusRipple:!0,onClick:d,ref:i,children:(0,U.jsx)(Lp,{orientation:`horizontal`,in:t,collapsedSize:Q0,children:(0,U.jsxs)(Y,{sx:{display:`flex`},children:[(0,U.jsx)(zU,{part:e[0].partName,size:Q0}),(0,U.jsx)(Y,{sx:{marginLeft:`10px`,marginRight:`10px`,whiteSpace:`nowrap`,textAlign:`left`},children:(0,U.jsx)(Lp,{in:t,collapsedSize:Q0,children:(0,U.jsxs)(nw,{direction:`column`,sx:{marginBottom:`0.2em`},children:[(0,U.jsxs)(J,{variant:`h6`,children:[e[0].partName,`-`,e[0].process]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`small`,{children:f(e[0].location.palletNum,e[0].location.face)??f(e[0].action.loadOntoPalletNum,e[0].action.loadOntoFace)})}),Q.of(e).collect(e=>e.serial?(0,U.jsx)(`div`,{children:(0,U.jsxs)(`small`,{children:[`Serial: `,e.serial]})},e.materialID):void 0),(0,U.jsx)(`div`,{children:(0,U.jsx)(qU,{mat:e[0]})})]})})})]})})})})}),(0,U.jsx)(VS,{anchorEl:i.current,open:a,onClose:()=>o(!1),anchorOrigin:{vertical:`top`,horizontal:`left`},children:Q.of(e).map((e,t)=>(0,U.jsx)(GS,{onClick:()=>{o(!1),s({type:`MatDetails`,details:e})},children:e.serial&&e.serial!==``?e.serial:(t+1).toString()},e.materialID))})]})}function n2({maxNumFaces:e,mats:t,loadingOntoPallet:n,noFilter:r,showExpanded:i}){if(i&&e===1)return(0,U.jsx)(Y,{sx:{display:`flex`,flexDirection:`column`,flexWrap:`wrap`},children:t.map(e=>(0,U.jsx)(eW,{mat:e},e.materialID))});{let i=n?Q.of(t).filter(e=>r||e.location.type!==at.OnPallet).orderedGroupBy(e=>e.action.loadOntoFace??1):Q.of(t).filter(e=>r||e.location.type===at.OnPallet).orderedGroupBy(e=>e.action.type===H.Loading?e.action.loadOntoFace??1:e.location.face??1);return(0,U.jsx)(Y,{sx:{display:`grid`,gridTemplateRows:`${Q0}px`,gridTemplateColumns:`repeat(${e}, ${Q0}px)`,columnGap:`5px`,height:`100%`,alignContent:`center`,justifyContent:`center`},children:i.map(([e,t])=>(0,U.jsx)(Y,{sx:{gridColumn:e,gridRow:1},children:(0,U.jsx)(t2,{mats:t})},e))})}}function r2({mats:e}){let t=Q.of(e).orderedGroupBy(e=>e.location.basketSlot??0);return(0,U.jsx)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`flex-start`,alignItems:`flex-start`,gap:`5px`,minHeight:`${Q0}px`,paddingLeft:`5px`,paddingRight:`5px`,height:`100%`,alignContent:`center`},children:t.map(([e,t])=>(0,U.jsx)(Y,{children:(0,U.jsx)(t2,{mats:t})},e))})}function i2({mats:e,maxNumFaces:t}){return(0,U.jsx)(Y,{sx:{minHeight:`${$0}px`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`,paddingLeft:`5px`,gap:`5px`,paddingRight:`5px`},children:(0,U.jsx)(n2,{mats:e,maxNumFaces:t,loadingOntoPallet:!0})})}function a2(e,t){let n=Q0*e+5*(e+1);return t?`60px ${Math.max(n,100)}px`:`${Math.max(n,100)}px`}function o2(e){e=Math.round(e);let t=Math.abs(e)%60,n=Math.floor(Math.abs(e)/60),r=n%60,i=Math.floor(n/60);return i>0?`${e<0?`-`:``}${i}:${r.toString().padStart(2,`0`)}:${t.toString().padStart(2,`0`)}`:`${e<0?`-`:``}${r}:${t.toString().padStart(2,`0`)}`}function s2(e){let t=e?.find(e=>e.action.type===H.Machining),n=t?.action?.elapsedMachiningTime,r=t?.action.expectedRemainingMachiningTime,i=R(Fk).timeOfCurrentStatusUTC,a=R(Ik),o=null;r&&(o=Gk(r)-(a-Math.floor(i.getTime()/1e3)));let s=null;return n&&(s=Gk(n)+(a-Math.floor(i.getTime()/1e3))),o!==null&&s!==null?[!0,`${o2(s)} / ${o2(o)}`,o<0?-1:s/(s+o)*100]:o===null?s===null?[!!t,`Idle`,null]:[!0,o2(s),null]:[!0,` / `+o2(o),o<0?-1:null]}function c2({machine:e}){let[t,n,r]=s2(e.worktable?.mats);return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(J,{variant:`h5`,children:e.name}),(0,U.jsx)(J,{variant:`subtitle1`,children:n}),t?r===null?(0,U.jsx)(ix,{}):r<0?(0,U.jsx)(ix,{color:`error`}):(0,U.jsx)(ix,{variant:`determinate`,value:r}):void 0]})}function l2({maxNumFaces:e,machine:t}){return(0,U.jsxs)(Y,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${$0}px ${$0}px ${$0}px`,gridTemplateColumns:a2(e,!0),gridTemplateAreas:`"machname machname" "inboundpal inboundmat" "worktablepal worktablemat" "outboundpal outboundmat"`},children:[(0,U.jsx)(Y,{sx:{gridArea:`machname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,U.jsx)(c2,{machine:t})}),(0,U.jsx)(Y,{sx:{gridArea:`inboundpal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,U.jsxs)(nw,{children:[(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`In`}),t.inbound?(0,U.jsx)(J,{variant:`h6`,sx:{textAlign:`center`},children:t.inbound.pallet.palletNum}):void 0]})}),(0,U.jsx)(Y,{sx:{gridArea:`inboundmat`,borderBottom:`1px solid black`},children:t.inbound?(0,U.jsx)(n2,{mats:t.inbound.mats,maxNumFaces:e}):void 0}),(0,U.jsx)(Y,{sx:{gridArea:`worktablepal`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,U.jsxs)(nw,{children:[(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`Work`}),t.worktable?(0,U.jsx)(J,{variant:`h6`,sx:{textAlign:`center`},children:t.worktable.pallet.palletNum}):void 0]})}),(0,U.jsx)(Y,{sx:{gridArea:`worktablemat`,borderBottom:`1px solid black`},children:t.worktable?(0,U.jsx)(n2,{mats:t.worktable.mats,maxNumFaces:e}):void 0}),(0,U.jsx)(Y,{sx:{gridArea:`outboundpal`,borderRight:`1px solid black`,padding:`2px`},children:(0,U.jsxs)(nw,{children:[(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`Out`}),t.outbound?(0,U.jsx)(J,{variant:`h6`,sx:{textAlign:`center`},children:t.outbound.pallet.palletNum}):void 0]})}),(0,U.jsx)(Y,{sx:{gridArea:`outboundmat`},children:t.outbound?(0,U.jsx)(n2,{mats:t.outbound.mats,maxNumFaces:e}):void 0})]})}function u2(e){let t=(e?.find(e=>e.action.type===H.Loading||e.action.type===H.LoadingToBasket||e.action.type===H.UnloadToCompletedMaterial||e.action.type===H.UnloadToInProcess))?.action?.elapsedLoadUnloadTime,n=R(Fk).timeOfCurrentStatusUTC,r=R(Ik),i=null;return t&&(i=Gk(t)+(r-Math.floor(n.getTime()/1e3))),i===null?`Idle`:o2(i)}function d2({load:e}){let t=u2(e.pal?.mats??e.basket?.mats),n=R(vr);return(0,U.jsxs)(Y,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,U.jsx)(J,{variant:`h5`,children:hA(e.lulNum,n.loadStationNames)}),(0,U.jsx)(J,{variant:`body1`,children:t})]})}function f2({maxNumFaces:e,maxNumStagingRows:t,maxNumSourceRows:n,load:r}){let i=_A(R(vr).basketName),a=r.pal?`Pallet`:r.basket?i:null,o=r.pal?r.pal.pallet.palletNum.toString():r.basket?r.basket.basket.basketId.toString():null,s=Math.max(1,n),c=Math.max(1,t),l=Array.from({length:s},(e,t)=>`"source${t} sourcemat${t}"`),u=Array.from({length:c},(e,t)=>`"stage${t} stagemat${t}"`),d=[`"lulname lulname"`,...l,`"current currentmat"`,...u].join(` `);return(0,U.jsxs)(Y,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto repeat(${s+1+c}, ${$0}px)`,gridTemplateColumns:a2(e,!0),gridTemplateAreas:d},children:[(0,U.jsx)(Y,{sx:{gridArea:`lulname`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,U.jsx)(d2,{load:r})}),Array.from({length:s},(t,n)=>{let i=r.sources[n]??null;return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(Y,{sx:{gridArea:`source${n}`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:i?(0,U.jsx)(J,{variant:`body2`,sx:{textAlign:`center`},children:i.label}):void 0}),(0,U.jsx)(Y,{sx:{gridArea:`sourcemat${n}`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:i?(0,U.jsx)(i2,{mats:i.mats,maxNumFaces:e}):void 0})]},`source-${n}`)}),(0,U.jsx)(Y,{sx:{gridArea:`current`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,U.jsxs)(nw,{children:[a?(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:a}):void 0,o?(0,U.jsx)(J,{variant:`h6`,sx:{textAlign:`center`},children:o}):void 0]})}),(0,U.jsxs)(Y,{sx:{gridArea:`currentmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`,borderBottom:`1px solid black`},children:[r.pal?(0,U.jsx)(n2,{mats:r.pal.mats,maxNumFaces:e}):void 0,!r.pal&&r.basket?(0,U.jsx)(r2,{mats:r.basket.mats}):void 0]}),Array.from({length:c},(e,t)=>{let n=r.staging[t]??null,a=t===c-1;return(0,U.jsxs)(L.Fragment,{children:[(0,U.jsx)(Y,{sx:{gridArea:`stage${t}`,borderRight:`1px solid black`,...a?{}:{borderBottom:`1px solid black`},padding:`2px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:n?(0,U.jsxs)(J,{variant:`body2`,sx:{textAlign:`center`},children:[`Staging `,i,` `,n.basket.basketId]}):void 0}),(0,U.jsx)(Y,{sx:{gridArea:`stagemat${t}`,...a?{}:{borderBottom:`1px solid black`},display:`flex`,flexDirection:`column`,justifyContent:`center`},children:n?(0,U.jsx)(r2,{mats:n.mats}):void 0})]},`stage-${t}`)})]})}function p2({status:e}){let t=u2(e.loadingMats),[n,r,i]=s2(e.machiningMats);return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(J,{variant:`h5`,children:[`Station `,e.lulNum]}),e.machineCurrentlyAtLoad?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(J,{variant:`h5`,children:[e.machineCurrentlyAtLoad.group,` `,e.machineCurrentlyAtLoad.num]}),(0,U.jsx)(J,{variant:`subtitle1`,children:r===`Idle`?t:r}),n?i===null?(0,U.jsx)(ix,{}):i<0?(0,U.jsx)(ix,{color:`error`}):(0,U.jsx)(ix,{variant:`determinate`,value:i}):void 0]}):(0,U.jsxs)(U.Fragment,{children:[e.machineMoving?(0,U.jsx)(J,{variant:`subtitle2`,children:`Machine Moving`}):void 0,(0,U.jsxs)(J,{variant:`subtitle1`,children:[`Loading `,t]})]})]})}function m2({maxNumFaces:e,status:t}){return(0,U.jsxs)(Y,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`minmax(104px, max-content) repeat(3, ${e>1?$0.toString()+`px`:`minmax(110px, max-content)`})`,gridTemplateColumns:e===1?`60px minmax(230px, max-content)`:a2(e,!0),gridTemplateAreas:`"name name" "ready readymat" "machining machiningmat" "loadstation loadstationmat"`},children:[(0,U.jsx)(Y,{sx:{gridArea:`name`,padding:`0.2em`,borderBottom:`1px solid black`},children:(0,U.jsx)(p2,{status:t})}),(0,U.jsx)(Y,{sx:{gridArea:`ready`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`Ready`})}),(0,U.jsx)(Y,{sx:{gridArea:`readymat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,U.jsx)(n2,{mats:t.readyMats,maxNumFaces:e,showExpanded:!0})}),(0,U.jsx)(Y,{sx:{gridArea:`machining`,borderRight:`1px solid black`,borderBottom:`1px solid black`,padding:`2px`},children:(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`Work`})}),(0,U.jsx)(Y,{sx:{gridArea:`machiningmat`,borderBottom:`1px solid black`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,U.jsx)(n2,{mats:t.machiningMats,maxNumFaces:e,showExpanded:!0})}),(0,U.jsx)(Y,{sx:{gridArea:`loadstation`,borderRight:`1px solid black`,padding:`2px`},children:(0,U.jsxs)(nw,{children:[(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`Load`}),(0,U.jsx)(J,{variant:`body1`,sx:{textAlign:`center`},children:`Station`})]})}),(0,U.jsx)(Y,{sx:{gridArea:`loadstationmat`,display:`flex`,flexDirection:`column`,justifyContent:`center`},children:(0,U.jsx)(n2,{mats:t.loadingMats,maxNumFaces:e,showExpanded:!0,noFilter:!0})})]})}function h2({maxNumFaces:e,pallet:t}){return(0,U.jsxs)(Y,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${$0}px`,gridTemplateColumns:a2(e,!1),gridTemplateAreas:`"palname" "palmat"`},children:[(0,U.jsxs)(J,{variant:`h5`,sx:{gridArea:`palname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[`Pallet `,t.pallet.palletNum]}),(0,U.jsx)(Y,{sx:{gridArea:`palmat`},children:(0,U.jsx)(n2,{mats:t.mats,maxNumFaces:e})})]})}function g2({basket:e}){let t=_A(R(vr).basketName);return(0,U.jsxs)(Y,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,gridTemplateRows:`auto ${$0}px`,gridTemplateColumns:`minmax(120px, max-content)`,gridTemplateAreas:`"basketname" "basketmat"`},children:[(0,U.jsxs)(J,{variant:`h5`,sx:{gridArea:`basketname`,padding:`0.2em`,borderBottom:`1px solid black`},children:[t,` `,e.basket.basketId]}),(0,U.jsx)(Y,{sx:{gridArea:`basketmat`},children:(0,U.jsx)(r2,{mats:e.mats})})]})}function _2({empty:e,filled:t}){return(0,U.jsxs)(Y,{sx:{display:`grid`,border:`1px solid black`,margin:`5px`,padding:`0.5em 1em`,alignContent:`center`,minWidth:`170px`},children:[(0,U.jsxs)(J,{variant:`h5`,children:[_A(R(vr).basketName),` Storage`]}),(0,U.jsxs)(J,{variant:`body1`,children:[`Empty: `,e]}),(0,U.jsxs)(J,{variant:`body1`,children:[`Filled: `,t]})]})}var v2=(0,L.memo)(function({overview:e}){return(0,U.jsxs)(`div`,{children:[e.machines.toAscLazySeq().map(([t,n])=>(0,U.jsx)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:n.map(t=>(0,U.jsx)(l2,{machine:t,maxNumFaces:e.maxNumFacesOnPallet},t.name))},t)),e.loads.length>0?(0,U.jsx)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.loads.map(t=>(0,U.jsx)(f2,{load:t,maxNumFaces:e.maxNumFacesOnPallet,maxNumStagingRows:e.maxNumStagingRows,maxNumSourceRows:e.maxNumSourceRows},t.lulNum))}):void 0,e.machineAtLoad.length>0?(0,U.jsx)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:e.machineAtLoad.map(t=>(0,U.jsx)(m2,{status:t,maxNumFaces:e.maxNumFacesOnPallet},t.lulNum))}):void 0,e.stockerPals.length>0||e.floatingBaskets.length>0||e.storageBaskets?(0,U.jsxs)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[e.stockerPals.map(t=>(0,U.jsx)(h2,{pallet:t,maxNumFaces:e.maxNumFacesOnPallet},t.pallet.palletNum)),e.floatingBaskets.map(e=>(0,U.jsx)(g2,{basket:e},e.basket.basketId)),e.storageBaskets?(0,U.jsx)(_2,{empty:e.storageBaskets.empty,filled:e.storageBaskets.filled}):void 0]}):void 0]})}),y2=(0,L.memo)(function({ignoreOperator:e}){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null);function a(){n(null),i(null)}return(0,U.jsx)(pW,{onClose:a,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(XY,{st:t,setState:n}),r===null?null:(0,U.jsx)(KY,{st:r,setState:i})]}),buttons:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(WY,{ignoreOperator:e}),(0,U.jsx)(R0,{}),(0,U.jsx)(ZY,{st:t,setState:n,onClose:a,ignoreOperator:e}),(0,U.jsx)(qY,{st:r,setState:i,onClose:a,ignoreOperator:e})]})})});function b2({ignoreOperator:e,whiteBackground:t}){qI(`System Overview`);let n=e2();return(0,U.jsxs)(`main`,{style:{padding:`10px`,minHeight:`calc(100vh - 64px)`,backgroundColor:t?`white`:`#F8F8F8`},children:[(0,U.jsx)(v2,{overview:n}),(0,U.jsx)(y2,{ignoreOperator:e}),(0,U.jsx)(z0,{})]})}var x2=30;function S2({machine:e}){let t=Ed(),[,,n]=s2(e.worktable?.mats);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,U.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.inbound===null?`white`:t.palette.secondary.main}),(0,U.jsx)(`rect`,{x:3,y:11,width:24,height:8,fill:e.worktable===null?`white`:n!=null&&n<0?t.palette.error.main:t.palette.secondary.main}),(0,U.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.outbound===null?`white`:t.palette.secondary.main})]})}function C2({load:e}){let t=Ed();return(0,U.jsx)(`polygon`,{points:`3,27 27,27 15,3`,fill:e.pal===null&&e.basket===null&&e.staging.length===0?`white`:t.palette.secondary.main,stroke:`black`})}function w2({status:e}){let t=Ed(),[,,n]=s2(e.machiningMats);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`rect`,{x:3,y:3,width:24,height:24,stroke:`black`}),`;`,(0,U.jsx)(`rect`,{x:3,y:3,width:24,height:8,fill:e.readyMats.length===0?`white`:t.palette.secondary.main}),(0,U.jsx)(`rect`,{x:3,y:11,width:24,height:8,fill:e.machiningMats.length===0?`white`:n!=null&&n<0?t.palette.error.main:t.palette.secondary.main}),(0,U.jsx)(`rect`,{x:3,y:19,width:24,height:8,fill:e.loadingMats.length===0?`white`:t.palette.secondary.main})]})}var T2=(0,L.memo)(function({overview:e}){let t=e.machines.toAscLazySeq().sumBy(([,e])=>e.length);return(0,U.jsx)(Y,{sx:{height:`1.5em`,"&:hover":{backgroundColor:`primary.light`}},children:(0,U.jsxs)(`svg`,{viewBox:`0 0 ${(t+e.loads.length+e.machineAtLoad.length)*x2} ${x2}`,preserveAspectRatio:`none`,width:`140px`,height:`1.5em`,children:[(0,U.jsx)(`g`,{children:e.machines.toAscLazySeq().flatMap(([,e])=>e).map((e,t)=>(0,U.jsx)(`g`,{transform:`translate(${t*x2})`,children:(0,U.jsx)(S2,{machine:e})},e.name))}),(0,U.jsx)(`g`,{transform:`translate(${t*x2})`,children:e.loads.map((e,t)=>(0,U.jsx)(`g`,{transform:`translate(${t*x2})`,children:(0,U.jsx)(C2,{load:e})},e.lulNum))}),(0,U.jsx)(`g`,{transform:`translate(${(t+e.loads.length)*x2})`,children:e.machineAtLoad.map((e,t)=>(0,U.jsx)(`g`,{transform:`translate(${t*x2})`,children:(0,U.jsx)(w2,{status:e})},e.lulNum))})]})})}),E2=(0,L.memo)(function({full:e}){let[t,n]=(0,L.useState)(!1),r=e2();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{onClick:()=>n(!0),children:(0,U.jsx)(T2,{overview:r})}),(0,U.jsxs)(Dy,{open:t,onClose:()=>n(!1),maxWidth:`xl`,fullScreen:e,children:[e?(0,U.jsx)(gh,{sx:{position:`relative`},children:(0,U.jsxs)(Ew,{children:[(0,U.jsx)($m,{edge:`start`,color:`inherit`,onClick:()=>n(!1),"aria-label":`close`,children:(0,U.jsx)(PT,{})}),(0,U.jsx)(J,{sx:{ml:2,flex:1},variant:`h6`,component:`div`,children:`System Overview`})]})}):void 0,(0,U.jsx)(Ly,{children:(0,U.jsx)(Y,{sx:{paddingBottom:`2em`,paddingLeft:`5em`,paddingRight:`5em`},children:(0,U.jsx)(v2,{overview:r})})})]})]})});function D2(e){return Number.isInteger(e)&&(e??0)>0}function O2(e){return typeof e==`string`&&e.trim()!==``}function k2(e,t){if(e.location.type===at.InBasket&&e.location.basketId===t&&(e.action.type===H.UnloadToInProcess||e.action.type===H.UnloadToCompletedMaterial))return D2(e.location.basketSlot)?{type:`valid`,workId:e.action.workId}:{type:`invalid`};if(e.action.type===H.LoadingToBasket){if(!D2(e.action.loadToBasketId))return{type:`invalid`};if(e.action.loadToBasketId!==t)return;let n=e.location.type===at.InBasket&&e.location.basketId===t&&e.location.basketSlot===e.action.loadToBasketSlot;return!D2(e.action.loadToBasketSlot)||!n&&e.location.type!==at.Free&&(e.location.type!==at.InQueue||!O2(e.location.currentQueue))?{type:`invalid`}:{type:`valid`,workId:e.action.workId}}}function A2(e,t){let n=Q.of(e).collect(e=>k2(e,t)).toRArray();if(n.some(e=>e.type===`invalid`))return{type:`inconsistent`};let r=n.filter(e=>e.type===`valid`);if(r.length===0)return{type:`none`};let i=r.filter(e=>O2(e.workId)),a=Q.of(i).toHashSet(({workId:e})=>e);return i.length!==r.length||a.size!==1?{type:`inconsistent`}:{type:`confirmable`,work:{workId:i[0].workId}}}function j2(e){return e.location.type===at.InBasket&&e.location.basketId===e.action.loadToBasketId&&e.location.basketSlot===e.action.loadToBasketSlot?`Unload, re-plate, and reload this slot`:e.location.type===at.InQueue&&e.location.currentQueue?`Load from ${e.location.currentQueue}`:`Load from raw material`}function M2({material:e,fsize:t}){return e.map(e=>(0,U.jsx)(Z0,{kind:{type:B0.Material,material:e},children:(0,U.jsx)(eW,{mat:e,fsize:t})},e.materialID))}function N2({stationNumber:e,basket:t,material:n,fsize:r,submitCommand:i}){let[a,o]=(0,L.useState)(),s=(0,L.useMemo)(()=>A2(n,t.basketId),[t.basketId,n]),c=s.type===`confirmable`?s.work:void 0,l=a!==void 0&&a.workId===c?.workId?a.state:`idle`,u=(0,L.useMemo)(()=>Q.of(n).filter(e=>e.location.type===at.InBasket&&e.location.basketId===t.basketId&&e.location.basketSlot!==void 0).groupBy(e=>e.location.basketSlot??0).toHashMap(e=>e),[t.basketId,n]),d=(0,L.useMemo)(()=>Q.of(n).filter(e=>e.action.type===H.LoadingToBasket&&e.action.loadToBasketId===t.basketId&&e.action.loadToBasketSlot!==void 0).groupBy(e=>e.action.loadToBasketSlot??0).toHashMap(e=>e),[t.basketId,n]),f=(0,L.useMemo)(()=>Q.of(t.emptySlots??[]).concat(t.unknownSlots??[]).concat(u.keysToLazySeq()).concat(d.keysToLazySeq()).distinctBy(e=>e).toSortedArray(e=>e),[t.emptySlots,t.unknownSlots,u,d]);async function p(){if(c===void 0||i===void 0)return;let t=c.workId;o({workId:t,state:`submitting`});try{let n=await i(e,{workId:t});o(e=>e?.workId===t?{workId:t,state:n}:e)}catch{o(e=>e?.workId===t?{workId:t,state:`error`}:e)}}let m=l===`submitting`||l===`accepted`||l===`conflict`;return(0,U.jsxs)(nw,{spacing:2,sx:{mt:2},children:[(0,U.jsx)(J,{variant:`h6`,children:`Basket slots`}),(0,U.jsx)(Y,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(15em, 1fr))`,gap:2},children:f.map(e=>{let n=u.get(e)??[],i=d.get(e)??[],a=t.unknownSlots?.includes(e)===!0;return(0,U.jsx)(_v,{"data-testid":`basket-load-station-slot-${e}`,variant:`outlined`,children:(0,U.jsxs)(xv,{children:[(0,U.jsxs)(J,{variant:`h6`,children:[`Slot `,e]}),n.length>0?(0,U.jsx)(M2,{material:n,fsize:r}):(0,U.jsx)(J,{color:a?`warning.main`:`text.secondary`,children:a?`Unknown`:`Empty`}),i.map((e,t)=>(0,U.jsxs)(Y,{sx:{mt:1},children:[(0,U.jsx)(J,{children:j2(e)}),(0,U.jsxs)(J,{variant:`body2`,color:`text.secondary`,children:[e.partName,` · Process `,e.action.processAfterLoad??e.process]})]},`${e.jobUnique}-${e.process}-${t}`))]})},e)})}),c&&i?(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`flex-end`},children:(0,U.jsx)(X,{variant:`contained`,disabled:m,onClick:()=>void p(),children:`Confirm`})}):c?(0,U.jsx)(dh,{severity:`warning`,children:`Basket work confirmation is not configured.`}):s.type===`inconsistent`?(0,U.jsx)(dh,{severity:`warning`,children:`Basket work is inconsistent. Wait for refreshed material actions before confirming.`}):null,l===`accepted`?(0,U.jsx)(dh,{severity:`success`,children:`Confirmation accepted. Waiting for refreshed work.`}):l===`conflict`?(0,U.jsx)(dh,{severity:`warning`,children:`Basket work changed before confirmation. Review the refreshed slots and try again.`}):l===`error`?(0,U.jsx)(dh,{severity:`error`,children:`Unable to confirm basket work. No work was assumed complete.`}):null]})}function P2(e){return encodeURIComponent(e.toString())}function F2(e){switch(e.kind){case`queue`:return`load-station-queue-${P2(e.label)}`;case`baskets`:return`load-station-baskets`;case`free`:return`load-station-material`}}function I2(e,t,n){switch(e.action.type){case H.Loading:return t!==void 0&&e.action.loadOntoPalletNum===t.palletNum||n!==void 0&&e.action.loadFromBasketId===n.basketId;case H.LoadingToBasket:return n!==void 0&&e.action.loadToBasketId===n.basketId;default:return!1}}function L2(e,t,n,r){let i,a,o=new Set;if(e>=0){for(let t of Object.values(n.pallets))if(t.currentPalletLocation.loc===nt.LoadUnload&&t.currentPalletLocation.num===e){i=t;break}for(let t of Object.values(n.baskets??{}))t.position.locationNum===e&&(t.position.location===gt.LoadUnload?a=t:t.position.location===gt.LoadStationStaging&&o.add(t.basketId))}let s=new Set(t);if(i!==void 0)for(let e of n.material)e.action.type===H.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.location.type===at.InQueue&&e.location.currentQueue&&s.add(e.location.currentQueue),e.action.type===H.Loading&&e.action.loadOntoPalletNum===i.palletNum&&e.action.loadFromBasketId&&o.add(e.action.loadFromBasketId),(e.action.type===H.UnloadToInProcess||e.action.type===H.UnloadToCompletedMaterial)&&e.action.unloadToBasketId&&e.location.type===at.OnPallet&&e.location.palletNum===i.palletNum&&o.add(e.action.unloadToBasketId),(e.action.type===H.UnloadToInProcess||e.action.type===H.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&e.location.type===at.OnPallet&&e.location.palletNum===i.palletNum&&s.add(e.action.unloadIntoQueue);else if(a!==void 0)for(let e of n.material)e.location.type===at.InBasket&&e.location.basketId===a.basketId&&(e.action.type===H.UnloadToInProcess||e.action.type===H.UnloadToCompletedMaterial)&&e.action.unloadIntoQueue&&s.add(e.action.unloadIntoQueue),e.location.type===at.InQueue&&e.location.currentQueue&&I2(e,void 0,a)&&s.add(e.location.currentQueue);let c=new Map(Q.of(s).map(e=>[e,{mats:[],hiddenCnt:0}])),l=new Map(Q.of(o).map(e=>[e,{mats:[],hiddenCnt:0}])),u=[],d=nk.empty(),f=null;if(i)for(let e=1;e<=i.numFaces;e++)d=d.set(e,[]);else a&&(d=d.set(1,[]));for(let e of n.material){if(i?(e.action.type===H.Loading&&e.action.loadOntoPalletNum===i.palletNum&&(e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.action.loadOntoFace&&!d.has(e.action.loadOntoFace)&&(d=d.set(e.action.loadOntoFace,[])),e.location.type===at.Free&&u.push(e)),e.location.type===at.OnPallet&&e.location.palletNum===i.palletNum&&((e.action.type===H.UnloadToCompletedMaterial||e.action.type===H.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(e.location.face??1,t=>t?(t.push(e),t):[e]))):a&&(I2(e,i,a)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),e.action.type===H.LoadingToBasket&&e.action.loadToBasketId===a.basketId&&e.location.type===at.Free&&u.push(e),e.location.type===at.InBasket&&e.location.basketId===a.basketId&&((e.action.type===H.UnloadToCompletedMaterial||e.action.type===H.UnloadToInProcess)&&e.action.elapsedLoadUnloadTime&&(f=e.action.elapsedLoadUnloadTime),d=d.alter(1,t=>t?(t.push(e),t):[e]))),e.location.type===at.InQueue&&e.location.currentQueue&&c.has(e.location.currentQueue)){let t=c.get(e.location.currentQueue);r&&!I2(e,i,a)?t===void 0?c.set(e.location.currentQueue,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?c.set(e.location.currentQueue,{mats:[e],hiddenCnt:0}):t.mats.push(e)}if(e.location.type===at.InBasket&&e.location.basketId&&l.has(e.location.basketId)){let t=l.get(e.location.basketId);r&&!I2(e,i,a)?t===void 0?l.set(e.location.basketId,{mats:[],hiddenCnt:1}):t.hiddenCnt+=1:t===void 0?l.set(e.location.basketId,{mats:[e],hiddenCnt:0}):t.mats.push(e)}}c.forEach(e=>e.mats.sort(ND(e=>e.location.queuePosition??0))),l.forEach(e=>e.mats.sort(ND(e=>e.location.basketSlot??0)));let p=u.length+d.valuesToAscLazySeq().sumBy(e=>e.length);return{pallet:i,activeBasket:a,allMaterial:n.material,face:d,freeLoadingMaterial:u,queues:c,baskets:l,elapsedLoadingTime:f,fsize:p<=2?`x-large`:p<=6?`large`:`normal`}}function R2({loadData:e}){let t=KI(),n=R(Nk),r=(0,L.useMemo)(()=>{let t=e.pallet;return t?Q.of(e.face.values()).append(e.freeLoadingMaterial).concat(Q.of(e.queues).collect(([e,t])=>t.mats)).flatMap(e=>e).collect(e=>e.action.type===H.Loading&&e.action.loadOntoPalletNum===t.palletNum&&e.location.type===at.OnPallet&&e.location.palletNum===t.palletNum?Zt(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):e.action.type===H.Loading&&e.action.loadOntoPalletNum===t.palletNum?Zt(e.partName,`load`,e.materialID,t.palletNum,e.action.processAfterLoad??e.process,n):e.location.type===at.OnPallet&&e.location.palletNum===t.palletNum&&(e.action.type===H.UnloadToCompletedMaterial||e.action.type===H.UnloadToInProcess)?Zt(e.partName,`unload`,e.materialID,t.palletNum,e.process,n):null).toRArray():[]},[e,n]);if(r.length===0||t)return(0,U.jsx)(`div`,{});function i(){for(let e of r)window.open(e,`_blank`)}return(0,U.jsx)(Y,{sx:{position:`fixed`,bottom:`5px`,right:`5px`},children:(0,U.jsx)(tw,{title:`Open All Instructions`,children:(0,U.jsx)(Zy,{onClick:i,color:`secondary`,children:(0,U.jsx)(YT,{})})})})}function z2({elapsedLoadTime:e}){let t=R(Fk).timeOfCurrentStatusUTC,n=R(Ik);return e?(0,U.jsx)(`span`,{children:o2(Gk(e)+(n-Math.floor(t.getTime()/1e3)))}):null}function B2({data:e,faceNum:t,loadNum:n,submitBasketLoadStationCommand:r}){let i=e.face.get(t),a=_A(R(vr).basketName);return i?e.activeBasket&&!e.pallet?(0,U.jsxs)(`div`,{"data-testid":`load-station-active-basket`,children:[t===1?(0,U.jsxs)(Y,{sx:{display:`grid`,gridTemplateColumns:`1fr auto`},children:[(0,U.jsxs)(J,{variant:`h4`,children:[a,` `,e.activeBasket.basketId]}),(0,U.jsx)(Y,{sx:{justifySelf:`flex-end`},children:(0,U.jsx)(z2,{elapsedLoadTime:e.elapsedLoadingTime})})]}):null,(0,U.jsx)(Y,{sx:{ml:`4em`,mr:`4em`},children:(0,U.jsx)(Z0,{kind:{type:B0.BasketZone,basketId:e.activeBasket.basketId},children:(0,U.jsx)(N2,{stationNumber:n,basket:e.activeBasket,material:e.allMaterial,fsize:e.fsize,submitCommand:r})})})]}):e.pallet?(0,U.jsxs)(`div`,{"data-testid":`load-station-pallet-face-${t}`,children:[t===1?(0,U.jsxs)(Y,{sx:{display:`grid`,gridTemplateColumns:e.pallet.numFaces>1?`1fr 1fr 1fr`:`1fr 1fr`},children:[(0,U.jsxs)(J,{variant:`h4`,children:[`Pallet `,e.pallet.palletNum]}),e.pallet.numFaces>1?(0,U.jsx)(J,{variant:`h6`,sx:{justifySelf:`center`},children:e.pallet.faceNames?.[t-1]??`Face 1`}):void 0,(0,U.jsx)(Y,{sx:{justifySelf:`flex-end`},children:(0,U.jsx)(z2,{elapsedLoadTime:e.elapsedLoadingTime})})]}):e.pallet.numFaces>1?(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`center`},children:(0,U.jsx)(J,{variant:`h6`,children:e.pallet.faceNames?.[t-1]??`Face ${t}`})}):void 0,(0,U.jsx)(Y,{sx:{ml:`4em`,mr:`4em`},children:(0,U.jsx)(Z0,{kind:{type:B0.PalletFaceZone,face:t},children:(0,U.jsx)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:i.map((t,n)=>(0,U.jsx)(Z0,{kind:{type:B0.Material,material:t},children:(0,U.jsx)(eW,{mat:t,fsize:e.fsize})},n))})})})]}):null:null}function V2({data:e,mat:t}){return(0,U.jsxs)(`div`,{children:[t.label===``?null:(0,U.jsx)(J,{variant:`h4`,children:t.label}),t.material.mats.map((n,r)=>(0,U.jsx)(Z0,{kind:{type:B0.Material,material:n,identifier:n.materialID<0?`raw-${t.isFree?`free`:`queue`}-${t.label}-${r}`:void 0},children:t.isFree||t.sortable===!1?(0,U.jsx)(eW,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:e.fsize,showRawMaterial:!0,showJobComment:!0}):(0,U.jsx)(tW,{mat:n,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,shake:n.action.type===H.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum,fsize:n.action.type===H.Loading&&n.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0,showRawMaterial:!0,showJobComment:!0})},r)),t.material.hiddenCnt>0?(0,U.jsxs)(J,{variant:`body2`,color:`textSecondary`,sx:{textAlign:`center`,mt:`0.5em`},children:[`+`,t.material.hiddenCnt,` hidden`]}):null]})}function H2({data:e,label:t,baskets:n}){return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(J,{variant:`h4`,children:t}),n.map((t,n)=>(0,U.jsxs)(Y,{"data-testid":`load-station-basket-${P2(t.basketId)}`,sx:{mt:n===0?`0.5em`:`1.5em`,pt:n===0?void 0:`1em`},children:[(0,U.jsx)(J,{variant:`h6`,sx:{mb:`0.5em`},children:t.label}),(0,U.jsx)(Z0,{kind:{type:B0.BasketZone,basketId:t.basketId},children:(0,U.jsx)(V2,{data:e,mat:{label:``,material:t.material,isFree:!1,sortable:!1}})})]},t.basketId))]})}function U2({data:e,region:t}){switch(t.kind){case`free`:return(0,U.jsx)(Z0,{kind:{type:B0.FreeMaterialZone},children:(0,U.jsx)(V2,{data:e,mat:{label:t.label,material:t.material,isFree:!0,sortable:!1}})});case`queue`:return(0,U.jsx)(Z0,{kind:{type:B0.QueueZone,queue:t.label},children:(0,U.jsx)(tJ,{matIds:t.material.mats.map(e=>e.materialID),direction:`vertical`,queueName:t.label,renderDragOverlay:t=>(0,U.jsx)(nW,{mat:t,displayActionForSinglePallet:e.pallet?e.pallet.palletNum:0,fsize:t.action.type===H.Loading&&t.action.loadOntoPalletNum===e.pallet?.palletNum?e.fsize:void 0}),children:(0,U.jsx)(V2,{data:e,mat:{label:t.label,material:t.material,isFree:!1,sortable:!0}})})});case`baskets`:return(0,U.jsx)(H2,{data:e,label:t.label,baskets:t.baskets})}}function W2(){let e=R(dL);return(0,U.jsx)(`div`,{children:(0,L.useMemo)(()=>{let t=VE(new Date,-5);return e.matsById.valuesToLazySeq().filter(e=>e.completed_last_proc_machining===!0&&e.last_unload_time!==void 0&&e.last_unload_time>=t).toSortedArray({desc:e=>e.last_unload_time?.getTime()??0})},[e]).map((e,t)=>(0,U.jsx)($U,{mat:e},t))})}var G2=(0,L.memo)(function({fillViewPort:e,showMaterial:t}){let n=X0({type:t?B0.CompletedExpandedMaterialZone:B0.CompletedCollapsedMaterialZone});return t&&e?(0,U.jsxs)(Y,{ref:n,sx:{padding:`8px`,display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,U.jsx)(J,{variant:`h4`,children:`Completed`}),(0,U.jsx)(Y,{sx:{position:`relative`,flexGrow:1},children:(0,U.jsx)(Y,{sx:{position:`absolute`,top:`0`,left:`0`,right:`0`,bottom:`0`,overflow:`auto`},children:(0,U.jsx)(W2,{})})})]}):t?(0,U.jsxs)(Y,{ref:n,sx:{padding:`8px`},children:[(0,U.jsx)(J,{variant:`h4`,children:`Completed`}),(0,U.jsx)(W2,{})]}):(0,U.jsx)(Y,{ref:n,sx:{display:`flex`,justifyContent:e?`flex-end`:void 0,padding:`8px`},children:(0,U.jsx)(J,{variant:`h4`,sx:{margin:`4px`,...e?{textOrientation:`mixed`,writingMode:`vertical-rl`}:{}},children:`Completed`})})});function K2({pallet:e}){let t=R(OI),n=R(Nk),r=KI();if(t===null)return null;let i;if(t.action.type===H.Loading&&t.action.loadOntoPalletNum===e?i=`load`:(t.action.type===H.UnloadToInProcess||t.action.type===H.UnloadToCompletedMaterial)&&t.location.type===at.OnPallet&&t.location.palletNum===e&&(i=`unload`),i===void 0)return null;let a=Zt(t.partName,i,t.materialID,e,t.action.type===H.Loading?t.action.processAfterLoad??t.process:t.process,n);return r?(0,U.jsx)(X,{color:`primary`,children:`Instructions`}):(0,U.jsx)(X,{href:a,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function q2({queues:e,onClose:t,toQueue:n,showAddToQueue:r,setShowAddToQueue:i}){let a=z(SI),o=R(NI),s=R(TI),c=R(OI),l=R(Nk),[u,d]=zI();return!s||c?.location.type===at.OnPallet||c?.action.type===H.Loading||c?.action.type===H.LoadingToBasket||e.length===0||c?.location.type===at.InQueue&&c?.location.currentQueue&&e.includes(c?.location.currentQueue)?null:r?(0,U.jsxs)(X,{color:`primary`,disabled:n===null||d,onClick:()=>{u({materialId:s.materialID,queue:n??``,queuePosition:-1,operator:l}),a(null),t()},children:[`Add To `,n??`Queue`,` `,o?` To Run Process ${o.process+1}`:``]}):(0,U.jsx)(X,{color:`primary`,onClick:()=>i(!0),children:`Add To Queue`})}function J2(){let e=R(vr),t=z(k0),n=R(TI);return!e.allowChangeWorkorderAtLoadStation||n===null||n.materialID<0?null:(0,U.jsx)(X,{color:`primary`,onClick:()=>t(!0),children:`Assign Workorder`})}var Y2=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(function(){n(null),i(null),o(!1),c(null)},[n,i]);return(0,U.jsx)(pW,{onClose:l,allowNote:!0,highlightProcsGreaterOrEqualTo:r?.process??void 0,extraDialogElements:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(XY,{st:t,setState:n}),r===null?null:(0,U.jsx)(KY,{st:r,setState:i}),a?(0,U.jsx)(zY,{selectedQueue:s,setSelectedQueue:c,queueNames:e.queues}):void 0]}),buttons:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(K2,{pallet:e.pallet}),(0,U.jsx)(CY,{}),(0,U.jsx)(WY,{}),(0,U.jsx)(R0,{}),(0,U.jsx)(q2,{toQueue:s,queues:e.queues,onClose:l,showAddToQueue:a,setShowAddToQueue:o}),(0,U.jsx)(ZY,{st:t,setState:n,onClose:l}),(0,U.jsx)(qY,{st:r,setState:i,onClose:l,loadStation:!0}),(0,U.jsx)(J2,{})]})})});function X2({numMatCols:e,maxNumFaces:t,horizontal:n,showMatInCompleted:r}){let i=``,a=``;if(t<=0&&(t=1),n){let n=``;for(let t=0;t<e;t++)a+=`minmax(16em, max-content) `,n+=`mat${t} `;a+=`1fr `,r?a+=`minmax(16em, max-content)`:a+=` 4.5em`;let o=`minmax(calc((100vh - 64px) / ${t}), max-content)`;for(let e=0;e<t;e++){let r=e===t-1?`1fr`:o;i+=`"${n} palface${e} completed" ${r}\n`}}else{a=`1fr`;for(let e=0;e<t;e++)i+=`"palface${e}" minmax(134px, max-content)\n`;for(let t=0;t<e;t++)i+=`"mat${t}" minmax(134px, max-content)\n`;i+=`"completed" minmax(134px, max-content)
|
|
350
|
-
`}return`${i} / ${a}`}function Z2(e){let t=_A(R(vr).basketName),n=t.endsWith(`s`)?t:`${t}s`,r=R(Fk),i=R(Iq),a=(0,L.useMemo)(()=>L2(e.loadNum,e.queues,r,i),[r,e.loadNum,e.queues,i]),o=[...Q.of(a.queues).sortBy(([e,t])=>e).map(([e,t])=>({kind:`queue`,label:e,material:t})).toRArray()];if(a.baskets.size>0){let e=Q.of(a.baskets).filter(([e,t])=>e!==a.activeBasket?.basketId).sortBy(([e,t])=>e).map(([e,n])=>({basketId:e,label:`${t} ${e}`,material:n})).toRArray();e.length>0&&o.push({kind:`baskets`,label:n,baskets:e})}(a.queues.size===0&&a.baskets.size===0||a.freeLoadingMaterial.length>0)&&o.push({kind:`free`,label:`Material`,material:{mats:a.freeLoadingMaterial,hiddenCnt:0}});let s=o.length+ +!!e.completed,c=gT(s<=1?`(min-width: 720px)`:s===2?`(min-width: 1030px)`:`(min-width: 1320px)`),l=X2({numMatCols:o.length,maxNumFaces:a.face.size,horizontal:c,showMatInCompleted:e.completed});return(0,U.jsx)(Y0,{hideArrows:!c,whiteBackground:e.whiteBackground,children:(0,U.jsxs)(Y,{component:`main`,sx:{width:`100%`,display:`grid`,gridTemplate:l,minHeight:{xs:`calc(100vh - 64px - 32px)`,sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`},padding:c?void 0:`8px`},children:[o.map((e,t)=>(0,U.jsx)(Y,{"data-testid":F2(e),sx:{gridArea:`mat${t}`,padding:`8px`,borderRight:c?`1px solid black`:void 0,borderBottom:c?void 0:`1px solid black`},children:(0,U.jsx)(U2,{data:a,region:e})},t)),a.face.keysToAscLazySeq().map((t,n)=>(0,U.jsx)(Y,{sx:{marginLeft:`15px`,gridArea:`palface${n}`,padding:`8px`,borderTop:a.pallet&&n!==0?`1px solid black`:void 0},children:(0,U.jsx)(B2,{data:a,faceNum:t,loadNum:e.loadNum,submitBasketLoadStationCommand:e.submitBasketLoadStationCommand})},t)),(0,U.jsx)(Y,{"data-testid":`load-station-completed`,sx:{borderLeft:c?`1px solid black`:void 0,borderTop:c?void 0:`1px solid black`,gridArea:`completed`},children:(0,U.jsx)(G2,{fillViewPort:c,showMaterial:e.completed})}),(0,U.jsx)(R2,{loadData:a}),(0,U.jsx)(P0,{}),(0,U.jsx)(z0,{}),(0,U.jsx)(Y2,{pallet:a.pallet?.palletNum??null,queues:e.queues})]})})}function Q2(e){let t=R(vr);return qI(hA(e.loadNum,t.loadStationNames)),(0,U.jsx)(Z2,{...e})}function $2(e){let t=KI(),n=R(Nk),r=R(TI),i=R(NI)?.process,[a,o]=Tie(),s=z(SI);if(r===null)return null;function c(t){r&&(a({mat:r,inspType:e.inspection_type,success:t,operator:n}),s(null))}let l=Zt(r.partName,e.inspection_type,r.materialID,null,i,n);return(0,U.jsxs)(U.Fragment,{children:[r.partName===``?void 0:t?(0,U.jsx)(X,{color:`primary`,children:`Instructions`}):(0,U.jsx)(X,{href:l,target:`bms-instructions`,color:`primary`,children:`Instructions`}),(0,U.jsx)(WY,{}),(0,U.jsxs)(X,{color:`primary`,disabled:o,onClick:()=>c(!0),children:[`Mark `,e.inspection_type,` Success`]}),(0,U.jsxs)(X,{color:`primary`,disabled:o,onClick:()=>c(!1),children:[`Mark `,e.inspection_type,` Failed`]})]})}function e4({focusInspectionType:e}){let t=R(PI);return t===null||e||t.signaledInspections.length===1?null:(0,U.jsx)(U.Fragment,{children:t.signaledInspections.map(e=>(0,U.jsx)(jy,{children:(0,U.jsx)($2,{inspection_type:e})},e))})}function t4({focusInspectionType:e}){let t=R(PI),n;if(e)n=e;else if(t&&t.signaledInspections.length===1)n=t.signaledInspections[0];else return null;return(0,U.jsx)($2,{inspection_type:n})}var n4=(0,L.memo)(function(e){return(0,U.jsx)(pW,{allowNote:!0,extraDialogElements:(0,U.jsx)(e4,{focusInspectionType:e.focusInspectionType}),buttons:(0,U.jsx)(t4,{focusInspectionType:e.focusInspectionType})})});function r4({focusInspectionType:e,forceSingleColumn:t}){let n=R(dL),r=(0,L.useMemo)(()=>a4(n.matsById,e),[n,e]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Y,{sx:{display:t?void 0:{md:`flex`}},children:[(0,U.jsxs)(Y,{sx:{padding:`8px`,minHeight:t?void 0:{md:`calc(100vh - 64px)`},width:t?`100%`:{md:`50vw`},borderRight:t?void 0:{md:`1px solid black`},borderBottom:t?`1px solid black`:{sm:`1px solid black`,md:`none`}},children:[(0,U.jsx)(J,{variant:`h4`,children:`Parts to Inspect`}),(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.waiting_to_inspect.map((t,n)=>(0,U.jsx)($U,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]}),(0,U.jsxs)(Y,{sx:{padding:`8px`,width:t?`100%`:{md:`50vw`}},children:[(0,U.jsx)(J,{variant:`h4`,children:`Recently Inspected`}),(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.inspect_completed.map((t,n)=>(0,U.jsx)($U,{mat:t,focusInspectionType:e,hideWarningIcon:!0},n))})]})]}),(0,U.jsx)(n4,{focusInspectionType:e})]})}function i4(e){let t=e.completedInspections;return t===void 0?e.signaledInspections.length===0:Q.of(e.signaledInspections).every(e=>e in t)}function a4(e,t){let n=RE(new Date,-7),r=RE(new Date,-1),i=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.length>0&&!i4(e)):e.valuesToLazySeq().filter(e=>e.last_unload_time!==void 0&&e.last_unload_time>=n&&e.signaledInspections.includes(t)&&(e.completedInspections||{})[t]===void 0));i.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0);let a=Array.from(t===null?e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.length>0&&i4(e)):e.valuesToLazySeq().filter(e=>e.completed_inspect_time!==void 0&&e.completed_inspect_time>=r&&e.signaledInspections.includes(t)&&(e.completedInspections||{})[t]!==void 0));return a.sort((e,t)=>e.completed_inspect_time&&t.completed_inspect_time?t.completed_inspect_time.getTime()-e.completed_inspect_time.getTime():0),{waiting_to_inspect:i,inspect_completed:a}}function o4(e){return qI(e.focusInspectionType&&e.focusInspectionType!==``?`Inspection ${e.focusInspectionType}`:`Inspection`),(0,U.jsx)(Y,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,U.jsx)(r4,{...e})})}function s4(){let e=R(vr),t=R(TI),[n,r]=II(),i=R(Nk),[a,o]=B(SI);if(t===null)return null;let s=e.requireScanAtCloseout,c=e.requireWorkorderBeforeAllowCloseoutComplete,l;s?a!==null&&(a.type===`Barcode`||a.type===`ManuallyEnteredSerial`)||(l=`Scan Required`):c&&(t.workorderId===void 0||t.workorderId===``)&&(l=`No workorder assigned`);function u(e){t!==null&&(n({mat:t,operator:i,failed:e}),o(null))}return l?(0,U.jsx)(tw,{title:l,placement:`top`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)(X,{color:`primary`,disabled:!0,children:`Close Out`})})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>u(!0),children:`Fail Close Out`}),(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>u(!1),children:`Pass Close Out`})]})}function c4(){let e=KI(),t=R(TI),n=R(Nk),r=R(NI)?.process;if(t===null||t.partName===``)return null;let i=Zt(t.partName,`closeout`,t.materialID,null,r,n);return e?(0,U.jsx)(X,{color:`primary`,children:`Instructions`}):(0,U.jsx)(X,{href:i,target:`bms-instructions`,color:`primary`,children:`Instructions`})}function l4(){let e=z(k0);return R(TI)===null?null:(0,U.jsx)(X,{color:`primary`,onClick:()=>e(!0),children:`Assign Workorder`})}var u4=(0,L.memo)(function(){return(0,U.jsx)(pW,{allowNote:!0,buttons:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(c4,{}),(0,U.jsx)(WY,{}),(0,U.jsx)(l4,{}),(0,U.jsx)(s4,{})]})})}),d4=P(new Date);d4.onMount=e=>{e(new Date);let t=setInterval(()=>{e(new Date)},1e3*60);return()=>clearInterval(t)};function f4({forceSingleColumn:e}){let t=R(dL),n=R(d4),r=(0,L.useMemo)(()=>{let e=VE(n,-48),r=VE(n,-2),i=[],a=[];for(let n of t.matsById.values())n.completed_last_proc_machining===!0&&n.last_unload_time&&n.last_unload_time>=e&&(n.closeout_completed===void 0?i.push(n):n.closeout_completed>=r&&a.push(n));return i.sort((e,t)=>e.last_unload_time&&t.last_unload_time?e.last_unload_time.getTime()-t.last_unload_time.getTime():0),a.sort((e,t)=>e.last_unload_time&&t.last_unload_time?t.last_unload_time.getTime()-e.last_unload_time.getTime():0),{uncompleted:i,closed:a}},[t,n]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Y,{sx:{display:e?void 0:{md:`flex`}},children:[(0,U.jsxs)(Y,{sx:{padding:`8px`,minHeight:e?void 0:{md:`calc(100vh - 64px)`},width:e?`100%`:{md:`50vw`},borderRight:e?void 0:{md:`1px solid black`},borderBottom:e?`1px solid black`:{sm:`1px solid black`,md:`none`}},children:[(0,U.jsx)(J,{variant:`h4`,children:`Recently Completed`}),(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.uncompleted.map((e,t)=>(0,U.jsx)($U,{mat:e},t))})]}),(0,U.jsxs)(Y,{sx:{padding:`8px`,width:e?`100%`:{md:`50vw`}},children:[(0,U.jsx)(J,{variant:`h4`,children:`Recently Closed Out`}),(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`flex-start`,flexWrap:`wrap`},children:r.closed.map((e,t)=>(0,U.jsx)($U,{mat:e},t))})]})]}),(0,U.jsx)(P0,{}),(0,U.jsx)(u4,{})]})}function p4(){return qI(`Close Out`),(0,U.jsx)(Y,{component:`main`,sx:{backgroundColor:`#F8F8F8`,minHeight:{sm:`calc(100vh - 64px - 40px)`,md:`calc(100vh - 64px)`}},children:(0,U.jsx)(f4,{})})}function m4(e,t){return e.mapValues(e=>{let n=Q.of(e.recentCycles).flatMap(e=>e.tools).filter(e=>!e.toolChangedDuringMiddleOfCycle).groupBy(e=>e.toolName).map(([e,t])=>({toolName:e,cycleUsageMinutes:Q.of(t).sumBy(e=>e.cycleUsageMinutes)/t.length,cycleUsageCnt:Q.of(t).sumBy(e=>e.cycleUsageCnt)/t.length,toolChangedDuringMiddleOfCycle:!1})).toMutableArray();return t&&n.sort((e,t)=>e.toolName.localeCompare(t.toolName)),{tools:n}})}var h4=class{constructor(e,t){this.statGroup=e,this.operation=t}compare(e){let t=this.statGroup.localeCompare(e.statGroup);return t===0?this.operation.localeCompare(e.operation):t}hash(){return xO(this.statGroup,this.operation)}toString(){return`{statGroup: ${this.statGroup}, operation: ${this.operation}}`}};function g4(e,t){let n=0,r=0;for(let i of Q.of(e).filter(e=>e.machines.has(t)??!1))n+=i.quantity*(i.scheduledUseMinutes/i.scheduledUseCnt),r+=i.quantity;return r===0?0:n/r}function _4(e,t,n){let r=ok.empty();for(let[t,n]of Q.ofObject(e.jobs)){let i=n.cycles??0;for(let a=0;a<n.procsAndPaths.length;a++){let o=0,s=ok.empty();for(let r=0;r<n.procsAndPaths[a].paths.length;r++){o+=n.completed?.[a]?.[r]??0;let i=n.procsAndPaths[a].paths[r];for(let n=0;n<i.stops.length;n+=1){let o=i.stops[n],c=Q.of(e.material).filter(e=>e.jobUnique===t&&e.process==a+1&&e.path===r+1&&(e.action.type===H.UnloadToCompletedMaterial||e.action.type===H.UnloadToInProcess||e.lastCompletedMachiningRouteStopIndex!==void 0&&e.lastCompletedMachiningRouteStopIndex>n)).length();o.program!==void 0&&o.program!==``&&(s=s.modify(new h4(o.stationGroup,o.program),e=>(e??0)+c))}}for(let[e,t]of s)r=r.modify(new qk(n.partName,e.statGroup,e.operation),e=>(e??0)+i-o-t)}}let i=Q.of(m4(n,!1)).flatMap(([e,t])=>{let i=window.bmsToolReportOverridePartQuantity??r.get(e);return i!==void 0&&i>0?t.tools.map(t=>({toolName:t.toolName,part:{partAndProg:e,quantity:i,scheduledUseMinutes:t.cycleUsageMinutes,scheduledUseCnt:t.cycleUsageCnt===0?1:t.cycleUsageCnt,machines:n.get(e)?.machines??ek.empty()}})):[]}).sortBy(e=>e.part.partAndProg.part,e=>e.part.partAndProg.operation).toLookup(e=>e.toolName,e=>e.part);return Q.of(t).orderedGroupBy(e=>e.toolName).map(([e,t])=>{let n=!1;return{toolName:e,machines:Q.of(t).sortBy(e=>e.machineGroupName,e=>e.machineNum,e=>e.pocket).map(t=>{let r=t.currentUse!==null&&t.currentUse!==void 0&&t.currentUse!==``?Kk(t.currentUse):null,a=t.totalLifeTime!==null&&t.totalLifeTime!==void 0&&t.totalLifeTime!==``?Kk(t.totalLifeTime):null,o=mA(t.machineGroupName,t.machineNum),s=t.currentUseCount??null,c=t.totalLifeCount??null;if(s===null&&c===null){let t=g4(i.get(e)??[],o);t>0&&(n=!0,s=r===null?null:r/t,c=a===null?null:a/t)}return{machineName:o,pocket:t.pocket,serial:t.serial,currentUseMinutes:r,lifetimeMinutes:a,remainingMinutes:r!==null&&a!==null?Math.max(0,a-r):null,currentUseCnt:s??null,lifetimeCnt:c??null,remainingCnt:s!==null&&c!==null?Math.max(0,c-s):null}}).toRArray(),parts:i.get(e)??[],estimatedToolCounts:n}}).toRArray()}var v4=P(null),y4=P(e=>e(v4)?.time??null,async(e,t,n)=>{t(v4,{tools:await Ut.getToolsInMachines(),time:n})}),b4=P(e=>{let t=e(v4);return t===null?[]:Q.of(t.tools).toOrderedSet(e=>mA(e.machineGroupName,e.machineNum)).toAscLazySeq().toRArray()}),x4=P(e=>{let t=e(v4);if(t===null)return null;let n=e(Fk),r=e(LL);return _4(n,t.tools,r)}),S4=P(e=>{let t=e(x4);return t?Q.of(t).flatMap(e=>e.machines).some(e=>e.serial!=null&&e.serial!==``):!1}),C4=P(e=>{let t=e(x4);return t?Q.of(t).some(e=>e.estimatedToolCounts):!1});function w4(e){let t=Q.of(e).flatMap(e=>e.machines).some(e=>e.currentUseMinutes!=null),n=Q.of(e).flatMap(e=>e.machines).some(e=>e.currentUseCnt!=null),r=`<table>
|
|
351
|
-
<thead><tr>`;r+=`<th>Tool</th><th>Machine</th><th>Pocket</th>`,t&&(r+=`<th>Scheduled Use (min)</th><th>Current Use (min)</th><th>Lifetime (min)</th><th>Remaining Life (min)</th>`),n&&(r+=`<th>Scheduled Use (cnt)</th><th>Current Use (cnt)</th><th>Lifetime (cnt)</th><th>Remaining Life (cnt)</th>`),r+=`</tr></thead>
|
|
352
|
-
<tbody>
|
|
353
|
-
`;for(let i of e)for(let e of i.machines){if(r+=`<tr><td>${i.toolName}</td><td>${e.machineName}</td><td>${e.pocket}</td>`,t){let t=Q.of(i.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity);r+=`<td>`+t.toFixed(1)+`</td>`,r+=`<td>`+(e.currentUseMinutes?e.currentUseMinutes.toFixed(1):``)+`</td>`,r+=`<td>`+(e.lifetimeMinutes?e.lifetimeMinutes.toFixed(1):``)+`</td>`,r+=`<td>`+(e.remainingMinutes?e.remainingMinutes.toFixed(1):``)+`</td>`}if(n){let t=Q.of(i.parts).sumBy(e=>e.scheduledUseCnt*e.quantity);r+=`<td>`+t.toFixed(1)+`</td>`,r+=`<td>`+(e.currentUseCnt?e.currentUseCnt.toFixed(1):``)+`</td>`,r+=`<td>`+(e.lifetimeCnt?e.lifetimeCnt.toFixed(1):``)+`</td>`,r+=`<td>`+(e.remainingCnt?e.remainingCnt.toFixed(1):``)+`</td>`}r+=`</tr>
|
|
354
|
-
`}return r+=`</tbody></table>`,r}function T4(){let e=ge();return(0,L.useCallback)(()=>{let t=e.get(x4);t&&XA(w4(t))},[e])}function E4(e,t,n,r,i){let a=m4(e,!0),o=e.keysToLazySeq().toRMap(e=>[e.operation,e],(e,t)=>t),s=Q.of(r);i!=null&&(s=s.filter(e=>i.has(e.programName)));let c=n?.valuesToLazySeq().flatMap(e=>Q.of(e.procsAndPaths).flatMap(e=>e.paths).flatMap(t=>Q.of(t.stops).collect(n=>{let r=Kk(n.expectedCycleTime);return n.program&&r>0?{program:n.program,plannedMins:r/t.partsPerPallet,start:e.routeStartUTC}:null}))).toOrderedMap(e=>[e.program,e],(e,t)=>e.start>t.start?e:t),l=s.map(e=>{let n=o.get(e.programName);return{programName:e.programName,cellControllerProgramName:e.cellControllerProgramName,comment:e.comment??null,revision:e.revision??null,partName:n?.part??null,statisticalCycleTime:n?t.get(n)??null:null,toolUse:n?a.get(n)??null:null,plannedMins:c?.get(e.programName)?.plannedMins??null}}).toRArray();return{time:new Date,programs:l,hasRevisions:l.some(e=>e.revision!==null),cellNameDifferentFromProgName:l.some(e=>e.cellControllerProgramName!==e.programName)}}var D4=P(`AllPrograms`),O4=P(null),k4=P(e=>e(O4)?.time??null,async(e,t,n)=>{t(O4,{progs:await Ut.getProgramsInCellController(),time:n})}),A4=P(e=>{if(e(k4)===null)return null;let t=e(D4),n=null;if(t===`ActivePrograms`){let t=e(Fk);n=new Set(Q.ofObject(t.jobs).flatMap(([,e])=>e.procsAndPaths).flatMap(e=>e.paths).flatMap(e=>e.stops).filter(e=>e.program!==null&&e.program!==void 0&&e.program!==``).map(e=>e.program??``))}let r=e(O4);return r===null?null:E4(e(LL),e(Yk),e(lk),r.progs,n)}),j4=P(null),M4=P(async e=>{let t=e(j4);return t===null?``:t.revision===null?await Ut.getLatestProgramRevisionContent(t.programName):await Ut.getProgramRevisionContent(t.programName,t.revision)}),N4=P(null),P4=new Intl.NumberFormat(`en-US`,{minimumFractionDigits:0,maximumFractionDigits:1}),F4=K(Mw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({theme:e,$noBorderBottom:t,$highlightedRow:n,$noticeRow:r})=>({...t&&{"& > *":{borderBottom:`unset`}},[e.breakpoints.up(`lg`)]:{"& td:not(:last-child), & th:not(:last-child)":{whiteSpace:`nowrap`},"& td:last-child, & th:last-child":{width:`100%`}},backgroundColor:n?`#BDBDBD`:r?`#E0E0E0`:void 0})),I4=K(Mw,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$borderBottom:e})=>({...e&&{"&:not(:last-child)":{borderBottom:`2px solid black`}}})),L4=K(`span`)({fontSize:`x-large`,fontWeight:`lighter`});function R4({min:e,cnt:t,showZero:n,extraMin:r,extraCnt:i}){e??=0,t??=0;let a=r?(0,U.jsx)(tw,{title:r,children:(0,U.jsxs)(`span`,{children:[e.toFixed(1),` min`]})}):e.toFixed(1)+` min`,o=i?(0,U.jsx)(tw,{title:i,children:(0,U.jsxs)(`span`,{children:[P4.format(t),` cnt`]})}):P4.format(t)+` cnt`;return e===0&&t===0?n?`0`:``:e>0&&t===0?a:e===0&&t>0?o:(0,U.jsxs)(`span`,{children:[a,` `,(0,U.jsx)(L4,{children:`|`}),` `,o]})}function z4({tool:e,machine:t}){let n=t?Q.of(e.parts).filter(e=>e.machines.has(t)):Q.of(e.parts);return(0,U.jsxs)(yw,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Part`}),(0,U.jsx)(Z,{children:`Program`}),t?void 0:(0,U.jsx)(Z,{children:`Machines`}),(0,U.jsx)(Z,{align:`right`,children:`Quantity`}),(0,U.jsx)(Z,{align:`right`,children:`Use/Cycle (min)`}),(0,U.jsx)(Z,{align:`right`,children:`Use/Cycle (cnt)`})]})}),(0,U.jsx)(Sw,{children:n.isEmpty()?(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:5,children:`No programs use this machine`})}):n.map((e,n)=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.partAndProg.part,size:20}),(0,U.jsx)(`span`,{children:e.partAndProg.part})]})}),(0,U.jsx)(Z,{children:e.partAndProg.operation}),t?void 0:(0,U.jsx)(Z,{children:e.machines.foldl((e,t)=>(e.length>0?e+`, `:``)+t,``)}),(0,U.jsx)(Z,{align:`right`,children:e.quantity}),(0,U.jsx)(Z,{align:`right`,children:e.scheduledUseMinutes>0?e.scheduledUseMinutes.toFixed(1):``}),(0,U.jsx)(Z,{align:`right`,children:e.scheduledUseCnt>0?P4.format(e.scheduledUseCnt):``})]},n))})]})}function B4({machines:e}){let t=R(S4),n=Q.of(e).toLookupOrderedMap(e=>e.machineName,e=>e.pocket),r=n.size>1&&n.valuesToAscLazySeq().some(e=>e.size>1);return(0,U.jsxs)(yw,{size:`small`,sx:{width:`auto`,ml:`10em`,mb:`1em`},children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Machine`}),(0,U.jsx)(Z,{align:`right`,children:`Pocket`}),t?(0,U.jsx)(Z,{children:`Serial`}):void 0,(0,U.jsx)(Z,{align:`right`,children:`Current Use `}),(0,U.jsx)(Z,{align:`right`,children:`Lifetime `}),(0,U.jsx)(Z,{align:`right`,children:`Remaining Use `})]})}),(0,U.jsxs)(Sw,{children:[n.toAscLazySeq().map(([e,i])=>(0,U.jsxs)(L.Fragment,{children:[i.valuesToAscLazySeq().map((e,n)=>(0,U.jsxs)(I4,{$borderBottom:r&&i.size===1,children:[(0,U.jsx)(Z,{children:e.machineName}),(0,U.jsx)(Z,{align:`right`,children:e.pocket}),t?(0,U.jsx)(Z,{children:e.serial??``}):void 0,(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:e.currentUseMinutes,cnt:e.currentUseCnt})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:e.lifetimeMinutes,cnt:e.lifetimeCnt})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:e.remainingMinutes,cnt:e.remainingCnt,showZero:!0})})]},n)),n.size>1&&i.size>1?(0,U.jsxs)(I4,{$borderBottom:!0,children:[(0,U.jsx)(Z,{colSpan:t?4:3}),(0,U.jsx)(Z,{children:`Subtotal`}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:i.valuesToAscLazySeq().sumBy(e=>e.remainingMinutes??0),cnt:i.valuesToAscLazySeq().sumBy(e=>e.remainingCnt??0)})})]}):void 0]},e)),(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{colSpan:t?4:3}),(0,U.jsx)(Z,{children:`Total`}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:Q.of(e).sumBy(e=>e.remainingMinutes??0),cnt:Q.of(e).sumBy(e=>e.remainingCnt??0)})})]})]})]})}function V4(){let e=R(C4);return(0,U.jsxs)(F4,{children:[(0,U.jsx)(Z,{}),(0,U.jsx)(Z,{children:`Tool`}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:`Expected use for all currently scheduled parts.`+(e?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Scheduled Use`})})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:`Remaining use summed over all machines which have a scheduled part.`+(e?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Total Remaining Use`})})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:`Machine with the least remaining use.`+(e?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Smallest Remaining Use`})})}),(0,U.jsx)(Z,{})]})}function H4({tool:e}){let[t,n]=(0,L.useState)(!1),r=Q.of(e.machines).filter(t=>e.parts.some(e=>e.machines.has(t.machineName))),i=Q.of(e.parts).sumBy(e=>e.scheduledUseMinutes*e.quantity),a=Q.of(e.parts).sumBy(e=>e.scheduledUseCnt*e.quantity),o=r.sumBy(e=>e.remainingMinutes??0),s=r.sumBy(e=>e.remainingCnt??0),c=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainMin:Q.of(t).sumBy(e=>e.remainingMinutes??0)})).minBy(({remainMin:e})=>e),l=r.groupBy(e=>e.machineName).map(([e,t])=>({mach:e,remainCnt:Q.of(t).sumBy(e=>e.remainingCnt??0)})).minBy(({remainCnt:e})=>e);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(F4,{$noBorderBottom:!0,$highlightedRow:i>o||a>s,$noticeRow:i<=o&&a<=s&&(c&&i>c.remainMin||l&&a>l.remainCnt),children:[(0,U.jsx)(Z,{children:(0,U.jsx)($m,{size:`small`,onClick:()=>n(!t),children:t?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})}),(0,U.jsx)(Z,{children:e.toolName}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:i,cnt:a})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:o,cnt:s})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:c?.remainMin,cnt:l?.remainCnt,showZero:!0,extraMin:c?.mach,extraCnt:l?.mach})}),(0,U.jsx)(Z,{})]}),(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:6,children:(0,U.jsx)(Lp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsxs)(Y,{sx:{display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(B4,{machines:e.machines})}),e.parts.length===0?void 0:(0,U.jsx)(`div`,{children:(0,U.jsx)(z4,{tool:e})})]})})})})]})}function U4({machine:e}){let t=R(C4),n=R(S4);return(0,U.jsxs)(F4,{children:[(0,U.jsx)(Z,{}),(0,U.jsxs)(Z,{children:[`Tool In `,e]}),(0,U.jsx)(Z,{align:`right`,children:`Pocket`}),n?(0,U.jsx)(Z,{children:`Serial`}):void 0,(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:`Expected use for all currently scheduled parts.`+(t?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Scheduled Use`})})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:`Current recorded usage of this tool.`+(t?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Current Use`})})}),(0,U.jsxs)(Z,{align:`right`,children:[(0,U.jsx)(tw,{title:`Current configured lifetime of this tool.`+(t?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Lifetime`})}),` `]}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(tw,{title:`Lifetime minus current use.`+(t?` Counts are estimates.`:``),children:(0,U.jsx)(`span`,{children:`Remaining Use`})})}),(0,U.jsx)(Z,{})]})}function W4({report:e,pocket:t}){let[n,r]=(0,L.useState)(!1),i=R(S4),a=i?9:8,o=Q.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseMinutes*e.quantity),s=Q.of(e.parts).filter(e=>e.machines.has(t.machineName)).sumBy(e=>e.scheduledUseCnt*e.quantity);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(F4,{$noBorderBottom:!0,children:[(0,U.jsx)(Z,{children:(0,U.jsx)($m,{size:`small`,onClick:()=>r(!n),children:n?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})}),(0,U.jsx)(Z,{children:e.toolName}),(0,U.jsx)(Z,{align:`right`,children:t.pocket}),i?(0,U.jsx)(Z,{children:t.serial??``}):void 0,(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:o,cnt:s})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:t.currentUseMinutes,cnt:t.currentUseCnt})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:t.lifetimeMinutes,cnt:t.lifetimeCnt})}),(0,U.jsx)(Z,{align:`right`,children:(0,U.jsx)(R4,{min:t.remainingMinutes,cnt:t.remainingCnt})}),(0,U.jsx)(Z,{})]}),(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,U.jsx)(Lp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(z4,{tool:e,machine:t.machineName})})})})]})}var G4=`__Insight__FilterAnyMachine__`,K4=P(null);function q4(){let e=R(K4),t=R(x4);return t===null?(0,U.jsx)(`div`,{}):(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(Tw,{children:e===null?(0,U.jsx)(V4,{}):(0,U.jsx)(U4,{machine:e})}),(0,U.jsx)(Sw,{children:t.map(t=>e===null?(0,U.jsx)(H4,{tool:t},t.toolName):(0,U.jsx)(L.Fragment,{children:t.machines.filter(t=>t.machineName===e).map(e=>(0,U.jsx)(W4,{report:t,pocket:e},e.pocket))},t.toolName))})]})}function J4(){let[e,t]=B(K4),[n,r]=B(y4),[i,a]=(0,L.useState)(!1),o=R(b4),s=T4(),c=KI();function l(){a(!0),r(new Date).catch(console.log).finally(()=>a(!1))}return c?(0,U.jsx)(`div`,{}):n===null?(0,U.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,U.jsx)(Zy,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:l,disabled:i,children:(0,U.jsxs)(U.Fragment,{children:[i?(0,U.jsx)(qm,{size:10,style:{marginRight:`1em`}}):(0,U.jsx)(mE,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Tools`]})})}):(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(tw,{title:`Refresh Tools`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)($m,{onClick:l,disabled:i,size:`small`,children:i?(0,U.jsx)(qm,{size:10}):(0,U.jsx)(mE,{fontSize:`inherit`})})})}),(0,U.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Tools from `,(0,U.jsx)(Gz,{date:n})]}),(0,U.jsx)(`div`,{style:{flexGrow:`1`}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:e??G4,style:{marginLeft:`1em`},onChange:e=>{e.target.value===G4?t(null):t(e.target.value)},children:[(0,U.jsx)(GS,{value:G4,children:(0,U.jsx)(`em`,{children:`All Machines`})}),o.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:s,size:`large`,children:(0,U.jsx)($T,{})})})]})}function Y4(){return qI(`Tool Report`),(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsx)(J4,{}),(0,U.jsx)(`main`,{children:(0,U.jsx)(RU,{children:(0,U.jsx)(q4,{})})})]})}var X4=K(Mw)(()=>({"& > *":{borderBottom:`unset`}}));function Z4(e){if(e.length===0)return``;let t=e.lastIndexOf(`\\`);return t>=0&&t<e.length-2?e.substr(t+1):e}var Q4=new Intl.NumberFormat(`en-US`,{maximumFractionDigits:2});function $4(e){let[t,n]=(0,L.useState)(!1),r=z(j4),i=z(N4),a=8+ +!!e.showCellCtrlCol+ +!!e.showRevCol,o=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&Q.of(e.program.toolUse.tools).some(e=>e.cycleUsageMinutes>0),s=e.program.toolUse!==null&&e.program.toolUse.tools.length>0&&Q.of(e.program.toolUse.tools).some(e=>e.cycleUsageCnt>0);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(X4,{children:[(0,U.jsx)(Z,{children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,U.jsx)($m,{size:`small`,onClick:()=>n(!t),children:t?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})}),(0,U.jsx)(Z,{children:Z4(e.program.programName)}),e.showCellCtrlCol?(0,U.jsx)(Z,{children:e.program.cellControllerProgramName}):void 0,(0,U.jsx)(Z,{children:e.program.partName===null?void 0:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.program.partName,size:20}),(0,U.jsx)(`span`,{children:e.program.partName})]})}),(0,U.jsx)(Z,{children:e.program.comment??``}),e.showRevCol?(0,U.jsx)(Z,{children:e.program.revision===null?``:e.program.revision.toFixed()}):void 0,(0,U.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.medianMinutesForSingleMat.toFixed(2)}),(0,U.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_aboveMinutes.toFixed(2)}),(0,U.jsx)(Z,{align:`right`,children:e.program.statisticalCycleTime===null?``:e.program.statisticalCycleTime.MAD_belowMinutes.toFixed(2)}),(0,U.jsx)(Z,{align:`right`,children:e.program.plannedMins===null?``:Q4.format(e.program.plannedMins)}),(0,U.jsxs)(Z,{children:[(0,U.jsx)(tw,{title:`Load Program Content`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>r(e.program),children:(0,U.jsx)(FT,{})})}),e.program.revision===null?void 0:(0,U.jsx)(tw,{title:`Revision History`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>i(e.program),children:(0,U.jsx)(ZT,{})})})]})]}),(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:a,children:(0,U.jsx)(Lp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(Y,{sx:{mr:`1em`,ml:`3em`},children:e.program.toolUse===null||e.program.toolUse.tools.length===0?void 0:(0,U.jsxs)(yw,{size:`small`,sx:{width:`auto`,ml:`10em`,mr:`1em`},children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Tool`}),o?(0,U.jsx)(Z,{align:`right`,children:`Estimated Usage (min)`}):void 0,s?(0,U.jsx)(Z,{align:`right`,children:`Estimated Usage (count)`}):void 0]})}),(0,U.jsx)(Sw,{children:Q.of(e.program.toolUse.tools).map((e,t)=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.toolName}),o?(0,U.jsx)(Z,{align:`right`,children:e.cycleUsageMinutes===0?``:e.cycleUsageMinutes.toFixed(1)}):void 0,s?(0,U.jsx)(Z,{align:`right`,children:e.cycleUsageCnt===0?``:e.cycleUsageCnt.toFixed(1)}):void 0]},t))})]})})})})})]})}function e3(){let e=R(A4),[t,n]=(0,L.useState)(`ProgramName`),[r,i]=(0,L.useState)(`asc`);if(e===null)return(0,U.jsx)(`div`,{});let a=Q.of(e.programs).sortWith((e,n)=>{let i=0;switch(t){case`ProgramName`:i=Z4(e.programName).localeCompare(Z4(n.programName));break;case`CellProgName`:i=e.cellControllerProgramName.localeCompare(n.cellControllerProgramName);break;case`Comment`:i=e.comment===null&&n.comment===null?0:e.comment===null?1:n.comment===null?-1:e.comment.localeCompare(n.comment);break;case`Revision`:i=e.revision===null&&n.revision===null?0:e.revision===null?1:n.revision===null?-1:e.revision-n.revision;break;case`PartName`:i=e.partName===null&&n.partName===null?0:e.partName===null?1:n.partName===null?-1:e.partName.localeCompare(n.partName);break;case`MedianTime`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.medianMinutesForSingleMat-n.statisticalCycleTime.medianMinutesForSingleMat;break;case`DeviationAbove`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.MAD_aboveMinutes-n.statisticalCycleTime.MAD_aboveMinutes;break;case`DeviationBelow`:i=e.statisticalCycleTime===null&&n.statisticalCycleTime===null?0:e.statisticalCycleTime===null?1:n.statisticalCycleTime===null?-1:e.statisticalCycleTime.MAD_belowMinutes-n.statisticalCycleTime.MAD_belowMinutes;break;case`Planned`:i=e.plannedMins===null&&n.plannedMins===null?0:e.plannedMins===null?1:n.plannedMins===null?-1:e.plannedMins-n.plannedMins;break}return i===0?0:i<0&&r===`asc`||i>0&&r===`desc`?-1:1});function o(e){e===t?i(r===`asc`?`desc`:`asc`):n(e)}return(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{}),(0,U.jsx)(Z,{sortDirection:t===`ProgramName`&&r,children:(0,U.jsx)(zw,{active:t===`ProgramName`,direction:r,onClick:()=>o(`ProgramName`),children:`Program Name`})}),e.cellNameDifferentFromProgName?(0,U.jsx)(Z,{sortDirection:t===`CellProgName`&&r,children:(0,U.jsx)(zw,{active:t===`CellProgName`,direction:r,onClick:()=>o(`CellProgName`),children:`Cell Controller Program`})}):void 0,(0,U.jsx)(Z,{sortDirection:t===`PartName`&&r,children:(0,U.jsx)(zw,{active:t===`PartName`,direction:r,onClick:()=>o(`PartName`),children:`Part`})}),(0,U.jsx)(Z,{sortDirection:t===`Comment`&&r,children:(0,U.jsx)(zw,{active:t===`Comment`,direction:r,onClick:()=>o(`Comment`),children:`Comment`})}),e.hasRevisions?(0,U.jsx)(Z,{sortDirection:t===`Revision`&&r,children:(0,U.jsx)(zw,{active:t===`Revision`,direction:r,onClick:()=>o(`Revision`),children:`Revision`})}):void 0,(0,U.jsx)(Z,{sortDirection:t===`MedianTime`&&r,align:`right`,children:(0,U.jsx)(zw,{active:t===`MedianTime`,direction:r,onClick:()=>o(`MedianTime`),children:`Median Time / Material (min)`})}),(0,U.jsx)(Z,{sortDirection:t===`DeviationAbove`&&r,align:`right`,children:(0,U.jsx)(zw,{active:t===`DeviationAbove`,direction:r,onClick:()=>o(`DeviationAbove`),children:`Deviation Above Median`})}),(0,U.jsx)(Z,{sortDirection:t===`DeviationBelow`&&r,align:`right`,children:(0,U.jsx)(zw,{active:t===`DeviationBelow`,direction:r,onClick:()=>o(`DeviationBelow`),children:`Deviation Below Median`})}),(0,U.jsx)(Z,{sortDirection:t===`Planned`&&r,align:`right`,children:(0,U.jsx)(zw,{active:t===`Planned`,direction:r,onClick:()=>o(`Planned`),children:`Planned Time (min)`})}),(0,U.jsx)(Z,{})]})}),(0,U.jsx)(Sw,{children:Q.of(a).map((t,n)=>(0,U.jsx)($4,{program:t,showCellCtrlCol:e.cellNameDifferentFromProgName,showRevCol:e.hasRevisions},n))})]})}function t3(){let e=R(M4),[t,n]=(0,L.useState)(null),r=(0,L.useMemo)(()=>new Worker(new URL(`/assets/ProgramHighlight-DPTeZ8Si.js`,``+import.meta.url),{type:`module`}),[]);return(0,L.useEffect)(()=>{let e=e=>n(e),t=t=>e(t.data);return r.addEventListener(`message`,t),()=>{e=()=>null,r.removeEventListener(`message`,t),r.terminate(),n(null)}},[r]),(0,L.useEffect)(()=>{e&&e!==``&&r.postMessage(e,[])},[e,r]),(0,U.jsx)(`pre`,{children:t===null?(0,U.jsx)(`code`,{className:`gcode`,children:e}):(0,U.jsx)(`code`,{className:`gcode`,dangerouslySetInnerHTML:{__html:t}})})}function n3(){let[e,t]=B(j4),n=R(N4);return(0,U.jsxs)(Dy,{open:e!==null&&n===null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,U.jsx)(By,{children:e?.partName?(0,U.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.partName}),(0,U.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``,` `,(0,U.jsxs)(J,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,U.jsxs)(U.Fragment,{children:[e?.programName??`Program`,` `,e?.revision?` rev`+e.revision.toFixed():``]})}),(0,U.jsx)(Ly,{children:e===null||n!==null?(0,U.jsx)(`div`,{}):(0,U.jsx)(RU,{children:(0,U.jsx)(t3,{})})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>t(null),children:`Close`})})]})}var r3=10;function i3(e){let t=R(N4),n=z(j4);return(0,U.jsxs)(yw,{children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Revision`}),(0,U.jsx)(Z,{children:`Comment`}),(0,U.jsx)(Z,{children:`Cell Controller Program`}),(0,U.jsx)(Z,{})]})}),(0,U.jsx)(Sw,{children:e.loading?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:4,children:(0,U.jsx)(qm,{})})}),Q.ofRange(0,r3-1).map(e=>(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:4})},e))]}):Q.of(e.revisions).drop(e.page*r3).take(r3).map(e=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.revision}),(0,U.jsx)(Z,{children:e.comment??``}),(0,U.jsx)(Z,{children:e.cellControllerProgramName??``}),(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Load Program Content`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>n({...e,partName:t?.partName??null}),children:(0,U.jsx)(FT,{})})})})]},e.revision))})]})}function a3(){let[e,t]=B(N4),[n,r]=B(j4),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)({page:0,hasMore:!1}),[c,l]=(0,L.useState)(0),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null);(0,L.useEffect)(()=>{e===null?(a(null),l(0),s({page:0,hasMore:!1})):e!==null&&i===null&&(d(!0),p(null),Ut.getProgramRevisionsInDescendingOrderOfRevision(e.programName,r3,void 0).then(e=>{a(e),s({page:0,hasMore:e.length===r3})}).catch(p).finally(()=>d(!1)))},[e,i]);function m(){if(c<o.page)l(c+1);else if(o.hasMore&&e!==null&&i!==null&&i.length>0){d(!0),p(null);let t=i[i.length-1];Ut.getProgramRevisionsInDescendingOrderOfRevision(e.programName,r3,t?t.revision-1:void 0).then(e=>{a(t=>t===null?e:t.concat(e)),s({page:c+1,hasMore:e.length===r3}),l(c+1)}).catch(p).finally(()=>d(!1))}}return(0,U.jsxs)(Dy,{open:e!==null,onClose:()=>t(null),maxWidth:`lg`,children:[(0,U.jsx)(By,{children:e?.partName?(0,U.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.partName}),(0,U.jsxs)(`div`,{style:{marginLeft:`10px`,marginRight:`3em`},children:[e.programName??`Program`,` `,(0,U.jsxs)(J,{variant:`subtitle1`,component:`span`,children:[`(`,e.partName,`)`]})]})]}):(0,U.jsx)(U.Fragment,{children:e?.programName??`Program`})}),(0,U.jsxs)(Ly,{children:[f===null?void 0:(0,U.jsx)(_v,{children:(0,U.jsx)(xv,{children:typeof f==`string`?f:f.message})}),n===null?i===null?u?(0,U.jsx)(qm,{}):void 0:(0,U.jsx)(i3,{page:c,revisions:i,loading:u}):(0,U.jsx)(RU,{children:(0,U.jsx)(t3,{})})]}),(0,U.jsx)(jy,{children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,width:`100%`},children:[n===null?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:`Latest Revisions`,children:(0,U.jsx)(`span`,{children:(0,U.jsx)($m,{onClick:()=>l(0),disabled:u||c===0,size:`large`,children:(0,U.jsx)(JT,{})})})}),(0,U.jsx)(tw,{title:`Previous Page`,children:(0,U.jsx)(`span`,{children:(0,U.jsx)($m,{onClick:()=>l(c-1),disabled:u||c===0,size:`large`,children:(0,U.jsx)(rE,{})})})}),(0,U.jsx)(tw,{title:`Next Page`,children:(0,U.jsx)(`span`,{children:(0,U.jsx)($m,{onClick:()=>m(),disabled:u||c===o.page&&!o.hasMore,size:`large`,children:(0,U.jsx)(iE,{})})})})]}):void 0,(0,U.jsx)(`div`,{style:{flexGrow:1}}),n===null?void 0:(0,U.jsx)(X,{onClick:()=>r(null),children:`Back to History`}),(0,U.jsx)(X,{onClick:()=>t(null),children:`Close`})]})})]})}function o3(){let[e,t]=B(k4),[n,r]=(0,L.useState)(!1),i=KI(),[a,o]=B(D4);function s(){r(!0),t(new Date).catch(console.log).finally(()=>r(!1))}return i?(0,U.jsx)(`div`,{}):e===null?(0,U.jsx)(`main`,{style:{margin:`2em`,display:`flex`,justifyContent:`center`},children:(0,U.jsx)(Zy,{color:`secondary`,size:`large`,variant:`extended`,style:{margin:`2em`},onClick:s,disabled:n,children:(0,U.jsxs)(U.Fragment,{children:[n?(0,U.jsx)(qm,{size:10,style:{marginRight:`1em`}}):(0,U.jsx)(mE,{fontSize:`inherit`,style:{marginRight:`1em`}}),`Load Programs`]})})}):(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(tw,{title:`Refresh Programs`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)($m,{onClick:s,disabled:n,size:`small`,children:n?(0,U.jsx)(qm,{size:10}):(0,U.jsx)(mE,{fontSize:`inherit`})})})}),(0,U.jsxs)(`span`,{style:{marginLeft:`1em`},children:[`Programs from `,(0,U.jsx)(Gz,{date:e})]}),(0,U.jsx)(`div`,{style:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:a,onChange:e=>o(e.target.value),children:[(0,U.jsx)(GS,{value:`AllPrograms`,children:`All Programs`},`AllPrograms`),(0,U.jsx)(GS,{value:`ActivePrograms`,children:`Active Programs`},`ActivePrograms`)]})})]})}function s3(){return qI(`Programs`),(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsx)(o3,{}),(0,U.jsx)(`main`,{children:(0,U.jsx)(RU,{children:(0,U.jsx)(e3,{})})}),(0,U.jsx)(n3,{}),(0,U.jsx)(a3,{})]})}var c3=P(!1),l3=c3,u3=P(null),d3=u3;function f3(e){let t=new Date,n=RE(t,-30),r=Vt.currentStatus().then(t=>e(zR,t)),i=Vt.recent(n,[]).then(t=>e(LR,t)),a=Ht.get(n,t).then(t=>e(RR,t));Promise.all([r,i,a]).catch(t=>e(u3,t.message??`Error`)).finally(()=>e(c3,!1))}function p3(e,t,n){let r=new Date,i=Vt.currentStatus().then(e=>n(zR,e)),a=Vt.recent(RE(r,-30),t?Array.from(t):[]).then(e=>n(LR,e)),o=Ht.recent(e,void 0).then(e=>n(RR,e));Promise.all([i,a,o]).catch(e=>n(u3,e.message??`Error`)).finally(()=>n(c3,!1))}var m3=class{constructor(e){this.userCalledClose=!1,this.reconnectAttempts=0,this.url=e,this.connect()}close(){this.userCalledClose=!0,this.ws?.close()}connect(){if(this.userCalledClose)return;this.ws=new WebSocket(this.url);let e=this.ws,t=setTimeout(()=>{e.close()},2e3);e.addEventListener(`open`,()=>{clearTimeout(t),this.reconnectAttempts=0,this.handleOpen?.()}),e.addEventListener(`close`,()=>{if(clearTimeout(t),this.ws=void 0,this.userCalledClose)return;this.handleReconnecting?.();let e=Math.min(1e3*1.5**this.reconnectAttempts,3e4);setTimeout(()=>{this.reconnectAttempts++,this.connect()},e)}),e.addEventListener(`message`,e=>{this.handleMessage?.(e)})}},h3=P(null,(e,t)=>{let n=e(FR),r=e(dk);t(c3,!0),t(u3,null),n==null?f3(t):p3(n,r,t)}),g3=P(null,(e,t,n)=>{t(IR,{evt:ke.fromJS(JSON.parse(n.data)),now:new Date,expire:!0})});function _3(){let e=z(h3),t=z(c3),n=(0,L.useCallback)(()=>t(!0),[t]),r=z(g3),i=R(vr),a=(0,L.useRef)(null);return(0,L.useEffect)(()=>{if(a.current)return;let t=i.user??null,o=window.location,s;if(o.protocol===`backup:`)return;s=o.protocol===`https:`?`wss:`:`ws:`,s+=`//`+o.host+`/api/v1/events`,t&&(s+=`?token=`+encodeURIComponent(t.access_token));let c=new m3(s);return c.handleOpen=e,c.handleReconnecting=n,c.handleMessage=r,a.current=c,()=>{a.current&&=(a.current.close(),null)}},[i,r,e,n]),null}var v3=[{id:0,label:`Date`,numeric:!1,getDisplay:e=>e.routeStartTime.toLocaleString(),getForSort:e=>e.routeStartTime.getTime(),getForExport:e=>e.routeStartTime.toISOString()},{id:1,label:`Part`,numeric:!1,getDisplay:e=>e.partName},{id:2,label:`Scheduled`,numeric:!0,getDisplay:e=>e.scheduledQty.toString(),getForSort:e=>e.scheduledQty},{id:3,label:`Removed`,numeric:!0,getDisplay:e=>e.decrementedQty.toString(),getForSort:e=>e.decrementedQty},{id:4,label:`Completed`,numeric:!0,getDisplay:e=>e.completedQty.toString()}];function y3({job:e}){let[t,n]=(0,L.useState)(!1);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(mX,{children:[v3.map(t=>(0,U.jsx)(Z,{align:t.numeric?`right`:`left`,children:t.id===1?(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:e.partName,size:25})}),(0,U.jsx)(`div`,{children:e.partName})]}):t.getDisplay(e)},t.id)),(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Show Details`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>n(!t),children:t?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})})})]}),(0,U.jsx)(hX,{children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:v3.length+1,children:(0,U.jsx)(Lp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(Qq,{job:e.inProcJob?e.inProcJob:e.historicJob,checkAnalysisMonth:!0})})})})]})}function b3(){let e=R(GR),t=q1(),n=K1(e),r=J1(0,v3),i=R(e.type===`Last30`?dL:pL),a=R(e.type===`Last30`?lk:pk),o=(0,L.useMemo)(()=>Nq(n.zoomRange,i.matsById,a,null),[n,i.matsById,a]),s=(0,L.useMemo)(()=>Q.of(o).sortBy(r.sortOn).drop(t.page*t.rowsPerPage).take(t.rowsPerPage),[o,r,t]);return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(z1,{columns:v3,sort:r,showDetailsCol:!0,copyToClipboardRows:o}),(0,U.jsx)(Sw,{children:s.map((e,t)=>(0,U.jsx)(y3,{job:e},e.historicJob?.unique??e.inProcJob?.unique??t))})]}),(0,U.jsx)(W1,{tpage:t,zoom:n.zoom,count:o.length})]})}function x3(){return qI(`Scheduled Jobs`),(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(`main`,{style:{padding:`24px`},children:(0,U.jsx)(b3,{})})})}function S3(){qI(`Quality`);let e=R(GR);return(0,U.jsx)(f0,{subtitle:`Inspection decisions grouped by path`,inspectionlogs:R(e.type===`Last30`?sL:Jie),zoomType:e.type===`Last30`?`Last30Days`:`ZoomIntoRange`,default_date_range:e.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[e.month,zE(e.month,1)]})}var C3={display:`flex`,backgroundColor:`#E0E0E0`,paddingLeft:`24px`,paddingRight:`24px`,paddingBottom:`4px`,height:`2.5em`,alignItems:`flex-end`},w3={display:`flex`,alignSelf:`center`,alignItems:`flex-end`},T3=`@@all_inspection_display@@`,E3=`@@recent_completed_material@@`;function D3(e){return typeof e==`string`?e.split(`,`):e}function O3(){let[e,t]=B(Iq);return(0,U.jsx)(lb,{control:(0,U.jsx)(Fv,{size:`small`,checked:e,onChange:e=>t(e.target.checked)}),label:`Hide Non-Loading Material`,sx:{pl:2,pr:2}})}function k3(){let[e,t]=B(GI),n=R(OL),r=Q.of(Object.keys(R(Fk).queues)).toSortedArray(e=>e),i=R(vr),a=gT(Ed().breakpoints.down(`md`));function o(n){let r=parseFloat(n);!isNaN(r)&&isFinite(r)&&(e.route===$.Station_LoadMonitor?t({route:$.Station_LoadMonitor,loadNum:r,queues:e.queues,completed:e.completed}):t({route:$.Station_LoadMonitor,loadNum:r,queues:[],completed:!1}))}function s(e){t(e===T3?{route:$.Station_InspectionMonitor}:{route:$.Station_InspectionMonitorWithType,inspType:e})}function c(n){let r=n.includes(E3);n=n.filter(e=>e!==E3).slice(0,2),e.route===$.Station_LoadMonitor?t({route:$.Station_LoadMonitor,loadNum:e.loadNum,queues:n,completed:r}):t({route:$.Station_LoadMonitor,loadNum:1,queues:n,completed:r})}function l(e){t({route:$.Station_Queues,queues:e})}let u=`LoadUnload`,d=1,f=null,p=[];switch(e.route){case $.Station_LoadMonitor:u=`LoadUnload`,d=e.loadNum,p=e.queues,e.completed&&(p=p.concat(E3));break;case $.Station_InspectionMonitor:u=`Inspection`,f=``;break;case $.Station_InspectionMonitorWithType:u=`Inspection`,f=e.inspType;break;case $.Station_Queues:u=`Queues`,p=e.queues;break;case $.Station_Closeout:u=`CloseOut`;break;default:u=`AllMaterial`;break}return(0,U.jsxs)(Y,{component:`nav`,sx:a?C3:w3,children:[u===`LoadUnload`?i.loadStationNames&&Object.keys(i.loadStationNames).length>0?(0,U.jsx)(zC,{value:d,onChange:e=>o(e.target.value.toString()),variant:`standard`,style:{marginLeft:`1em`,minWidth:`8em`},children:Q.of(Object.entries(i.loadStationNames)).sortBy(([e])=>parseInt(e)).map(([e,t])=>(0,U.jsx)(GS,{value:parseInt(e),children:t},e))},`loadnumselect`):(0,U.jsx)(Mb,{type:`number`,placeholder:`Load Station Number`,value:d,onChange:e=>o(e.target.value),style:{width:`3em`,marginLeft:`1em`}},`loadnumselect`):void 0,u===`Inspection`?(0,U.jsxs)(zC,{value:f||T3,onChange:e=>s(e.target.value),variant:`standard`,style:{marginLeft:`1em`},children:[(0,U.jsx)(GS,{value:T3,children:(0,U.jsx)(`em`,{children:`All`})},T3),Q.of(n).sortBy(e=>e).map(e=>(0,U.jsx)(GS,{value:e,children:e},e))]},`inspselect`):void 0,u===`LoadUnload`?(0,U.jsxs)(ab,{style:{marginLeft:`1em`},children:[p.length===0?(0,U.jsx)(`label`,{style:{position:`absolute`,top:`10px`,left:0,color:`rgba(0,0,0,0.54)`,fontSize:`0.9rem`},children:`Display queue(s)`}):void 0,(0,U.jsxs)(zC,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{minWidth:`10em`,marginTop:`0`},onChange:e=>c(D3(e.target.value)),children:[r.map((e,t)=>(0,U.jsx)(GS,{value:e,children:e},t)),(0,U.jsx)(GS,{value:E3,children:(0,U.jsx)(`i`,{children:`Completed`})}),(0,U.jsx)(Ky,{}),(0,U.jsx)(O3,{})]})]}):void 0,u===`Queues`?(0,U.jsxs)(ab,{style:{marginLeft:`1em`,minWidth:`10em`},children:[p.length===0?(0,U.jsx)(`label`,{style:{position:`absolute`,top:`10px`,left:0,color:`rgba(0,0,0,0.54)`,fontSize:`0.9rem`},children:`Select queue(s)`}):void 0,(0,U.jsx)(zC,{multiple:!0,displayEmpty:!0,variant:`standard`,value:p,inputProps:{id:`queueselect`},style:{marginTop:`0`},onChange:e=>l(D3(e.target.value)),children:r.map((e,t)=>(0,U.jsx)(GS,{value:e,children:e},t))})]}):void 0]})}function A3(){let e=gT(Ed().breakpoints.down(`md`));return(0,U.jsx)(Y,{sx:{display:`flex`,alignItems:`center`,height:`100%`,bgcolor:e?`#E0E0E0`:void 0},children:(0,U.jsx)(E2,{full:e})})}var j3=wk(`shift-starts`,[[1,360],[2,840],[3,1320]]),M3=P(e=>new Map(e(j3)),(e,t,n)=>{let r=new Map(e(j3));n(r),t(j3,Array.from(r.entries()))});function N3(e){let t=R(M3);return(0,L.useMemo)(()=>{let n=[];for(let e=1;e<=3;e++){let r=t.get(e);r!==void 0&&(n.length>=1&&n[n.length-1]>=r||n.push(r))}if(n.length===0)return[{start:e,end:RE(e,1)}];let r=YE(RE(e,1),n[0]),i=[];for(let t=0;t<n.length;t++)i.push({start:YE(e,n[t]),end:t===n.length-1?r:YE(e,n[t+1])});return i},[t,e])}function P3(e){let[t,n]=e.split(`:`);return parseInt(t,10)*60+parseInt(n,10)}function F3(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function I3(e,t){let n=t.get(e);if(n===void 0)return!1;if(e===1){let e=t.get(2)??t.get(3);return e!==void 0&&e<=n}else if(e===2){let e=t.get(1),r=t.get(3);return e!==void 0&&e>=n||r!==void 0&&r<=n}else if(e===3){let e=t.get(2)??t.get(1);return e!==void 0&&e>=n}else return!1}function L3({shiftNum:e}){let[t,n]=B(M3),r=t.get(e);return(0,U.jsx)(lT,{type:`time`,label:`Shift ${e} Start`,error:I3(e,t),value:r===void 0?``:F3(r),onChange:t=>{let r=t.target.value;n(r===``?t=>t.delete(e):t=>t.set(e,P3(r)))},variant:`standard`,size:`small`,slotProps:{inputLabel:{shrink:!0},input:e===1?void 0:{endAdornment:(0,U.jsx)(tw,{title:`Clear/Disable Shift`,children:(0,U.jsx)(wm,{sx:{mb:`4px`},onClick:()=>n(t=>t.delete(e)),children:(0,U.jsx)(NT,{fontSize:`small`})})})}}})}function R3(){return(0,U.jsxs)(nw,{direction:`row`,spacing:2,children:[(0,U.jsx)(L3,{shiftNum:1}),(0,U.jsx)(L3,{shiftNum:2}),(0,U.jsx)(L3,{shiftNum:3})]})}function z3(e,t){return n=>{let r=e(n);for(let e=0;e<t.length;e++){let i=t[e];if(r>=i.start&&r<i.end)return{val:n,shift:e}}return null}}function B3(e,t){return Q.of(e).filter(e=>e.finalProcess).collect(z3(e=>e.completeTime,t)).toLookupOrderedMap(e=>e.val.partName,e=>e.shift,e=>e.val.quantity,(e,t)=>e+t)}function V3(e,t){return e.valuesToLazySeq().filter(e=>cA(e)&&e.operation===`UNLOAD`&&Q.of(e.material).some(e=>e.proc===e.numproc)).collect(z3(e=>e.endTime,t)).toLookupOrderedMap(e=>e.val.part,e=>e.shift,e=>Q.of(e.val.material).sumBy(e=>+(e.proc===e.numproc)),(e,t)=>e+t)}function H3(e){let t=R(SA),n=R(ZI),r=N3(e);return(0,L.useMemo)(()=>{let e=B3(n,r),i=V3(t,r);return e.mapValues(e=>({planned:e})).adjust(i,(e,t)=>e?{...e,completed:t}:{completed:t}).toAscLazySeq().map(([e,{planned:t,completed:n}])=>({part:e,planned:t??nk.empty(),completed:n??nk.empty()})).toRArray()},[t,n,r])}var U3=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function W3({row:e}){return(0,U.jsxs)(nw,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:25}),(0,U.jsx)(`span`,{children:e.part})]})}function G3(e){let t=N3(e).length;return(0,L.useMemo)(()=>{let e=[{id:0,numeric:!1,label:`Part`,getDisplay:e=>e.part,getForTotal:()=>0,Cell:W3},{id:1,numeric:!0,label:`Shift 1 Planned`,getDisplay:e=>e.planned.get(0)?.toString()??``,getForSort:e=>e.planned.get(0)??0,getForTotal:e=>e.planned.get(0)??0},{id:4,numeric:!0,label:`Shift 1 Completed`,getDisplay:e=>e.completed.get(0)?.toString()??``,getForSort:e=>e.completed.get(0)??0,getForTotal:e=>e.completed.get(0)??0}];return t>=2&&(e.push({id:2,numeric:!0,label:`Shift 2 Planned`,getDisplay:e=>e.planned.get(1)?.toString()??``,getForSort:e=>e.planned.get(1)??0,getForTotal:e=>e.planned.get(1)??0}),e.push({id:5,numeric:!0,label:`Shift 2 Completed`,getDisplay:e=>e.completed.get(1)?.toString()??``,getForSort:e=>e.completed.get(1)??0,getForTotal:e=>e.completed.get(1)??0})),t===3&&(e.push({id:3,numeric:!0,label:`Shift 3 Planned`,getDisplay:e=>e.planned.get(2)?.toString()??``,getForSort:e=>e.planned.get(2)??0,getForTotal:e=>e.planned.get(2)??0}),e.push({id:6,numeric:!0,label:`Shift 3 Completed`,getDisplay:e=>e.completed.get(2)?.toString()??``,getForSort:e=>e.completed.get(2)??0,getForTotal:e=>e.completed.get(2)??0})),e},[t])}function K3({columns:e,rows:t}){return(0,U.jsx)(Mw,{children:e.map(e=>(0,U.jsx)(Z,{align:e.numeric?`right`:`left`,children:e.id===0?`Total`:Q.of(t).sumBy(e.getForTotal)},e.id))})}var q3=(0,L.memo)(function({columns:e,rows:t}){let n=J1(0,e);return(0,U.jsx)(Y,{sx:{overflowX:`auto`},children:(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(z1,{columns:e,sort:n,showDetailsCol:!1}),(0,U.jsx)(G1,{columns:e,pageData:Q.of(t).toSortedArray(n.sortOn,e=>e.part)}),(0,U.jsx)(Tne,{children:(0,U.jsx)(K3,{columns:e,rows:t})})]})})});function J3({day:e,setDay:t}){let n=lD();return(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,U.jsx)(tw,{title:`Previous Day`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)($m,{disabled:e<=RE(n,-28),onClick:()=>t(e=>RE(e,-1)),children:(0,U.jsx)(xE,{})})})}),(0,U.jsx)(J,{sx:{minWidth:`14em`,textAlign:`center`},children:U3.format(e)}),(0,U.jsx)(tw,{title:`Next Day`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)($m,{disabled:e>=n,onClick:()=>t(e=>RE(e,1)),children:(0,U.jsx)(bE,{})})})})]})}var Y3=`"shifts day export" auto / 1fr 1fr 1fr`,X3=`"shifts export" auto
|
|
355
|
-
"day day" auto / 1fr auto`,Z3=function({day:e,setDay:t,columns:n,rows:r}){return(0,U.jsxs)(Y,{component:`nav`,sx:{display:`grid`,gridTemplate:{md:Y3,xs:X3},minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(Y,{sx:{gridArea:`shifts`,justifySelf:`flex-start`},children:(0,U.jsx)(R3,{})}),(0,U.jsx)(Y,{sx:{gridArea:`day`,justifySelf:`center`},children:(0,U.jsx)(J3,{day:e,setDay:t})}),(0,U.jsx)(Y,{sx:{gridArea:`export`,justifySelf:`flex-end`},children:(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>X1(n,r),children:(0,U.jsx)($T,{})})})})]})};function Q3(){qI(`Recent Completed Parts`);let[e,t]=(0,L.useState)(lD),n=G3(e),r=H3(e);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsx)(Z3,{day:e,setDay:t,rows:r,columns:n}),(0,U.jsx)(`main`,{children:(0,U.jsx)(q3,{rows:r,columns:n})})]})}function $3(){let[e,t]=(0,L.useState)(!1);function n(){t(!0),Bt.enableVerboseLoggingForFiveMinutes(),setTimeout(()=>t(!1),300*1e3)}return(0,U.jsx)(`main`,{style:{marginTop:`4em`},children:(0,U.jsxs)(`div`,{style:{maxWidth:`50em`,marginLeft:`auto`,marginRight:`auto`,textAlign:`center`},children:[(0,U.jsx)(`p`,{style:{marginBottom:`1em`},children:`Verbose logging generates a large amount of additional data in the FMS Insight Server debug log file.`}),(0,U.jsx)(X,{disabled:e,onClick:n,variant:`contained`,children:e?(0,U.jsx)(`span`,{children:`Verbose Logging is Enabled`}):(0,U.jsx)(`span`,{children:`Enable Verbose Logging For 5 minutes`})})]})})}function e6(){return(0,U.jsxs)(`svg`,{width:`30px`,height:`30px`,viewBox:`0 0 170 170`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,U.jsxs)(`defs`,{children:[(0,U.jsx)(`path`,{id:`t`,d:`m307.5 125v77.5h-40c6.92-6.52 11.25-10.6 12.98-12.23 10.65-10.04 13.56-25.81 7.21-38.99-1.7-3.5-5.92-12.26-12.69-26.28z`}),(0,U.jsx)(`path`,{id:`ag`,d:`m273.88 120.52c-0.13 0.28-4.87 3.3-11.17 0.5-6.3-2.81-11.99-9.96-11.67-10.67 0.32-0.72 9.44-1.27 15.74 1.53 6.3 2.81 7.23 8.35 7.1 8.64z`}),(0,U.jsx)(`path`,{id:`m`,d:`m259 102.25c-0.13 0.29-4.2 3.61-9.02 1.46-4.81-2.14-8.75-8.51-8.43-9.23 0.31-0.71 7.69-2.05 12.5 0.1 4.82 2.14 5.07 7.39 4.95 7.67z`}),(0,U.jsx)(`path`,{id:`x`,d:`m282.79 114.2c-0.2 0.24-5.59 1.84-10.87-2.59-5.29-4.44-8.78-12.88-8.28-13.48 0.5-0.59 9.42 1.38 14.7 5.82 5.29 4.43 4.65 10.02 4.45 10.25z`}),(0,U.jsx)(`path`,{id:`k`,d:`m268.39 125.43c-0.12-0.28-4.33-3.54-9.45-1.26s-9.41 8.81-9.1 9.52c0.32 0.71 8.05 1.89 13.17-0.39s5.51-7.58 5.38-7.87z`}),(0,U.jsx)(`path`,{id:`ae`,d:`m243.83 111.58c0 0.31-2.61 5-8.43 5s-12.65-4.22-12.65-5 6.83-5 12.65-5 8.43 4.69 8.43 5z`}),(0,U.jsx)(`path`,{id:`l`,d:`m304.24 109.88c-0.31 0.04-5.38-2.38-6.34-9.21s2.09-15.44 2.86-15.55 6.08 7.33 7.04 14.16-3.25 10.55-3.56 10.6z`}),(0,U.jsx)(`path`,{id:`u`,d:`m306.79 80.57c-0.31 0.05-5.31-1.83-6.1-7.47-0.79-5.63 2.45-12.84 3.23-12.95 0.77-0.11 5.88 5.92 6.67 11.56s-3.49 8.82-3.8 8.86z`}),(0,U.jsx)(`path`,{id:`a`,d:`m306.13 58.04c-0.31 0.05-5.23-1.3-5.86-5.74-0.62-4.43 2.83-10.24 3.6-10.34 0.77-0.11 5.68 4.51 6.31 8.95 0.62 4.44-3.74 7.09-4.05 7.13z`}),(0,U.jsx)(`path`,{id:`f`,d:`m295.52 118.45c-0.29 0.13-6.1-1.39-9.5-9.02-3.39-7.64-3.53-18.31-2.82-18.63 0.72-0.32 8.56 6.93 11.96 14.56s0.64 12.97 0.36 13.09z`}),(0,U.jsx)(`path`,{id:`b`,d:`m272.35 90.11c-0.26 0.19-5.76 0.58-9.58-4.67-3.82-5.26-4.88-13.9-4.25-14.36s8.52 3.23 12.34 8.48 1.74 10.37 1.49 10.55z`}),(0,U.jsx)(`path`,{id:`s`,d:`m289.97 85.66c-0.28 0.13-5.97-0.97-9.17-7.84-3.21-6.87-3.15-16.73-2.44-17.06s8.3 5.96 11.5 12.83 0.4 11.94 0.11 12.07z`}),(0,U.jsx)(`path`,{id:`n`,d:`m270.16 65.57c-0.28 0.14-5.38 0.38-7.35-3.65-1.96-4.03-0.48-10.62 0.22-10.96s6.8 2.54 8.77 6.58c1.97 4.03-1.36 7.9-1.64 8.03z`}),(0,U.jsx)(`path`,{id:`ah`,d:`m250 80c-0.17 0.26-4.4 3.11-8.12 0.69s-5.79-8.79-5.37-9.45c0.43-0.65 7.1-1.35 10.82 1.06 3.72 2.42 2.84 7.44 2.67 7.7z`}),(0,U.jsx)(`path`,{id:`y`,d:`m236.47 96.58c-0.11 0.29-3.72 3.89-7.83 2.23-4.12-1.66-7.37-7.53-7.07-8.25 0.29-0.72 6.7-2.68 10.81-1.02 4.12 1.66 4.21 6.75 4.09 7.04z`}),(0,U.jsx)(`path`,{id:`aa`,d:`m290.52 56.48c-0.28 0.14-5.35 0.58-7.44-3.33-2.08-3.92-0.8-10.5-0.11-10.87s6.86 2.25 8.94 6.17c2.09 3.92-1.12 7.88-1.39 8.03z`}),(0,U.jsx)(`path`,{id:`af`,d:`m274.18 138.46c-0.16-0.26-5.28-2.6-11.13 1.06s-10.48 11.53-10.07 12.19 9.52-0.05 15.37-3.71 6-9.27 5.83-9.54z`}),(0,U.jsx)(`path`,{id:`z`,d:`m247.89 137.78c0.11 0.29-0.65 5.6-6.08 7.69-5.43 2.08-13.32 0.59-13.6-0.14s4.58-7.11 10.01-9.2c5.44-2.08 9.56 1.36 9.67 1.65z`}),(0,U.jsx)(`path`,{id:`h`,d:`m235.06 125.39c0.1 0.3-0.26 5.38-4.46 6.83-4.19 1.44-10.49-0.85-10.75-1.59-0.25-0.74 3.3-6.42 7.5-7.87 4.19-1.44 7.61 2.34 7.71 2.63z`}),(0,U.jsx)(`path`,{id:`ab`,d:`m317.14 85.63c0.28 0.13 5.97-0.98 9.17-7.85 3.21-6.87 3.14-16.72 2.44-17.05-0.71-0.33-8.3 5.95-11.5 12.82-3.21 6.87-0.4 11.94-0.11 12.08z`}),(0,U.jsx)(`path`,{id:`ac`,d:`m299.61 124.96v77.5h40c-6.93-6.52-11.25-10.6-12.99-12.23-10.64-10.03-13.56-25.81-7.2-38.99 1.69-3.5 5.92-12.26 12.69-26.28z`}),(0,U.jsx)(`path`,{id:`c`,d:`m348.11 102.22c0.13 0.28 4.2 3.6 9.01 1.46 4.82-2.15 8.76-8.52 8.44-9.23-0.32-0.72-7.69-2.05-12.5 0.09-4.82 2.14-5.08 7.39-4.95 7.68z`}),(0,U.jsx)(`path`,{id:`p`,d:`m324.32 114.17c0.2 0.24 5.59 1.83 10.87-2.6 5.29-4.43 8.78-12.87 8.28-13.47s-9.42 1.38-14.71 5.81c-5.28 4.43-4.64 10.02-4.44 10.26z`}),(0,U.jsx)(`path`,{id:`o`,d:`m338.71 125.4c0.13-0.29 4.34-3.55 9.46-1.27s9.41 8.81 9.09 9.52c-0.31 0.72-8.04 1.9-13.16-0.38s-5.51-7.59-5.39-7.87z`}),(0,U.jsx)(`path`,{id:`j`,d:`m363.28 111.54c0 0.32 2.61 5 8.43 5s12.65-4.21 12.65-5c0-0.78-6.83-5-12.65-5s-8.43 4.69-8.43 5z`}),(0,U.jsx)(`path`,{id:`w`,d:`m311.59 118.42c0.29 0.12 6.1-1.4 9.49-9.03 3.4-7.63 3.54-18.31 2.82-18.63-0.71-0.32-8.55 6.93-11.95 14.56s-0.64 12.97-0.36 13.1z`}),(0,U.jsx)(`path`,{id:`i`,d:`m334.76 90.08c0.25 0.18 5.76 0.57 9.58-4.68 3.81-5.25 4.88-13.9 4.25-14.36s-8.53 3.23-12.34 8.48c-3.82 5.26-1.74 10.37-1.49 10.56z`}),(0,U.jsx)(`path`,{id:`r`,d:`m333.23 120.48c0.12 0.29 4.86 3.31 11.17 0.5 6.3-2.81 11.98-9.96 11.67-10.67-0.32-0.71-9.44-1.27-15.74 1.53-6.3 2.81-7.23 8.35-7.1 8.64z`}),(0,U.jsx)(`path`,{id:`ad`,d:`m336.95 65.54c0.28 0.13 5.38 0.38 7.35-3.66 1.96-4.03 0.48-10.61-0.22-10.96-0.7-0.34-6.81 2.55-8.77 6.58-1.97 4.03 1.36 7.9 1.64 8.04z`}),(0,U.jsx)(`path`,{id:`ai`,d:`m357.11 79.96c0.17 0.27 4.39 3.11 8.12 0.69 3.72-2.41 5.79-8.79 5.36-9.44-0.42-0.66-7.09-1.36-10.81 1.06-3.72 2.41-2.84 7.43-2.67 7.69z`}),(0,U.jsx)(`path`,{id:`d`,d:`m370.63 96.55c0.12 0.29 3.73 3.89 7.84 2.22 4.11-1.66 7.37-7.52 7.07-8.25-0.29-0.72-6.7-2.68-10.82-1.02-4.11 1.66-4.2 6.76-4.09 7.05z`}),(0,U.jsx)(`path`,{id:`q`,d:`m316.59 56.44c0.28 0.15 5.35 0.59 7.43-3.33 2.09-3.92 0.81-10.5 0.12-10.87-0.69-0.36-6.86 2.26-8.95 6.17-2.08 3.92 1.12 7.88 1.4 8.03z`}),(0,U.jsx)(`path`,{id:`v`,d:`m332.93 138.42c0.16-0.26 5.28-2.59 11.13 1.06 5.85 3.66 10.48 11.53 10.07 12.19-0.42 0.66-9.52-0.05-15.37-3.71-5.85-3.65-6-9.27-5.83-9.54z`}),(0,U.jsx)(`path`,{id:`g`,d:`m359.22 137.74c-0.11 0.29 0.65 5.61 6.08 7.69 5.43 2.09 13.32 0.59 13.6-0.13 0.28-0.73-4.59-7.12-10.02-9.21-5.43-2.08-9.55 1.36-9.66 1.65z`}),(0,U.jsx)(`path`,{id:`e`,d:`m372.05 125.36c-0.1 0.29 0.26 5.37 4.45 6.82 4.2 1.44 10.5-0.85 10.75-1.59 0.26-0.74-3.29-6.42-7.49-7.87-4.2-1.44-7.61 2.34-7.71 2.64z`})]}),(0,U.jsx)(`g`,{transform:`translate(-219.32 -33)`,visibility:`inherit`,children:(0,U.jsxs)(`g`,{visibility:`inherit`,children:[(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#t`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#t`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ag`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ag`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#m`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#m`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#x`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#x`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#k`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#k`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ae`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ae`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#l`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#l`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#u`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#u`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#a`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#a`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#f`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#f`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#b`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#b`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#s`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#s`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#n`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#n`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ah`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#y`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#y`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#aa`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#aa`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#af`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#af`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#z`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#z`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#h`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#h`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ab`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ab`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ac`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ac`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#c`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#c`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#p`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#p`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#o`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#o`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#j`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#j`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#w`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#w`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#i`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#i`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#r`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#r`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ad`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#ad`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#ai`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#d`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#d`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#q`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#q`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#v`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#v`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#g`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#g`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fill:`#DBA72E`,href:`#e`}),(0,U.jsx)(`use`,{width:`100%`,height:`100%`,fillOpacity:`0`,stroke:`#DBA72E`,href:`#e`})]})})]})}var t6=`__FMS_INSIGHT_NEW_OPERATOR__`,n6=(0,L.memo)(function(){let e=R(vr),[t,n]=B(Nk),[r,i]=B(Mk),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(``);function l(e){e.target.value===t6?o(!0):n(e.target.value)}function u(e){i(t=>t.filter(t=>t!==e))}function d(){s!==``&&(i(e=>[...e.filter(e=>e!==s),s]),n(s),c(``),o(!1))}return e.user?(0,U.jsx)(`div`,{children:e.user.profile.name||e.user.profile.sub}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(zC,{value:t||``,onChange:l,variant:`standard`,renderValue:e=>e,children:[Q.of(r).sortBy(e=>e).map((e,t)=>(0,U.jsxs)(GS,{value:e,children:[(0,U.jsx)(Bx,{primary:e}),(0,U.jsx)(Tx,{children:(0,U.jsx)($m,{edge:`end`,onClick:()=>u(e),size:`large`,children:(0,U.jsx)(IT,{})})})]},t)),(0,U.jsx)(GS,{value:t6,children:(0,U.jsx)(`em`,{children:`Create New Operator`})},`new`)]}),(0,U.jsxs)(Dy,{open:a,onClose:()=>{o(!1),c(``)},children:[(0,U.jsx)(By,{children:`Create New Operator`}),(0,U.jsx)(Ly,{children:(0,U.jsx)(lT,{value:s,onChange:e=>c(e.target.value),label:`New Name`,variant:`outlined`,autoFocus:!0,sx:{mt:`0.5em`},onKeyUp:e=>{e.keyCode===13&&d()}})}),(0,U.jsxs)(jy,{children:[(0,U.jsxs)(X,{disabled:s===``,onClick:d,children:[`Create `,s]}),(0,U.jsx)(X,{onClick:()=>{c(``),o(!1)},children:`Cancel`})]})]})]})}),Qie=(0,L.memo)(function(){let e=R(l3),t=R(JR),n=R(d3),r=R(XR),[i,a]=(0,L.useState)(!1);return(0,U.jsxs)(U.Fragment,{children:[n!=null||r!=null?(0,U.jsx)(tw,{title:`Error`,children:(0,U.jsx)($m,{onClick:()=>a(!0),size:`large`,children:(0,U.jsx)(HT,{})})}):void 0,e||t?(0,U.jsx)(tw,{title:`Loading`,children:(0,U.jsx)(qm,{"data-testid":`loading-icon`,color:`secondary`})}):void 0,(0,U.jsxs)(Dy,{open:i,onClose:()=>a(!1),children:[(0,U.jsx)(By,{children:`Error`}),(0,U.jsxs)(Ly,{children:[n===null?void 0:(0,U.jsx)(`p`,{children:n}),r===null?void 0:(0,U.jsx)(`p`,{children:r})]}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>a(!1),children:`Close`})})]})]})}),$ie=(0,L.memo)(function(){let e=R(vr)?.customStationMonitorDialogUrl,[t,n]=(0,L.useState)(!1);if(!e)return null;let r=e.split(`/`),i=r[r.length-1];return i=i[0].toUpperCase()+i.substr(1),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:i,children:(0,U.jsx)($m,{onClick:()=>n(!0),size:`large`,children:(0,U.jsx)(vE,{})})}),(0,U.jsxs)(Dy,{open:t,onClose:()=>n(!1),fullWidth:!0,maxWidth:`md`,children:[(0,U.jsx)(By,{children:i}),(0,U.jsx)(Ly,{children:(0,U.jsx)(`iframe`,{width:`100%`,src:e,sandbox:`allow-scripts`,style:{border:0,height:`calc(100vh - 250px)`}})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{color:`primary`,onClick:()=>n(!1),children:`Close`})})]})]})});function eae({d:e}){let t=eD(e,lD());return t>7?null:t>=0?(0,U.jsxs)(J,{variant:`subtitle1`,children:[`License expires on `,e.toDateString()]}):(0,U.jsxs)(J,{variant:`h6`,children:[`License expired on `,e.toDateString()]})}function r6(){let e=R(vr),t=``;return t=e.name?(e.name||``)+` `+(e.version||``):`SeedTactic FMS Insight`,(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(tw,{title:t,children:(0,U.jsx)(`div`,{children:(0,U.jsx)(e6,{})})}),(0,U.jsx)(J,{variant:`h6`,style:{marginLeft:`1em`,marginRight:`2em`},children:`Insight`}),e?.licenseExpires?(0,U.jsx)(eae,{d:e.licenseExpires}):void 0]})}function tae(){let e=R(Fk).alarms,t=e&&e.length>0;return(0,U.jsx)(tw,{title:t?e.join(`. `):`No Alarms`,children:(0,U.jsx)(tv,{badgeContent:t?e.length:0,children:(0,U.jsx)(uE,{color:t?`error`:void 0})})})}function nae(){return(0,U.jsx)(tw,{title:`Help`,children:(0,U.jsx)($m,{"aria-label":`Help`,href:Nie(R(GI)),target:`_help`,size:`large`,children:(0,U.jsx)(XT,{})})})}function rae(){return(0,U.jsx)(tw,{title:`Logout`,children:(0,U.jsx)($m,{"aria-label":`Logout`,onClick:br,size:`large`,children:(0,U.jsx)(WT,{})})})}function i6({showAlarms:e,showLogout:t,showSearch:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qie,{}),(0,U.jsx)($ie,{}),n?(0,U.jsx)(Aq,{}):void 0,n?(0,U.jsx)(AY,{}):void 0,(0,U.jsx)(nae,{}),t?(0,U.jsx)(rae,{}):void 0,e?(0,U.jsx)(tae,{}):void 0]})}function iae({menuNavs:e}){let t=R(vr),[n,r]=B(GI),[i,a]=(0,L.useTransition)();return(0,U.jsx)(ab,{size:`small`,children:(0,U.jsx)(zC,{value:n.route,sx:{width:`16.5em`},onChange:t=>a(()=>{let n=e.find(e=>`separator`in e?!1:e.route.route===t.target.value);!n||`separator`in n||r(n.route)}),renderValue:()=>{let r=e.find(e=>`separator`in e?!1:e.route.route===n.route);return!r||`separator`in r?null:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[r.icon,(0,U.jsxs)(J,{variant:`h6`,style:{marginLeft:`1em`},children:[typeof r.name==`string`?r.name:r.name(t),i?`...`:``]})]})},children:e.map((e,n)=>`separator`in e?(0,U.jsx)(w_,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,U.jsxs)(GS,{value:e.route.route,children:[(0,U.jsx)(Fx,{children:e.icon}),(0,U.jsx)(Bx,{primary:typeof e.name==`string`?e.name:e.name(t)})]},n))})})}function aae({showAlarms:e,showLogout:t,showSearch:n,showOperator:r,Nav1:i,Nav2:a,menuNavs:o}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(gh,{position:`static`,sx:{display:{xs:`none`,md:`block`}},children:(0,U.jsx)(Ew,{children:(0,U.jsxs)(Y,{sx:{display:`grid`,gridTemplateColumns:a?`1fr auto 1fr`:`minmax(200px, 1fr) auto`,width:`100vw`,gridTemplateAreas:a?`"nav navCenter tools"`:`"nav tools"`},children:[(0,U.jsxs)(Y,{sx:{gridArea:`nav`,display:`flex`,alignItems:`center`},children:[(0,U.jsx)(r6,{}),i?(0,U.jsx)(i,{}):void 0]}),a?(0,U.jsx)(Y,{sx:{gridArea:`navCenter`},children:(0,U.jsx)(a,{})}):void 0,(0,U.jsxs)(Y,{sx:{gridArea:`tools`,display:`flex`,alignItems:`center`,justifyContent:`flex-end`},children:[r?(0,U.jsx)(n6,{}):void 0,(0,U.jsx)(i6,{showAlarms:e,showLogout:t,showSearch:n})]})]})})}),(0,U.jsxs)(gh,{position:`static`,sx:{display:{xs:`block`,md:`none`}},children:[(0,U.jsxs)(Ew,{children:[(0,U.jsx)(r6,{}),(0,U.jsx)(`div`,{style:{flexGrow:1}}),(0,U.jsx)(i6,{showAlarms:e,showLogout:t,showSearch:n})]}),(0,U.jsxs)(Y,{sx:{display:`grid`,gridTemplateColumns:`minmax(200px, 1fr) auto`},children:[(0,U.jsx)(Y,{sx:{gridColumn:`1`},children:i?(0,U.jsx)(i,{}):void 0}),(0,U.jsx)(Y,{sx:{gridColumn:`2`},children:a?(0,U.jsx)(a,{}):void 0})]})]}),o&&o.length>0?(0,U.jsx)(Vp,{elevation:4,square:!0,component:`nav`,sx:{display:{xs:`block`,xl:`none`},padding:`2px`},children:(0,U.jsx)(iae,{menuNavs:o})}):void 0]})}function oae({menuItems:e}){let t=R(vr),[n,r]=B(GI),[i,a]=(0,L.useTransition)();return!e||e.length===0?null:(0,U.jsx)(Vp,{elevation:3,square:!0,sx:{flexShrink:0,display:{xs:`none`,xl:`block`},minHeight:`calc(100vh - 64px)`,zIndex:1},children:(0,U.jsx)(gx,{dense:!0,children:e?.map((e,o)=>`separator`in e?(0,U.jsx)(w_,{children:e.separator},e.separator):e.hidden?.(t)?void 0:(0,U.jsx)(Ax,{children:(0,U.jsxs)(xx,{selected:n.route===e.route.route,onClick:()=>a(()=>r(e.route)),children:[(0,U.jsx)(Fx,{children:e.icon}),(0,U.jsx)(Bx,{primary:typeof e.name==`string`?e.name:e.name(t),sx:i?e=>({color:e.palette.grey[700]}):void 0})]})},o))})})}function sae(e,t,n){return[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.endTime.toLocaleString(),getForSort:e=>e.endTime.getTime()},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.part+`-`+Q.of(e.material).map(e=>e.proc).distinctAndSortBy(e=>e).toRArray().join(`:`)},{id:2,numeric:!1,label:`Station`,getDisplay:e=>gA(e.stationGroup,e.stationNumber,t)},{id:6,numeric:!1,label:`Operation`,getDisplay:e=>e.operation},{id:3,numeric:!1,label:`Carrier`,getDisplay:e=>vA(e,n),getForSort:e=>yA(e)},{id:4,numeric:!1,label:`Serial`,getDisplay:e=>e.material.filter(e=>e.serial).map(e=>e.serial).join(`, `)},{id:5,numeric:!1,label:`Workorder`,getDisplay:e=>e.material.filter(e=>e.workorder).map(e=>e.workorder).join(`, `)},{id:7,numeric:!1,label:`Inspection`,getDisplay:t=>oj(t,e),getForSort:t=>Q.of(t.material).collect(t=>e.get(t.id)).flatMap(e=>e.signaledInspections).distinct().toSortedArray(e=>e).join(`,`)},{id:8,numeric:!0,label:`Elapsed Min`,getDisplay:e=>(e.elapsedMinsPerMaterial*e.material.length).toFixed(1)},{id:9,numeric:!0,label:`Target Min`,getDisplay:e=>e.activeMinutes.toFixed(1)},{id:10,numeric:!0,label:`Median Elapsed Min`,getDisplay:e=>e.medianCycleMinutes.toFixed(1)},{id:11,numeric:!0,label:`Median Deviation`,getDisplay:e=>e.MAD_aboveMinutes.toFixed(1)}]}function cae(e,t,n,r,i){let a;for(let e of t)e.id===r&&(a=e.getForSort||e.getDisplay);a===void 0&&(a=t[0].getForSort||t[0].getDisplay);let o=a,s=Q.of(e.values()).flatMap(e=>e);return(n?s.filter(e=>e.endTime>=n.start&&e.endTime<=n.end):s).toSortedArray(i===`desc`?{desc:o}:{asc:o},i===`desc`?{desc:e=>e.endTime.getTime()}:{asc:e=>e.endTime.getTime()})}function lae(e){let t,n=e.set_date_zoom_range;return n&&(t=e.period.type===`Last30`?{type:`Last30Days`,set_days_back:e=>{if(e){let t=new Date;n({zoom:{start:RE(t,-e),end:VE(t,1)}})}else n({zoom:void 0})}}:{type:`ZoomIntoRange`,default_date_range:[e.period.month,zE(e.period.month,1)],current_date_zoom:e.current_date_zoom,set_date_zoom_range:e=>n({zoom:e})}),{zoom:t,zoomRange:e.current_date_zoom}}var a6=(0,L.memo)(function(e){let t=R(vr),n=sae(e.matsById,t.loadStationNames,_A(t.basketName)),r=J1(0,n),i=q1(),a=lae(e),[o,s]=(0,L.useState)(null),c=z(SI),l=cae(e.points,n,e.current_date_zoom,r.orderBy,r.order),u=l.length,d=l.slice(i.page*i.rowsPerPage,(i.page+1)*i.rowsPerPage),f=n.filter(t=>!(!e.showWorkorderAndInspect&&t.id===5||!e.showWorkorderAndInspect&&t.id===7||e.hideMedian&&t.id===10||e.hideMedian&&t.id===11));return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:f,sort:r,showDetailsCol:!0}),(0,U.jsx)(G1,{columns:f,pageData:d,rowsPerPage:i.rowsPerPage,onClickDetails:(e,t)=>{t.material.length!==0&&(t.material.length===1?c({type:`LogMat`,logMat:t.material[0]}):s({anchorEl:e.currentTarget,material:t.material}))},emptyMessage:e.emptyMessage})]}),(0,U.jsx)(W1,{zoom:a.zoom,tpage:i,count:u}),(0,U.jsx)(VS,{anchorEl:o?.anchorEl,keepMounted:!0,open:o!==null,onClose:()=>s(null),children:o?.material.map((e,t)=>(0,U.jsx)(GS,{onClick:()=>{c({type:`LogMat`,logMat:e}),s(null)},children:e.serial||`Material`},t))})]})});function o6({outlierTy:e}){qI(e===`machine`?`Machine Outliers`:`L/U Outliers`);let t=R(dL),n=R(vr),r=lD(),i=R(SA),a=(0,L.useMemo)(()=>{let t=lD(),n=RE(t,-4),r=RE(t,1);return{seriesLabel:`Part`,data:i.valuesToLazySeq().filter(t=>t.isOutlier&&t.endTime>=n&&t.endTime<r&&cA(t)===(e===`labor`)).toRLookup(e=>e.part+`-`+e.material[0].proc.toString())}},[e,i]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsxs)(J,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` cycles from the past 5 days statistically outside expected range`]}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>cj(a,t.matsById,void 0,void 0,n.loadStationNames,n.basketName),size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(`main`,{children:(0,U.jsx)(a6,{points:a.data,matsById:t.matsById,current_date_zoom:{start:RE(r,-4),end:RE(r,1)},set_date_zoom_range:void 0,period:{type:`Last30`},showWorkorderAndInspect:!1,defaultSortDesc:!0})})]})}var s6=class e{constructor(e,t){this.day=e,this.station=t}compare(e){let t=this.day.getTime()-e.day.getTime();return t===0?this.station.localeCompare(e.station):t}hash(){return xO(this.day,this.station)}toString(){return`{day: ${this.day.toISOString()}}, station: ${this.station}}`}adjustDay(t){return new e(t(this.day),this.station)}};function c6(e,t,n){let r=qE(e),i=qE(t);if(r.getTime()===i.getTime())return[{day:r,value:n}];{let a=[],o=t.getTime()-e.getTime();for(let s=r;s<=i;s=RE(s,1)){let r=QE([s,e]),i=($E([RE(s,1),t]).getTime()-r.getTime())/o;a.push({day:s,value:n*i})}return a}}function l6(e,t){return nA(Q.of(e),e=>e.stationLabel,e=>e.endTime).flatMap(([e,n])=>n.flatMap(e=>{let n=Q.of(e).sumBy(e=>e.elapsedMinsPerMaterial*e.material.length),r=XE(e[0].endTime,-n*60),i=Q.of(e).sumBy(e=>t(e));return c6(r,e[0].endTime,i)}).map(t=>({...t,statNameAndNum:e}))).buildHashMap(e=>new s6(e.day,e.statNameAndNum),(e,t)=>t.value+(e??0))}function u6(e){return l6(e,e=>e.activeMinutes)}function uae(e){return l6(e,e=>e.elapsedMinsPerMaterial*e.material.length)}function d6(e){let t=[];for(let n of e)if(t.length===0)t.push(n);else{let e=t[t.length-1];n.start<=e.end?t[t.length-1]={start:e.start,end:QE([e.end,n.end])}:t.push(n)}return t}function f6(e){return Q.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,t])=>d6(t.valuesToAscLazySeq()).flatMap(t=>c6(t.start,t.end,iD(t.end,t.start)).map(t=>({...t,station:e})))).toHashMap(e=>[new s6(e.day,e.station),e.value],(e,t)=>e+t)}function p6(e){let t=Q.of(e).filter(e=>e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).mapValues(e=>d6(e.valuesToAscLazySeq()));return Q.of(e).filter(e=>!e.plannedDown).toLookupOrderedMap(e=>e.stationLabel,e=>e.start).toAscLazySeq().flatMap(([e,n])=>{let r=d6(n.valuesToAscLazySeq()),i=t.get(e)??[];for(let e=0,t=0;t<r.length;)if(e<i.length&&i[e].end<=r[t].start)e++;else if(e<i.length&&i[e].start<r[t].end){let n=r[t].start,a=r[t].end,o=i[e].start,s=i[e].end;o<=n&&s>=a?r.splice(t,1):o<=n?(r[t]={start:s,end:a},e+=1):s>=a?(r[t]={start:n,end:o},t+=1):(r[t]={start:n,end:o},r.splice(t+1,0,{start:s,end:a}),e++,t++)}else t++;return r.flatMap(t=>c6(t.start,t.end,iD(t.end,t.start)).map(t=>({...t,station:e})))}).toHashMap(e=>[new s6(e.day,e.station),e.value],(e,t)=>e+t)}function dae(e,t,n,r,i){let a=u6(Q.of(r).filter(r=>n===`labor`===cA(r)&&r.endTime>=e&&r.endTime<=t)),o=Q.of(i).filter(r=>n===`labor`===r.station.startsWith(`L/U`)&&r.end>=e&&r.start<=t),s=f6(o),c=p6(o),l=[],u=a.keysToLazySeq().concat(c.keysToLazySeq()).map(e=>e.station).distinct().toSortedArray(e=>e);for(let n of u){let r=[];for(let i=e;i<t;i=RE(i,1)){let e=new s6(i,n),t=a.get(e),o=c.get(e),l=s.get(e)??0;r.push({x:i.toLocaleDateString(),y:(t??0)/60,plannedHours:(o??0)/60,actualOee:l<1440?(t??0)/(1440-l):0,plannedOee:l<1440?(o??0)/(1440-l):0,station:n,day:i})}l.push({station:n,points:r})}return l}var m6=class{constructor(e,t){this.x=e,this.y=t}compare(e){let t=this.x-e.x;return t===0?this.y.localeCompare(e.y):t}hash(){return xO(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function fae(e,t){let n=Q.of(t).toHashMap(e=>[new m6(e.x.getTime(),e.y),e],(e,t)=>t),r=Q.of(t).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),i=Q.of(t).map(e=>e.y).distinct().toSortedArray(e=>e),a=`<table>
|
|
356
|
-
<thead><tr><th>`+e+`</th>`;for(let e of r)a+=`<th>`+new Date(e).toDateString()+`</th>`;a+=`</tr></thead>
|
|
357
|
-
<tbody>
|
|
358
|
-
`;for(let e of i){a+=`<tr><th>`+e+`</th>`;for(let t of r){let r=n.get(new m6(t,e));r===void 0?a+=`<td></td>`:a+=`<td>`+r.label+`</td>`}a+=`</tr>
|
|
359
|
-
`}return a+=`</tbody>
|
|
360
|
-
</table>`,a}function pae(e,t){XA(fae(e,t))}function mae(e){let t=`<table>
|
|
361
|
-
<thead><tr>`;t+=`<th>Day</th><th>Station</th><th>Actual Hours</th><th>Planned Hours</th>`,t+=`</tr></thead>
|
|
362
|
-
<tbody>
|
|
363
|
-
`;for(let n of e)for(let e of n.points)t+=`<tr>`,t+=`<td>`+e.day.toLocaleDateString()+`</td>`,t+=`<td>`+e.station+`</td>`,t+=`<td>`+e.y.toFixed(1)+`</td>`,t+=`<td>`+e.plannedHours.toFixed(1)+`</td>`,t+=`</tr>
|
|
364
|
-
`;return t+=`</tbody>
|
|
365
|
-
</table>`,t}function hae(e){XA(mae(e))}var h6=[[`4477aa`],[`4477aa`,`cc6677`],[`4477aa`,`ddcc77`,`cc6677`],[`4477aa`,`117733`,`ddcc77`,`cc6677`],[`332288`,`88ccee`,`117733`,`ddcc77`,`cc6677`],[`332288`,`88ccee`,`117733`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`cc6677`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`cc6677`,`882255`,`aa4499`],[`332288`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`882255`,`aa4499`],[`332288`,`6699cc`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`882255`,`aa4499`],[`332288`,`6699cc`,`88ccee`,`44aa99`,`117733`,`999933`,`ddcc77`,`661100`,`cc6677`,`aa4466`,`882255`,`aa4499`]],g6=`ff0029.377eb8.66a61e.984ea3.00d2d5.ff7f00.af8d00.7f80cd.b3e900.c42e60.a65628.f781bf.8dd3c7.bebada.fb8072.80b1d3.fdb462.fccde5.bc80bd.ffed6f.c4eaff.cf8c00.1b9e77.d95f02.e7298a.e6ab02.a6761d.0097ff.00d067.000000.252525.525252.737373.969696.bdbdbd.f43600.4ba93b.5779bb.927acc.97ee3f.bf3947.9f5b00.f48758.8caed6.f2b94f.eff26e.e43872.d9b100.9d7a00.698cff.d9d9d9.00d27e.d06800.009f82.c49200.cbe8ff.fecddf.c27eb6.8cd2ce.c4b8d9.f883b0.a49100.f48800.27d0df.a04a9b`.split(`.`);function _6(e,t){return t<=h6.length?`#`+h6[t-1][e]:`#`+g6[e%g6.length]}var v6=_6(0,2),y6=_6(1,2),b6=50,gae=30,x6=10,S6=10;function _ae({width:e,height:t,points:n,setTooltip:r}){let i=t-x6-gae,a=(0,L.useMemo)(()=>oP().domain([0,24]).range([i,0]),[i]),o=(0,L.useMemo)(()=>yM().domain(Q.of(n).map(e=>e.x).distinct()).range([0,e-b6-S6]).padding(.1),[n,e]),s=(0,L.useMemo)(()=>yM().domain([`Actual`,`Planned`]).range([0,o.bandwidth()]).padding(.05),[o]);return(0,U.jsx)(`svg`,{width:e,height:t,children:(0,U.jsxs)(`g`,{transform:`translate(${b6},${x6})`,children:[(0,U.jsx)(qj,{scale:o,top:i}),(0,U.jsx)(Jj,{scale:a,left:0,label:`Hours`}),(0,U.jsx)(Hj,{scale:a,width:e-b6-S6}),n.map((e,t)=>(0,U.jsxs)(`g`,{transform:`translate(${o(e.x)},0)`,children:[(0,U.jsx)(`rect`,{x:s(`Actual`),y:a(e.y),width:s.bandwidth(),height:i-a(e.y),fill:v6,onMouseEnter:t=>{let n=Cj(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)}),(0,U.jsx)(`rect`,{x:s(`Planned`),y:a(e.plannedHours),width:s.bandwidth(),height:i-a(e.plannedHours),fill:y6,onMouseEnter:t=>{let n=Cj(t);r({left:n?.x??0,top:n?.y??0,datum:e})},onMouseLeave:()=>r(null)})]},t))]})})}function vae({station:e}){return(0,U.jsxs)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:v6}}),(0,U.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Actual`]})]}),(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:y6}}),(0,U.jsxs)(`div`,{style:{marginLeft:`1em`},children:[e,` Planned`]})]})]})}function yae({tooltip:e}){return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{children:e.datum.x}),(0,U.jsxs)(`div`,{children:[`Actual Hours: `,e.datum.y?.toFixed(1)]}),(0,U.jsxs)(`div`,{children:[`Planned Hours: `,e.datum?.plannedHours?.toFixed(1)]})]})}function bae({series:e}){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t);return(0,U.jsxs)(Sb,{size:{xs:12,md:6},onMouseLeave:()=>n(null),children:[(0,U.jsx)(Ij,{sx:{height:`calc(100vh / 2 - 200px)`},chart:({width:t,height:r})=>(0,U.jsx)(_ae,{width:t,height:r,points:e.points,setTooltip:n}),tooltipAtom:t,TooltipContent:yae}),(0,U.jsx)(vae,{station:e.station})]})}function xae({points:e}){return(0,U.jsx)(Sb,{container:!0,children:e.map((e,t)=>(0,U.jsx)(bae,{series:e},t))})}var C6=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.x,getForSort:e=>e.day.getTime()},{id:1,numeric:!1,label:`Station`,getDisplay:e=>e.station},{id:2,numeric:!0,label:`Actual Hours`,getDisplay:e=>e.y.toFixed(1),getForSort:e=>e.y},{id:3,numeric:!0,label:`Actual OEE`,getDisplay:e=>(e.actualOee*100).toFixed(0)+`%`,getForSort:e=>e.actualOee},{id:4,numeric:!0,label:`Planned Hours`,getDisplay:e=>e.plannedHours.toFixed(1),getForSort:e=>e.plannedHours},{id:5,numeric:!0,label:`Planned OEE`,getDisplay:e=>(e.plannedOee*100).toFixed(0)+`%`,getForSort:e=>e.plannedOee}];function Sae(e,t){return Q.of(e).flatMap(e=>e.points).toSortedArray(t)}var Cae=(0,L.memo)(function({points:e}){let t=J1(0,C6);return(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:C6,sort:t,showDetailsCol:!1}),(0,U.jsx)(G1,{columns:C6,pageData:Sae(e,t.sortOn)})]})}),wae=P(!0),Tae=P(!0);function w6({ty:e}){qI(e===`labor`?`L/U OEE`:`Machine OEE`);let[t,n]=B(e===`labor`?wae:Tae),r=RE(lD(),-6),i=RE(lD(),1),a=R(SA),o=R(gj),s=(0,L.useMemo)(()=>dae(r,i,e,a.valuesToLazySeq(),o),[r,i,e,a,o]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsxs)(J,{variant:`subtitle1`,children:[e===`labor`?`Load/Unload`:`Machine`,` OEE: comparing flexplan hours between actual and simulated production`]}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:t?`chart`:`table`,onChange:e=>n(e.target.value===`chart`),children:[(0,U.jsx)(GS,{value:`chart`,children:`Chart`},`chart`),(0,U.jsx)(GS,{value:`table`,children:`Table`},`table`)]})}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},onClick:()=>hae(s),size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(`main`,{children:t?(0,U.jsx)(xae,{points:s}):(0,U.jsx)(Cae,{points:s})})]})}var T6=Object.defineProperty,Eae=(e,t)=>{let n={};for(var r in e)T6(n,r,{get:e[r],enumerable:!0});return t||T6(n,Symbol.toStringTag,{value:`Module`}),n},E6=H6(),D6=e=>R6(e,E6),O6=H6();D6.write=e=>R6(e,O6);var k6=H6();D6.onStart=e=>R6(e,k6);var A6=H6();D6.onFrame=e=>R6(e,A6);var j6=H6();D6.onFinish=e=>R6(e,j6);var M6=[];D6.setTimeout=(e,t)=>{let n=D6.now()+t,r=()=>{let e=M6.findIndex(e=>e.cancel==r);~e&&M6.splice(e,1),I6-=+!!~e},i={time:n,handler:e,cancel:r};return M6.splice(N6(n),0,i),I6+=1,z6(),i};var N6=e=>~(~M6.findIndex(t=>t.time>e)||~M6.length);D6.cancel=e=>{k6.delete(e),A6.delete(e),j6.delete(e),E6.delete(e),O6.delete(e)},D6.sync=e=>{L6=!0,D6.batchedUpdates(e),L6=!1},D6.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,D6.onStart(n)}return r.handler=e,r.cancel=()=>{k6.delete(n),t=null},r};var P6=typeof window<`u`?window.requestAnimationFrame:()=>{};D6.use=e=>P6=e,D6.now=typeof performance<`u`?()=>performance.now():Date.now,D6.batchedUpdates=e=>e(),D6.catch=console.error,D6.frameLoop=`always`,D6.onDemand=()=>{},D6.advance=()=>{D6.frameLoop===`demand`?V6():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var F6=-1,I6=0,L6=!1;function R6(e,t){L6?(t.delete(e),e(0)):(t.add(e),z6(),D6.frameLoop===`demand`&&D6.onDemand())}function z6(){F6<0&&(F6=0,D6.frameLoop!==`demand`&&P6(B6))}function Dae(){F6=-1}function B6(){~F6&&(P6(B6),D6.batchedUpdates(V6))}function V6(){let e=F6;F6=D6.now();let t=N6(F6);if(t&&(U6(M6.splice(0,t),e=>e.handler()),I6-=t),!I6){Dae();return}k6.flush(),E6.flush(e?Math.min(64,F6-e):16.667),A6.flush(),O6.flush(),j6.flush(),D6.frameLoop===`demand`&&I6>0&&D6.onDemand()}function H6(){let e=new Set,t=e;return{add(n){I6+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return I6-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,I6-=t.size,U6(t,t=>t(n)&&e.add(t)),I6+=e.size,t=e)}}}function U6(e,t){e.forEach(e=>{try{t(e)}catch(e){D6.catch(e)}})}function W6(){}var Oae=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),G6={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function K6(e,t){if(G6.arr(e)){if(!G6.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var q6=(e,t)=>e.forEach(t);function J6(e,t,n){if(G6.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Y6=e=>G6.und(e)?[]:G6.arr(e)?e:[e];function X6(e,t){if(e.size){let n=Array.from(e);e.clear(),q6(n,t)}}var Z6=(e,...t)=>X6(e,e=>e(...t)),Q6=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),$6=Eae({assign:()=>kae,colors:()=>n8,createStringInterpolator:()=>e8,skipAnimation:()=>r8,to:()=>t8,willAdvance:()=>i8}),e8,t8,n8=null,r8=!1,i8=W6,kae=e=>{e.to&&(t8=e.to),e.now&&(D6.now=e.now),e.colors!==void 0&&(n8=e.colors),e.skipAnimation!=null&&(r8=e.skipAnimation),e.createStringInterpolator&&(e8=e.createStringInterpolator),e.requestAnimationFrame&&D6.use(e.requestAnimationFrame),e.batchedUpdates&&(D6.batchedUpdates=e.batchedUpdates),e.willAdvance&&(i8=e.willAdvance),e.frameLoop&&(D6.frameLoop=e.frameLoop),e.onDemand&&(D6.onDemand=e.onDemand)},a8=new Set,o8=[],s8=[],c8=0,l8={get idle(){return!a8.size&&!o8.length},start(e){c8>e.priority?(a8.add(e),D6.onStart(Aae)):(u8(e),D6(f8))},advance:f8,sort(e){if(c8)D6.onFrame(()=>l8.sort(e));else{let t=o8.indexOf(e);~t&&(o8.splice(t,1),d8(e))}},clear(){o8=[],a8.clear()}};function Aae(){a8.forEach(u8),a8.clear(),D6(f8)}function u8(e){o8.includes(e)||d8(e)}function d8(e){o8.splice(jae(o8,t=>t.priority>e.priority),0,e)}function f8(e){let t=s8;for(let n=0;n<o8.length;n++){let r=o8[n];c8=r.priority,r.idle||(i8(r),r.advance(e),r.idle||t.push(r))}return c8=0,s8=o8,s8.length=0,o8=t,o8.length>0}function jae(e,t){let n=e.findIndex(t);return n<0?e.length:n}var Mae=(e,t,n)=>Math.min(Math.max(n,e),t),Nae={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},p8=`[-+]?\\d*\\.?\\d+`,m8=`[-+]?\\d*\\.?\\d+%`;function h8(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var Pae=RegExp(`rgb`+h8(p8,p8,p8)),Fae=RegExp(`rgba`+h8(p8,p8,p8,p8)),Iae=RegExp(`hsl`+h8(p8,m8,m8)),Lae=RegExp(`hsla`+h8(p8,m8,m8,p8)),Rae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Bae=/^#([0-9a-fA-F]{6})$/,Vae=/^#([0-9a-fA-F]{8})$/;function Hae(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Bae.exec(e))?parseInt(t[1]+`ff`,16)>>>0:n8&&n8[e]!==void 0?n8[e]:(t=Pae.exec(e))?(v8(t[1])<<24|v8(t[2])<<16|v8(t[3])<<8|255)>>>0:(t=Fae.exec(e))?(v8(t[1])<<24|v8(t[2])<<16|v8(t[3])<<8|b8(t[4]))>>>0:(t=Rae.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=Vae.exec(e))?parseInt(t[1],16)>>>0:(t=zae.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Iae.exec(e))?(_8(y8(t[1]),x8(t[2]),x8(t[3]))|255)>>>0:(t=Lae.exec(e))?(_8(y8(t[1]),x8(t[2]),x8(t[3]))|b8(t[4]))>>>0:null}function g8(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _8(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=g8(i,r,e+1/3),o=g8(i,r,e),s=g8(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function v8(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function y8(e){return(parseFloat(e)%360+360)%360/360}function b8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function x8(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function S8(e){let t=Hae(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var C8=(e,t,n)=>{if(G6.fun(e))return e;if(G6.arr(e))return C8({range:e,output:t,extrapolate:n});if(G6.str(e.output[0]))return e8(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=Wae(e,a);return Uae(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Uae(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function Wae(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Gae=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return Mae(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},w8=1.70158,T8=w8*1.525,E8=2.70158,D8=2*Math.PI/3,O8=2*Math.PI/4.5,k8=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Kae={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>E8*e*e*e-w8*e*e,easeOutBack:e=>1+E8*(e-1)**3+w8*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(3.5949095*2*e-T8)/2:((2*e-2)**2*(3.5949095*(e*2-2)+T8)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*D8),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*D8)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*O8))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*O8)/2+1,easeInBounce:e=>1-k8(1-e),easeOutBounce:k8,easeInOutBounce:e=>e<.5?(1-k8(1-2*e))/2:(1+k8(2*e-1))/2,steps:Gae},A8=Symbol.for(`FluidValue.get`),j8=Symbol.for(`FluidValue.observers`),M8=e=>!!(e&&e[A8]),N8=e=>e&&e[A8]?e[A8]():e,P8=e=>e[j8]||null;function qae(e,t){e.eventObserved?e.eventObserved(t):e(t)}function F8(e,t){let n=e[j8];n&&n.forEach(e=>{qae(e,t)})}var I8=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);Jae(this,e)}},Jae=(e,t)=>z8(e,A8,t);function L8(e,t){if(e[A8]){let n=e[j8];n||z8(e,j8,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function R8(e,t){let n=e[j8];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[j8]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var z8=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),B8=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Yae=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,V8=RegExp(`(${B8.source})(%|[a-z]+)`,`i`),Xae=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,H8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,U8=e=>{let[t,n]=Zae(e);if(!t||Q6())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&H8.test(n)?U8(n):n||e},Zae=e=>{let t=H8.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},W8,Qae=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,G8=e=>e.match(B8)??[],K8=e=>{W8||=n8?RegExp(`(${Object.keys(n8).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>N8(e).replace(H8,U8).replace(Yae,S8).replace(W8,S8)),n=t.map(e=>G8(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>C8({...e,output:t})),i=e.range||[0,1],a=t.map(e=>G8(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!V8.test(t[0])&&t.find(e=>V8.test(e))?.replace(B8,``),s=0;return t[0].replace(B8,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(Xae,Qae)}},q8=`react-spring: `,J8=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${q8}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},$ae=J8(console.warn);function eoe(){$ae(`${q8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var toe=J8(console.warn);function noe(){toe(`${q8}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Y8(e){return G6.str(e)&&(e[0]==`#`||/\d/.test(e)||!Q6()&&H8.test(e)||e in(n8||{}))}var X8=Q6()?L.useEffect:L.useLayoutEffect,roe=()=>{let e=(0,L.useRef)(!1);return X8(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Z8(){let e=(0,L.useState)()[1],t=roe();return()=>{t.current&&e(Math.random())}}var Q8=e=>(0,L.useEffect)(e,ioe),ioe=[];function $8(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e}),t.current}var e5=Symbol.for(`Animated:node`),aoe=e=>!!e&&e[e5]===e,t5=e=>e&&e[e5],n5=(e,t)=>Oae(e,e5,t),r5=e=>e&&e[e5]&&e[e5].getPayload(),i5=class{constructor(){n5(this,this)}getPayload(){return this.payload||[]}},a5=class e extends i5{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,G6.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return G6.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,G6.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},o5=class e extends a5{constructor(e){super(0),this._string=null,this._toString=C8({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(G6.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=C8({output:[this.getValue(),e]})),this._value=0,super.reset()}},s5={dependencies:null},c5=class extends i5{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return J6(this.source,(n,r)=>{aoe(n)?t[r]=n.getValue(e):M8(n)?t[r]=N8(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&q6(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return J6(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){s5.dependencies&&M8(e)&&s5.dependencies.add(e);let t=r5(e);t&&q6(t,e=>this.add(e))}},ooe=class e extends c5{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(soe)),!0)}};function soe(e){return(Y8(e)?o5:a5).create(e)}function l5(e){let t=t5(e);return t?t.constructor:G6.arr(e)?ooe:Y8(e)?o5:a5}var u5=(e,t)=>{let n=!G6.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,L.forwardRef)((r,i)=>{let a=(0,L.useRef)(null),o=n&&(0,L.useCallback)(e=>{a.current=uoe(i,e)},[i]),[s,c]=loe(r,t),l=Z8(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new coe(u,c),f=(0,L.useRef)(void 0);X8(()=>(f.current=d,q6(c,e=>L8(e,d)),()=>{f.current&&(q6(f.current.deps,e=>R8(e,f.current)),D6.cancel(f.current.update))})),(0,L.useEffect)(u,[]),Q8(()=>()=>{let e=f.current;q6(e.deps,t=>R8(t,e))});let p=t.getComponentProps(s.getValue());return L.createElement(e,{...p,ref:o})})},coe=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&D6.write(this.update)}};function loe(e,t){let n=new Set;return s5.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new c5(e),s5.dependencies=null,[e,n]}function uoe(e,t){return e&&(G6.fun(e)?e(t):e.current=t),t}var d5=Symbol.for(`AnimatedComponent`),f5=new WeakMap,doe=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new c5(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=p5(e)||`Anonymous`;if(G6.str(e))e=a[e]||(a[e]=u5(e,i));else{let t=e[d5]??f5.get(e);if(!t){t=u5(e,i);try{e[d5]=t}catch{}f5.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return J6(e,(t,n)=>{G6.arr(e)&&(n=p5(t)),a[n]=a(t)}),{animated:a}},p5=e=>G6.str(e)?e:e&&G6.str(e.displayName)?e.displayName:G6.fun(e)&&e.name||null;function m5(e,...t){return G6.fun(e)?e(...t):e}var h5=(e,t)=>e===!0||!!(t&&e&&(G6.fun(e)?e(t):Y6(e).includes(t))),g5=(e,t)=>G6.obj(e)?t&&e[t]:e,_5=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,foe=e=>e,v5=(e,t=foe)=>{let n=poe;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);G6.und(n)||(r[i]=n)}return r},poe=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],moe={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function hoe(e){let t={},n=0;if(J6(e,(e,r)=>{moe[r]||(t[r]=e,n++)}),n)return t}function y5(e){let t=hoe(e);if(t){let n={to:t};return J6(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function b5(e){let t=N8(e);return G6.arr(t)?t.map(b5):Y8(t)?$6.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function goe(e){for(let t in e)return!0;return!1}function x5(e){return G6.fun(e)||G6.arr(e)&&G6.obj(e[0])}function _oe(e,t){e.ref?.delete(e),t?.delete(e)}function voe(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var S5={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:Kae.linear,clamp:!1},yoe=class{constructor(){this.velocity=0,Object.assign(this,S5)}};function boe(e,t,n){n&&(n={...n},C5(n,t),t={...n,...t}),C5(e,t),Object.assign(e,t);for(let t in S5)e[t]??(e[t]=S5[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return G6.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function C5(e,t){if(!G6.und(t.decay))e.duration=void 0;else{let n=!G6.und(t.tension)||!G6.und(t.friction);(n||!G6.und(t.frequency)||!G6.und(t.damping)||!G6.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var w5=[],xoe=class{constructor(){this.changed=!1,this.values=w5,this.toValues=null,this.fromValues=w5,this.config=new yoe,this.immediate=!1}};function T5(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=h5(n.cancel??r?.cancel,t);if(u)p();else{G6.und(n.pause)||(i.paused=h5(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||h5(e,t)),c=m5(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-D6.now()}function f(){c>0&&!$6.skipAnimation?(i.delayed=!0,l=D6.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var E5=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?k5(e.get()):t.every(e=>e.noop)?D5(e.get()):O5(e.get(),t.every(e=>e.finished)),D5=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),O5=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),k5=e=>({value:e,cancelled:!0,finished:!1});function A5(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=v5(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&k5(r)||i!==n.asyncId&&O5(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new M5,o=new N5;return(async()=>{p(a);let s=G6.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,J6(l,(e,t)=>{G6.und(s[t])&&(s[t]=e)}),$6.skipAnimation){if(++m>1024)throw j5(n),o.result=O5(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=G6.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=O5(r.get(),!0,!1)}catch(e){if(e instanceof M5)g=e.result;else if(e instanceof N5)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return G6.fun(o)&&D6.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function j5(e,t){X6(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var M5=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},N5=class extends Error{constructor(){super(`SkipAnimationSignal`)}},P5=e=>e instanceof F5,Soe=1,F5=class extends I8{constructor(...e){super(...e),this.id=Soe++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=t5(this);return e&&e.getValue()}to(...e){return $6.to(this,e)}interpolate(...e){return eoe(),$6.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){F8(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||l8.sort(this),F8(this,{type:`priority`,parent:this,priority:e})}},I5=Symbol.for(`SpringPhase`),Coe=1,woe=2,L5=4,R5=e=>(e[I5]&Coe)>0,z5=e=>(e[I5]&woe)>0,B5=e=>(e[I5]&L5)>0,V5=(e,t)=>t?e[I5]|=3:e[I5]&=-3,H5=(e,t)=>t?e[I5]|=L5:e[I5]&=-5,Toe=class extends F5{constructor(e,t){if(super(),this.animation=new xoe,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!G6.und(e)||!G6.und(t)){let n=G6.obj(e)?{...e}:{...t,from:e};G6.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(z5(this)||this._state.asyncTo)||B5(this)}get goal(){return N8(this.animation.to)}get velocity(){let e=t5(this);return e instanceof a5?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return R5(this)}get isAnimating(){return z5(this)}get isPaused(){return B5(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=r5(r.to);!o&&M8(r.to)&&(i=Y6(N8(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==o5?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=G6.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!G6.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!G6.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=t5(this),c=s.getValue();if(t){let e=N8(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return D6.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(z5(this)){let{to:e,config:t}=this.animation;D6.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return G6.und(e)?(n=this.queue||[],this.queue=[]):n=[G6.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>E5(this,e))}stop(e){let{to:t}=this.animation;return G6.und(t)||this._focus(this.get()),j5(this._state,e&&this._lastCallId),D6.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=G6.obj(n)?n[t]:n,(n==null||x5(n))&&(n=void 0),r=G6.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return R5(this)||(e.reverse&&([n,r]=[r,n]),r=N8(r),G6.und(r)?t5(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,v5(e,(e,t)=>/^on/.test(t)?g5(e,n):e)),q5(this,e,`onProps`),J5(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return T5(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{B5(this)||(H5(this,!0),Z6(a.pauseQueue),J5(this,`onPause`,O5(this,U5(this,this.animation.to)),this))},resume:()=>{B5(this)&&(H5(this,!1),z5(this)&&this._resume(),Z6(a.resumeQueue),J5(this,`onResume`,O5(this,U5(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=W5(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(k5(this));let r=!G6.und(e.to),i=!G6.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(k5(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||G6.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!K6(d,l);f&&(s.from=d),d=N8(d);let p=!K6(u,c);p&&this._focus(u);let m=x5(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&boe(h,m5(t.config,a),t.config===o.config?void 0:m5(o.config,a));let v=t5(this);if(!v||G6.und(u))return n(O5(this,!0));let y=G6.und(t.reset)?i&&!t.default:!G6.und(d)&&h5(t.reset,a),b=y?d:this.get(),x=b5(u),S=G6.num(x)||G6.arr(x)||Y8(x),C=!m&&(!S||h5(o.immediate||t.immediate,a));if(p){let e=l5(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=M8(u),E=!1;if(!T){let e=y||!R5(this)&&f;(p||e)&&(E=K6(b5(b),x),T=!E),(!K6(s.immediate,C)&&!C||!K6(h.decay,g)||!K6(h.velocity,_))&&(T=!0)}if(E&&z5(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||M8(c))&&(s.values=v.getPayload(),s.toValues=M8(u)?null:w==o5?[1]:Y6(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;q6(Doe,e=>q5(this,t,e));let r=O5(this,U5(this,c));Z6(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&D6.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?m5(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(A5(t.to,t,this._state,this)):T?this._start():z5(this)&&!p?this._pendingCalls.add(n):n(D5(b))}_focus(e){let t=this.animation;e!==t.to&&(P8(this)&&this._detach(),t.to=e,P8(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;M8(t)&&(L8(t,this),P5(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;M8(e)&&R8(e,this)}_set(e,t=!0){let n=N8(e);if(!G6.und(n)){let e=t5(this);if(!e||!K6(n,e.getValue())){let r=l5(n);!e||e.constructor!=r?n5(this,r.create(n)):e.setValue(n),e&&D6.batchedUpdates(()=>{this._onChange(n,t)})}}return t5(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,J5(this,`onStart`,O5(this,U5(this,e.to)),this))}_onChange(e,t){let n=O5(e,!1);t||(this._onStart(),m5(this.animation.onChange,n,this)),m5(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;t5(this).reset(N8(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),z5(this)||(V5(this,!0),B5(this)||this._resume())}_resume(){$6.skipAnimation?this.finish():l8.start(this)}_stop(e,t){if(z5(this)){V5(this,!1);let n=this.animation;q6(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),F8(this,{type:`idle`,parent:this});let r=t?k5(this.get()):O5(this.get(),U5(this,e??n.to));Z6(this._pendingCalls,r),n.changed=!1,J5(this,`onRest`,r,this)}}};function U5(e,t){let n=b5(t);return K6(b5(e.get()),n)}function W5(e,t=e.loop,n=e.to){let r=m5(t);if(r){let i=r!==!0&&y5(r),a=(i||e).reverse,o=!i||i.reset;return G5({...e,loop:t,default:!1,pause:void 0,to:!a||x5(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function G5(e){let{to:t,from:n}=e=y5(e),r=new Set;return G6.obj(t)&&K5(t,r),G6.obj(n)&&K5(n,r),e.keys=r.size?Array.from(r):null,e}function Eoe(e){let t=G5(e);return G6.und(t.default)&&(t.default=v5(t)),t}function K5(e,t){J6(e,(e,n)=>e!=null&&t.add(n))}var Doe=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function q5(e,t,n){e.animation[n]=t[n]===_5(t,n)?void 0:g5(t[n],e.key)}function J5(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Ooe=[`onStart`,`onChange`,`onRest`],koe=1,Aoe=class{constructor(e,t){this.id=koe++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];G6.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(G5(e)),this}start(e){let{queue:t}=this;return e?t=Y6(e).map(G5):this.queue=[],this._flush?this._flush(this,t):(t7(this,t),Y5(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;q6(Y6(t),t=>n[t].stop(!!e))}else j5(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(G6.und(e))this.start({pause:!0});else{let t=this.springs;q6(Y6(e),e=>t[e].pause())}return this}resume(e){if(G6.und(e))this.start({pause:!1});else{let t=this.springs;q6(Y6(e),e=>t[e].resume())}return this}each(e){J6(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,X6(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&X6(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,X6(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;D6.onFrame(this._onFrame)}};function Y5(e,t){return Promise.all(t.map(t=>X5(e,t))).then(t=>E5(e,t))}async function X5(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=G6.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=G6.arr(i)||G6.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):q6(Ooe,n=>{let r=t[n];if(G6.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,Z6(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||_5(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(T5(++e._lastAsyncId,{props:t,state:p,actions:{pause:W6,resume:W6,start(t,n){h?(j5(p,e._lastAsyncId),n(k5(e))):(t.onRest=s,n(A5(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=E5(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=W5(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),t7(e,[n]),X5(e,n,!0)}return c&&D6.batchedUpdates(()=>c(g,e,e.item)),g}function Z5(e,t){let n={...e.springs};return t&&q6(Y6(t),e=>{G6.und(e.keys)&&(e=G5(e)),G6.obj(e.to)||(e={...e,to:void 0}),e7(n,e,e=>$5(e))}),Q5(e,n),n}function Q5(e,t){J6(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,L8(t,e))})}function $5(e,t){let n=new Toe;return n.key=e,t&&L8(n,t),n}function e7(e,t,n){t.keys&&q6(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function t7(e,t){q6(t,t=>{e7(e.springs,t,t=>$5(t,e))})}var joe=L.createContext({pause:!1,immediate:!1}),Moe=()=>{let e=[],t=function(t){noe();let r=[];return q6(e,(e,i)=>{if(G6.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return q6(e,e=>e.pause(...arguments)),this},t.resume=function(){return q6(e,e=>e.resume(...arguments)),this},t.set=function(t){q6(e,(e,n)=>{let r=G6.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return q6(e,(e,r)=>{if(G6.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return q6(e,e=>e.stop(...arguments)),this},t.update=function(t){return q6(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return G6.fun(e)?e(n,t):e};return t._getProps=n,t};function n7(e,t,n){let r=G6.fun(t)&&t;r&&!n&&(n=[]);let i=(0,L.useMemo)(()=>r||arguments.length==3?Moe():void 0,[]),a=(0,L.useRef)(0),o=Z8(),s=(0,L.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=Z5(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Y5(e,t):new Promise(r=>{Q5(e,n),s.queue.push(()=>{r(Y5(e,t))}),o()})}}),[]),c=(0,L.useRef)([...s.ctrls]),l=(0,L.useRef)([]),u=(0,L.useRef)([]);u.current=[];let d=$8(e)||0;(0,L.useMemo)(()=>{q6(c.current.slice(e,d),e=>{_oe(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,L.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Aoe(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=Eoe(n))}}let p=c.current.map((e,t)=>Z5(e,l.current[t])),m=(0,L.useContext)(joe),h=m!==$8(m)&&goe(m);X8(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],q6(e,e=>e()));let t=l.current.length>0?l.current:u.current;q6(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(voe(e,r.ref),e.ref?e.queue.push({...r,default:G6.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),Q8(()=>()=>{q6(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function r7(e,t){let n=G6.fun(e),[[r],i]=n7(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var Noe=class extends F5{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=C8(...t);let n=this._get(),r=l5(n);n5(this,r.create(n))}advance(e){let t=this._get();K6(t,this.get())||(t5(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&i7(this._active)&&a7(this)}_get(){let e=G6.arr(this.source)?this.source.map(N8):Y6(N8(this.source));return this.calc(...e)}_start(){this.idle&&!i7(this._active)&&(this.idle=!1,q6(r5(this),e=>{e.done=!1}),$6.skipAnimation?(D6.batchedUpdates(()=>this.advance()),a7(this)):l8.start(this))}_attach(){let e=1;q6(Y6(this.source),t=>{M8(t)&&L8(t,this),P5(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){q6(Y6(this.source),e=>{M8(e)&&R8(e,this)}),this._active.clear(),a7(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=Y6(this.source).reduce((e,t)=>Math.max(e,(P5(t)?t.priority:0)+1),0))}};function Poe(e){return e.idle!==!1}function i7(e){return!e.size||Array.from(e).every(Poe)}function a7(e){e.idle||(e.idle=!0,q6(r5(e),e=>{e.done=!0}),F8(e,{type:`idle`,parent:e}))}$6.assign({createStringInterpolator:K8,to:(e,t)=>new Noe(e,t)}),l8.advance;var o7=/^--/;function Foe(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!o7.test(e)&&!(c7.hasOwnProperty(e)&&c7[e])?t+`px`:(``+t).trim()}var s7={};function Ioe(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:s7[t]||(s7[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=Foe(t,i[t]);o7.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var c7={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},Loe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Roe=[`Webkit`,`Ms`,`Moz`,`O`];c7=Object.keys(c7).reduce((e,t)=>(Roe.forEach(n=>e[Loe(n,t)]=e[t]),e),c7);var zoe=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,Boe=/^(translate)/,Voe=/^(rotate|skew)/,l7=(e,t)=>G6.num(e)&&e!==0?e+t:e,u7=(e,t)=>G6.arr(e)?e.every(e=>u7(e,t)):G6.num(e)?e===t:parseFloat(e)===t,Hoe=class extends c5{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>l7(e,`px`)).join(`,`)})`,u7(e,0)])),J6(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(zoe.test(t)){if(delete r[t],G6.und(e))return;let n=Boe.test(t)?`px`:Voe.test(t)?`deg`:``;i.push(Y6(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${l7(i,n)})`,u7(i,0)]:e=>[`${t}(${e.map(e=>l7(e,n)).join(`,`)})`,u7(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new Uoe(i,a)),super(r)}},Uoe=class extends I8{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return q6(this.inputs,(n,r)=>{let i=N8(n[0]),[a,o]=this.transforms[r](G6.arr(i)?i:n.map(N8));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&q6(this.inputs,e=>q6(e,e=>M8(e)&&L8(e,this)))}observerRemoved(e){e==0&&q6(this.inputs,e=>q6(e,e=>M8(e)&&R8(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),F8(this,e)}},Woe=`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`.split(`.`);$6.assign({batchedUpdates:b_.unstable_batchedUpdates,createStringInterpolator:K8,colors:Nae});var d7=doe(Woe,{applyAnimatedValues:Ioe,createAnimatedStyle:e=>new Hoe(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated;function Goe({points:e,stats:t,partCntPerPoint:n}){return{series:(0,L.useMemo)(()=>Q.of(e).toSortedArray(([e])=>e).map(([t,n],r)=>({name:t,color:_6(r,e.size),points:n??[]})),[e]),median:(0,L.useMemo)(()=>t?{low:(n??1)*(t.medianMinutesForSingleMat-t.MAD_belowMinutes),high:(n??1)*(t.medianMinutesForSingleMat+t.MAD_aboveMinutes)}:null,[t,n])}}var f7=50,Koe=30,p7=10,qoe=2;function Joe({points:e,yZoom:t,default_date_range:n,current_date_zoom:r,containerWidth:i,containerHeight:a}){let o=i===0?400:i,s=a===0?400:a,c=o-f7-qoe,l=s-p7-Koe,u=(0,L.useMemo)(()=>r?dF().domain([r.start,r.end]).range([0,c]):dF().domain([n[0],n[1]]).range([0,c]),[r,n,c]),d=(0,L.useMemo)(()=>{if(e.size===0)return 60;let t=Q.of(e).flatMap(([,e])=>e.map(e=>e.y)).maxBy(e=>e)??1;return Math.ceil(t/5)*5},[e]);return{height:s,width:o,xScale:u,yScale:(0,L.useMemo)(()=>t?oP().domain([t.y_low,t.y_high]).range([l,0]):oP().domain([0,d]).range([l,0]),[l,t,d])}}var Yoe=(0,L.memo)(function({xScale:e,yScale:t}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(qj,{scale:e,top:t.range()[0]}),(0,U.jsx)(Jj,{scale:t,left:e.range()[0],label:`Minutes`}),(0,U.jsx)(Wj,{width:e.range()[1]-e.range()[0],height:t.range()[0]-t.range()[1],xScale:e,yScale:t})]})}),m7=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(),[r,i]=(0,L.useState)(),[a,o]=(0,L.useState)(!1);function s(){o(!1),n(void 0),i(void 0)}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)($m,{size:`small`,onClick:()=>o(!0),children:(0,U.jsx)(OE,{fontSize:`inherit`})}),(0,U.jsxs)(Dy,{open:a,onClose:s,children:[(0,U.jsxs)(Ly,{children:[(0,U.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,U.jsx)(lT,{type:`number`,label:`Y Low`,value:t===void 0?e.yZoom?.y_low??``:isNaN(t)?``:t,onChange:e=>n(parseFloat(e.target.value)),onBlur:()=>{t&&e.setZoom(e=>e?{...e,y_low:t}:{y_low:t,y_high:60})}})}),(0,U.jsx)(`div`,{style:{marginBottom:`1em`},children:(0,U.jsx)(lT,{type:`number`,label:`Y High`,value:r===void 0?e.yZoom?.y_high??``:isNaN(r)?``:r,onChange:e=>i(parseFloat(e.target.value)),onBlur:()=>{r&&e.setZoom(e=>e?{...e,y_high:r}:{y_low:0,y_high:r})}})})]}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:s,children:`Close`})})]})]})}),Xoe=(0,L.memo)(function({median:e,plannedMinutes:t,xScale:n,yScale:r}){let i=r7({to:{x:n.range()[0],y:e?r(e.high):r.range()[0],width:n.range()[1]-n.range()[0],height:e?r(e.low)-r(e.high):0},from:{x:n.range()[0],y:r.range()[0],width:n.range()[1]-n.range()[0],height:0}}),a=r7({to:{y:t?r(t):r.range()[0]},from:{y:r.range()[0]}});return(0,U.jsxs)(`g`,{children:[e?(0,U.jsx)(d7.rect,{x:i.x,y:i.y,width:i.width,height:i.height,fill:Fr[700],opacity:.2,pointerEvents:`none`}):void 0,t?(0,U.jsx)(d7.line,{stroke:`black`,x1:n.range()[0],x2:n.range()[1],y1:a.y,y2:a.y}):void 0]})}),Zoe=(0,L.memo)(function({seriesName:e,points:t,color:n,xScale:r,yScale:i,showTooltip:a}){let o=(0,L.useCallback)(n=>{let r=Cj(n);if(r===null)return;let i=n.currentTarget.dataset.idx;i!==void 0&&a({left:r.x,top:r.y,pt:t[parseInt(i)],seriesName:e})},[a,t,e]);return(0,U.jsx)(`g`,{children:n7(t.length,t.map(e=>({from:{x:r(e.x),y:i.range()[0]+15},to:{x:r(e.x),y:i(e.y)}}))).map((e,t)=>(0,U.jsx)(d7.circle,{className:`bms-cycle-chart-pt`,fill:n,r:5,cx:e.x,cy:e.y,"data-idx":t,onClick:o},t))})}),Qoe=(0,L.memo)(function({series:e,xScale:t,yScale:n,showTooltip:r,disabledSeries:i}){return(0,U.jsx)(`g`,{children:e.filter(e=>!i.has(e.name)).map(e=>(0,U.jsx)(Zoe,{points:e.points,seriesName:e.name,color:e.color,xScale:t,yScale:n,showTooltip:r},e.name))})}),$oe=(0,L.memo)(function({series:e,disabledSeries:t,adjustDisabled:n}){return(0,U.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:e.map(e=>(0,U.jsx)(hT,{selected:!t.has(e.name),value:e,onChange:()=>n(t=>t.has(e.name)?t.delete(e.name):t.add(e.name)),children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:e.color}}),(0,U.jsx)(`div`,{style:{marginLeft:`1em`},children:e.name})]})},e.name))})}),ese=K(`g`,{shouldForwardProp:e=>e.toString()[0]!==`$`})(({$noPtrEvents:e})=>e?{"& .bms-cycle-chart-pt":{pointerevents:`none`}}:void 0),tse=(0,L.memo)(function({setYZoom:e,setXZoom:t,setTooltip:n,xScale:r,yScale:i,highlightStart:a,setHighlightStart:o}){let[s,c]=(0,L.useState)(null),l=(0,L.useCallback)(e=>{let t=Cj(e);t!==null&&(c(null),o({x:t.x-f7,y:t.y-p7,nowMS:Date.now()}),n(null))},[o,n]),u=(0,L.useCallback)(e=>{let t=Cj(e);t!==null&&c({x:t.x-f7,y:t.y-p7})},[c]),d=(0,L.useCallback)(n=>{if(a!==null){if(Date.now()-a.nowMS>500){let o=Cj(n);if(o!==null){let n=r.invert(a.x),s=r.invert(o.x-f7),c=i.invert(a.y),l=i.invert(o.y-p7);e(c<l?{y_low:c,y_high:l}:{y_low:l,y_high:c}),t?.({zoom:n.getTime()<s.getTime()?{start:n,end:s}:{start:s,end:n}})}}o(null),c(null)}},[a,o,c,t,e,r,i]);return(0,U.jsxs)(`g`,{children:[(0,U.jsx)(`rect`,{x:0,y:0,width:r.range()[1],height:i.range()[0],fill:`transparent`,onPointerDown:l,onPointerMove:a===null?void 0:u,onPointerUp:a===null?void 0:d}),a!==null&&s!==null?(0,U.jsx)(`rect`,{x:Math.min(a.x,s.x),y:Math.min(a.y,s.y),width:Math.abs(a.x-s.x),height:Math.abs(a.y-s.y),color:`red`,pointerEvents:`none`,opacity:.3}):void 0]})}),nse=(0,L.memo)(function({set_date_zoom_range:e,current_date_zoom:t,yZoom:n,setYZoom:r,median:i}){return(0,U.jsxs)(`div`,{children:[e&&(t||n)?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{size:`small`,onClick:()=>{e?.({zoom:void 0}),r(null)},children:`Reset Zoom`}),(0,U.jsx)(m7,{yZoom:n,setZoom:r})]}):void 0,e&&!t&&!n?(0,U.jsxs)(`span`,{style:{color:`#6b6b76`},children:[`Zoom via mouse drag`,i?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:` or `}),(0,U.jsx)(X,{size:`small`,onClick:()=>{let e=i.high,t=i.low,n=.2*(e-t);r({y_low:t-n,y_high:e+n})},children:`Zoom To Inliers`})]}):void 0,(0,U.jsx)(m7,{yZoom:n,setZoom:r})]}):void 0]})}),rse=(0,L.memo)(function({tooltip:e,extraTooltip:t,seriesLabel:n}){return e===null?null:(0,U.jsxs)(nw,{direction:`column`,spacing:.6,children:[(0,U.jsxs)(`div`,{children:[`Time:`,` `,e.pt.x.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})]}),(0,U.jsxs)(`div`,{children:[n,`: `,e.seriesName]}),(0,U.jsxs)(`div`,{children:[`Cycle Time: `,e.pt.y.toFixed(1),` minutes`]}),t?t(e.pt).map((e,t)=>(0,U.jsxs)(`div`,{children:[e.title,`:`,` `,e.link?(0,U.jsx)(`a`,{style:{color:`white`,pointerEvents:`auto`,cursor:`pointer`,borderBottom:`1px solid`},onClick:e.link,children:e.value}):(0,U.jsx)(`span`,{children:`e.value`})]},t)):void 0]})});function ise(e){let{width:t,height:n,xScale:r,yScale:i}=Joe({points:e.points,yZoom:e.yZoom,setYZoom:e.setYZoom,default_date_range:e.default_date_range,current_date_zoom:e.current_date_zoom,set_date_zoom_range:e.set_date_zoom_range,containerWidth:e.containerWidth,containerHeight:e.containerHeight});return(0,U.jsx)(`svg`,{width:t,height:n,children:(0,U.jsxs)(`g`,{transform:`translate(${f7}, ${p7})`,children:[(0,U.jsx)(Yoe,{xScale:r,yScale:i}),(0,U.jsx)(Xoe,{median:e.median,plannedMinutes:e.plannedTimeMinutes,xScale:r,yScale:i}),(0,U.jsx)(tse,{setYZoom:e.setYZoom,setXZoom:e.set_date_zoom_range,xScale:r,setTooltip:e.showTooltip,yScale:i,highlightStart:e.highlightStart,setHighlightStart:e.setHighlightStart}),(0,U.jsx)(ese,{$noPtrEvents:e.highlightStart!==null,children:(0,U.jsx)(Qoe,{series:e.series,disabledSeries:e.disabledSeries,xScale:r,yScale:i,showTooltip:e.showTooltip})})]})})}var h7=(0,L.memo)(function(e){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t),[r,i]=(0,L.useState)(ZO.empty()),[a,o]=(0,L.useState)(null),{series:s,median:c}=Goe({points:e.points,stats:e.stats,partCntPerPoint:e.partCntPerPoint});return(0,U.jsxs)(`div`,{onPointerLeave:(0,L.useCallback)(()=>{n(null),o(null)},[n,o]),children:[(0,U.jsx)(Ij,{sx:{height:{xs:`calc(100vh - 320px)`,md:`calc(100vh - 280px)`,xl:`calc(100vh - 220px)`}},tooltipAtom:t,TooltipContent:({tooltip:t})=>(0,U.jsx)(rse,{tooltip:t,seriesLabel:e.series_label,extraTooltip:e.extra_tooltip}),chart:({width:t,height:i})=>(0,U.jsx)(ise,{...e,containerHeight:i,containerWidth:t,series:s,median:c,yZoom:e.yZoom,setYZoom:e.setYZoom,highlightStart:a,setHighlightStart:o,showTooltip:n,disabledSeries:r})}),(0,U.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`},children:[(0,U.jsx)(`div`,{style:{color:`#6b6b76`},children:`Click on a point for details`}),(0,U.jsx)(`div`,{style:{flexGrow:1}}),(0,U.jsx)(nse,{set_date_zoom_range:e.set_date_zoom_range,current_date_zoom:e.current_date_zoom,yZoom:e.yZoom,setYZoom:e.setYZoom,median:c})]}),(0,U.jsx)($oe,{series:s,disabledSeries:r,adjustDisabled:i})]})});function ase(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}var ose=P(!0),sse=P(!0),cse=P(void 0),lse=P(void 0),use=P(void 0),dse=P(`Any`),fse=P(void 0),pse=P(void 0),mse=P({}),hse=P({}),gse=P(null),_se=P(null);function g7({ty:e}){qI(e===`labor`?`L/U Cycles`:`Machine Cycles`);let t=z(SI),n=(0,L.useCallback)(function(e){if(!ase(e))return[];let n=[];if(e.operations)for(let r of e.operations)n.push({title:(r.mat.serial?r.mat.serial:`Material`)+` `+r.operation,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:r.mat})});else if(`material`in e&&Array.isArray(e.material))for(let r of e.material)n.push({title:r.serial?r.serial:`Material`,value:`Open Card`,link:()=>t({type:`LogMat`,logMat:r})});return n},[t]),[r,i]=B(e===`labor`?ose:sse),[a,o]=B(e===`labor`?mse:hse),[s,c]=B(e===`labor`?cse:lse),[l,u]=B(use),[d,f]=B(dse),[p,m]=B(e===`labor`?fse:pse),[h,g]=B(e===`labor`?gse:_se),_=R(vr),v=_A(_.basketName),y=R(CA),b=ZA(d,e!==`labor`||y),x=R(Yk),S=[RE(lD(),-4),RE(lD(),1)],C=R(SA),w=R(dL),T=(0,L.useMemo)(()=>{let t=lD();return l?nj(C.valuesToLazySeq(),{zoom:{start:RE(t,-4),end:RE(t,1)},partAndProc:s,pallet:p,operation:l,carrierKind:b}):e===`labor`&&r?rj(C.valuesToLazySeq(),{zoom:{start:RE(t,-4),end:RE(t,1)},partAndProc:s,pallet:p,carrierKind:b}):nj(C.valuesToLazySeq(),{zoom:{start:RE(t,-4),end:RE(t,1)},partAndProc:s,pallet:p,station:e===`labor`?ej:$A,carrierKind:b})},[C,e,s,p,l,r,b]),E=s?l??(T.allMachineOperations.length===1?T.allMachineOperations[0]:void 0):void 0,D=(0,L.useMemo)(()=>{if(E&&e===`machine`)return ij(T,!1)},[T,e,E]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsxs)(J,{variant:`subtitle1`,children:[`Recent `,e===`labor`?`Load/Unload Occupancy`:`Machine Cycles`]}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{name:`Station-Cycles-chart-or-table-select`,autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,U.jsx)(GS,{value:`graph`,children:`Graph`},`graph`),(0,U.jsx)(GS,{value:`table`,children:`Table`},`table`)]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:s?T.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:T.allPartAndProcNames[e.target.value]),u(void 0)},children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Part`})},0),T.allPartAndProcNames.map((e,t)=>(0,U.jsx)(GS,{value:t,children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:20}),(0,U.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),e===`machine`?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsx)(zC,{name:`Station-Cycles-cycle-chart-station-select`,autoWidth:!0,displayEmpty:!0,value:E?T.allMachineOperations.findIndex(e=>E.compare(e)===0):-1,style:{marginLeft:`1em`},onChange:e=>u(T.allMachineOperations[e.target.value]),children:[...T.allMachineOperations.length===1?[]:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Operation`})},-1)],...T.allMachineOperations.map((e,t)=>(0,U.jsxs)(GS,{value:t,children:[e.statGroup,` `,e.operation]},t))]})}):void 0,e===`labor`&&y?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:b,style:{marginLeft:`1em`},onChange:e=>{let t=e.target.value;f(t),t===`Basket`&&m(void 0)},children:[(0,U.jsx)(GS,{value:`Any`,children:(0,U.jsx)(`em`,{children:`Any Carrier`})}),(0,U.jsx)(GS,{value:`Pallet`,children:`Pallet`}),(0,U.jsx)(GS,{value:`Basket`,children:v})]})}):void 0,e!==`labor`||b!==`Basket`?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{name:`Station-Cycles-cycle-chart-station-pallet`,autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,U.jsx)(GS,{value:``,children:(0,U.jsx)(`em`,{children:`Any Pallet`})},0),T.allPalletNames.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}):void 0,(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>cj(T,w.matsById,void 0,e===`labor`,_.loadStationNames,v),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(`main`,{children:r?(0,U.jsx)(h7,{points:T.data,series_label:T.seriesLabel,default_date_range:S,extra_tooltip:n,current_date_zoom:a.zoom,set_date_zoom_range:o,yZoom:h,setYZoom:g,stats:E&&e===`machine`?x.get(E):void 0,partCntPerPoint:E?Q.of(T.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:D}):(0,U.jsx)(a6,{points:T.data,matsById:w.matsById,period:{type:`Last30`},current_date_zoom:void 0,set_date_zoom_range:void 0,showWorkorderAndInspect:!0,hideMedian:e===`labor`})})]})}var vse=Q.ofRange(0,12,1).map(e=>new Date(2019,e,1)).chunk(3).toRArray(),yse=(0,L.memo)(function(e){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(void 0);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Mb,{type:`text`,value:(r||e.curMonth).toLocaleDateString(void 0,{month:`long`,year:`numeric`}),readOnly:!0,endAdornment:(0,U.jsx)(zb,{position:`end`,children:(0,U.jsx)($m,{"aria-label":`Open month select`,"data-testid":`open-month-select`,onClick:()=>{i(sD(e.curMonth)),n(!0)},size:`large`,children:(0,U.jsx)(ET,{})})})}),(0,U.jsx)(Dy,{open:t,onClose:()=>{n(!1),i(void 0)},children:(0,U.jsxs)(Ly,{children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)($m,{"data-testid":`select-month-dialog-previous-year`,onClick:()=>i(ZE(r||e.curMonth,-1)),size:`large`,children:(0,U.jsx)(rE,{})}),(0,U.jsx)(`div`,{style:{flexGrow:1},children:(0,U.jsx)(J,{variant:`h5`,align:`center`,"data-testid":`select-month-dialog-current-year`,children:(r||e.curMonth).toLocaleDateString(void 0,{year:`numeric`})})}),(0,U.jsx)($m,{onClick:()=>i(ZE(r||e.curMonth,1)),size:`large`,children:(0,U.jsx)(iE,{})})]}),(0,U.jsx)(`div`,{"data-testid":`select-month-dialog-choose-month`,children:vse.map((t,a)=>(0,U.jsx)(`div`,{style:a>0?{marginTop:`1.2em`}:void 0,children:t.map((t,a)=>(0,U.jsx)(X,{color:`primary`,style:a>0?{marginLeft:`1.2em`}:void 0,onClick:()=>{e.onSelectMonth(new Date((r||e.curMonth).getFullYear(),t.getMonth(),1)),i(void 0),n(!1)},children:t.toLocaleDateString(void 0,{month:`short`})},a))},a))})]})})]})}),_7=(0,L.memo)(function(){let e=R(GR),[t,n]=B(WR),r=$R(),i=QR();return(0,U.jsxs)(nw,{component:`nav`,direction:`row`,spacing:3,sx:{paddingLeft:`24px`,paddingRight:`24px`,alignItems:`center`},children:[(0,U.jsx)(lb,{control:(0,U.jsx)(bC,{checked:e.type===`Last30`,color:`secondary`,onChange:(e,t)=>t?i():null}),label:`Last 30 days`}),(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(lb,{control:(0,U.jsx)(bC,{checked:e.type===`SpecificMonth`,color:`secondary`,onChange:(e,r)=>r?n(t):null}),label:`Select Month`}),(0,U.jsx)(yse,{curMonth:t,onSelectMonth:t=>{e.type===`SpecificMonth`?n(t):r(t)}})]})]})});function v7(e){return function(){return e}}var y7=Math.PI;y7/2,2*y7;var b7=Math.PI,x7=2*b7,S7=1e-6,bse=x7-S7;function C7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function xse(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return C7;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var w7=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?C7:xse(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>S7)if(!(Math.abs(u*s-c*l)>S7)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((b7-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>S7&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>S7||Math.abs(this._y1-l)>S7)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%x7+x7),d>bse?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>S7&&this._append`A${n},${n},0,${+(d>=b7)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Sse(){return new w7}Sse.prototype=w7.prototype;function Cse(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new w7(t)}Array.prototype.slice;function wse(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function T7(e){this._context=e}T7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Tse(e){return new T7(e)}function Ese(e){return e[0]}function Dse(e){return e[1]}function Ose(e,t){var n=v7(!0),r=null,i=Tse,a=null,o=Cse(s);e=typeof e==`function`?e:e===void 0?Ese:v7(e),t=typeof t==`function`?t:t===void 0?Dse:v7(t);function s(s){var c,l=(s=wse(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:v7(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:v7(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:v7(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function E7(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function D7(e,t){this._context=e,this._k=(1-t)/6}D7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:E7(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:E7(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new D7(e,t)}return n.tension=function(t){return e(+t)},n})(0);function kse(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function O7(e,t){this._context=e,this._alpha=t}O7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:kse(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ase=(function e(t){function n(e){return t?new O7(e,t):new D7(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function jse(e){switch(e.type){case`Queue`:return e.queue;case`Rotary`:return`Rotary `+e.machineGroup+` #`+e.machineNum.toString();case`StockerWaitForMC`:return`Stocker[Waiting For Machining]`;case`StockerWaitForUnload`:return`Stocker[Waiting For Unload]`}}var k7=150;function Mse(e,t,n){let r=Math.max(t.x.getTime()-e,n.endTime.getTime()-n.elapsedSeconds*1e3),i=Math.min(t.x.getTime()+e,n.endTime.getTime());t.y+=(i-r)/(2*e)*n.numMaterial}function Nse(e,t,n,r){let i=new Date(e.getTime()+n),a=new Date(t.getTime()-n),o=(a.getTime()-i.getTime())/(k7-1),s=[];for(let e=0;e<k7-1;e++)s.push({x:new Date(i.getTime()+e*o),y:0});s.push({x:a,y:0});for(let e of r){let t=Math.max(0,Math.ceil((e.endTime.getTime()-e.elapsedSeconds*1e3-n-i.getTime())/o)),r=Math.min(k7-1,Math.floor((e.endTime.getTime()+n-i.getTime())/o));for(let i=t;i<=r;i++)Mse(n,s[i],e)}return s}function Pse(e,t,n,r,i){let a=n*60*60*1e3;return Q.of(i).filter(e=>e.buffer.type!==`Queue`||!r.has(e.buffer.queue)).groupBy(e=>jse(e.buffer)).map(([n,r])=>({label:n,points:Nse(e,t,a,r)})).toSortedArray(e=>e.label)}function A7(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 Fse(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?A7(Object(n),!0).forEach(function(t){Ise(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A7(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j7(e){"@babel/helpers - typeof";return j7=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j7(e)}function Ise(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M7(){return M7=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},M7.apply(this,arguments)}function Lse(e,t){if(e){if(typeof e==`string`)return N7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N7(e,t)}}function N7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P7(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=Lse(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
366
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function Rse(e,t){var n=[],r=[];function i(e,t){if(e.length===1)n.push(e[0]),r.push(e[0]);else{for(var a=Array(e.length-1),o=0;o<a.length;o++)o===0&&n.push(e[0]),o===a.length-1&&r.push(e[o+1]),a[o]=[(1-t)*e[o][0]+t*e[o+1][0],(1-t)*e[o][1]+t*e[o+1][1]];i(a,t)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function zse(e){var t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type=`C`:e.length===3?t.type=`Q`:t.type=`L`,t}function Bse(e,t){t||=2;for(var n=[],r=e,i=1/t,a=0;a<t-1;a++){var o=i/(1-i*a),s=Rse(r,o);n.push(s.left),r=s.right}return n.push(r),n}function Vse(e,t,n){var r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),Bse(r,n).map(zse)}var Hse=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,F7={M:[`x`,`y`],L:[`x`,`y`],H:[`x`],V:[`y`],C:[`x1`,`y1`,`x2`,`y2`,`x`,`y`],S:[`x2`,`y2`,`x`,`y`],Q:[`x1`,`y1`,`x`,`y`],T:[`x`,`y`],A:[`rx`,`ry`,`xAxisRotation`,`largeArcFlag`,`sweepFlag`,`x`,`y`],Z:[]};Object.keys(F7).forEach(function(e){F7[e.toLowerCase()]=F7[e]});function I7(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function Use(e){return`${e.type}${F7[e.type].map(function(t){return e[t]}).join(`,`)}`}function Wse(e,t){var n={x1:`x`,y1:`y`,x2:`x`,y2:`y`},r=[`xAxisRotation`,`largeArcFlag`,`sweepFlag`];if(e.type!==t.type&&t.type.toUpperCase()!==`M`){var i={};Object.keys(t).forEach(function(a){var o=t[a],s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function Gse(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(Vse(e,t,n));else{var i=M7({},e);i.type===`M`&&(i.type=`L`),r=r.concat(I7(n-1).map(function(){return i})),r.push(t)}return r}function L7(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=I7(i).reduce(function(t,r,i){var o=Math.floor(a*i);if(n&&o<e.length-1&&n(e[o],e[o+1])){var s=a*i%1<.5;t[o]&&(s?o>0?--o:o<e.length-1&&(o+=1):o<e.length-1?o+=1:o>0&&--o)}return t[o]=(t[o]||0)+1,t},[]).reduce(function(t,n,r){if(r===e.length-1){var i=I7(n,M7({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(Gse(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function R7(e){for(var t=(e||``).match(Hse)||[],n=[],r,i,a=0;a<t.length;++a)if(r=F7[t[a]],r){i={type:t[a]};for(var o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function Kse(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=j7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return[]};var c=(r.length===0||r[r.length-1].type===`Z`)&&(i.length===0||i[i.length-1].type===`Z`);r.length>0&&r[r.length-1].type===`Z`&&r.pop(),i.length>0&&i[i.length-1].type===`Z`&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=L7(r,i,o):i.length<r.length&&(i=L7(i,r,o))),r=r.map(function(e,t){return Wse(e,i[t])});var l=r.map(function(e){return Fse({},e)});return c&&(l.push({type:`Z`}),r.push({type:`Z`})),function(e){if(e===1&&s)return t??[];if(e===0)return r;for(var n=0;n<l.length;++n){var a=r[n],o=i[n],c=l[n],u=P7(F7[c.type]),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;c[f]=(1-e)*a[f]+e*o[f],(f===`largeArcFlag`||f===`sweepFlag`)&&(c[f]=Math.round(c[f]))}}catch(e){u.e(e)}finally{u.f()}}return l}}function qse(e,t,n){var r=R7(e),i=R7(t),a=j7(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=Kse(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=P7(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=Use(o)}}catch(e){i.e(e)}finally{i.f()}return r}}var Jse=(0,L.memo)(function({series:e,xScale:t,yScale:n,color:r}){let i=Ose().curve(Ase).x(e=>t(e.x)).y(e=>n(e.y))(e.points)??``,a=(0,L.useRef)(i),o=(0,L.useCallback)(Yf(e=>{a.current=e},50),[]),s=qse(a.current,i);o(i);let{t:c}=r7({from:{t:0},to:{t:1},reset:!0,delay:0});return(0,U.jsx)(d7.path,{d:c.to(s),stroke:r,strokeWidth:2,strokeLinecap:`round`,fill:`transparent`})}),z7=60,Yse=50,B7=20,V7=20;function Xse({width:e,height:t,series:n,disabled:r}){let[i,a]=(0,L.useMemo)(()=>{let e=null,t=null;for(let r of n)for(let n of r.points)(e===null||n.x<e)&&(e=n.x),(t===null||n.x>t)&&(t=n.x);return[e??new Date,t??new Date]},[n]),o=(0,L.useMemo)(()=>dF().range([0,e-z7-V7]).domain([i,a]),[e,i,a]),s=t-Yse-B7,c=(0,L.useMemo)(()=>oP().domain([0,Q.of(n).flatMap(e=>e.points).map(e=>e.y).maxBy(e=>e)??1]).range([s,0]),[n,s]);return(0,U.jsx)(`svg`,{width:e,height:t,children:(0,U.jsxs)(`g`,{transform:`translate(${z7},${B7})`,children:[(0,U.jsx)(qj,{scale:o,top:s}),(0,U.jsx)(Jj,{scale:c,left:0,label:`Buffer Size`}),(0,U.jsx)(Wj,{xScale:o,yScale:c,width:e-z7-V7,height:s}),n.map((e,t)=>r.has(e.label)?void 0:(0,U.jsx)(Jse,{series:e,xScale:o,yScale:c,color:_6(t,n.length)},e.label))]})})}var Zse=(0,L.memo)(function(e){let t=R(GR),n=t.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[t.month,zE(t.month,1)],r=R(t.type===`Last30`?Hie:Uie),i=R(SL),[a,o]=(0,L.useState)(ZO.empty()),s=n[0],c=n[1],l=(0,L.useMemo)(()=>Pse(s,c,e.movingAverageDistanceInHours,i,r.valuesToLazySeq()),[s,c,r,e.movingAverageDistanceInHours,i]),{width:u,height:d,ref:f}=Nj({refreshMode:`debounce`,refreshRate:100});return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(Y,{ref:f,sx:{height:{xs:`calc(100vh - 350px)`,md:`calc(100vh - 285px)`,xl:`calc(100vh - 220px)`},overflow:`hidden`},children:u&&d&&u>0&&d>0&&(0,U.jsx)(Xse,{width:u,height:d,series:l,disabled:a})}),(0,U.jsx)(`div`,{style:{marginTop:`1em`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`},children:l.map((e,t)=>(0,U.jsx)(hT,{selected:!a.has(e.label),value:e.label,onChange:()=>o(t=>t.has(e.label)?t.delete(e.label):t.add(e.label)),children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{style:{width:`14px`,height:`14px`,backgroundColor:_6(t,l.length)}}),(0,U.jsx)(`div`,{style:{marginLeft:`1em`},children:e.label})]})},e.label))})]})}),Qse=Tte;function $se(){qI(`Buffer Occupancy`);let[e,t]=(0,L.useState)(12);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(J,{variant:`subtitle1`,children:`Average material occupancy of rotary tables and stocker positions over time`}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(`span`,{style:{fontSize:`small`,marginRight:`1em`},children:`Moving Average Window: `}),(0,U.jsx)(Qse,{style:{width:`10em`},min:1,max:36,steps:.2,valueLabelDisplay:`off`,value:e,onChange:(e,n)=>t(n)})]}),(0,U.jsx)(`main`,{children:(0,U.jsx)(Zse,{movingAverageDistanceInHours:e})})]})}function ece(e,t){return e.some(e=>e===t)}var tce=20,H7=10,nce=2,U7=`#E8F5E9`,W7=`#1B5E20`;function rce({yType:e,dateRange:t,containerWidth:n,points:r}){let i=n==null||n===0?400:n,a=(0,L.useMemo)(()=>Q.of(r).map(e=>e.y).distinct().map(Tj).maxBy(e=>e??0)??20,[r])+5,o=i-a-nce,s=t[0],c=t[1],l=(0,L.useMemo)(()=>{let e=[];if(c<s)e.push(s);else{let t=s;for(;t<c;)e.push(t),t=RE(t,1)}return yM().domain(e).range([0,o]).align(0).padding(.05)},[s,c,o]),{yScale:u,height:d,colorScale:f}=(0,L.useMemo)(()=>{let t=new Set;for(let e of r)t.add(e.y);let n=60*t.size,i=n+H7+tce,a=yM().domain(Q.of(t).toSortedArray(e=>e)).range([0,n]).align(0).padding(.05),o;if(e===`Station`)o=oP().domain([0,1]).range([U7,W7]);else{let e=Q.of(r).maxBy(e=>e.color)?.color??1;o=oP().domain([0,e]).range([U7,W7])}return{yScale:a,height:i,colorScale:o}},[r,e]);return{height:d,width:i,xScale:l,yScale:u,colorScale:f,marginLeft:a}}var ice=(0,L.memo)(function({xScale:e,yScale:t}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(qj,{scale:e,top:t.range()[1],tickFormat:e=>e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}),(0,U.jsx)(Jj,{scale:t,left:e.range()[0]})]})}),ace=(0,L.memo)(function({points:e,xScale:t,yScale:n,colorScale:r,setTooltip:i}){let a=(0,L.useRef)(null),o=(0,L.useCallback)(t=>{let n=Cj(t);if(n===null)return;a.current!==null&&(clearTimeout(a.current),a.current=null);let r=t.currentTarget.dataset.idx;if(r===void 0)return;let o=e[parseInt(r)];i({left:n.x,top:n.y,data:o})},[e,i]),s=(0,L.useCallback)(()=>{a.current===null&&(a.current=window.setTimeout(()=>{a.current=null,i(null)},100))},[i]);return(0,U.jsx)(`g`,{children:e.map((e,i)=>(0,U.jsx)(`rect`,{"data-idx":i,x:t(e.x)??0,width:t.bandwidth(),y:n(e.y)??0,height:n.bandwidth(),rx:6,fill:r(e.color),onPointerEnter:o,onPointerLeave:s},i))})}),oce=(0,L.memo)(function({yType:e,seriesLabel:t,tooltip:n}){return n===null?null:(0,U.jsxs)(nw,{direction:`column`,spacing:.6,children:[(0,U.jsxs)(`div`,{children:[e,`: `,n.data.y]}),(0,U.jsxs)(`div`,{children:[`Day: `,n.data.x.toDateString()]}),(0,U.jsxs)(`div`,{children:[t,`: `,n.data.label]})]})});function sce(e){let{width:t,height:n,xScale:r,yScale:i,colorScale:a,marginLeft:o}=rce({yType:e.y_title,points:e.points,dateRange:e.dateRange,containerWidth:e.parentWidth});return(0,U.jsx)(`svg`,{width:t,height:n,children:(0,U.jsxs)(`g`,{transform:`translate(${o}, ${H7})`,children:[(0,U.jsx)(ace,{points:e.points,xScale:r,yScale:i,colorScale:a,setTooltip:e.setTooltip}),(0,U.jsx)(ice,{xScale:r,yScale:i,colorScale:a})]})})}function cce(e){let t=e.setSelected;return(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(J,{variant:`subtitle1`,children:e.label}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),t?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsx)(zC,{autoWidth:!0,displayEmpty:!0,value:e.cur_selected,onChange:n=>{ece(e.options,n.target.value)&&t(n.target.value)},children:e.options.map((e,t)=>(0,U.jsx)(GS,{value:e,children:e},t))})}):void 0,(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:e.onExport,style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})})]})}function G7(e){let t=(0,L.useMemo)(()=>P(null),[]),n=z(t),r=(0,L.useCallback)(()=>{n(null)},[n]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsx)(cce,{label:e.label,setSelected:e.setSelected,cur_selected:e.cur_selected,onExport:e.onExport,options:e.options}),(0,U.jsx)(`main`,{onPointerLeave:r,children:(0,U.jsx)(Ij,{sx:{width:`100%`},tooltipAtom:t,autoHeight:!0,chart:({width:t})=>(0,U.jsx)(sce,{points:e.points,y_title:e.y_title,dateRange:e.dateRange,parentWidth:t,setTooltip:n}),TooltipContent:({tooltip:t})=>(0,U.jsx)(oce,{yType:e.y_title,seriesLabel:e.label_title,tooltip:t})})})]})}var K7=class e{constructor(e,t){this.day=e,this.part=t}compare(e){let t=this.day.getTime()-e.day.getTime();return t===0?this.part.localeCompare(e.part):t}hash(){return xO(this.day,this.part)}toString(){return`{day: ${this.day.toISOString()}}, part: ${this.part}}`}adjustDay(t){return new e(t(this.day),this.part)}},q7=class{constructor(e,t){this.matId=e,this.proc=t}compare(e){let t=this.matId-e.matId;return t===0?this.proc-e.proc:t}hash(){return xO(this.matId,this.proc)}toString(){return this.matId.toString()+`-`+this.proc.toString()}};function lce(e,t,n,r){let i=Q.of(e).filter(e=>e.endTime>=n&&e.endTime<=r&&lA(e)&&e.activeMinutes>0&&e.material.length>0).flatMap(e=>e.material.map(t=>({matId:t.id,proc:t.proc,active:e.activeMinutes/e.material.length}))).toHashMap(e=>[new q7(e.matId,e.proc),e.active],(e,t)=>e+t);return Q.of(t).flatMap(([e,t])=>Q.ofObject(t.unloaded_processes??{}).filter(([e,t])=>t>=n&&t<=r).map(([n,r])=>({day:qE(r),part:t.partName+`-`+n,value:{count:1,activeMachineMins:i.get(new q7(e,parseInt(n)))??0}}))).toHashMap(e=>[new K7(e.day,e.part),e.value],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}function uce(e){return Q.of(e).toHashMap(e=>[new K7(qE(e.completeTime),e.partName+`-`+e.process.toString()),{count:e.quantity,activeMachineMins:e.expectedMachineMins}],(e,t)=>({count:e.count+t.count,activeMachineMins:e.activeMachineMins+t.activeMachineMins}))}var J7=class{constructor(e,t){this.x=e,this.y=t}compare(e){let t=this.x-e.x;return t===0?this.y.localeCompare(e.y):t}hash(){return xO(this.x,this.y)}toString(){return`{x: ${new Date(this.x).toISOString()}, y: ${this.y}}`}};function dce(e){let t=Q.of(e).toHashMap(e=>[new J7(e.x.getTime(),e.y),e],(e,t)=>t),n=Q.of(e).map(e=>e.x.getTime()).distinct().toSortedArray(e=>e),r=Q.of(e).aggregate(e=>e.y,e=>e.activeMachineMins/e.count,(e,t)=>isNaN(e)?t:e).sortBy(([e,t])=>e),i=`<table>
|
|
367
|
-
<thead><tr><th>Part</th><th>Expected Cycle Mins</th>`;for(let e of n)i+=`<th>`+new Date(e).toDateString()+` Completed</th>`,i+=`<th>`+new Date(e).toDateString()+` Std. Hours</th>`;i+=`</tr></thead>
|
|
368
|
-
<tbody>
|
|
369
|
-
`;for(let[e,a]of r){i+=`<tr><th>`+e+`</th><th>`+a.toFixed(1)+`</th>`;for(let r of n){let n=t.get(new J7(r,e));n===void 0?(i+=`<td></td>`,i+=`<td></td>`):(i+=`<td>`+n.count.toFixed(0)+`</td>`,i+=`<td>`+(n.activeMachineMins/60).toFixed(1)+`</td>`)}i+=`</tr>
|
|
370
|
-
`}return i+=`</tbody>
|
|
371
|
-
</table>`,i}function fce(e){XA(dce(e))}function pce(e,t){return Q.of(e).map(([e,n])=>{let r=t.get(e)??0,i=r<1440?Math.max(n/(1440-r),0):0;return{x:e.day,y:e.station,color:Math.min(i,1),label:r<1440?(i*100).toFixed(1)+`%`:`Planned Downtime`}}).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}var mce=P(`Standard OEE`);function hce(){qI(`Station OEE`);let[e,t]=B(mce),n=R(GR),r=n.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[n.month,zE(n.month,1)],i=R(n.type===`Last30`?SA:TA),a=R(n.type===`Last30`?gj:vj),o=(0,L.useMemo)(()=>{let t=f6(a);return pce(e===`Standard OEE`?u6(i.valuesToLazySeq()):e===`Occupied`?uae(i.valuesToLazySeq()):p6(a),t)},[e,i,a]);return(0,U.jsx)(G7,{label:`Station Usage Per Day`,y_title:`Station`,label_title:e===`Occupied`?`Occupied`:`OEE`,dateRange:r,cur_selected:e,options:[`Standard OEE`,`Occupied`,`Planned OEE`],setSelected:t,points:o,onExport:()=>pae(`Station`,o)})}var gce=P(`Completed`);function _ce(e,t,n,r){let i=lce(e,t,n,r);return Q.of(i).map(([e,t])=>({x:e.day,y:e.part,color:t.activeMachineMins,label:t.count.toFixed(0)+` (`+(t.activeMachineMins/60).toFixed(1)+` hours)`,count:t.count,activeMachineMins:t.activeMachineMins})).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}function vce(e){let t=uce(e);return Q.of(t).map(([e,t])=>({x:e.day,y:e.part,color:t.activeMachineMins,label:t.count.toFixed(0)+` (`+(t.activeMachineMins/60).toFixed(1)+` hours)`,count:t.count,activeMachineMins:t.activeMachineMins})).toSortedArray(e=>e.x.getTime(),{desc:e=>e.y})}function yce(){qI(`Part Production`);let[e,t]=B(gce),n=R(GR),r=n.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[n.month,zE(n.month,1)],i=R(n.type===`Last30`?SA:TA),a=R(n.type===`Last30`?ZI:Rie),o=R(n.type===`Last30`?dL:pL),s=(0,L.useMemo)(()=>{if(e===`Completed`){let e=lD(),t=n.type===`Last30`?RE(e,-30):n.month,r=n.type===`Last30`?RE(e,1):zE(n.month,1);return _ce(i.valuesToLazySeq(),o.matsById,t,r)}else return vce(a)},[e,i,o,a,n]);return(0,U.jsx)(G7,{label:`Part Production Per Day`,y_title:`Part`,label_title:e,dateRange:r,cur_selected:e,options:[`Completed`,`Planned`],setSelected:t,points:s,onExport:()=>fce(s)})}var Y7=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function bce(e){return`material`in e&&Array.isArray(e.material)}function xce(e){return`operations`in e&&(e.operations===void 0||Array.isArray(e.operations))}function X7({range:e}){let t=R(GR);if(!e)return null;let n=`start`in e?e.start:e[0],r=`end`in e?e.end:e[1];return t.type===`SpecificMonth`?n.toDateString()+` to `+r.toDateString():Y7.format(n)+` to `+Y7.format(r)}var Sce=P(!0),Cce=bk(e=>e(WI)?{part:`aaa`,proc:2}:void 0),wce=P($A),Tce=P(void 0),Ece=P(void 0),Z7=P(void 0),Q7=P(nk.empty()),Dce=P(e=>{let t=e(GR);return t.type===`Last30`?e(Z7):e(Q7).get(t.month)},(e,t,n)=>{let r=e(GR);r.type===`Last30`?t(Z7,n):t(Q7,e=>e.alter(r.month,()=>n))}),Oce=P(null);function kce(){qI(`Machine Cycles`);let e=z(SI),t=(0,L.useCallback)(function(t){if(!bce(t))return[];let n=[];for(let r of t.material)n.push({title:r.serial?r.serial:`Material`,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:r})});return n},[e]),n=R(GR),r=R(n.type===`Last30`?Yk:Zk),i=R(n.type===`Last30`?dL:pL),[a,o]=B(Sce),[s,c]=B(Cce),[l,u]=B(wce),[d,f]=B(Tce),[p,m]=B(Ece),[h,g]=B(Dce),[_,v]=B(Oce),y=n.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[n.month,zE(n.month,1)],b=R(n.type===`Last30`?SA:TA),x=(0,L.useMemo)(()=>s?d?nj(b.valuesToLazySeq(),{partAndProc:s,pallet:p,operation:d}):nj(b.valuesToLazySeq(),{partAndProc:s,pallet:p,station:$A}):p||l!==`@@@_FMSInsight_FilterAnyMachineKey_@@@`?nj(b.valuesToLazySeq(),{pallet:p,station:l}):tj(b.valuesToLazySeq()),[s,p,l,d,b]),S=s?d??(x.allMachineOperations.length===1?x.allMachineOperations[0]:void 0):void 0,C=(0,L.useMemo)(()=>{if(S)return ij(x,!1)},[x,S]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsxs)(J,{variant:`subtitle1`,children:[`Machine Cycles for `,(0,U.jsx)(X7,{range:h??y})]}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:a?`graph`:`table`,onChange:e=>o(e.target.value===`graph`),children:[(0,U.jsx)(GS,{value:`graph`,children:`Graph`},`graph`),(0,U.jsx)(GS,{value:`table`,children:`Table`},`table`)]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:s?x.allPartAndProcNames.findIndex(e=>s.part===e.part&&s.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{c(e.target.value===-1?void 0:x.allPartAndProcNames[e.target.value]),f(void 0)},children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Part`})},0),x.allPartAndProcNames.map((e,t)=>(0,U.jsx)(GS,{value:t,children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:20}),(0,U.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsx)(zC,{autoWidth:!0,displayEmpty:!0,value:s?S?x.allMachineOperations.findIndex(e=>S.compare(e)===0):-1:l,style:{marginLeft:`1em`},onChange:e=>{if(s){let t=typeof e.target.value==`number`?e.target.value:Number.parseInt(e.target.value,10);Number.isNaN(t)||f(t===-1?void 0:x.allMachineOperations[t])}else typeof e.target.value==`string`&&u(e.target.value)},children:s?[...x.allMachineOperations.length===1?[]:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Operation`})},-1)],...x.allMachineOperations.map((e,t)=>(0,U.jsxs)(GS,{value:t,children:[e.statGroup,` `,e.operation]},t))]:[(0,U.jsx)(GS,{value:$A,children:(0,U.jsx)(`em`,{children:`Any Machine`})},-1),x.allMachineNames.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,U.jsx)(GS,{value:``,children:(0,U.jsx)(`em`,{children:`Any Pallet`})},0),x.allPalletNames.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x.data.size>0?(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>cj(x,i.matsById,h),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})}):void 0]}),(0,U.jsx)(`main`,{children:a?(0,U.jsx)(h7,{points:x.data,series_label:x.seriesLabel,default_date_range:y,extra_tooltip:t,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),yZoom:_,setYZoom:v,stats:S?r.get(S):void 0,partCntPerPoint:S?Q.of(x.data).head()?.[1]?.[0]?.material?.length:void 0,plannedTimeMinutes:C}):(0,U.jsx)(a6,{points:x.data,matsById:i.matsById,period:n,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),showWorkorderAndInspect:!0,emptyMessage:s||p||d?`No Cycles`:`Select part, station, or pallet to see cycles.`})})]})}var Ace=P(!0),jce=bk(e=>e(WI)?{part:`aaa`,proc:2}:void 0),Mce=bk(e=>e(WI)?`LoadOp`:`LULOccupancy`),Nce=P(ej),Pce=P(`Any`),Fce=P(void 0),$7=P(void 0),e9=P(nk.empty()),Ice=P(e=>{let t=e(GR);return t.type===`Last30`?e($7):e(e9).get(t.month)},(e,t,n)=>{let r=e(GR);r.type===`Last30`?t($7,n):t(e9,e=>e.alter(r.month,()=>n))}),Lce=P(null);function Rce(){qI(`L/U Cycles`);let e=z(SI),t=(0,L.useCallback)(function(t){if(!xce(t))return[];let n=[];if(t.operations)for(let r of t.operations)n.push({title:(r.mat.serial?r.mat.serial:`Material`)+` `+r.operation,value:`Open Card`,link:()=>e({type:`LogMat`,logMat:r.mat})});return n},[e]),n=R(GR),[r,i]=B(Ace),[a,o]=B(jce),[s,c]=B(Mce),[l,u]=B(Nce),[d,f]=B(Pce),[p,m]=B(Fce),[h,g]=B(Ice),[_,v]=B(Lce),y=R(vr),b=_A(y.basketName),x=R(n.type===`Last30`?CA:EA),S=ZA(d,x),C=(0,L.useMemo)(()=>a&&s===`LoadOp`?new qk(a.part,`L/U`,`LOAD-${a.proc}`):a&&s===`UnloadOp`?new qk(a.part,`L/U`,`UNLOAD-${a.proc}`):null,[a,s]),w=n.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[n.month,zE(n.month,1)],T=R(n.type===`Last30`?SA:TA),E=R(n.type===`Last30`?dL:pL),D=R(n.type===`Last30`?Yk:Zk),O=(0,L.useMemo)(()=>a||p||l!==`@@@_FMSInsigt_FilterAnyLoadKey_@@@`||S!==`Any`?C?nj(T.valuesToLazySeq(),{operation:C,pallet:p,station:l,carrierKind:S}):r?rj(T.valuesToLazySeq(),{partAndProc:a,pallet:p,station:l,carrierKind:S}):nj(T.valuesToLazySeq(),{partAndProc:a,pallet:p,station:l,carrierKind:S}):tj(T.valuesToLazySeq()),[a,p,C,l,T,r,S]),ee=(0,L.useMemo)(()=>{if(s===`LoadOp`||s===`UnloadOp`)return ij(O,!0)},[O,s]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsxs)(J,{variant:`subtitle1`,children:[`Load/Unload Cycles for `,(0,U.jsx)(X7,{range:h??w})]}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:r?`graph`:`table`,onChange:e=>i(e.target.value===`graph`),children:[(0,U.jsx)(GS,{value:`graph`,children:`Graph`},`graph`),(0,U.jsx)(GS,{value:`table`,children:`Table`},`table`)]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:a?O.allPartAndProcNames.findIndex(e=>a.part===e.part&&a.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{e.target.value===-1?(o(void 0),c(`LULOccupancy`)):o(e.target.value===-1?void 0:O.allPartAndProcNames[e.target.value])},children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Part`})},0),O.allPartAndProcNames.map((e,t)=>(0,U.jsx)(GS,{value:t,children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:20}),(0,U.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:s,style:{marginLeft:`1em`},onChange:e=>c(e.target.value),children:[(0,U.jsx)(GS,{value:`LULOccupancy`,children:`L/U Occupancy`}),a?(0,U.jsx)(GS,{value:`LoadOp`,children:`Load Operation (estimated)`}):void 0,a?(0,U.jsx)(GS,{value:`UnloadOp`,children:`Unload Operation (estimated)`}):void 0]})}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:l,style:{marginLeft:`1em`},onChange:e=>{u(e.target.value)},children:[(0,U.jsx)(GS,{value:ej,children:(0,U.jsx)(`em`,{children:`Any Station`})},-1),O.allLoadStationNames.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),x?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:S,style:{marginLeft:`1em`},onChange:e=>{let t=e.target.value;f(t),t===`Basket`&&m(void 0)},children:[(0,U.jsx)(GS,{value:`Any`,children:(0,U.jsx)(`em`,{children:`Any Carrier`})}),(0,U.jsx)(GS,{value:`Pallet`,children:`Pallet`}),(0,U.jsx)(GS,{value:`Basket`,children:b})]})}):void 0,S===`Basket`?void 0:(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:p||``,style:{marginLeft:`1em`},onChange:e=>m(e.target.value===``?void 0:e.target.value),children:[(0,U.jsx)(GS,{value:``,children:(0,U.jsx)(`em`,{children:`Any Pallet`})},0),O.allPalletNames.map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),O.data.size>0?(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>cj(O,E.matsById,h,s===`LULOccupancy`,y.loadStationNames,b),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})}):void 0]}),(0,U.jsx)(`main`,{children:r?(0,U.jsx)(h7,{points:O.data,series_label:O.seriesLabel,default_date_range:w,extra_tooltip:t,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),yZoom:_,setYZoom:v,stats:C?D.get(C):void 0,plannedTimeMinutes:ee}):(0,U.jsx)(a6,{points:O.data,matsById:E.matsById,period:n,current_date_zoom:h,set_date_zoom_range:e=>g(e.zoom),showWorkorderAndInspect:!0,hideMedian:s===`LULOccupancy`,emptyMessage:a||p?`No Cycles`:`Select part, operation, or pallet to see cycles.`})})]})}var t9=bk(e=>e(WI)?3:void 0),n9=P(void 0),zce=P(void 0),Bce=P(null);function Vce(e){return`mats`in e&&Array.isArray(e.mats)}var Hce=P(e=>{let t=e(t9),n=e(n9);if(!t&&!n)return new Map;let r=e(e(GR).type===`Last30`?HL:WL);if(t){let e=r.get(t)?.valuesToLazySeq()??Q.of([]);return n&&(e=e.filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc))),new Map([[t.toString(),Array.from(e)]])}else if(n)return Q.of(r).collect(([e,t])=>{let r=t.valuesToLazySeq().filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc)).toRArray();return r.length>0?[e,r]:null}).toRMap(([e,t])=>[e.toString(),t]);else return new Map}),Uce=P(e=>{let t=e(e(GR).type===`Last30`?HL:WL);return Q.of(t).flatMap(([,e])=>e).flatMap(([,e])=>e.mats).distinctAndSortBy(e=>e.part,e=>e.proc).map(e=>({part:e.part,proc:e.proc})).toRArray()});function Wce(){qI(`Pallet Cycles`);let[e,t]=B(t9),[n,r]=B(n9),[i,a]=B(zce),[o,s]=B(Bce),c=R(GR),l=c.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[c.month,zE(c.month,1)],u=R(c.type===`Last30`?HL:WL),d=R(Hce),f=R(Uce),p=z(SI),m=(0,L.useCallback)(function(e){return Vce(e)?e.mats.map(e=>({title:e.part+`-`+e.proc,value:e.serial??``,link:e.serial?()=>p({type:`LogMat`,logMat:e}):void 0})):[]},[p]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(J,{variant:`subtitle1`,children:`Pallet Cycles`}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:e??-1,onChange:e=>t(e.target.value===-1?void 0:e.target.value),children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Pallet`})},0),u.keysToLazySeq().sortBy(e=>e).map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),f.length>0?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:n?f.findIndex(e=>n.part===e.part&&n.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{r(e.target.value===-1?void 0:f[e.target.value])},children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Part`})},0),f.map((e,t)=>(0,U.jsx)(GS,{value:t,children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:20}),(0,U.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>uj(u),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(`main`,{children:(0,U.jsx)(h7,{points:d,series_label:`Pallet`,default_date_range:l,current_date_zoom:i,set_date_zoom_range:e=>a(e.zoom),yZoom:o,setYZoom:s,extra_tooltip:m})})]})}var r9=P(void 0),i9=P(void 0),Gce=P(void 0);function Kce(e){return`mats`in e&&Array.isArray(e.mats)}var qce=P(null),Jce=P(e=>{let t=e(r9),n=e(i9);if(!t&&!n)return new Map;let r=e(e(GR).type===`Last30`?XL:$L);if(t){let e=r.get(t)?.valuesToLazySeq()??Q.of([]);return n&&(e=e.filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc))),new Map([[t.toString(),Array.from(e)]])}else if(n)return Q.of(r).collect(([e,t])=>{let r=t.valuesToLazySeq().filter(e=>e.mats.some(e=>e.part===n.part&&e.proc===n.proc)).toRArray();return r.length>0?[e,r]:null}).toRMap(([e,t])=>[e.toString(),t]);else return new Map}),Yce=P(e=>{let t=e(e(GR).type===`Last30`?XL:$L);return Q.of(t).flatMap(([,e])=>e).flatMap(([,e])=>e.mats).distinctAndSortBy(e=>e.part,e=>e.proc).map(e=>({part:e.part,proc:e.proc})).toRArray()});function Xce(){let e=_A(R(vr).basketName);qI(`${e} Cycles`);let[t,n]=B(r9),[r,i]=B(i9),[a,o]=B(Gce),[s,c]=B(qce),l=R(GR),u=l.type===`Last30`?[RE(lD(),-29),RE(lD(),1)]:[l.month,zE(l.month,1)],d=R(l.type===`Last30`?XL:$L),f=R(Jce),p=R(Yce),m=z(SI),h=(0,L.useCallback)(function(e){return Kce(e)?e.mats.map(e=>({title:e.part+`-`+e.proc,value:e.serial??``,link:e.serial?()=>m({type:`LogMat`,logMat:e}):void 0})):[]},[m]);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsxs)(J,{variant:`subtitle1`,children:[e,` Cycles`]}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:t??-1,onChange:e=>n(e.target.value===-1?void 0:e.target.value),children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsxs)(`em`,{children:[`Any `,e]})},0),d.keysToLazySeq().sortBy(e=>e).map(e=>(0,U.jsx)(GS,{value:e,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsx)(`span`,{style:{marginRight:`1em`},children:e})})},e))]})}),p.length>0?(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,displayEmpty:!0,value:r?p.findIndex(e=>r.part===e.part&&r.proc===e.proc):-1,style:{marginLeft:`1em`},onChange:e=>{i(e.target.value===-1?void 0:p[e.target.value])},children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Part`})},0),p.map((e,t)=>(0,U.jsx)(GS,{value:t,children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:20}),(0,U.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.part,`-`,e.proc]})]})},t))]})}):void 0,(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>uj(d,e),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})})]}),(0,U.jsx)(`main`,{children:(0,U.jsx)(h7,{points:f,series_label:e,default_date_range:u,current_date_zoom:a,set_date_zoom_range:e=>o(e.zoom),yZoom:s,setYZoom:c,extra_tooltip:h})})]})}function a9(e,t,n){let r=e?.zoomRange;return n?(t.get(n)??nk.empty()).valuesToAscLazySeq().transform(e=>r?e.filter(e=>e.time>=r.start&&e.time<=r.end):e).flatMap(e=>e.replacements.map(t=>({...t,station:n,time:e.time}))):t.toAscLazySeq().flatMap(([e,t])=>t.valuesToAscLazySeq().transform(e=>r?e.filter(e=>e.time>=r.start&&e.time<=r.end):e).flatMap(t=>t.replacements.map(n=>({...n,station:e,time:t.time}))))}function o9(e,t,n,r){return a9(e,t,n).groupBy(e=>e.tool).map(([e,t])=>{let n=0,r=null,i=0,a=null;for(let e of t){let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;t&&(r===null||t>r)&&(r=t),t&&(n+=t);let o=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;o&&(a===null||o>a)&&(a=o),o&&(i+=o)}return{tool:e,numReplacements:t.length,totalUseOfAllReplacements:n,totalCntOfAllReplacements:i,maxY:r??a??1,yAxisType:r===null?`Count`:`Time`,replacements:t}}).toSortedArray(r)}function Zce(e,t){let n=e.maxY/2;return t.type===`ReplaceBeforeCycleStart`?e.yAxisType===`Time`?t.useAtReplacement??n:t.cntAtReplacement??n:e.yAxisType===`Time`?t.totalUseAtBeginningOfCycle??n:t.totalCntAtBeginningOfCycle??n}var s9=Intl.NumberFormat(void 0,{maximumFractionDigits:1}),c9=(0,L.createContext)({start:new Date,end:new Date});function Qce({tooltip:e}){return(0,U.jsxs)(nw,{spacing:.5,children:[(0,U.jsxs)(`div`,{children:[`Tool: `,e.r.tool]}),(0,U.jsxs)(`div`,{children:[`Pocket: `,e.r.pocket]}),(0,U.jsxs)(`div`,{children:[`Time: `,e.r.time.toLocaleString()]}),(0,U.jsxs)(`div`,{children:[`Station: `,e.r.station.group,` #`,e.r.station.num]}),e.r.type===`ReplaceBeforeCycleStart`?(0,U.jsxs)(U.Fragment,{children:[e.r.useAtReplacement===null?void 0:(0,U.jsxs)(`div`,{children:[`Minutes at replacement: `,s9.format(e.r.useAtReplacement)]}),e.r.cntAtReplacement===null?void 0:(0,U.jsxs)(`div`,{children:[`Count at replacement: `,s9.format(e.r.cntAtReplacement)]})]}):(0,U.jsxs)(U.Fragment,{children:[e.r.totalUseAtBeginningOfCycle===null?void 0:(0,U.jsxs)(`div`,{children:[`Minutes at beginning of cycle:`,` `,s9.format(e.r.totalUseAtBeginningOfCycle)]}),e.r.totalUseAtEndOfCycle===null?void 0:(0,U.jsxs)(`div`,{children:[`Minutes at end of cycle: `,s9.format(e.r.totalUseAtEndOfCycle)]}),e.r.totalCntAtBeginningOfCycle===null?void 0:(0,U.jsxs)(`div`,{children:[`Count at beginning of cycle:`,` `,s9.format(e.r.totalCntAtBeginningOfCycle)]}),e.r.totalCntAtEndOfCycle===null?void 0:(0,U.jsxs)(`div`,{children:[`Count at end of cycle: `,s9.format(e.r.totalCntAtEndOfCycle)]})]})]})}function $ce({row:e,tooltip:t,timeScale:n,yScale:r}){let[i,a]=B(t);return(0,U.jsx)(`g`,{children:e.replacements.map((t,o)=>(0,U.jsx)(`circle`,{cx:n(t.time),cy:r(Zce(e,t)),r:t===i?.r?4:2,onMouseEnter:e=>a({top:0,left:Cj(e)?.x??0,r:t}),fill:`black`},o))})}var l9=[{id:0,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:1,numeric:!0,label:`Num Replacements`,getDisplay:e=>e.numReplacements.toString(),getForSort:e=>e.numReplacements},{id:2,numeric:!0,label:`Avg Use (min) at Replacement`,getDisplay:e=>s9.format(e.totalUseOfAllReplacements/e.numReplacements),getForSort:e=>e.totalUseOfAllReplacements/e.numReplacements},{id:3,numeric:!0,label:`Avg Use (count) at Replacement`,getDisplay:e=>s9.format(e.totalCntOfAllReplacements/e.numReplacements),getForSort:e=>e.totalCntOfAllReplacements/e.numReplacements},{id:4,numeric:!1,ignoreDuringExport:!0,label:`All Replacements`,getDisplay:()=>``,expanded:!0,Cell:(0,L.memo)(function({row:e}){let t=(0,L.useContext)(c9),n=(0,L.useMemo)(()=>P(null),[]),r=z(n),{ref:i,width:a}=Nj({refreshMode:`debounce`,refreshRate:100,handleHeight:!1}),o=dF().domain([t.start,t.end]).range([0,a??1e3]),s=oP().domain([0,e.maxY]).range([33,3]),c=e.numReplacements===0?null:s(e.totalUseOfAllReplacements/e.numReplacements);return(0,U.jsxs)(`div`,{ref:i,style:{position:`relative`,width:`100%`,height:`35px`},children:[(0,U.jsxs)(`svg`,{height:`35`,width:a??1e3,onMouseLeave:()=>r(null),children:[c===null?void 0:(0,U.jsx)(`line`,{x1:`0`,y1:c,x2:a??1e3,y2:c,stroke:`red`,strokeWidth:.5}),(0,U.jsx)($ce,{row:e,tooltip:n,timeScale:o,yScale:s})]}),(0,U.jsx)(Fj,{atom:n,TooltipContent:Qce,chartHeight:35,chartWidth:a??1e3})]})})}],ele=(0,L.memo)(function(e){let t=R(GR),n=q1(),r=K1(t),i=J1(0,l9),a=R(t.type===`Last30`?cR:uR),o=(0,L.useMemo)(()=>o9(r,a,e.station,i.sortOn),[r,a,e.station,i]),s=n?o.slice(n.page*n.rowsPerPage,(n.page+1)*n.rowsPerPage):o,c=r?.zoomRange??(t.type===`Last30`?{start:RE(lD(),-29),end:RE(lD(),1)}:{start:t.month,end:zE(t.month,1)});return(0,U.jsx)(`div`,{children:(0,U.jsxs)(c9.Provider,{value:c,children:[(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:l9,sort:i,showDetailsCol:!1}),(0,U.jsx)(G1,{columns:l9,pageData:s,rowsPerPage:n.rowsPerPage})]}),(0,U.jsx)(W1,{tpage:n,zoom:r.zoom,count:o.length})]})})}),u9=[{id:0,numeric:!1,label:`Date`,getDisplay:e=>e.time.toLocaleString(),getForSort:e=>e.time.getTime(),getForExport:e=>e.time.toISOString()},{id:1,numeric:!1,label:`Machine`,getDisplay:e=>e.station.group+` #`+e.station.num.toString(),getForSort:e=>e.station},{id:2,numeric:!1,label:`Tool`,getDisplay:e=>e.tool},{id:3,numeric:!0,label:`Pocket`,getDisplay:e=>e.pocket===-1?``:e.pocket.toString(),getForSort:e=>e.pocket},{id:4,numeric:!1,label:`Type`,getDisplay:e=>e.type===`ReplaceBeforeCycleStart`?`Between Cycles`:`During Cycle`},{id:5,numeric:!0,label:`Use At Replacement / Start of Cycle (min)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.useAtReplacement:e.totalUseAtBeginningOfCycle},{id:6,numeric:!0,label:`Use At End of Cycle (min)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalUseAtEndOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalUseAtEndOfCycle},{id:7,numeric:!0,label:`Use At Replacement / Start of Cycle (count)`,getDisplay:e=>{let t=e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?e.cntAtReplacement:e.totalCntAtBeginningOfCycle},{id:8,numeric:!0,label:`Use At End of Cycle (count)`,getDisplay:e=>{if(e.type===`ReplaceBeforeCycleStart`)return``;let t=e.totalCntAtEndOfCycle;return t==null?``:s9.format(t)},getForSort:e=>e.type===`ReplaceBeforeCycleStart`?0:e.totalCntAtEndOfCycle}],tle=(0,L.memo)(function(e){let t=R(GR),n=q1(),r=K1(t),i=J1(0,u9),a=R(t.type===`Last30`?cR:uR),o=(0,L.useMemo)(()=>a9(r,a,e.station).toSortedArray(i.sortOn),[i,r,a,e.station]),s=n?o.slice(n.page*n.rowsPerPage,(n.page+1)*n.rowsPerPage):o;return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:u9,sort:i,showDetailsCol:!1}),(0,U.jsx)(G1,{columns:u9,pageData:s})]}),(0,U.jsx)(W1,{tpage:n,zoom:r.zoom,count:o.length})]})});function nle(e,t){t===`summary`?X1(l9,o9(void 0,e,void 0,e=>e.tool)):X1(u9,a9(void 0,e,void 0).toSortedArray(e=>e.tool,e=>e.time))}var rle=(0,L.memo)(function(e){let t=R(R(GR).type===`Last30`?cR:uR),n=Array.from(t.keys());return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:e.station===null?-1:n.indexOf(e.station),style:{marginLeft:`1em`},onChange:t=>{let r=t.target.value;r===-1?e.setSelectedStation(null):e.setSelectedStation(n[r])},children:[(0,U.jsx)(GS,{value:-1,children:(0,U.jsx)(`em`,{children:`Any Machine`})}),n.map((e,t)=>(0,U.jsx)(GS,{value:t,children:(0,U.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:(0,U.jsxs)(`span`,{style:{marginRight:`1em`},children:[e.group,` #`,e.num]})})},t))]})}),(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{onClick:()=>nle(t,e.displayType),style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,children:(0,U.jsx)($T,{})})})]})}),ile=P(null),ale=P(`summary`),ole=(0,L.memo)(function(){qI(`Tool Replacements`);let[e,t]=B(ile),[n,r]=B(ale);return(0,U.jsxs)(Y,{sx:{paddingLeft:`24px`,paddingRight:`24px`,paddingTop:`10px`},children:[(0,U.jsxs)(Y,{component:`nav`,sx:{display:`flex`,minHeight:`2.5em`,alignItems:`center`,maxWidth:`calc(100vw - 24px - 24px)`},children:[(0,U.jsx)(J,{variant:`subtitle1`,children:`Tool Replacements`}),(0,U.jsx)(Y,{sx:{flexGrow:1}}),(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{autoWidth:!0,value:n,style:{marginLeft:`1em`},onChange:e=>r(e.target.value),children:[(0,U.jsx)(GS,{value:`summary`,children:`Summary`}),(0,U.jsx)(GS,{value:`details`,children:`Details`})]})}),(0,U.jsx)(rle,{station:e,setSelectedStation:t,displayType:n})]}),(0,U.jsx)(`main`,{children:n===`summary`?(0,U.jsx)(ele,{station:e}):(0,U.jsx)(tle,{station:e})})]})}),d9=P(null),sle=150,f9=40,p9=10,m9=20,h9=10,g9=80;function _9(e){return`${e.workorderId}-${e.part}`}function v9(e){return e?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()):null}function cle(e){let t=e.map(_9),n=Q.of(e).flatMap(e=>{let t=v9(e.simulatedFilled);return[v9(e.simulatedStart),t?RE(t,2):null]}).collect(e=>e),r=n.minBy(e=>e)??new Date,i=n.maxBy(e=>e)??RE(new Date,7),a=Math.max(eD(i,r)*50,30),o=Math.max(t.length*g9,g9);return{xScale:dF().domain([r,i]).range([0,a]),yScale:yM().domain(t).range([0,o])}}function lle({tooltip:e}){return(0,U.jsxs)(nw,{children:[(0,U.jsxs)(`div`,{children:[`Workorder: `,e.data.workorderId]}),(0,U.jsxs)(`div`,{children:[`Part: `,e.data.part]}),(0,U.jsxs)(`div`,{children:[`Due Date: `,e.data.dueDate.toLocaleDateString()]}),(0,U.jsxs)(`div`,{children:[`Priority: `,e.data.priority]}),(0,U.jsxs)(`div`,{children:[`Planned Quantity: `,e.data.plannedQuantity]}),(0,U.jsxs)(`div`,{children:[`Completed Quantity: `,e.data.completedQuantity]}),(0,U.jsxs)(`div`,{children:[`Projected Start: `,v9(e.data.simulatedStart)?.toLocaleDateString()]}),(0,U.jsxs)(`div`,{children:[`Projected Filled: `,v9(e.data.simulatedFilled)?.toLocaleDateString()]})]})}function ule({workorders:e}){return(0,U.jsx)(`div`,{children:e.map(e=>(0,U.jsxs)(nw,{direction:`column`,sx:{height:g9,alignItems:`flex-end`,paddingRight:`10px`,justifyContent:`center`},children:[(0,U.jsx)(Y,{children:e.workorderId}),(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.part,size:18}),(0,U.jsx)(Y,{sx:{ml:`3px`},children:e.part})]})]},_9(e)))})}function dle({xScale:e,yScale:t}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Yj,{scale:e,top:0}),(0,U.jsx)(Uj,{scale:e,height:t.range()[1]-t.range()[0]})]})}function fle({workorders:e,xScale:t,yScale:n}){let r=z(d9),i=(0,L.useRef)(null);function a(e){return t=>{let n=Cj(t);n&&(i.current!==null&&(clearTimeout(i.current),i.current=null),r({left:n.x,top:n.y,data:e}))}}let o=(0,L.useCallback)(()=>{i.current=setTimeout(()=>{r(null)},300)},[i,r]);return(0,U.jsx)(`g`,{children:e.map(e=>{let r=_9(e);return(0,U.jsx)(`g`,{onMouseOver:a(e),onMouseLeave:o,children:e.simulatedStart&&e.simulatedFilled?(0,U.jsx)(`rect`,{x:t(v9(e.simulatedStart)),y:(n(r)??0)+20,width:t(RE(v9(e.simulatedFilled),1))-t(v9(e.simulatedStart)),height:g9-40,fill:Mr[600]}):void 0},r)})})}function ple(){let e=R(Fk),t=(0,L.useMemo)(()=>Q.of(e.workorders??[]).toSortedArray(e=>e.simulatedFilled?.getTime()??null,e=>e.simulatedStart?.getTime()??null,e=>e.workorderId,e=>e.part),[e.workorders]),{xScale:n,yScale:r}=cle(t);return(0,U.jsxs)(Y,{sx:{display:`flex`},children:[(0,U.jsx)(Y,{sx:{height:r.range()[1]+f9+p9,width:sle,paddingTop:`${f9}px`},children:(0,U.jsx)(ule,{workorders:t})}),(0,U.jsxs)(Y,{sx:{flexGrow:1,width:0,position:`relative`},children:[(0,U.jsx)(`div`,{style:{overflowX:`visible`},children:(0,U.jsx)(`svg`,{height:r.range()[1]+f9+p9,width:n.range()[1]+h9+m9,children:(0,U.jsxs)(`g`,{transform:`translate(${m9}, ${f9})`,children:[(0,U.jsx)(dle,{yScale:r,xScale:n}),(0,U.jsx)(fle,{workorders:t,xScale:n,yScale:r})]})})}),(0,U.jsx)(Fj,{atom:d9,TooltipContent:lle,chartHeight:r.range()[1]+f9+p9,chartWidth:n.range()[1]+h9+m9})]})]})}var y9=P(e=>{let t=e(GI);return t.route===$.Operations_CurrentWorkorders?t.workorder??null:null},(e,t,n)=>{e(GI).route===$.Operations_CurrentWorkorders&&(n===``&&(n=null),t(GI,{route:$.Operations_CurrentWorkorders,workorder:n??void 0}))}),mle=wk(`recentSearchedWorkorders`,[]),hle=P(async(e,{signal:t})=>{let n=e(y9);return n===null?null:await Ht.getActiveWorkorder(n,t)??[]}),gle=K(Mw)({"& > *":{borderBottom:`unset !important`}}),b9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),_le=(0,L.memo)(function({workorder:e}){let t=z(SI),n=z(T9),r=Q.ofObject(e.activeStationTime??{}).concat(Q.ofObject(e.elapsedStationTime??{})).map(([e])=>e).distinctAndSortBy(e=>e);function i(n){t({type:`MatSummary`,summary:{materialID:n.materialID,partName:e.part,serial:n.serial,workorderId:e.workorderId}})}return(0,U.jsxs)(nw,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(yw,{size:`small`,stickyHeader:!0,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Serial`}),(0,U.jsx)(Z,{children:`Quarantine?`}),(0,U.jsx)(Z,{sx:{whiteSpace:`nowrap`},children:`Inspect Failed?`}),(0,U.jsx)(Z,{sx:{whiteSpace:`nowrap`},children:`Close Out`}),(0,U.jsx)(Z,{padding:`checkbox`})]})}),(0,U.jsx)(Sw,{children:(e.material??[]).map(e=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.serial??``}),(0,U.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.quarantined?(0,U.jsx)(gE,{fontSize:`inherit`}):``}),(0,U.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.inspectionFailed?(0,U.jsx)(UT,{fontSize:`inherit`}):``}),(0,U.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout===pt.None?``:e.closeout===pt.ClosedOut?(0,U.jsx)(AT,{fontSize:`inherit`}):(0,U.jsx)(UT,{fontSize:`inherit`})}),(0,U.jsx)(Z,{padding:`checkbox`,children:(0,U.jsx)($m,{onClick:()=>i(e),size:`large`,children:(0,U.jsx)(lE,{fontSize:`inherit`})})})]},e.materialID))})]})}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Station`}),(0,U.jsx)(Z,{children:`Active Minutes`}),(0,U.jsx)(Z,{children:`Elapsed Minutes`})]})}),(0,U.jsx)(Sw,{children:r.map(t=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:t}),(0,U.jsx)(Z,{children:b9.format(Kk(e.activeStationTime?.[t]??0))}),(0,U.jsx)(Z,{children:b9.format(Kk(e.elapsedStationTime?.[t]??0))})]},t))})]})}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Time`}),(0,U.jsx)(Z,{children:`Comment`})]})}),(0,U.jsx)(Sw,{children:(e.comments??[]).map((e,t)=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.timeUTC.toLocaleString(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`})}),(0,U.jsx)(Z,{children:e.comment})]},t))})]}),(0,U.jsx)(X,{sx:{mt:`0.5em`},onClick:()=>n(e),children:`Add Comment`})]})]})});function x9(e){return e?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toLocaleDateString():``}function S9(e){return e.closeout===pt.ClosedOut?!1:e.quarantined||e.inspectionFailed||e.closeout===pt.CloseOutFailed}function vle({workorder:e,showSim:t}){let[n,r]=(0,L.useState)(!1),i=t?10:8;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(gle,{children:[(0,U.jsx)(Z,{children:e.workorderId}),(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:e.part,size:25})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{variant:`body2`,component:`span`,sx:{display:`block`},children:e.part})})]})}),(0,U.jsx)(Z,{children:e.dueDate===null?``:e.dueDate.toLocaleDateString()}),(0,U.jsx)(Z,{align:`right`,children:e.priority}),(0,U.jsx)(Z,{align:`right`,children:e.plannedQuantity}),(0,U.jsx)(Z,{align:`right`,children:e.material?.length??0}),(0,U.jsx)(Z,{align:`right`,children:e.material?.filter(S9).length??0}),(0,U.jsx)(Z,{align:`right`,children:e.completedQuantity}),t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Z,{align:`right`,children:x9(e.simulatedStart)}),(0,U.jsx)(Z,{align:`right`,children:x9(e.simulatedFilled)})]}):void 0,(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Show Details`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>r(!n),children:n?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})})})]}),(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:i,children:(0,U.jsx)(Lp,{in:n,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(_le,{workorder:e})})})})]})}function yle(e,t,n){let r;switch(t){case 0:r=e=>e.workorderId;break;case 1:r=e=>e.part;break;case 2:r=e=>e.plannedQuantity;break;case 3:r=e=>e.dueDate.getTime();break;case 4:r=e=>e.priority;break;case 5:r=e=>e.completedQuantity;break;case 7:r=e=>e.material?.filter(S9).length??0;break;case 6:r=e=>e.material?.length??0;break;case 8:r=e=>e.simulatedStart?.getTime()??null;break;case 9:r=e=>e.simulatedFilled?.getTime()??null;break}return Q.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r})}function ble({sortBy:e,order:t,showSim:n}){let r=R(Fk),i=R(hle),a=(0,L.useMemo)(()=>yle(i??r.workorders??[],e,t),[r.workorders,e,t,i]);return i&&i.length===0?(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:n?10:8,children:`No workorders found`})}):(0,U.jsx)(U.Fragment,{children:a.map(e=>(0,U.jsx)(vle,{workorder:e,showSim:n},`${e.workorderId}-${e.part}`))})}function xle(e,t){let n=`<table>
|
|
372
|
-
<thead><tr>`;n+=`<th>Workorder</th>`,n+=`<th>Part</th>`,n+=`<th>Due Date</th>`,n+=`<th>Priority</th>`,n+=`<th>Planned Qty</th>`,n+=`<th>Completed Qty</th>`,t&&(n+=`<th>Simulated Start</th>`,n+=`<th>Simulated Filled</th>`),n+=`<th>Serials</th>`,n+=`<th>Active Time (mins)</th>`,n+=`<th>Elapsed Time (mins)</th>`,n+=`</tr></thead>
|
|
373
|
-
<tbody>
|
|
374
|
-
`;for(let r of e)n+=`<tr>`,n+=`<td>${r.workorderId}</td>`,n+=`<td>${r.part}</td>`,n+=`<td>${r.dueDate===null?``:r.dueDate.toLocaleDateString()}</td>`,n+=`<td>${r.priority}</td>`,n+=`<td>${r.plannedQuantity}</td>`,n+=`<td>${r.completedQuantity}</td>`,t&&(n+=`<td>${x9(r.simulatedStart)}</td>`,n+=`<td>${x9(r.simulatedFilled)}</td>`),n+=`<td>${(r.material??[]).map(e=>e.serial??``).join(`;`)}</td>`,n+=`<td>${Q.ofObject(r.activeStationTime??{}).map(([e,t])=>`${e}: ${Kk(t)}`).toRArray().join(`;`)}</td>`,n+=`<td>${Q.ofObject(r.elapsedStationTime??{}).map(([e,t])=>`${e}: ${Kk(t)}`).toRArray().join(`;`)}</td>`,n+=`</tr>
|
|
375
|
-
`;n+=`</tbody></table>
|
|
376
|
-
`,XA(n)}function C9(e){return(0,U.jsxs)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,children:[(0,U.jsx)(tw,{title:`Sort`,enterDelay:300,children:(0,U.jsx)(zw,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})}),e.extraIcon]})}var w9=P(`table`),Sle=(0,L.memo)(function({showSim:e}){let[t,n]=B(w9);return(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{justifyContent:`flex-end`,alignItems:`center`},children:[e?(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`,flexGrow:1},children:[(0,U.jsx)(DE,{fontSize:`small`}),(0,U.jsx)(J,{variant:`caption`,children:`Projected dates are estimates`})]}):void 0,(0,U.jsx)(ab,{size:`small`,children:(0,U.jsxs)(zC,{variant:`outlined`,value:t,onChange:e=>n(e.target.value),children:[(0,U.jsx)(GS,{value:`table`,children:`Table`}),(0,U.jsx)(GS,{value:`gantt`,children:`Gantt`})]})})]})}),Cle=Na`
|
|
377
|
-
0% {
|
|
378
|
-
transform: rotate(0deg);
|
|
379
|
-
}
|
|
380
|
-
100% {
|
|
381
|
-
transform: rotate(360deg);
|
|
382
|
-
}
|
|
383
|
-
`,wle=K(sE)(()=>({animation:`${Cle} 1.5s linear infinite`}));function Tle(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useTransition)(),[i,a]=B(y9),[o,s]=(0,L.useState)(null),[c,l]=B(mle);function u(e){e!==null&&e!==``&&(r(()=>{a(e)}),t(!1),s(null),l(t=>{let n=t.filter(t=>t!==e);return n.unshift(e),n.slice(0,5)}))}return(0,U.jsxs)(U.Fragment,{children:[n?(0,U.jsx)(tw,{title:`Searching.... Click to cancel`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>a(null),children:(0,U.jsx)(wle,{fontSize:`inherit`})})}):i?(0,U.jsx)(tw,{title:`Clear Search`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>a(null),children:(0,U.jsx)(NT,{fontSize:`inherit`})})}):(0,U.jsx)(tw,{title:`Search`,children:(0,U.jsx)($m,{size:`small`,onClick:e=>{t(!0),e.currentTarget.blur()},children:(0,U.jsx)(_E,{fontSize:`inherit`})})}),(0,U.jsxs)(Dy,{open:e,onClose:()=>t(!1),children:[(0,U.jsx)(By,{children:`Search Workorder`}),(0,U.jsxs)(Ly,{children:[(0,U.jsx)(lT,{variant:`outlined`,fullWidth:!0,autoFocus:!0,sx:{mt:`0.5em`,minWidth:`15em`},label:`Workorder ID`,value:o??``,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(u(o),e.preventDefault())}}),c.length>0?(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(gx,{dense:!0,sx:{mt:`1em`},subheader:(0,U.jsx)(w_,{children:`Previous Searches`}),children:c.map(e=>(0,U.jsx)(Ax,{onClick:()=>u(e),children:(0,U.jsx)(xx,{children:(0,U.jsx)(Bx,{primary:e})})},e))})}):void 0]}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{color:`primary`,onClick:()=>u(o),children:`Search`}),(0,U.jsx)(X,{color:`secondary`,onClick:()=>t(!1),children:`Cancel`})]})]})]})}var Ele=(0,L.memo)(function(e){let t={sortBy:e.sortBy,setSortBy:e.setSortBy,order:e.order,setOrder:e.setOrder};return(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(C9,{align:`left`,col:0,...t,extraIcon:e.disableSearch?void 0:(0,U.jsx)(Tle,{}),children:`Workorder`}),(0,U.jsx)(C9,{align:`left`,col:1,...t,children:`Part`}),(0,U.jsx)(C9,{align:`left`,col:3,...t,children:`Due Date`}),(0,U.jsx)(C9,{align:`right`,col:4,...t,children:`Priority`}),(0,U.jsx)(C9,{align:`right`,col:2,...t,children:`Planned Quantity`}),(0,U.jsx)(C9,{align:`right`,col:6,...t,children:`Started Quantity`}),(0,U.jsx)(C9,{align:`right`,col:7,...t,children:`Abnormal Quantity`}),(0,U.jsx)(C9,{align:`right`,col:5,...t,children:`Completed Quantity`}),e.showSim?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(C9,{align:`right`,col:8,...t,children:`Projected Start`}),(0,U.jsx)(C9,{align:`right`,col:9,...t,children:`Projected Filled`})]}):void 0,(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>xle(e.workorders,e.showSim),children:(0,U.jsx)($T,{})})})})]})})}),T9=P(null);function Dle(){let[e,t]=B(T9),[n,r]=(0,L.useState)(null),i=z(Rk);function a(){t(null),r(null)}function o(){e&&n&&n!==``&&i({workorder:e.workorderId,comment:n}),a()}return(0,U.jsx)(Dy,{open:e!==null,onClose:a,children:e===null?void 0:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(By,{children:(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(zU,{part:e.part,size:40})}),(0,U.jsxs)(`div`,{style:{marginLeft:`1em`,flexGrow:1},children:[`Add Comment For `,e.workorderId]})]})}),(0,U.jsx)(Ly,{children:(0,U.jsx)(lT,{variant:`outlined`,sx:{mt:`1em`},fullWidth:!0,autoFocus:!0,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n!==null&&n!==``&&(o(),e.preventDefault())}})}),(0,U.jsxs)(jy,{children:[(0,U.jsx)(X,{color:`primary`,onClick:o,children:`Save Comment`}),(0,U.jsx)(X,{color:`primary`,onClick:a,children:`Cancel`})]})]})})}function Ole(){let[e,t]=B(y9);return(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:10,children:(0,U.jsxs)(nw,{direction:`column`,sx:{mt:`3em`,flex:`flex`,alignItems:`center`,width:`100%`},children:[(0,U.jsxs)(nw,{direction:`row`,spacing:`3`,children:[(0,U.jsx)(qm,{}),e&&e!==``?(0,U.jsxs)(J,{variant:`h6`,children:[`Searching for workorder `,e]}):(0,U.jsx)(J,{variant:`h6`,children:`Searching`})]}),(0,U.jsx)(X,{onClick:()=>t(null),children:`Cancel`})]})})})}function kle({showSim:e,disableSearch:t}){let[n,r]=(0,L.useState)(0),[i,a]=(0,L.useState)(`asc`),o=R(Fk);return(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(Ele,{workorders:o?.workorders??[],sortBy:n,setSortBy:r,showSim:e,order:i,setOrder:a,disableSearch:t}),(0,U.jsx)(Sw,{children:(0,U.jsx)(L.Suspense,{fallback:(0,U.jsx)(Ole,{}),children:(0,U.jsx)(ble,{sortBy:n,order:i,showSim:e})})})]})}function Ale(){let e=z(k0),t=R(TI),[n,r]=II(),i=z(SI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,U.jsx)(X,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var jle=(0,L.memo)(function(){return(0,U.jsx)(pW,{buttons:(0,U.jsx)(Ale,{})})}),E9=(0,L.memo)(function({disableSearch:e}){qI(`Workorders`);let t=R(Fk),n=R(w9),r=(0,L.useMemo)(()=>t.workorders?.some(e=>!!e.simulatedStart||!!e.simulatedFilled)??!1,[t.workorders]);return(0,U.jsxs)(Y,{component:`main`,sx:{padding:`24px`},children:[r?(0,U.jsx)(Sle,{showSim:r}):void 0,n===`table`?(0,U.jsx)(kle,{showSim:r,disableSearch:e}):(0,U.jsx)(ple,{}),(0,U.jsx)(Dle,{}),(0,U.jsx)(jle,{}),(0,U.jsx)(P0,{})]})}),Mle=Mr[50],Nle=Mr[600],Ple=Fr[100],D9=`3em`,Fle=`calc(${D9} * 7)`,Ile=P(e=>{let t=e(gR);return t===null?null:Q.of(t.usage).toLookupOrderedMap(e=>e.machineGroup,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate()))}),Lle=P(e=>{let t=e(gR);return t===null?ek.empty():ek.build(t.usage,e=>e.machineGroup)}),Rle=P(e=>{let t=e(gR);return t===null?ek.empty():ek.build(t.usage,e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),1))}),zle=P(e=>{let t=e(gR);return t===null?0:Q.of(t.usage).map(e=>Math.ceil(e.usage)).maxBy(e=>e)??1}),Ble=P(e=>{let t=e(gR);return t===null?[null,null]:[Q.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).minBy(e=>e)??null,Q.of(t.usage).map(e=>new Date(e.day.getUTCFullYear(),e.day.getUTCMonth(),e.day.getUTCDate())).maxBy(e=>e)??null]});function Vle({date:e,dayColor:t,tooltip:n}){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay(),i=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();return(0,U.jsxs)(Y,{sx:{width:Fle},children:[(0,U.jsx)(J,{variant:`h6`,sx:{textAlign:`center`},children:e.toLocaleString(`default`,{month:`long`,year:`numeric`})}),(0,U.jsxs)(Y,{sx:{display:`flex`,flexWrap:`wrap`},children:[Q.ofRange(0,r).map((e,t)=>(0,U.jsx)(Y,{sx:{height:D9,width:D9}},t)),Q.ofRange(1,i+1).map((r,i)=>(0,U.jsx)(`div`,{style:{width:D9,height:D9,cursor:`default`,backgroundColor:t(new Date(e.getFullYear(),e.getMonth(),r))},children:(0,U.jsx)(tw,{title:n(new Date(e.getFullYear(),e.getMonth(),r)),children:(0,U.jsx)(Y,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`},children:r})})},i))]})]})}function Hle(){return(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,U.jsx)(DE,{fontSize:`small`}),(0,U.jsx)(J,{variant:`caption`,children:`Projected dates are estimates`})]})}function Ule({group:e,month:t}){let n=R(Ile),[r,i]=R(Ble),a=R(zle),o=(0,L.useMemo)(()=>{let t=oP().domain([0,a]).range([Mle,Nle]);return a=>{if(i&&a>i||r&&a<r)return`white`;let o=n?.get(e)?.get(a);return o?t(o.usage):Ple}},[n,a,r,i,e]);function s(t){let a=n?.get(e)?.get(t);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{children:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}),i&&t>i?(0,U.jsx)(`div`,{children:`Not Simulated`}):r&&t<r?(0,U.jsx)(`div`,{}):a?(0,U.jsxs)(`div`,{children:[`Usage: `,a.usage.toFixed(2)]}):(0,U.jsx)(`div`,{children:`Downtime`})]})}return(0,U.jsx)(Vle,{date:t,dayColor:o,tooltip:s})}function Wle(){qI(`Projected Machine Usage`);let e=R(Lle),t=R(Rle);return(0,U.jsx)(Y,{component:`main`,sx:{padding:`24px`},children:(0,U.jsxs)(nw,{direction:`column`,spacing:5,children:[(0,U.jsx)(Hle,{}),e.toAscLazySeq().map(e=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(J,{variant:`h4`,children:e}),(0,U.jsx)(Y,{sx:{display:`flex`,flexWrap:`wrap`,columnGap:`50px`},children:t.toAscLazySeq().map(t=>(0,U.jsx)(Ule,{group:e,month:t},t.getTime()))})]},e))]})})}function Gle(){let e=z(k0),t=R(TI),[n,r]=II(),i=z(SI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,U.jsx)(X,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var Kle=(0,L.memo)(function(){return(0,U.jsx)(pW,{buttons:(0,U.jsx)(Gle,{})})}),qle=new Intl.DateTimeFormat(void 0,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`});function Jle({day:e,setDay:t}){let n=lD();return(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,U.jsx)(tw,{title:`Previous Day`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)($m,{disabled:e<=RE(n,-28),onClick:()=>t(e=>RE(e,-1)),children:(0,U.jsx)(xE,{})})})}),(0,U.jsx)(J,{sx:{minWidth:`14em`,textAlign:`center`},children:qle.format(e)}),(0,U.jsx)(tw,{title:`Next Day`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)($m,{disabled:e>=n,onClick:()=>t(e=>RE(e,1)),children:(0,U.jsx)(bE,{})})})})]})}function Yle(e,t,n){let r;switch(t){case 0:r=e=>e.last_unload_time??null;break;case 2:r=e=>e.partName;break;case 1:r=e=>e.serial??null;break;case 3:r=e=>e.workorderId??null;break;case 4:r=e=>e.closeout_failed??null;break;case 5:r=e=>e.closeout_completed??null}return Q.of(e).toSortedArray(n===`asc`?{asc:r}:{desc:r},{asc:e=>e.last_unload_time??null})}function Xle({sortBy:e,setSortBy:t,sortOrder:n,setSortOrder:r}){function i(i){i===e?r(n===`asc`?`desc`:`asc`):(t(i),r(`asc`))}return(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{sortDirection:e===0&&n,children:(0,U.jsx)(zw,{active:e===0,direction:n,onClick:()=>i(0),children:`Completed Time`})}),(0,U.jsx)(Z,{sortDirection:e===1&&n,children:(0,U.jsx)(zw,{active:e===1,direction:n,onClick:()=>i(1),children:`Serial`})}),(0,U.jsx)(Z,{sortDirection:e===2&&n,children:(0,U.jsx)(zw,{active:e===2,direction:n,onClick:()=>i(2),children:`Part`})}),(0,U.jsx)(Z,{sortDirection:e===3&&n,children:(0,U.jsx)(zw,{active:e===3,direction:n,onClick:()=>i(3),children:`Workorder`})}),(0,U.jsx)(Z,{sortDirection:e===4&&n,children:(0,U.jsx)(zw,{active:e===4,direction:n,onClick:()=>i(4),children:`Closeout`})}),(0,U.jsx)(Z,{sortDirection:e===5&&n,children:(0,U.jsx)(zw,{active:e===5,direction:n,onClick:()=>i(5),children:`Closeout Time`})}),(0,U.jsx)(Z,{})]})}var Zle=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`numeric`,second:`numeric`}),Qle=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`}),$le=(0,L.memo)(function({mat:e}){let t=z(SI);return(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.last_unload_time?Zle.format(e.last_unload_time):``}),(0,U.jsx)(Z,{children:e.serial}),(0,U.jsx)(Z,{children:(0,U.jsxs)(nw,{direction:`row`,spacing:`2`,sx:{alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.partName,size:25}),(0,U.jsx)(J,{variant:`body2`,children:e.partName})]})}),(0,U.jsx)(Z,{children:e.workorderId}),(0,U.jsx)(Z,{children:e.closeout_completed===null||e.closeout_completed===void 0?``:e.closeout_failed?(0,U.jsx)(UT,{fontSize:`inherit`}):(0,U.jsx)(AT,{fontSize:`inherit`})}),(0,U.jsx)(Z,{children:e.closeout_completed?Qle.format(e.closeout_completed):``}),(0,U.jsx)(Z,{padding:`checkbox`,children:e.serial!==null&&e.serial!==``?(0,U.jsx)($m,{onClick:()=>{e.serial&&t({type:`ManuallyEnteredSerial`,serial:e.serial})},size:`large`,children:(0,U.jsx)(lE,{fontSize:`inherit`})}):void 0})]})});function eue({day:e}){let t=R(dL),n=(0,L.useMemo)(()=>{let n=RE(e,1),r=[];for(let i of t.matsById.values())i.completed_last_proc_machining===!0&&i.last_unload_time&&i.last_unload_time>=e&&i.last_unload_time<n&&r.push(i);return r},[t,e]),[r,i]=(0,L.useState)(0),[a,o]=(0,L.useState)(`asc`),s=(0,L.useMemo)(()=>Yle(n,r,a),[n,r,a]);return(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(Tw,{children:(0,U.jsx)(Xle,{sortBy:r,setSortBy:i,sortOrder:a,setSortOrder:o})}),(0,U.jsx)(Sw,{children:s.map(e=>(0,U.jsx)($le,{mat:e},e.materialID))})]})}function tue(){qI(`Close Out`);let[e,t]=(0,L.useState)(lD());return(0,U.jsxs)(Y,{sx:{padding:`24px`},children:[(0,U.jsx)(Y,{component:`nav`,sx:{display:`flex`,justifyContent:`center`},children:(0,U.jsx)(Jle,{day:e,setDay:t})}),(0,U.jsx)(`main`,{children:(0,U.jsx)(eue,{day:e})}),(0,U.jsx)(P0,{}),(0,U.jsx)(Kle,{})]})}var O9=P(!1),k9=P(!1),A9=P(!1),j9=[{id:0,numeric:!1,label:`ID`,getDisplay:e=>e.bookingId,Cell:({row:e})=>e.canceled?(0,U.jsx)(J,{sx:{textDecoration:`line-through`,fontSize:`inherit`},children:e.bookingId}):e.bookingId},{id:1,numeric:!1,label:`Part`,getDisplay:e=>e.partName,Cell:({row:e})=>(0,U.jsxs)(nw,{direction:`row`,spacing:1,sx:{alignItems:`center`},children:[(0,U.jsx)(zU,{part:e.partName,size:25}),e.partName]})},{id:2,numeric:!0,label:`Quantity`,getDisplay:e=>e.quantity.toString(),getForSort:e=>e.quantity},{id:3,numeric:!1,label:`Request Time`,getDisplay:e=>e.timeUTC.toLocaleString(),getForSort:e=>e.timeUTC.getTime()},{id:4,numeric:!1,label:`Priority`,getDisplay:e=>e.priority?e.priority.toString():``,getForSort:e=>e.priority??0},{id:5,numeric:!1,label:`Workorder`,getDisplay:e=>e.workorder??``},{id:6,numeric:!1,label:`Canceled`,getDisplay:e=>e.canceled?.toLocaleString()??``,getForSort:e=>e.canceled?.getTime()??0,openFilterDialog:O9},{id:7,numeric:!1,label:`Scheduled Job`,getDisplay:e=>e.job??``,openFilterDialog:O9},{id:8,numeric:!1,label:`Scheduled Time`,getDisplay:e=>e.schTime?e.schTime.toLocaleString():``,getForSort:e=>e.schTime?e.schTime.getTime():0}],nue=(0,L.memo)(function({setRebookingToShow:e}){let t=J1(3,j9,`desc`),n=q1(),r=R(SR),i=R(wR),a=R(ER),o=R(k9),s=R(A9),c=(0,L.useMemo)(()=>r.adjust(a,(e,t)=>e?{...e,job:t?.jobUnique,schTime:t?.scheduledTime}:void 0).adjust(i,(e,t)=>e?{...e,canceled:t}:void 0).valuesToAscLazySeq().transform(e=>o?e.filter(e=>!e.job):e).transform(e=>s?e.filter(e=>!e.canceled):e).toSortedArray(t.sortOn),[t.sortOn,r,i,a,o,s]);return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(yw,{children:[(0,U.jsx)(z1,{columns:j9,sort:t,showDetailsCol:!0,copyToClipboardRows:c}),(0,U.jsx)(G1,{columns:j9,pageData:c,rowsPerPage:n.rowsPerPage,onClickDetails:(t,n)=>e(n)})]}),(0,U.jsx)(W1,{tpage:n,count:c.length})]})}),M9=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}),rue=(0,L.memo)(function({rebooking:e,close:t}){let[n,r]=MR();function i(){e&&n(e.bookingId).then(()=>t(void 0)).catch(console.log)}return(0,U.jsxs)(Dy,{open:e!==void 0,onClose:()=>t(void 0),children:[(0,U.jsx)(By,{children:e?.canceled?(0,U.jsx)(J,{sx:{textDecoration:`line-through`},children:e?.bookingId}):e?.bookingId}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(nw,{direction:`column`,spacing:1,children:[e?.canceled&&(0,U.jsxs)(J,{variant:`h5`,children:[`Canceled at `,M9.format(e.canceled)]}),(0,U.jsxs)(nw,{direction:`row`,spacing:1,children:[(0,U.jsx)(`span`,{children:`Part:`}),e?.partName&&(0,U.jsx)(zU,{part:e?.partName,size:25}),(0,U.jsx)(`span`,{children:e?.partName})]}),(0,U.jsxs)(J,{children:[`Quantity: `,e?.quantity]}),(0,U.jsxs)(J,{children:[`Request Time: `,M9.format(e?.timeUTC)]}),(0,U.jsxs)(J,{children:[`Priority: `,e?.priority]}),e?.workorder&&(0,U.jsxs)(J,{children:[`Workorder: `,e?.workorder]}),(0,U.jsxs)(J,{children:[`Note: `,e?.notes]}),e?.job&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ky,{}),(0,U.jsxs)(J,{children:[`Scheduled Job: `,e?.job]}),(0,U.jsxs)(J,{children:[`Scheduled Time: `,e?.schTime?.toLocaleString()]})]})]})}),(0,U.jsxs)(jy,{children:[!e?.canceled&&!e?.job&&(0,U.jsxs)(X,{onClick:i,color:`secondary`,disabled:r,children:[r?(0,U.jsx)(qm,{size:24}):void 0,`Cancel Rebooking Request`]}),(0,U.jsx)(X,{onClick:()=>t(void 0),children:`Close`})]})]})}),iue=P(e=>Q.ofObject(e(Fk).jobs).map(([e,t])=>t.partName).concat(e(lk).valuesToLazySeq().map(e=>e.partName)).distinctAndSortBy(e=>e).toRArray()),aue=(0,L.memo)(function(){let[e,t]=(0,L.useState)(!1),[n,r]=(0,L.useState)({part:``}),i=R(iue),[a,o]=NR(),s=n.part!==``&&!!n.qty&&!isNaN(n.qty);function c(){t(!1),r({part:``})}function l(){s&&a(n).then(c).catch(console.log)}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Dy,{open:e,onClose:c,children:[(0,U.jsx)(By,{children:`Create New`}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(nw,{direction:`column`,spacing:2,sx:{mt:`0.5em`,minWidth:`25em`},children:[(0,U.jsx)(A_,{freeSolo:!0,selectOnFocus:!0,clearOnBlur:!0,handleHomeEndKeys:!0,disableClearable:!0,options:i,value:n.part,onChange:(e,t)=>r(e=>({...e,part:t})),renderInput:e=>(0,U.jsx)(lT,{...e,label:`Part Name`,slotProps:{input:{...e.slotProps.input,startAdornment:(0,U.jsxs)(U.Fragment,{children:[n.part===``?void 0:(0,U.jsx)(zb,{position:`start`,children:(0,U.jsx)(zU,{part:n.part,size:25})}),e.slotProps.input?.startAdornment]})}}}),renderOption:(e,t)=>(0,U.jsx)(`li`,{...e,children:(0,U.jsxs)(nw,{direction:`row`,spacing:`1`,sx:{alignItems:`center`},children:[(0,U.jsx)(zU,{part:t,size:25}),t]})}),filterOptions:(e,t)=>{let n=e.filter(e=>e.toLowerCase().includes(t.inputValue.toLowerCase()));return n.length===0&&t.inputValue!==``?[t.inputValue]:n}}),(0,U.jsx)(lT,{label:`Quantity`,type:`number`,value:n.qty&&!isNaN(n.qty)?n.qty:``,onChange:e=>r(t=>({...t,qty:parseInt(e.target.value)}))}),(0,U.jsx)(lT,{label:`Priority (optional)`,type:`number`,value:n.priority&&!isNaN(n.priority)?n.priority:``,onChange:e=>r(t=>({...t,priority:parseInt(e.target.value)}))}),(0,U.jsx)(lT,{label:`Workorder (optional)`,value:n.workorder??``,onChange:e=>r(t=>({...t,workorder:e.target.value}))}),(0,U.jsx)(lT,{label:`Notes (optional)`,multiline:!0,minRows:2,value:n.notes??``,onChange:e=>r(t=>({...t,notes:e.target.value}))})]})}),(0,U.jsxs)(jy,{children:[(0,U.jsxs)(X,{color:`secondary`,onClick:l,disabled:!s||o,children:[o?(0,U.jsx)(qm,{size:24}):void 0,`Create`]}),(0,U.jsx)(X,{onClick:c,children:`Cancel`})]})]}),(0,U.jsx)(tw,{title:`Add Rebooking`,children:(0,U.jsx)(Zy,{onClick:()=>t(!0),sx:{position:`fixed`,bottom:`24px`,right:`24px`},color:`primary`,children:(0,U.jsx)(yT,{})})})]})}),oue=(0,L.memo)(function(){let[e,t]=B(O9),[n,r]=B(k9),[i,a]=B(A9);return(0,U.jsxs)(Dy,{open:e,onClose:()=>t(!1),children:[(0,U.jsx)(By,{children:`Filter`}),(0,U.jsx)(Ly,{children:(0,U.jsxs)(nw,{direction:`column`,spacing:2,children:[(0,U.jsx)(lb,{control:(0,U.jsx)(Fv,{checked:n,onChange:e=>r(e.target.checked)}),label:`Hide scheduled`}),(0,U.jsx)(lb,{control:(0,U.jsx)(Fv,{checked:i,onChange:e=>a(e.target.checked)}),label:`Hide canceled`})]})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>t(!1),children:`Close`})})]})});function sue(){qI(R(vr).supportsRebookings??`Rebookings`);let[e,t]=(0,L.useState)(void 0);return(0,U.jsxs)(Y,{component:`main`,sx:{padding:`24px`},children:[(0,U.jsx)(nue,{setRebookingToShow:t}),(0,U.jsx)(rue,{rebooking:e,close:t}),(0,U.jsx)(aue,{}),(0,U.jsx)(oue,{})]})}var N9=P(Math.floor(Date.now()/6e4));N9.onMount=e=>{let t=setInterval(()=>{e(Math.floor(Date.now()/6e4))},6e4);return()=>clearInterval(t)};var P9=wk(`charts_last30WeekdayStartIdx`,0),F9=wk(`charts_last30WeekdayStartMinuteOffset`,360),I9=sk(e=>P(t=>{let n=t(P9),r=t(F9),i=new Date(t(N9)*6e4),a=YE(qE(i),r),o=YE(WE(i,{weekStartsOn:n}),r);switch(e){case`StartOfToday`:return a;case`StartOfYesterday`:return RE(a,-1);case`StartOfWeek`:return o;case`StartOfLastWeek`:return RE(o,-7);case`Last30`:return RE(i,-30)}})),L9=sk(e=>P(t=>{if(e===`Now`)return null;let n=t(P9),r=t(F9),i=new Date(t(N9)*6e4);switch(e){case`EndOfYesterday`:return YE(qE(i),r);case`EndOfLastWeek`:return YE(WE(i,{weekStartsOn:n}),r)}}));function cue(e){let t=wk(`charts_${e}_start`,`StartOfWeek`),n=wk(`charts_${e}_end`,`Now`);return P(e=>{let r=e(t),i=e(n);return{startType:r,endType:i,startDate:r instanceof Date?r:e(I9(r)),endDate:i instanceof Date?i:e(L9(i))}},(e,r,i)=>{`start`in i&&r(t,i.start),`end`in i&&r(n,i.end)})}function lue(e){return e.closeout_completed===void 0?!!(Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)||e.currently_quarantined):e.closeout_failed!==!1}var R9=cue(`part-summary`),uue=P(e=>{let t=e(dL),n=e(SA),r=e(R9),i=n.valuesToLazySeq().filter(e=>(r.startDate===null||e.endTime>=r.startDate)&&(r.endDate===null||e.endTime<=r.endDate)).toLookupOrderedMap(e=>e.part,e=>e.stationGroup,e=>({isLoadUnload:cA(e),elapsed:e.elapsedMinsPerMaterial*e.material.length,active:e.activeMinutes,medianElapsed:e.medianCycleMinutes}),(e,t)=>({isLoadUnload:e.isLoadUnload||t.isLoadUnload,elapsed:e.elapsed+t.elapsed,active:e.active+t.active,medianElapsed:e.medianElapsed+t.medianElapsed}));return t.matsById.valuesToLazySeq().filter(e=>!!(e.numProcesses&&e.unloaded_processes?.[e.numProcesses]&&(r.startDate===null||e.unloaded_processes[e.numProcesses]>=r.startDate)&&(r.endDate===null||e.unloaded_processes[e.numProcesses]<=r.endDate))).toOrderedLookup(e=>e.partName).mapValues((e,t)=>({part:t,completedQty:e.length,abnormalQty:Q.of(e).sumBy(e=>+!!lue(e)),mats:e,stationMins:nk.empty(),workorders:Q.of(e).toOrderedSet(e=>e.workorderId??``).delete(``)})).adjust(i,(e,t,n)=>e?{...e,stationMins:t}:{part:n,completedQty:0,abnormalQty:0,mats:[],stationMins:t,workorders:ek.empty()}).valuesToAscLazySeq().toRArray()});function due(e){return e===`CustomDate`||e===`StartOfToday`||e===`StartOfYesterday`||e===`StartOfWeek`||e===`StartOfLastWeek`||e===`Last30`}function fue(e){return e===`CustomDate`||e===`Now`||e===`EndOfYesterday`||e===`EndOfLastWeek`}function pue(e){switch(e){case`0`:return 0;case`1`:return 1;case`2`:return 2;case`3`:return 3;case`4`:return 4;case`5`:return 5;case`6`:return 6;default:return null}}function z9({label:e,date:t}){return(0,U.jsxs)(Y,{children:[(0,U.jsx)(J,{children:e}),t?(0,U.jsxs)(J,{variant:`subtitle2`,children:[`(`,t.toLocaleString(),`)`]}):void 0]})}function B9({date:e,setDate:t,enabled:n}){let r=R(I9(`Last30`));return(0,U.jsx)(lT,{type:`datetime-local`,value:e?new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,16):``,onChange:e=>t(new Date(e.target.value)),disabled:!n,label:`Custom Date`,slotProps:{inputLabel:{shrink:!0},htmlInput:{min:new Date(r.getTime()-r.getTimezoneOffset()*6e4).toISOString().slice(0,16)}}})}function mue({chartAtom:e}){let[t,n]=B(e),r=R(F9),[i,a]=(0,L.useState)(t.startType instanceof Date?t.startType:YE(lD(),r));function o(e){n(e===`CustomDate`?{start:i??new Date}:{start:e})}function s(e){a(e),n({start:e})}let c=R(I9(`StartOfToday`)),l=R(I9(`StartOfYesterday`)),u=R(I9(`StartOfWeek`)),d=R(I9(`StartOfLastWeek`)),f=R(I9(`Last30`));return(0,U.jsxs)(Y,{children:[(0,U.jsx)(J,{variant:`h6`,children:`Range Start`}),(0,U.jsx)(CC,{value:t.startType instanceof Date?`CustomDate`:t.startType,onChange:e=>{due(e.target.value)&&o(e.target.value)},children:(0,U.jsxs)(nw,{direction:`column`,spacing:2,children:[(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`StartOfToday`}),(0,U.jsx)(z9,{label:`Start of Today`,date:c})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`StartOfYesterday`}),(0,U.jsx)(z9,{label:`Start of Yesterday`,date:l})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`StartOfWeek`}),(0,U.jsx)(z9,{label:`Start of This Week`,date:u})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`StartOfLastWeek`}),(0,U.jsx)(z9,{label:`Start of Last Week`,date:d})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`Last30`}),(0,U.jsx)(z9,{label:`Last 30 Days`,date:f})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`CustomDate`}),(0,U.jsx)(B9,{enabled:t.startType instanceof Date,date:i,setDate:s})]})]})})]})}function hue({chartAtom:e}){let[t,n]=B(e),r=R(F9),[i,a]=(0,L.useState)(t.endType instanceof Date?t.endType:YE(lD(),r));function o(e){n(e===`CustomDate`?{end:i??new Date}:{end:e})}function s(e){a(e),n({end:e})}let c=R(L9(`EndOfYesterday`)),l=R(L9(`EndOfLastWeek`));return(0,U.jsxs)(Y,{children:[(0,U.jsx)(J,{variant:`h6`,children:`Range End`}),(0,U.jsx)(CC,{value:t.endType instanceof Date?`CustomDate`:t.endType,onChange:e=>{fue(e.target.value)&&o(e.target.value)},children:(0,U.jsxs)(nw,{direction:`column`,spacing:2,children:[(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`Now`}),(0,U.jsx)(J,{children:`Now`})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`EndOfYesterday`}),(0,U.jsx)(z9,{label:`End of Yesterday`,date:c})]}),(0,U.jsx)(Y,{sx:{height:`3em`}}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`EndOfLastWeek`}),(0,U.jsx)(z9,{label:`End of Last Week`,date:l})]}),(0,U.jsx)(Y,{sx:{height:`3em`}}),(0,U.jsxs)(nw,{direction:`row`,sx:{alignItems:`center`,minHeight:`3em`},children:[(0,U.jsx)(bC,{value:`CustomDate`}),(0,U.jsx)(B9,{enabled:t.endType instanceof Date,date:i,setDate:s})]})]})})]})}function gue(e){let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`}function _ue({chartAtom:e,open:t,setOpen:n}){let[r,i]=B(P9),[a,o]=B(F9);return(0,U.jsxs)(Dy,{open:t,onClose:()=>n(!1),maxWidth:`md`,children:[(0,U.jsx)(Ly,{children:(0,U.jsxs)(nw,{direction:`column`,spacing:2,divider:(0,U.jsx)(Ky,{orientation:`horizontal`,flexItem:!0}),children:[(0,U.jsxs)(nw,{direction:`row`,spacing:2,divider:(0,U.jsx)(Ky,{orientation:`vertical`,flexItem:!0}),children:[(0,U.jsx)(mue,{chartAtom:e}),(0,U.jsx)(hue,{chartAtom:e})]}),(0,U.jsxs)(nw,{direction:`row`,sx:{justifyContent:`space-around`},children:[(0,U.jsxs)(lT,{select:!0,label:`First Day Of Week`,sx:{minWidth:`10em`},value:r,onChange:e=>{let t=pue(e.target.value);t!==null&&i(t)},children:[(0,U.jsx)(GS,{value:0,children:`Sunday`}),(0,U.jsx)(GS,{value:1,children:`Monday`}),(0,U.jsx)(GS,{value:2,children:`Tuesday`}),(0,U.jsx)(GS,{value:3,children:`Wednesday`}),(0,U.jsx)(GS,{value:4,children:`Thursday`}),(0,U.jsx)(GS,{value:5,children:`Friday`}),(0,U.jsx)(GS,{value:6,children:`Saturday`})]}),(0,U.jsx)(lT,{type:`time`,label:`Day Start Time`,sx:{minWidth:`10em`},value:gue(a),onChange:e=>{let t=e.target.value;if(t===``)o(0);else{let[e,n]=t.split(`:`).map(Number);o(e*60+n)}}})]})]})}),(0,U.jsx)(jy,{children:(0,U.jsx)(X,{onClick:()=>n(!1),children:`Close`})})]})}function vue(e,t){if(e instanceof Date)return e.toLocaleString();switch(e){case`StartOfToday`:return`Start of Today${t?` (${t.toLocaleString()})`:``}`;case`StartOfYesterday`:return`Start of Yesterday${t?` (${t.toLocaleString()})`:``}`;case`StartOfWeek`:return`Start of This Week${t?` (${t.toLocaleString()})`:``}`;case`StartOfLastWeek`:return`Start of Last Week${t?` (${t.toLocaleString()})`:``}`;case`Last30`:return`Last 30 Days${t?` (${t.toLocaleString()})`:``}`}}function yue(e,t){if(e instanceof Date)return e.toLocaleString();switch(e){case`Now`:return`Now`;case`EndOfYesterday`:return`End of Yesterday${t?` (${t.toLocaleString()})`:``}`;case`EndOfLastWeek`:return`End of Last Week${t?` (${t.toLocaleString()})`:``}`}}var bue=(0,L.memo)(function({chartAtom:e}){let t=R(e),[n,r]=(0,L.useState)(!1);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`},children:[(0,U.jsxs)(J,{variant:`body2`,color:`textSecondary`,children:[`Range: `,vue(t.startType,t.startDate),` -`,` `,yue(t.endType,t.endDate)]}),(0,U.jsx)(tw,{title:`Edit Range`,children:(0,U.jsx)($m,{onClick:()=>r(!0),children:(0,U.jsx)(VT,{})})})]}),(0,U.jsx)(_ue,{open:n,setOpen:r,chartAtom:e})]})}),V9=new Intl.NumberFormat(void 0,{maximumFractionDigits:1});function xue(e,t,n){let r;switch(t){case`PartName`:r=e=>e.part;break;case`CompletedQty`:r=e=>e.completedQty;break;case`AbnormalQty`:r=e=>e.abnormalQty;break;case`Workorders`:r=e=>e.workorders.lookupMin()?.[0]??null;break;case`Elapsed`:r=e=>e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.elapsed);break;case`Active`:r=e=>e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.active);break;case`Median`:r=e=>e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.medianElapsed);break}let i=[...e];return i.sort(ND(n===`asc`?{asc:r}:{desc:r})),i}var Sue=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});function Cue(e,t,n){let r;switch(t){case`Serial`:r=e=>e.serial??null;break;case`CompletedDate`:r=e=>e.last_unload_time??null;break;case`Workorder`:r=e=>e.workorderId??null;break;case`Quarantined`:r=e=>e.currently_quarantined??null;break;case`InspectFailed`:r=e=>Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)?-1:0;break;case`CloseOut`:r=e=>e.closeout_failed===void 0?1:e.closeout_failed?-1:0;break}let i=[...e];return i.sort(ND(n===`asc`?{asc:r}:{desc:r})),i}function H9(e){return(0,U.jsxs)(Z,{align:e.align,sortDirection:e.sortBy===e.col&&e.order,sx:e.noWhitespaceWrap?{whiteSpace:`nowrap`}:void 0,children:[(0,U.jsx)(tw,{title:`Sort`,enterDelay:300,children:(0,U.jsx)(zw,{active:e.sortBy===e.col,direction:e.order,onClick:()=>{e.col===e.sortBy?e.setOrder(e.order===`asc`?`desc`:`asc`):(e.setSortBy(e.col),e.setOrder(`asc`))},children:e.children})}),e.extraIcon]})}var U9=(0,L.memo)(function({workorderId:e}){return!e||e===``?(0,U.jsx)(`span`,{}):(0,U.jsx)(jie,{to:{route:$.Operations_CurrentWorkorders,workorder:e},children:e})});function wue({material:e}){let t=z(SI),[n,r]=(0,L.useState)(`Serial`),[i,a]=(0,L.useState)(`asc`),o=(0,L.useMemo)(()=>Cue(e,n,i),[e,n,i]),s={sortBy:n,setSortBy:r,order:i,setOrder:a},[c,l]=(0,L.useState)(10),[u,d]=(0,L.useState)(0),f=o.slice(u*c,(u+1)*c);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(H9,{col:`Serial`,...s,children:`Serial`}),(0,U.jsx)(H9,{col:`CompletedDate`,...s,children:`Completed`}),(0,U.jsx)(H9,{col:`Workorder`,...s,children:`Workorder`}),(0,U.jsx)(H9,{col:`Quarantined`,...s,children:`Quarantine?`}),(0,U.jsx)(H9,{col:`InspectFailed`,noWhitespaceWrap:!0,...s,children:`Inspect Failed?`}),(0,U.jsx)(H9,{col:`CloseOut`,noWhitespaceWrap:!0,...s,children:`Close Out`}),(0,U.jsx)(Z,{padding:`checkbox`})]})}),(0,U.jsxs)(Sw,{children:[f.map(e=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e.serial??``}),(0,U.jsx)(Z,{children:e.last_unload_time?Sue.format(e.last_unload_time):``}),(0,U.jsx)(Z,{children:(0,U.jsx)(U9,{workorderId:e.workorderId})}),(0,U.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.currently_quarantined?(0,U.jsx)(gE,{fontSize:`inherit`}):``}),(0,U.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:Q.ofObject(e.completedInspections??{}).some(([,e])=>!e.success)?(0,U.jsx)(UT,{fontSize:`inherit`}):``}),(0,U.jsx)(Z,{sx:{textAlign:`center`},padding:`checkbox`,children:e.closeout_completed===void 0?``:e.closeout_failed===!1?(0,U.jsx)(AT,{fontSize:`inherit`}):(0,U.jsx)(UT,{fontSize:`inherit`})}),(0,U.jsx)(Z,{padding:`checkbox`,children:(0,U.jsx)($m,{onClick:()=>t({type:`MatSummary`,summary:e}),size:`large`,children:(0,U.jsx)(lE,{fontSize:`inherit`})})})]},e.materialID)),Q.ofRange(0,c-f.length).map(e=>(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{colSpan:7,children:`\xA0`})},e))]})]}),(0,U.jsxs)(Ew,{variant:`dense`,sx:{mb:`0.5em`},children:[(0,U.jsx)(J,{color:`textSecondary`,variant:`caption`,children:`Rows per page:`}),(0,U.jsx)(zC,{style:{marginLeft:8,marginRight:`1em`},value:c,SelectDisplayProps:{style:{color:`rgba(0, 0, 0, 0.54)`}},input:(0,U.jsx)(uf,{}),onChange:t=>{let n=t.target.value;l(n);let r=Math.ceil(e.length/n)-1;u>r&&d(r)},children:[10,15,20,50].map(e=>(0,U.jsx)(GS,{value:e,children:e},e))}),(0,U.jsx)(J,{color:`textSecondary`,variant:`caption`,children:`${e.length===0?0:u*c+1}-${Math.min(e.length,(u+1)*c)} of ${e.length}`}),(0,U.jsx)($m,{onClick:()=>d(0),disabled:u===0,"aria-label":`First Page`,size:`large`,children:(0,U.jsx)(JT,{})}),(0,U.jsx)($m,{onClick:()=>d(u-1),disabled:u===0,"aria-label":`Previous Page`,size:`large`,children:(0,U.jsx)(rE,{})}),(0,U.jsx)($m,{onClick:()=>d(u+1),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Next Page`,size:`large`,children:(0,U.jsx)(iE,{})}),(0,U.jsx)($m,{onClick:()=>d(Math.max(0,Math.ceil(e.length/c)-1)),disabled:u>=Math.ceil(e.length/c)-1,"aria-label":`Last Page`,size:`large`,children:(0,U.jsx)(oE,{})})]})]})}var Tue=(0,L.memo)(function({part:e}){return(0,U.jsxs)(nw,{direction:`row`,sx:{flexWrap:`wrap`,justifyContent:`space-around`,ml:`1em`,mr:`1em`},children:[(0,U.jsx)(Y,{sx:{width:`60em`,overflow:`auto`},children:(0,U.jsx)(wue,{material:e.mats})}),(0,U.jsx)(Y,{sx:{width:`40em`,overflow:`auto`},children:(0,U.jsxs)(yw,{size:`small`,children:[(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:`Station`}),(0,U.jsx)(Z,{children:`Active Hours`}),(0,U.jsx)(Z,{children:`Elapsed Hours`}),(0,U.jsx)(Z,{children:`Total Median Hours`})]})}),(0,U.jsx)(Sw,{children:e.stationMins.toAscLazySeq().map(([e,t])=>(0,U.jsxs)(Mw,{children:[(0,U.jsx)(Z,{children:e}),(0,U.jsx)(Z,{children:V9.format(t.active/60)}),(0,U.jsx)(Z,{children:V9.format(t.elapsed/60)}),(0,U.jsx)(Z,{children:V9.format(t.medianElapsed/60)})]},e))})]})})]})}),Eue=K(Mw)({"& > *":{borderBottom:`unset !important`}}),Due=(0,L.memo)(function({part:e}){let[t,n]=(0,L.useState)(!1);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Eue,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(Y,{sx:{display:`flex`,alignItems:`center`},children:[(0,U.jsx)(Y,{sx:{mr:`0.2em`},children:(0,U.jsx)(zU,{part:e.part,size:25})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(J,{variant:`body2`,component:`span`,sx:{display:`block`},children:e.part})})]})}),(0,U.jsx)(Z,{align:`right`,children:e.completedQty}),(0,U.jsx)(Z,{align:`right`,children:e.abnormalQty}),(0,U.jsx)(Z,{align:`right`,children:V9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([e,t])=>t.active)/60)}),(0,U.jsx)(Z,{align:`right`,children:V9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.elapsed)/60)}),(0,U.jsx)(Z,{align:`right`,children:V9.format(e.stationMins.toAscLazySeq().filter(([e,t])=>!t.isLoadUnload).sumBy(([,e])=>e.medianElapsed)/60)}),(0,U.jsx)(Z,{align:`left`,children:e.workorders.size<=1?(0,U.jsx)(U9,{workorderId:e.workorders.lookupMin()??null}):e.workorders.size===2?(0,U.jsxs)(`span`,{children:[(0,U.jsx)(U9,{workorderId:e.workorders.lookupMin()}),` &`,` `,(0,U.jsx)(U9,{workorderId:e.workorders.lookupMax()})]}):`${e.workorders.size} workorders`}),(0,U.jsx)(Z,{children:(0,U.jsx)(tw,{title:`Show Details`,children:(0,U.jsx)($m,{size:`small`,onClick:()=>n(!t),children:t?(0,U.jsx)(aE,{}):(0,U.jsx)(nE,{})})})})]}),(0,U.jsx)(Mw,{children:(0,U.jsx)(Z,{sx:{pb:`0`,pt:`0`},colSpan:7,children:(0,U.jsx)(Lp,{in:t,timeout:`auto`,unmountOnExit:!0,children:(0,U.jsx)(Tue,{part:e})})})})]})});function Oue({partsAtom:e}){let t=R(e);return(0,U.jsx)(tw,{title:`Copy to Clipboard`,children:(0,U.jsx)($m,{style:{height:`25px`,paddingTop:0,paddingBottom:0},size:`large`,onClick:()=>Fue(t),children:(0,U.jsx)($T,{})})})}function kue(){return(0,U.jsx)(tw,{title:`Total Median Hours are calculated by taking the median cycle time (excluding outliers) and adding up for each piece of material.`,children:(0,U.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,U.jsx)(XT,{fontSize:`inherit`})})})}function W9(){return(0,U.jsx)(tw,{title:`The entire cycle time is credited at the time the cycle completes, so it may be that a day has more than 24 hours of credited time for example.`,children:(0,U.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,U.jsx)(XT,{fontSize:`inherit`})})})}function Aue(){return(0,U.jsx)(tw,{title:`An abnormal part is one which was quarantined, had a failed inspection, or was explicitly marked as failing closeout. A successful closeout overrides this and will never be an abnormal part.`,children:(0,U.jsx)(`span`,{style:{verticalAlign:`middle`,marginLeft:`0.5em`,fontSize:16},children:(0,U.jsx)(XT,{fontSize:`inherit`})})})}var jue=(0,L.memo)(function({partsAtom:e,order:t,setOrder:n,sortBy:r,setSortBy:i}){let a={sortBy:r,setSortBy:i,order:t,setOrder:n};return(0,U.jsx)(Tw,{children:(0,U.jsxs)(Mw,{children:[(0,U.jsx)(H9,{align:`left`,col:`PartName`,...a,children:`Part`}),(0,U.jsx)(H9,{align:`right`,col:`CompletedQty`,...a,children:`Completed Quantity`}),(0,U.jsx)(H9,{align:`right`,col:`AbnormalQty`,...a,extraIcon:(0,U.jsx)(Aue,{}),children:`Abnormal Quantity`}),(0,U.jsx)(H9,{align:`right`,col:`Active`,...a,extraIcon:(0,U.jsx)(W9,{}),children:`Active Hours`}),(0,U.jsx)(H9,{align:`right`,col:`Elapsed`,...a,extraIcon:(0,U.jsx)(W9,{}),children:`Elapsed Hours`}),(0,U.jsx)(H9,{align:`right`,col:`Median`,...a,extraIcon:(0,U.jsx)(kue,{}),children:`Total Median Hours`}),(0,U.jsx)(H9,{align:`left`,col:`Workorders`,...a,children:`Workorders`}),(0,U.jsx)(Z,{children:(0,U.jsx)(Oue,{partsAtom:e})})]})})}),G9=(0,L.memo)(function({partsAtom:e}){let t=R(e),[n,r]=(0,L.useState)(`PartName`),[i,a]=(0,L.useState)(`asc`),o=xue(t,n,i);return(0,U.jsxs)(yw,{stickyHeader:!0,children:[(0,U.jsx)(jue,{partsAtom:e,sortBy:n,setSortBy:r,order:i,setOrder:a}),(0,U.jsx)(Sw,{children:o.map(e=>(0,U.jsx)(Due,{part:e},e.part))})]})});function Mue(){let e=z(k0),t=R(TI),[n,r]=II(),i=z(SI);if(t===null||t.materialID<0)return null;function a(e){t!==null&&(n({mat:t,operator:`Manager`,failed:e}),i(null))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>a(!0),children:`Fail CloseOut`}),(0,U.jsx)(X,{color:`primary`,disabled:r,onClick:()=>a(!1),children:`Pass CloseOut`}),(0,U.jsx)(X,{color:`primary`,onClick:()=>e(!0),children:`Change Workorder`})]})}var Nue=(0,L.memo)(function(){return(0,U.jsx)(pW,{buttons:(0,U.jsx)(Mue,{})})});function Pue(){return qI(`Completed Parts`),(0,U.jsxs)(Y,{component:`main`,sx:{padding:`24px`},children:[(0,U.jsxs)(nw,{direction:`row`,spacing:2,sx:{alignItems:`center`,justifyContent:`space-between`},children:[(0,U.jsx)(`span`,{children:`Completed Parts`}),(0,U.jsx)(bue,{chartAtom:R9})]}),(0,U.jsx)(G9,{partsAtom:uue}),(0,U.jsx)(Nue,{}),(0,U.jsx)(P0,{})]})}function Fue(e){let t=`<table>
|
|
384
|
-
<thead><tr>`;t+=`<th>Part</th>`,t+=`<th>Completed Qty</th>`,t+=`<th>Abnormal Qty</th>`,t+=`<th>Workorders</th>`,t+=`<th>Active Machine Time (mins)</th>`,t+=`<th>Elapsed Machine Time (mins)</th>`,t+=`<th>Total Median Machine Time (mins)</th>`,t+=`<th>Active L/U Time (mins)</th>`,t+=`<th>Elapsed L/U Time (mins)</th>`,t+=`<th>Total Median L/U Time (mins)</th>`,t+=`</tr></thead>
|
|
385
|
-
<tbody>
|
|
386
|
-
`;for(let n of e){t+=`<tr>`,t+=`<td>${n.part}</td>`,t+=`<td>${n.completedQty}</td>`,t+=`<td>${n.abnormalQty}</td>`,t+=`<td>${n.workorders.toAscLazySeq().toRArray().join(`;`)}</td>`;for(let e of[!1,!0]){let r=n.stationMins.toAscLazySeq().filter(([t,n])=>n.isLoadUnload===e).toRArray();r.length===0?t+=`<td>0</td><td>0</td><td>0</td>`:r.length===1?(t+=`<td>${r[0][1].active}</td>`,t+=`<td>${r[0][1].elapsed}</td>`,t+=`<td>${r[0][1].medianElapsed}</td>`):(t+=`<td>${r.map(([e,t])=>`${e}: ${t.active}`).join(`;`)}</td>`,t+=`<td>${r.map(([e,t])=>`${e}: ${t.elapsed}`).join(`;`)}</td>`,t+=`<td>${r.map(([e,t])=>`${e}: ${t.medianElapsed}`).join(`;`)}</td>`)}t+=`</tr>
|
|
387
|
-
`}t+=`</tbody></table>
|
|
388
|
-
`,XA(t,{format:`text/html`})}var K9=`bms-operations-reports-tab`,q9=[{separator:`Load/Unload`},{name:`L/U Outliers`,route:{route:$.Operations_LoadOutliers},icon:(0,U.jsx)(CT,{})},{name:`L/U Hours`,route:{route:$.Operations_LoadHours},icon:(0,U.jsx)(QT,{})},{name:`L/U Cycles`,route:{route:$.Operations_LoadCycles},icon:(0,U.jsx)(wE,{})},{separator:`Machines`},{name:`MC Outliers`,route:{route:$.Operations_MachineOutliers},icon:(0,U.jsx)(CT,{})},{name:`MC Hours`,route:{route:$.Operations_MachineHours},icon:(0,U.jsx)(QT,{})},{name:`MC Cycles`,route:{route:$.Operations_MachineCycles},icon:(0,U.jsx)(wE,{})},{name:`Tools`,route:{route:$.Operations_Tools},icon:(0,U.jsx)(RT,{})},{name:`Programs`,route:{route:$.Operations_Programs},icon:(0,U.jsx)(pE,{})},{separator:`Material`},{name:`Quality`,route:{route:$.Operations_Quality},icon:(0,U.jsx)(wT,{})},{name:`Inspections`,route:{route:$.Operations_Inspections},icon:(0,U.jsx)(bT,{})},{name:`Close Out`,route:{route:$.Operations_CloseoutReport},icon:(0,U.jsx)(dE,{})},{separator:`Cell`},{name:`Schedules`,route:{route:$.Operations_RecentSchedules},icon:(0,U.jsx)(TT,{})},{name:`Workorders`,route:{route:$.Operations_CurrentWorkorders},icon:(0,U.jsx)(KT,{})},{name:`Production`,route:{route:$.Operations_Production},icon:(0,U.jsx)(jT,{})},{name:`Part Summary`,route:{route:$.Operations_Parts},icon:(0,U.jsx)(CE,{})},{name:e=>e.supportsRebookings??`Rebooking`,route:{route:$.Operations_Rebookings},icon:(0,U.jsx)(hE,{}),hidden:e=>e.supportsRebookings===null||e.supportsRebookings===``}];function Iue(e){return[{separator:`Efficiency`},{name:`Buffers`,route:{route:$.Analysis_Buffers},icon:(0,U.jsx)(zT,{})},{name:`Station OEE`,route:{route:$.Analysis_StationOEE},icon:(0,U.jsx)(QT,{})},{name:`Completed Parts`,route:{route:$.Analysis_PartsCompleted},icon:(0,U.jsx)(KT,{})},{separator:`Cycles`},{name:`Machine Cycles`,route:{route:$.Analysis_MachineCycles},icon:(0,U.jsx)(wE,{})},{name:`L/U Cycles`,route:{route:$.Analysis_LoadCycles},icon:(0,U.jsx)(vT,{})},{name:`Pallet Cycles`,route:{route:$.Analysis_PalletCycles},icon:(0,U.jsx)(yE,{})},{name:e=>_A(e.basketName)+` Cycles`,route:{route:$.Analysis_BasketCycles},icon:(0,U.jsx)(yE,{}),hidden:()=>!e},{separator:`Cell`},{name:`Quality`,route:{route:$.Analysis_Quality},icon:(0,U.jsx)(wT,{})},{name:`Tool Replacements`,route:{route:$.Analysis_ToolReplacements},icon:(0,U.jsx)(RT,{})},{name:`Schedules`,route:{route:$.Analysis_Schedules},icon:(0,U.jsx)(TT,{})},{separator:`Costs`},{name:`Percentages`,route:{route:$.Analysis_CostPercents},icon:(0,U.jsx)(OT,{})},{name:`Cost/Piece`,route:{route:$.Analysis_CostPerPiece},icon:(0,U.jsx)(ST,{})}]}function Lue(e){return typeof e==`string`&&Object.values($).includes(e)}function Rue(e){return Lue(e)&&e!==$.Client_Custom&&e!==$.Operations_CurrentWorkorders&&e!==$.Station_InspectionMonitorWithType&&e!==$.Station_LoadMonitor&&e!==$.Station_Queues}function zue(e){return{route:e}}function J9({children:e}){let[t,n]=B(GI),r=gT(Ed().breakpoints.down(`md`)),[,i]=(0,L.useTransition)(),a=q9.some(e=>`separator`in e?!1:e.route.route===t.route);return(0,U.jsx)(iT,{variant:r&&(!Array.isArray(e)||e.length<5)?`fullWidth`:`scrollable`,value:a?K9:t.route,onChange:(e,t)=>i(()=>{t===K9?n({route:$.Operations_MachineCycles}):Rue(t)&&n(zue(t))}),textColor:`inherit`,scrollButtons:!0,allowScrollButtonsMobile:!0,indicatorColor:`secondary`,children:e})}function Y9(){return(0,U.jsxs)(J9,{children:[(0,U.jsx)(gw,{label:`Operations`,value:$.Operations_Dashboard}),(0,U.jsx)(gw,{label:`Cell`,value:$.Operations_SystemOverview}),(0,U.jsx)(gw,{label:`Material`,value:$.Operations_AllMaterial}),(0,U.jsx)(gw,{label:`Reports`,value:K9})]})}function X9(){return(0,U.jsxs)(J9,{children:[(0,U.jsx)(gw,{label:`Material`,value:$.Quality_Dashboard}),(0,U.jsx)(gw,{label:`Paths`,value:$.Quality_Paths}),(0,U.jsx)(gw,{label:`Quarantine Material`,value:$.Quality_Quarantine})]})}function Z9(){return(0,U.jsxs)(J9,{children:[(0,U.jsx)(gw,{label:`Tools`,value:$.Tools_Dashboard}),(0,U.jsx)(gw,{label:`Programs`,value:$.Tools_Programs})]})}function Q9(){return(0,U.jsxs)(J9,{children:[(0,U.jsx)(gw,{label:`Cycles`,value:$.Engineering_Cycles}),(0,U.jsx)(gw,{label:`Hours`,value:$.Engineering_Hours}),(0,U.jsx)(gw,{label:`Outliers`,value:$.Engineering_Outliers})]})}function $9(){return R(gR)===null?null:(0,U.jsxs)(J9,{children:[(0,U.jsx)(gw,{label:`Workorders`,value:$.Sales_Dashboard}),(0,U.jsx)(gw,{label:`Projections`,value:$.Sales_ProjectedUsage})]})}var Bue=(0,L.memo)(function(e){Mie();let t=R(vr),n=R(ZL),r=R(eR),[i,a]=B(GI),o=Iue(n||r),s=t.user!==null&&t.user!==void 0,c,l,u,d,f=!0,p=!0,m=!1,h=!0;if(gr(t)&&!t.user)c=(0,U.jsxs)(`div`,{style:{textAlign:`center`,marginTop:`4em`},children:[(0,U.jsx)(`h3`,{children:`Please Login`}),(0,U.jsx)(X,{variant:`contained`,color:`primary`,onClick:()=>yr(t),children:`Login`})]}),f=!1,p=!1;else switch(i.route){case $.Station_LoadMonitor:c=(0,U.jsx)(Q2,{loadNum:i.loadNum,queues:i.queues,completed:i.completed,submitBasketLoadStationCommand:e.submitBasketLoadStationCommand}),l=k3,u=A3,m=!0,h=!1;break;case $.Station_InspectionMonitor:c=(0,U.jsx)(o4,{focusInspectionType:null}),l=k3,u=A3,m=!0,h=!1;break;case $.Station_InspectionMonitorWithType:c=(0,U.jsx)(o4,{focusInspectionType:i.inspType}),l=k3,u=A3,m=!0,h=!1;break;case $.Station_Closeout:c=(0,U.jsx)(p4,{}),l=k3,u=A3,m=!0,h=!1;break;case $.Station_Queues:c=(0,U.jsx)(pX,{queues:i.queues}),l=k3,u=A3,m=!0,h=!1;break;case $.Station_Overview:c=(0,U.jsx)(b2,{}),h=!1;break;case $.Analysis_Quality:c=(0,U.jsx)(S3,{}),l=_7,d=o,f=!1;break;case $.Analysis_ToolReplacements:c=(0,U.jsx)(ole,{}),l=_7,d=o,f=!1;break;case $.Analysis_Schedules:c=(0,U.jsx)(x3,{}),l=_7,d=o,f=!1;break;case $.Analysis_Buffers:c=(0,U.jsx)($se,{}),l=_7,d=o,f=!1;break;case $.Analysis_StationOEE:c=(0,U.jsx)(hce,{}),l=_7,d=o,f=!1;break;case $.Analysis_PartsCompleted:c=(0,U.jsx)(yce,{}),l=_7,d=o,f=!1;break;case $.Analysis_MachineCycles:c=(0,U.jsx)(kce,{}),l=_7,d=o,f=!1;break;case $.Analysis_LoadCycles:c=(0,U.jsx)(Rce,{}),l=_7,d=o,f=!1;break;case $.Analysis_PalletCycles:c=(0,U.jsx)(Wce,{}),l=_7,d=o,f=!1;break;case $.Analysis_BasketCycles:c=(0,U.jsx)(Xce,{}),l=_7,d=o,f=!1;break;case $.Analysis_CostPercents:c=(0,U.jsx)(DW,{}),l=_7,d=o,f=!1;break;case $.Analysis_CostPerPiece:c=(0,U.jsx)(kW,{}),l=_7,d=o,f=!1;break;case $.Operations_Dashboard:c=(0,U.jsx)(Lie,{}),l=Y9;break;case $.Operations_SystemOverview:c=(0,U.jsx)(b2,{ignoreOperator:!0}),l=Y9,h=!1;break;case $.Operations_AllMaterial:c=(0,U.jsx)(JX,{displaySystemBins:!0}),l=Y9,h=!1;break;case $.Operations_LoadOutliers:c=(0,U.jsx)(o6,{outlierTy:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadHours:c=(0,U.jsx)(w6,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_LoadCycles:c=(0,U.jsx)(g7,{ty:`labor`}),l=Y9,d=q9;break;case $.Operations_MachineOutliers:c=(0,U.jsx)(o6,{outlierTy:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineHours:c=(0,U.jsx)(w6,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_MachineCycles:c=(0,U.jsx)(g7,{ty:`machine`}),l=Y9,d=q9;break;case $.Operations_RecentSchedules:c=(0,U.jsx)(xX,{}),l=Y9,d=q9;break;case $.Operations_CurrentWorkorders:c=(0,U.jsx)(E9,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Production:c=(0,U.jsx)(Q3,{}),l=Y9,d=q9;break;case $.Operations_Quality:c=(0,U.jsx)(D0,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Inspections:c=(0,U.jsx)(O0,{}),l=Y9,d=q9;break;case $.Operations_CloseoutReport:c=(0,U.jsx)(tue,{}),l=Y9,d=q9,h=!1;break;case $.Operations_Tools:c=(0,U.jsx)(Y4,{}),l=Y9,d=q9;break;case $.Operations_Programs:c=(0,U.jsx)(s3,{}),l=Y9,d=q9;break;case $.Operations_Rebookings:c=(0,U.jsx)(sue,{}),l=Y9,d=q9;break;case $.Operations_Parts:c=(0,U.jsx)(Pue,{}),l=Y9,d=q9,h=!1;break;case $.Engineering_Cycles:c=(0,U.jsx)(g7,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Hours:c=(0,U.jsx)(w6,{ty:`machine`}),f=!1,l=Q9;break;case $.Engineering_Outliers:c=(0,U.jsx)(o6,{outlierTy:`machine`}),f=!1,l=Q9;break;case $.Quality_Dashboard:c=(0,U.jsx)(D0,{}),l=X9,f=!1,h=!1;break;case $.Quality_Paths:c=(0,U.jsx)(O0,{}),l=X9,f=!1;break;case $.Quality_Quarantine:c=(0,U.jsx)(JX,{displaySystemBins:!1}),l=X9,f=!1,h=!1;break;case $.Tools_Dashboard:c=(0,U.jsx)(Y4,{}),l=Z9;break;case $.Tools_Programs:c=(0,U.jsx)(s3,{}),l=Z9;break;case $.Sales_Dashboard:c=(0,U.jsx)(E9,{disableSearch:!0}),l=$9,f=!1;break;case $.Sales_ProjectedUsage:c=(0,U.jsx)(Wle,{}),l=$9,f=!1;break;case $.VerboseLogging:c=(0,U.jsx)($3,{}),p=!1,f=!1;break;case $.Client_Custom:{let n=e.renderCustomPage?.(i.custom);l=n?.nav,c=n?.page??(0,U.jsx)(jW,{setRoute:a,modes:e.chooseModes?.(t)}),f=!1;break}case $.ChooseMode:default:c=(0,U.jsx)(jW,{setRoute:a,modes:e.chooseModes?.(t)}),p=!1,f=!1}return(0,U.jsxs)(`div`,{id:`App`,children:[(0,U.jsx)(aae,{showAlarms:f,showSearch:p,showLogout:s,showOperator:m,Nav1:l,Nav2:u,menuNavs:d}),(0,U.jsxs)(`div`,{style:{display:`flex`},children:[(0,U.jsx)(oae,{menuItems:d}),(0,U.jsx)(`div`,{style:{flexGrow:1},children:c})]}),h?(0,U.jsx)(pW,{}):void 0,(0,U.jsx)(_3,{}),(0,U.jsx)(kq,{})]})});function Vue(e,t,n){let r=id({palette:{primary:Mr,secondary:Pr}});(0,_T.createRoot)(t).render((0,U.jsxs)(Vf,{theme:r,children:[(0,U.jsx)(Uv,{}),(0,U.jsx)(L.StrictMode,{children:(0,U.jsx)(_e,{store:n,children:(0,U.jsx)(Bue,{...e})})})]}))}async function Hue(e={},t){let n=t??document.getElementById(`root`);if(!n)throw Error(`Unable to start FMS Insight: no root element was provided or found`);qt();let r=I();r.set(vr,await _r()),Vue(e,n,r)}async function Uue(){await Hue({})}Uue().catch(e=>{console.log(e);let t=`Error loading Insight`;e instanceof Rt&&(t=`Error loading Insight: `+e.message+` `+e.response);let n=document.createElement(`p`);n.textContent=t,(document.getElementById(`loading`)??document.body).appendChild(n)});
|