PageSourceSearch

https://optimalspa.com.ng/assets/index--1ZNtAUl.js

js optimalspa.com.ng collected 2026-10-07 14:04:17 UTC 457,506 bytes, 12 lines download raw bytes

vendor: 19,636 bytes, line 1
1var 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,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},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(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)}})();var l=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 ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var D=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ie(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 ae(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,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(D,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(D,`$&/`)+`/`)+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+re(a,u),c+=ae(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+re(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(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 oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function se(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 O=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)},k={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=k,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 ee(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 ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:se}},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,O)}catch(e){O(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.7`})),u=o(((e,t)=>{t.exports=l()})),d=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,E());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function te(){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&&ee());){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&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():S=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,D=ne.port2;ne.port1.onmessage=te,E=function(){D.postMessage(null)}}else E=function(){_(te,0)};function re(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,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,E()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();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.7`})),m=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=p()})),h=o((e=>{var t=f(),n=u(),r=m();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 d(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 p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Symbol.for(`react.client.reference`);function oe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case ee:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var se=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function A(e,t){ue++,le[ue]=e.current,e.current=t}var pe=de(null),me=de(null),he=de(null),ge=de(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(pe),A(pe,e)}
vendor: 13,999 bytes, lines 1-8
1function ve(){fe(pe),fe(me),fe(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(fe(pe),fe(me)),ge.current===e&&(fe(ge),Qf._currentValue=ce)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
2    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!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(`
4`),l=s.split(`
5`);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=`
6`+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{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7Error generating stack: `+e.message+`
8`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(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 $e(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=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(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 et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(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-Ge(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&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(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 ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=k.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ft(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[mt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[xt]=!0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=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]*$`),Nt={},Pt={};function Ft(e){return Oe.call(Pt,e)?!0:Oe.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}function It(e,t,n){if(Ft(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 Lt(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 Rt(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 zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(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 Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(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 Gt=/[\n"\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function qt(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=``+zt(t)):e.value!==``+zt(t)&&(e.value=``+zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,zt(n)):Yt(e,o,zt(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=``+zt(s):e.removeAttribute(`name`)}function Jt(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)){Ht(e);return}n=n==null?``:``+zt(n),t=t==null?n:``+zt(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),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(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=``+zt(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 Zt(e,t,n){if(t!=null&&(t=``+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+zt(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(se(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=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 tn(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||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(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&&tn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&tn(e,o,t[o])}function rn(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 an=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`],[`
8clipPath`,`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`]]),on=/^[\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 sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(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="`+Kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ht]||null;if(!a)throw Error(i(90));qt(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&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(bu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||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 _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.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 Sn=i.slice(e,1<r?1-r:void 0)}function wn(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 Tn(){return!0}function En(){return!1}function Dn(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)?Tn:En,this.isPropagationStopped=En,this}return h(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=Tn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kn=Dn(On),An=h({},On,{view:0,detail:0}),jn=Dn(An),Mn,Nn,Pn,Fn=h({},An,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gn,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!==Pn&&(Pn&&e.type===`mousemove`?(Mn=e.screenX-Pn.screenX,Nn=e.screenY-Pn.screenY):Nn=Mn=0,Pn=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),j=Dn(Fn),In=Dn(h({},Fn,{dataTransfer:0})),Ln=Dn(h({},An,{relatedTarget:0})),Rn=Dn(h({},On,{animationName:0,elapsedTime:0,pseudoElement:0})),zn=Dn(h({},On,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Bn=Dn(h({},On,{data:0})),Vn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Hn={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:`F
85`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Un={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Un[e])?!!t[e]:!1}function Gn(){return Wn}var Kn=Dn(h({},An,{key:function(e){if(e.key){var t=Vn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=wn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Hn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gn,charCode:function(e){return e.type===`keypress`?wn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?wn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),qn=Dn(h({},Fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Jn=Dn(h({},An,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gn})),Yn=Dn(h({},On,{propertyName:0,elapsedTime:0,pseudoElement:0})),Xn=Dn(h({},Fn,{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})),Zn=Dn(h({},On,{newState:0,oldState:0})),Qn=[9,13,27,32],$n=_n&&`CompositionEvent`in window,er=null;_n&&`documentMode`in document&&(er=document.documentMode);var tr=_n&&`TextEvent`in window&&!er,nr=_n&&(!$n||er&&8<er&&11>=er),rr=` `,ir=!1;function ar(e,t){switch(e){case`keyup`:return Qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function or(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var sr=!1;function cr(e,t){switch(e){case`compositionend`:return or(t);case`keypress`:return t.which===32?(ir=!0,rr):null;case`textInput`:return e=t.data,e===rr&&ir?null:e;default:return null}}function lr(e,t){if(sr)return e===`compositionend`||!$n&&ar(e,t)?(e=Cn(),Sn=xn=bn=null,sr=!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 nr&&t.locale!==`ko`?null:t.data;default:return null}}var ur={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 dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ur[e.type]:t===`textarea`}function fr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=Ed(t,`onChange`),0<t.length&&(n=new kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var pr=null,mr=null;function hr(e){yd(e,0)}function gr(e){if(Ut(Tt(e)))return e}function _r(e,t){if(e===`change`)return t}var vr=!1;if(_n){var yr;if(_n){var br=`oninput`in document;if(!br){var xr=document.createElement(`div`);xr.setAttribute(`oninput`,`return;`),br=typeof xr.oninput==`function`}yr=br}else yr=!1;vr=yr&&(!document.documentMode||9<document.documentMode)}function Sr(){pr&&(pr.detachEvent(`onpropertychange`,Cr),mr=pr=null)}function Cr(e){if(e.propertyName===`value`&&gr(mr)){var t=[];fr(t,mr,e,un(e)),hn(hr,t)}}function wr(e,t,n){e===`focusin`?(Sr(),pr=t,mr=n,pr.attachEvent(`onpropertychange`,Cr)):e===`focusout`&&Sr()}function Tr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return gr(mr)}function Er(e,t){if(e===`click`)return gr(t)}function Dr(e,t){if(e===`input`||e===`change`)return gr(t)}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var kr=typeof Object.is==`function`?Object.is:Or;function Ar(e,t){if(kr(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(!Oe.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mr(e,t){var n=jr(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=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(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=Wt(e.document)}return t}function Fr(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 Ir=_n&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Wt(r)||(r=Lr,`selectionStart`in r&&Fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 72,184 bytes, line 8
8sNode:r.focusNode,focusOffset:r.focusOffset}),zr&&Ar(zr,r)||(zr=r,r=Ed(Rr,`onSelect`),0<r.length&&(t=new kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ur={animationend:Hr(`Animation`,`AnimationEnd`),animationiteration:Hr(`Animation`,`AnimationIteration`),animationstart:Hr(`Animation`,`AnimationStart`),transitionrun:Hr(`Transition`,`TransitionRun`),transitionstart:Hr(`Transition`,`TransitionStart`),transitioncancel:Hr(`Transition`,`TransitionCancel`),transitionend:Hr(`Transition`,`TransitionEnd`)},Wr={},Gr={};_n&&(Gr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),`TransitionEvent`in window||delete Ur.transitionend.transition);function Kr(e){if(Wr[e])return Wr[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gr)return Wr[e]=t[n];return e}var qr=Kr(`animationend`),Jr=Kr(`animationiteration`),Yr=Kr(`animationstart`),Xr=Kr(`transitionrun`),Zr=Kr(`transitionstart`),Qr=Kr(`transitioncancel`),$r=Kr(`transitionend`),ei=new Map,ti=`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(` `);ti.push(`scrollEnd`);function ni(e,t){ei.set(e,t),At(t,[e])}var ri=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)},ii=[],M=0,ai=0;function oi(){for(var e=M,t=ai=M=0;t<e;){var n=ii[t];ii[t++]=null;var r=ii[t];ii[t++]=null;var i=ii[t];ii[t++]=null;var a=ii[t];if(ii[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&&ui(n,i,a)}}function si(e,t,n,r){ii[M++]=e,ii[M++]=t,ii[M++]=n,ii[M++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(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-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(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 N(e,t,n,r){return new pi(e,t,n,r)}function mi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hi(e,t){var n=e.alternate;return n===null?(n=N(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 gi(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 _i(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)mi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,pe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ne:return e=N(31,n,t,a),e.elementType=ne,e.lanes=o,e;case y:return vi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=N(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=N(13,n,t,a),e.elementType=T,e.lanes=o,e;case ee:return e=N(19,n,t,a),e.elementType=ee,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case te:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=N(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function vi(e,t,n,r){return e=N(7,e,r,t),e.lanes=n,e}function yi(e,t,n){return e=N(6,e,null,t),e.lanes=n,e}function bi(e){var t=N(18,null,null,0);return t.stateNode=e,t}function xi(e,t,n){return t=N(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Si=new WeakMap;function Ci(e,t){if(typeof e==`object`&&e){var n=Si.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},Si.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var wi=[],Ti=0,Ei=null,Di=0,Oi=[],ki=0,Ai=null,ji=1,Mi=``;function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Ei,Ei=e,Di=t}function Pi(e,t,n){Oi[ki++]=ji,Oi[ki++]=Mi,Oi[ki++]=Ai,Ai=e;var r=ji;e=Mi;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ji=1<<32-Ge(t)+i|n<<i|r,Mi=a+e}else ji=1<<a|n<<i|r,Mi=e}function P(e){e.return!==null&&(Ni(e,1),Pi(e,1,0))}function Fi(e){for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null;for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,Mi=Oi[--ki],Oi[ki]=null,ji=Oi[--ki],Oi[ki]=null}function Ii(e,t){Oi[ki++]=ji,Oi[ki++]=Mi,Oi[ki++]=Ai,ji=t.id,Mi=t.overflow,Ai=e}var Li=null,F=null,I=!1,Ri=null,zi=!1,Bi=Error(i(519));function Vi(e){throw qi(Ci(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Qt(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||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Li=e.return;Li;)switch(Li.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Li=Li.return}}function Wi(e){if(e!==Li)return!1;if(!I)return Ui(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&F&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));F=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));F=uf(e)}else t===27?(t=F,Zd(e.type)?(e=lf,lf=null,F=e):F=t):F=Li?cf(e.stateNode.nextSibling):null;return!0}function Gi(){F=Li=null,I=!1}function Ki(){var e=Ri;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=de(null),Yi=null,Xi=null;function Zi(e,t,n){A(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,fe(Ji)}function $i(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 ea(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),$i(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),$i(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 ta(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;kr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ge.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!kr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(i(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=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()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=dd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(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 ba=O.S;O.S=function(e,t){eu=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=de(null);function Sa(){var e=xa.current;return e===null?q.pooledCache:e}function Ca(e,t){t===null?A(xa,xa.current):A(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(i(460)),Ea=Error(i(474)),Da=Error(i(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=q,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,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(i(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(i(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(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=hi(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=yi(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===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===E&&ja(i)===t.type)?(t=a(t,n.props),Ra(t,n),t.return=e,t):(t=_i(n.type,n.key,n.props,null,e.mode,r),Ra(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=xi(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=vi(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=yi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=_i(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case v:return t=xi(t,e.mode,n),t.return=e,t;case E:return t=ja(t),f(e,t,n)}if(se(t)||ie(t))return t=vi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===C)return f(e,aa(e,t),n);za(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 _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case E:return n=ja(n),p(e,t,n,r)}if(se(n)||ie(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===C)return p(e,t,aa(e,n),r);za(e,n)}return null}function m(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 _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ja(r),m(e,t,n,r,i)}if(se(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===C)return m(e,t,n,aa(t,r),i);za(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),I&&Ni(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return I&&Ni(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),I&&Ni(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),I&&Ni(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return I&&Ni(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),I&&Ni(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){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===E&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=vi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=_i(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case v: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=xi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ja(o),b(e,r,o,c)}if(se(o))return h(e,r,o,c);if(ie(o)){if(l=ie(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,La(o),c);if(o.$$typeof===C)return b(e,r,aa(e,o),c);za(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=yi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=N(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(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 Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Ja(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,st(e,n)}}function Ya(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 Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!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 f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ua=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),Gl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=de(null),no=de(0);function ro(e,t){e=Ul,A(no,e),A(to,t),Ul=e|t.baseLanes}function io(){A(no,Ul),A(to,to.current)}function ao(){Ul=no.current,fe(to),fe(no)}var oo=de(null),so=null;function co(e){var t=e.alternate;A(mo,mo.current&1),A(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){A(mo,mo.current),A(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(A(mo,mo.current),A(oo,e),so===null&&(so=e)):fo(e)}function fo(){A(mo,mo.current),A(oo,oo.current)}function po(e){fe(oo),so===e&&(so=null),fe(mo)}var mo=de(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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 go=0,L=null,R=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function z(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Rs:zs,bo=!1,a=n(r,i),bo=!1,yo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){O.H=Ls;var t=R!==null&&R.next!==null;if(go=0,_o=R=L=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||nc||(e=e.dependencies,e!==null&&na(e)&&(nc=!0))}function Oo(e,t,n,r){L=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=R=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Bs,o=t(n,r)}while(yo);return o}function ko(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?Fo(t):t,e=e.useState()[0],(R===null?null:R.memoizedState)!==e&&(L.flags|=1024),t}function Ao(){var e=xo!==0;return xo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}go=0,_o=R=L=null,yo=!1,So=xo=0,Co=null}function B(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?L.memoizedState=_o=e:_o=_o.next=e,_o}function No(){if(R===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=R.next;var t=_o===null?L.memoizedState:_o.next;if(t!==null)_o=t,R=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));R=e,e={memoizedState:R.memoizedState,baseState:R.baseState,baseQueue:R.baseQueue,queue:R.queue,next:null},_o===null?L.memoizedState=_o=e:_o=_o.next=e}return _o}function Po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=Aa(Co,e,t),t=L,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Rs:zs),e}function Io(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Fo(e);if(e.$$typeof===C)return ia(e)}throw Error(i(438,String(e)))}function Lo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.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=Po(),L.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 Ro(e,t){return typeof t==`function`?t(e):t}function zo(e){return Bo(No(),R,e)}function Bo(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?(go&f)===f:(Y&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===ha&&(d=!0);else if((go&p)===p){u=u.next,p===ha&&(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,L.lanes|=p,Gl|=p;f=u.action,bo&&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,L.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!kr(o,e.memoizedState)&&(nc=!0,d&&(n=ga,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 Vo(e){var t=No(),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);kr(o,t.memoizedState)||(nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ho(e,t,n){var r=L,a=No(),o=I;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!kr((R||a).memoizedState,n);if(s&&(a.memoizedState=n,nc=!0),a=a.queue,ps(Go.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||go&127||Uo(r,t,n)}return n}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Po(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Ko(t)&&qo(e)}function Go(e,t,n){return n(function(){Ko(t)&&qo(e)})}function Ko(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function qo(e){var t=li(e,2);t!==null&&hu(t,e,2)}function Jo(e){var t=B();if(typeof e==`function`){var n=e;if(e=n(),bo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t}function Yo(e,t,n,r){return e.baseState=n,Bo(e,R,typeof r==`function`?r:Ro)}function Xo(e,t,n,r,a){if(Ps(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)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),Qo(e,t,s)}catch(n){es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),Qo(e,t,a)}catch(n){es(e,t,n)}}function Qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){$o(e,t,n)},function(n){return es(e,t,n)}):$o(e,t,n)}function $o(e,t,n){t.status=`fulfilled`,t.value=n,ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zo(e,n)))}function es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ts(t),t=t.next;while(t!==r)}e.action=null}function ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(I){var n=q.formState;if(n!==null){a:{var r=L;if(I){if(F){b:{for(var i=F,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){F=cf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=B(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Ms.bind(null,L,r),r.dispatch=n,r=Jo(!1),a=Ns.bind(null,L,!1,r.queue),r=B(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xo.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(No(),R,e)}function as(e,t,n){if(t=Bo(e,t,ns)[0],e=zo(Ro)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Fo(t)}catch(e){throw e===Ta?Da:e}else r=t;t=No();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=No(),n=R;if(n!==null)return as(t,n,e);No(),t=t.memoizedState,n=No();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Po(),L.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 ls(){return No().memoizedState}function us(e,t,n,r){var i=B();L.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=No();r=r===void 0?null:r;var a=i.memoizedState.inst;R!==null&&r!==null&&To(r,R.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(L.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Po(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=No().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function V(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 H(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,V.bind(null,t,e),n)}function U(){}function vs(e,t){var n=No();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=No();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),bo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||go&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),L.lanes|=e,Gl|=e,n)}function xs(e,t,n,r){return kr(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(Y&261930)?(nc=!0,e.memoizedState=n):(e=mu(),L.lanes|=e,Gl|=e,t):(e=bs(e,n,r),kr(e,t)||(nc=!0),e)}function Ss(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,Ns(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?W(e,t,ya(c,r),pu(e)):W(e,t,r,pu(e))}catch(n){W(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.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,ce,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,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),W(e,t.next.queue,{},pu())}function Ds(){return ia(Qf)}function Os(){return No().memoizedState}function ks(){return No().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ka(n);var r=qa(t,e,n);r!==null&&(hu(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=ci(e,t,n,r),n!==null&&(hu(n,e,r),Is(n,t,r)))}function Ms(e,t,n){W(e,t,n,pu())}function W(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(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,kr(s,o))return si(e,t,i,0),q===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return hu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=ci(e,n,r,2),t!==null&&hu(t,e,2)}function Ps(e){var t=e.alternate;return e===L||t!==null&&t===L}function Fs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Ls={readContext:ia,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Ls.useEffectEvent=z;var Rs={readContext:ia,use:Io,useCallback:function(e,t){return B().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,V.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=B();t=t===void 0?null:t;var r=e();if(bo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=B();if(n!==void 0){var i=n(t);if(bo){We(!0);try{n(t)}finally{We(!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,L,e),[r.memoizedState,e]},useRef:function(e){var t=B();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Ms.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:U,useDeferredValue:function(e,t){return bs(B(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ss.bind(null,L,e.queue,!0,!1),B().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=B();if(I){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=B(),t=q.identifierPrefix;if(I){var n=Mi,r=ji;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=B();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:Lo,useCacheRefresh:function(){return B().memoizedState=As.bind(null,L)},useEffectEvent:function(e){var t=B(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:ia,use:Io,useCallback:vs,useContext:ia,useEffect:ps,useImperativeHandle:H,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:ys,useReducer:zo,useRef:ls,useState:function(){return zo(Ro)},useDebugValue:U,useDeferredValue:function(e,t){return xs(No(),R.memoizedState,e,t)},useTransition:function(){var e=zo(Ro)[0],t=No().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Yo(No(),R,e,t)},useMemoCache:Lo,useCacheRefresh:ks};zs.useEffectEvent=hs;var Bs={readContext:ia,use:Io,useCallback:vs,useContext:ia,useEffect:ps,useImperativeHandle:H,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:ys,useReducer:Vo,useRef:ls,useState:function(){return Vo(Ro)},useDebugValue:U,useDeferredValue:function(e,t){var n=No();return R===null?bs(n,e,t):xs(n,R.memoizedState,e,t)},useTransition:function(){var e=Vo(Ro)[0],t=No().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:Os,useHostTransitionStatus:Ds,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=No();return R===null?(n.baseState=e,[e,n.queue.dispatch]):Yo(n,R,e,t)},useMemoCache:Lo,useCacheRefresh:ks};Bs.useEffectEvent=hs;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(hu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(hu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(hu(t,e,n),Ja(t,e,n))}};function Us(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?!Ar(n,r)||!Ar(i,a):!0}function Ws(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&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(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=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){ri(e)}function qs(e){console.error(e)}function Js(e){ri(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=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Ka(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`&&(ru===null?ru=new Set([this]):ru.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&&ta(t,n,a,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Oa?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)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(I)return t=oo.current,t===null?(r!==Bi&&(t=Error(i(423),{cause:r}),qi(Ci(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ci(r,n),a=Zs(e.stateNode,r,a),Ya(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Bi&&(e=Error(i(422),{cause:r}),qi(Ci(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ci(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=Ci(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),Ya(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`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Qs(a),$s(a,e,n,r),Ya(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?Ha(t,null,n,r):Va(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 ra(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!nc?(jo(e,t,i),Oc(e,t,i)):(I&&s&&P(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`&&!mi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=_i(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?Ar:n,n(o,r)&&e.ref===t.ref)return Oc(e,t,i)}return t.flags|=1,e=hi(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(Ar(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&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(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=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ta(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 Va(t,e.child,null,n),e=uc(t,t.pendingProps),e.flags|=2,po(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(I){if(r.mode===`hidden`)return e=uc(t,r),t.lanes=536870912,cc(null,e);if(lo(t),(e=F)?(e=rf(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai===null?null:{id:ji,overflow:Mi},retryLane:536870912,hydrationErrors:null},n=bi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(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||ta(e,t,n,!1),a=(n&e.childLanes)!==0,nc||a){if(r=q,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,li(e,s),hu(r,e,s),tc;Du(),t=dc(e,t,n)}else e=o.treeContext,F=cf(s.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=uc(t,r),t.flags|=4096;return t}return e=hi(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 ra(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!nc?(jo(e,t,i),Oc(e,t,i)):(I&&r&&P(t),t.flags|=1,rc(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!nc?(jo(e,t,a),Oc(e,t,a)):(I&&r&&P(t),t.flags|=1,rc(e,t,n,a),t.child)}function gc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(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&&Hs.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),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=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=ia(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)&&Ws(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=Ua||Us(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,Ga(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=ia(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)&&Ws(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=Ua||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(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=Va(t,e.child,null,i),t.child=Va(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 Gi(),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:wa()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),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:(mo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(I){if(a?co(t):fo(t),(e=F)?(e=rf(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai===null?null:{id:ji,overflow:Mi},retryLane:536870912,hydrationErrors:null},n=bi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(fo(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=vi(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)):(co(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=vi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(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)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(nc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,nc||s){if(s=q,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),hu(s,e,r),tc;af(c)||Du(),t=wc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,F=cf(c.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(fo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=hi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=vi(c,a,n,null),c.flags|=2):c=hi(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=wa():(l=ua._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)):(co(t),n=e.child,e=n.sibling,n=hi(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=N(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return Va(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),$i(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=mo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,A(mo,o),rc(e,t,r,n),r=I?Di: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&&ho(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&&ho(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),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(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=hi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=hi(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&&na(e))):!0}function Ac(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:ye(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Oc(e,t,n),e===null?null:e.sibling):xc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(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),A(mo,mo.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Zi(t,ua,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,I&&t.flags&1048576&&Pi(t,Di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)mi(e)?(r=Gs(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===w){t.tag=11,t=ic(null,t,e,r,n);break a}else if(a===te){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=oe(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=Gs(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Za(),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=Ci(Error(i(424)),t),qi(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(F=cf(e.firstChild),Li=t,I=!0,Ri=null,zi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),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=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(n=t.type,e=t.pendingProps,r=Bd(he.current).createElement(n),r[mt]=t,r[ht]=e,Pd(r,n,e),Dt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&I&&(r=t.stateNode=ff(t.type,t.pendingProps,he.current),Li=t,zi=!0,a=F,Zd(t.type)?(lf=a,F=cf(r.firstChild)):F=a),rc(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((a=r=F)&&(r=tf(r,t.type,t.pendingProps,zi),r===null?a=!1:(t.stateNode=r,Li=t,F=cf(r.firstChild),zi=!1,a=!0)),a||Vi(t)),ye(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),pc(e,t),rc(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=F)&&(n=nf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Li=t,F=null,e=!0)),e||Vi(t)),null;case 13:return xc(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(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,Zi(t,t.type,r.value),rc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(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 ra(t),r=ia(ua),e===null?(a=Sa(),a===null&&(a=q,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Wa(t),Zi(t,ua,a)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zi(t,ua,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(wu())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Pc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ma=Oa,Ea}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,Yl|=t)}function Ic(e,t){if(!I)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 G(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 Lc(e,t,n){var r=t.pendingProps;switch(Fi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return G(t),null;case 1:return G(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),ve(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),G(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(G(t),Nc(t,a,null,r,n)):(G(t),Pc(t,o))):o?o===e.memoizedState?(G(t),t.flags&=-16777217):(Mc(t),G(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),G(t),Nc(t,a,e,r,n)),null;case 27:if(be(t),n=he.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 G(t),null}e=pe.current,Wi(t)?Hi(t,e):(e=ff(a,r,n),t.stateNode=e,Mc(t))}return G(t),null;case 5:if(be(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 G(t),null}if(o=pe.current,Wi(t))Hi(t,o);else{var s=Bd(he.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[mt]=t,o[ht]=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(Pd(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 G(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=he.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Li,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Vi(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return G(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(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[mt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;G(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return G(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(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[mt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;G(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(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),G(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),G(t),null;case 10:return Qi(t.type),G(t),null;case 19:if(fe(mo),r=t.memoizedState,r===null)return G(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ic(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(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;)gi(n,e),n=n.sibling;return A(mo,mo.current&1|2),I&&Ni(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>tu&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(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&&!I)return G(t),null}else 2*Ne()-r.renderingStartTime>tu&&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?(G(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=mo.current,A(mo,a?n&1|2:n&1),I&&Ni(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(G(t),t.subtreeFlags&6&&(t.flags|=8192)):G(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&&fe(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),G(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(mo),null;case 4:return ve(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&fe(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function zc(e,t){switch(Fi(t),t.tag){case 3:Qi(ua),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:fe(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&fe(xa);break;case 24:Qi(ua)}}function Bc(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){Z(t,t.return,e)}}function Vc(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){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(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){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(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){Z(e,t,n)}else n.current=null}function Kc(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){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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&&Zd(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 Xc(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=cn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(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&&Zd(e.type)&&(n=e.stateNode),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){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Pr(e),Fr(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(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,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=Gs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(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,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;
vendor: 4,306 bytes, line 8
8try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(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{eo(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(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 sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(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(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(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=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(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[xt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head >
8 title`))),Pd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[mt]=e,Dt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);
vendor: 28,105 bytes, line 8
8else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{$t(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ne()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||xl(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){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(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,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&($t(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(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:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(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++)$a(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&fa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(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&&fa(e)));break;case 12:if(i&2048){Tl(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){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(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:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(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:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:O.T===null?dt():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||I){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Jl=e}else Jl=536870912;return e=oo.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),it(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(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=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(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:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ne(),10<a)){if(yu(r,t,Jl,!Bl),$e(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(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:cn},jl(t,a,d);var m=(a&62914560)===a?$l-Ne():(a&4194048)===a?eu-Ne():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!kr(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Xi=Yi=null,Mo(e),Fa=null,Ia=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=hi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=et(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,oi(),n}function Cu(e,t){L=null,O.H=Ls,t===Ta||t===Da?(t=Na(),X=3):t===Ea?(t=Na(),X=4):X=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Ys(e,Ci(t,e.current)))}function wu(){var e=oo.current;return e===null?!0:(Y&4194048)===Y?so===null:(Y&62914560)===Y||Y&536870912?e===so:!1}function Tu(){var e=O.H;return O.H=Ls,e===null?Ls:e}function Eu(){var e=O.A;return O.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&oo.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,K=r,O.H=i,O.A=a,J===null&&(q=null,Y=0,oi()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Ne()+500,Su(e,t)):Vl=et(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(ka(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:ka(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Xi=Yi=null,O.H=r,O.A=a,K=n,J===null?(q=null,Y=0,oi(),Wl):0}function ju(){for(;J!==null&&!je();)Mu(J)}function Mu(e){var t=jc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Mo(t);default:zc(n,t),t=J=gi(t,Ul),t=jc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Xi=Yi=null,Mo(t),Fa=null,Ia=0;var i=t.return;try{if(ec(e,i,t,n,Y)){Wl=1,Ys(e,Ci(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Ys(e,Ci(n,e.current)),J=null;return}t.flags&32768?(I||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ai,at(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Le,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=O.T,O.T=null,a=k.p,k.p=2,s=K,K|=4;try{il(e,t,n)}finally{K=s,k.p=a,O.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Pr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Nr(s.ownerDocument.documentElement,s)){if(c!==null&&Fr(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 _=Mr(s,h),v=Mr(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}}sp=!!Rd,zd=Rd=null}finally{K=i,k.p=r,O.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=K;K|=4;try{al(e,t.alternate,t)}finally{K=i,k.p=r,O.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Me();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ut(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.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{O.T=t,k.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ut(su),r=O.T,a=k.p;try{k.p=32>n?32:n,O.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{k.p=a,O.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ci(n,t),t=Zs(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ci(n,e),n=Qs(2),r=qa(t,n,2),r!==null&&($s(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ne()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=li(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(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),qu(e,n)}function Xu(e,t){return ke(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;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-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=$e(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ne(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=cd.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=$e(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?ke(Fe,ad):od()})}function dd(){if(nd===0){var e=ha;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+e)}function pd(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 md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(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?pd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ti.length;hd++){var gd=ti[hd];ni(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ni(qr,`onAnimationEnd`),ni(Jr,`onAnimationIteration`),ni(Yr,`onAnimationStart`),ni(`dblclick`,`onDoubleClick`),ni(`focusin`,`onFocus`),ni(`focusout`,`onBlur`),ni(Xr,`onTransitionRun`),ni(Zr,`onTransitionStart`),ni(Qr,`onTransitionCancel`),ni($r,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(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){ri(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){ri(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[_t];n===void 0&&(n=t[_t]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!vn||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 wd(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=Ct(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}hn(function(){var r=a,i=un(n),s=[];a:{var c=ei.get(e);if(c!==void 0){var l=kn,u=e;switch(e){case`keypress`:if(wn(n)===0)break a;case`keydown`:case`keyup`:l=Kn;break;case`focusin`:u=`focus`,l=Ln;break;case`focusout`:u=`blur`,l=Ln;break;case`beforeblur`:case`afterblur`:l=Ln;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=j;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=In;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Jn;break;case qr:case Jr:case Yr:l=Rn;break;case $r:l=Yn;break;case`scroll`:case`scrollend`:l=jn;break;case`wheel`:l=Xn;break;case`copy`:case`cut`:case`paste`:l=zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=qn;break;case`toggle`:case`beforetoggle`:l=Zn}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=gn(m,p),g!=null&&d.push(Td(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!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))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?Ct(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=j,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Tt(l),h=u==null?c:Tt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ct(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=Dd,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&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Tt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=_r;else if(dr(c))if(vr)v=Dr;else{v=Tr;var y=wr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&rn(r.elementType)&&(v=_r):v=Er;
vendor: 4,848 bytes, lines 8-9
8if(v&&=v(e,r)){fr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Yt(c,`number`,c.value)}switch(y=r?Tt(r):window,e){case`focusin`:(dr(y)||y.contentEditable===`true`)&&(Lr=y,Rr=r,zr=null);break;case`focusout`:zr=Rr=Lr=null;break;case`mousedown`:Br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Br=!1,Vr(s,n,i);break;case`selectionchange`:if(Ir)break;case`keydown`:case`keyup`:Vr(s,n,i)}var b;if($n)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 sr?ar(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(nr&&n.locale!==`ko`&&(sr||x!==`onCompositionStart`?x===`onCompositionEnd`&&sr&&(b=Cn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,sr=!0)),y=Ed(r,x),0<y.length&&(x=new Bn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=or(n),b!==null&&(x.data=b)))),(b=tr?cr(e,n):lr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Bn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(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=gn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=gn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(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=gn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Lt(e,`class`,r);break;case`tabIndex`:Lt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Lt(e,n,r);break;case`style`:nn(e,r,o);break;case`data`:if(t!==`object`){Lt(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=sn(``+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`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`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=sn(``+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`playsInl
9ine`: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`:Q(`beforetoggle`,e),Q(`toggle`,e),It(e,`popover`,r);break;case`xlinkActuate`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:It(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=an.get(n)||n,It(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:nn(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`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!kt.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[ht]||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,``):It(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`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:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`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:$(e,t,r,d,n,null)}}Jt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`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:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`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:$(e,t,s,c,n,null)}Qt(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:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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:$(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(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)||$(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&&$(e,t,p,m,r,f)}}qt(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)||$(e,t,o,null,r,l)}
vendor: 27,002 bytes, line 9
9for(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&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(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:$(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&&$(e,t,s,a,r,o)}Zt(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:$(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:$(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)&&$(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:$(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(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||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[xt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=k.d;k.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=he.current)?gf(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=Af(n.href),n=Et(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=Af(n.href);var o=Et(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(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=Pf(n),n=Et(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 Af(e){return`href="`+Kt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Kt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Dt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[xt]||a[mt]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function $f(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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(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 ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=N(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function tp(e){return e?(e=fi,e):fi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(hu(n,e,t),Ja(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=lt(t);var n=li(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,up(e,t,n,r)}finally{k.p=a,O.T=i}}function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,up(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ne()+500,id(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=un(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Ct(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 fp=e,null}function mp(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(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=wt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Ct(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,ft(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[ht]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[gt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));k.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=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.7`};
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{He=zp.inject(Rp),Ue=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;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=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[gt]=t.current,Sd(e),new Fp(t)}})),g=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=h()})),_=`modulepreload`,v=function(e){return`/`+e},y={},b=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=v(t,n),t=s(t),t in y)return;y[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:_,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},x=c(u(),1),S=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,C=/^[\\/]{2}/;function w(e,t){return t+e.replace(/\\/g,`/`)}var T=`popstate`;function ee(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function te(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ie(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:ae(t)}return se(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function ne(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function D(){return Math.random().toString(36).substring(2,10)}function re(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ie(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?oe(t):t,state:n,key:t&&t.key||r||D(),mask:i}}function ae({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function oe(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function se(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=ee(e)?e:ie(h.location,e,t);n&&n(r,e),l=u()+1;let d=re(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=ee(e)?e:ie(h.location,e,t);n&&n(r,e),l=u();let i=re(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return O(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(T,d),c=e,()=>{i.removeEventListener(T,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function O(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),E(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:ae(t);return i=i.replace(/ $/,`%20`),!n&&C.test(i)&&(i=r+i),new URL(i,r)}function k(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r,i){let a=De((typeof t==`string`?oe(t):t).pathname||`/`,n);if(a==null)return null;
9let o=i??ue(e),s=null,c=Ee(a);for(let e=0;s==null&&e<o.length;++e)s=Se(o[e],c,r);return s}function le(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ue(e){let t=de(e);return A(t),t}function de(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Fe([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),de(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:be(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Te(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of fe(e.path))a(e,t,!0,n)}),t}function fe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=fe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function A(e){e.sort((e,t)=>e.score===t.score?xe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var pe=/^:[\w-]+$/,me=3,he=2,ge=1,_e=10,ve=-2,ye=e=>e===`*`;function be(e,t){let n=e.split(`/`),r=n.length;return n.some(ye)&&(r+=ve),t&&(r+=he),n.filter(e=>!ye(e)).reduce((e,t)=>e+(pe.test(t)?me:t===``?ge:_e),r)}function xe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Se(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?we(u,l,s.matcher,s.compiledParams):Ce(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ce({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
9Object.assign(i,d.params),o.push({params:i,pathname:Fe([a,d.pathname]),pathnameBase:Le(Fe([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Fe([a,d.pathnameBase]))}return o}function Ce(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Te(e.path,e.caseSensitive,e.end);return we(e,t,n,r)}function we(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Te(e,t=!1,n=!0){ne(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ee(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return ne(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function De(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Oe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?oe(e):e,a;return n?(n=Pe(n),a=n.startsWith(`/`)?ke(n.substring(1),`/`):ke(n,t)):a=t,{pathname:a,search:Re(r),hash:ze(i)}}function ke(e,t){let n=Ie(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ae(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function je(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Me(e){let t=je(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ne(e,t,n,r=!1){let i;typeof e==`string`?i=oe(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),Ae(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),Ae(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),Ae(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Oe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Pe=e=>e.replace(/[\\/]{2,}/g,`/`),Fe=e=>Pe(e.join(`/`)),Ie=e=>e.replace(/\/+$/,``),Le=e=>Ie(e).replace(/^\/*/,`/`),Re=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ze=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Be=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ve(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function He(e){return Fe(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ue=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function We(e,t){let n=e;if(typeof n!=`string`||!S.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ue)try{let e=new URL(window.location.href),r=C.test(n)?new URL(w(n,e.protocol)):new URL(n),a=De(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{ne(!1,`<Link to="${n}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ge=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ge);var Ke=[`GET`,...Ge];new Set(Ke);var qe=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Je(e){try{return qe.includes(new URL(e).protocol)}catch{return!1}}var Ye=x.createContext(null);Ye.displayName=`DataRouter`;var Xe=x.createContext(null);Xe.displayName=`DataRouterState`;var Ze=x.createContext(!1);function Qe(){return x.useContext(Ze)}var $e=x.createContext({isTransitioning:!1});$e.displayName=`ViewTransition`;var et=x.createContext(new Map);et.displayName=`Fetchers`;var tt=x.createContext(null);tt.displayName=`Await`;var nt=x.createContext(null);nt.displayName=`Navigation`;var rt=x.createContext(null);rt.displayName=`Location`;var it=x.createContext({outlet:null,matches:[],isDataRoute:!1});it.displayName=`Route`;var at=x.createContext(null);at.displayName=`RouteError`;var ot=`REACT_ROUTER_ERROR`,st=`REDIRECT`,ct=`ROUTE_ERROR_RESPONSE`;function lt(e){if(e.startsWith(`${ot}:${st}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function ut(e){if(e.startsWith(`${ot}:${ct}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Be(t.status,t.statusText,t.data)}catch{}}function dt(e,{relative:t}={}){E(ft(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=x.useContext(nt),{hash:i,pathname:a,search:o}=yt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Fe([n,a])),r.createHref({pathname:s,search:o,hash:i})}function ft(){return x.useContext(rt)!=null}function pt(){return E(ft(),`useLocation() may be used only in the context of a <Router> component.`),x.useContext(rt).location}var mt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ht(e){x.useContext(nt).static||x.useLayoutEffect(e)}function gt(){let{isDataRoute:e}=x.useContext(it);return e?Rt():_t()}function _t(){E(ft(),`useNavigate() may be used only in the context of a <Router> component.`);
9let e=x.useContext(Ye),{basename:t,navigator:n}=x.useContext(nt),{matches:r}=x.useContext(it),{pathname:i}=pt(),a=JSON.stringify(Me(r)),o=x.useRef(!1);return ht(()=>{o.current=!0}),x.useCallback((r,s={})=>{if(ne(o.current,mt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ne(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Fe([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}x.createContext(null);function vt(){let{matches:e}=x.useContext(it);return e[e.length-1]?.params??{}}function yt(e,{relative:t}={}){let{matches:n}=x.useContext(it),{pathname:r}=pt(),i=JSON.stringify(Me(n));return x.useMemo(()=>Ne(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function bt(e,t){return xt(e,t)}function xt(e,t,n){E(ft(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=x.useContext(nt),{matches:i}=x.useContext(it),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Bt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
11Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=pt(),d;if(t){let e=typeof t==`string`?oe(t):t;E(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):k(e,{pathname:p});ne(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ne(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Ot(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Fe([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Fe([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?x.createElement(rt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function St(){let e=Lt(),t=Ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=x.createElement(x.Fragment,null,x.createElement(`p`,null,`💿 Hey developer 👋`),x.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,x.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,x.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),x.createElement(x.Fragment,null,x.createElement(`h2`,null,`Unexpected Application Error!`),x.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?x.createElement(`pre`,{style:i},n):null,o)}var Ct=x.createElement(St,null),wt=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=ut(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:x.createElement(it.Provider,{value:this.props.routeContext},x.createElement(at.Provider,{value:e,children:this.props.component}));return this.context?x.createElement(Et,{error:e},t):t}};wt.contextType=Ze;var Tt=new WeakMap;function Et({children:e,error:t}){let{basename:n}=x.useContext(nt);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=lt(t.digest);if(e){let r=Tt.get(t);if(r)throw r;let i=We(e.location,n),a=i.absoluteURL||i.to;
11if(Je(a))throw Error(`Invalid redirect location`);if(Ue&&!Tt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Tt.set(t,n),n}return x.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Dt({routeContext:e,match:t,children:n}){let r=x.useContext(Ye);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(it.Provider,{value:e},n)}function Ot(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:He(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ct,o&&(s<0&&c===0?(Bt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?x.createElement(n.route.Component,null):n.route.element?n.route.element:e,x.createElement(Dt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?x.createElement(wt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function kt(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function At(e){let t=x.useContext(Ye);return E(t,kt(e)),t}function jt(e){let t=x.useContext(Xe);return E(t,kt(e)),t}function Mt(e){let t=x.useContext(it);return E(t,kt(e)),t}function Nt(e){let t=Mt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Pt(){return Nt(`useRouteId`)}function Ft(){let e=jt(`useNavigation`);return x.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function It(){let{matches:e,loaderData:t}=jt(`useMatches`);return x.useMemo(()=>e.map(e=>le(e,t)),[e,t])}function Lt(){let e=x.useContext(at),t=jt(`useRouteError`),n=Nt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Rt(){let{router:e}=At(`useNavigate`),t=Nt(`useNavigate`),n=x.useRef(!1);return ht(()=>{n.current=!0}),x.useCallback(async(r,i={})=>{ne(n.current,mt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var zt={};function Bt(e,t,n){!t&&!zt[e]&&(zt[e]=!0,ne(!1,n))}x.memo(Vt);function Vt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return xt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Ht(e){E(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Ut({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){E(!ft(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=x.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=oe(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=x.useMemo(()=>{let e=De(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
11return ne(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:x.createElement(nt.Provider,{value:c},x.createElement(rt.Provider,{children:t,value:h}))}function Wt({children:e,location:t}){return bt(Gt(e),t)}x.Component;function Gt(e,t=[]){let n=[];return x.Children.forEach(e,(e,r)=>{if(!x.isValidElement(e))return;let i=[...t,r];if(e.type===x.Fragment){n.push.apply(n,Gt(e.props.children,i));return}E(e.type===Ht,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Gt(e.props.children,i)),n.push(a)}),n}var Kt=`get`,qt=`application/x-www-form-urlencoded`;function Jt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Yt(e){return Jt(e)&&e.tagName.toLowerCase()===`button`}function Xt(e){return Jt(e)&&e.tagName.toLowerCase()===`form`}function Zt(e){return Jt(e)&&e.tagName.toLowerCase()===`input`}function Qt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $t(e,t){return e.button===0&&(!t||t===`_self`)&&!Qt(e)}function en(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function tn(e,t){let n=en(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var nn=null;function rn(){if(nn===null)try{new FormData(document.createElement(`form`),0),nn=!1}catch{nn=!0}return nn}var an=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function on(e){return e!=null&&!an.has(e)?(ne(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qt}"`),null):e}function sn(e,t){let n,r,i,a,o;if(Xt(e)){let o=e.getAttribute(`action`);r=o?De(o,t):null,n=e.getAttribute(`method`)||Kt,i=on(e.getAttribute(`enctype`))||qt,a=new FormData(e)}else if(Yt(e)||Zt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?De(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Kt,i=on(e.getAttribute(`formenctype`))||on(o.getAttribute(`enctype`))||qt,a=new FormData(o,e),!rn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Jt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Kt,r=null,i=qt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var cn={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ln=/[&><\u2028\u2029]/g;function un(e){return e.replace(ln,e=>cn[e])}function dn(e,t){if(e===!1||e==null)throw Error(t)}function fn(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&De(i.pathname,t)===`/`?i.pathname=`${Ie(t)}/_root.${r}`:i.pathname=`${Ie(i.pathname)}.${r}`,i}async function pn(e,t){if(e.id in t)return t[e.id];try{let n=await b(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
11isSpaMode,window.location.reload(),new Promise(()=>{})}}function mn(e){return e!=null&&typeof e.page==`string`}function hn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function gn(e,t,n){return xn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await pn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(hn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function _n(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function vn(e,t,{includeHydrateFallback:n}={}){return yn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function yn(e){return[...new Set(e)]}function bn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function xn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!mn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(bn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Sn(){let e=x.useContext(Ye);return dn(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Cn(){let e=x.useContext(Xe);return dn(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var wn=x.createContext(void 0);wn.displayName=`FrameworkContext`;function Tn(){let e=x.useContext(wn);return dn(e,`You must render this element inside a <HydratedRouter> element`),e}function En(e,t){let n=x.useContext(wn),[r,i]=x.useState(!1),[a,o]=x.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=x.useRef(null);x.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),x.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Dn(s,p),onBlur:Dn(c,m),onMouseEnter:Dn(l,p),onMouseLeave:Dn(u,m),onTouchStart:Dn(d,p)}]:[a,f,{}]:[!1,f,{}]}function Dn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function On({page:e,...t}){let n=Qe(),{nonce:r}=Tn(),{router:i}=Sn(),a=x.useMemo(()=>k(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?x.createElement(An,{page:e,matches:a,...t}):x.createElement(jn,{page:e,matches:a,...t})):null}function kn(e){let{manifest:t,routeModules:n}=Tn(),[r,i]=x.useState([]);return x.useEffect(()=>{let r=!1;return gn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function An({page:e,matches:t,...n}){let r=pt(),{future:i}=Tn(),{basename:a}=Sn(),o=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=fn(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return x.createElement(x.Fragment,null,o.map(e=>x.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function jn({page:e,matches:t,...n}){let r=pt(),{future:i,manifest:a,routeModules:o}=Tn(),{basename:s}=Sn(),{loaderData:c,matches:l}=Cn(),u=x.useMemo(()=>_n(e,t,l,a,r,`data`),[e,t,l,a,r]),d=x.useMemo(()=>_n(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=x.useMemo(()=>
11{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=fn(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=x.useMemo(()=>vn(d,a),[d,a]),m=kn(d);return x.createElement(x.Fragment,null,f.map(e=>x.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>x.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>x.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Mn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}x.Component;var Nn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Nn&&(window.__reactRouterVersion=`7.18.1`)}catch{}function Pn({basename:e,children:t,useTransitions:n,window:r}){let i=x.useRef();i.current??=te({window:r,v5Compat:!0});let a=i.current,[o,s]=x.useState({action:a.action,location:a.location}),c=x.useCallback(e=>{n===!1?s(e):x.startTransition(()=>s(e))},[n]);return x.useLayoutEffect(()=>a.listen(c),[a,c]),x.createElement(Ut,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Fn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=x.useState({action:n.action,location:n.location}),o=x.useCallback(e=>{r===!1?a(e):x.startTransition(()=>a(e))},[r]);return x.useLayoutEffect(()=>n.listen(o),[n,o]),x.createElement(Ut,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Fn.displayName=`unstable_HistoryRouter`;var j=x.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=x.useContext(nt),v=typeof l==`string`&&S.test(l),y=We(l,h);l=y.to;let b=dt(l,{relative:r}),C=pt(),w=null;if(o){let e=Ne(o,[],C.mask?C.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Fe([h,e.pathname])),w=g.createHref(e)}let[T,ee,te]=En(n,p),E=Hn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function ne(t){e&&e(t),t.defaultPrevented||E(t)}let D=!(y.isExternal||i),re=x.createElement(`a`,{...p,...te,href:(D?w:void 0)||y.absoluteURL||b,onClick:D?ne:e,ref:Mn(m,ee),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return T&&!v?x.createElement(x.Fragment,null,re,x.createElement(On,{page:b})):re});j.displayName=`Link`;var In=x.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=yt(a,{relative:c.relative}),d=pt(),f=x.useContext(Xe),{navigator:p,basename:m}=x.useContext(nt),h=f!=null&&$n(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=De(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:b,isPending:S,isTransitioning:h},w=b?e:void 0,T;T=typeof n==`function`?n(C):[n,b?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof i==`function`?i(C):i;return x.createElement(j,{...c,"aria-current":w,className:T,ref:l,style:ee,to:a,viewTransition:o},typeof s==`function`?s(C):s)});In.displayName=`NavLink`;var Ln=x.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Kt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=x.useContext(nt),g=Kn(),_=qn(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&S.test(s);return x.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?x.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Ln.displayName=`Form`;function Rn({getKey:e,storageKey:t,...n}){let r=x.useContext(wn),{basename:i}=x.useContext(nt),a=pt(),o=It();Zn({getKey:e,storageKey:t});let s=x.useMemo(()=>
11{if(!r||!e)return null;let t=Xn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),x.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${un(JSON.stringify(t||Jn))}, ${un(JSON.stringify(s))})`}})}Rn.displayName=`ScrollRestoration`;function zn(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bn(e){let t=x.useContext(Ye);return E(t,zn(e)),t}function Vn(e){let t=x.useContext(Xe);return E(t,zn(e)),t}function Hn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=gt(),d=pt(),f=yt(e,{relative:o});return x.useCallback(p=>{if($t(p,t)){p.preventDefault();let t=n===void 0?ae(d)===ae(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?x.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Un(e){ne(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=x.useRef(en(e)),n=x.useRef(!1),r=pt(),i=x.useMemo(()=>tn(r.search,n.current?null:t.current),[r.search]),a=gt();return[i,x.useCallback((e,t)=>{let r=en(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Wn=0,Gn=()=>`__${String(++Wn)}__`;function Kn(){let{router:e}=Bn(`useSubmit`),{basename:t}=x.useContext(nt),n=Pt(),r=e.fetch,i=e.navigate;return x.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=sn(e,t);if(a.navigate===!1){let e=a.fetcherKey||Gn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function qn(e,{relative:t}={}){let{basename:n}=x.useContext(nt),r=x.useContext(it);E(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...yt(e||`.`,{relative:t})},o=pt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Fe([n,a.pathname])),ae(a)}var Jn=`react-router-scroll-positions`,Yn={};function Xn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:De(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Zn({getKey:e,storageKey:t}={}){let{router:n}=Bn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Vn(`useScrollRestoration`),{basename:a}=x.useContext(nt),o=pt(),s=It(),c=Ft();x.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Qn(x.useCallback(()=>{if(c.state===`idle`){let t=Xn(o,s,a,e);Yn[t]=window.scrollY}try{sessionStorage.setItem(t||Jn,JSON.stringify(Yn))}catch(e){ne(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(x.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Jn);e&&(Yn=JSON.parse(e))}catch{}},[t]),x.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Yn,()=>window.scrollY,e?(t,n)=>Xn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),x.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{ne(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Qn(e,t){let{capture:n}=t||{};x.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function $n(e,{relative:t}={}){let n=x.useContext($e);E(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Bn(`useViewTransitionState`),i=yt(e,{relative:t});if(!n.isTransitioning)return!1;let a=De(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=De(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ce(i.pathname,o)!=null||Ce(i.pathname,a)!=null}var er=o(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;
11if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),tr=o(((e,t)=>{t.exports=function(e,t,n,r,i,a,o,s){if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}})),nr=o(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),rr=g(),ir=c(er()),ar=c(tr()),or=c(nr()),sr=(e=>(e.BASE=`base`,e.BODY=`body`,e.HEAD=`head`,e.HTML=`html`,e.LINK=`link`,e.META=`meta`,e.NOSCRIPT=`noscript`,e.SCRIPT=`script`,e.STYLE=`style`,e.TITLE=`title`,e.FRAGMENT=`Symbol(react.fragment)`,e))(sr||{}),cr={link:{rel:[`amphtml`,`canonical`,`alternate`]},script:{type:[`application/ld+json`]},meta:{charset:``,name:[`generator`,`robots`,`description`],property:[`og:type`,`og:title`,`og:url`,`og:image`,`og:image:alt`,`og:description`,`twitter:url`,`twitter:title`,`twitter:description`,`twitter:image`,`twitter:image:alt`,`twitter:card`,`twitter:site`]}},lr=Object.values(sr),ur={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},dr=Object.entries(ur).reduce((e,[t,n])=>(e[n]=t,e),{}),fr=`data-rh`,pr={DEFAULT_TITLE:`defaultTitle`,DEFER:`defer`,ENCODE_SPECIAL_CHARACTERS:`encodeSpecialCharacters`,ON_CHANGE_CLIENT_STATE:`onChangeClientState`,TITLE_TEMPLATE:`titleTemplate`,PRIORITIZE_SEO_TAGS:`prioritizeSeoTags`},mr=(e,t)=>{for(let n=e.length-1;n>=0;--n){let r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},hr=e=>{let t=mr(e,`title`),n=mr(e,pr.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join(``)),n&&t)return n.replace(/%s/g,()=>t);let r=mr(e,pr.DEFAULT_TITLE);return t||r||void 0},gr=e=>mr(e,pr.ON_CHANGE_CLIENT_STATE)||(()=>{}),_r=(e,t)=>t.filter(t=>t[e]!==void 0).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),vr=(e,t)=>t.filter(e=>e.base!==void 0).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){let r=Object.keys(n);for(let i=0;i<r.length;i+=1){let a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}}return t},[]),yr=e=>console&&typeof console.warn==`function`&&console.warn(e),br=(e,t,n)=>{let r={};return n.filter(t=>Array.isArray(t[e])?!0:(t[e]!==void 0&&yr(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{let i={};n.filter(e=>{let n,a=Object.keys(e);for(let r=0;r<a.length;r+=1){let i=a[r],o=i.toLowerCase();t.indexOf(o)!==-1&&!(n===`rel`&&e[n].toLowerCase()===`canonical`)&&!(o===`rel`&&e[o].toLowerCase()===`stylesheet`)&&(n=o),t.indexOf(i)!==-1&&(i===`innerHTML`||i===`cssText`||i===`itemprop`)&&(n=i)}if(!n||!e[n])return!1;let o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),r[n][o]?!1:(i[n][o]=!0,!0)}
11).reverse().forEach(t=>e.push(t));let a=Object.keys(i);for(let e=0;e<a.length;e+=1){let t=a[e],n={...r[t],...i[t]};r[t]=n}return e},[]).reverse()},xr=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},Sr=e=>({baseTag:vr([`href`],e),bodyAttributes:_r(`bodyAttributes`,e),defer:mr(e,pr.DEFER),encode:mr(e,pr.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:_r(`htmlAttributes`,e),linkTags:br(`link`,[`rel`,`href`],e),metaTags:br(`meta`,[`name`,`charset`,`http-equiv`,`property`,`itemprop`],e),noscriptTags:br(`noscript`,[`innerHTML`],e),onChangeClientState:gr(e),scriptTags:br(`script`,[`src`,`innerHTML`],e),styleTags:br(`style`,[`cssText`],e),title:hr(e),titleAttributes:_r(`titleAttributes`,e),prioritizeSeoTags:xr(e,pr.PRIORITIZE_SEO_TAGS)}),Cr=e=>Array.isArray(e)?e.join(``):e,wr=(e,t)=>{let n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Tr=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(wr(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},Er=(e,t)=>({...e,[t]:void 0}),Dr=[`noscript`,`script`,`style`],Or=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`),kr=e=>Object.keys(e).reduce((t,n)=>{let r=e[n]===void 0?`${n}`:`${n}="${e[n]}"`;return t?`${t} ${r}`:r},``),Ar=(e,t,n,r)=>{let i=kr(n),a=Cr(t);return i?`<${e} ${fr}="true" ${i}>${Or(a,r)}</${e}>`:`<${e} ${fr}="true">${Or(a,r)}</${e}>`},jr=(e,t,n=!0)=>t.reduce((t,r)=>{let i=r,a=Object.keys(i).filter(e=>!(e===`innerHTML`||e===`cssText`)).reduce((e,t)=>{let r=i[t]===void 0?t:`${t}="${Or(i[t],n)}"`;return e?`${e} ${r}`:r},``),o=i.innerHTML||i.cssText||``;return`${t}<${e} ${fr}="true" ${a}${Dr.indexOf(e)===-1?`/>`:`>${o}</${e}>`}`},``),Mr=(e,t={})=>Object.keys(e).reduce((t,n)=>{let r=ur[n];return t[r||n]=e[n],t},t),Nr=(e,t,n)=>{let r=Mr(n,{key:t,[fr]:!0});return[x.createElement(`title`,r,t)]},Pr=(e,t)=>t.map((t,n)=>{let r={key:n,[fr]:!0};return Object.keys(t).forEach(e=>{let n=ur[e]||e;if(n===`innerHTML`||n===`cssText`){let e=t.innerHTML||t.cssText;r.dangerouslySetInnerHTML={__html:e}}else r[n]=t[e]}),x.createElement(e,r)}),Fr=(e,t,n=!0)=>{switch(e){case`title`:return{toComponent:()=>Nr(e,t.title,t.titleAttributes),toString:()=>Ar(e,t.title,t.titleAttributes,n)};case`bodyAttributes`:case`htmlAttributes`:return{toComponent:()=>Mr(t),toString:()=>kr(t)};default:return{toComponent:()=>Pr(e,t),toString:()=>jr(e,t,n)}}},Ir=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{let i=Tr(e,cr.meta),a=Tr(t,cr.link),o=Tr(n,cr.script);return{priorityMethods:{toComponent:()=>[...Pr(`meta`,i.priority),...Pr(`link`,a.priority),...Pr(`script`,o.priority)],toString:()=>`${Fr(`meta`,i.priority,r)} ${Fr(`link`,a.priority,r)} ${Fr(`script`,o.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:o.default}},Lr=e=>{let{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:o,title:s=``,titleAttributes:c,prioritizeSeoTags:l}=e,{linkTags:u,metaTags:d,scriptTags:f}=e,p={toComponent:()=>[],toString:()=>``};return l&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=Ir(e)),{priority:p,base:Fr(`base`,t,r),bodyAttributes:Fr(`bodyAttributes`,n,r),htmlAttributes:Fr(`htmlAttributes`,i,r),link:Fr(`link`,u,r),meta:Fr(`meta`,d,r),noscript:Fr(`noscript`,a,r),script:Fr(`script`,f,r),style:Fr(`style`,o,r),title:Fr(`title`,{title:s,titleAttributes:c},r)}},Rr=[],zr=!!(typeof window<`u`&&window.document&&window.document.createElement),Br=class{instances=[];canUseDOM=zr;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Rr:this.instances,add:e=>{(this.canUseDOM?Rr:this.instances).push(e)},remove:e=>{let t=(this.canUseDOM?Rr:this.instances).indexOf(e);(this.canUseDOM?Rr:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Lr({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}))}},Vr=parseInt(`19.2.7`.split(`.`)[0],10)>=19,Hr=x.createContext({}),Ur=class e extends x.Component{static canUseDOM=zr;helmetData;constructor(t){super(t),Vr?this.helmetData=null:this.helmetData=new Br(this.props.context||{},e.canUseDOM)}render(){return Vr?x.createElement(x.Fragment,null,this.props.children):x.createElement(Hr.Provider,{value:this.helmetData.value},this.props.children)}},Wr=(e,t)=>{let n=document.head||document.querySelector(`head`),r=n.querySelectorAll(`${e}[${fr}]`),i=[].slice.call(r),a=[],o;return t&&t.length&&t.forEach(t=>{let n=document.createElement(e);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))if(e===`innerHTML`)n.innerHTML=t.innerHTML;else if(e===`cssText`){let e=t.cssText;n.appendChild(document.createTextNode(e))}else{let r=e,i=t[r]===void 0?``:t[r];n.setAttribute(e,i)}n.setAttribute(fr,`true`),i.some((e,t)=>(o=t,n.isEqualNode(e)))?i.splice(o,1):a.push(n)}
11),i.forEach(e=>e.parentNode?.removeChild(e)),a.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:a}},Gr=(e,t)=>{let n=document.getElementsByTagName(e)[0];if(!n)return;let r=n.getAttribute(fr),i=r?r.split(`,`):[],a=[...i],o=Object.keys(t);for(let e of o){let r=t[e]||``;n.getAttribute(e)!==r&&n.setAttribute(e,r),i.indexOf(e)===-1&&i.push(e);let o=a.indexOf(e);o!==-1&&a.splice(o,1)}for(let e=a.length-1;e>=0;--e)n.removeAttribute(a[e]);i.length===a.length?n.removeAttribute(fr):n.getAttribute(fr)!==o.join(`,`)&&n.setAttribute(fr,o.join(`,`))},Kr=(e,t)=>{e!==void 0&&document.title!==e&&(document.title=Cr(e)),Gr(`title`,t)},qr=(e,t)=>{let{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:o,noscriptTags:s,onChangeClientState:c,scriptTags:l,styleTags:u,title:d,titleAttributes:f}=e;Gr(`body`,r),Gr(`html`,i),Kr(d,f);let p={baseTag:Wr(`base`,n),linkTags:Wr(`link`,a),metaTags:Wr(`meta`,o),noscriptTags:Wr(`noscript`,s),scriptTags:Wr(`script`,l),styleTags:Wr(`style`,u)},m={},h={};Object.keys(p).forEach(e=>{let{newTags:t,oldTags:n}=p[e];t.length&&(m[e]=t),n.length&&(h[e]=p[e].oldTags)}),t&&t(),c(e,m,h)},Jr=null,Yr=e=>{Jr&&cancelAnimationFrame(Jr),e.defer?Jr=requestAnimationFrame(()=>{qr(e,()=>{Jr=null})}):(qr(e),Jr=null)},Xr=class extends x.Component{rendered=!1;shouldComponentUpdate(e){return!(0,or.default)(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){let{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){let{helmetInstances:e,setHelmet:t}=this.props.context,n=null,r=Sr(e.get().map(e=>{let{context:t,...n}=e.props;return n}));Ur.canUseDOM?Yr(r):Lr&&(n=Lr(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;let{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Zr=[],Qr=e=>{let t={};for(let n of Object.keys(e))t[dr[n]||n]=e[n];return t},$r=e=>{let t={};for(let n of Object.keys(e)){let r=ur[n];t[r||n]=e[n]}return t},ei=(e,t)=>{if(!zr)return;let n=document.getElementsByTagName(e)[0];if(!n)return;let r=`data-rh-managed`,i=n.getAttribute(r),a=i?i.split(`,`):[],o=Object.keys(t);for(let e of a)o.includes(e)||n.removeAttribute(e);for(let e of o){let r=t[e];r==null||r===!1?n.removeAttribute(e):r===!0?n.setAttribute(e,``):n.setAttribute(e,String(r))}o.length>0?n.setAttribute(r,o.join(`,`)):n.removeAttribute(r)},ti=()=>{let e={},t={};for(let n of Zr){let{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,Qr(r)),i&&Object.assign(t,Qr(i))}ei(`html`,e),ei(`body`,t)},ni=class extends x.Component{componentDidMount(){Zr.push(this),ti()}componentDidUpdate(){ti()}componentWillUnmount(){let e=Zr.indexOf(this);e!==-1&&Zr.splice(e,1),ti()}resolveTitle(){let{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(``):e):e||n||void 0}renderTitle(){let e=this.resolveTitle();if(e===void 0)return null;let t=this.props.titleAttributes||{};return x.createElement(`title`,$r(t),e)}renderBase(){let{base:e}=this.props;return e?x.createElement(`base`,$r(e)):null}renderMeta(){let{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>x.createElement(`meta`,{key:t,...$r(e)}))}renderLink(){let{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>x.createElement(`link`,{key:t,...$r(e)}))}renderScript(){let{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=$r(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),x.createElement(`script`,{key:t,...i})})}renderStyle(){let{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{cssText:n,...r}=e,i=$r(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),x.createElement(`style`,{key:t,...i})})}renderNoscript(){let{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=$r(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),x.createElement(`noscript`,{key:t,...i})})}render(){return x.createElement(x.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ri=class extends x.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!(0,ir.default)(Er(this.props,`helmetData`),Er(e,`helmetData`))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case`script`:case`noscript`:return{innerHTML:t};case`style`:return{cssText:t};default:throw Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case`title`:return{...t,[e.type]:r,titleAttributes:{...n}};case`body`:return{...t,bodyAttributes:{...n}};case`html`:return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}
11warnOnInvalidChildren(e,t){return(0,ar.default)(lr.some(t=>e.type===t),typeof e.type==`function`?`You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`:`Only elements types ${lr.join(`, `)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),(0,ar.default)(!t||typeof t==`string`||Array.isArray(t)&&!t.some(e=>typeof e!=`string`),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return x.Children.forEach(e,e=>{if(!e||!e.props)return;let{children:r,...i}=e.props,a=Object.keys(i).reduce((e,t)=>(e[dr[t]||t]=i[t],e),{}),{type:o}=e;switch(typeof o==`symbol`?o=o.toString():this.warnOnInvalidChildren(e,r),o){case`Symbol(react.fragment)`:t=this.mapChildrenToProps(r,t);break;case`link`:case`meta`:case`noscript`:case`script`:case`style`:n=this.flattenArrayTypeChildren(e,n,a,r);break;default:t=this.mapObjectTypeChildren(e,t,a,r);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){let{children:e,...t}=this.props,n={...t},{helmetData:r}=t;return e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Br)&&(r=new Br(r.context,!0),delete n.helmetData),Vr?x.createElement(ni,{...n}):r?x.createElement(Xr,{...n,context:r.value}):x.createElement(Hr.Consumer,null,e=>x.createElement(Xr,{...n,context:e}))}},ii=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})),M=o(((e,t)=>{t.exports=ii()}))(),ai=(0,x.createContext)(null),oi=`ob_cart`;function si(){try{let e=localStorage.getItem(oi);return e?JSON.parse(e):[]}catch{return[]}}function ci({children:e}){let[t,n]=(0,x.useState)(si);(0,x.useEffect)(()=>{localStorage.setItem(oi,JSON.stringify(t))},[t]),(0,x.useEffect)(()=>{let e=()=>n([]);return window.addEventListener(`ob:region-changed`,e),()=>window.removeEventListener(`ob:region-changed`,e)},[]);let r=(e,t=1)=>{n(n=>{let r=n.findIndex(t=>t.variantId===e.variantId);if(r>=0){let e=[...n];return e[r]={...e[r],quantity:e[r].quantity+t},e}return[...n,{...e,quantity:t}]})},i=(e,t)=>{n(n=>n.map(n=>n.variantId===e?{...n,quantity:Math.max(0,t)}:n).filter(e=>e.quantity>0))},a=e=>n(t=>t.filter(t=>t.variantId!==e)),o=()=>n([]),s=(0,x.useMemo)(()=>{let e=t.reduce((e,t)=>e+t.quantity,0),n=t.reduce((e,t)=>e+t.priceKobo*t.quantity,0);return{items:t,add:r,setQty:i,remove:a,clear:o,count:e,subtotalKobo:n}},[t]);return(0,M.jsx)(ai.Provider,{value:s,children:e})}function li(){let e=(0,x.useContext)(ai);if(!e)throw Error(`useCart must be used within CartProvider`);return e}var ui=`/api`,di=`ob_token`,fi=`ob_admin_token`,pi={get:()=>localStorage.getItem(di),set:e=>localStorage.setItem(di,e),clear:()=>localStorage.removeItem(di),getAdmin:()=>localStorage.getItem(fi),setAdmin:e=>localStorage.setItem(fi,e),clearAdmin:()=>localStorage.removeItem(fi)};async function N(e,{method:t=`GET`,body:n,token:r}={}){let i={};n&&(i[`Content-Type`]=`application/json`),r&&(i.Authorization=`Bearer ${r}`);let a=await fetch(`${ui}${e}`,{method:t,headers:i,body:n?JSON.stringify(n):void 0}),o=null;try{o=await a.json()}catch{}if(!a.ok){let e=Error(o&&o.error||`Request failed (${a.status})`);throw e.details=o&&o.details,e.status=a.status,e}return o}var mi=()=>N(`/regions`),hi=()=>N(`/services`),gi=()=>N(`/pricing`),_i=()=>N(`/packages`),vi=()=>N(`/laser`),yi=()=>N(`/products`),bi=e=>N(`/catalog/bookables${e?`?currency=${e}`:``}`),xi=e=>{if(e&&typeof e==`object`){let t=new URLSearchParams;return e.bookableType&&t.set(`bookableType`,e.bookableType),e.bookableId!=null&&t.set(`bookableId`,e.bookableId),N(`/catalog/staff?${t.toString()}`)}return N(`/catalog/staff${e?`?serviceId=${e}`:``}`)},Si=({bookableType:e,bookableId:t,serviceId:n,date:r,staffId:i})=>{let a=new URLSearchParams({date:r});return e&&a.set(`bookableType`,e),t!=null&&a.set(`bookableId`,t),n!=null&&t==null&&a.set(`serviceId`,n),i&&a.set(`staffId`,i),N(`/availability?${a.toString()}`)},Ci=e=>N(`/bookings`,{method:`POST`,body:e,token:pi.get()}),wi=e=>N(`/bookings/${e}`),Ti=(e,t)=>N(`/bookings/${e}/cancel`,{method:`POST`,body:{email:t},token:pi.get()}),Ei=()=>N(`/bookings/me/list`,{token:pi.get()}),Di=e=>N(`/payments/verify/${e}`),Oi=e=>
11N(`/enquiry`,{method:`POST`,body:e}),ki=()=>N(`/reviews`),Ai=e=>N(`/reviews`,{method:`POST`,body:e}),ji=e=>N(`/auth/register`,{method:`POST`,body:e}),Mi=e=>N(`/auth/login`,{method:`POST`,body:e}),Ni=()=>N(`/auth/me`,{token:pi.get()}),Pi=e=>N(`/auth/admin/login`,{method:`POST`,body:e}),P=(e,t={})=>N(e,{...t,token:pi.getAdmin()}),Fi=()=>P(`/admin/services`),Ii=e=>P(`/admin/services`,{method:`POST`,body:e}),Li=(e,t)=>P(`/admin/services/${e}`,{method:`PATCH`,body:t}),F=()=>P(`/admin/packages`),I=e=>P(`/admin/packages`,{method:`POST`,body:e}),Ri=(e,t)=>P(`/admin/packages/${e}`,{method:`PATCH`,body:t}),zi=e=>P(`/admin/packages/${e}`,{method:`DELETE`}),Bi=()=>P(`/admin/summary`),Vi=(e=``)=>P(`/admin/bookings${e}`),Hi=(e,t)=>P(`/admin/bookings/${e}`,{method:`PATCH`,body:{status:t}}),Ui=()=>P(`/admin/enquiries`),Wi=(e,t)=>P(`/admin/enquiries/${e}`,{method:`PATCH`,body:{status:t}}),Gi=()=>P(`/admin/reviews`),Ki=(e,t)=>P(`/admin/reviews/${e}`,{method:`PATCH`,body:{approved:t}}),qi=(e,t)=>{let n=new URLSearchParams;e&&n.set(`category`,e),t&&n.set(`currency`,t);let r=n.toString();return N(`/shop/products${r?`?${r}`:``}`)},Ji=(e,t)=>N(`/shop/products/${e}${t?`?currency=${t}`:``}`),Yi=e=>N(`/shop/orders`,{method:`POST`,body:e,token:pi.get()}),Xi=e=>N(`/shop/orders/${e}`),Zi=()=>P(`/shop/admin/products`),Qi=e=>P(`/shop/admin/products`,{method:`POST`,body:e}),$i=(e,t)=>P(`/shop/admin/products/${e}`,{method:`PATCH`,body:t}),ea=e=>P(`/shop/admin/orders${e?`?status=${e}`:``}`),ta=(e,t)=>P(`/shop/admin/orders/${e}`,{method:`PATCH`,body:{status:t}}),na=(e,t)=>N(`/shop/discount/validate`,{method:`POST`,body:{code:e,subtotalKobo:t}}),ra=e=>P(`/inventory/items${e?`?kind=${e}`:``}`),ia=e=>P(`/inventory/items`,{method:`POST`,body:e}),aa=(e,t,n,r)=>P(`/inventory/items/${e}/adjust`,{method:`POST`,body:{changeQty:t,reason:n,note:r}}),oa=()=>P(`/inventory/low-stock`),sa=()=>P(`/inventory/reports/valuation`),ca=()=>P(`/inventory/suppliers`),la=e=>P(`/inventory/suppliers`,{method:`POST`,body:e}),ua=(e,t)=>P(`/inventory/suppliers/${e}`,{method:`PATCH`,body:t}),da=e=>P(`/inventory/suppliers/${e}`,{method:`DELETE`}),fa=()=>P(`/inventory/purchase-orders`),pa=e=>P(`/inventory/purchase-orders`,{method:`POST`,body:e}),ma=e=>P(`/inventory/purchase-orders/${e}/receive`,{method:`POST`}),ha=e=>P(`/inventory/purchase-orders/${e}/pay`,{method:`POST`}),ga=()=>P(`/admin/users`),_a=e=>P(`/admin/users`,{method:`POST`,body:e}),va=(e,t)=>P(`/admin/users/${e}`,{method:`PATCH`,body:t}),ya=()=>P(`/admin/users/me/permissions`),ba=()=>P(`/admin/roles`),xa=()=>P(`/admin/roles/permissions`),Sa=e=>P(`/admin/roles`,{method:`POST`,body:e}),Ca=(e,t)=>P(`/admin/roles/${e}`,{method:`PATCH`,body:t}),wa=e=>P(`/admin/roles/${e}`,{method:`DELETE`}),Ta=()=>N(`/cms/settings`),Ea=e=>N(`/cms/content${e?`?section=${e}`:``}`),Da=e=>N(`/cms/media${e?`?category=${e}`:``}`),Oa=()=>P(`/cms/admin/settings`),ka=e=>P(`/cms/admin/settings`,{method:`PUT`,body:e}),Aa=e=>P(`/cms/admin/blocks${e?`?section=${e}`:``}`),ja=e=>P(`/cms/admin/blocks`,{method:`PUT`,body:e}),Ma=e=>P(`/cms/admin/blocks/${e}`,{method:`DELETE`}),Na=e=>P(`/cms/admin/media${e?`?category=${e}`:``}`),Pa=e=>P(`/cms/admin/media`,{method:`POST`,body:e}),Fa=(e,t)=>P(`/cms/admin/media/${e}`,{method:`PATCH`,body:t}),Ia=e=>P(`/cms/admin/media/${e}`,{method:`DELETE`}),La=()=>P(`/cms/admin/announcements`),Ra=e=>P(`/cms/admin/announcements`,{method:`POST`,body:e}),za=(e,t)=>P(`/cms/admin/announcements/${e}`,{method:`PATCH`,body:t}),Ba=e=>P(`/cms/admin/announcements/${e}`,{method:`DELETE`}),Va=()=>P(`/cms/admin/pages`),Ha=e=>P(`/cms/admin/pages`,{method:`POST`,body:e}),Ua=(e,t)=>P(`/cms/admin/pages/${e}`,{method:`PATCH`,body:t}),Wa=e=>P(`/cms/admin/pages/${e}`,{method:`DELETE`}),Ga=()=>P(`/cms/admin/seo`),Ka=e=>P(`/cms/admin/seo`,{method:`PUT`,body:e}),qa=e=>P(`/cms/admin/seo/${e}`,{method:`DELETE`}),Ja=()=>P(`/finance/accounts`),Ya=e=>P(`/finance/accounts`,{method:`POST`,body:e}),Xa=(e,t)=>P(`/finance/accounts/${e}`,{method:`PATCH`,body:t}),Za=e=>{let t=new URLSearchParams;e?.from&&t.set(`from`,e.from),e?.to&&t.set(`to`,e.to),e?.source_type&&t.set(`source_type`,e.source_type);let n=t.toString();return P(`/finance/journal${n?`?${n}`:``}`)},Qa=e=>P(`/finance/journal/${e}`),$a=e=>P(`/finance/journal`,{method:`POST`,body:e}),eo=e=>P(`/finance/journal/${e}/void`,{method:`POST`}),to=e=>{let t=new URLSearchParams;e?.from&&t.set(`from`,e.from),e?.to&&t.set(`to`,e.to),e?.category&&t.set(`category`,e.category);let n=t.toString();return P(`/finance/expenses${n?`?${n}`:``}`)},no=e=>P(`/finance/expenses`,{method:`POST`,body:e}),ro=e=>P(`/finance/expenses/${e}`,{method:`DELETE`}),io=(e,t)=>P(`/finance/reports/${e}?${new URLSearchParams(t)}`),ao=()=>P(`/admin/customers`),oo=e=>P(`/admin/customers/${e}`),so=e=>P(`/admin/customers`,{method:`POST`,body:e}),co=(e,t)=>P(`/admin/customers/${e}`,{method:`PATCH`,body:t}),lo=e=>P(`/admin/customers/${e}`,{method:`DELETE`}),uo=()=>P(`/shop/admin/discounts`),fo=e=>P(`/shop/admin/discounts`,{method:`POST`,body:e}),po=(e,t)=>P(`/shop/admin/discounts/${e}`,{method:`PATCH`,body:t}),mo=()=>P(`/admin/resources`),ho=e=>P(`/admin/resources`,{method:`POST`,body:e}),go=(e,t)=>P(`/admin/resources/${e}`,{method:`PATCH`,body:t}),L=e=>P(`/admin/resources/${e}`,{method:`DELETE`}),R=()=>P(`/admin/providers`),_o=(e,t,n)=>P(`/admin/providers/${e}/${t}`,{method:`PUT`,body:{fields:n}}),vo=(e,t)=>P(`/admin/providers/${e}/preferred`,{method:`PUT`,body:{provider:t}}),yo=(e,t,n)=>P(`/admin/providers/${e}/${t}/test`,{method:`POST`,body:{fields:n}}),bo=(e,t)=>P(`/admin/providers/${e}/${t}`,{method:`DELETE`}),xo=(0,x.createContext)(null),So=`ob_region`;function Co(e,t){if(!t)return String(e??``);let n=t.decimals??2,r=Number(e)/10**n;try{return new Intl.NumberFormat(t.locale||`en-US`,{style:`currency`,currency:t.code,minimumFractionDigits:n,maximumFractionDigits:n}).format(r)}
11catch{return(t.symbol||``)+r.toLocaleString()}}function wo({children:e}){let[t,n]=(0,x.useState)([]),[r,i]=(0,x.useState)(null);(0,x.useEffect)(()=>{mi().then(e=>{n(e||[]);let t=localStorage.getItem(So),r=(e||[]).find(e=>e.code===t)||(e||[]).find(e=>e.is_default)||(e||[])[0]||null;i(r)}).catch(()=>n([]))},[]);let a=e=>{let n=t.find(t=>t.code===e);n&&(i(n),localStorage.setItem(So,e),window.dispatchEvent(new CustomEvent(`ob:region-changed`,{detail:e})))},o=r?.currency||null;return(0,M.jsx)(xo.Provider,{value:{regions:t,region:r,setRegion:a,currency:o,currencyCode:o?.code,regionCode:r?.code,money:e=>o?Co(e,o):String(e??``)},children:e})}function z(){let e=(0,x.useContext)(xo);if(!e)throw Error(`useRegion must be used within RegionProvider`);return e}var To=(0,x.createContext)({settings:{},content:{},ready:!1});function Eo({children:e}){let[t,n]=(0,x.useState)({}),[r,i]=(0,x.useState)({}),[a,o]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{Promise.all([Ta().catch(()=>({})),Ea().catch(()=>({}))]).then(([e,t])=>{n(e||{}),i(t||{})}).finally(()=>o(!0))},[]),(0,M.jsx)(To.Provider,{value:{settings:t,content:r,ready:a},children:e})}function Do(){let{settings:e,content:t,ready:n}=(0,x.useContext)(To),r=e=>e!=null&&e!==``;return{settings:e,content:t,ready:n,s:(t,n=``)=>r(e[t])?e[t]:n,c:(e,n,i=``)=>t[e]&&r(t[e][n])?t[e][n]:i}}function Oo({logo:e,name:t,className:n}){let[r,i]=(0,x.useState)(!1);return e&&!r?(0,M.jsx)(`img`,{src:e,alt:t,className:n,onError:()=>i(!0)}):t}var ko=[{label:`About`,href:`/#about`},{label:`Services`,href:`/#services`},{label:`Pricing`,href:`/#pricing`},{label:`Packages`,href:`/#packages`},{label:`Shop`,href:`/shop`,route:!0},{label:`Reviews`,href:`/#reviews`}];function Ao(){let[e,t]=(0,x.useState)(!1),n=(0,x.useRef)(null),r=(0,x.useRef)(null),{count:i}=li(),{regions:a,region:o,setRegion:s}=z(),{s:c}=Do(),l=c(`site.name`,`OptimalBeauty & Spa`),u=c(`site.logo`,``),d=()=>t(!1);return(0,x.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&(d(),r.current?.focus())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`nav`,{className:`site-nav`,children:[(0,M.jsx)(j,{to:`/`,className:`nav-logo`,"aria-label":l,children:(0,M.jsx)(Oo,{logo:u,name:l,className:`nav-logo-img`})}),(0,M.jsxs)(`ul`,{className:`nav-links`,children:[ko.map(e=>(0,M.jsx)(`li`,{children:e.route?(0,M.jsx)(j,{to:e.href,children:e.label}):(0,M.jsx)(`a`,{href:e.href,children:e.label})},e.href)),a.length>1&&(0,M.jsx)(`li`,{children:(0,M.jsx)(`select`,{className:`nav-region`,"aria-label":`Region and currency`,value:o?.code||``,onChange:e=>s(e.target.value),children:a.map(e=>(0,M.jsxs)(`option`,{value:e.code,children:[e.code,` · `,e.currency?.code]},e.code))})}),(0,M.jsx)(`li`,{children:(0,M.jsxs)(j,{to:`/cart`,className:`nav-cart`,"aria-label":`Cart, ${i} items`,children:[`🛍️`,i>0&&(0,M.jsx)(`span`,{className:`cart-count`,children:i})]})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(j,{to:`/book`,className:`nav-cta`,children:`Book Now`})})]}),(0,M.jsxs)(`button`,{ref:r,className:`hamburger ${e?`active`:``}`,onClick:()=>t(e=>!e),"aria-label":`Toggle navigation menu`,"aria-expanded":e,"aria-controls":`mobile-nav`,children:[(0,M.jsx)(`span`,{}),(0,M.jsx)(`span`,{}),(0,M.jsx)(`span`,{})]})]}),(0,M.jsxs)(`div`,{id:`mobile-nav`,ref:n,className:`mobile-nav-overlay ${e?`open`:``}`,hidden:!e,children:[ko.map(e=>e.route?(0,M.jsx)(j,{to:e.href,onClick:d,children:e.label},e.href):(0,M.jsx)(`a`,{href:e.href,onClick:d,children:e.label},e.href)),(0,M.jsxs)(j,{to:`/cart`,onClick:d,children:[`Cart`,i>0?` (${i})`:``]}),a.length>1&&(0,M.jsx)(`select`,{className:`nav-region`,"aria-label":`Region and currency`,value:o?.code||``,onChange:e=>s(e.target.value),children:a.map(e=>(0,M.jsxs)(`option`,{value:e.code,children:[e.code,` · `,e.currency?.code]},e.code))}),(0,M.jsx)(j,{to:`/book`,className:`nav-cta`,onClick:d,children:`Book Now`})]})]})}var jo=[{label:`About`,href:`/#about`},{label:`Services`,href:`/#services`},{label:`Pricing`,href:`/#pricing`},{label:`Packages`,href:`/#packages`},{label:`Reviews`,href:`/#reviews`},{label:`Contact`,href:`/#contact`}];function Mo(){let e=new Date().getFullYear(),{s:t,c:n}=Do(),r=t(`site.name`,`OptimalBeauty & Spa`),i=t(`site.logo`,``),a=t(`contact.phone`,`0808 889 0716`),o=`tel:${(t(`contact.phone_intl`,``)||a).replace(/\s/g,``)}`,s=t(`contact.whatsapp`,`https://wa.me/2348088890716`),c=t(`social.instagram`,`https://instagram.com/optimalbeautyandspa`);return(0,M.jsxs)(`footer`,{className:`site-footer`,children:[(0,M.jsxs)(`div`,{className:`footer-inner`,children:[(0,M.jsxs)(`div`,{className:`footer-brand`,children:[(0,M.jsx)(j,{to:`/`,className:`footer-logo`,"aria-label":r,children:(0,M.jsx)(Oo,{logo:i,name:r,className:`footer-logo-img`})}),(0,M.jsx)(`p`,{className:`footer-tagline`,children:t(`site.tagline`,`Lagos' Premier Wellness Sanctuary`)}),(0,M.jsx)(j,{to:`/book`,className:`nav-cta`,style:{marginTop:`14px`,display:`inline-block`},children:`Book Now`})]}),(0,M.jsxs)(`div`,{className:`footer-links`,children:[(0,M.jsx)(`h4`,{children:`Quick Links`}),(0,M.jsx)(`ul`,{children:jo.map(e=>(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:e.href,children:e.label})},e.href))})]}),(0,M.jsxs)(`div`,{className:`footer-contact`,children:[(0,M.jsx)(`h4`,{children:`Get in Touch`}),(0,M.jsxs)(`ul`,{children:[(0,M.jsx)(`li`,{children:(0,M.jsxs)(`a`,{href:o,children:[`📞 `,a]})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:s,target:`_blank`,rel:`noopener noreferrer`,children:`💬 WhatsApp`})}),(0,M.jsx)(`li`,{children:(0,M.jsx)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,children:`📸 Instagram`})})]})]})]}),(0,M.jsxs)(`div`,{className:`footer-bottom`,children:[(0,M.jsxs)(`p`,{children:[`© `,e,` `,r,`. All rights reserved.`]}),(0,M.jsxs)(`p`,{className:`footer-meta`,children:[(0,M.jsx)(j,{to:`/account`,children:`My Account`}),(0,M.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,M.jsx)(j,{to:`/admin`,children:`Staff Portal`})]}),(0,M.jsx)(`p`,{className:`footer-crafted`,children:n(`footer`,`byline`,`Crafted with ✦ in Lagos`)})]})]})}function B({title:e,description:t,path:n=`/`,image:r}){let{s:i}=Do(),a=i(`site.name`,`OptimalBeauty & Spa`),o=i(`site.tagline`,`Lagos' Premier Wellness Sanctuary`),s=i(`site.url`,`https://optimalbeauty.ng`),c=t||i(`site.description`,`Lagos' premier wellness sanctuary offering massage therapy, facials, body treatments, lash extensions, laser hair removal, and luxury spa packages. Book online.`),l=r||i(`site.og_image`,`/og-image.jpg`),u=e?`${e} — ${a}`:`${a} — ${o}`,d=`${s}${n}`,f=l.startsWith(`http`)?l:`${s}${l}`;return(0,M.jsxs)(ri,{children:[(0,M.jsx)(`title`,{children:u}),(0,M.jsx)(`meta`,{name:`description`,content:c}),(0,M.jsx)(`link`,{rel:`canonical`,href:d}),(0,M.jsx)(`meta`,{property:`og:type`,content:`website`}),(0,M.jsx)(`meta`,{property:`og:site_name`,content:a}),(0,M.jsx)(`meta`,{property:`og:title`,content:u}),(0,M.jsx)(`meta`,{property:`og:description`,content:c}),(0,M.jsx)(`meta`,{property:`og:url`,content:d}),(0,M.jsx)(`meta`,{property:`og:image`,content:f}),(0,M.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),(0,M.jsx)(`meta`,{name:`twitter:title`,content:u}),(0,M.jsx)(`meta`,{name:`twitter:description`,content:c}),(0,M.jsx)(`meta`,{name:`twitter:image`,content:f})]})}function No(){let{s:e,c:t}=Do(),n=e(`contact.phone`,`0808 889 0716`),r=`tel:${(e(`contact.phone_intl`,``)||n).replace(/\s/g,``)}`,[i,a]=(0,x.useState)(``);return(0,x.useEffect)(()=>{Da(`hero`).then(e=>a(e?.[0]?.url||``)).catch(()=>{})},[]),(0,M.jsxs)(`section`,{className:`hero`,id:`home`,children:[i&&(0,M.jsx)(`div`,{className:`hero-photo`,style:{backgroundImage:`url(${i})`}}),(0,M.jsx)(`div`,{className:`hero-bg`}),(0,M.jsx)(`div`,{className:`hero-ornament`}),(0,M.jsxs)(`div`,{className:`hero-content`,children:[(0,M.jsx)(`div`,{className:`hero-eyebrow`,children:t(`hero`,`eyebrow`,`Lagos' Premier Wellness Sanctuary`)}),(0,M.jsx)(`h1`,{dangerouslySetInnerHTML:{__html:t(`hero`,`headline`,`Where Beauty<br />Meets <em>Serenity</em>`)}}),(0,M.jsx)(`p`,{className:`hero-tagline`,children:t(`hero`,`tagline`,`Indulge in world-class treatments crafted for your ultimate restoration`)}),(0,M.jsx)(`a`,{href:r,className:`hero-tel`,children:n}),(0,M.jsxs)(`div`,{className:`hero-actions`,children:[(0,M.jsx)(`a`,{href:t(`hero`,`cta_primary_url`,`#packages`),className:`btn-primary`,children:t(`hero`,`cta_primary_text`,`Explore Packages`)}),(0,M.jsx)(`a`,{href:t(`hero`,`cta_secondary_url`,`#pricing`),className:`btn-outline`,children:t(`hero`,`cta_secondary_text`,`View Services & Pricing`)})]})]}),(0,M.jsxs)(`div`,{className:`hero-scroll`,children:[(0,M.jsx)(`div`,{className:`scroll-line`}),(0,M.jsx)(`span`,{children:`Scroll`})]})]})}function Po(){let e=(0,x.useRef)(null);return(0,x.useCallback)(t=>{if(e.current&&=(e.current.disconnect(),null),!t)return;let n=new IntersectionObserver(e=>
11{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add(`visible`),n.unobserve(e.target))})},{threshold:.05,rootMargin:`200px 0px`});n.observe(t),e.current=n},[])}var Fo=[{num:`12+`,label:`Massage Types`},{num:`16+`,label:`Facial Treatments`},{num:`5★`,label:`Client Experience`},{num:`∞`,label:`Mobile Services`}];function Io(){let e=Po(),{c:t}=Do(),n=Fo.map((e,n)=>({num:t(`about`,`stat_${n+1}_value`,e.num),label:t(`about`,`stat_${n+1}_label`,e.label)}));return(0,M.jsx)(`section`,{className:`about`,id:`about`,children:(0,M.jsx)(`div`,{className:`section-inner`,children:(0,M.jsxs)(`div`,{className:`about-grid fade-in`,ref:e,children:[(0,M.jsxs)(`div`,{className:`about-text`,children:[(0,M.jsxs)(`p`,{children:[`"`,t(`about`,`quote`,`At OptimalBeauty & Spa, we believe true wellness is a ritual — not a routine.`),`"`]}),(0,M.jsx)(`p`,{children:t(`about`,`paragraph_1`,`Nestled in the heart of Lagos, we offer a curated sanctuary where expert therapists, premium products, and an atmosphere of refined calm come together to deliver transformative results.`)}),(0,M.jsx)(`p`,{children:t(`about`,`paragraph_2`,`From deeply therapeutic massages and advanced facial treatments to body exfoliation rituals and aesthetic enhancements, every service is tailored to honour your body and restore your glow.`)}),(0,M.jsx)(`p`,{children:t(`about`,`paragraph_3`,`Whether you come for a single treatment or surrender to one of our signature multi-hour packages, you will leave feeling entirely renewed.`)})]}),(0,M.jsx)(`div`,{className:`about-visual`,children:n.map(e=>(0,M.jsxs)(`div`,{className:`about-stat`,children:[(0,M.jsx)(`span`,{className:`stat-num`,children:e.num}),(0,M.jsx)(`span`,{className:`stat-label`,children:e.label})]},e.label))})]})})})}function Lo(e,t=[]){let[n,r]=(0,x.useState)(null),[i,a]=(0,x.useState)(!0),[o,s]=(0,x.useState)(null),c=(0,x.useRef)(e);return c.current=e,(0,x.useEffect)(()=>{let e=!1;return a(!0),s(null),c.current().then(t=>{e||(r(t),a(!1))}).catch(t=>{e||(s(t.message),a(!1))}),()=>{e=!0}},t),{data:n,loading:i,error:o}}var Ro=`2348088890716`;function zo(e,t){let n=`Hi, I'd like to book`;return e&&(n+=` *${e}*`),t&&(n+=` (${t})`),n+=` at OptimalBeauty & Spa. Please help me schedule.`,`https://wa.me/${Ro}?text=${encodeURIComponent(n)}`}function Bo({section:e,eyebrow:t,title:n,subtitle:r,align:i=`center`,titleColor:a,subtitleColor:o,marginBottom:s}){let{c}=Do(),l=e?c(e,`eyebrow`,t):t,u=e?c(e,`title`,n):n,d=e?c(e,`subtitle`,r):r;return(0,M.jsxs)(`div`,{className:`section-header ${i===`left`?`left`:``}`,style:s===void 0?void 0:{marginBottom:s},children:[l&&(0,M.jsx)(`span`,{className:`section-eyebrow`,children:l}),(0,M.jsx)(`h2`,{className:`section-title`,style:a?{color:a}:void 0,dangerouslySetInnerHTML:{__html:u}}),d&&(0,M.jsx)(`p`,{className:`section-subtitle`,style:o?{color:o}:void 0,children:d}),(0,M.jsx)(`div`,{className:`divider`})]})}var Vo=typeof window<`u`?window.location.origin:``;function Ho(e,{url:t,title:n,text:r}){let i=encodeURIComponent(t),a=encodeURIComponent(r||n);switch(e){case`whatsapp`:return`https://wa.me/?text=${a}%20${i}`;case`facebook`:return`https://www.facebook.com/sharer/sharer.php?u=${i}`;case`twitter`:return`https://twitter.com/intent/tweet?text=${a}&url=${i}`;case`linkedin`:return`https://www.linkedin.com/sharing/share-offsite/?url=${i}`;default:return t}}function Uo({title:e,text:t,url:n,className:r=``,variant:i=`light`}){let[a,o]=(0,x.useState)(!1),[s,c]=(0,x.useState)(!1),l=(0,x.useRef)(null),u=(0,x.useRef)(null),d=n?.startsWith(`http`)?n:`${Vo}${n||``}`,f=t||e||`Check this out from OptimalBeauty & Spa!`;(0,x.useEffect)(()=>{if(!a)return;let e=e=>{l.current&&!l.current.contains(e.target)&&u.current&&!u.current.contains(e.target)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[a]);let p=async t=>{if(t===`copy`){try{await navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),2e3)}catch{let e=document.createElement(`input`);e.value=d,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),c(!0),setTimeout(()=>c(!1),2e3)}return}if(navigator.share&&t===`native`){try{await navigator.share({title:e,text:f,url:d})}catch{}o(!1);return}let n=Ho(t,{url:d,title:e||``,text:f});window.open(n,`_blank`,`noopener,noreferrer,width=600,height=400`),o(!1)};
11return(0,M.jsxs)(`div`,{className:`social-share ${r}`,onClick:e=>e.stopPropagation(),children:[(0,M.jsx)(`button`,{ref:u,className:`share-trigger share-trigger--${i}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),o(e=>!e)},"aria-label":`Share`,title:`Share`,type:`button`,children:(0,M.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`circle`,{cx:`18`,cy:`5`,r:`3`}),(0,M.jsx)(`circle`,{cx:`6`,cy:`12`,r:`3`}),(0,M.jsx)(`circle`,{cx:`18`,cy:`19`,r:`3`}),(0,M.jsx)(`line`,{x1:`8.59`,y1:`13.51`,x2:`15.42`,y2:`17.49`}),(0,M.jsx)(`line`,{x1:`15.41`,y1:`6.51`,x2:`8.59`,y2:`10.49`})]})}),a&&(0,M.jsxs)(`div`,{ref:l,className:`share-menu`,children:[(0,M.jsxs)(`button`,{className:`share-option`,onClick:()=>p(`whatsapp`),children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`#25D366`,children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})}),`WhatsApp`]}),(0,M.jsxs)(`button`,{className:`share-option`,onClick:()=>p(`facebook`),children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`#1877F2`,children:(0,M.jsx)(`path`,{d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`})}),`Facebook`]}),(0,M.jsxs)(`button`,{className:`share-option`,onClick:()=>p(`twitter`),children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`#000`,children:(0,M.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})}),`X / Twitter`]}),(0,M.jsxs)(`button`,{className:`share-option`,onClick:()=>p(`linkedin`),children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`#0A66C2`,children:(0,M.jsx)(`path`,{d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`})}),`LinkedIn`]}),(0,M.jsx)(`div`,{className:`share-divider`}),(0,M.jsxs)(`button`,{className:`share-option`,onClick:()=>p(`copy`),children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:s?(0,M.jsx)(`polyline`,{points:`20 6 9 17 4 12`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,M.jsx)(`path`,{d:`M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1`})]})}),s?`Copied!`:`Copy link`]})]})]})}function Wo(){let{data:e,loading:t,error:n}=Lo(hi),r=Po(),i=Po();return(0,M.jsx)(`section`,{className:`services-overview`,id:`services`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:r,children:(0,M.jsx)(Bo,{section:`services`,eyebrow:`What We Offer`,title:`Comprehensive <em>Beauty & Wellness</em>`,subtitle:`Every treatment is a journey. Choose yours.`})}),n&&(0,M.jsxs)(`p`,{className:`section-error`,role:`alert`,children:[`We couldn't load our services right now. Please call `,``,(0,M.jsx)(`a`,{href:`tel:08088890716`,children:`0808 889 0716`}),`.`]}),(0,M.jsx)(`div`,{className:`services-grid fade-in`,ref:i,children:t?Array.from({length:8}).map((e,t)=>(0,M.jsxs)(`div`,{className:`service-card`,children:[(0,M.jsx)(`span`,{className:`service-icon`,children:`✦`}),(0,M.jsx)(`span`,{className:`service-name`,children:`Loading...`})]},t)):e?.map(e=>(0,M.jsxs)(`div`,{className:`service-card`,children:[(0,M.jsx)(Uo,{className:`s
11ocial-share--card`,title:e.name,text:`${e.name} — ${e.description} | OptimalBeauty & Spa`,url:`/#services`}),(0,M.jsx)(`span`,{className:`service-icon`,children:e.icon}),(0,M.jsx)(`span`,{className:`service-name`,children:e.name}),(0,M.jsx)(`p`,{className:`service-desc`,children:e.description}),(0,M.jsxs)(`div`,{className:`service-actions`,children:[(0,M.jsx)(j,{to:`/book?service=${encodeURIComponent(e.name)}`,className:`service-book`,children:`Book Online`}),(0,M.jsx)(`a`,{href:zo(e.name),target:`_blank`,rel:`noopener noreferrer`,className:`service-book service-book--wa`,children:`WhatsApp`})]})]},e.id))})]})})}function Go(){let{data:e,loading:t,error:n}=Lo(gi),[r,i]=(0,x.useState)(0),a=Po(),o=Po(),s=Po(),c=e?.[r];return(0,M.jsx)(`section`,{className:`price-menu`,id:`pricing`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:a,children:(0,M.jsx)(Bo,{section:`pricing`,eyebrow:`Service Menu`,title:`Treatments & <em>Pricing</em>`,subtitle:`Transparent pricing. No hidden charges.`})}),n&&(0,M.jsxs)(`p`,{className:`section-error`,role:`alert`,children:[`We couldn't load the price menu. Please call `,(0,M.jsx)(`a`,{href:`tel:08088890716`,children:`0808 889 0716`}),`.`]}),!t&&e&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`price-tabs fade-in`,ref:o,children:e.map((e,t)=>(0,M.jsx)(`button`,{className:`tab-btn ${t===r?`active`:``}`,onClick:()=>i(t),children:e.label},e.id))}),(0,M.jsx)(`div`,{className:`price-list`,children:c?.items.map((e,t)=>(0,M.jsxs)(`div`,{className:`price-item`,children:[(0,M.jsxs)(`div`,{className:`price-item-info`,children:[(0,M.jsx)(`div`,{className:`price-item-name`,children:e.name}),e.detail&&(0,M.jsx)(`div`,{className:`price-item-detail`,children:e.detail})]}),(0,M.jsxs)(`div`,{className:`price-item-right`,children:[(0,M.jsx)(`div`,{className:`price-item-cost`,children:e.price}),(0,M.jsx)(j,{to:`/book?service=${encodeURIComponent(e.name)}`,className:`price-item-book`,children:`Book`}),(0,M.jsx)(`a`,{href:zo(e.name),target:`_blank`,rel:`noopener noreferrer`,className:`price-item-book price-item-book--wa`,title:`Book via WhatsApp`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,fill:`currentColor`,children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})})})]})]},`${c.id}-${t}`))})]}),(0,M.jsxs)(`div`,{className:`price-note fade-in`,ref:s,children:[(0,M.jsx)(`strong`,{children:`Mobile Services Available`}),` — All treatments can be brought to your home or office.`,(0,M.jsx)(`br`,{}),`Mobile service rates are `,(0,M.jsx)(`strong`,{children:`double the listed prices`}),`. Call us to schedule:`,` `,(0,M.jsx)(`strong`,{children:`0808 889 0716`})]})]})})}function Ko(){let{data:e,loading:t,error:n}=Lo(_i),r=Po(),i=Po(),a=Po();return n?(0,M.jsx)(`section`,{className:`packages`,id:`packages`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(Bo,{section:`packages`,eyebrow:`Curated Experiences`,title:`Signature <em>Packages</em>`,subtitle:`Multi-treatment journeys designed for total transformation.`}),(0,M.jsxs)(`p`,{className:`section-error`,role:`alert`,children:[`We couldn't load packages. Please call `,(0,M.jsx)(`a`,{href:`tel:08088890716`,children:`0808 889 0716`}),`.`]})]})}):t||!e?(0,M.jsx)(`section`,{className:`packages`,id:`packages`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(Bo,{section:`packages`,eyebrow:`Curated Experiences`,title:`Signature <em>Packages</em>`,subtitle:`Multi-treatment journeys designed for total transformation.`}),(0,M.jsx)(`div`,{className:`packages-grid`,children:Array.from({length:6}).map((e,t)=>(0,M.jsx)(`div`,{className:`pkg-card pkg-card--light`,children:(0,M.jsx)(`div`,{className:`pkg-card__name`,children:`Loading…`})},t))})]})}):(0,M.jsx)(`section`,{className:`packages`,id:`packages`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:r,children:(0,M.jsx)(Bo,{section:`packages`,eyebrow:`Curated Experiences`,title:`Signature <em>Packages</em>`,subtitle:`Multi-treatment journeys designed for total transformation.`})}),(0,M.jsx)(`div`,{className:`packages-grid fade-in`,ref:i,children:e.main.map(e=>(0,M.jsxs)(`div`,{className:`pkg-card pkg-card--${e.variant} ${e.featured?`pkg-card--featured`:``}`,children:[e.badge&&(0,M.jsx)(`span`,{className:`pkg-badge`,children:e.badge}
11),(0,M.jsx)(Uo,{className:`social-share--card`,title:e.name,text:`${e.name} — ${e.tagline} at OptimalBeauty & Spa`,url:`/#packages`,variant:e.variant===`dark`?`dark`:`light`}),(0,M.jsx)(`div`,{className:`pkg-card__name`,children:e.name}),(0,M.jsx)(`p`,{className:`pkg-card__tagline`,children:e.tagline}),(0,M.jsx)(`ul`,{className:`pkg-card__items`,children:e.items.map((e,t)=>(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`span`,{className:`pkg-check`,children:`✦`}),e]},t))}),(0,M.jsxs)(`div`,{className:`pkg-card__price`,children:[e.price,e.priceLabel&&(0,M.jsx)(`span`,{className:`pkg-card__price-label`,children:e.priceLabel})]}),(0,M.jsxs)(`div`,{className:`pkg-card__actions`,children:[(0,M.jsx)(j,{to:`/book?package=${encodeURIComponent(e.name)}`,className:`pkg-card__cta ${e.variant===`dark`?`btn-primary`:`btn-outline-dark`}`,children:`Book Online`}),(0,M.jsxs)(`a`,{href:zo(null,e.name),target:`_blank`,rel:`noopener noreferrer`,className:`pkg-card__wa`,title:`Book via WhatsApp`,children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`18`,height:`18`,fill:`currentColor`,children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})}),`WhatsApp`]})]})]},e.id))}),e.secondary&&e.secondary.length>0&&(0,M.jsxs)(`div`,{className:`packages-secondary fade-in`,ref:a,children:[(0,M.jsx)(`h3`,{className:`secondary-heading`,children:`More Packages`}),(0,M.jsx)(`div`,{className:`secondary-grid`,children:e.secondary.map(e=>(0,M.jsxs)(`div`,{className:`secondary-card secondary-card--${e.variant}`,children:[(0,M.jsx)(`div`,{className:`secondary-card__name`,children:e.name}),(0,M.jsx)(`p`,{className:`secondary-card__tagline`,children:e.tagline}),(0,M.jsx)(`ul`,{className:`secondary-card__items`,children:e.items.map((e,t)=>(0,M.jsx)(`li`,{children:e},t))}),(0,M.jsx)(`div`,{className:`secondary-card__price`,children:e.price})]},e.id))})]})]})})}function qo(){let{data:e,loading:t,error:n}=Lo(vi),r=Po(),i=Po();return(0,M.jsx)(`section`,{className:`laser`,id:`laser`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:r,children:(0,M.jsx)(Bo,{section:`laser`,eyebrow:`Advanced Treatment`,title:`Laser Hair <em>Removal</em>`,subtitle:`Permanent results with our state-of-the-art laser technology. Save with course packages.`})}),n&&(0,M.jsxs)(`p`,{className:`section-error`,role:`alert`,style:{color:`rgba(255,255,255,0.6)`},children:[`We couldn't load laser pricing. Please call `,(0,M.jsx)(`a`,{href:`tel:08088890716`,children:`0808 889 0716`}),`.`]}),(0,M.jsx)(`div`,{className:`laser-table-wrap fade-in`,ref:i,children:(0,M.jsxs)(`table`,{className:`laser-table`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Treatment Area`}),(0,M.jsx)(`th`,{children:`Per Session`}),(0,M.jsx)(`th`,{children:`Course`}),(0,M.jsx)(`th`,{children:`Course Price`})]})}),(0,M.jsx)(`tbody`,{children:t?Array.from({length:4}).map((e,t)=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:`Loading…`}),(0,M.jsx)(`td`,{children:`—`}),(0,M.jsx)(`td`,{children:`—`}),(0,M.jsx)(`td`,{children:`—`})]},t)):e?.map((e,t)=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{className:`laser-area`,children:e.area}),(0,M.jsx)(`td`,{children:e.perSession}),(0,M.jsx)(`td`,{className:`laser-sessions`,children:e.sessions}),(0,M.jsx)(`td`,{className:`laser-course-price`,children:e.coursePrice})]},t))})]})}),(0,M.jsxs)(`div`,{className:`laser-cta`,children:[(0,M.jsx)(j,{to:`/book`,className:`btn-primary`,children:`Book Online`}),(0,M.jsxs)(`a`,{href:zo(`Laser Hair Removal consultation`),target:`_blank`,rel:`noopener noreferrer`,className:`btn-outline laser-wa`,children:[(0,M.jsx)(`svg`,{viewB
11ox:`0 0 24 24`,width:`16`,height:`16`,fill:`currentColor`,style:{verticalAlign:`middle`,marginRight:6},children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})}),`Book via WhatsApp`]})]})]})})}var Jo=[{id:`p1`,label:`Treatment room`,tone:`a`},{id:`p2`,label:`Facial therapy`,tone:`b`},{id:`p3`,label:`Massage suite`,tone:`c`},{id:`p4`,label:`Lash artistry`,tone:`b`},{id:`p5`,label:`Relaxation lounge`,tone:`a`},{id:`p6`,label:`Nail studio`,tone:`c`}];function Yo(){let e=Po(),t=Po(),[n,r]=(0,x.useState)([]);(0,x.useEffect)(()=>{Da(`gallery`).then(e=>r(e||[])).catch(()=>r([]))},[]);let i=n.length>0;return(0,M.jsx)(`section`,{className:`gallery`,id:`gallery`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:e,children:(0,M.jsx)(Bo,{section:`gallery`,eyebrow:`Inside the Sanctuary`,title:`A Glimpse of the <em>Experience</em>`,subtitle:`Calm, considered spaces designed for restoration.`})}),(0,M.jsx)(`div`,{className:`gallery-grid fade-in`,ref:t,children:i?n.map(e=>(0,M.jsxs)(`figure`,{className:`gallery-tile`,children:[/\.(mp4|webm|mov)$/i.test(e.url)?(0,M.jsx)(`video`,{className:`gallery-photo`,src:e.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:`metadata`}):(0,M.jsx)(`img`,{src:e.url,alt:e.alt||``,loading:`lazy`,className:`gallery-photo`}),e.alt&&(0,M.jsx)(`figcaption`,{children:e.alt})]},e.id)):Jo.map(e=>(0,M.jsx)(`figure`,{className:`gallery-tile tone-${e.tone}`,"aria-label":e.label,children:(0,M.jsx)(`figcaption`,{children:e.label})},e.id))})]})})}function Xo({value:e}){return(0,M.jsxs)(`span`,{className:`stars`,"aria-label":`${e} out of 5 stars`,children:[`★`.repeat(e),`☆`.repeat(5-e)]})}function Zo(){let{data:e,loading:t,error:n}=Lo(ki),r=Po(),[i,a]=(0,x.useState)({author_name:``,rating:5,service:``,body:``,company:``}),[o,s]=(0,x.useState)(`idle`),[c,l]=(0,x.useState)(``),[u,d]=(0,x.useState)(!1),f=e=>a({...i,[e.target.name]:e.target.value}),p=async e=>{e.preventDefault(),s(`sending`);try{let e=await Ai({...i,rating:Number(i.rating)});s(`success`),l(e.message),a({author_name:``,rating:5,service:``,body:``,company:``})}catch(e){s(`error`),l(e.message)}},m=e?.reviews||[],h=e?.summary;return(0,M.jsx)(`section`,{className:`reviews`,id:`reviews`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:r,children:(0,M.jsx)(Bo,{section:`reviews`,eyebrow:`Loved by Our Guests`,title:`What Clients <em>Say</em>`,subtitle:h&&h.count>0?`${h.average} ★ average from ${h.count} reviews`:`Real words from real visits.`})}),n&&(0,M.jsx)(`p`,{className:`section-error`,role:`alert`,children:`Reviews are unavailable right now.`}),!t&&m.length>0&&(0,M.jsx)(`div`,{className:`reviews-grid`,children:m.map(e=>(0,M.jsxs)(`figure`,{className:`review-card`,children:[(0,M.jsx)(Xo,{value:e.rating}),(0,M.jsx)(`blockquote`,{children:e.body}),(0,M.jsxs)(`figcaption`,{children:[`— `,e.author_name,e.service?(0,M.jsxs)(`span`,{className:`review-service`,children:[` · `,e.service]}):null]})]},e.id))}),(0,M.jsxs)(`div`,{className:`review-write`,children:[(0,M.jsx)(`button`,{className:`btn-outline-dark`,onClick:()=>d(e=>!e),"aria-expanded":u,children:u?`Close`:`Write a review`}),u&&(0,M.jsxs)(`form`,{className:`review-form`,onSubmit:p,children:[(0,M.jsxs)(`div`,{className:`rf-row`,children:[(0,M.jsx)(`input`,{name:`author_name`,value:i.author_name,onChange:f,placeholder:`Your name`,required:!0,maxLength:120}),(0,M.jsx)(`select`,{name:`rating`,value:i.rating,onChange:f,"aria-label":`Rating`,children:[5,4,3,2,1].map(e=>(0,M.jsxs)(`option`,{value:e,children:[e,` stars`]},e))})]}),(0,M.jsx)(`input`,{name:`service`,value:i.service,onChange:f,placeholder:`Service (optional)`,maxLength:160}),(0,M.jsx)(`textarea`,{name:`body`,value:i.body,onChange:f,placeholder:`Tell us about your experience`,required:!0,maxLength:2e3,rows:3}),(0,M.jsx)(`input`,{name:`company`,value:i.company,onChange:f,className:`hp-field`,tabIndex:-1,autoComplete:`off`,"aria-hidden":`true`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,disabled:o===`sending`,children:o===`sending`?`Sending…`:`Submit review`}),(0,M.jsxs)(`div`,{"aria-live":`polite`,children:[o===`success`&&(0,M.jsx)(`p`,{className:`rf-ok`,children:c}),o===`error`&&(0,M.jsx)(`p`,{className:`rf-err`,children:c})]})]})]})]})})}function Qo(){let{data:e,loading:t,error:n}=Lo(yi),r=Po(),i=Po();return(0,M.jsx)(`section`,{className:`products`,id:`products`,children:(0,M.jsx)(`div`,{className:`section-inner`,children:(0,M.jsxs)(`div`,{className:`products-content`,children:[(0,M.jsxs)(`div`,{className:`products-intro fade-in`,ref:r,children:[(0,M.jsx)(Bo,{section:`products`,eyebrow:`Take Home the Glow`,title:`Curated <em>Products</em>`,align:`left`,subtitle:`Premium skincare and body care, hand-picked by our therapists — shop online for delivery or pickup.`}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,marginTop:`8px`},children:[(0,M.jsx)(j,{to:`/shop`,className:`btn-primary`,children:`Shop now`}),(0,M.jsx)(Uo,{title:`OptimalBeauty & Spa — Curated Products`,text:`Premium skincare and body care from OptimalBeauty & Spa, Lagos.`,url:`/shop`})]})]}),(0,M.jsxs)(`div`,{className:`products-grid fade-in`,ref:i,children:[n&&(0,M.jsx)(`p`,{className:`section-error`,role:`alert`,children:`Product list unavailable right now.`}),t?Array.from({length:9}).map((e,t)=>(0,M.jsx)(`div`,{className:`product-tag`,children:`Loading…`},t)):e?.map(e=>(0,M.jsx)(`div`,{className:`product-tag`,children:e},e))]})]})})})}function $o(){let e=Po(),{s:t}=Do(),n=t(`contact.address`,`Victoria Island, Lagos, Nigeria`),r=encodeURIComponent(n),i=t(`contact.phone`,`0808 889 0716`),a=`tel:${(t(`contact.phone_intl`,``)||i).replace(/\s/g,``)}`,o=t(`contact.whatsapp`,`https://wa.me/2348088890716`);return(0,M.jsx)(`section`,{className:`location`,id:`location`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:e,children:(0,M.jsx)(Bo,{section:`location`,eyebrow:`Come Visit`,title:`Find <em>Us</em>`,subtitle:`Walk-ins welcome. We also bring the spa to your home or office.`})}),(0,M.jsxs)(`div`,{className:`location-grid`,children:[(0,M.jsxs)(`div`,{className:`location-info`,children:[(0,M.jsxs)(`div`,{className:`loc-row`,children:[(0,M.jsx)(`span`,{className:`loc-icon`,"aria-hidden":`true`,children:`📍`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`Address`}),(0,M.jsx)(`p`,{children:n})]})]}),(0,M.jsxs)(`div`,{className:`loc-row`,children:[(0,M.jsx)(`span`,{className:`loc-icon`,"aria-hidden":`true`,children:`🕐`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`Opening Hours`}),(0,M.jsx)(`p`,{children:t(`hours.weekday`,`Mon – Sat: 9 AM – 8 PM`)}),(0,M.jsx)(`p`,{children:t(`hours.weekend`,`Sun: 10 AM – 6 PM`)})]})]}),(0,M.jsxs)(`div`,{className:`loc-row`,children:[(0,M.jsx)(`span`,{className:`loc-icon`,"aria-hidden":`true`,children:`📞`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`Reservations`}),(0,M.jsx)(`p`,{children:(0,M.jsx)(`a`,{href:a,children:i})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(`a`,{href:o,target:`_blank`,rel:`noopener noreferrer`,children:`WhatsApp us`})})]})]})]}),(0,M.jsx)(`div`,{className:`location-map`,children:(0,M.jsx)(`iframe`,{title:`Map to OptimalBeauty & Spa`,src:`https://www.google.com/maps?q=${r}&output=embed`,loading:`lazy`,referrerPolicy:`no-referrer-when-downgrade`,allowFullScreen:!0})})]})]})})}var es=[`Massage Therapy`,`Facial Treatment`,`Body Exfoliation`,`Nail Care`,`Body Waxing`,`Lash Extensions`,`Teeth Whitening`,`Laser Hair Removal`,`IV / Glutathione`,`Spa Package`,`Other`];function ts(){let e=Po(),t=Po(),n=Po(),{s:r}=Do(),i=r(`contact.phone`,`0808 889 0716`),a=`tel:${(r(`contact.phone_intl`,``)||i).replace(/\s/g,``)}`,o=r(`contact.whatsapp`,`https://wa.me/2348088890716`),[s,c]=(0,x.useState)({name:``,email:``,phone:``,service:``,message:``}),[l,u]=(0,x.useState)(`idle`),[d,f]=(0,x.useState)(``),p=e=>{c({...s,[e.target.name]:e.target.value})};return(0,M.jsx)(`section`,{className:`contact`,id:`contact`,children:(0,M.jsxs)(`div`,{className:`section-inner`,children:[(0,M.jsx)(`div`,{className:`fade-in`,ref:e,children:(0,M.jsx)(Bo,{section:`contact`,eyebrow:`Get in Touch`,title:`Book Your <em>Experience</em>`,subtitle:`Ready to begin your wellness journey? Reach out and we'll take care of everything.`})}),(0,M.jsxs)(`div`,{className:`contact-grid`,children:[(0,M.jsxs)(`form`,{className:`contact-form fade-in`,ref:t,onSubmit:async e=>{e.preventDefault(),u(`sending`),f(``);try{await Oi(s),u(`success`),c({name:``,email:``,phone:``,service:``,message:``})}catch(e){u(`error`),f(e.message||`Something went wrong. Please try again.`)}},children:[(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{htmlFor:`contact-name`,children:`Full Name`}),(0,M.jsx)(`input`,{id:`contact-name`,type:`text`,name:`name`,value:s.name,onChange:p,required:!0,placeholder:`Your name`})]}),(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{htmlFor:`contact-email`,children:`Email`}),(0,M.jsx)(`input`,{id:`contact-email`,type:`email`,name:`email`,value:s.email,onChange:p,required:!0,placeholder:`[email protected]`})]})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{htmlFor:`contact-phone`,children:`Phone`}),(0,M.jsx)(`input`,{id:`contact-phone`,type:`tel`,name:`phone`,value:s.phone,onChange:p,required:!0,placeholder:`080X XXX XXXX`})]}),(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{htmlFor:`contact-service`,children:`Service Interest`}),(0,M.jsxs)(`select`,{id:`contact-service`,name:`service`,value:s.service,onChange:p,required:!0,children:[(0,M.jsx)(`option`,{value:``,children:`Select a service…`}),es.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))]})]})]}),(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{htmlFor:`contact-message`,children:`Message`}),(0,M.jsx)(`textarea`,{id:`contact-message`,name:`message`,value:s.message,onChange:p,rows:5,placeholder:`Tell us about your ideal experience…`})]}),(0,M.jsx)(`button`,{type:`submit`,className:`btn-primary contact-submit`,disabled:l===`
11sending`,children:l===`sending`?`Sending…`:`Send Enquiry`}),(0,M.jsxs)(`div`,{"aria-live":`polite`,role:`status`,children:[l===`success`&&(0,M.jsx)(`div`,{className:`form-feedback form-feedback--success`,children:`✦ Thank you! We'll be in touch within 24 hours.`}),l===`error`&&(0,M.jsx)(`div`,{className:`form-feedback form-feedback--error`,children:d})]})]}),(0,M.jsxs)(`div`,{className:`contact-info fade-in`,ref:n,children:[(0,M.jsxs)(`div`,{className:`info-card`,children:[(0,M.jsx)(`span`,{className:`info-icon`,children:`📞`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`Call Us`}),(0,M.jsx)(`a`,{href:a,children:i})]})]}),(0,M.jsxs)(`div`,{className:`info-card`,children:[(0,M.jsx)(`span`,{className:`info-icon`,children:`💬`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`WhatsApp`}),(0,M.jsx)(`a`,{href:o,target:`_blank`,rel:`noopener noreferrer`,children:`Chat with us`})]})]}),(0,M.jsxs)(`div`,{className:`info-card`,children:[(0,M.jsx)(`span`,{className:`info-icon`,children:`📍`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`Visit Us`}),(0,M.jsx)(`p`,{children:r(`contact.address`,`Lagos, Nigeria`)})]})]}),(0,M.jsxs)(`div`,{className:`info-card`,children:[(0,M.jsx)(`span`,{className:`info-icon`,children:`🕐`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{children:`Hours`}),(0,M.jsx)(`p`,{children:r(`hours.weekday`,`Mon – Sat: 9 AM – 8 PM`)}),(0,M.jsx)(`p`,{children:r(`hours.weekend`,`Sun: 10 AM – 6 PM`)})]})]})]})]})]})})}function ns(){let e=pt();return(0,x.useEffect)(()=>{if(!e.hash)return;let t=()=>{let t=document.querySelector(e.hash);t&&t.scrollIntoView({behavior:`smooth`})};t();let n=setTimeout(t,800);return()=>clearTimeout(n)},[e]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(B,{path:`/`}),(0,M.jsx)(No,{}),(0,M.jsx)(Io,{}),(0,M.jsx)(Wo,{}),(0,M.jsx)(Go,{}),(0,M.jsx)(Ko,{}),(0,M.jsx)(qo,{}),(0,M.jsx)(Yo,{}),(0,M.jsx)(Zo,{}),(0,M.jsx)(Qo,{}),(0,M.jsx)($o,{}),(0,M.jsx)(ts,{})]})}var rs=[`Item`,`Date & Time`,`Your Details`,`Confirm`];function is(){return new Date().toISOString().slice(0,10)}function as(){let e=gt(),[t]=Un(),{money:n,regionCode:r,currencyCode:i}=z(),[a,o]=(0,x.useState)(0),[s,c]=(0,x.useState)([]),[l,u]=(0,x.useState)([]),[d,f]=(0,x.useState)(!0),[p,m]=(0,x.useState)(null),[h,g]=(0,x.useState)(null),[_,v]=(0,x.useState)(``),[y,b]=(0,x.useState)(is()),[S,C]=(0,x.useState)([]),[w,T]=(0,x.useState)(!1),[ee,te]=(0,x.useState)(``),[E,ne]=(0,x.useState)(!1),[D,re]=(0,x.useState)({name:``,email:``,phone:``,company:``,notes:``}),[ie,ae]=(0,x.useState)(!1),[oe,se]=(0,x.useState)(``),O=(0,x.useMemo)(()=>s.find(e=>e.type===p&&e.id===h),[s,p,h]),k=O?.type===`service`,ce=e=>{m(e.type),g(e.id)};(0,x.useEffect)(()=>{f(!0),bi(i).then(e=>{if(c(e),p&&h)return;let n=t.get(`type`),r=t.get(`id`);if(n&&r){let t=e.find(e=>e.type===n&&String(e.id)===String(r));if(t){ce(t),o(1);return}}let i=t.get(`service`);if(i){let t=i.toLowerCase(),n=e.find(e=>e.type===`service`&&e.name.toLowerCase()===t)||e.find(e=>e.type===`service`&&e.name.toLowerCase().includes(t));if(n){ce(n),o(1);return}}let a=t.get(`package`);if(a){let t=a.toLowerCase(),n=e.find(e=>e.type===`package`&&e.name.toLowerCase().includes(t));n&&(ce(n),o(1))}}).catch(e=>se(e.message)).finally(()=>f(!1))},[i]),(0,x.useEffect)(()=>{!p||h==null||(v(``),xi({bookableType:p,bookableId:h}).then(u).catch(()=>u([])))},[p,h]),(0,x.useEffect)(()=>{h==null||a!==1||(T(!0),te(``),Si({bookableType:p,bookableId:h,date:y,staffId:_||void 0}).then(e=>C(e.slots)).catch(e=>{C([]),se(e.message)}).finally(()=>T(!1)))},[p,h,y,_,a]);let le=(0,x.useMemo)(()=>{let e={};for(let t of s)(e[t.group]=e[t.group]||[]).push(t);return e},[s]),ue=O?E&&k?O.price_minor*2:O.price_minor:0,de=O?.virtual?`Virtual (online)`:E&&k?`Mobile (we come to you)`:`In-spa`;return(0,M.jsxs)(`main`,{className:`book-page`,children:[(0,M.jsx)(B,{title:`Book an Appointment`,path:`/book`}),(0,M.jsxs)(`div`,{className:`book-inner`,children:[(0,M.jsxs)(`h1`,{className:`book-title`,children:[`Book Your `,(0,M.jsx)(`em`,{children:`Appointment`})]}),(0,M.jsx)(`ol`,{className:`book-steps`,"aria-label":`Booking progress`,children:rs.map((e,t)=>(0,M.jsxs)(`li`,{className:t===a?`active`:t<a?`done`:``,children:[(0,M.jsx)(`span`,{className:`step-num`,children:t+1}),` `,e]},e))}),oe&&(0,M.jsx)(`p`,{className:`book-error`,role:`alert`,children:oe}),a===0&&(0,M.jsxs)(`div`,{className:`book-card`,children:[d?(0,M.jsx)(`p`,{children:`Loading…`}):Object.entries(le).map(([e,t])=>(0,M.jsxs)(`div`,{className:`svc-group`,children:[(0,M.jsx)(`h3`,{children:e}),(0,M.jsx)(`div`,{className:`svc-list`,children:t.map(e=>(0,M.jsxs)(`button`,{className:`svc-option ${p===e.type&&h===e.id?`selected`:``}`,onClick:()=>ce(e),children:[(0,M.jsx)(`span`,{className:`svc-name`,children:e.name}),(0,M.jsxs)(`span`,{className:`svc-meta`,children:[e.duration_min,` min · `,e.price_display,e.virtual?` · Virtual`:``]})]},`${e.type}:${e.id}`))})]},e)),(0,M.jsx)(`div`,{className:`book-actions`,children:(0,M.jsx)(`button`,{className:`btn-primary`,disabled:h==null,onClick:()=>o(1),children:`Continue`})})]}),a===1&&(0,M.jsxs)(`div`,{className:`book-card`,children:[(0,M.jsxs)(`div`,{className:`dt-control
11s`,children:[(0,M.jsxs)(`label`,{children:[`Date`,(0,M.jsx)(`input`,{type:`date`,min:is(),value:y,onChange:e=>b(e.target.value)})]}),(0,M.jsxs)(`label`,{children:[p===`consultation`?`Consultant`:`Therapist`,(0,M.jsxs)(`select`,{value:_,onChange:e=>v(e.target.value),children:[(0,M.jsx)(`option`,{value:``,children:`Any available`}),l.map(e=>(0,M.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]})]}),(0,M.jsx)(`div`,{className:`slots`,children:w?(0,M.jsx)(`p`,{children:`Checking availability…`}):S.length===0?(0,M.jsx)(`p`,{className:`no-slots`,children:`No times available on this date. Try another day or person.`}):S.map(e=>(0,M.jsx)(`button`,{className:`slot ${ee===e.time?`selected`:``}`,onClick:()=>te(e.time),children:e.time},e.time))}),k&&(0,M.jsxs)(`label`,{className:`mobile-toggle`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:E,onChange:e=>ne(e.target.checked)}),`Mobile service (we come to you — price is doubled)`]}),(0,M.jsxs)(`div`,{className:`book-actions`,children:[(0,M.jsx)(`button`,{className:`btn-outline-dark`,onClick:()=>o(0),children:`Back`}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:!ee,onClick:()=>o(2),children:`Continue`})]})]}),a===2&&(0,M.jsxs)(`div`,{className:`book-card`,children:[(0,M.jsxs)(`div`,{className:`detail-grid`,children:[(0,M.jsxs)(`label`,{children:[`Full name`,(0,M.jsx)(`input`,{value:D.name,required:!0,onChange:e=>re({...D,name:e.target.value})})]}),(0,M.jsxs)(`label`,{children:[`Email`,(0,M.jsx)(`input`,{type:`email`,value:D.email,required:!0,onChange:e=>re({...D,email:e.target.value})})]}),(0,M.jsxs)(`label`,{children:[`Phone`,(0,M.jsx)(`input`,{type:`tel`,value:D.phone,required:!0,onChange:e=>re({...D,phone:e.target.value})})]}),(0,M.jsxs)(`label`,{className:`full`,children:[`Notes (optional)`,(0,M.jsx)(`textarea`,{rows:3,value:D.notes,onChange:e=>re({...D,notes:e.target.value})})]}),(0,M.jsx)(`input`,{className:`hp-field`,tabIndex:-1,autoComplete:`off`,"aria-hidden":`true`,value:D.company,onChange:e=>re({...D,company:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`book-actions`,children:[(0,M.jsx)(`button`,{className:`btn-outline-dark`,onClick:()=>o(1),children:`Back`}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:!D.name||!D.email||!D.phone,onClick:()=>o(3),children:`Review`})]})]}),a===3&&O&&(0,M.jsxs)(`div`,{className:`book-card`,children:[(0,M.jsxs)(`div`,{className:`summary`,children:[(0,M.jsx)(os,{label:p===`consultation`?`Consultation`:p===`package`?`Package`:`Service`,value:O.name}),(0,M.jsx)(os,{label:`When`,value:`${y} at ${ee}`}),(0,M.jsx)(os,{label:p===`consultation`?`Consultant`:`Therapist`,value:_?l.find(e=>String(e.id)===String(_))?.name:`Any available`}),(0,M.jsx)(os,{label:`Duration`,value:`${O.duration_min} minutes`}),(0,M.jsx)(os,{label:`Location`,value:de}),(0,M.jsx)(os,{label:`Total`,value:n(ue),highlight:!0}),(0,M.jsx)(`p`,{className:`deposit-note`,children:`A deposit may be required to confirm. You'll be guided to secure payment if so.`})]}),(0,M.jsxs)(`div`,{className:`book-actions`,children:[(0,M.jsx)(`button`,{className:`btn-outline-dark`,onClick:()=>o(2),children:`Back`}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:ie,onClick:async()=>{ae(!0),se(``);try{let t=await Ci({bookableType:p,bookableId:h,date:y,time:ee,staffId:_||void 0,isMobile:k?E:!1,name:D.name,email:D.email,phone:D.phone,notes:D.notes,company:D.company,regionCode:r,currency:i});t.payment&&t.payment.authorizationUrl?window.location.href=t.payment.authorizationUrl:e(`/booking/confirm?ref=${t.reference}`)}catch(e){se(e.message),ae(!1)}},children:ie?`Booking…`:`Confirm booking`})]})]}),(0,M.jsxs)(`div`,{className:`book-wa-alt`,children:[(0,M.jsx)(`span`,{className:`book-wa-divider`,children:(0,M.jsx)(`span`,{children:`or`})}),(0,M.jsxs)(`a`,{href:zo(O?.name||t.get(`service`),t.get(`package`)),target:`_blank`,rel:`noopener noreferrer`,className:`book-wa-btn`,children:[(0,M.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`20`,height:`20`,fill:`#25D366`,children:(0,M.jsx)(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
11198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z`})}),`Book via WhatsApp instead`]})]})]})]})}function os({label:e,value:t,highlight:n}){return(0,M.jsxs)(`div`,{className:`summary-row ${n?`highlight`:``}`,children:[(0,M.jsx)(`span`,{children:e}),(0,M.jsx)(`strong`,{children:t})]})}function ss(e){return t=>{try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:e||`NGN`}).format(Number(t)/100)}catch{return(Number(t)/100).toLocaleString()}}}function cs(){let[e]=Un(),t=e.get(`ref`),[n,r]=(0,x.useState)(null),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(!0),c=ss(n?.currency_code);return(0,x.useEffect)(()=>{if(!t){a(`No booking reference provided.`),s(!1);return}Di(t).catch(()=>{}).finally(()=>{wi(t).then(r).catch(e=>a(e.message)).finally(()=>s(!1))})},[t]),(0,M.jsxs)(`main`,{className:`book-page`,children:[(0,M.jsx)(B,{title:`Booking Confirmation`,path:`/booking/confirm`}),(0,M.jsx)(`div`,{className:`book-inner`,children:(0,M.jsxs)(`div`,{className:`book-card`,style:{textAlign:`center`},children:[o&&(0,M.jsx)(`p`,{children:`Loading your booking…`}),i&&(0,M.jsx)(`p`,{className:`book-error`,role:`alert`,children:i}),n&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{style:{fontSize:`2.4rem`,color:`var(--champagne)`},children:`✦`}),(0,M.jsxs)(`h1`,{className:`book-title`,style:{marginTop:8},children:[`You're `,(0,M.jsx)(`em`,{children:`booked`})]}),(0,M.jsxs)(`p`,{style:{color:`var(--muted)`,marginBottom:20},children:[`A confirmation has been sent to `,n.customer_email,`.`]}),(0,M.jsxs)(`div`,{className:`summary`,style:{textAlign:`left`},children:[(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`Reference`}),(0,M.jsx)(`strong`,{children:n.reference})]}),(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`Service`}),(0,M.jsx)(`strong`,{children:n.service_name})]}),(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`When`}),(0,M.jsx)(`strong`,{children:n.starts_at})]}),n.staff_name&&(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`Therapist`}),(0,M.jsx)(`strong`,{children:n.staff_name})]}),(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`Status`}),(0,M.jsx)(`strong`,{children:n.status})]}),(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`Payment`}),(0,M.jsx)(`strong`,{children:n.payment_status.replace(`_`,` `)})]}),(0,M.jsxs)(`div`,{className:`summary-row highlight`,children:[(0,M.jsx)(`span`,{children:`Total`}),(0,M.jsx)(`strong`,{children:c(n.price_kobo)})]}),n.is_virtual&&n.meeting_url&&(0,M.jsxs)(`div`,{className:`summary-row`,children:[(0,M.jsx)(`span`,{children:`Meeting link`}),(0,M.jsx)(`strong`,{children:(0,M.jsx)(`a`,{href:n.meeting_url,target:`_blank`,rel:`noopener noreferrer`,children:`Join online`})})]})]}),(0,M.jsxs)(`div`,{className:`book-actions`,style:{justifyContent:`center`,marginTop:24},children:[(0,M.jsx)(j,{to:`/`,className:`btn-outline-dark`,children:`Back to home`}),(0,M.jsx)(j,{to:`/account`,className:`btn-primary`,children:`My bookings`})]})]})]})})]})}function ls(e,t){try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t||`NGN`}).format(Number(e)/100)}catch{return(Number(e)/100).toLocaleString()}}function us(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(`login`),[o,s]=(0,x.useState)({name:``,email:``,phone:``,password:``}),[c,l]=(0,x.useState)(``),[u,d]=(0,x.useState)(!1),f=()=>
11{Ni().then(t).catch(()=>{pi.clear(),t(null)}),Ei().then(r).catch(()=>r([]))};(0,x.useEffect)(()=>{pi.get()&&f()},[]);let p=async e=>{e.preventDefault(),d(!0),l(``);try{let e=i===`login`?await Mi({email:o.email,password:o.password}):await ji(o);pi.set(e.token),f()}catch(e){l(e.message)}finally{d(!1)}},m=()=>{pi.clear(),t(null),r([])},h=async e=>{if(window.confirm(`Cancel this booking?`))try{await Ti(e),f()}catch(e){alert(e.message)}};return e?(0,M.jsxs)(`main`,{className:`account-page`,children:[(0,M.jsx)(B,{title:`My Account`,path:`/account`}),(0,M.jsxs)(`div`,{className:`account-inner`,children:[(0,M.jsxs)(`div`,{className:`account-head`,children:[(0,M.jsxs)(`h1`,{className:`account-title`,children:[`Hello, `,e.name.split(` `)[0]]}),(0,M.jsx)(`button`,{className:`btn-outline-dark`,onClick:m,children:`Sign out`})]}),(0,M.jsx)(`h2`,{className:`account-sub`,children:`Your bookings`}),n.length===0?(0,M.jsx)(`p`,{className:`account-empty`,children:`No bookings yet.`}):(0,M.jsx)(`div`,{className:`booking-table`,children:n.map(e=>(0,M.jsxs)(`div`,{className:`booking-row`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:e.service_name}),(0,M.jsx)(`span`,{className:`b-when`,children:e.starts_at})]}),(0,M.jsxs)(`div`,{className:`b-meta`,children:[(0,M.jsx)(`span`,{className:`b-status status-${e.status}`,children:e.status}),(0,M.jsx)(`span`,{children:ls(e.price_kobo,e.currency_code)}),![`cancelled`,`completed`].includes(e.status)&&(0,M.jsx)(`button`,{className:`b-cancel`,onClick:()=>h(e.reference),children:`Cancel`})]})]},e.reference))})]})]}):(0,M.jsxs)(`main`,{className:`account-page`,children:[(0,M.jsx)(B,{title:`My Account`,path:`/account`}),(0,M.jsxs)(`div`,{className:`account-inner narrow`,children:[(0,M.jsx)(`h1`,{className:`account-title`,children:i===`login`?`Sign In`:`Create Account`}),c&&(0,M.jsx)(`p`,{className:`book-error`,role:`alert`,children:c}),(0,M.jsxs)(`form`,{className:`account-form`,onSubmit:p,children:[i===`register`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`input`,{placeholder:`Full name`,value:o.name,required:!0,onChange:e=>s({...o,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Phone`,value:o.phone,onChange:e=>s({...o,phone:e.target.value})})]}),(0,M.jsx)(`input`,{type:`email`,placeholder:`Email`,value:o.email,required:!0,onChange:e=>s({...o,email:e.target.value})}),(0,M.jsx)(`input`,{type:`password`,placeholder:`Password`,value:o.password,required:!0,onChange:e=>s({...o,password:e.target.value})}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:u,children:u?`Please wait…`:i===`login`?`Sign in`:`Create account`})]}),(0,M.jsxs)(`p`,{className:`account-switch`,children:[i===`login`?`No account yet?`:`Already have an account?`,` `,(0,M.jsx)(`button`,{onClick:()=>{a(i===`login`?`register`:`login`),l(``)},children:i===`login`?`Create one`:`Sign in`})]})]})]})}var ds=[{key:`dashboard`,icon:`📊`,label:`Dashboard`,perm:`dashboard.view`},{key:`cms`,icon:`🖊️`,label:`CMS`,perm:`cms.view`},{key:`services`,icon:`💆`,label:`Services`,perm:`services.view`},{key:`packages`,icon:`🎁`,label:`Packages`,perm:`services.view`},{key:`bookings`,icon:`📅`,label:`Bookings`,perm:`bookings.view`},{key:`orders`,icon:`🛒`,label:`Orders`,perm:`orders.view`},{key:`products`,icon:`🏷️`,label:`Products`,perm:`products.view`},{key:`inventory`,icon:`📦`,label:`Inventory`,perm:`inventory.view`},{key:`purchasing`,icon:`🧾`,label:`Purchasing`,perm:`purchasing.view`},{key:`discounts`,icon:`🎟️`,label:`Discounts`,perm:`discounts.view`},{key:`reports`,icon:`📈`,label:`Reports`,perm:`reports.view`},{key:`finance`,icon:`💰`,label:`Finance`,perm:`finance.view`},{divider:!0},{key:`customers`,icon:`👤`,label:`Customers`,perm:`users.view`},{key:`suppliers`,icon:`🏭`,label:`Suppliers`,perm:`purchasing.view`},{key:`enquiries`,icon:`💬`,label:`Enquiries`,perm:`enquiries.view`},{key:`reviews`,icon:`⭐`,label:`Reviews`,perm:`reviews.view`},{divider:!0},{key:`users`,icon:`👥`,label:`Staff`,perm:`users.view`},{key:`roles`,icon:`🔐`,label:`Roles`,perm:`roles.view`},{key:`resources`,icon:`🚪`,label:`Resources`,perm:`resources.view`},{key:`providers`,icon:`⚙️`,label:`Providers`,perm:`settings.view`}];function fs({view:e,onNavigate:t,permissions:n,userName:r,userRole:i,onSignOut:
11a,children:o}){let[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(window.innerWidth<=900);(0,x.useEffect)(()=>{let e=()=>{let e=window.innerWidth<=900;f(e),e||u(!1)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let p=e=>n.length===0||n.includes(e),m=e=>{t(e),d&&u(!1)},h=ds.filter(e=>e.divider||p(e.perm));return(0,M.jsxs)(`div`,{className:`admin-shell${s?` collapsed`:``}`,children:[d&&l&&(0,M.jsx)(`div`,{className:`admin-sidebar-backdrop`,onClick:()=>u(!1)}),(0,M.jsxs)(`aside`,{className:`admin-sidebar${d?l?` mobile-open`:` mobile-closed`:``}`,children:[(0,M.jsxs)(`div`,{className:`sidebar-brand`,children:[!s&&(0,M.jsx)(`span`,{className:`sidebar-brand-text`,children:`OptimalBeauty`}),!s&&(0,M.jsx)(`span`,{className:`sidebar-brand-sub`,children:`Admin`}),s&&(0,M.jsx)(`span`,{className:`sidebar-brand-icon`,children:`✦`})]}),(0,M.jsx)(`nav`,{className:`sidebar-nav`,children:h.map((t,n)=>t.divider?(0,M.jsx)(`div`,{className:`sidebar-divider`},`div-${n}`):(0,M.jsxs)(`button`,{className:`sidebar-link${e===t.key?` active`:``}`,onClick:()=>m(t.key),title:s?t.label:void 0,children:[(0,M.jsx)(`span`,{className:`sidebar-link-icon`,children:t.icon}),!s&&(0,M.jsx)(`span`,{className:`sidebar-link-label`,children:t.label}),!s&&e===t.key&&(0,M.jsx)(`span`,{className:`sidebar-active-dot`})]},t.key))}),(0,M.jsxs)(`div`,{className:`sidebar-footer`,children:[!s&&(0,M.jsxs)(`div`,{className:`sidebar-user`,children:[(0,M.jsx)(`div`,{className:`sidebar-avatar`,children:r?.[0]?.toUpperCase()||`A`}),(0,M.jsxs)(`div`,{className:`sidebar-user-info`,children:[(0,M.jsx)(`span`,{className:`sidebar-user-name`,children:r||`Admin`}),(0,M.jsx)(`span`,{className:`sidebar-user-role`,children:i?.replace(/_/g,` `)||`Staff`})]})]}),!d&&(0,M.jsx)(`button`,{className:`sidebar-collapse-btn`,onClick:()=>c(e=>!e),title:s?`Expand sidebar`:`Collapse sidebar`,children:s?`»`:`«`})]})]}),(0,M.jsxs)(`div`,{className:`admin-main`,children:[(0,M.jsxs)(`header`,{className:`admin-header`,children:[(0,M.jsxs)(`div`,{className:`admin-header-left`,children:[d&&(0,M.jsx)(`button`,{className:`btn-icon admin-hamburger`,onClick:()=>u(!0),children:`☰`}),(0,M.jsx)(`h1`,{className:`admin-header-title`,children:ds.find(t=>t.key===e)?.label||`Dashboard`})]}),(0,M.jsx)(`div`,{className:`admin-header-right`,children:(0,M.jsx)(`button`,{className:`btn-outline admin-signout`,onClick:a,children:`Sign out`})})]}),(0,M.jsx)(`div`,{className:`admin-content`,children:o})]})]})}var ps={bookings_today:`📅`,bookings_pending:`⏳`,orders_pending:`🛒`,low_stock:`📦`,enquiries:`💬`,reviews:`⭐`};function ms(e,t=800){let[n,r]=(0,x.useState)(0),i=(0,x.useRef)(null);return(0,x.useEffect)(()=>{if(e==null)return;let n=Number(e)||0;if(n===0){r(0);return}let a=performance.now(),o=e=>{let s=Math.min((e-a)/t,1),c=1-(1-s)**3;r(Math.round(c*n)),s<1&&(i.current=requestAnimationFrame(o))};return i.current=requestAnimationFrame(o),()=>{i.current&&cancelAnimationFrame(i.current)}},[e,t]),n}function hs({icon:e,label:t,value:n,delay:r=0}){let i=ms(n);return(0,M.jsxs)(`div`,{className:`kpi-card`,style:{animationDelay:`${r}ms`},children:[(0,M.jsx)(`div`,{className:`kpi-icon`,children:e}),(0,M.jsxs)(`div`,{className:`kpi-body`,children:[(0,M.jsx)(`span`,{className:`kpi-value`,children:i}),(0,M.jsx)(`span`,{className:`kpi-label`,children:t})]})]})}function gs(e){if(!e)return``;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function _s({summary:e,bookings:t,enquiries:n,onNavigate:r}){let i=(t||[]).slice(0,6),a=(n||[]).slice(0,5),o=(t||[]).reduce((e,t)=>(e[t.status]=(e[t.status]||0)+1,e),{}),s=t?.length||1,c=[{key:`confirmed`,label:`Confirmed`,color:`var(--status-confirmed)`},{key:`pending`,label:`Pending`,color:`var(--status-pending)`},{key:`completed`,label:`Completed`,color:`var(--status-completed)`},{key:`cancelled`,label:`Cancelled`,color:`var(--status-cancelled)`},{key:`no_show`,label:`No-show`,color:`var(--status-no_show)`}].filter(e=>o[e.key]>0);return(0,M.jsxs)(`div`,{className:`admin-dashboard`,children:[(0,M.jsxs)(`div`,{className:`kpi-row`,children:[(0,M.jsx)(hs,{icon:ps.bookings_today,label:`Today's Bookings`,value:e?.bookings?.today,delay:0}),(0,M.jsx)(hs,{icon:ps.bookings_pending,label:`Pending Bookings`,value:e?.bookings?.pending,delay:60}),(0,M.jsx)(hs,{icon:ps.orders_pending,label:`Pending Orders`,value:e?.orders?.pending,delay:120}),(0,M.jsx)(hs,{icon:ps.low_stock,label:`Low Stock Items`,value:e?.lowStock?.count,delay:180}),(0,M.jsx)(hs,{icon:ps.enquiries,label:`New Enquiries`,value:e?.enquiries?.new_count,delay:240}),(0,M.jsx)(hs,{icon:ps.reviews,label:`Reviews to Moderate`,value:e?.reviews?.pending,delay:300})]}),(0,M.jsxs)(`div`,{className:`dash-grid`,children:[(0,M.jsxs)(`div`,{className:`dash-card dash-chart-card`,children:[(0,M.jsx)(`h3`,{className:`dash-card-title`,children:`Booking Status Breakdown`}),(0,M.jsxs)(`div`,{className:`dash-chart`,children:[c.map(e=>(0,M.jsxs)(`div`,{className:`dash-bar-row`,children:[(0,M.jsx)(`span`,{className:`dash-bar-label`,children:e.label}),(0,M.jsx)(`div`,{className:`dash-bar-track`,children:(0,M.jsx)(`div`,{className:`dash-bar-fill`,style:{width:`${Math.max(3,o[e.key]/s*100)}%`,background:e.color}})}),(0,M.jsx)(`span`,{className:`dash-bar-count`,children:o[e.key]||0})]},e.key)),c.length===0&&(0,M.jsx)(`p`,{className:`admin-empty`,style:{padding:`20px 0`},children:`No booking data yet.`})]})]}),(0,M.jsxs)(`div`,{className:`dash-card dash-actions-card`,children:[(0,M.jsx)(`h3`,{className:`dash-card-title`,children:`Quick Actions`}),(0,M.jsxs)(`div`,{className:`dash-quick-actions`,children:[(0,M.jsxs)(`button`,{className:`dash-action-btn`,onClick:()=>r?.(`bookings`),children:[(0,M.jsx)(`span`,{className:`dash-action-icon`,children:`📋`}),(0,M.jsx)(`span`,{children:`Manage Bookings`})]}),(0,M.jsxs)(`button`,{className:`dash-action-btn`,onClick:()=>r?.(`orders`),children:[(0,M.jsx)(`span`,{className:`dash-action-icon`,children:`🛍️`}),(0,M.jsx)(`span`,{children:`View Orders`})]}),(0,M.jsxs)(`button`,{className:`dash-action-btn`,onClick:()=>r?.(`inventory`),children:[(0,M.jsx)(`span`,{className:`dash-action-icon`,children:`📦`}),(0,M.jsx)(`span`,{children:`Check Inventory`})]}),(0,M.jsxs)(`button`,{className:`dash-action-btn`,onClick:()=>r?.(`reviews`),children:[(0,M.jsx)(`span`,{className:`dash-action-icon`,children:`⭐`}),(0,M.jsx)(`span`,{children:`Moderate Reviews`})]}),(0,M.jsxs)(`button`,{className:`dash-action-btn`,onClick:()=>r?.(`reports`),children:[(0,M.jsx)(`span`,{className:`dash-action-icon`,children:`📊`}),(0,M.jsx)(`span`,{children:`View Reports`})]}),(0,M.jsxs)(`button`,{className:`dash-action-btn`,onClick:()=>r?.(`users`),children:[(0,M.jsx)(`span`,{className:`dash-action-icon`,children:`👥`}),(0,M.jsx)(`span`,{children:`Manage Staff`})]})]})]}),(0,M.jsxs)(`div`,{className:`dash-card`,children:[(0,M.jsxs)(`div`,{className:`dash-card-header`,children:[(0,M.jsx)(`h3`,{className:`dash-card-title`,children:`Recent Bookings`}),(0,M.jsx)(`button`,{className:`btn-outline dash-see-all`,onClick:()=>r?.(`bookings`),children:`View all →`})]}),(0,M.jsxs)(`div`,{className:`dash-feed`,children:[i.map(e=>(0,M.jsxs)(`div`,{className:`dash-feed-item`,children:[(0,M.jsx)(`div`,{className:`dash-feed-dot`,"data-status":e.status}),(0,M.jsxs)(`div`,{className:`dash-feed-content`,children:[(0,M.jsx)(`span`,{className:`dash-feed-title`,children:e.service_name}),(0,M.jsxs)(`span`,{className:`dash-feed-meta`,children:[e.customer_name,` · `,e.status?.replace(/_/g,` `)]})]}),(0,M.jsx)(`span`,{className:`dash-feed-time`,children:gs(e.starts_at||e.created_at)})]},e.id)),i.length===0&&(0,M.jsx)(`p`,{className:`admin-empty`,children:`No bookings yet.`})]})]}),(0,M.jsxs)(`div`,{className:`dash-card`,children:[(0,M.jsxs)(`div`,{className:`dash-card-header`,children:[(0,M.jsx)(`h3`,{className:`dash-card-title`,children:`Recent Enquiries`}),(0,M.jsx)(`button`,{className:`btn-outline dash-see-all`,onClick:()=>r?.(`enquiries`),children:`View all →`})]}),(0,M.jsxs)(`div`,{className:`dash-feed`,children:[a.map(e=>(0,M.jsxs)(`div`,{className:`dash-feed-item`,children:[(0,M.jsx)(`div`,{className:`dash-feed-dot`,"data-status":e.status}),(0,M.jsxs)(`div`,{className:`dash-feed-content`,children:[(0,M.jsx)(`span`,{className:`dash-feed-title`,children:e.name}),(0,M.jsxs)(`span`,{className:`dash-feed-meta`,children:[e.service||`General`,` · `,e.status?.replace(/_/g,` `)]})]}),(0,M.jsx)(`span`,{className:`dash-feed-time`,children:gs(e.created_at)})]},e.id)),a.length===0&&(0,M.jsx)(`p`,{className:`admin-empty`,children:`No enquiries yet.`})]})]})]})]})}function V({columns:e=[],data:t=[],pageSize:n=15,searchable:r=!0,exportable:i=!0,exportName:a=`export`,actions:o,emptyMsg:s=`No data found.`,loading:c=!1,onRowClick:l,stickyHeader:u=!0}){let[d,f]=(0,x.useState)(``),[p,m]=(0,x.useState)(null),[h,g]=(0,x.useState)(`asc`),[_,v]=(0,x.useState)(0),[y,b]=(0,x.useState)(n),S=(0,x.useMemo)(()=>
11{if(!d.trim())return t;let n=d.toLowerCase();return t.filter(t=>e.some(e=>{let r=t[e.key];return r==null?!1:String(r).toLowerCase().includes(n)}))},[t,d,e]),C=(0,x.useMemo)(()=>p?[...S].sort((e,t)=>{let n=e[p]??``,r=t[p]??``;if(typeof n==`number`&&typeof r==`number`)return h===`asc`?n-r:r-n;let i=String(n).localeCompare(String(r),void 0,{numeric:!0,sensitivity:`base`});return h===`asc`?i:-i}):S,[S,p,h]),w=Math.max(1,Math.ceil(C.length/y)),T=Math.min(_,w-1),ee=C.slice(T*y,(T+1)*y),te=C.length===0?0:T*y+1,E=Math.min((T+1)*y,C.length),ne=(0,x.useCallback)(e=>{f(e.target.value),v(0)},[]),D=e=>{p===e?g(e=>e===`asc`?`desc`:`asc`):(m(e),g(`asc`))};return c?(0,M.jsxs)(`div`,{className:`dt-wrapper`,children:[(0,M.jsx)(`div`,{className:`dt-toolbar`,children:(0,M.jsx)(`div`,{className:`skeleton`,style:{width:220,height:38}})}),(0,M.jsx)(`div`,{className:`dt-skeleton-rows`,children:Array.from({length:6}).map((e,t)=>(0,M.jsx)(`div`,{className:`skeleton dt-skeleton-row`},t))})]}):(0,M.jsxs)(`div`,{className:`dt-wrapper`,children:[(0,M.jsxs)(`div`,{className:`dt-toolbar`,children:[r&&(0,M.jsxs)(`div`,{className:`dt-search`,children:[(0,M.jsx)(`span`,{className:`dt-search-icon`,children:`🔍`}),(0,M.jsx)(`input`,{type:`text`,placeholder:`Search…`,value:d,onChange:ne,className:`dt-search-input`}),d&&(0,M.jsx)(`button`,{className:`dt-search-clear`,onClick:()=>{f(``),v(0)},children:`✕`})]}),(0,M.jsxs)(`div`,{className:`dt-toolbar-right`,children:[(0,M.jsxs)(`span`,{className:`dt-count`,children:[C.length,` record`,C.length===1?``:`s`]}),i&&C.length>0&&(0,M.jsx)(`button`,{className:`btn-outline dt-export-btn`,onClick:()=>{let t=[e.map(e=>e.label).join(`,`),...C.map(t=>e.map(e=>{let n=t[e.key]??``;return n=String(n).replace(/"/g,`""`),`"${n}"`}).join(`,`))].join(`
12`),n=new Blob([t],{type:`text/csv;charset=utf-8;`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`${a}_${new Date().toISOString().slice(0,10)}.csv`,i.click(),URL.revokeObjectURL(r)},children:`↓ Export CSV`})]})]}),(0,M.jsx)(`div`,{className:`dt-scroll`,children:(0,M.jsxs)(`table`,{className:`dt-table${u?` dt-sticky`:``}`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[e.map(e=>(0,M.jsx)(`th`,{style:e.width?{width:e.width}:void 0,className:e.sortable===!1?``:`dt-sortable`,onClick:()=>e.sortable!==!1&&D(e.key),children:(0,M.jsxs)(`span`,{className:`dt-th-content`,children:[e.label,e.sortable!==!1&&p===e.key&&(0,M.jsx)(`span`,{className:`dt-sort-arrow`,children:h===`asc`?`↑`:`↓`})]})},e.key)),o&&(0,M.jsx)(`th`,{className:`dt-actions-col`,children:`Actions`})]})}),(0,M.jsxs)(`tbody`,{children:[ee.map((t,n)=>(0,M.jsxs)(`tr`,{className:l?`dt-clickable`:``,onClick:()=>l?.(t),children:[e.map(e=>(0,M.jsx)(`td`,{children:e.render?e.render(t[e.key],t):t[e.key]??`—`},e.key)),o&&(0,M.jsx)(`td`,{className:`dt-actions-cell`,children:o(t)})]},t.id??n)),ee.length===0&&(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{colSpan:e.length+ +!!o,className:`dt-empty`,children:s})})]})]})}),C.length>y&&(0,M.jsxs)(`div`,{className:`dt-pagination`,children:[(0,M.jsxs)(`div`,{className:`dt-page-info`,children:[`Showing `,te,`–`,E,` of `,C.length]}),(0,M.jsxs)(`div`,{className:`dt-page-controls`,children:[(0,M.jsx)(`select`,{className:`dt-page-size`,value:y,onChange:e=>{b(Number(e.target.value)),v(0)},children:[10,15,25,50].map(e=>(0,M.jsxs)(`option`,{value:e,children:[e,` / page`]},e))}),(0,M.jsx)(`button`,{className:`dt-page-btn`,disabled:T===0,onClick:()=>v(0),children:`«`}),(0,M.jsx)(`button`,{className:`dt-page-btn`,disabled:T===0,onClick:()=>v(e=>Math.max(0,e-1)),children:`‹`}),(0,M.jsxs)(`span`,{className:`dt-page-num`,children:[T+1,` / `,w]}),(0,M.jsx)(`button`,{className:`dt-page-btn`,disabled:T>=w-1,onClick:()=>v(e=>Math.min(w-1,e+1)),children:`›`}),(0,M.jsx)(`button`,{className:`dt-page-btn`,disabled:T>=w-1,onClick:()=>v(w-1),children:`»`})]})]})]})}function H({status:e,label:t}){let n=t||e?.replace(/_/g,` `)||`—`;return(0,M.jsxs)(`span`,{className:`status-badge`,"data-status":e,style:{"--badge-color":`var(--status-${e}, rgba(255,255,255,0.5))`,"--badge-bg":`var(--status-${e}-bg, rgba(255,255,255,0.06))`},children:[(0,M.jsx)(`span`,{className:`status-badge-dot`}),n]})}function U({open:e,onClose:t,title:n,width:r=`520px`,children:i}){let a=(0,x.useRef)(null);return(0,x.useEffect)(()=>
12{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e,t]),(0,x.useEffect)(()=>(e?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[e]),e?(0,M.jsx)(`div`,{className:`admin-modal-backdrop`,onClick:t,children:(0,M.jsxs)(`div`,{className:`admin-modal-panel`,ref:a,style:{maxWidth:r},onClick:e=>e.stopPropagation(),children:[(0,M.jsxs)(`div`,{className:`admin-modal-header`,children:[(0,M.jsx)(`h3`,{children:n}),(0,M.jsx)(`button`,{className:`admin-modal-close`,onClick:t,"aria-label":`Close`,children:`✕`})]}),(0,M.jsx)(`div`,{className:`admin-modal-body`,children:i})]})}):null}var vs=[{key:`settings`,label:`Site Settings`},{key:`content`,label:`Content Blocks`},{key:`announcements`,label:`Announcements`},{key:`media`,label:`Media Gallery`},{key:`pages`,label:`Pages`},{key:`seo`,label:`SEO`}];function ys(){let[e,t]=(0,x.useState)(`settings`);return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{style:{display:`flex`,gap:`4px`,marginBottom:`20px`,flexWrap:`wrap`},children:vs.map(n=>(0,M.jsx)(`button`,{className:e===n.key?`btn-primary`:`btn-outline`,style:{fontSize:`0.82rem`,padding:`6px 14px`},onClick:()=>t(n.key),children:n.label},n.key))}),e===`settings`&&(0,M.jsx)(xs,{}),e===`content`&&(0,M.jsx)(Cs,{}),e===`announcements`&&(0,M.jsx)(Ts,{}),e===`media`&&(0,M.jsx)(Ds,{}),e===`pages`&&(0,M.jsx)(ks,{}),e===`seo`&&(0,M.jsx)(js,{})]})}var bs=[{label:`Branding`,fields:[{key:`site.name`,label:`Site Name`},{key:`site.logo`,label:`Logo URL (leave blank to show the site name as text)`},{key:`site.tagline`,label:`Tagline`},{key:`site.description`,label:`Meta Description`,multiline:!0},{key:`site.url`,label:`Site URL`},{key:`site.og_image`,label:`OG Image Path`}]},{label:`Contact Info`,fields:[{key:`contact.phone`,label:`Phone Number`},{key:`contact.phone_intl`,label:`Phone (International)`},{key:`contact.whatsapp`,label:`WhatsApp Link`},{key:`contact.email`,label:`Email Address`},{key:`contact.address`,label:`Address`}]},{label:`Social Media`,fields:[{key:`social.instagram`,label:`Instagram URL`},{key:`social.facebook`,label:`Facebook URL`},{key:`social.twitter`,label:`Twitter / X URL`},{key:`social.tiktok`,label:`TikTok URL`}]},{label:`Business Hours`,fields:[{key:`hours.weekday`,label:`Weekday Hours`},{key:`hours.weekend`,label:`Weekend Hours`}]},{label:`Mobile Services`,fields:[{key:`mobile_services.note`,label:`Mobile Service Note`},{key:`mobile_services.rate`,label:`Rate Info`}]}];function xs(){let[e,t]=(0,x.useState)({}),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(``);(0,x.useEffect)(()=>{Oa().then(t).catch(()=>{})},[]);let o=(e,n)=>t(t=>({...t,[e]:n}));return(0,M.jsxs)(`div`,{style:{maxWidth:`720px`},children:[bs.map(t=>(0,M.jsxs)(`div`,{style:{marginBottom:`24px`},children:[(0,M.jsx)(`h3`,{style:{fontSize:`0.95rem`,color:`var(--admin-text-secondary)`,marginBottom:`12px`,borderBottom:`1px solid var(--admin-border)`,paddingBottom:`6px`},children:t.label}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`10px`},children:t.fields.map(t=>(0,M.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`,fontSize:`0.85rem`},children:[(0,M.jsx)(`span`,{style:{color:`var(--admin-text-secondary)`},children:t.label}),t.multiline?(0,M.jsx)(`textarea`,{rows:3,value:e[t.key]||``,onChange:e=>o(t.key,e.target.value),style:{resize:`vertical`}}):(0,M.jsx)(`input`,{value:e[t.key]||``,onChange:e=>o(t.key,e.target.value)})]},t.key))})]},t.label)),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,M.jsx)(`button`,{className:`btn-primary`,onClick:async()=>{r(!0),a(``);try{await ka(e),a(`Settings saved!`),setTimeout(()=>a(``),3e3)}catch(e){a(e.message)}finally{r(!1)}},disabled:n,children:n?`Saving…`:`Save All Settings`}),i&&(0,M.jsx)(`span`,{style:{fontSize:`0.85rem`,color:i.includes(`saved`)?`var(--admin-success)`:`var(--admin-danger)`},children:i})]})]})}var Ss=[`hero`,`about`,`services`,`pricing`,`packages`,`laser`,`reviews`,`gallery`,`products`,`contact`,`location`,`footer`];function Cs(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(``),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)({section:``,slot:``,value:``,sort_order:0}),[u,d]=(0,x.useState)(``),f=()=>
12Aa().then(t).catch(()=>{});(0,x.useEffect)(()=>{f()},[]);let p=n?e.filter(e=>e.section===n):e,m=()=>{s(null),l({section:``,slot:``,value:``,sort_order:0}),d(``),a(!0)},h=e=>{s(e),l({section:e.section,slot:e.slot,value:e.value||``,sort_order:e.sort_order}),d(``),a(!0)},g=async e=>{e.preventDefault(),d(``);try{await ja(c),a(!1),f()}catch(e){d(e.message)}},_=async e=>{window.confirm(`Delete block "${e.section}.${e.slot}"?`)&&(await Ma(e.id),f())};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,alignItems:`center`},children:[(0,M.jsx)(`h2`,{children:`Content Blocks`}),(0,M.jsxs)(`select`,{value:n,onChange:e=>r(e.target.value),style:{fontSize:`0.82rem`,padding:`4px 8px`},children:[(0,M.jsx)(`option`,{value:``,children:`All sections`}),Ss.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))]})]}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:m,children:`+ New Block`})]}),(0,M.jsx)(V,{columns:[{key:`section`,label:`Section`,render:e=>(0,M.jsx)(H,{status:`active`,label:e})},{key:`slot`,label:`Slot`},{key:`value`,label:`Value`,render:e=>e?e.length>80?e.slice(0,80)+`…`:e:`—`},{key:`active`,label:`Active`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Yes`:`No`})}],data:p,emptyMsg:`No content blocks.`,onRowClick:h,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),h(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),_(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:o?`Edit Content Block`:`New Content Block`,width:`560px`,children:(0,M.jsxs)(`form`,{onSubmit:g,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[u&&(0,M.jsx)(`p`,{className:`book-error`,children:u}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`select`,{value:c.section,onChange:e=>l({...c,section:e.target.value}),required:!0,children:[(0,M.jsx)(`option`,{value:``,children:`Select section…`}),Ss.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))]}),(0,M.jsx)(`input`,{placeholder:`Slot key (e.g. headline)`,value:c.slot,required:!0,onChange:e=>l({...c,slot:e.target.value})})]}),(0,M.jsx)(`textarea`,{rows:4,placeholder:`Value (supports HTML)`,value:c.value,onChange:e=>l({...c,value:e.target.value}),style:{resize:`vertical`}}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Sort order`,value:c.sort_order,onChange:e=>l({...c,sort_order:Number(e.target.value)}),style:{width:`120px`}}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:o?`Save`:`Create`})]})]})})]})}var ws={title:``,body:``,type:`banner`,style:`promo`,cta_text:``,cta_url:``,starts_at:``,ends_at:``,active:!0};function Ts(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(ws),[c,l]=(0,x.useState)(``),u=()=>La().then(t).catch(()=>{});(0,x.useEffect)(()=>{u()},[]);let d=()=>{a(null),s(ws),l(``),r(!0)},f=e=>{a(e),s({title:e.title,body:e.body||``,type:e.type,style:e.style,cta_text:e.cta_text||``,cta_url:e.cta_url||``,starts_at:e.starts_at?e.starts_at.slice(0,16):``,ends_at:e.ends_at?e.ends_at.slice(0,16):``,active:!!e.active}),l(``),r(!0)},p=async e=>{e.preventDefault(),l(``);let t={...o,starts_at:o.starts_at||null,ends_at:o.ends_at||null};try{i?await za(i.id,t):await Ra(t),r(!1),u()}catch(e){l(e.message)}},m=async e=>{window.confirm(`Delete "${e.title}"?`)&&(await Ba(e.id),u())},h=async e=>{await za(e.id,{active:!e.active}),u()};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Announcements & Banners`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:d,children:`+ New Announcement`})]}),(0,M.jsx)(V,{columns:[{key:`title`,label:`Title`},{key:`type`,label:`Type`,render:e=>(0,M.jsx)(H,{status:`active`,label:e})},{key:`style`,label:`Style`,render:e=>(0,M.jsx)(H,{status:e===`warning`?`cancelled`:`active`,label:e})},{key:`starts_at`,label:`Starts`,render:e=>e?new Date(e).toLocaleDateString(`en-GB`):`Now`},{key:`ends_at`,label:`Ends`,render:e=>e?new Date(e).toLocaleDateString(`en-GB`):`Never`},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Hidden`})}],data:e,emptyMsg:`No announcements.`,onRowClick:f,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),f(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),h(e)},children:e.active?`Hide`:`Show`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),m(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:n,onClose:()=>r(!1),title:i?`Edit Announcement`:`New Announcement`,width:`600px`,children:(0,M.jsxs)(`form`,{onSubmit:p,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[c&&(0,M.jsx)(`p`,{className:`book-error`,children:c}),(0,M.jsx)(`input`,{placeholder:`Title`,value:o.title,required:!0,onChange:e=>s({...o,title:e.target.value})}),(0,M.jsx)(`textarea`,{rows:3,placeholder:`Body text (optional)`,value:o.body,onChange:e=>s({...o,body:e.target.value}),style:{resize:`vertical`}}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`select`,{value:o.type,onCh
12ange:e=>s({...o,type:e.target.value}),children:[(0,M.jsx)(`option`,{value:`banner`,children:`Banner`}),(0,M.jsx)(`option`,{value:`popup`,children:`Popup`}),(0,M.jsx)(`option`,{value:`notification`,children:`Notification`})]}),(0,M.jsxs)(`select`,{value:o.style,onChange:e=>s({...o,style:e.target.value}),children:[(0,M.jsx)(`option`,{value:`promo`,children:`Promo`}),(0,M.jsx)(`option`,{value:`info`,children:`Info`}),(0,M.jsx)(`option`,{value:`warning`,children:`Warning`}),(0,M.jsx)(`option`,{value:`success`,children:`Success`})]})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`CTA Button Text`,value:o.cta_text,onChange:e=>s({...o,cta_text:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`CTA URL`,value:o.cta_url,onChange:e=>s({...o,cta_url:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`label`,{style:{fontSize:`0.82rem`,color:`var(--admin-text-secondary)`},children:[`Starts at`,(0,M.jsx)(`input`,{type:`datetime-local`,value:o.starts_at,onChange:e=>s({...o,starts_at:e.target.value})})]}),(0,M.jsxs)(`label`,{style:{fontSize:`0.82rem`,color:`var(--admin-text-secondary)`},children:[`Ends at`,(0,M.jsx)(`input`,{type:`datetime-local`,value:o.ends_at,onChange:e=>s({...o,ends_at:e.target.value})})]})]}),(0,M.jsxs)(`label`,{style:{fontSize:`0.85rem`,display:`flex`,alignItems:`center`,gap:`6px`,color:`var(--admin-text-secondary)`},children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:o.active,onChange:e=>s({...o,active:e.target.checked})}),`Active`]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>r(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:i?`Save`:`Create`})]})]})})]})}var Es={filename:``,url:``,alt_text:``,category:``,sort_order:0};function Ds(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(Es),[c,l]=(0,x.useState)(``),u=()=>Na().then(t).catch(()=>{});(0,x.useEffect)(()=>{u()},[]);let d=()=>{a(null),s(Es),l(``),r(!0)},f=e=>{a(e),s({filename:e.filename,url:e.url,alt_text:e.alt_text||``,category:e.category||``,sort_order:e.sort_order}),l(``),r(!0)},p=async e=>{e.preventDefault(),l(``);try{i?await Fa(i.id,o):await Pa(o),r(!1),u()}catch(e){l(e.message)}},m=async e=>{window.confirm(`Delete "${e.filename}"?`)&&(await Ia(e.id),u())};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Media Gallery`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:d,children:`+ Add Media`})]}),(0,M.jsx)(V,{columns:[{key:`url`,label:`Preview`,sortable:!1,render:e=>e?(0,M.jsx)(`img`,{src:e,alt:``,style:{width:`48px`,height:`48px`,objectFit:`cover`,borderRadius:`6px`}}):`—`},{key:`filename`,label:`Filename`},{key:`alt_text`,label:`Alt Text`,render:e=>e||`—`},{key:`category`,label:`Category`,render:e=>e?(0,M.jsx)(H,{status:`active`,label:e}):`—`}],data:e,emptyMsg:`No media items.`,onRowClick:f,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),f(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),m(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:n,onClose:()=>r(!1),title:i?`Edit Media`:`Add Media`,width:`500px`,children:(0,M.jsxs)(`form`,{onSubmit:p,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[c&&(0,M.jsx)(`p`,{className:`book-error`,children:c}),(0,M.jsx)(`input`,{placeholder:`Filename`,value:o.filename,required:!0,onChange:e=>s({...o,filename:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`URL`,value:o.url,required:!0,onChange:e=>s({...o,url:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Alt text`,value:o.alt_text,onChange:e=>s({...o,alt_text:e.target.value})}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Category (e.g. gallery, hero)`,value:o.category,onChange:e=>s({...o,category:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Sort order`,value:o.sort_order,onChange:e=>s({...o,sort_order:Number(e.target.value)})})]}),o.url&&(0,M.jsx)(`img`,{src:o.url,alt:`Preview`,style:{maxHeight:`120px`,objectFit:`contain`,borderRadius:`8px`}}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>r(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:i?`Save`:`Add`})]})]})})]})}var Os={slug:``,title:``,content:``,excerpt:``,featured_image:``,status:`draft`};function ks(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(Os),[c,l]=(0,x.useState)(``),u=()=>
12Va().then(t).catch(()=>{});(0,x.useEffect)(()=>{u()},[]);let d=()=>{a(null),s(Os),l(``),r(!0)},f=e=>{a(e),s({slug:e.slug,title:e.title,content:e.content||``,excerpt:e.excerpt||``,featured_image:e.featured_image||``,status:e.status}),l(``),r(!0)},p=async e=>{e.preventDefault(),l(``);try{if(i){let{slug:e,...t}=o;await Ua(i.id,t)}else await Ha(o);r(!1),u()}catch(e){l(e.message)}},m=async e=>{window.confirm(`Delete page "${e.title}"?`)&&(await Wa(e.id),u())};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Pages`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:d,children:`+ New Page`})]}),(0,M.jsx)(V,{columns:[{key:`title`,label:`Title`},{key:`slug`,label:`Slug`,render:e=>(0,M.jsxs)(`code`,{style:{fontSize:`0.8rem`},children:[`/`,e]})},{key:`status`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e===`published`?`active`:e===`archived`?`inactive`:`pending`,label:e})},{key:`updated_at`,label:`Updated`,render:e=>e?new Date(e).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`}):`—`}],data:e,emptyMsg:`No pages.`,onRowClick:f,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),f(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),m(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:n,onClose:()=>r(!1),title:i?`Edit Page`:`New Page`,width:`720px`,children:(0,M.jsxs)(`form`,{onSubmit:p,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[c&&(0,M.jsx)(`p`,{className:`book-error`,children:c}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Page Title`,value:o.title,required:!0,onChange:e=>s({...o,title:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Slug (e.g. about-us)`,value:o.slug,required:!0,disabled:!!i,onChange:e=>s({...o,slug:e.target.value})})]}),(0,M.jsx)(`input`,{placeholder:`Excerpt (optional)`,value:o.excerpt,onChange:e=>s({...o,excerpt:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Featured Image URL`,value:o.featured_image,onChange:e=>s({...o,featured_image:e.target.value})}),(0,M.jsx)(`textarea`,{rows:12,placeholder:`Page content (HTML supported)`,value:o.content,onChange:e=>s({...o,content:e.target.value}),style:{resize:`vertical`,fontFamily:`monospace`,fontSize:`0.82rem`}}),(0,M.jsxs)(`select`,{value:o.status,onChange:e=>s({...o,status:e.target.value}),children:[(0,M.jsx)(`option`,{value:`draft`,children:`Draft`}),(0,M.jsx)(`option`,{value:`published`,children:`Published`}),(0,M.jsx)(`option`,{value:`archived`,children:`Archived`})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>r(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:i?`Save`:`Create`})]})]})})]})}var As={page_path:``,meta_title:``,meta_desc:``,og_title:``,og_description:``,og_image:``,canonical_url:``,no_index:!1};function js(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(As),[c,l]=(0,x.useState)(``),u=()=>Ga().then(t).catch(()=>{});(0,x.useEffect)(()=>{u()},[]);let d=()=>{a(null),s(As),l(``),r(!0)},f=e=>{a(e),s({page_path:e.page_path,meta_title:e.meta_title||``,meta_desc:e.meta_desc||``,og_title:e.og_title||``,og_description:e.og_description||``,og_image:e.og_image||``,canonical_url:e.canonical_url||``,no_index:!!e.no_index}),l(``),r(!0)},p=async e=>{e.preventDefault(),l(``);try{await Ka(o),r(!1),u()}catch(e){l(e.message)}},m=async e=>{window.confirm(`Delete SEO for "${e.page_path}"?`)&&(await qa(e.id),u())};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`SEO Settings`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:d,children:`+ Add Page SEO`})]}),(0,M.jsx)(V,{columns:[{key:`page_path`,label:`Page Path`,render:e=>(0,M.jsx)(`code`,{style:{fontSize:`0.8rem`},children:e})},{key:`meta_title`,label:`Meta Title`,render:e=>e?e.length>50?e.slice(0,50)+`…`:e:`—`},{key:`meta_desc`,label:`Description`,render:e=>e?e.length>60?e.slice(0,60)+`…`:e:`—`},{key:`no_index`,label:`Index`,render:e=>(0,M.jsx)(H,{status:e?`cancelled`:`active`,label:e?`No Index`:`Indexed`})}],data:e,emptyMsg:`No SEO entries.`,onRowClick:f,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),f(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),m(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:n,onClose:()=>r(!1),title:i?`Edit SEO`:`New Page SEO`,width:`600px`,children:(0,M.jsxs)(`form`,{onSubmit:p,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[c&&(0,M.jsx)(`p`,{className:`book-error`,children:c}),(0,M.jsx)(`input`,{placeholder:`Page path (e.g. / or /shop)`,value:o.page_path,required:!0,onChange:e=>s({...o,page_path:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Meta Title`,value:o.meta_title,onChange:e=>s({...o,meta_title:e.target.value})}),(0,M.jsx)(`textarea`,{rows:2,placeholder:`Meta Description`,value:o.meta_desc,onChange:e=>s({...o,meta_desc:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`OG Title (optional)`,value:o.og_title,onChange:e=>s({...o,og_title:e.target.value})}),(0,M.jsx)(`textarea`,{rows:2,placeholder:`OG Description (optional)`,value:o.og_description,onChange:e=>s({...o,og_description:e.target.value})}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`OG Image URL`,value:o.og_image,onChange:e=>s({...o,og_image:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Canonical URL`,value:o.canonical_url,onChange:e=>s({...o,canonical_url:e.target.value})})]}),(0,M.jsxs)(`label`,{style:{fontSize:`0.85rem`,display:`flex`,alignItems:`center`,gap:`6px`,color:`var(--admin-text-secondary)`},children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:o.no_index,onChange:e=>s({...o,no_index:e.target.checked})}),`No Index (hide from search engines)`]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>r(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:i?`Save`:`Create`})]})]})})]})}var Ms=[{key:`overview`,label:`Overview`},{key:`ledger`,label:`General Ledger`},{key:`expenses`,label:`Expenses`},{key:`accounts`,label:`Chart of Accounts`},{key:`reports`,label:`Reports`}];
12function W(e){return`₦`+(Number(e)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}function Ns(){return new Date().toISOString().slice(0,10)}function Ps(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),1).toISOString().slice(0,10)}function Fs(){let[e,t]=(0,x.useState)(`overview`);return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{style:{display:`flex`,gap:`4px`,marginBottom:`20px`,flexWrap:`wrap`},children:Ms.map(n=>(0,M.jsx)(`button`,{className:e===n.key?`btn-primary`:`btn-outline`,style:{fontSize:`0.82rem`,padding:`6px 14px`},onClick:()=>t(n.key),children:n.label},n.key))}),e===`overview`&&(0,M.jsx)(Is,{}),e===`ledger`&&(0,M.jsx)(Ls,{}),e===`expenses`&&(0,M.jsx)(Bs,{}),e===`accounts`&&(0,M.jsx)(Vs,{}),e===`reports`&&(0,M.jsx)(Hs,{})]})}function Is(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)(Ps()),[i,a]=(0,x.useState)(Ns()),o=()=>{io(`dashboard`,{from:n,to:i}).then(t).catch(()=>{})};if((0,x.useEffect)(()=>{o()},[n,i]),!e)return(0,M.jsx)(`p`,{style:{color:`var(--admin-text-secondary)`},children:`Loading…`});let s=[{label:`Total Revenue`,value:W(e.totalRevenue),color:`var(--admin-success)`},{label:`Total Expenses`,value:W(e.totalExpenses),color:`var(--admin-danger)`},{label:`Net Income`,value:W(e.netIncome),color:e.netIncome>=0?`var(--admin-success)`:`var(--admin-danger)`},{label:`Cash In`,value:W(e.cashInflows),color:`var(--admin-success)`},{label:`Cash Out`,value:W(e.cashOutflows),color:`var(--admin-danger)`},{label:`Accounts Payable`,value:W(e.accountsPayable),color:`var(--admin-warning, #e6a817)`}];return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,marginBottom:`16px`,flexWrap:`wrap`,alignItems:`center`},children:[(0,M.jsxs)(`label`,{style:{fontSize:`0.82rem`,color:`var(--admin-text-secondary)`},children:[`From: `,(0,M.jsx)(`input`,{type:`date`,value:n,onChange:e=>r(e.target.value)})]}),(0,M.jsxs)(`label`,{style:{fontSize:`0.82rem`,color:`var(--admin-text-secondary)`},children:[`To: `,(0,M.jsx)(`input`,{type:`date`,value:i,onChange:e=>a(e.target.value)})]})]}),(0,M.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(180px, 1fr))`,gap:`14px`,marginBottom:`24px`},children:s.map(e=>(0,M.jsxs)(`div`,{style:{background:`var(--admin-card-bg, #fff)`,borderRadius:`10px`,padding:`16px 18px`,border:`1px solid var(--admin-border)`,textAlign:`center`},children:[(0,M.jsx)(`div`,{style:{fontSize:`0.78rem`,color:`var(--admin-text-secondary)`,marginBottom:`6px`,textTransform:`uppercase`,letterSpacing:`0.03em`},children:e.label}),(0,M.jsx)(`div`,{style:{fontSize:`1.35rem`,fontWeight:700,color:e.color},children:e.value})]},e.label))})]})}function Ls(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(Ps()),[i,a]=(0,x.useState)(Ns()),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(!1),[f,p]=(0,x.useState)([]),[m,h]=(0,x.useState)({entry_date:Ns(),description:``,reference:``,lines:[{account_id:``,debit:``,credit:``,memo:``},{account_id:``,debit:``,credit:``,memo:``}]}),[g,_]=(0,x.useState)(``),v=()=>{Za({from:n,to:i}).then(t).catch(()=>{})};(0,x.useEffect)(()=>{v()},[n,i]),(0,x.useEffect)(()=>{Ja().then(p).catch(()=>{})},[]);let y=async e=>{let t=await Qa(e.id);s(t),l(!0)},b=async e=>{window.confirm(`Void this journal entry? This cannot be undone.`)&&(await eo(e),l(!1),v())},S=()=>h({...m,lines:[...m.lines,{account_id:``,debit:``,credit:``,memo:``}]}),C=e=>{m.lines.length<=2||h({...m,lines:m.lines.filter((t,n)=>n!==e)})},w=(e,t,n)=>{let r=m.lines.map((r,i)=>i===e?{...r,[t]:n}:r);h({...m,lines:r})};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,alignItems:`center`,flexWrap:`wrap`},children:[(0,M.jsx)(`h2`,{children:`General Ledger`}),(0,M.jsx)(`input`,{type:`date`,value:n,onChange:e=>r(e.target.value),style:{fontSize:`0.82rem`}}),(0,M.jsx)(`span`,{style:{color:`var(--admin-text-secondary)`},children:`to`}),(0,M.jsx)(`input`,{type:`date`,value:i,onChange:e=>a(e.target.value),style:{fontSize:`0.82rem`}})]}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{_(``),d(!0)},children:`+ Journal Entry`})]}),(0,M.jsx)(V,{columns:[{key:`entry_date`,label:`Date`,render:e=>new Date(e).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`})},{key:`description`,label:`Description`,render:e=>e?.length>60?e.slice(0,60)+`…`:e},{key:`reference`,label:`Reference`,render:e=>e||`—`},{key:`source_type`,label:`Source`,render:e=>e?(0,M.jsx)(H,{status:`active`,label:e.replace(/_/g,` `)}):(0,M.jsx)(H,{status:`pending`,label:`manual`})},{key:`total_debit`,label:`Debit`,render:e=>W(e)},{key:`total_credit`,label:`Credit`,render:e=>W(e)}],data:e,emptyMsg:`No journal entries for this period.`,onRowClick:y,exportName:`ledger`}),(0,M.jsx)(U,{open:c,onClose:()=>l(!1),title:`Journal Entry Detail`,width:`640px`,children:o&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`8px`,marginBottom:`16px`,fontSize:`0.85rem`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Date:`}),` `,new Date(o.entry_date).toLocaleDateString(`en-GB`)]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Reference:`}),` `,o.reference||`—`]}),(0,M.jsxs)(`div`,{style:{gridColumn:`1 / -1`},children:[(0,M.jsx)(`strong`,{children:`Description:`}),` `,o.description]}),o.source_type&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Source:`}),` `,o.source_type.replace(/_/g,` `)]}),o.is_auto?(0,M.jsx)(`div`,{children:(0,M.jsx)(H,{status:`active`,label:`Auto-generated`})}):null]}),(0,M.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.85rem`},children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`2px solid var(--admin-border)`},children:[(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Account`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`Debit`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`Credit`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Memo`})]})}),(0,M.jsx)(`tbody`,{children:o.lines?.map(e=>(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--admin-border)`},children:[(0,M.jsxs)(`td`,{style:{padding:`6px 8px`},children:[e.account_code,` — `,e.account_name]}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`},children:e.debit_kobo?W(e.debit_kobo):``}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`},children:e.credit_kobo?W(e.credit_kobo):``}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`,color:`var(--admin-text-secondary)`},children:e.memo||``})]},e.id))})]}),!o.voided&&(0,M.jsx)(`div`,{style:{marginTop:`16px`,textAlign:`right`},children:(0,M.jsx)(`button`,{className:`btn-danger`,onClick:()=>b(o.id),children:`Void Entry`})})]})}),(0,M.jsx)(U,{open:u,onClose:()=>d(!1),title:`New Journal Entry`,width:`780px`,children:(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),_(``);let t=m.lines.filter(e=>e.account_id&&(e.debit||e.credit)).map(e=>({account_id:Number(e.account_id),debit_kobo:Math.round(Number(e.debit||0)*100),credit_kobo:Math.round(Number(e.credit||0)*100),memo:e.memo||void 0}));if(t.length<2){_(`At least 2 lines required.`);return}let n=t.reduce((e,t)=>
12e+t.debit_kobo,0),r=t.reduce((e,t)=>e+t.credit_kobo,0);if(n!==r){_(`Debits (${W(n)}) must equal credits (${W(r)}).`);return}try{await $a({entry_date:m.entry_date,description:m.description,reference:m.reference||void 0,lines:t}),d(!1),h({entry_date:Ns(),description:``,reference:``,lines:[{account_id:``,debit:``,credit:``,memo:``},{account_id:``,debit:``,credit:``,memo:``}]}),v()}catch(e){_(e.message)}},style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[g&&(0,M.jsx)(`p`,{className:`book-error`,children:g}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr 2fr 1fr`},children:[(0,M.jsx)(`input`,{type:`date`,value:m.entry_date,required:!0,onChange:e=>h({...m,entry_date:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Description`,value:m.description,required:!0,onChange:e=>h({...m,description:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Reference (optional)`,value:m.reference,onChange:e=>h({...m,reference:e.target.value})})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`2fr 1fr 1fr 2fr auto`,gap:`6px`,marginBottom:`6px`,fontSize:`0.78rem`,color:`var(--admin-text-secondary)`,fontWeight:600},children:[(0,M.jsx)(`span`,{children:`Account`}),(0,M.jsx)(`span`,{children:`Debit ₦`}),(0,M.jsx)(`span`,{children:`Credit ₦`}),(0,M.jsx)(`span`,{children:`Memo`}),(0,M.jsx)(`span`,{})]}),m.lines.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`2fr 1fr 1fr 2fr auto`,gap:`6px`,marginBottom:`6px`},children:[(0,M.jsxs)(`select`,{value:e.account_id,required:!0,onChange:e=>w(t,`account_id`,e.target.value),children:[(0,M.jsx)(`option`,{value:``,children:`Select account…`}),f.filter(e=>e.active).map(e=>(0,M.jsxs)(`option`,{value:e.id,children:[e.code,` — `,e.name]},e.id))]}),(0,M.jsx)(`input`,{type:`number`,placeholder:`0.00`,min:`0`,step:`0.01`,value:e.debit,onChange:e=>w(t,`debit`,e.target.value)}),(0,M.jsx)(`input`,{type:`number`,placeholder:`0.00`,min:`0`,step:`0.01`,value:e.credit,onChange:e=>w(t,`credit`,e.target.value)}),(0,M.jsx)(`input`,{placeholder:`Memo`,value:e.memo,onChange:e=>w(t,`memo`,e.target.value)}),m.lines.length>2&&(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>C(t),style:{padding:`6px 10px`,fontSize:`0.8rem`},children:`✕`})]},t)),(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,style:{marginTop:`4px`},onClick:S,children:`+ Add Line`})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>d(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Post Entry`})]})]})})]})}var Rs=[`Rent`,`Salaries`,`Supplies`,`Utilities`,`Marketing`,`Maintenance`,`Insurance`,`Professional Fees`,`Bank Charges`,`Training`,`Other`],zs=[`Cash`,`Bank Transfer`,`Card`,`Mobile Money`,`Cheque`];function Bs(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(Ps()),[o,s]=(0,x.useState)(Ns()),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)({expense_date:Ns(),account_id:``,amount_naira:``,vendor:``,description:``,category:``,payment_method:``}),[f,p]=(0,x.useState)(``),m=()=>to({from:i,to:o}).then(t).catch(()=>{});(0,x.useEffect)(()=>{m()},[i,o]),(0,x.useEffect)(()=>{Ja().then(e=>r(e.filter(e=>e.type===`expense`))).catch(()=>{})},[]);let h=()=>{d({expense_date:Ns(),account_id:``,amount_naira:``,vendor:``,description:``,category:``,payment_method:``}),p(``),l(!0)},g=async e=>{e.preventDefault(),p(``);try{await no({expense_date:u.expense_date,account_id:Number(u.account_id),amount_kobo:Math.round(Number(u.amount_naira)*100),vendor:u.vendor||void 0,description:u.description||void 0,category:u.category||void 0,payment_method:u.payment_method||void 0}),l(!1),m()}catch(e){p(e.message)}},_=async e=>{window.confirm(`Delete this expense? The journal entry will be voided.`)&&(await ro(e.id),m())},v=e.reduce((e,t)=>e+Number(t.amount_kobo),0);return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,alignItems:`center`,flexWrap:`wrap`},children:[(0,M.jsx)(`h2`,{children:`Expenses`}),(0,M.jsx)(`input`,{type:`date`,value:i,onChange:e=>a(e.target.value),style:{fontSize:`0.82rem`}}),(0,M.jsx)(`span`,{style:{color:`var(--admin-text-secondary)`},children:`to`}),(0,M.jsx)(`input`,{type:`date`,value:o,onChange:e=>s(e.target.value),style:{fontSize:`0.82rem`}}),e.length>0&&(0,M.jsxs)(`span`,{style:{fontSize:`0.85rem`,fontWeight:600,color:`var(--admin-danger)`},children:[`Total: `,W(v)]})]}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:h,children:`+ Record Expense`})]}),(0,M.jsx)(V,{columns:[{key:`expense_date`,label:`Date`,render:e=>new Date(e).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`})},{key:`category`,label:`Category`,render:e=>e?(0,M.jsx)(H,{status:`active`,label:e}):`—`},{key:`description`,label:`Description`,render:e=>e||`—`},{key:`vendor`,label:`Vendor`,render:e=>e||`—`},{key:`amount_kobo`,label:`Amount`,render:e=>W(e)},{key:`payment_method`,label:`Method`,render:e=>e||`—`}],data:e,emptyMsg:`No expenses for this period.`,exportName:`expenses`,actions:e=>(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),_(e)},children:`Delete`})}),(0,M.jsx)(U,{open:c,onClose:()=>l(!1),title:`Record Expense`,width:`560px`,children:(0,M.jsxs)(`form`,{onSubmit:g,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[f&&(0,M.jsx)(`p`,{className:`book-error`,children:f}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{type:`date`,value:u.expense_date,required:!0,onChange:e=>d({...u,expense_date:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Amount ₦`,min:`0`,step:`0.01`,value:u.amount_naira,required:!0,onChange:e=>d({...u,amount_naira:e.target.value})})]}),(0,M.jsxs)(`select`,{value:u.account_id,required:!0,onChange:e=>d({...u,account_id:e.target.value}),children:[(0,M.jsx)(`option`,{value:``,children:`Select expense account…`}),n.map(e=>(0,M.jsxs)(`option`,{value:e.id,children:[e.code,` — `,e.name]},e.id))]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`select`,{value:u.category,onChange:e=>d({...u,category:e.target.value}),children:[(0,M.jsx)(`option`,{value:``,children:`Category (optional)`}),Rs.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))]}),(0,M.jsxs)(`select`,{value:u.payment_method,onChange:e=>d({...u,payment_method:e.target.value}),children:[(0,M.jsx)(`option`,{value:``,children:`Payment method`}),zs.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))]})]}),(0,M.jsx)(`input`,{placeholder:`Vendor name`,value:u.vendor,onChange:e=>d({...u,vendor:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Description`,value:u.description,onChange:e=>d({...u,description:e.target.value})}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>l(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Record Expense`})]})]})})]})}function Vs(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)({code:``,name:``,type:`expense`,sub_type:``,description:``}),[o,s]=(0,x.useState)(``),c=()=>
12Ja().then(t).catch(()=>{});(0,x.useEffect)(()=>{c()},[]);let l=async e=>{e.preventDefault(),s(``);try{await Ya(i),r(!1),c()}catch(e){s(e.message)}},u=async e=>{await Xa(e.id,{active:!e.active}),c()},d={asset:`active`,liability:`pending`,equity:`confirmed`,revenue:`completed`,expense:`cancelled`};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Chart of Accounts`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{a({code:``,name:``,type:`expense`,sub_type:``,description:``}),s(``),r(!0)},children:`+ New Account`})]}),(0,M.jsx)(V,{columns:[{key:`code`,label:`Code`,render:e=>(0,M.jsx)(`code`,{style:{fontSize:`0.82rem`},children:e})},{key:`name`,label:`Account Name`},{key:`type`,label:`Type`,render:e=>(0,M.jsx)(H,{status:d[e]||`active`,label:e})},{key:`sub_type`,label:`Sub-type`,render:e=>e||`—`},{key:`is_system`,label:`System`,render:e=>e?`🔒`:``},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Disabled`})}],data:e,emptyMsg:`No accounts.`,actions:e=>e.is_system?null:(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),u(e)},children:e.active?`Disable`:`Enable`})}),(0,M.jsx)(U,{open:n,onClose:()=>r(!1),title:`New Account`,width:`500px`,children:(0,M.jsxs)(`form`,{onSubmit:l,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[o&&(0,M.jsx)(`p`,{className:`book-error`,children:o}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Code (e.g. 6000)`,value:i.code,required:!0,onChange:e=>a({...i,code:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Account Name`,value:i.name,required:!0,onChange:e=>a({...i,name:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`select`,{value:i.type,onChange:e=>a({...i,type:e.target.value}),children:[(0,M.jsx)(`option`,{value:`asset`,children:`Asset`}),(0,M.jsx)(`option`,{value:`liability`,children:`Liability`}),(0,M.jsx)(`option`,{value:`equity`,children:`Equity`}),(0,M.jsx)(`option`,{value:`revenue`,children:`Revenue`}),(0,M.jsx)(`option`,{value:`expense`,children:`Expense`})]}),(0,M.jsx)(`input`,{placeholder:`Sub-type (e.g. operating)`,value:i.sub_type,onChange:e=>a({...i,sub_type:e.target.value})})]}),(0,M.jsx)(`input`,{placeholder:`Description (optional)`,value:i.description,onChange:e=>a({...i,description:e.target.value})}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>r(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Create Account`})]})]})})]})}function Hs(){let[e,t]=(0,x.useState)(`profit-loss`),[n,r]=(0,x.useState)(Ps()),[i,a]=(0,x.useState)(Ns()),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(!1),u=()=>{l(!0),io(e,e===`balance-sheet`||e===`trial-balance`?{as_of:i}:{from:n,to:i}).then(s).catch(()=>s(null)).finally(()=>l(!1))};return(0,x.useEffect)(()=>{u()},[e,n,i]),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,marginBottom:`20px`,flexWrap:`wrap`,alignItems:`center`},children:[(0,M.jsxs)(`select`,{value:e,onChange:e=>{t(e.target.value),s(null)},style:{fontSize:`0.85rem`,padding:`6px 10px`},children:[(0,M.jsx)(`option`,{value:`profit-loss`,children:`Profit & Loss`}),(0,M.jsx)(`option`,{value:`balance-sheet`,children:`Balance Sheet`}),(0,M.jsx)(`option`,{value:`trial-balance`,children:`Trial Balance`}),(0,M.jsx)(`option`,{value:`cash-flow`,children:`Cash Flow`})]}),(0,M.jsx)(`input`,{type:`date`,value:n,onChange:e=>r(e.target.value),style:{fontSize:`0.82rem`}}),(0,M.jsx)(`span`,{style:{color:`var(--admin-text-secondary)`},children:`to`}),(0,M.jsx)(`input`,{type:`date`,value:i,onChange:e=>a(e.target.value),style:{fontSize:`0.82rem`}})]}),c&&(0,M.jsx)(`p`,{style:{color:`var(--admin-text-secondary)`},children:`Loading…`}),!c&&o&&e===`profit-loss`&&(0,M.jsx)(Ws,{data:o}),!c&&o&&e===`balance-sheet`&&(0,M.jsx)(Gs,{data:o}),!c&&o&&e===`trial-balance`&&(0,M.jsx)(Ks,{data:o}),!c&&o&&e===`cash-flow`&&(0,M.jsx)(qs,{data:o})]})}function Us({title:e,rows:t,valueKey:n,totalLabel:r,totalValue:i,totalColor:a}){return(0,M.jsxs)(`div`,{style:{marginBottom:`24px`},children:[(0,M.jsx)(`h3`,{style:{fontSize:`0.95rem`,color:`var(--admin-text-secondary)`,borderBottom:`2px solid var(--admin-border)`,paddingBottom:`6px`,marginBottom:`8px`},children:e}),(0,M.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.85rem`},children:[(0,M.jsx)(`tbody`,{children:t.map(e=>(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--admin-border)`},children:[(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.code}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.name}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`,fontWeight:500},children:W(e[n])})]},e.id||e.code))}),(0,M.jsx)(`tfoot`,{children:(0,M.jsxs)(`tr`,{style:{borderTop:`2px solid var(--admin-border)`,fontWeight:700},children:[(0,M.jsx)(`td`,{colSpan:2,style:{padding:`8px`},children:r}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`8px`,color:a},children:W(i)})]})})]})]})}function Ws({data:e}){return(0,M.jsxs)(`div`,{style:{maxWidth:`640px`},children:[(0,M.jsx)(Us,{title:`Revenue`,rows:e.revenue,valueKey:`amount`,totalLabel:`Total Revenue`,totalValue:e.totalRevenue,totalColor:`var(--admin-success)`}),(0,M.jsx)(Us,{title:`Expenses`,rows:e.expenses,valueKey:`amount`,totalLabel:`Total Expenses`,totalValue:e.totalExpenses,totalColor:`var(--admin-danger)`}),(0,M.jsxs)(`div`,{style:{background:`var(--admin-card-bg, #fff)`,borderRadius:`10px`,padding:`16px 18px`,border:`1px solid var(--admin-border)`,textAlign:`center`},children:[(0,M.jsx)(`div`,{style:{fontSize:`0.85rem`,color:`var(--admin-text-secondary)`,marginBottom:`4px`},children:`Net Income`}),(0,M.jsx)(`div`,{style:{fontSize:`1.5rem`,fontWeight:700,color:e.netIncome>=0?`var(--admin-success)`:`var(--admin-danger)`},children:W(e.netIncome)})]})]})}function Gs({data:e}){return(0,M.jsxs)(`div`,{style:{maxWidth:`640px`},children:[(0,M.jsx)(Us,{title:`Assets`,rows:e.assets,valueKey:`balance`,totalLabel:`Total Assets`,totalValue:e.totalAssets,totalColor:`var(--admin-success)`}),(0,M.jsx)(Us,{title:`Liabilities`,rows:e.liabilities,valueKey:`balance`,totalLabel:`Total Liabilities`,totalValue:e.totalLiabilities,totalColor:`var(--admin-danger)`}),(0,M.jsx)(Us,{title:`Equity`,rows:e.equity,valueKey:`balance`,totalLabel:`Total Equity`,totalValue:e.totalEquity})]})}function Ks({data:e}){if(!Array.isArray(e)||e.length===0)return(0,M.jsx)(`p`,{style:{color:`var(--admin-text-secondary)`},children:`No entries found.`});let t=e.reduce((e,t)=>
12e+Number(t.total_debit),0),n=e.reduce((e,t)=>e+Number(t.total_credit),0);return(0,M.jsx)(`div`,{style:{maxWidth:`640px`},children:(0,M.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.85rem`},children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`2px solid var(--admin-border)`},children:[(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Code`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Account`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`Debit`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`Credit`})]})}),(0,M.jsx)(`tbody`,{children:e.map(e=>(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--admin-border)`},children:[(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.code}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.name}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`},children:W(e.total_debit)}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`},children:W(e.total_credit)})]},e.id))}),(0,M.jsx)(`tfoot`,{children:(0,M.jsxs)(`tr`,{style:{borderTop:`2px solid var(--admin-border)`,fontWeight:700},children:[(0,M.jsx)(`td`,{colSpan:2,style:{padding:`8px`},children:`Totals`}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`8px`},children:W(t)}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`8px`},children:W(n)})]})})]})})}function qs({data:e}){return(0,M.jsxs)(`div`,{style:{maxWidth:`640px`},children:[(0,M.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:`14px`,marginBottom:`24px`},children:[{label:`Cash In`,value:e.inflows,color:`var(--admin-success)`},{label:`Cash Out`,value:e.outflows,color:`var(--admin-danger)`},{label:`Net Cash Flow`,value:e.net,color:e.net>=0?`var(--admin-success)`:`var(--admin-danger)`}].map(e=>(0,M.jsxs)(`div`,{style:{background:`var(--admin-card-bg, #fff)`,borderRadius:`10px`,padding:`14px`,border:`1px solid var(--admin-border)`,textAlign:`center`},children:[(0,M.jsx)(`div`,{style:{fontSize:`0.78rem`,color:`var(--admin-text-secondary)`,marginBottom:`4px`,textTransform:`uppercase`},children:e.label}),(0,M.jsx)(`div`,{style:{fontSize:`1.2rem`,fontWeight:700,color:e.color},children:W(e.value)})]},e.label))}),e.entries?.length>0&&(0,M.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.85rem`},children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`2px solid var(--admin-border)`},children:[(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Date`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Description`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`In`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`Out`})]})}),(0,M.jsx)(`tbody`,{children:e.entries.map(e=>(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--admin-border)`},children:[(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:new Date(e.entry_date).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`})}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.description}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`,color:`var(--admin-success)`},children:e.debit_kobo?W(e.debit_kobo):``}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`,color:`var(--admin-danger)`},children:e.credit_kobo?W(e.credit_kobo):``})]},e.id))})]})]})}var Js={name:``,email:``,phone:``};function Ys(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)(Js),[m,h]=(0,x.useState)(``),g=()=>{r(!0),ao().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{g()},[]);let _=()=>{l(null),p(Js),h(``),a(!0)},v=e=>{l(e),p({name:e.name,email:e.email,phone:e.phone||``}),h(``),a(!0)},y=async e=>{try{let t=await oo(e.id);d(t),s(!0)}catch{}},b=async e=>{e.preventDefault(),h(``);try{c?await co(c.id,f):await so(f),a(!1),g()}catch(e){h(e.message)}},S=async e=>{if(window.confirm(`Delete customer "${e.name}"? Only possible if they have no bookings or orders.`))try{await lo(e.id),g()}catch(e){alert(e.message)}};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Customers`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:_,children:`+ Add Customer`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Name`},{key:`email`,label:`Email`},{key:`phone`,label:`Phone`,render:e=>e||`—`},{key:`booking_count`,label:`Bookings`,render:e=>e||0},{key:`order_count`,label:`Orders`,render:e=>e||0},{key:`last_booking`,label:`Last Visit`,render:e=>e?new Date(e).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`}):`Never`},{key:`created_at`,label:`Joined`,render:e=>new Date(e).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`})}],data:e,loading:n,exportName:`customers`,emptyMsg:`No customers yet.`,onRowClick:y,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),v(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),S(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:c?`Edit Customer`:`Add Customer`,width:`480px`,children:(0,M.jsxs)(`form`,{onSubmit:b,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[m&&(0,M.jsx)(`p`,{className:`book-error`,children:m}),(0,M.jsx)(`input`,{placeholder:`Full name`,value:f.name,required:!0,onChange:e=>p({...f,name:e.target.value})}),(0,M.jsx)(`input`,{type:`email`,placeholder:`Email address`,value:f.email,required:!0,onChange:e=>p({...f,email:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Phone (optional)`,value:f.phone,onChange:e=>p({...f,phone:e.target.value})}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:c?`Save Changes`:`Add Customer`})]})]})}),(0,M.jsx)(U,{open:o,onClose:()=>s(!1),title:u?`Customer — ${u.name}`:`Customer`,width:`700px`,children:u&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 1fr`,gap:`10px`,marginBottom:`20px`,fontSize:`0.85rem`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Email:`}),` `,u.email]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Phone:`}),` `,u.phone||`—`]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:`Since:`}),` `,new Date(u.created_at).toLocaleDateString(`en-GB`)]})]}),u.bookings?.length>0&&(0,M.jsxs)(`div`,{style:{marginBottom:`20px`},children:[(0,M.jsxs)(`h3`,{style:{fontSize:`0.9rem`,color:`var(--admin-text-secondary)`,marginBottom:`8px`},children:[`Bookings (`,u.bookings.length,`)`]}),(0,M.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.82rem`},children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`2px solid var(--admin-border)`},children:[(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Date`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Service`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Status`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Payment`})]})}),(0,M.jsx)(`tbody`,{children:u.bookings.map(e=>(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--admin-border)`},children:[(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.starts_at?new Date(e.starts_at).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`}):`—`}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:e.service_name}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:(0,M.jsx)(H,{status:e.status})}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:(0,M.jsx)(H,{status:e.payment_status})})]},e.id))})]})]}),u.orders?.length>0&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`h3`,{style:{fontSize:`0.9rem`,color:`var(--admin-text-secondary)`,marginBottom:`8px`},children:[`Orders (`,u.orders.length,`)`]}),(0,M.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.82rem`},children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{style:{borderBottom:`2px solid var(--admin-border)`},children:[(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Reference`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Date`}),(0,M.jsx)(`th`,{style:{textAlign:`right`,padding:`6px 8px`},children:`Total`}),(0,M.jsx)(`th`,{style:{textAlign:`left`,padding:`6px 8px`},children:`Status`})]})}),(0,M.jsx)(`tbody`,{children:u.orders.map(e=>(0,M.jsxs)(`tr`,{style:{borderBottom:`1px solid var(--admin-border)`},children:[(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:(0,M.jsx)(`code`,{style:{fontSize:`0.8rem`},children:e.reference})}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:new Date(e.created_at).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`})}),(0,M.jsx)(`td`,{style:{textAlign:`right`,padding:`6px 8px`}
12,children:`₦`+(Number(e.total_kobo)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}),(0,M.jsx)(`td`,{style:{padding:`6px 8px`},children:(0,M.jsx)(H,{status:e.status})})]},e.id))})]})]}),!u.bookings?.length&&!u.orders?.length&&(0,M.jsx)(`p`,{style:{color:`var(--admin-text-secondary)`,fontSize:`0.85rem`},children:`No bookings or orders yet.`})]})})]})}var Xs={name:``,contact_name:``,email:``,phone:``,address:``};function Zs(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(Xs),[u,d]=(0,x.useState)(``),f=()=>{r(!0),ca().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{f()},[]);let p=()=>{s(null),l(Xs),d(``),a(!0)},m=e=>{s(e),l({name:e.name,contact_name:e.contact_name||``,email:e.email||``,phone:e.phone||``,address:e.address||``}),d(``),a(!0)},h=async e=>{e.preventDefault(),d(``);try{o?await ua(o.id,c):await la(c),a(!1),f()}catch(e){d(e.message)}},g=async e=>{if(window.confirm(`Delete supplier "${e.name}"? Only possible if they have no purchase orders.`))try{await da(e.id),f()}catch(e){alert(e.message)}},_=async e=>{await ua(e.id,{active:!e.active}),f()};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Suppliers`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:p,children:`+ Add Supplier`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Company Name`},{key:`contact_name`,label:`Contact Person`,render:e=>e||`—`},{key:`email`,label:`Email`,render:e=>e||`—`},{key:`phone`,label:`Phone`,render:e=>e||`—`},{key:`address`,label:`Address`,render:e=>e?e.length>40?e.slice(0,40)+`…`:e:`—`},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Inactive`})}],data:e,loading:n,exportName:`suppliers`,emptyMsg:`No suppliers yet.`,onRowClick:m,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),m(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),_(e)},children:e.active?`Deactivate`:`Activate`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),g(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:o?`Edit Supplier`:`Add Supplier`,width:`540px`,children:(0,M.jsxs)(`form`,{onSubmit:h,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[u&&(0,M.jsx)(`p`,{className:`book-error`,children:u}),(0,M.jsx)(`input`,{placeholder:`Company / Supplier Name`,value:c.name,required:!0,onChange:e=>l({...c,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Contact Person (optional)`,value:c.contact_name,onChange:e=>l({...c,contact_name:e.target.value})}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{type:`email`,placeholder:`Email (optional)`,value:c.email,onChange:e=>l({...c,email:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Phone (optional)`,value:c.phone,onChange:e=>l({...c,phone:e.target.value})})]}),(0,M.jsx)(`textarea`,{rows:2,placeholder:`Address (optional)`,value:c.address,onChange:e=>l({...c,address:e.target.value}),style:{resize:`vertical`}}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:o?`Save Changes`:`Add Supplier`})]})]})})]})}function Qs(e){return`₦`+(Number(e)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}var $s={slug:``,name:``,category:``,description:``,duration_min:60,price_naira:``};function ec(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)($s),[u,d]=(0,x.useState)(``),f=()=>{r(!0),Fi().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{f()},[]);let p=()=>{s(null),l($s),d(``),a(!0)},m=e=>{s(e),l({slug:e.slug,name:e.name,category:e.category,description:e.description||``,duration_min:e.duration_min,price_naira:(e.price_kobo/100).toString()}),d(``),a(!0)},h=async e=>{await Li(e.id,{active:!e.active}),f()};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Services Menu`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:p,children:`+ New Service`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Service Name`},{key:`category`,label:`Category`},{key:`duration_min`,label:`Duration`,render:e=>`${e} min`},{key:`price_kobo`,label:`Price`,render:e=>Qs(e)},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Hidden`})}],data:e,loading:n,exportName:`services`,emptyMsg:`No services yet.`,onRowClick:m,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),m(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),h(e)},children:e.active?`Hide`:`Show`})]})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:o?`Edit Service`:`Create New Service`,width:`560px`,children:(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),d(``);let t={slug:c.slug,name:c.name,category:c.category,description:c.description||void 0,duration_min:Number(c.duration_min),price_kobo:Math.round(Number(c.price_naira)*100)};try{o?await Li(o.id,t):await Ii(t),a(!1),f()}catch(e){d(e.message)}},style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[u&&(0,M.jsx)(`p`,{className:`book-error`,children:u}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Service Name`,value:c.name,required:!0,onChange:e=>l({...c,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Slug (e.g. swedish-massage)`,value:c.slug,required:!0,disabled:!!o,onChange:e=>l({...c,slug:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Category (e.g. Massage)`,value:c.category,required:!0,onChange:e=>l({...c,category:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Duration (minutes)`,value:c.duration_min,required:!0,min:5,onChange:e=>l({...c,duration_min:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Price ₦`,value:c.price_naira,required:!0,min:0,step:`0.01`,onChange:e=>l({...c,price_naira:e.target.value})})]}),(0,M.jsx)(`textarea`,{placeholder:`Description (optional)`,rows:3,value:c.description,style:{width:`100%`,resize:`vertical`},onChange:e=>l({...c,description:e.target.value})}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:o?`Save Changes`:`Create Service`})]})]})})]})}
12function tc(e){return`₦`+(Number(e)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}var nc={slug:``,name:``,tagline:``,items:[``],price_naira:``,price_label:`/ person`,tier:`main`,variant:`light`,badge:``,featured:!1,sort_order:0};function rc(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(nc),[u,d]=(0,x.useState)(``),f=()=>{r(!0),F().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{f()},[]);let p=()=>{s(null),l(nc),d(``),a(!0)},m=e=>{s(e);let t=typeof e.items==`string`?JSON.parse(e.items):e.items;l({slug:e.slug,name:e.name,tagline:e.tagline||``,items:t.length?t:[``],price_naira:(e.price_kobo/100).toString(),price_label:e.price_label||``,tier:e.tier,variant:e.variant,badge:e.badge||``,featured:!!e.featured,sort_order:e.sort_order||0}),d(``),a(!0)},h=(e,t)=>{let n=c.items.map((n,r)=>r===e?t:n);l({...c,items:n})},g=()=>l({...c,items:[...c.items,``]}),_=e=>{c.items.length<=1||l({...c,items:c.items.filter((t,n)=>n!==e)})},v=async e=>{e.preventDefault(),d(``);let t={slug:c.slug,name:c.name,tagline:c.tagline||void 0,items:c.items.filter(e=>e.trim()),price_kobo:Math.round(Number(c.price_naira)*100),price_label:c.price_label||null,tier:c.tier,variant:c.variant,badge:c.badge||null,featured:c.featured,sort_order:Number(c.sort_order)||0};try{o?await Ri(o.id,t):await I(t),a(!1),f()}catch(e){d(e.message)}},y=async e=>{if(window.confirm(`Delete "${e.name}"? This cannot be undone.`))try{await zi(e.id),f()}catch(e){alert(e.message)}},b=async e=>{await Ri(e.id,{active:!e.active}),f()};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Packages`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:p,children:`+ New Package`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Package Name`},{key:`tier`,label:`Tier`,render:e=>(0,M.jsx)(H,{status:e===`main`?`active`:`pending`,label:e})},{key:`items`,label:`Treatments`,render:e=>(0,M.jsx)(`span`,{style:{fontSize:`0.82rem`,whiteSpace:`normal`,display:`block`,maxWidth:`280px`},children:(typeof e==`string`?JSON.parse(e):e).join(` · `)})},{key:`price_kobo`,label:`Price`,render:e=>tc(e)},{key:`featured`,label:`Featured`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Yes`:`No`})},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Hidden`})}],data:e,loading:n,exportName:`packages`,emptyMsg:`No packages yet.`,onRowClick:m,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),m(e)},children:`Edit`}),(0,M.jsx)(`button`,{className:`btn-outline`,onClick:t=>{t.stopPropagation(),b(e)},children:e.active?`Hide`:`Show`}),(0,M.jsx)(`button`,{className:`btn-danger`,onClick:t=>{t.stopPropagation(),y(e)},children:`Delete`})]})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:o?`Edit Package`:`Create New Package`,width:`640px`,children:(0,M.jsxs)(`form`,{onSubmit:v,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[u&&(0,M.jsx)(`p`,{className:`book-error`,children:u}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Package Name`,value:c.name,required:!0,onChange:e=>l({...c,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Slug (e.g. goddess-package)`,value:c.slug,required:!0,disabled:!!o,onChange:e=>l({...c,slug:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Tagline`,value:c.tagline,onChange:e=>l({...c,tagline:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Price ₦`,value:c.price_naira,required:!0,min:0,onChange:e=>l({...c,price_naira:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`repeat(4, 1fr)`},children:[(0,M.jsxs)(`select`,{value:c.tier,onChange:e=>l({...c,tier:e.target.value}),children:[(0,M.jsx)(`option`,{value:`main`,children:`Main`}),(0,M.jsx)(`option`,{value:`secondary`,children:`Secondary`})]}),(0,M.jsxs)(`select`,{value:c.variant,onChange:e=>l({...c,variant:e.target.value}),children:[(0,M.jsx)(`option`,{value:`light`,children:`Light`}),(0,M.jsx)(`option`,{value:`dark`,children:`Dark`})]}),(0,M.jsx)(`input`,{placeholder:`Price Label (e.g. / person)`,value:c.price_label,onChange:e=>l({...c,price_label:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Badge (e.g. Most Popular)`,value:c.badge,onChange:e=>l({...c,badge:e.target.value})})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`16px`,alignItems:`center`},children:[(0,M.jsxs)(`label`,{style:{fontSize:`0.85rem`,display:`flex`,alignItems:`center`,gap:`6px`,color:`var(--admin-text-secondary)`},children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:c.featured,onChange:e=>l({...c,featured:e.target.checked})}),`Featured`]}),(0,M.jsxs)(`label`,{style:{fontSize:`0.85rem`,display:`flex`,alignItems:`center`,gap:`6px`,color:`var(--admin-text-secondary)`},children:[`Sort Order:`,(0,M.jsx)(`input`,{type:`number`,value:c.sort_order,style:{width:`60px`},onChange:e=>l({...c,sort_order:e.target.value})})]})]}),(0,M.jsxs)(`div`,{style:{marginTop:`4px`},children:[(0,M.jsx)(`strong`,{style:{fontSize:`0.85rem`,display:`block`,marginBottom:`8px`,color:`var(--admin-text-secondary)`},children:`Included Treatments`}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`6px`},children:c.items.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`},children:[(0,M.jsx)(`input`,{placeholder:`Treatment ${t+1}`,value:e,required:!0,style:{flex:1},onChange:e=>h(t,e.target.value)}),c.items.length>1&&(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>_(t),style:{padding:`6px 10px`,fontSize:`0.8rem`},children:`✕`})]},t))}),(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,style:{marginTop:`8px`},onClick:g,children:`+ Add Treatment`})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:o?`Save Changes`:`Create Package`})]})]})})]})}var ic=[`pending`,`paid`,`fulfilled`,`cancelled`,`refunded`];function ac(e,t){try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t||`NGN`}).format(Number(e)/100)}
12catch{return(t||`NGN`)+` `+(Number(e)/100).toLocaleString()}}function oc(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),i=()=>{r(!0),ea().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{i()},[]);let a=async(e,t)=>{await ta(e,t),i()};return(0,M.jsx)(V,{columns:[{key:`reference`,label:`Reference`},{key:`customer_name`,label:`Customer`,render:(e,t)=>(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,M.jsx)(`span`,{children:e}),(0,M.jsx)(`span`,{style:{fontSize:`0.78rem`,opacity:.6},children:t.customer_phone||`—`})]})},{key:`total_kobo`,label:`Total`,render:(e,t)=>ac(e,t.currency_code)},{key:`fulfilment`,label:`Fulfillment`,render:e=>(0,M.jsx)(`span`,{style:{textTransform:`capitalize`},children:e})},{key:`payment_status`,label:`Payment`,render:e=>(0,M.jsx)(H,{status:e})},{key:`status`,label:`Order Status`,render:e=>(0,M.jsx)(H,{status:e})}],data:e,loading:n,exportName:`orders`,emptyMsg:`No orders yet.`,actions:e=>(0,M.jsx)(`select`,{className:`dt-inline-select`,value:e.status,onChange:t=>a(e.id,t.target.value),children:ic.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))})})}function sc(e){return`₦`+(e/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}var cc={slug:``,name:``,category:``,description:``,image_url:``,variants:[{sku:``,label:`Default`,price_naira:``,quantity:0,reorder_level:0,cost_naira:0}]};function lc(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(cc),[c,l]=(0,x.useState)(``),u=()=>{r(!0),Zi().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{u()},[]);let d=async(e,t)=>{await $i(e.id,{[t]:!e[t]}),u()},f=(e,t,n)=>{let r=o.variants.map((r,i)=>i===e?{...r,[t]:n}:r);s({...o,variants:r})};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Products Catalogue`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{s(cc),l(``),a(!0)},children:`+ New Product`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Name`},{key:`category`,label:`Category`},{key:`featured`,label:`Featured`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Yes`:`No`})},{key:`active`,label:`Visibility`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Visible`:`Hidden`})},{key:`variants`,label:`Variants & Prices`,render:e=>(0,M.jsx)(`span`,{style:{fontSize:`0.82rem`,whiteSpace:`normal`,display:`block`,maxWidth:`320px`},children:(e||[]).map(e=>`${e.label}: ${sc(e.price_kobo)} (${e.stock} avail)`).join(` · `)})}],data:e,loading:n,exportName:`products`,emptyMsg:`No products yet.`,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>d(e,`featured`),children:e.featured?`Unfeature`:`Feature`}),(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>d(e,`active`),children:e.active?`Hide`:`Show`})]})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:`Create New Product`,width:`680px`,children:(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),l(``);try{await Qi({slug:o.slug,name:o.name,category:o.category,description:o.description,image_url:o.image_url||void 0,variants:o.variants.map(e=>({sku:e.sku,label:e.label,price_kobo:Math.round(Number(e.price_naira)*100),quantity:Number(e.quantity),reorder_level:Number(e.reorder_level),cost_kobo:Math.round(Number(e.cost_naira)*100)}))}),s(cc),a(!1),u()}catch(e){l(e.message)}},style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[c&&(0,M.jsx)(`p`,{className:`book-error`,children:c}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Product Name`,value:o.name,required:!0,onChange:e=>s({...o,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Slug (e.g. vitamin-c-serum)`,value:o.slug,required:!0,onChange:e=>s({...o,slug:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Category`,value:o.category,required:!0,onChange:e=>s({...o,category:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Image URL (optional)`,value:o.image_url,onChange:e=>s({...o,image_url:e.target.value})})]}),(0,M.jsx)(`textarea`,{placeholder:`Description`,rows:3,value:o.description,className:`admin-form-grid`,style:{width:`100%`,resize:`vertical`},onChange:e=>s({...o,description:e.target.value})}),(0,M.jsxs)(`div`,{style:{marginTop:`12px`},children:[(0,M.jsx)(`strong`,{style:{fontSize:`0.85rem`,display:`block`,marginBottom:`8px`,color:`var(--admin-text-secondary)`},children:`Variants`}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:o.variants.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:`6px`},children:[(0,M.jsx)(`input`,{placeholder:`SKU`,value:e.sku,required:!0,onChange:e=>f(t,`sku`,e.target.value)}),(0,M.jsx)(`input`,{placeholder:`Label`,value:e.label,required:!0,onChange:e=>f(t,`label`,e.target.value)}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Price ₦`,value:e.price_naira,required:!0,onChange:e=>f(t,`price_naira`,e.target.value)}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Qty`,value:e.quantity,onChange:e=>f(t,`quantity`,e.target.value)}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Cost ₦`,value:e.cost_naira,onChange:e=>f(t,`cost_naira`,e.target.value)})]},t))}),(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,style:{marginTop:`10px`},onClick:()=>s({...o,variants:[...o.variants,{sku:``,label:``,price_naira:``,quantity:0,reorder_level:0,cost_naira:0}]}),children:`+ Add Variant`})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Create Product`})]})]})})]})}
12function uc(e){return`₦`+(e/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}var dc={sku:``,name:``,kind:`backbar`,unit:`each`,quantity:0,reorder_level:0,cost_naira:0},fc={itemId:null,itemName:``,changeQty:``,reason:`adjustment`,note:``};function pc(){let[e,t]=(0,x.useState)(`retail`),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!0),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(dc),[f,p]=(0,x.useState)(fc),[m,h]=(0,x.useState)(``),[g,_]=(0,x.useState)(``),v=()=>{a(!0),ra(e).then(r).catch(()=>{}).finally(()=>a(!1))};(0,x.useEffect)(()=>{v()},[e]);let y=e=>{p({itemId:e.id,itemName:e.name,changeQty:``,reason:`adjustment`,note:`Manual inventory adjustment`}),_(``),l(!0)};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,M.jsx)(`button`,{className:`btn-outline ${e===`retail`?`btn-primary`:``}`,onClick:()=>t(`retail`),style:e===`retail`?{background:`var(--admin-accent)`,color:`var(--admin-bg)`}:{},children:`Retail Stock`}),(0,M.jsx)(`button`,{className:`btn-outline ${e===`backbar`?`btn-primary`:``}`,onClick:()=>t(`backbar`),style:e===`backbar`?{background:`var(--admin-accent)`,color:`var(--admin-bg)`}:{},children:`Back-bar Consumables`})]}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{d(dc),h(``),s(!0)},children:`+ New Stock Item`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Item Name`},{key:`sku`,label:`SKU`},{key:`quantity`,label:`Stock Level`,render:(e,t)=>{let n=Number(e)<=Number(t.reorder_level);return(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,M.jsxs)(`span`,{children:[Number(e),` `,t.unit]}),n&&(0,M.jsx)(H,{status:`inactive`,label:`Low stock`})]})}},{key:`reorder_level`,label:`Reorder Level`,render:(e,t)=>`${Number(e)} ${t.unit}`},{key:`cost_kobo`,label:`Unit Cost`,render:e=>uc(e)}],data:n,loading:i,exportName:`inventory_${e}`,emptyMsg:`No stock items found.`,actions:e=>(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>y(e),children:`Adjust Stock`})}),(0,M.jsx)(U,{open:o,onClose:()=>s(!1),title:`Add New Inventory Item`,width:`540px`,children:(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),h(``);try{await ia({sku:u.sku,name:u.name,kind:u.kind,unit:u.unit,quantity:Number(u.quantity),reorder_level:Number(u.reorder_level),cost_kobo:Math.round(Number(u.cost_naira)*100)}),d(dc),s(!1),v()}catch(e){h(e.message)}},style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[m&&(0,M.jsx)(`p`,{className:`book-error`,children:m}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr`},children:[(0,M.jsx)(`input`,{placeholder:`Item Name`,value:u.name,required:!0,onChange:e=>d({...u,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`SKU`,value:u.sku,required:!0,onChange:e=>d({...u,sku:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`select`,{value:u.kind,onChange:e=>d({...u,kind:e.target.value}),children:[(0,M.jsx)(`option`,{value:`backbar`,children:`Back-bar consumable`}),(0,M.jsx)(`option`,{value:`retail`,children:`Retail product`})]}),(0,M.jsx)(`input`,{placeholder:`Unit (e.g. each, ml, g)`,value:u.unit,required:!0,onChange:e=>d({...u,unit:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{type:`number`,step:`0.01`,placeholder:`Initial Quantity`,value:u.quantity,required:!0,onChange:e=>d({...u,quantity:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,step:`0.01`,placeholder:`Reorder Level`,value:u.reorder_level,required:!0,onChange:e=>d({...u,reorder_level:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,step:`0.01`,placeholder:`Unit Cost (₦)`,value:u.cost_naira,required:!0,onChange:e=>d({...u,cost_naira:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>s(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Create Item`})]})]})}),(0,M.jsx)(U,{open:c,onClose:()=>l(!1),title:`Adjust Inventory Stock`,width:`480px`,children:(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),_(``);let t=Number(f.changeQty);if(!Number.isFinite(t)||t===0){_(`Please specify a non-zero adjustment amount.`);return}try{await aa(f.itemId,t,f.reason,f.note),l(!1),v()}catch(e){_(e.message)}},style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[g&&(0,M.jsx)(`p`,{className:`book-error`,children:g}),(0,M.jsxs)(`div`,{style:{fontSize:`0.9rem`,color:`var(--admin-text-secondary)`},children:[`Adjusting stock level for: `,(0,M.jsx)(`strong`,{children:f.itemName})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{style:{fontSize:`0.8rem`,color:`var(--admin-text-tertiary)`,display:`block`,marginBottom:`4px`},children:`Quantity Change (use negative to deduct)`}),(0,M.jsx)(`input`,{type:`number`,step:`0.01`,placeholder:`e.g. -5 or 10`,required:!0,value:f.changeQty,onChange:e=>p({...f,changeQty:e.target.value}),style:{width:`100%`}})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{style:{fontSize:`0.8rem`,color:`var(--admin-text-tertiary)`,display:`block`,marginBottom:`4px`},children:`Adjustment Reason`}),(0,M.jsxs)(`select`,{value:f.reason,onChange:e=>p({...f,reason:e.target.value}),style:{width:`100%`},children:[(0,M.jsx)(`option`,{value:`adjustment`,children:`Manual Adjustment`}),(0,M.jsx)(`option`,{value:`purchase`,children:`Restock / Purchase`}),(0,M.jsx)(`option`,{value:`consumption`,children:`Backbar consumption`}),(0,M.jsx)(`option`,{value:`audit_gain`,children:`Audit Gain`}),(0,M.jsx)(`option`,{value:`audit_loss`,children:`Audit Loss`})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`label`,{style:{fontSize:`0.8rem`,color:`var(--admin-text-tertiary)`,display:`block`,marginBottom:`4px`},children:`Note`}),(0,M.jsx)(`input`,{type:`text`,placeholder:`Audit description or reference`,value:f.note,onChange:e=>p({...f,note:e.target.value}),style:{width:`100%`}})]})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>l(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Submit Adjustment`})]})]})})]})}
12function mc(e){return`₦`+(Number(e)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}function hc(){let[e,t]=(0,x.useState)(`orders`),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)([]),[o,s]=(0,x.useState)([]),[c,l]=(0,x.useState)(!0),[u,d]=(0,x.useState)(``),[f,p]=(0,x.useState)(!1),[m,h]=(0,x.useState)(!1),[g,_]=(0,x.useState)({name:``,contact_name:``,email:``,phone:``}),[v,y]=(0,x.useState)({supplier_id:``,lines:[{inventory_item_id:``,quantity:``,unit_cost_naira:``,new_price_naira:``}]}),b=()=>{l(!0),Promise.all([ca().then(r),fa().then(a),ra().then(s)]).catch(()=>{}).finally(()=>l(!1))};(0,x.useEffect)(()=>{b()},[]);let S=async e=>{e.preventDefault(),d(``);try{await la(g),_({name:``,contact_name:``,email:``,phone:``}),p(!1),b()}catch(e){d(e.message)}},C=(e,t,n)=>{let r=v.lines.map((r,i)=>i===e?{...r,[t]:n}:r);y({...v,lines:r})},w=()=>y({...v,lines:[...v.lines,{inventory_item_id:``,quantity:``,unit_cost_naira:``,new_price_naira:``}]}),T=async e=>{e.preventDefault(),d(``);try{await pa({supplier_id:v.supplier_id?Number(v.supplier_id):void 0,items:v.lines.filter(e=>e.inventory_item_id&&e.quantity).map(e=>({inventory_item_id:Number(e.inventory_item_id),quantity:Number(e.quantity),unit_cost_kobo:Math.round(Number(e.unit_cost_naira||0)*100),new_price_kobo:e.new_price_naira?Math.round(Number(e.new_price_naira)*100):void 0}))}),y({supplier_id:``,lines:[{inventory_item_id:``,quantity:``,unit_cost_naira:``}]}),h(!1),b()}catch(e){d(e.message)}},ee=async e=>{if(window.confirm(`Receive this Purchase Order? Stock will be updated.`))try{await ma(e),b()}catch(e){alert(e.message)}},te=async e=>{if(window.confirm(`Mark this Purchase Order as paid? This records the supplier payment (Cash → Accounts Payable).`))try{await ha(e),b()}catch(e){alert(e.message)}};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,M.jsx)(`button`,{className:`btn-outline ${e===`orders`?`btn-primary`:``}`,onClick:()=>t(`orders`),style:e===`orders`?{background:`var(--admin-accent)`,color:`var(--admin-bg)`}:{},children:`Purchase Orders`}),(0,M.jsx)(`button`,{className:`btn-outline ${e===`suppliers`?`btn-primary`:``}`,onClick:()=>t(`suppliers`),style:e===`suppliers`?{background:`var(--admin-accent)`,color:`var(--admin-bg)`}:{},children:`Suppliers`})]}),e===`orders`?(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{d(``),h(!0)},children:`+ New PO`}):(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{d(``),p(!0)},children:`+ New Supplier`})]}),e===`suppliers`?(0,M.jsx)(V,{columns:[{key:`name`,label:`Supplier Name`},{key:`contact_name`,label:`Contact Person`,render:e=>e||`—`},{key:`email`,label:`Email`,render:e=>e||`—`},{key:`phone`,label:`Phone`,render:e=>e||`—`}],data:n,loading:c,exportName:`suppliers`,emptyMsg:`No suppliers found.`}):(0,M.jsx)(V,{columns:[{key:`reference`,label:`Reference`},{key:`supplier_name`,label:`Supplier`,render:e=>e||`No Supplier`},{key:`total_kobo`,label:`Total Value`,render:e=>mc(e)},{key:`status`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e})},{key:`paid_at`,label:`Payment`,render:e=>(0,M.jsx)(H,{status:e?`paid`:`unpaid`,label:e?`Paid`:`Unpaid`})},{key:`created_at`,label:`Created Date`,render:e=>e?new Date(e).toLocaleDateString():`—`}],data:i,loading:c,exportName:`purchase_orders`,emptyMsg:`No purchase orders found.`,actions:e=>e.status!==`received`&&e.status!==`cancelled`?(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>ee(e.id),children:`Receive`}):e.status===`received`&&!e.paid_at?(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>te(e.id),children:`Mark paid`}):null}),(0,M.jsx)(U,{open:f,onClose:()=>p(!1),title:`Add New Supplier`,width:`480px`,children:(0,M.jsxs)(`form`,{onSubmit:S,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[u&&(0,M.jsx)(`p`,{className:`book-error`,children:u}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr`},children:[(0,M.jsx)(`input`,{placeholder:`Supplier Name`,value:g.name,required:!0,onChange:e=>_({...g,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Contact Person Name`,value:g.contact_name,onChange:e=>_({...g,contact_name:e.target.value})}),(0,M.jsx)(`input`,{type:`email`,placeholder:`Email Address`,value:g.email,onChange:e=>_({...g,email:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Phone Number`,value:g.phone,onChange:e=>_({...g,phone:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>p(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Create Supplier`})]})]})}),(0,M.jsx)(U,{open:m,onClose:()=>h(!1),title:`Create Purchase Order`,width:`800px`,children:(0,M.jsxs)(`form`,{onSubmit:T,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[u&&(0,M.jsx)(`p`,{className:`book-error`,children:u}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr`},children:[(0,M.jsx)(`label`,{style:{fontSize:`0.8rem`,color:`var(--admin-text-secondary)`},children:`Supplier`}),(0,M.jsxs)(`select`,{value:v.supplier_id,onChange:e=>y({...v,supplier_id:e.target.value}),children:[(0,M.jsx)(`option`,{value:``,children:`Select supplier (optional)`}),n.map(e=>(0,M.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,M.jsxs)(`div`,{style:{marginTop:`8px`},children:[(0,M.jsx)(`strong`,{style:{fontSize:`0.85rem`,display:`block`,marginBottom:`8px`,color:`var(--admin-text-secondary)`},children:`Purchase Items`}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`,maxHeight:`200px`,overflowY:`auto`,paddingRight:`4px`},children:v.lines.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`2fr 1fr 1fr 1fr`,gap:`6px`},children:[(0,M.jsxs)(`select`,{value:e.inventory_item_id,required:!0,onChange:e=>C(t,`inventory_item_id`,e.target.value),children:[(0,M.jsx)(`option`,{value:``,children:`Select inventory item`}),o.map(e=>(0,M.jsxs)(`option`,{value:e.id,children:[e.name,` (`,e.sku,`)`]},e.id))]}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Qty`,required:!0,value:e.quantity,onChange:e=>C(t,`quantity`,e.target.value)}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Cost ₦`,required:!0,value:e.unit_cost_naira,onChange:e=>C(t,`unit_cost_naira`,e.target.value)}),(0,M.jsx)(`input`,{type:`number`,placeholder:`New Price ₦`,value:e.new_price_naira,onChange:e=>C(t,`new_price_naira`,e.target.value)})]},t))}),(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,style:{marginTop:`10px`},onClick:w,children:`+ Add Line Item`})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>h(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Create Purchase Order`})]})]})})]})}
12function gc(e){return`₦`+(Number(e)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}var _c={code:``,type:`percent`,value:``,min_subtotal_naira:``,max_uses:``};function vc(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(!1),[o,s]=(0,x.useState)(_c),[c,l]=(0,x.useState)(``),u=()=>{r(!0),uo().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{u()},[]);let d=async e=>{e.preventDefault(),l(``);try{await fo({code:o.code,type:o.type,value:o.type===`percent`?Number(o.value):Math.round(Number(o.value)*100),min_subtotal_kobo:o.min_subtotal_naira?Math.round(Number(o.min_subtotal_naira)*100):0,max_uses:o.max_uses?Number(o.max_uses):void 0}),s(_c),a(!1),u()}catch(e){l(e.message)}},f=async e=>{await po(e.id,{active:!e.active}),u()};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Discounts & Promo Codes`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{s(_c),l(``),a(!0)},children:`+ New Discount Code`})]}),(0,M.jsx)(V,{columns:[{key:`code`,label:`Discount Code`},{key:`type`,label:`Discount Value`,render:(e,t)=>e===`percent`?`${t.value}% off`:`${gc(t.value)} off`},{key:`min_subtotal_kobo`,label:`Min Spend`,render:e=>Number(e)>0?gc(e):`No Minimum`},{key:`used_count`,label:`Usage Count`,render:(e,t)=>`${e} used${t.max_uses?` (max ${t.max_uses})`:``}`},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Inactive`})}],data:e,loading:n,exportName:`discounts`,emptyMsg:`No discounts found.`,actions:e=>(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>f(e),children:e.active?`Deactivate`:`Activate`})}),(0,M.jsx)(U,{open:i,onClose:()=>a(!1),title:`Create Promo Code`,width:`480px`,children:(0,M.jsxs)(`form`,{onSubmit:d,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[c&&(0,M.jsx)(`p`,{className:`book-error`,children:c}),(0,M.jsx)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr`},children:(0,M.jsx)(`input`,{placeholder:`CODE (e.g. SAVE20)`,required:!0,value:o.code,onChange:e=>s({...o,code:e.target.value.toUpperCase()})})}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsxs)(`select`,{value:o.type,onChange:e=>s({...o,type:e.target.value}),children:[(0,M.jsx)(`option`,{value:`percent`,children:`Percentage Off (%)`}),(0,M.jsx)(`option`,{value:`fixed`,children:`Fixed Cash Off (₦)`})]}),(0,M.jsx)(`input`,{type:`number`,placeholder:o.type===`percent`?`Discount % (e.g. 15)`:`Discount Amount (₦)`,required:!0,value:o.value,onChange:e=>s({...o,value:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{type:`number`,placeholder:`Min Subtotal (₦) (optional)`,value:o.min_subtotal_naira,onChange:e=>s({...o,min_subtotal_naira:e.target.value})}),(0,M.jsx)(`input`,{type:`number`,placeholder:`Max Uses (optional)`,value:o.max_uses,onChange:e=>s({...o,max_uses:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:()=>a(!1),children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:`Create Discount`})]})]})})]})}function yc(e){return`₦`+(Number(e)/100).toLocaleString(`en-NG`,{maximumFractionDigits:0})}function bc(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{a(!0),Promise.all([sa().then(t),oa().then(r)]).catch(()=>{}).finally(()=>a(!1))},[]),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{className:`dash-card-title`,style:{marginBottom:`14px`},children:`Inventory Valuation Overview`}),e&&(0,M.jsxs)(`div`,{className:`kpi-row`,style:{marginBottom:`24px`},children:[(0,M.jsxs)(`div`,{className:`kpi-card`,children:[(0,M.jsx)(`div`,{className:`kpi-icon`,children:`💰`}),(0,M.jsxs)(`div`,{className:`kpi-body`,children:[(0,M.jsx)(`span`,{className:`kpi-value`,children:yc(e.totals.all)}),(0,M.jsx)(`span`,{className:`kpi-label`,children:`Total Stock Value`})]})]}),(0,M.jsxs)(`div`,{className:`kpi-card`,children:[(0,M.jsx)(`div`,{className:`kpi-icon`,children:`🛍️`}),(0,M.jsxs)(`div`,{className:`kpi-body`,children:[(0,M.jsx)(`span`,{className:`kpi-value`,children:yc(e.totals.retail||0)}),(0,M.jsx)(`span`,{className:`kpi-label`,children:`Retail Value`})]})]}),(0,M.jsxs)(`div`,{className:`kpi-card`,children:[(0,M.jsx)(`div`,{className:`kpi-icon`,children:`🧴`}),(0,M.jsxs)(`div`,{className:`kpi-body`,children:[(0,M.jsx)(`span`,{className:`kpi-value`,children:yc(e.totals.backbar||0)}),(0,M.jsx)(`span`,{className:`kpi-label`,children:`Back-bar Consumables`})]})]})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`32px`},children:[(0,M.jsx)(`h3`,{className:`dash-card-title`,style:{marginBottom:`14px`},children:`Stock Valuation Breakdown`}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Item Name`},{key:`sku`,label:`SKU`},{key:`kind`,label:`Type`,render:e=>(0,M.jsx)(`span`,{style:{textTransform:`capitalize`},children:e})},{key:`quantity`,label:`Inventory`,render:(e,t)=>`${Number(e)} ${t.unit}`},{key:`cost_kobo`,label:`Unit Cost`,render:e=>yc(e)},{key:`value_kobo`,label:`Total Value`,render:e=>(0,M.jsx)(`strong`,{style:{color:`var(--admin-accent)`},children:yc(e)})}],data:e?.items||[],loading:i,exportName:`inventory_valuation`,emptyMsg:`No valuation data available.`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`h3`,{className:`dash-card-title`,style:{marginBottom:`14px`},children:[`Low Stock Report (`,n.length,` Items)`]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Item Name`},{key:`sku`,label:`SKU`},{key:`quantity`,label:`Current Quantity`,render:(e,t)=>`${Number(e)} ${t.unit}`},{key:`reorder_level`,label:`Reorder Trigger`,render:(e,t)=>`${Number(e)} ${t.unit}`},{key:`status`,label:`Alert`,render:()=>(0,M.jsx)(H,{status:`inactive`,label:`LOW`})}],data:n,loading:i,exportName:`low_stock_report`,emptyMsg:`Everything is above its reorder level. ✓`})]})]})}function xc(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!0),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null),[u,d]=(0,x.useState)({name:``,email:``,password:``,role_id:``}),[f,p]=(0,x.useState)(``),m=()=>{a(!0),Promise.all([ga().then(t),ba().then(r)]).catch(()=>{}).finally(()=>a(!1))};(0,x.useEffect)(()=>{m()},[]);let h=()=>{d({name:``,email:``,password:``,role_id:``}),l(null),s(!1),p(``)},g=e=>{d({name:e.name,email:e.email,password:``,role_id:e.role_id||``}),l(e.id),p(``),s(!0)},_=async e=>{e.preventDefault(),p(``);try{if(c){let e={name:u.name,email:u.email,role_id:Number(u.role_id)};u.password&&(e.password=u.password),await va(c,e)}else await _a({...u,role_id:Number(u.role_id)});h(),m()}catch(e){p(e.message)}},v=async e=>{try{await va(e.id,{active:!e.active}),m()}catch(e){alert(e.message)}};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Admin Users & Staff Accounts`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{h(),s(!0)},children:`+ New Staff`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Full Name`},{key:`email`,label:`Email`},{key:`role_name`,label:`Role`,render:(e,t)=>e||t.role||`—`},{key:`last_login`,label:`Last Login`,render:e=>e?new Date(e).toLocaleDateString()+` `+new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):`Never`},{key:`active`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`inactive`,label:e?`Active`:`Suspended`})}],data:e,loading:i,exportName:`admin_users`,emptyMsg:`No admin users found.`,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>g(e),children:`Edit`}),(0,M.jsx)(`button`,{className:e.active?`btn-danger`:`btn-primary`,style:e.active?{}:{background:`var(--status-confirmed)`,color:`var(--admin-bg)`},onClick:()=>v(e),children:e.active?`Suspend`:`Activate`})]})}),(0,M.jsx)(U,{open:o,onClose:h,title:c?`Edit Staff Account`:`Create Staff Account`,width:`480px`,children:(0,M.jsxs)(`form`,{onSubmit:_,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[f&&(0,M.jsx)(`p`,{className:`book-error`,children:f}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,style:{gridTemplateColumns:`1fr`},children:[(0,M.jsx)(`input`,{placeholder:`Full Name`,required:!0,value:u.name,onChange:e=>d({...u,name:e.target.value})}),(0,M.jsx)(`input`,{type:`email`,placeholder:`Email Address`,required:!0,value:u.email,onChange:e=>d({...u,email:e.target.value})}),(0,M.jsx)(`input`,{type:`password`,placeholder:c?`New password (leave blank to keep)`:`Password (min 8 chars)`,minLength:c?0:8,required:!c,value:u.password,onChange:e=>d({...u,password:e.target.value})}),(0,M.jsxs)(`select`,{required:!0,value:u.role_id,onChange:e=>d({...u,role_id:e.target.value}),children:[(0,M.jsx)(`option`,{value:``,children:`Select system role...`}),n.map(e=>(0,M.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:h,children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:c?`Save Changes`:`Create User`})]})]})})]})}function Sc(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!0),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)(null),[m,h]=(0,x.useState)({name:``,description:``,permissions:[]}),[g,_]=(0,x.useState)(``),v=()=>{a(!0),Promise.all([ba().then(t),xa().then(r)]).catch(()=>{}).finally(()=>a(!1))};(0,x.useEffect)(()=>{v()},[]);let y=n.reduce((e,t)=>
12((e[t.group_name]=e[t.group_name]||[]).push(t),e),{}),b=()=>{h({name:``,description:``,permissions:[]}),d(null),s(!1),_(``)},S=e=>{h({name:e.name,description:e.description||``,permissions:e.permissions.map(e=>e.code)}),d(e.id),_(``),s(!0)},C=e=>{h(t=>({...t,permissions:t.permissions.includes(e)?t.permissions.filter(t=>t!==e):[...t.permissions,e]}))},w=e=>{let t=e.map(e=>e.code),n=t.every(e=>m.permissions.includes(e));h(e=>({...e,permissions:n?e.permissions.filter(e=>!t.includes(e)):[...new Set([...e.permissions,...t])]}))},T=async e=>{if(e.preventDefault(),_(``),m.permissions.length===0){_(`Select at least one permission.`);return}try{u?await Ca(u,{description:m.description,permissions:m.permissions}):await Sa(m),b(),v()}catch(e){_(e.message)}},ee=async e=>{if(confirm(`Delete role "${e.name}"? This cannot be undone.`))try{await wa(e.id),v()}catch(e){alert(e.message)}},te=e=>{p(e),l(!0)};return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`admin-section-header`,children:[(0,M.jsx)(`h2`,{children:`Roles & Permissions Management`}),(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>{b(),s(!0)},children:`+ New Role`})]}),(0,M.jsx)(V,{columns:[{key:`name`,label:`Role Name`,render:(e,t)=>(0,M.jsxs)(`span`,{style:{textTransform:`capitalize`,fontWeight:500},children:[e.replace(/_/g,` `),t.is_system?(0,M.jsx)(`span`,{style:{fontSize:`.75rem`,opacity:.5,fontWeight:400},children:` (system)`}):``]})},{key:`description`,label:`Description`,render:e=>e||`—`},{key:`permissions`,label:`Permissions`,render:e=>`${(e||[]).length} assigned`},{key:`user_count`,label:`Active Users`,render:e=>`${e||0} user${e===1?``:`s`}`}],data:e,loading:i,exportName:`admin_roles`,emptyMsg:`No roles found.`,actions:e=>(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,justifyContent:`flex-end`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>te(e),children:`View Perms`}),!(e.is_system&&e.name===`owner`)&&(0,M.jsx)(`button`,{className:`btn-outline`,onClick:()=>S(e),children:`Edit`}),!e.is_system&&(0,M.jsx)(`button`,{className:`btn-danger`,onClick:()=>ee(e),children:`Delete`})]})}),(0,M.jsx)(U,{open:o,onClose:b,title:u?`Edit Role Permissions: ${m.name}`:`Create Custom Role`,width:`760px`,children:(0,M.jsxs)(`form`,{onSubmit:T,style:{display:`flex`,flexDirection:`column`,gap:`14px`},children:[g&&(0,M.jsx)(`p`,{className:`book-error`,children:g}),(0,M.jsxs)(`div`,{className:`admin-form-grid`,children:[(0,M.jsx)(`input`,{placeholder:`Role key (e.g. front_desk)`,required:!0,value:m.name,disabled:!!u,pattern:`[a-z_]+`,title:`Only lowercase letters and underscores allowed`,onChange:e=>h({...m,name:e.target.value})}),(0,M.jsx)(`input`,{placeholder:`Short Description`,value:m.description,onChange:e=>h({...m,description:e.target.value})})]}),(0,M.jsxs)(`div`,{style:{marginTop:`10px`},children:[(0,M.jsx)(`label`,{style:{fontSize:`0.82rem`,color:`var(--admin-text-secondary)`,display:`block`,marginBottom:`8px`},children:`Assign Permissions`}),(0,M.jsx)(`div`,{className:`perm-catalogue`,style:{maxHeight:`320px`,overflowY:`auto`},children:Object.entries(y).map(([e,t])=>{let n=t.every(e=>m.permissions.includes(e.code)),r=t.some(e=>m.permissions.includes(e.code));return(0,M.jsxs)(`div`,{className:`perm-group`,style:{marginBottom:`14px`},children:[(0,M.jsxs)(`label`,{className:`perm-group-header`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:n,ref:e=>{e&&(e.indeterminate=r&&!n)},onChange:()=>w(t)}),(0,M.jsx)(`strong`,{children:e})]}),(0,M.jsx)(`div`,{className:`perm-items`,children:t.map(e=>(0,M.jsxs)(`label`,{className:`perm-item`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:m.permissions.includes(e.code),onChange:()=>C(e.code)}),e.label]},e.code))})]},e)})})]}),(0,M.jsxs)(`div`,{className:`modal-actions`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn-outline`,onClick:b,children:`Cancel`}),(0,M.jsx)(`button`,{className:`btn-primary`,type:`submit`,children:u?`Save Changes`:`Create Role`})]})]})}),(0,M.jsx)(U,{open:c,onClose:()=>l(!1),title:f?`Assigned Permissions: ${f.name.replace(/_/g,` `)}`:`Permissions`,width:`600px`,children:f&&(0,M.jsxs)(`div`,{className:`perm-expand`,style:{border:`none`,background:`transparent`,padding:0},children:[f.permissions.length===0?(0,M.jsx)(`p`,{className:`admin-empty`,style:{padding:`10px 0`},children:`No permissions assigned.`}):Object.entries(f.permissions.reduce((e,t)=>
12((e[t.group]=e[t.group]||[]).push(t.label),e),{})).map(([e,t])=>(0,M.jsxs)(`div`,{className:`perm-expand-group`,style:{marginBottom:`12px`},children:[(0,M.jsx)(`strong`,{style:{fontSize:`0.85rem`},children:e}),(0,M.jsx)(`div`,{style:{fontSize:`0.8rem`,color:`var(--admin-text-secondary)`,marginTop:`4px`,lineHeight:`1.5`},children:t.join(`, `)})]},e)),(0,M.jsx)(`div`,{className:`modal-actions`,children:(0,M.jsx)(`button`,{className:`btn-primary`,onClick:()=>l(!1),children:`Close`})})]})})]})}var Cc={email:`Email`,sms:`SMS`,payment:`Payments`},wc={email:`✉️`,sms:`💬`,payment:`💳`};function Tc(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)(`email`),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)({}),[u,d]=(0,x.useState)(!1),[f,p]=(0,x.useState)(!1),[m,h]=(0,x.useState)(null),[g,_]=(0,x.useState)(null),v=()=>{r(!0),R().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{v()},[]);let y=(t,n)=>{let r=e.definitions[t][n],i=e.saved?.[t]?.[n]||{},a={};for(let e of r.fields)a[e.key]=i[e.key]||``;l(a),s({category:t,provider:n,label:r.label,fields:r.fields}),h(null),_(null)},b=async()=>{d(!0),_(null);try{await _o(o.category,o.provider,c),_({type:`ok`,text:`Settings saved.`}),v()}catch(e){_({type:`err`,text:e.message})}finally{d(!1)}},S=async()=>{p(!0),h(null);try{let e=await yo(o.category,o.provider,c);h(e)}catch(e){h({ok:!1,message:e.message})}finally{p(!1)}},C=async(e,t)=>{if(confirm(`Clear all ${t} credentials? This cannot be undone.`))try{await bo(e,t),_({type:`ok`,text:`Credentials cleared.`}),s(null),v()}catch(e){_({type:`err`,text:e.message})}},w=async(e,t)=>{try{await vo(e,t),v()}catch{}};if(n||!e)return(0,M.jsx)(`p`,{className:`admin-empty`,children:`Loading provider settings…`});let T=e.preferred?.[i]||``;return(0,M.jsxs)(`div`,{className:`admin-providers`,children:[(0,M.jsx)(`div`,{className:`prov-tabs`,children:Object.keys(Cc).map(e=>(0,M.jsxs)(`button`,{className:`prov-tab ${i===e?`active`:``}`,onClick:()=>{a(e),s(null),_(null)},children:[(0,M.jsx)(`span`,{className:`prov-tab-icon`,children:wc[e]}),Cc[e]]},e))}),(0,M.jsx)(`div`,{className:`prov-status-grid`,children:e.status[i]?.map(e=>(0,M.jsxs)(`div`,{className:`prov-status-card ${e.enabled?`enabled`:`disabled`}`,children:[(0,M.jsxs)(`div`,{className:`prov-status-header`,children:[(0,M.jsx)(`span`,{className:`prov-status-dot`,"data-active":e.enabled}),(0,M.jsx)(`strong`,{children:e.label}),e.isPrimary&&(0,M.jsx)(`span`,{className:`prov-badge-primary`,children:`Primary`})]}),(0,M.jsx)(`div`,{className:`prov-status-state`,children:e.enabled?`Connected`:`Not configured`}),(0,M.jsxs)(`div`,{className:`prov-status-actions`,children:[(0,M.jsx)(`button`,{className:`btn-outline prov-btn-sm`,onClick:()=>y(i,e.name),children:`Configure`}),e.enabled&&!e.isPrimary&&(0,M.jsx)(`button`,{className:`btn-outline prov-btn-sm prov-btn-primary`,onClick:()=>w(i,e.name),children:`Set as primary`})]})]},e.name))}),(0,M.jsxs)(`div`,{className:`prov-preferred`,children:[(0,M.jsxs)(`label`,{children:[(0,M.jsxs)(`span`,{className:`prov-preferred-label`,children:[`Primary `,Cc[i],` Provider`]}),(0,M.jsxs)(`select`,{value:T,onChange:e=>w(i,e.target.value),children:[(0,M.jsx)(`option`,{value:``,children:`Auto-select first enabled`}),e.status[i]?.map(e=>(0,M.jsx)(`option`,{value:e.name,children:e.label},e.name))]})]}),(0,M.jsx)(`span`,{className:`prov-preferred-hint`,children:`If the primary fails, enabled providers are tried in order as fallback.`})]}),o&&(0,M.jsxs)(`div`,{className:`prov-edit-panel`,children:[(0,M.jsxs)(`div`,{className:`prov-edit-header`,children:[(0,M.jsxs)(`h3`,{children:[`Configure `,o.label]}),(0,M.jsx)(`button`,{className:`prov-close`,onClick:()=>s(null),children:`✕`})]}),(0,M.jsx)(`div`,{className:`prov-edit-fields`,children:o.fields.map(e=>(0,M.jsxs)(`label`,{className:`prov-field`,children:[(0,M.jsxs)(`span`,{className:`prov-field-label`,children:[e.label,e.secret&&(0,M.jsx)(`span`,{className:`prov-field-secret`,children:`encrypted`})]}),e.type===`boolean`?(0,M.jsxs)(`select`,{value:c[e.key]||`false`,onChange:t=>l({...c,[e.key]:t.target.value}),children:[(0,M.jsx)(`option`,{value:`false`,children:`No`}),(0,M.jsx)(`option`,{value:`true`,children:`Yes`})]}):(0,M.jsx)(`input`,{type:e.secret?`password`:e.type===`number`?`number`:`text`,value:c[e.key]||``,placeholder:e.secret?`••••••••`:``,onChange:t=>l({...c,[e.key]:t.target.value}),autoComplete:`off`})]},e.key))}),m&&(0,M.jsxs)(`div`,{className:`prov-test-result ${m.ok?`ok`:`fail`}`,children:[m.ok?`✓`:`✗`,` `,m.message]}),g&&(0,M.jsx)(`div`,{className:`prov-test-result ${g.type===`ok`?`ok`:`fail`}`,children:g.text}),(0,M.jsxs)(`div`,{className:`prov-edit-actions`,children:[(0,M.jsx)(`button`,{className:`btn-primary`,onClick:b,disabled:u,children:u?`Saving…`:`Save`}),(0,M.jsx)(`button`,{className:`btn-outline`,onClick:S,disabled:f,children:f?`Testing…`:`Test Connection`}),(0,M.jsx)(`button`,{className:`btn-outline prov-btn-danger`,onClick:()=>
12C(o.category,o.provider),children:`Clear Credentials`})]})]})]})}function Ec(){let[e,t]=(0,x.useState)([]),[n,r]=(0,x.useState)(!0),[i,a]=(0,x.useState)({name:``,type:``}),[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(!1),u=()=>{r(!0),mo().then(t).catch(()=>{}).finally(()=>r(!1))};(0,x.useEffect)(()=>{u()},[]);let d=async e=>{if(e.preventDefault(),!(!i.name.trim()||!i.type.trim())){l(!0),s(null);try{await ho({name:i.name.trim(),type:i.type.trim()}),a({name:``,type:``}),s({type:`ok`,text:`Resource added.`}),u()}catch(e){s({type:`err`,text:e.message})}finally{l(!1)}}},f=async e=>{await go(e.id,{active:!e.active}).catch(()=>{}),u()},p=async e=>{confirm(`Delete "${e.name}"? If it has bookings it will be deactivated instead.`)&&(await L(e.id).catch(()=>{}),u())},m={};for(let t of e)(m[t.type]=m[t.type]||[]).push(t);return(0,M.jsxs)(`div`,{className:`admin-resources`,style:{maxWidth:820},children:[(0,M.jsxs)(`p`,{style:{color:`var(--admin-text-tertiary)`,marginTop:0},children:[`Rooms, chairs and machines the booking engine schedules against. Add several of the same`,(0,M.jsx)(`em`,{children:` type`}),` to model capacity (e.g. three `,(0,M.jsx)(`code`,{children:`chair`}),` rows = 3 chairs). Attach a required type to a service, package or consultation from its editor.`]}),(0,M.jsxs)(`form`,{onSubmit:d,style:{display:`flex`,gap:10,flexWrap:`wrap`,alignItems:`flex-end`,margin:`18px 0 26px`},children:[(0,M.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:4,flex:`1 1 220px`},children:[(0,M.jsx)(`span`,{style:{fontSize:`.78rem`,fontWeight:500}
12,children:`Name`}),(0,M.jsx)(`input`,{value:i.name,placeholder:`e.g. Treatment Room 1`,onChange:e=>a({...i,name:e.target.value}),style:Dc})]}),(0,M.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:4,flex:`1 1 180px`},children:[(0,M.jsx)(`span`,{style:{fontSize:`.78rem`,fontWeight:500},children:`Type`}),(0,M.jsx)(`input`,{value:i.type,placeholder:`e.g. room, chair, laser`,onChange:e=>a({...i,type:e.target.value}),style:Dc})]}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:c,children:c?`Adding…`:`Add resource`})]}),o&&(0,M.jsx)(`p`,{className:o.type===`ok`?`admin-ok`:`book-error`,style:{marginBottom:16},children:o.text}),n?(0,M.jsx)(`p`,{className:`admin-empty`,children:`Loading resources…`}):e.length===0?(0,M.jsx)(`p`,{className:`admin-empty`,children:`No resources yet. Add one above.`}):Object.entries(m).map(([e,t])=>(0,M.jsxs)(`div`,{style:{marginBottom:22},children:[(0,M.jsxs)(`h3`,{style:{fontSize:`.95rem`,margin:`0 0 8px`},children:[e,` `,(0,M.jsxs)(`span`,{style:{color:`var(--admin-text-tertiary)`,fontWeight:400},children:[`· capacity `,t.filter(e=>e.active).length]})]}),(0,M.jsx)(`table`,{style:{width:`100%`,borderCollapse:`collapse`},children:(0,M.jsx)(`tbody`,{children:t.map(e=>(0,M.jsxs)(`tr`,{style:{borderTop:`1px solid var(--admin-border)`},children:[(0,M.jsx)(`td`,{style:{padding:`10px 8px`},children:e.name}),(0,M.jsx)(`td`,{style:{padding:`10px 8px`,color:e.active?`var(--ok, #2ea043)`:`var(--admin-text-tertiary)`},children:e.active?`Active`:`Inactive`}),(0,M.jsxs)(`td`,{style:{padding:`10px 8px`,textAlign:`right`,whiteSpace:`nowrap`},children:[(0,M.jsx)(`button`,{className:`btn-outline`,style:Oc,onClick:()=>f(e),children:e.active?`Deactivate`:`Activate`}),(0,M.jsx)(`button`,{className:`btn-outline`,style:{...Oc,marginLeft:8,color:`#a3432f`,borderColor:`rgba(163,67,47,.3)`},onClick:()=>p(e),children:`Delete`})]})]},e.id))})})]},e))]})}var Dc={padding:`9px 12px`,border:`1px solid var(--admin-border)`,borderRadius:4,background:`var(--admin-bg)`,color:`inherit`,fontSize:`.9rem`},Oc={fontSize:`.72rem`,padding:`5px 10px`},kc=[`pending`,`confirmed`,`completed`,`no_show`,`cancelled`],Ac=[`new`,`contacted`,`closed`];function jc(){let[e,t]=(0,x.useState)(!!pi.getAdmin()),[n,r]=(0,x.useState)({email:``,password:``}),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(`dashboard`),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)([]),[m,h]=(0,x.useState)([]),[g,_]=(0,x.useState)([]),[v,y]=(0,x.useState)([]),[b,S]=(0,x.useState)(``),[C,w]=(0,x.useState)(``),T=()=>{ya().then(y).catch(e=>{(e.status===401||e.status===403)&&te()}),Bi().then(d).catch(()=>{}),Vi().then(p).catch(()=>{}),Ui().then(h).catch(()=>{}),Gi().then(_).catch(()=>{})};(0,x.useEffect)(()=>{if(e){let e=pi.getAdmin();if(e)try{let t=JSON.parse(atob(e.split(`.`)[1]));S(t.name||``),w(t.role||``)}catch{te();return}T()}},[e]);let ee=async e=>{e.preventDefault(),a(``),s(!0);try{let e=await Pi(n);pi.setAdmin(e.token),e.permissions&&y(e.permissions),e.user&&(S(e.user.name||``),w(e.user.role||``)),t(!0)}catch(e){a(e.message)}finally{s(!1)}},te=()=>{pi.clearAdmin(),t(!1),y([]),l(`dashboard`)};if(!e)return(0,M.jsxs)(`main`,{className:`admin-page`,children:[(0,M.jsx)(B,{title:`Staff Portal`,path:`/admin`}),(0,M.jsxs)(`div`,{className:`admin-login`,children:[(0,M.jsx)(`h1`,{children:`Staff Portal`}),(0,M.jsx)(`p`,{className:`admin-login-subtitle`,children:`OptimalBeauty & Spa`}),i&&(0,M.jsx)(`p`,{className:`book-error`,role:`alert`,children:i}),(0,M.jsxs)(`form`,{onSubmit:ee,children:[(0,M.jsxs)(`div`,{className:`login-field`,children:[(0,M.jsx)(`span`,{className:`field-icon`,children:`✉`}),(0,M.jsx)(`input`,{type:`email`,placeholder:`Email address`,required:!0,value:n.email,onChange:e=>r({...n,email:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`login-field`,children:[(0,M.jsx)(`span`,{className:`field-icon`,children:`🔒`}),(0,M.jsx)(`input`,{type:`password`,placeholder:`Password`,required:!0,value:n.password,onChange:e=>r({...n,password:e.target.value})})]}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:o,children:o?`Signing in…`:`Sign in`})]})]})]});let E=async(e,t)=>{await Hi(e,t),T()},ne=async(e,t)=>{await Wi(e,t),T()},D=async(e,t)=>{await Ki(e,t),T()},re=[{key:`service_name`,label:`Service`},{key:`customer_name`,label:`Customer`},{key:`customer_phone`,label:`Phone`,sortable:!1},{key:`staff_name`,label:`Staff`,render:e=>e||`—`},{key:`starts_at`,label:`Date`,render:e=>e?new Date(e).toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`}):`—`},{key:`status`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e})},{key:`payment_status`,label:`Payment`,render:e=>(0,M.jsx)(H,{status:e})}],ie=[{key:`name`,label:`Name`},{key:`phone`,label:`Phone`,sortable:!1},{key:`email`,label:`Email`},{key:`service`,label:`Service`,render:e=>e||`—`},{key:`message`,label:`Message`,render:e=>e?e.length>60?e.slice(0,60)+`…`:e:`—`},{key:`status`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e})}],ae=[{key:`author_name`,label:`Author`},{key:`rating`,label:`Rating`,render:e=>`★`.repeat(e||0)+`☆`.repeat(5-(e||0))},{key:`body`,label:`Review`,render:e=>e?e.length>80?e.slice(0,80)+`…`:e:`—`},{key:`approved`,label:`Status`,render:e=>(0,M.jsx)(H,{status:e?`active`:`pending`,label:e?`Published`:`Pending`})}];return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(B,{title:`Staff Portal`,path:`/admin`}),(0,M.jsx)(fs,{view:c,onNavigate:l,permissions:v,userName:b,userRole:C,onSignOut:te,children:(()=>{switch(c){case`dashboard`:return(0,M.jsx)(_s,{summary:u,bookings:f,enquiries:m,onNavigate:l});case`bookings`:return(0,M.jsx)(V,{columns:re,data:f,exportName:`bookings`,emptyMsg:`No bookings yet.`,actions:e=>(0,M.jsx)(`select`,{className:`dt-inline-select`,value:e.status,onClick:e=>e.stopPropagation(),onChange:t=>E(e.id,t.target.value),children:kc.map(e=>(0,M.jsx)(`option`,{value:e,children:e.replace(/_/g,` `)},e))})});case`cms`:return(0,M.jsx)(ys,{});case`services`:return(0,M.jsx)(ec,{});case`packages`:return(0,M.jsx)(rc,{});case`orders`:return(0,M.jsx)(oc,{});case`products`:return(0,M.jsx)(lc,{});case`inventory`:return(0,M.jsx)(pc,{});case`purchasing`:return(0,M.jsx)(hc,{});case`discounts`:return(0,M.jsx)(vc,{});case`reports`:return(0,M.jsx)(bc,{});case`finance`:return(0,M.jsx)(Fs,{});case`customers`:return(0,M.jsx)(Ys,{});case`suppliers`:return(0,M.jsx)(Zs,{});case`users`:return(0,M.jsx)(xc,{});case`roles`:return(0,M.jsx)(Sc,{});case`providers`:return(0,M.jsx)(Tc,{});case`resources`:return(0,M.jsx)(Ec,{});case`enquiries`:return(0,M.jsx)(V,{columns:ie,data:m,exportName:`enquiries`,emptyMsg:`No enquiries yet.`,actions:e=>(0,M.jsx)(`select`,{className:`dt-inline-select`,value:e.status,onClick:e=>e.stopPropagation(),onChange:t=>ne(e.id,t.target.value),children:Ac.map(e=>(0,M.jsx)(`option`,{value:e,children:e},e))})});case`reviews`:return(0,M.jsx)(V,{columns:ae,data:g,exportName:`reviews`,emptyMsg:`No reviews yet.`,actions:e=>(0,M.jsx)(`button`,{className:e.approved?`btn-outline`:`btn-primary`,onClick:()=>D(e.id,!e.approved),children:e.approved?`Unpublish`:`Approve`})});default:return(0,M.jsx)(`p`,{className:`admin-empty`,children:`Select a section from the sidebar.`})}})()})]})}function Mc(){let{currencyCode:e}=z(),{data:t,loading:n,error:r}=Lo(()=>qi(void 0,e),[e]),[i,a]=(0,x.useState)(`All`),o=(0,x.useMemo)(()=>[`All`,...new Set((t||[]).map(e=>e.category))],[t]),s=(t||[]).filter(e=>i===`All`||e.category===i);return(0,M.jsxs)(`main`,{className:`shop-page`,children:[(0,M.jsx)(B,{title:`Shop`,path:`/shop`,description:`Shop premium skincare and body care from OptimalBeauty & Spa, Lagos. Delivery or in-store pickup.`}),(0,M.jsxs)(`div`,{className:`shop-inner`,children:[(0,M.jsxs)(`h1`,{className:`shop-title`,children:[`The `,(0,M.jsx)(`em`,{children:`Shop`})]}),(0,M.jsx)(`p`,{className:`shop-sub`,children:`Premium products our therapists trust — delivered or ready for pickup.`}),r&&(0,M.jsx)(`p`,{className:`section-error`,role:`alert`,children:`The shop is unavailable right now.`}),!n&&t&&(0,M.jsx)(`div`,{className:`shop-filters`,children:o.map(e=>(0,M.jsx)(`button`,{className:e===i?`active`:``,onClick:()=>a(e),children:e},e))}),(0,M.jsx)(`div`,{className:`product-grid`,children:n?Array.from({length:8}).map((e,t)=>(0,M.jsxs)(`div`,{className:`product-card`,children:[(0,M.jsx)(`div`,{className:`product-thumb`,children:`✦`}),(0,M.jsx)(`div`,{className:`product-body`,children:(0,M.jsx)(`span`,{className:`product-name`,children:`Loading…`})})]},t)):s.map(e=>(0,M.jsxs)(j,{className:`product-card`,to:`/shop/${e.slug}`,children:[(0,M.jsx)(`div`,{className:`product-thumb`,children:e.image_url?(0,M.jsx)(`img`,{src:e.image_url,alt:e.name}):`✦`}),(0,M.jsxs)(`div`,{className:`product-body`,children:[(0,M.jsx)(`span`,{className:`product-cat`,children:e.category}),(0,M.jsx)(`span`,{className:`product-name`,children:e.name}),e.from_price?(0,M.jsxs)(`span`,{className:`product-price`,children:[`From `,e.from_price]}):(0,M.jsx)(`span`,{className:`product-oos`,children:`Unavailable`})]})]},e.id))})]})]})}function Nc(){let{slug:e}=vt(),t=gt(),{add:n}=li(),{currencyCode:r}=z(),[i,a]=(0,x.useState)(null),[o,s]=(0,x.useState)(``),[c,l]=(0,x.useState)(null),[u,d]=(0,x.useState)(1),[f,p]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{Ji(e,r).then(e=>{a(e),l(e.variants.find(e=>e.in_stock)||e.variants[0]||null)}
12).catch(e=>s(e.message))},[e,r]),o)return(0,M.jsx)(`main`,{className:`shop-page`,children:(0,M.jsxs)(`div`,{className:`shop-inner`,children:[(0,M.jsx)(`p`,{className:`section-error`,role:`alert`,children:o}),(0,M.jsx)(`p`,{style:{textAlign:`center`},children:(0,M.jsx)(j,{to:`/shop`,children:`← Back to shop`})})]})});if(!i)return(0,M.jsx)(`main`,{className:`shop-page`,children:(0,M.jsx)(`div`,{className:`shop-inner`,children:(0,M.jsx)(`p`,{children:`Loading…`})})});let m=()=>{c&&(n({variantId:c.id,productName:i.name,label:c.label,sku:c.sku,priceKobo:c.price_minor,currency:c.currency,image:i.image_url||null},u),p(!0),setTimeout(()=>p(!1),2500))};return(0,M.jsxs)(`main`,{className:`shop-page`,children:[(0,M.jsx)(B,{title:i.name,path:`/shop/${i.slug}`,description:i.description}),(0,M.jsxs)(`div`,{className:`shop-inner`,children:[(0,M.jsx)(`p`,{style:{marginBottom:18},children:(0,M.jsx)(j,{to:`/shop`,children:`← Back to shop`})}),(0,M.jsxs)(`div`,{className:`pd-grid`,children:[(0,M.jsx)(`div`,{className:`pd-image`,children:i.image_url?(0,M.jsx)(`img`,{src:i.image_url,alt:i.name}):`✦`}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,M.jsx)(`span`,{className:`product-cat`,children:i.category}),(0,M.jsx)(Uo,{className:`social-share--detail`,title:i.name,text:`${i.name} — ${i.description||`Shop at OptimalBeauty & Spa`}`,url:`/shop/${i.slug}`})]}),(0,M.jsx)(`h1`,{className:`pd-name`,children:i.name}),i.description&&(0,M.jsx)(`p`,{className:`pd-desc`,children:i.description}),i.variants.length>1&&(0,M.jsx)(`div`,{className:`pd-variants`,children:i.variants.map(e=>(0,M.jsxs)(`button`,{className:`pd-variant ${c?.id===e.id?`selected`:``}`,disabled:!e.in_stock,onClick:()=>l(e),children:[e.label,(0,M.jsx)(`br`,{}),(0,M.jsxs)(`small`,{children:[e.price_display,e.in_stock?``:` · out of stock`]})]},e.id))}),(0,M.jsx)(`div`,{className:`pd-price`,children:c?c.price_display:`—`}),c&&c.in_stock?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`pd-qty`,children:[(0,M.jsx)(`button`,{onClick:()=>d(e=>Math.max(1,e-1)),"aria-label":`Decrease quantity`,children:`−`}),(0,M.jsx)(`span`,{children:u}),(0,M.jsx)(`button`,{onClick:()=>d(e=>Math.min(c.stock,e+1)),"aria-label":`Increase quantity`,children:`+`}),(0,M.jsxs)(`small`,{style:{color:`var(--muted)`},children:[c.stock,` in stock`]})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:12,flexWrap:`wrap`},children:[(0,M.jsx)(`button`,{className:`btn-primary`,onClick:m,children:`Add to cart`}),(0,M.jsx)(`button`,{className:`btn-outline-dark`,onClick:()=>{m(),t(`/cart`)},children:`Buy now`})]}),(0,M.jsx)(`div`,{"aria-live":`polite`,children:f&&(0,M.jsx)(`p`,{style:{color:`#1e7a34`,marginTop:12},children:`Added to cart ✓`})})]}):(0,M.jsx)(`p`,{className:`product-oos`,children:`Currently out of stock.`})]})]})]})]})}function Pc(){let{items:e,setQty:t,remove:n,subtotalKobo:r,count:i}=li(),{money:a}=z(),o=a,s=gt();return(0,M.jsxs)(`main`,{className:`cart-page`,children:[(0,M.jsx)(B,{title:`Cart`,path:`/cart`}),(0,M.jsxs)(`div`,{className:`cart-inner`,children:[(0,M.jsxs)(`h1`,{className:`shop-title`,children:[`Your `,(0,M.jsx)(`em`,{children:`Cart`})]}),i===0?(0,M.jsxs)(`div`,{className:`cart-empty`,children:[(0,M.jsx)(`p`,{children:`Your cart is empty.`}),(0,M.jsx)(j,{to:`/shop`,className:`btn-primary`,style:{marginTop:16},children:`Browse the shop`})]}):(0,M.jsxs)(M.Fragment,{children:[e.map(e=>(0,M.jsxs)(`div`,{className:`cart-line`,children:[(0,M.jsx)(`div`,{className:`product-thumb`,style:{width:60,height:60,fontSize:`1.2rem`,borderRadius:4},children:e.image?(0,M.jsx)(`img`,{src:e.image,alt:``}):`✦`}),(0,M.jsxs)(`div`,{className:`cl-main`,children:[(0,M.jsx)(`div`,{className:`cl-name`,children:e.productName}),(0,M.jsxs)(`div`,{className:`cl-label`,children:[e.label,` · `,o(e.priceKobo)]})]}),(0,M.jsxs)(`div`,{className:`cl-qty`,children:[(0,M.jsx)(`button`,{onClick:()=>t(e.variantId,e.quantity-1),"aria-label":`Decrease`,children:`−`}),(0,M.jsx)(`span`,{children:e.quantity}),(0,M.jsx)(`button`,{onClick:()=>t(e.variantId,e.quantity+1),"aria-label":`Increase`,children:`+`})]}),(0,M.jsx)(`div`,{style:{width:90,textAlign:`right`},children:o(e.priceKobo*e.quantity)}),(0,M.jsx)(`button`,{className:`cl-remove`,onClick:()=>n(e.variantId),children:`Remove`})]},e.variantId)),(0,M.jsxs)(`div`,{className:`cart-summary`,children:[(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Subtotal`}),(0,M.jsx)(`span`,{children:o(r)})]}),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Delivery`}),(0,M.jsx)(`span`,{children:`Calculated at checkout`})]}),(0,M.jsxs)(`div`,{className:`cs-row total`,children:[(0,M.jsx)(`span`,{children:`Total`}),(0,M.jsx)(`span`,{children:o(r)})]}),(0,M.jsx)(`button`,{className:`btn-primary`,style:{width:`100%`,marginTop:16},onClick:()=>s(`/checkout`),children:`Proceed to checkout`})]})]})]})]})}function Fc(){let{items:e,subtotalKobo:t,clear:n,count:r}=li(),{money:i,regionCode:a,currencyCode:o}=z(),s=i,c=gt(),[l,u]=(0,x.useState)(`pickup`),[d,f]=(0,x.useState)({name:``,email:``,phone:``,address:``,notes:``,company:``}),[p,m]=(0,x.useState)(!1),[h,g]=(0,x.useState)(``),[_,v]=(0,x.useState)(``),[y,b]=(0,x.useState)(null),[S,C]=(0,x.useState)(``),w=e=>f({...d,[e.target.name]:e.target.value});return r===0?(0,M.jsx)(`main`,{className:`cart-page`,children:(0,M.jsx)(`div`,{className:`cart-inner`,children:(0,M.jsxs)(`div`,{className:`cart-empty`,children:[(0,M.jsx)(`p`,{children:`Your cart is empty.`}),(0,M.jsx)(j,{to:`/shop`,className:`btn-primary`,style:{marginTop:16},children:`Browse the shop`})]})})}):(0,M.jsxs)(`main`,{className:`cart-page`,children:[(0,M.jsx)(B,{title:`Checkout`,path:`/checkout`}),(0,M.jsxs)(`div`,{className:`cart-inner`,children:[(0,M.jsxs)(`h1`,{className:`shop-title`,children:[`Check`,(0,M.jsx)(`em`,{children:`out`})]}),h&&(0,M.jsx)(`p`,{className:`book-error`,role:`alert`,children:h}),(0,M.jsxs)(`div`,{className:`checkout-grid`,children:[(0,M.jsxs)(`form`,{className:`checkout-form`,onSubmit:async t=>{t.preventDefault(),m(!0),g(``);try{let t=await Yi({items:e.map(e=>({variantId:e.variantId,quantity:e.quantity})),fulfilment:l,address:l===`delivery`?d.address:void 0,notes:d.notes,company:d.company,discountCode:y?y.code:void 0,regionCode:a,currency:o,customer:{name:d.name,email:d.email,phone:d.phone}});n(),t.payment&&t.payment.authorizationUrl?window.location.href=t.payment.authorizationUrl:c(`/order/confirm?ref=${t.reference}`)}catch(e){g(e.message),m(!1)}},children:[(0,M.jsxs)(`div`,{className:`fulfil-toggle`,children:[(0,M.jsxs)(`label`,{className:l===`pickup`?`active`:``,children:[(0,M.jsx)(`input`,{type:`radio`,name:`fulfilment`,checked:l===`pickup`,onChange:()=>u(`pickup`)}),`In-store pickup`]}),(0,M.jsxs)(`label`,{className:l===`delivery`?`active`:``,children:[(0,M.jsx)(`input`,{type:`radio`,name:`fulfilment`,checked:l===`delivery`,onChange:()=>u(`delivery`)}),`Delivery`]})]}),(0,M.jsx)(`input`,{name:`name`,placeholder:`Full name`,value:d.name,onChange:w,required:!0}),(0,M.jsx)(`input`,{name:`email`,type:`email`,placeholder:`Email`,value:d.email,onChange:w,required:!0}),(0,M.jsx)(`input`,{name:`phone`,type:`tel`,placeholder:`Phone`,value:d.phone,onChange:w,required:!0}),l===`delivery`&&(0,M.jsx)(`textarea`,{name:`address`,placeholder:`Delivery address`,rows:3,value:d.address,onChange:w,required:!0}),(0,M.jsx)(`textarea`,{name:`notes`,placeholder:`Order notes (optional)`,rows:2,value:d.notes,onChange:w}),(0,M.jsx)(`input`,{className:`hp-field`,tabIndex:-1,autoComplete:`off`,"aria-hidden":`true`,name:`company`,value:d.company,onChange:w}),(0,M.jsx)(`button`,{className:`btn-primary`,disabled:p,children:p?`Placing order…`:`Place order`})]}),(0,M.jsxs)(`div`,{className:`cart-summary`,children:[e.map(e=>(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsxs)(`span`,{children:[e.productName,` (`,e.label,`) ×`,e.quantity]}),(0,M.jsx)(`span`,{children:s(e.priceKobo*e.quantity)})]},e.variantId)),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Subtotal`}),(0,M.jsx)(`span`,{children:s(t)})]}),y&&(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsxs)(`span`,{children:[`Discount (`,y.code,`)`]}),(0,M.jsxs)(`span`,{children:[`−`,s(y.discountKobo)]})]}),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Delivery`}),(0,M.jsx)(`span`,{children:l===`delivery`?`Added after order`:`Free (pickup)`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:12},children:[(0,M.jsx)(`input`,{placeholder:`Discount code`,value:_,onCh
12ange:e=>v(e.target.value.toUpperCase()),style:{flex:1,padding:`10px 12px`,border:`1px solid var(--divider)`,borderRadius:2}}),(0,M.jsx)(`button`,{type:`button`,className:`btn-outline-dark`,onClick:async()=>{if(_.trim()){C(``);try{let e=await na(_.trim(),t);e.valid?(b({code:e.code,discountKobo:e.discountKobo}),C(`Code applied: −${s(e.discountKobo)}`)):(b(null),C(e.message||`Code not valid.`))}catch(e){b(null),C(e.message)}}},children:`Apply`})]}),(0,M.jsx)(`div`,{"aria-live":`polite`,children:S&&(0,M.jsx)(`p`,{style:{fontSize:`0.8rem`,marginTop:6,color:y?`#1e7a34`:`#a3432f`},children:S})}),(0,M.jsx)(`p`,{style:{fontSize:`0.78rem`,color:`var(--muted)`,marginTop:8},children:`Delivery fee (if any) is confirmed on the order and payment screen.`})]})]})]})]})}function Ic(e){return t=>{try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:e||`NGN`}).format(Number(t)/100)}catch{return(Number(t)/100).toLocaleString()}}}function G(){let[e]=Un(),t=e.get(`ref`),[n,r]=(0,x.useState)(null),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(!0),c=Ic(n?.currency_code);return(0,x.useEffect)(()=>{if(!t){a(`No order reference provided.`),s(!1);return}Di(t).catch(()=>{}).finally(()=>{Xi(t).then(r).catch(e=>a(e.message)).finally(()=>s(!1))})},[t]),(0,M.jsxs)(`main`,{className:`order-page`,children:[(0,M.jsx)(B,{title:`Order Confirmation`,path:`/order/confirm`}),(0,M.jsx)(`div`,{className:`cart-inner`,children:(0,M.jsxs)(`div`,{className:`cart-summary`,style:{textAlign:`center`},children:[o&&(0,M.jsx)(`p`,{children:`Loading your order…`}),i&&(0,M.jsx)(`p`,{className:`book-error`,role:`alert`,children:i}),n&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{style:{fontSize:`2.4rem`,color:`var(--champagne)`},children:`✦`}),(0,M.jsxs)(`h1`,{className:`shop-title`,children:[`Order `,(0,M.jsx)(`em`,{children:`received`})]}),(0,M.jsxs)(`p`,{style:{color:`var(--muted)`,marginBottom:18},children:[`A confirmation was sent to `,n.customer_email,`.`]}),(0,M.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Reference`}),(0,M.jsx)(`strong`,{children:n.reference})]}),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Status`}),(0,M.jsx)(`strong`,{children:n.status})]}),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Payment`}),(0,M.jsx)(`strong`,{children:n.payment_status})]}),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Fulfilment`}),(0,M.jsx)(`strong`,{children:n.fulfilment})]}),n.items?.map(e=>(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsxs)(`span`,{children:[e.product_name,` (`,e.variant_label,`) ×`,e.quantity]}),(0,M.jsx)(`span`,{children:c(e.line_total_kobo)})]},e.id)),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Subtotal`}),(0,M.jsx)(`span`,{children:c(n.subtotal_kobo)})]}),n.discount_kobo>0&&(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsxs)(`span`,{children:[`Discount`,n.discount_code?` (${n.discount_code})`:``]}),(0,M.jsxs)(`span`,{children:[`−`,c(n.discount_kobo)]})]}),(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:`Delivery`}),(0,M.jsx)(`span`,{children:c(n.delivery_fee_kobo)})]}),n.tax_minor>0&&(0,M.jsxs)(`div`,{className:`cs-row`,children:[(0,M.jsx)(`span`,{children:n.tax_label||`Tax`}),(0,M.jsx)(`span`,{children:c(n.tax_minor)})]}),(0,M.jsxs)(`div`,{className:`cs-row total`,children:[(0,M.jsx)(`span`,{children:`Total`}),(0,M.jsx)(`span`,{children:c(n.total_kobo)})]})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`center`,marginTop:20},children:[(0,M.jsx)(j,{to:`/shop`,className:`btn-outline-dark`,children:`Continue shopping`}),(0,M.jsx)(j,{to:`/`,className:`btn-primary`,children:`Home`})]})]})]})})]})}function Lc(){let{pathname:e}=pt(),t=e===`/admin`;return(0,M.jsxs)(M.Fragment,{children:[!t&&(0,M.jsx)(`a`,{href:`#main`,className:`skip-link`,children:`Skip to content`}),!t&&(0,M.jsx)(Ao,{}),(0,M.jsx)(`div`,{id:`main`,children:(0,M.jsxs)(Wt,{children:[(0,M.jsx)(Ht,{path:`/`,element:(0,M.jsx)(ns,{})}),(0,M.jsx)(Ht,{path:`/book`,element:(0,M.jsx)(as,{})}),(0,M.jsx)(Ht,{path:`/booking/confirm`,element:(0,M.jsx)(cs,{})}),(0,M.jsx)(Ht,{path:`/shop`,element:(0,M.jsx)(Mc,{})}),(0,M.jsx)(Ht,{path:`/shop/:slug`,element:(0,M.jsx)(Nc,{})}),(0,M.jsx)(Ht,{path:`/cart`,element:(0,M.jsx)(Pc,{})}),(0,M.jsx)(Ht,{path:`/checkout`,element:(0,M.jsx)(Fc,{})}),(0,M.jsx)(Ht,{path:`/order/confirm`,element:(0,M.jsx)(G,{})}),(0,M.jsx)(Ht,{path:`/account`,element:(0,M.jsx)(us,{})}),(0,M.jsx)(Ht,{path:`/admin`,element:(0,M.jsx)(jc,{})}),(0,M.jsx)(Ht,{path:`*`,element:(0,M.jsx)(ns,{})})]})}),!t&&(0,M.jsx)(Mo,{})]})}(0,rr.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(x.StrictMode,{children:(0,M.jsx)(Ur,{children:(0,M.jsx)(Pn,{children:(0,M.jsx)(Eo,{children:(0,M.jsx)(wo,{children:(0,M.jsx)(ci,{children:(0,M.jsx)(Lc,{})})})})})})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.