vendor: 4,252 bytes, line 1
1function WT(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(a,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=n(o);fetch(o.href,c)}})();function QT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},lc={};var A1;function ZT(){if(A1)return lc;A1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:d,ref:o!==void 0?o:null,props:c}}return lc.Fragment=t,lc.jsx=n,lc.jsxs=n,lc}var _1;function XT(){return _1||(_1=1,Np.exports=ZT()),Np.exports}var i=XT(),Cp={exports:{}},cc={},Sp={exports:{}},Ep={};var k1;function JT(){return k1||(k1=1,(function(e){function t(L,J){var ee=L.length;L.push(J);e:for(;0<ee;){var te=ee-1>>>1,O=L[te];if(0<o(O,J))L[te]=J,L[ee]=O,ee=te;else break e}}function n(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var J=L[0],ee=L.pop();if(ee!==J){L[0]=ee;e:for(var te=0,O=L.length,W=O>>>1;te<W;){var ue=2*(te+1)-1,ce=L[ue],ye=ue+1,Ee=L[ye];if(0>o(ce,ee))ye<O&&0>o(Ee,ce)?(L[te]=Ee,L[ye]=ee,te=ye):(L[te]=ce,L[ue]=ee,te=ue);else if(ye<O&&0>o(Ee,ee))L[te]=Ee,L[ye]=ee,te=ye;else break e}}return J}function o(L,J){var ee=L.sortIndex-J.sortIndex;return ee!==0?ee:L.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var h=[],p=[],y=1,v=null,b=3,S=!1,E=!1,w=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function R(L){for(var J=n(p);J!==null;){if(J.callback===null)a(p);else if(J.startTime<=L)a(p),J.sortIndex=J.expirationTime,t(h,J);else break;J=n(p)}}function T(L){if(w=!1,R(L),!E)if(n(h)!==null)E=!0,D||(D=!0,Y());else{var J=n(p);J!==null&&me(T,J.startTime-L)}}var D=!1,F=-1,k=5,z=-1;function X(){return C?!0:!(e.unstable_now()-z<k)}function q(){if(C=!1,D){var L=e.unstable_now();z=L;var J=!0;try{e:{E=!1,w&&(w=!1,j(F),F=-1),S=!0;var ee=b;try{t:{for(R(L),v=n(h);v!==null&&!(v.expirationTime>L&&X());){var te=v.callback;if(typeof te=="function"){v.callback=null,b=v.priorityLevel;var O=te(v.expirationTime<=L);if(L=e.unstable_now(),typeof O=="function"){v.callback=O,R(L),J=!0;break t}v===n(h)&&a(h),R(L)}else a(h);v=n(h)}if(v!==null)J=!0;else{var W=n(p);W!==null&&me(T,W.startTime-L),J=!1}}break e}finally{v=null,b=ee,S=!1}J=void 0}}finally{J?Y():D=!1}}}var Y;if(typeof M=="function")Y=function(){M(q)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,Z=ne.port2;ne.port1.onmessage=q,Y=function(){Z.postMessage(null)}}else Y=function(){A(q,0)};function me(L,J){F=A(function(){L(e.unstable_now())},J)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<L?Math.floor(1e3/L):
vendor: 30,579 bytes, lines 1-8
15},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var ee=b;b=J;try{return L()}finally{b=ee}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(L,J){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ee=b;b=L;try{return J()}finally{b=ee}},e.unstable_scheduleCallback=function(L,J,ee){var te=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?te+ee:te):ee=te,L){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ee+O,L={id:y++,callback:J,priorityLevel:L,startTime:ee,expirationTime:O,sortIndex:-1},ee>te?(L.sortIndex=ee,t(p,L),n(h)===null&&L===n(p)&&(w?(j(F),F=-1):w=!0,me(T,ee-te))):(L.sortIndex=O,t(h,L),E||S||(E=!0,D||(D=!0,Y()))),L},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(L){var J=b;return function(){var ee=b;b=J;try{return L.apply(this,arguments)}finally{b=ee}}}})(Ep)),Ep}var T1;function eM(){return T1||(T1=1,Sp.exports=JT()),Sp.exports}var Ap={exports:{}},et={};var M1;function tM(){if(M1)return et;M1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,w={};function C(O,W,ue){this.props=O,this.context=W,this.refs=w,this.updater=ue||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,W){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,W,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function A(){}A.prototype=C.prototype;function j(O,W,ue){this.props=O,this.context=W,this.refs=w,this.updater=ue||S}var M=j.prototype=new A;M.constructor=j,E(M,C.prototype),M.isPureReactComponent=!0;var R=Array.isArray,T={H:null,A:null,T:null,S:null,V:null},D=Object.prototype.hasOwnProperty;function F(O,W,ue,ce,ye,Ee){return ue=Ee.ref,{$$typeof:e,type:O,key:W,ref:ue!==void 0?ue:null,props:Ee}}function k(O,W){return F(O.type,W,void 0,void 0,void 0,O.props)}function z(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function X(O){var W={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ue){return W[ue]})}var q=/\/+/g;function Y(O,W){return typeof O=="object"&&O!==null&&O.key!=null?X(""+O.key):W.toString(36)}function ne(){}function Z(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(ne,ne):(O.status="pending",O.then(function(W){O.status==="pending"&&(O.status="fulfilled",O.value=W)},function(W){O.status==="pending"&&(O.status="rejected",O.reason=W)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function me(O,W,ue,ce,ye){var Ee=typeof O;(Ee==="undefined"||Ee==="boolean")&&(O=null);var xe=!1;if(O===null)xe=!0;else switch(Ee){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(O.$$typeof){case e:case t:xe=!0;break;case y:return xe=O._init,me(xe(O._payload),W,ue,ce,ye)}}if(xe)return ye=ye(O),xe=ce===""?"."+Y(O,0):ce,R(ye)?(ue="",xe!=null&&(ue=xe.replace(q,"$&/")+"/"),me(ye,W,ue,"",function(le){return le})):ye!=null&&(z(ye)&&(ye=k(ye,ue+(ye.key==null||O&&O.key===ye.key?"":(""+ye.key).replace(q,"$&/")+"/")+xe)),W.push(ye)),1;xe=0;var he=ce===""?".":ce+":";if(R(O))for(var Te=0;Te<O.length;Te++)ce=O[Te],Ee=he+Y(ce,Te),xe+=me(ce,W,ue,Ee,ye);else if(Te=b(O),typeof Te=="function")for(O=Te.call(O),Te=0;!(ce=O.next()).done;)ce=ce.value,Ee=he+Y(ce,Te++),xe+=me(ce,W,ue,Ee,ye);else if(Ee==="object"){if(typeof O.then=="function")return me(Z(O),W,ue,ce,ye);throw W=String(O),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return xe}function L(O,W,ue){if(O==null)return O;var ce=[],ye=0;return me(O,ce,"","",function(Ee){return W.call(ue,Ee,ye++)}),ce}function J(O){if(O._status===-1){var W=O._result;W=W(),W.then(function(ue){(O._status===0||O._status===-1)&&(O._status=1,O._result=ue)},function(ue){(O._status===0||O._status===-1)&&(O._status=2,O._result=ue)}),O._status===-1&&(O._status=0,O._result=W)}if(O._status===1)return O._result.default;throw O._result}var ee=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)};function te(){}return et.Children={map:L,forEach:function(O,W,ue){L(O,function(){W.apply(this,arguments)},ue)},count:function(O){var W=0;return L(O,function(){W++}),W},toArray:function(O){return L(O,function(W){return W})||[]},only:function(O){if(!z(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},et.Component=C,et.Fragment=n,et.Profiler=o,et.PureComponent=j,et.StrictMode=a,et.Suspense=h,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,et.__COMPILER_RUNTIME={__proto__:null,c:function(O){return T.H.useMemoCache(O)}},et.cache=function(O){return function(){return O.apply(null,arguments)}},et.cloneElement=function(O,W,ue){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ce=E({},O.props),ye=O.key,Ee=void 0;if(W!=null)for(xe in W.ref!==void 0&&(Ee=void 0),W.key!==void 0&&(ye=""+W.key),W)!D.call(W,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&W.ref===void 0||(ce[xe]=W[xe]);var xe=arguments.length-2;if(xe===1)ce.children=ue;else if(1<xe){for(var he=Array(xe),Te=0;Te<xe;Te++)he[Te]=arguments[Te+2];ce.children=he}return F(O.type,ye,void 0,void 0,Ee,ce)},et.createContext=function(O){return O={$$typeof:d,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},et.createElement=function(O,W,ue){var ce,ye={},Ee=null;if(W!=null)for(ce in W.key!==void 0&&(Ee=""+W.key),W)D.call(W,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(ye[ce]=W[ce]);var xe=arguments.length-2;if(xe===1)ye.children=ue;else if(1<xe){for(var he=Array(xe),Te=0;Te<xe;Te++)he[Te]=arguments[Te+2];ye.children=he}if(O&&O.defaultProps)for(ce in xe=O.defaultProps,xe)ye[ce]===void 0&&(ye[ce]=xe[ce]);return F(O,Ee,void 0,void 0,null,ye)},et.createRef=function(){return{current:null}},et.forwardRef=function(O){return{$$typeof:f,render:O}},et.isValidElement=z,et.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:J}},et.memo=function(O,W){return{$$typeof:p,type:O,compare:W===void 0?null:W}},et.startTransition=function(O){var W=T.T,ue={};T.T=ue;try{var ce=O(),ye=T.S;ye!==null&&ye(ue,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(te,ee)}catch(Ee){ee(Ee)}finally{T.T=W}},et.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},et.use=function(O){return T.H.use(O)},et.useActionState=function(O,W,ue){return T.H.useActionState(O,W,ue)},et.useCallback=function(O,W){return T.H.useCallback(O,W)},et.useContext=function(O){return T.H.useContext(O)},et.useDebugValue=function(){},et.useDeferredValue=function(O,W){return T.H.useDeferredValue(O,W)},et.useEffect=function(O,W,ue){var ce=T.H;if(typeof ue=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ce.useEffect(O,W)},et.useId=function(){return T.H.useId()},et.useImperativeHandle=function(O,W,ue){return T.H.useImperativeHandle(O,W,ue)},et.useInsertionEffect=function(O,W){return T.H.useInsertionEffect(O,W)},et.useLayoutEffect=function(O,W){return T.H.useLayoutEffect(O,W)},et.useMemo=function(O,W){return T.H.useMemo(O,W)},et.useOptimistic=function(O,W){return T.H.useOptimistic(O,W)},et.useReducer=function(O,W,ue){return T.H.useReducer(O,W,ue)},et.useRef=function(O){return T.H.useRef(O)},et.useState=function(O){return T.H.useState(O)},et.useSyncExternalStore=function(O,W,ue){return T.H.useSyncExternalStore(O,W,ue)},et.useTransition=function(){return T.H.useTransition()},et.version="19.1.0",et}var O1;function Cf(){return O1||(O1=1,Ap.exports=tM()),Ap.exports}var _p={exports:{}},Ln={};var D1;function nM(){if(D1)return Ln;D1=1;var e=Cf();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(h,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:h,containerInfo:p,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ln.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return c(h,p,null,y)},Ln.flushSync=function(h){var p=d.T,y=a.p;try{if(d.T=null,a.p=2,h)return h()}finally{d.T=p,a.p=y,a.d.f()}},Ln.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(h,p))},Ln.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Ln.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,v=f(y,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?a.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:S}):y==="script"&&a.d.X(h,{crossOrigin:v,integrity:b,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ln.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=f(p.as,p.crossOrigin);a.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(h)},Ln.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=f(y,p.crossOrigin);a.d.L(h,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ln.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=f(p.as,p.crossOrigin);a.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(h)},Ln.requestFormReset=function(h){a.d.r(h)},Ln.unstable_batchedUpdates=function(h,p){return h(p)},Ln.useFormState=function(h,p,y){return d.H.useFormState(h,p,y)},Ln.useFormStatus=function(){return d.H.useHostTransitionStatus()},Ln.version="19.1.0",Ln}var R1;function Xj(){if(R1)return _p.exports;R1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_p.exports=nM(),_p.exports}var F1;function sM(){if(F1)return cc;F1=1;var e=eM(),t=Cf(),n=Xj();function a(s){var r="https://react.dev/errors/"+s;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+s+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function c(s){var r=s,l=s;if(s.alternate)for(;r.return;)r=r.return;else{s=r;do r=s,(r.flags&4098)!==0&&(l=r.return),s=r.return;while(s)}return r.tag===3?l:null}function d(s){if(s.tag===13){var r=s.memoizedState;if(r===null&&(s=s.alternate,s!==null&&(r=s.memoizedState)),r!==null)return r.dehydrated}return null}function f(s){if(c(s)!==s)throw Error(a(188))}function h(s){var r=s.alternate;if(!r){if(r=c(s),r===null)throw Error(a(188));return r!==s?null:s}for(var l=s,u=r;;){var m=l.return;if(m===null)break;var g=m.alternate;if(g===null){if(u=m.return,u!==null){l=u;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===l)return f(m),s;if(g===u)return f(m),r;g=g.sibling}throw Error(a(188))}if(l.return!==u.return)l=m,u=g;else{for(var N=!1,_=m.child;_;){if(_===l){N=!0,l=m,u=g;break}if(_===u){N=!0,u=m,l=g;break}_=_.sibling}if(!N){for(_=g.child;_;){if(_===l){N=!0,l=g,u=m;break}if(_===u){N=!0,u=g,l=m;break}_=_.sibling}if(!N)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?s:r}function p(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s;for(s=s.child;s!==null;){if(r=p(s),r!==null)return r;s=s.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),j=Symbol.for("react.consumer"),M=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function Y(s){return s===null||typeof s!="object"?null:(s=q&&s[q]||s["@@iterator"],typeof s=="function"?s:null)}var ne=Symbol.for("react.client.reference");function Z(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===ne?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case E:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case D:return"SuspenseList";case z:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case S:return"Portal";case M:return(s.displayName||"Context")+".Provider";case j:return(s._context.displayName||"Context")+".Consumer";case R:var r=s.render;return s=s.displayName,s||(s=r.displayName||r.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case F:return r=s.displayName||null,r!==null?r:Z(s.type)||"Memo";case k:r=s._payload,s=s._init;try{return Z(s(r))}catch{}}return null}var me=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],O=-1;function W(s){return{current:s}}function ue(s){0>O||(s.current=te[O],te[O]=null,O--)}function ce(s,r){O++,te[O]=s.current,s.current=r}var ye=W(null),Ee=W(null),xe=W(null),he=W(null);function Te(s,r){switch(ce(xe,r),ce(Ee,s),ce(ye,null),r.nodeType){case 9:case 11:s=(s=r.documentElement)&&(s=s.namespaceURI)?t1(s):0;break;default:if(s=r.tagName,r=r.namespaceURI)r=t1(r),s=n1(r,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ue(ye),ce(ye,s)}function le(){ue(ye),ue(Ee),ue(xe)}function Re(s){s.memoizedState!==null&&ce(he,s);var r=ye.current,l=n1(r,s.type);r!==l&&(ce(Ee,s),ce(ye,l))}function Pe(s){Ee.current===s&&(ue(ye),ue(Ee)),he.current===s&&(ue(he),sc._currentValue=ee)}var ot=Object.prototype.hasOwnProperty,Lt=e.unstable_scheduleCallback,Nt=e.unstable_cancelCallback,as=e.unstable_shouldYield,gn=e.unstable_requestPaint,zt=e.unstable_now,Gs=e.unstable_getCurrentPriorityLevel,Ws=e.unstable_ImmediatePriority,Va=e.unstable_UserBlockingPriority,An=e.unstable_NormalPriority,zr=e.unstable_LowPriority,Qs=e.unstable_IdlePriority,Ce=e.log,pt=e.unstable_setDisableYieldValue,Pt=null,Rt=null;function xn(s){if(typeof Ce=="function"&&pt(s),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(Pt,s)}catch{}}var Gt=Math.clz32?Math.clz32:V,P=Math.log,I=Math.LN2;function V(s){return s>>>=0,s===0?32:31-(P(s)/I|0)|0}var de=256,fe=4194304;function je(s){var r=s&42;if(r!==0)return r;switch(s&-s){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:case 262144:case 524288:case 1048576:case 2097152:return s&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function pe(s,r,l){var u=s.pendingLanes;if(u===0)return 0;var m=0,g=s.suspendedLanes,N=s.pingedLanes;s=s.warmLanes;var _=u&134217727;return _!==0?(u=_&~g,u!==0?m=je(u):(N&=_,N!==0?m=je(N):l||(l=_&~s,l!==0&&(m=je(l))))):(_=u&~g,_!==0?m=je(_):N!==0?m=je(N):l||(l=u&~s,l!==0&&(m=je(l)))),m===0?0:r!==0&&r!==m&&(r&g)===0&&(g=m&-m,l=r&-r,g>=l||g===32&&(l&4194048)!==0)?r:m}function Ne(s,r){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&r)===0}function He(s,r){switch(s){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 _e(){var s=de;return de<<=1,(de&4194048)===0&&(de=256),s}function Ke(){var s=fe;return fe<<=1,(fe&62914560)===0&&(fe=4194304),s}function qe(s){for(var r=[],l=0;31>l;l++)r.push(s);return r}function Ge(s,r){s.pendingLanes|=r,r!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function nn(s,r,l,u,m,g){var N=s.pendingLanes;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=l,s.entangledLanes&=l,s.errorRecoveryDisabledLanes&=l,s.shellSuspendCounter=0;var _=s.entanglements,B=s.expirationTimes,K=s.hiddenUpdates;for(l=N&~l;0<l;){var se=31-Gt(l),oe=1<<se;_[se]=0,B[se]=-1;var G=K[se];if(G!==null)for(K[se]=null,se=0;se<G.length;se++){var Q=G[se];Q!==null&&(Q.lane&=-536870913)}l&=~oe}u!==0&&st(s,u,0),g!==0&&m===0&&s.tag!==0&&(s.suspendedLanes|=g&~(N&~r))}function st(s,r,l){s.pendingLanes|=r,s.suspendedLanes&=~r;var u=31-Gt(r);s.entangledLanes|=r,s.entanglements[u]=s.entanglements[u]|1073741824|l&4194090}function Ir(s,r){var l=s.entangledLanes|=r;for(s=s.entanglements;l;){var u=31-Gt(l),m=1<<u;m&r|s[u]&r&&(s[u]|=r),l&=~m}}function $r(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Ha(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function $i(){var s=J.p;return s!==0?s:(s=window.event,s===void 0?32:w1(s.type))}function ml(s,r){var l=J.p;try{return J.p=s,r()}finally{J.p=l}}var Ya=Math.random().toString(36).slice(2),Bn="__reactFiber$"+Ya,Zn="__reactProps$"+Ya,Vi="__reactContainer$"+Ya,pm="__reactEvents$"+Ya,L_="__reactListeners$"+Ya,U_="__reactHandles$"+Ya,$y="__reactResources$"+Ya,hl="__reactMarker$"+Ya;function gm(s){delete s[Bn],delete s[Zn],delete s[pm],delete s[L_],delete s[U_]}function Hi(s){var r=s[Bn];if(r)return r;for(var l=s.parentNode;l;){if(r=l[Vi]||l[Bn]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(s=i1(s);s!==null;){if(l=s[Bn])return l;s=i1(s)}return r}s=l,l=s.parentNode}return null}function Yi(s){if(s=s[Bn]||s[Vi]){var r=s.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return s}return null}function pl(s){var r=s.tag;if(r===5||r===26||r===27||r===6)return s.stateNode;throw Error(a(33))}function Ki(s){var r=s[$y];return r||(r=s[$y]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Nn(s){s[hl]=!0}var Vy=new Set,Hy={};function Vr(s,r){Gi(s,r),Gi(s+"Capture",r)}function Gi(s,r){for(Hy[s]=r,s=0;s<r.length;s++)Vy.add(r[s])}var z_=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]*$"),Yy={},Ky={};function I_(s){return ot.call(Ky,s)?!0:ot.call(Yy,s)?!1:z_.test(s)?Ky[s]=!0:(Yy[s]=!0,!1)}function xu(s,r,l){if(I_(r))if(l===null)s.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":s.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){s.removeAttribute(r);return}}s.setAttribute(r,""+l)}}function yu(s,r,l){if(l===null)s.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(r);return}s.setAttribute(r,""+l)}}function pa(s,r,l,u){if(u===null)s.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttributeNS(r,l,""+u)}}var xm,Gy;function Wi(s){if(xm===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);xm=r&&r[1]||"",Gy=-1<l.stack.indexOf(` 2 at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return` 3`+xm+s+Gy}var ym=!1;function vm(s,r){if(!s||ym)return"";ym=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Q){var G=Q}Reflect.construct(s,[],oe)}else{try{oe.call()}catch(Q){G=Q}s.call(oe.prototype)}}else{try{throw Error()}catch(Q){G=Q}(oe=s())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Q){if(Q&&G&&typeof Q.stack=="string")return[Q.stack,G.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),N=g[0],_=g[1];if(N&&_){var B=N.split(` 4`),K=_.split(` 5`);for(m=u=0;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;for(;m<K.length&&!K[m].includes("DetermineComponentFrameRoot");)m++;if(u===B.length||m===K.length)for(u=B.length-1,m=K.length-1;1<=u&&0<=m&&B[u]!==K[m];)m--;for(;1<=u&&0<=m;u--,m--)if(B[u]!==K[m]){if(u!==1||m!==1)do if(u--,m--,0>m||B[u]!==K[m]){var se=` 6`+B[u].replace(" at new "," at ");return s.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",s.displayName)),se}while(1<=u&&0<=m);break}}}finally{ym=!1,Error.prepareStackTrace=l}return(l=s?s.displayName||s.name:"")?Wi(l):""}function $_(s){switch(s.tag){case 26:case 27:case 5:return Wi(s.type);case 16:return Wi("Lazy");case 13:return Wi("Suspense");case 19:return Wi("SuspenseList");case 0:case 15:return vm(s.type,!1);case 11:return vm(s.type.render,!1);case 1:return vm(s.type,!0);case 31:return Wi("Activity");default:return""}}function Wy(s){try{var r="";do r+=$_(s),s=s.return;while(s);return r}catch(l){return` 7Error generating stack: `+l.message+` 8`+l.stack}}function js(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Qy(s){var r=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function V_(s){var r=Qy(s)?"checked":"value",l=Object.getOwnPropertyDescriptor(s.constructor.prototype,r),u=""+s[r];if(!s.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var m=l.get,g=l.set;return Object.defineProperty(s,r,{configurable:!0,get:function(){return m.call(this)},set:function(N){u=""+N,g.call(this,N)}}),Object.defineProperty(s,r,{enumerable:l.enumerable}),{getValue:function(){return u},setValue:function(N){u=""+N},stopTracking:function(){s._valueTracker=null,delete s[r]}}}}function vu(s){s._valueTracker||(s._valueTracker=V_(s))}function Zy(s){if(!s)return!1;var r=s._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return s&&(u=Qy(s)?s.checked?"true":"false":s.value),s=u,s!==l?(r.setValue(s),!0):!1}function bu(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var H_=/[\n"\\]/g;function Ns(s){return s.replace(H_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function bm(s,r,l,u,m,g,N,_){s.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?s.type=N:s.removeAttribute("type"),r!=null?N==="number"?(r===0&&s.value===""||s.value!=r)&&(s.value=""+js(r)):s.value!==""+js(r)&&(s.value=""+js(r)):N!=="submit"&&N!=="reset"||s.removeAttribute("value"),r!=null?wm(s,N,js(r)):l!=null?wm(s,N,js(l)):u!=null&&s.removeAttribute("value"),m==null&&g!=null&&(s.defaultChecked=!!g),m!=null&&(s.checked=m&&typeof m!="function"&&typeof m!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?s.name=""+js(_):s.removeAttribute("name")}function Xy(s,r,l,u,m,g,N,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(s.type=g),r!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;l=l!=null?""+js(l):"",r=r!=null?""+js(r):l,_||r===s.value||(s.value=r),s.defaultValue=r}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=_?s.checked:!!u,s.defaultChecked=!!u,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(s.name=N)}function wm(s,r,l){r==="number"&&bu(s.ownerDocument)===s||s.defaultValue===""+l||(s.defaultValue=""+l)}function Qi(s,r,l,u){if(s=s.options,r){r={};for(var m=0;m<l.length;m++)r["$"+l[m]]=!0;for(l=0;l<s.length;l++)m=r.hasOwnProperty("$"+s[l].value),s[l].selected!==m&&(s[l].selected=m),m&&u&&(s[l].defaultSelected=!0)}else{for(l=""+js(l),r=null,m=0;m<s.length;m++){if(s[m].value===l){s[m].selected=!0,u&&(s[m].defaultSelected=!0);return}r!==null||s[m].disabled||(r=s[m])}r!==null&&(r.selected=!0)}}function Jy(s,r,l){if(r!=null&&(r=""+js(r),r!==s.value&&(s.value=r),l==null)){s.defaultValue!==r&&(s.defaultValue=r);return}s.defaultValue=l!=null?""+js(l):""}function ev(s,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(me(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=js(r),s.defaultValue=l,u=s.textContent,u===l&&u!==""&&u!==null&&(s.value=u)}function Zi(s,r){if(r){var l=s.firstChild;if(l&&l===s.lastChild&&l.nodeType===3){l.nodeValue=r;return}}s.textContent=r}var Y_=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 tv(s,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?s.setProperty(r,""):r==="float"?s.cssFloat="":s[r]="":u?s.setProperty(r,l):typeof l!="number"||l===0||Y_.has(r)?r==="float"?s.cssFloat=l:s[r]=(""+l).trim():s[r]=l+"px"}function nv(s,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(s=s.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?s.setProperty(u,""):u==="float"?s.cssFloat="":s[u]="");for(var m in r)u=r[m],r.hasOwnProperty(m)&&l[m]!==u&&tv(s,m,u)}else for(var g in r)r.hasOwnProperty(g)&&tv(s,g,r[g])}function jm(s){if(s.indexOf("-")===-1)return!1;switch(s){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 K_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
8dering","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"]]),G_=/^[\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 wu(s){return G_.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}var Nm=null;function Cm(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Xi=null,Ji=null;function sv(s){var r=Yi(s);if(r&&(s=r.stateNode)){var l=s[Zn]||null;e:switch(s=r.stateNode,r.type){case"input":if(bm(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=s;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ns(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==s&&u.form===s.form){var m=u[Zn]||null;if(!m)throw Error(a(90));bm(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===s.form&&Zy(u)}break e;case"textarea":Jy(s,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Qi(s,!!l.multiple,r,!1)}}}var Sm=!1;function av(s,r,l){if(Sm)return s(r,l);Sm=!0;try{var u=s(r);return u}finally{if(Sm=!1,(Xi!==null||Ji!==null)&&(id(),Xi&&(r=Xi,s=Ji,Ji=Xi=null,sv(r),s)))for(r=0;r<s.length;r++)sv(s[r])}}function gl(s,r){var l=s.stateNode;if(l===null)return null;var u=l[Zn]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(s=s.type,u=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!u;break e;default:s=!1}if(s)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var ga=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Em=!1;
vendor: 3,351 bytes, line 8
8if(ga)try{var xl={};Object.defineProperty(xl,"passive",{get:function(){Em=!0}}),window.addEventListener("test",xl,xl),window.removeEventListener("test",xl,xl)}catch{Em=!1}var Ka=null,Am=null,ju=null;function rv(){if(ju)return ju;var s,r=Am,l=r.length,u,m="value"in Ka?Ka.value:Ka.textContent,g=m.length;for(s=0;s<l&&r[s]===m[s];s++);var N=l-s;for(u=1;u<=N&&r[l-u]===m[g-u];u++);return ju=m.slice(s,1<u?1-u:void 0)}function Nu(s){var r=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&r===13&&(s=13)):s=r,s===10&&(s=13),32<=s||s===13?s:0}function Cu(){return!0}function iv(){return!1}function Xn(s){function r(l,u,m,g,N){this._reactName=l,this._targetInst=m,this.type=u,this.nativeEvent=g,this.target=N,this.currentTarget=null;for(var _ in s)s.hasOwnProperty(_)&&(l=s[_],this[_]=l?l(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Cu:iv,this.isPropagationStopped=iv,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Cu)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Cu)},persist:function(){},isPersistent:Cu}),r}var Hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Su=Xn(Hr),yl=y({},Hr,{view:0,detail:0}),W_=Xn(yl),_m,km,vl,Eu=y({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==vl&&(vl&&s.type==="mousemove"?(_m=s.screenX-vl.screenX,km=s.screenY-vl.screenY):km=_m=0,vl=s),_m)},movementY:function(s){return"movementY"in s?s.movementY:km}}),ov=Xn(Eu),Q_=y({},Eu,{dataTransfer:0}),Z_=Xn(Q_),X_=y({},yl,{relatedTarget:0}),Tm=Xn(X_),J_=y({},Hr,{animationName:0,elapsedTime:0,pseudoElement:0}),ek=Xn(J_),tk=y({},Hr,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),nk=Xn(tk),sk=y({},Hr,{data:0}),lv=Xn(sk),ak={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ik={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ok(s){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(s):(s=ik[s])?!!r[s]:!1}function Mm(){return ok}var lk=y({},yl,{key:function(s){if(s.key){var r=ak[s.key]||s.key;if(r!=="Unidentified")return r}return s.type==="keypress"?(s=Nu(s),s===13?"Enter":String.fromCharCode(s)):s.type==="
8keydown"||s.type==="keyup"?rk[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mm,charCode:function(s){return s.type==="keypress"?Nu(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Nu(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),ck=Xn(lk),uk=y({},Eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cv=Xn(uk),dk=y({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mm}),fk=Xn(dk),mk=y({},Hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),hk=Xn(mk),pk=y({},Eu,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),gk=Xn(pk),xk=y({},Hr,{newState:0,oldState:0}),yk=Xn(xk),vk=[9,13,27,32],Om=ga&&"CompositionEvent"in window,bl=null;ga&&"documentMode"in document&&(bl=document.documentMode);var bk=ga&&"TextEvent"in window&&!bl,uv=ga&&(!Om||bl&&8<bl&&11>
vendor: 112,005 bytes, lines 8-9
8=bl),dv=" ",fv=!1;function mv(s,r){switch(s){case"keyup":return vk.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hv(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var eo=!1;function wk(s,r){switch(s){case"compositionend":return hv(r);case"keypress":return r.which!==32?null:(fv=!0,dv);case"textInput":return s=r.data,s===dv&&fv?null:s;default:return null}}function jk(s,r){if(eo)return s==="compositionend"||!Om&&mv(s,r)?(s=rv(),ju=Am=Ka=null,eo=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return uv&&r.locale!=="ko"?null:r.data;default:return null}}var Nk={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 pv(s){var r=s&&s.nodeName&&s.nodeName.toLowerCase();return r==="input"?!!Nk[s.type]:r==="textarea"}function gv(s,r,l,u){Xi?Ji?Ji.push(u):Ji=[u]:Xi=u,r=fd(r,"onChange"),0<r.length&&(l=new Su("onChange","change",null,l,u),s.push({event:l,listeners:r}))}var wl=null,jl=null;function Ck(s){Q0(s,0)}function Au(s){var r=pl(s);if(Zy(r))return s}function xv(s,r){if(s==="change")return r}var yv=!1;if(ga){var Dm;if(ga){var Rm="oninput"in document;if(!Rm){var vv=document.createElement("div");vv.setAttribute("oninput","return;"),Rm=typeof vv.oninput=="function"}Dm=Rm}else Dm=!1;yv=Dm&&(!document.documentMode||9<document.documentMode)}function bv(){wl&&(wl.detachEvent("onpropertychange",wv),jl=wl=null)}function wv(s){if(s.propertyName==="value"&&Au(jl)){var r=[];gv(r,jl,s,Cm(s)),av(Ck,r)}}function Sk(s,r,l){s==="focusin"?(bv(),wl=r,jl=l,wl.attachEvent("onpropertychange",wv)):s==="focusout"&&bv()}function Ek(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Au(jl)}function Ak(s,r){if(s==="click")return Au(r)}function _k(s,r){if(s==="input"||s==="change")return Au(r)}function kk(s,r){return s===r&&(s!==0||1/s===1/r)||s!==s&&r!==r}var rs=typeof Object.is=="function"?Object.is:kk;function Nl(s,r){if(rs(s,r))return!0;if(typeof s!="object"||s===null||typeof r!="object"||r===null)return!1;var l=Object.keys(s),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var m=l[u];if(!ot.call(r,m)||!rs(s[m],r[m]))return!1}return!0}function jv(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Nv(s,r){var l=jv(s);s=0;for(var u;l;){if(l.nodeType===3){if(u=s+l.textContent.length,s<=r&&u>=r)return{node:l,offset:r-s};s=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=jv(l)}}function Cv(s,r){return s&&r?s===r?!0:s&&s.nodeType===3?!1:r&&r.nodeType===3?Cv(s,r.parentNode):"contains"in s?s.contains(r):s.compareDocumentPosition?!!(s.compareDocumentPosition(r)&16):!1:!1}function Sv(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var r=bu(s.document);r instanceof s.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)s=r.contentWindow;else break;r=bu(s.document)}return r}function Fm(s){var r=s&&s.nodeName&&s.nodeName.toLowerCase();return r&&(r==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||r==="textarea"||s.contentEditable==="true")}var Tk=ga&&"documentMode"in document&&11>=document.documentMode,to=null,Pm=null,Cl=null,Bm=!1;function Ev(s,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Bm||to==null||to!==bu(u)||(u=to,"selectionStart"in u&&Fm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Cl&&Nl(Cl,u)||(Cl=u,u=fd(Pm,"onSelect"),0<u.length&&(r=new Su("onSelect","select",null,r,l),s.push({event:r,listeners:u}),r.target=to)))}function Yr(s,r){var l={};return l[s.toLowerCase()]=r.toLowerCase(),l["Webkit"+s]="webkit"+r,l["Moz"+s]="moz"+r,l}var no={animationend:Yr("Animation","AnimationEnd"),animationiteration:Yr("Animation","AnimationIteration"),animationstart:Yr("Animation","AnimationStart"),transitionrun:Yr("Transition","TransitionRun"),transitionstart:Yr("Transition","TransitionStart"),transitioncancel:Yr("Transition","TransitionCancel"),transitionend:Yr("Transition","TransitionEnd")},qm={},Av={};ga&&(Av=document.createElement("div").style,"AnimationEvent"in window||(delete no.animationend.animation,delete no.animationiteration.animation,delete no.animationstart.animation),"TransitionEvent"in window||delete no.transitionend.transition);function Kr(s){if(qm[s])return qm[s];if(!no[s])return s;var r=no[s],l;for(l in r)if(r.hasOwnProperty(l)&&l in Av)return qm[s]=r[l];return s}var _v=Kr("animationend"),kv=Kr("animationiteration"),Tv=Kr("animationstart"),Mk=Kr("transitionrun"),Ok=Kr("transitionstart"),Dk=Kr("transitioncancel"),Mv=Kr("transitionend"),Ov=new Map,Lm="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(" ");Lm.push("scrollEnd");function Rs(s,r){Ov.set(s,r),Vr(r,[s])}var Dv=new WeakMap;function Cs(s,r){if(typeof s=="object"&&s!==null){var l=Dv.get(s);return l!==void 0?l:(r={value:s,source:r,stack:Wy(r)},Dv.set(s,r),r)}return{value:s,source:r,stack:Wy(r)}}var Ss=[],so=0,Um=0;function _u(){for(var s=so,r=Um=so=0;r<s;){var l=Ss[r];Ss[r++]=null;var u=Ss[r];Ss[r++]=null;var m=Ss[r];Ss[r++]=null;var g=Ss[r];if(Ss[r++]=null,u!==null&&m!==null){var N=u.pending;N===null?m.next=m:(m.next=N.next,N.next=m),u.pending=m}g!==0&&Rv(l,m,g)}}function ku(s,r,l,u){Ss[so++]=s,Ss[so++]=r,Ss[so++]=l,Ss[so++]=u,Um|=u,s.lanes|=u,s=s.alternate,s!==null&&(s.lanes|=u)}function zm(s,r,l,u){return ku(s,r,l,u),Tu(s)}function ao(s,r){return ku(s,null,null,r),Tu(s)}function Rv(s,r,l){s.lanes|=l;var u=s.alternate;u!==null&&(u.lanes|=l);for(var m=!1,g=s.return;g!==null;)g.childLanes|=l,u=g.alternate,u!==null&&(u.childLanes|=l),g.tag===22&&(s=g.stateNode,s===null||s._visibility&1||(m=!0)),s=g,g=g.return;return s.tag===3?(g=s.stateNode,m&&r!==null&&(m=31-Gt(l),s=g.hiddenUpdates,u=s[m],u===null?s[m]=[r]:u.push(r),r.lane=l|536870912),g):null}function Tu(s){if(50<Wl)throw Wl=0,Kh=null,Error(a(185));for(var r=s.return;r!==null;)s=r,r=s.return;return s.tag===3?s.stateNode:null}var ro={};function Rk(s,r,l,u){this.tag=s,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function is(s,r,l,u){return new Rk(s,r,l,u)}function Im(s){return s=s.prototype,!(!s||!s.isReactComponent)}function xa(s,r){var l=s.alternate;return l===null?(l=is(s.tag,r,s.key,s.mode),l.elementType=s.elementType,l.type=s.type,l.stateNode=s.stateNode,l.alternate=s,s.alternate=l):(l.pendingProps=r,l.type=s.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=s.flags&65011712,l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,r=s.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=s.sibling,l.index=s.index,l.ref=s.ref,l.refCleanup=s.refCleanup,l}function Fv(s,r){s.flags&=65011714;var l=s.alternate;return l===null?(s.childLanes=0,s.lanes=r,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,r=l.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),s}function Mu(s,r,l,u,m,g){var N=0;if(u=s,typeof s=="function")Im(s)&&(N=1);else if(typeof s=="string")N=PT(s,l,ye.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case z:return s=is(31,l,r,m),s.elementType=z,s.lanes=g,s;case E:return Gr(l.children,m,g,r);case w:N=8,m|=24;break;case C:return s=is(12,l,r,m|2),s.elementType=C,s.lanes=g,s;case T:return s=is(13,l,r,m),s.elementType=T,s.lanes=g,s;case D:return s=is(19,l,r,m),s.elementType=D,s.lanes=g,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case A:case M:N=10;break e;case j:N=9;break e;case R:N=11;break e;case F:N=14;break e;case k:N=16,u=null;break e}N=29,l=Error(a(130,s===null?"null":typeof s,"")),u=null}return r=is(N,l,r,m),r.elementType=s,r.type=u,r.lanes=g,r}function Gr(s,r,l,u){return s=is(7,s,u,r),s.lanes=l,s}function $m(s,r,l){return s=is(6,s,null,r),s.lanes=l,s}function Vm(s,r,l){return r=is(4,s.children!==null?s.children:[],s.key,r),r.lanes=l,r.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},r}var io=[],oo=0,Ou=null,Du=0,Es=[],As=0,Wr=null,ya=1,va="";function Qr(s,r){io[oo++]=Du,io[oo++]=Ou,Ou=s,Du=r}function Pv(s,r,l){Es[As++]=ya,Es[As++]=va,Es[As++]=Wr,Wr=s;var u=ya;s=va;var m=32-Gt(u)-1;u&=~(1<<m),l+=1;var g=32-Gt(r)+m;if(30<g){var N=m-m%5;g=(u&(1<<N)-1).toString(32),u>>=N,m-=N,ya=1<<32-Gt(r)+m|l<<m|u,va=g+s}else ya=1<<g|l<<m|u,va=s}function Hm(s){s.return!==null&&(Qr(s,1),Pv(s,1,0))}function Ym(s){for(;s===Ou;)Ou=io[--oo],io[oo]=null,Du=io[--oo],io[oo]=null;for(;s===Wr;)Wr=Es[--As],Es[As]=null,va=Es[--As],Es[As]=null,ya=Es[--As],Es[As]=null}var Yn=null,Wt=null,bt=!1,Zr=null,Zs=!1,Km=Error(a(519));function Xr(s){var r=Error(a(418,""));throw Al(Cs(r,s)),Km}function Bv(s){var r=s.stateNode,l=s.type,u=s.memoizedProps;switch(r[Bn]=s,r[Zn]=u,l){case"dialog":ft("cancel",r),ft("close",r);break;case"iframe":case"object":case"embed":ft("load",r);break;case"video":case"audio":for(l=0;l<Zl.length;l++)ft(Zl[l],r);break;case"source":ft("error",r);break;case"img":case"image":case"link":ft("error",r),ft("load",r);break;case"details":ft("toggle",r);break;case"input":ft("invalid",r),Xy(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),vu(r);break;case"select":ft("invalid",r);break;case"textarea":ft("invalid",r),ev(r,u.value,u.defaultValue,u.children),vu(r)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||e1(r.textContent,l)?(u.popover!=null&&(ft("beforetoggle",r),ft("toggle",r)),u.onScroll!=null&&ft("scroll",r),u.onScrollEnd!=null&&ft("scrollend",r),u.onClick!=null&&(r.onclick=md),r=!0):r=!1,r||Xr(s)}function qv(s){for(Yn=s.return;Yn;)switch(Yn.tag){case 5:case 13:Zs=!1;return;case 27:case 3:Zs=!0;return;default:Yn=Yn.return}}function Sl(s){if(s!==Yn)return!1;if(!bt)return qv(s),bt=!0,!1;var r=s.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=s.type,l=!(l!=="form"&&l!=="button")||cp(s.type,s.memoizedProps)),l=!l),l&&Wt&&Xr(s),qv(s),r===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(a(317));e:{for(s=s.nextSibling,r=0;s;){if(s.nodeType===8)if(l=s.data,l==="/$"){if(r===0){Wt=Ps(s.nextSibling);break e}r--}else l!=="$"&&l!=="$!"&&l!=="$?"||r++;s=s.nextSibling}Wt=null}}else r===27?(r=Wt,cr(s.type)?(s=mp,mp=null,Wt=s):Wt=r):Wt=Yn?Ps(s.stateNode.nextSibling):null;return!0}function El(){Wt=Yn=null,bt=!1}function Lv(){var s=Zr;return s!==null&&(ts===null?ts=s:ts.push.apply(ts,s),Zr=null),s}function Al(s){Zr===null?Zr=[s]:Zr.push(s)}var Gm=W(null),Jr=null,ba=null;function Ga(s,r,l){ce(Gm,r._currentValue),r._currentValue=l}function wa(s){s._currentValue=Gm.current,ue(Gm)}function Wm(s,r,l){for(;s!==null;){var u=s.alternate;if((s.childLanes&r)!==r?(s.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),s===l)break;s=s.return}}function Qm(s,r,l,u){var m=s.child;for(m!==null&&(m.return=s);m!==null;){var g=m.dependencies;if(g!==null){var N=m.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=m;for(var B=0;B<r.length;B++)if(_.context===r[B]){g.lanes|=l,_=g.alternate,_!==null&&(_.lanes|=l),Wm(g.return,l,s),u||(N=null);break e}g=_.next}}else if(m.tag===18){if(N=m.return,N===null)throw Error(a(341));N.lanes|=l,g=N.alternate,g!==null&&(g.lanes|=l),Wm(N,l,s),N=null}else N=m.child;if(N!==null)N.return=m;else for(N=m;N!==null;){if(N===s){N=null;break}if(m=N.sibling,m!==null){m.return=N.return,N=m;break}N=N.return}m=N}}function _l(s,r,l,u){s=null;for(var m=r,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var N=m.alternate;if(N===null)throw Error(a(387));if(N=N.memoizedProps,N!==null){var _=m.type;rs(m.pendingProps.value,N.value)||(s!==null?s.push(_):s=[_])}}else if(m===he.current){if(N=m.alternate,N===null)throw Error(a(387));N.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(s!==null?s.push(sc):s=[sc])}m=m.return}s!==null&&Qm(r,s,l,u),r.flags|=262144}function Ru(s){for(s=s.firstContext;s!==null;){if(!rs(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function ei(s){Jr=s,ba=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function qn(s){return Uv(Jr,s)}function Fu(s,r){return Jr===null&&ei(s),Uv(s,r)}function Uv(s,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},ba===null){if(s===null)throw Error(a(308));ba=r,s.dependencies={lanes:0,firstContext:r},s.flags|=524288}else ba=ba.next=r;return l}var Fk=typeof AbortController<"u"?AbortController:function(){var s=[],r=this.signal={aborted:!1,addEventListener:function(l,u){s.push(u)}};this.abort=function(){r.aborted=!0,s.forEach(function(l){return l()})}},Pk=e.unstable_scheduleCallback,Bk=e.unstable_NormalPriority,yn={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zm(){return{controller:new Fk,data:new Map,refCount:0}}function kl(s){s.refCount--,s.refCount===0&&Pk(Bk,function(){s.controller.abort()})}var Tl=null,Xm=0,lo=0,co=null;function qk(s,r){if(Tl===null){var l=Tl=[];Xm=0,lo=ep(),co={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Xm++,r.then(zv,zv),r}function zv(){if(--Xm===0&&Tl!==null){co!==null&&(co.status="fulfilled");var s=Tl;Tl=null,lo=0,co=null;for(var r=0;r<s.length;r++)(0,s[r])()}}function Lk(s,r){var l=[],u={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return s.then(function(){u.status="fulfilled",u.value=r;for(var m=0;m<l.length;m++)(0,l[m])(r)},function(m){for(u.status="rejected",u.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),u}var Iv=L.S;L.S=function(s,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&qk(s,r),Iv!==null&&Iv(s,r)};var ti=W(null);function Jm(){var s=ti.current;return s!==null?s:Bt.pooledCache}function Pu(s,r){r===null?ce(ti,ti.current):ce(ti,r.pool)}function $v(){var s=Jm();return s===null?null:{parent:yn._currentValue,pool:s}}var Ml=Error(a(460)),Vv=Error(a(474)),Bu=Error(a(542)),eh={then:function(){}};function Hv(s){return s=s.status,s==="fulfilled"||s==="rejected"}function qu(){}function Yv(s,r,l){switch(l=s[l],l===void 0?s.push(r):l!==r&&(r.then(qu,qu),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,Gv(s),s;default:if(typeof r.status=="string")r.then(qu,qu);else{if(s=Bt,s!==null&&100<s.shellSuspendCounter)throw Error(a(482));s=r,s.status="pending",s.then(function(u){if(r.status==="pending"){var m=r;m.status="fulfilled",m.value=u}},function(u){if(r.status==="pending"){var m=r;m.status="rejected",m.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw s=r.reason,Gv(s),s}throw Ol=r,Ml}}var Ol=null;function Kv(){if(Ol===null)throw Error(a(459));var s=Ol;return Ol=null,s}function Gv(s){if(s===Ml||s===Bu)throw Error(a(483))}var Wa=!1;function th(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nh(s,r){s=s.updateQueue,r.updateQueue===s&&(r.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Qa(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Za(s,r,l){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var m=u.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),u.pending=r,r=Tu(s),Rv(s,null,l),r}return ku(s,u,r,l),Tu(s)}function Dl(s,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=s.pendingLanes,l|=u,r.lanes=l,Ir(s,l)}}function sh(s,r){var l=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var m=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var N={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?m=g=N:g=g.next=N,l=l.next}while(l!==null);g===null?m=g=r:g=g.next=r}else m=g=r;l={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:u.shared,callbacks:u.callbacks},s.updateQueue=l;return}s=l.lastBaseUpdate,s===null?l.firstBaseUpdate=r:s.next=r,l.lastBaseUpdate=r}var ah=!1;function Rl(){if(ah){var s=co;if(s!==null)throw s}}function Fl(s,r,l,u){ah=!1;var m=s.updateQueue;Wa=!1;var g=m.firstBaseUpdate,N=m.lastBaseUpdate,_=m.shared.pending;if(_!==null){m.shared.pending=null;var B=_,K=B.next;B.next=null,N===null?g=K:N.next=K,N=B;var se=s.alternate;se!==null&&(se=se.updateQueue,_=se.lastBaseUpdate,_!==N&&(_===null?se.firstBaseUpdate=K:_.next=K,se.lastBaseUpdate=B))}if(g!==null){var oe=m.baseState;N=0,se=K=B=null,_=g;do{var G=_.lane&-536870913,Q=G!==_.lane;if(Q?(gt&G)===G:(u&G)===G){G!==0&&G===lo&&(ah=!0),se!==null&&(se=se.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Ye=s,$e=_;G=r;var Mt=l;switch($e.tag){case 1:if(Ye=$e.payload,typeof Ye=="function"){oe=Ye.call(Mt,oe,G);break e}oe=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=$e.payload,G=typeof Ye=="function"?Ye.call(Mt,oe,G):Ye,G==null)break e;oe=y({},oe,G);break e;case 2:Wa=!0}}G=_.callback,G!==null&&(s.flags|=64,Q&&(s.flags|=8192),Q=m.callbacks,Q===null?m.callbacks=[G]:Q.push(G))}else Q={lane:G,tag:_.tag,payload:_.payload,callback:_.callback,next:null},se===null?(K=se=Q,B=oe):se=se.next=Q,N|=G;if(_=_.next,_===null){if(_=m.shared.pending,_===null)break;Q=_,_=Q.next,Q.next=null,m.lastBaseUpdate=Q,m.shared.pending=null}}while(!0);se===null&&(B=oe),m.baseState=B,m.firstBaseUpdate=K,m.lastBaseUpdate=se,g===null&&(m.shared.lanes=0),rr|=N,s.lanes=N,s.memoizedState=oe}}function Wv(s,r){if(typeof s!="function")throw Error(a(191,s));s.call(r)}function Qv(s,r){var l=s.callbacks;if(l!==null)for(s.callbacks=null,s=0;s<l.length;s++)Wv(l[s],r)}var uo=W(null),Lu=W(0);function Zv(s,r){s=_a,ce(Lu,s),ce(uo,r),_a=s|r.baseLanes}function rh(){ce(Lu,_a),ce(uo,uo.current)}function ih(){_a=Lu.current,ue(uo),ue(Lu)}var Xa=0,at=null,kt=null,un=null,Uu=!1,fo=!1,ni=!1,zu=0,Pl=0,mo=null,Uk=0;function sn(){throw Error(a(321))}function oh(s,r){if(r===null)return!1;for(var l=0;l<r.length&&l<s.length;l++)if(!rs(s[l],r[l]))return!1;return!0}function lh(s,r,l,u,m,g){return Xa=g,at=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,L.H=s===null||s.memoizedState===null?Rb:Fb,ni=!1,g=l(u,m),ni=!1,fo&&(g=Jv(r,l,u,m)),Xv(s),g}function Xv(s){L.H=Ku;var r=kt!==null&&kt.next!==null;if(Xa=0,un=kt=at=null,Uu=!1,Pl=0,mo=null,r)throw Error(a(300));s===null||Cn||(s=s.dependencies,s!==null&&Ru(s)&&(Cn=!0))}function Jv(s,r,l,u){at=s;var m=0;do{if(fo&&(mo=null),Pl=0,fo=!1,25<=m)throw Error(a(301));if(m+=1,un=kt=null,s.updateQueue!=null){var g=s.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}L.H=Kk,g=r(l,u)}while(fo);return g}function zk(){var s=L.H,r=s.useState()[0];return r=typeof r.then=="function"?Bl(r):r,s=s.useState()[0],(kt!==null?kt.memoizedState:null)!==s&&(at.flags|=1024),r}function ch(){var s=zu!==0;return zu=0,s}function uh(s,r,l){r.updateQueue=s.updateQueue,r.flags&=-2053,s.lanes&=~l}function dh(s){if(Uu){for(s=s.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}Uu=!1}Xa=0,un=kt=at=null,fo=!1,Pl=zu=0,mo=null}function Jn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?at.memoizedState=un=s:un=un.next=s,un}function dn(){if(kt===null){var s=at.alternate;s=s!==null?s.memoizedState:null}else s=kt.next;var r=un===null?at.memoizedState:un.next;if(r!==null)un=r,kt=s;else{if(s===null)throw at.alternate===null?Error(a(467)):Error(a(310));kt=s,s={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},un===null?at.memoizedState=un=s:un=un.next=s}return un}function fh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bl(s){var r=Pl;return Pl+=1,mo===null&&(mo=[]),s=Yv(mo,s,r),r=at,(un===null?r.memoizedState:un.next)===null&&(r=r.alternate,L.H=r===null||r.memoizedState===null?Rb:Fb),s}function Iu(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Bl(s);if(s.$$typeof===M)return qn(s)}throw Error(a(438,String(s)))}function mh(s){var r=null,l=at.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=at.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(m){return m.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=fh(),at.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(s),u=0;u<s;u++)l[u]=X;return r.index++,l}function ja(s,r){return typeof r=="function"?r(s):r}function $u(s){var r=dn();return hh(r,kt,s)}function hh(s,r,l){var u=s.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var m=s.baseQueue,g=u.pending;if(g!==null){if(m!==null){var N=m.next;m.next=g.next,g.next=N}r.baseQueue=m=g,u.pending=null}if(g=s.baseState,m===null)s.memoizedState=g;else{r=m.next;var _=N=null,B=null,K=r,se=!1;do{var oe=K.lane&-536870913;if(oe!==K.lane?(gt&oe)===oe:(Xa&oe)===oe){var G=K.revertLane;if(G===0)B!==null&&(B=B.next={lane:0,revertLane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),oe===lo&&(se=!0);else if((Xa&G)===G){K=K.next,G===lo&&(se=!0);continue}else oe={lane:0,revertLane:K.revertLane,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},B===null?(_=B=oe,N=g):B=B.next=oe,at.lanes|=G,rr|=G;oe=K.action,ni&&l(g,oe),g=K.hasEagerState?K.eagerState:l(g,oe)}else G={lane:oe,revertLane:K.revertLane,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},B===null?(_=B=G,N=g):B=B.next=G,at.lanes|=oe,rr|=oe;K=K.next}while(K!==null&&K!==r);if(B===null?N=g:B.next=_,!rs(g,s.memoizedState)&&(Cn=!0,se&&(l=co,l!==null)))throw l;s.memoizedState=g,s.baseState=N,s.baseQueue=B,u.lastRenderedState=g}return m===null&&(u.lanes=0),[s.memoizedState,u.dispatch]}function ph(s){var r=dn(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=s;var u=l.dispatch,m=l.pending,g=r.memoizedState;if(m!==null){l.pending=null;var N=m=m.next;do g=s(g,N.action),N=N.next;while(N!==m);rs(g,r.memoizedState)||(Cn=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),l.lastRenderedState=g}return[g,u]}function eb(s,r,l){var u=at,m=dn(),g=bt;if(g){if(l===void 0)throw Error(a(407));l=l()}else l=r();var N=!rs((kt||m).memoizedState,l);N&&(m.memoizedState=l,Cn=!0),m=m.queue;var _=sb.bind(null,u,m,s);if(ql(2048,8,_,[s]),m.getSnapshot!==r||N||un!==null&&un.memoizedState.tag&1){if(u.flags|=2048,ho(9,Vu(),nb.bind(null,u,m,l,r),null),Bt===null)throw Error(a(349));g||(Xa&124)!==0||tb(u,r,l)}return l}function tb(s,r,l){s.flags|=16384,s={getSnapshot:r,value:l},r=at.updateQueue,r===null?(r=fh(),at.updateQueue=r,r.stores=[s]):(l=r.stores,l===null?r.stores=[s]:l.push(s))}function nb(s,r,l,u){r.value=l,r.getSnapshot=u,ab(r)&&rb(s)}function sb(s,r,l){return l(function(){ab(r)&&rb(s)})}function ab(s){var r=s.getSnapshot;s=s.value;try{var l=r();return!rs(s,l)}catch{return!0}}function rb(s){var r=ao(s,2);r!==null&&ds(r,s,2)}function gh(s){var r=Jn();if(typeof s=="function"){var l=s;if(s=l(),ni){xn(!0);try{l()}finally{xn(!1)}}}return r.memoizedState=r.baseState=s,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:s},r}function ib(s,r,l,u){return s.baseState=l,hh(s,kt,typeof u=="function"?u:ja)}function Ik(s,r,l,u,m){if(Yu(s))throw Error(a(485));if(s=r.action,s!==null){var g={payload:m,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){g.listeners.push(N)}};L.T!==null?l(!0):g.isTransition=!1,u(g),l=r.pending,l===null?(g.next=r.pending=g,ob(r,g)):(g.next=l.next,r.pending=l.next=g)}}function ob(s,r){var l=r.action,u=r.payload,m=s.state;if(r.isTransition){var g=L.T,N={};L.T=N;try{var _=l(m,u),B=L.S;B!==null&&B(N,_),lb(s,r,_)}catch(K){xh(s,r,K)}finally{L.T=g}}else try{g=l(m,u),lb(s,r,g)}catch(K){xh(s,r,K)}}function lb(s,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){cb(s,r,u)},function(u){return xh(s,r,u)}):cb(s,r,l)}function cb(s,r,l){r.status="fulfilled",r.value=l,ub(r),s.state=l,r=s.pending,r!==null&&(l=r.next,l===r?s.pending=null:(l=l.next,r.next=l,ob(s,l)))}function xh(s,r,l){var u=s.pending;if(s.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,ub(r),r=r.next;while(r!==u)}s.action=null}function ub(s){s=s.listeners;for(var r=0;r<s.length;r++)(0,s[r])()}function db(s,r){return r}function fb(s,r){if(bt){var l=Bt.formState;if(l!==null){e:{var u=at;if(bt){if(Wt){t:{for(var m=Wt,g=Zs;m.nodeType!==8;){if(!g){m=null;break t}if(m=Ps(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){Wt=Ps(m.nextSibling),u=m.data==="F!";break e}}Xr(u)}u=!1}u&&(r=l[0])}}return l=Jn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:db,lastRenderedState:r},l.queue=u,l=Mb.bind(null,at,u),u.dispatch=l,u=gh(!1),g=jh.bind(null,at,!1,u.queue),u=Jn(),m={state:r,dispatch:null,action:s,pending:null},u.queue=m,l=Ik.bind(null,at,m,g,l),m.dispatch=l,u.memoizedState=s,[r,l,!1]}function mb(s){var r=dn();return hb(r,kt,s)}function hb(s,r,l){if(r=hh(s,r,db)[0],s=$u(ja)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=Bl(r)}catch(N){throw N===Ml?Bu:N}else u=r;r=dn();var m=r.queue,g=m.dispatch;return l!==r.memoizedState&&(at.flags|=2048,ho(9,Vu(),$k.bind(null,m,l),null)),[u,g,s]}function $k(s,r){s.action=r}function pb(s){var r=dn(),l=kt;if(l!==null)return hb(r,l,s);dn(),r=r.memoizedState,l=dn();var u=l.queue.dispatch;return l.memoizedState=s,[r,u,!1]}function ho(s,r,l,u){return s={tag:s,create:l,deps:u,inst:r,next:null},r=at.updateQueue,r===null&&(r=fh(),at.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=s.next=s:(u=l.next,l.next=s,s.next=u,r.lastEffect=s),s}function Vu(){return{destroy:void 0,resource:void 0}}function gb(){return dn().memoizedState}function Hu(s,r,l,u){var m=Jn();u=u===void 0?null:u,at.flags|=s,m.memoizedState=ho(1|r,Vu(),l,u)}function ql(s,r,l,u){var m=dn();u=u===void 0?null:u;var g=m.memoizedState.inst;kt!==null&&u!==null&&oh(u,kt.memoizedState.deps)?m.memoizedState=ho(r,g,l,u):(at.flags|=s,m.memoizedState=ho(1|r,g,l,u))}function xb(s,r){Hu(8390656,8,s,r)}function yb(s,r){ql(2048,8,s,r)}function vb(s,r){return ql(4,2,s,r)}function bb(s,r){return ql(4,4,s,r)}function wb(s,r){if(typeof r=="function"){s=s();var l=r(s);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return s=s(),r.current=s,function(){r.current=null}}function jb(s,r,l){l=l!=null?l.concat([s]):null,ql(4,4,wb.bind(null,r,s),l)}function yh(){}function Nb(s,r){var l=dn();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&oh(r,u[1])?u[0]:(l.memoizedState=[s,r],s)}function Cb(s,r){var l=dn();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&oh(r,u[1]))return u[0];if(u=s(),ni){xn(!0);try{s()}finally{xn(!1)}}return l.memoizedState=[u,r],u}function vh(s,r,l){return l===void 0||(Xa&1073741824)!==0?s.memoizedState=r:(s.memoizedState=l,s=A0(),at.lanes|=s,rr|=s,l)}function Sb(s,r,l,u){return rs(l,r)?l:uo.current!==null?(s=vh(s,l,u),rs(s,r)||(Cn=!0),s):(Xa&42)===0?(Cn=!0,s.memoizedState=l):(s=A0(),at.lanes|=s,rr|=s,r)}function Eb(s,r,l,u,m){var g=J.p;J.p=g!==0&&8>g?g:8;var N=L.T,_={};L.T=_,jh(s,!1,r,l);try{var B=m(),K=L.S;if(K!==null&&K(_,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=Lk(B,u);Ll(s,r,se,us(s))}else Ll(s,r,u,us(s))}catch(oe){Ll(s,r,{then:function(){},status:"rejected",reason:oe},us())}finally{J.p=g,L.T=N}}function Vk(){}function bh(s,r,l,u){if(s.tag!==5)throw Error(a(476));var m=Ab(s).queue;Eb(s,m,r,ee,l===null?Vk:function(){return _b(s),l(u)})}function Ab(s){var r=s.memoizedState;if(r!==null)return r;r={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:ee},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:l},next:null},s.memoizedState=r,s=s.alternate,s!==null&&(s.memoizedState=r),r}function _b(s){var r=Ab(s).next.queue;Ll(s,r,{},us())}function wh(){return qn(sc)}function kb(){return dn().memoizedState}function Tb(){return dn().memoizedState}function Hk(s){for(var r=s.return;r!==null;){switch(r.tag){case 24:case 3:var l=us();s=Qa(l);var u=Za(r,s,l);u!==null&&(ds(u,r,l),Dl(u,r,l)),r={cache:Zm()},s.payload=r;return}r=r.return}}function Yk(s,r,l){var u=us();l={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},Yu(s)?Ob(r,l):(l=zm(s,r,l,u),l!==null&&(ds(l,s,u),Db(l,r,u)))}function Mb(s,r,l){var u=us();Ll(s,r,l,u)}function Ll(s,r,l,u){var m={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(Yu(s))Ob(r,m);else{var g=s.alternate;if(s.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var N=r.lastRenderedState,_=g(N,l);if(m.hasEagerState=!0,m.eagerState=_,rs(_,N))return ku(s,r,m,0),Bt===null&&_u(),!1}catch{}if(l=zm(s,r,m,u),l!==null)return ds(l,s,u),Db(l,r,u),!0}return!1}function jh(s,r,l,u){if(u={lane:2,revertLane:ep(),action:u,hasEagerState:!1,eagerState:null,next:null},Yu(s)){if(r)throw Error(a(479))}else r=zm(s,l,u,2),r!==null&&ds(r,s,2)}function Yu(s){var r=s.alternate;return s===at||r!==null&&r===at}function Ob(s,r){fo=Uu=!0;var l=s.pending;l===null?r.next=r:(r.next=l.next,l.next=r),s.pending=r}function Db(s,r,l){if((l&4194048)!==0){var u=r.lanes;u&=s.pendingLanes,l|=u,r.lanes=l,Ir(s,l)}}var Ku={readContext:qn,use:Iu,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn},Rb={readContext:qn,use:Iu,useCallback:function(s,r){return Jn().memoizedState=[s,r===void 0?null:r],s},useContext:qn,useEffect:xb,useImperativeHandle:function(s,r,l){l=l!=null?l.concat([s]):null,Hu(4194308,4,wb.bind(null,r,s),l)},useLayoutEffect:function(s,r){return Hu(4194308,4,s,r)},useInsertionEffect:function(s,r){Hu(4,2,s,r)},useMemo:function(s,r){var l=Jn();r=r===void 0?null:r;var u=s();if(ni){xn(!0);try{s()}finally{xn(!1)}}return l.memoizedState=[u,r],u},useReducer:function(s,r,l){var u=Jn();if(l!==void 0){var m=l(r);if(ni){xn(!0);try{l(r)}finally{xn(!1)}}}else m=r;return u.memoizedState=u.baseState=m,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:m},u.queue=s,s=s.dispatch=Yk.bind(null,at,s),[u.memoizedState,s]},useRef:function(s){var r=Jn();return s={current:s},r.memoizedState=s},useState:function(s){s=gh(s);var r=s.queue,l=Mb.bind(null,at,r);return r.dispatch=l,[s.memoizedState,l]},useDebugValue:yh,useDeferredValue:function(s,r){var l=Jn();return vh(l,s,r)},useTransition:function(){var s=gh(!1);return s=Eb.bind(null,at,s.queue,!0,!1),Jn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,r,l){var u=at,m=Jn();if(bt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Bt===null)throw Error(a(349));(gt&124)!==0||tb(u,r,l)}m.memoizedState=l;var g={value:l,getSnapshot:r};return m.queue=g,xb(sb.bind(null,u,g,s),[s]),u.flags|=2048,ho(9,Vu(),nb.bind(null,u,g,l,r),null),l},useId:function(){var s=Jn(),r=Bt.identifierPrefix;if(bt){var l=va,u=ya;l=(u&~(1<<32-Gt(u)-1)).toString(32)+l,r="«"+r+"R"+l,l=zu++,0<l&&(r+="H"+l.toString(32)),r+="»"}else l=Uk++,r="«"+r+"r"+l.toString(32)+"»";return s.memoizedState=r},useHostTransitionStatus:wh,useFormState:fb,useActionState:fb,useOptimistic:function(s){var r=Jn();r.memoizedState=r.baseState=s;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=jh.bind(null,at,!0,l),l.dispatch=r,[s,r]},useMemoCache:mh,useCacheRefresh:function(){return Jn().memoizedState=Hk.bind(null,at)}},Fb={readContext:qn,use:Iu,useCallback:Nb,useContext:qn,useEffect:yb,useImperativeHandle:jb,useInsertionEffect:vb,useLayoutEffect:bb,useMemo:Cb,useReducer:$u,useRef:gb,useState:function(){return $u(ja)},useDebugValue:yh,useDeferredValue:function(s,r){var l=dn();return Sb(l,kt.memoizedState,s,r)},useTransition:function(){var s=$u(ja)[0],r=dn().memoizedState;return[typeof s=="boolean"?s:Bl(s),r]},useSyncExternalStore:eb,useId:kb,useHostTransitionStatus:wh,useFormState:mb,useActionState:mb,useOptimistic:function(s,r){var l=dn();return ib(l,kt,s,r)},useMemoCache:mh,useCacheRefresh:Tb},Kk={readContext:qn,use:Iu,useCallback:Nb,useContext:qn,useEffect:yb,useImperativeHandle:jb,useInsertionEffect:vb,useLayoutEffect:bb,useMemo:Cb,useReducer:ph,useRef:gb,useState:function(){return ph(ja)},useDebugValue:yh,useDeferredValue:function(s,r){var l=dn();return kt===null?vh(l,s,r):Sb(l,kt.memoizedState,s,r)},useTransition:function(){var s=ph(ja)[0],r=dn().memoizedState;return[typeof s=="boolean"?s:Bl(s),r]},useSyncExternalStore:eb,useId:kb,useHostTransitionStatus:wh,useFormState:pb,useActionState:pb,useOptimistic:function(s,r){var l=dn();return kt!==null?ib(l,kt,s,r):(l.baseState=s,[s,l.queue.dispatch])},useMemoCache:mh,useCacheRefresh:Tb},po=null,Ul=0;function Gu(s){var r=Ul;return Ul+=1,po===null&&(po=[]),Yv(po,s,r)}function zl(s,r){r=r.props.ref,s.ref=r!==void 0?r:null}function Wu(s,r){throw r.$$typeof===v?Error(a(525)):(s=Object.prototype.toString.call(r),Error(a(31,s==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":s)))}function Pb(s){var r=s._init;return r(s._payload)}function Bb(s){function r($,U){if(s){var H=$.deletions;H===null?($.deletions=[U],$.flags|=16):H.push(U)}}function l($,U){if(!s)return null;for(;U!==null;)r($,U),U=U.sibling;return null}function u($){for(var U=new Map;$!==null;)$.key!==null?U.set($.key,$):U.set($.index,$),$=$.sibling;return U}function m($,U){return $=xa($,U),$.index=0,$.sibling=null,$}function g($,U,H){return $.index=H,s?(H=$.alternate,H!==null?(H=H.index,H<U?($.flags|=67108866,U):H):($.flags|=67108866,U)):($.flags|=1048576,U)}function N($){return s&&$.alternate===null&&($.flags|=67108866),$}function _($,U,H,ae){return U===null||U.tag!==6?(U=$m(H,$.mode,ae),U.return=$,U):(U=m(U,H),U.return=$,U)}function B($,U,H,ae){var Oe=H.type;return Oe===E?se($,U,H.props.children,ae,H.key):U!==null&&(U.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===k&&Pb(Oe)===U.type)?(U=m(U,H.props),zl(U,H),U.return=$,U):(U=Mu(H.type,H.key,H.props,null,$.mode,ae),zl(U,H),U.return=$,U)}function K($,U,H,ae){return U===null||U.tag!==4||U.stateNode.containerInfo!==H.containerInfo||U.stateNode.implementation!==H.implementation?(U=Vm(H,$.mode,ae),U.return=$,U):(U=m(U,H.children||[]),U.return=$,U)}function se($,U,H,ae,Oe){return U===null||U.tag!==7?(U=Gr(H,$.mode,ae,Oe),U.return=$,U):(U=m(U,H),U.return=$,U)}function oe($,U,H){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=$m(""+U,$.mode,H),U.return=$,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case b:return H=Mu(U.type,U.key,U.props,null,$.mode,H),zl(H,U),H.return=$,H;case S:return U=Vm(U,$.mode,H),U.return=$,U;case k:var ae=U._init;return U=ae(U._payload),oe($,U,H)}if(me(U)||Y(U))return U=Gr(U,$.mode,H,null),U.return=$,U;if(typeof U.then=="function")return oe($,Gu(U),H);if(U.$$typeof===M)return oe($,Fu($,U),H);Wu($,U)}return null}function G($,U,H,ae){var Oe=U!==null?U.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return Oe!==null?null:_($,U,""+H,ae);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===Oe?B($,U,H,ae):null;case S:return H.key===Oe?K($,U,H,ae):null;case k:return Oe=H._init,H=Oe(H._payload),G($,U,H,ae)}if(me(H)||Y(H))return Oe!==null?null:se($,U,H,ae,null);if(typeof H.then=="function")return G($,U,Gu(H),ae);if(H.$$typeof===M)return G($,U,Fu($,H),ae);Wu($,H)}return null}function Q($,U,H,ae,Oe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return $=$.get(H)||null,_(U,$,""+ae,Oe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return $=$.get(ae.key===null?H:ae.key)||null,B(U,$,ae,Oe);case S:return $=$.get(ae.key===null?H:ae.key)||null,K(U,$,ae,Oe);case k:var lt=ae._init;return ae=lt(ae._payload),Q($,U,H,ae,Oe)}if(me(ae)||Y(ae))return $=$.get(H)||null,se(U,$,ae,Oe,null);if(typeof ae.then=="function")return Q($,U,H,Gu(ae),Oe);if(ae.$$typeof===M)return Q($,U,H,Fu(U,ae),Oe);Wu(U,ae)}return null}function Ye($,U,H,ae){for(var Oe=null,lt=null,Le=U,Ve=U=0,En=null;Le!==null&&Ve<H.length;Ve++){Le.index>Ve?(En=Le,Le=null):En=Le.sibling;var yt=G($,Le,H[Ve],ae);if(yt===null){Le===null&&(Le=En);break}s&&Le&&yt.alternate===null&&r($,Le),U=g(yt,U,Ve),lt===null?Oe=yt:lt.sibling=yt,lt=yt,Le=En}if(Ve===H.length)return l($,Le),bt&&Qr($,Ve),Oe;if(Le===null){for(;Ve<H.length;Ve++)Le=oe($,H[Ve],ae),Le!==null&&(U=g(Le,U,Ve),lt===null?Oe=Le:lt.sibling=Le,lt=Le);return bt&&Qr($,Ve),Oe}for(Le=u(Le);Ve<H.length;Ve++)En=Q(Le,$,Ve,H[Ve],ae),En!==null&&(s&&En.alternate!==null&&Le.delete(En.key===null?Ve:En.key),U=g(En,U,Ve),lt===null?Oe=En:lt.sibling=En,lt=En);return s&&Le.forEach(function(hr){return r($,hr)}),bt&&Qr($,Ve),Oe}function $e($,U,H,ae){if(H==null)throw Error(a(151));for(var Oe=null,lt=null,Le=U,Ve=U=0,En=null,yt=H.next();Le!==null&&!yt.done;Ve++,yt=H.next()){Le.index>Ve?(En=Le,Le=null):En=Le.sibling;var hr=G($,Le,yt.value,ae);if(hr===null){Le===null&&(Le=En);break}s&&Le&&hr.alternate===null&&r($,Le),U=g(hr,U,Ve),lt===null?Oe=hr:lt.sibling=hr,lt=hr,Le=En}if(yt.done)return l($,Le),bt&&Qr($,Ve),Oe;if(Le===null){for(;!yt.done;Ve++,yt=H.next())yt=oe($,yt.value,ae),yt!==null&&(U=g(yt,U,Ve),lt===null?Oe=yt:lt.sibling=yt,lt=yt);return bt&&Qr($,Ve),Oe}for(Le=u(Le);!yt.done;Ve++,yt=H.next())yt=Q(Le,$,Ve,yt.value,ae),yt!==null&&(s&&yt.alternate!==null&&Le.delete(yt.key===null?Ve:yt.key),U=g(yt,U,Ve),lt===null?Oe=yt:lt.sibling=yt,lt=yt);return s&&Le.forEach(function(GT){return r($,GT)}),bt&&Qr($,Ve),Oe}function Mt($,U,H,ae){if(typeof H=="object"&&H!==null&&H.type===E&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var Oe=H.key;U!==null;){if(U.key===Oe){if(Oe=H.type,Oe===E){if(U.tag===7){l($,U.sibling),ae=m(U,H.props.children),ae.return=$,$=ae;break e}}else if(U.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===k&&Pb(Oe)===U.type){l($,U.sibling),ae=m(U,H.props),zl(ae,H),ae.return=$,$=ae;break e}l($,U);break}else r($,U);U=U.sibling}H.type===E?(ae=Gr(H.props.children,$.mode,ae,H.key),ae.return=$,$=ae):(ae=Mu(H.type,H.key,H.props,null,$.mode,ae),zl(ae,H),ae.return=$,$=ae)}return N($);case S:e:{for(Oe=H.key;U!==null;){if(U.key===Oe)if(U.tag===4&&U.stateNode.containerInfo===H.containerInfo&&U.stateNode.implementation===H.implementation){l($,U.sibling),ae=m(U,H.children||[]),ae.return=$,$=ae;break e}else{l($,U);break}else r($,U);U=U.sibling}ae=Vm(H,$.mode,ae),ae.return=$,$=ae}return N($);case k:return Oe=H._init,H=Oe(H._payload),Mt($,U,H,ae)}if(me(H))return Ye($,U,H,ae);if(Y(H)){if(Oe=Y(H),typeof Oe!="function")throw Error(a(150));return H=Oe.call(H),$e($,U,H,ae)}if(typeof H.then=="function")return Mt($,U,Gu(H),ae);if(H.$$typeof===M)return Mt($,U,Fu($,H),ae);Wu($,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,U!==null&&U.tag===6?(l($,U.sibling),ae=m(U,H),ae.return=$,$=ae):(l($,U),ae=$m(H,$.mode,ae),ae.return=$,$=ae),N($)):l($,U)}return function($,U,H,ae){try{Ul=0;var Oe=Mt($,U,H,ae);return po=null,Oe}catch(Le){if(Le===Ml||Le===Bu)throw Le;var lt=is(29,Le,null,$.mode);return lt.lanes=ae,lt.return=$,lt}}}var go=Bb(!0),qb=Bb(!1),_s=W(null),Xs=null;function Ja(s){var r=s.alternate;ce(vn,vn.current&1),ce(_s,s),Xs===null&&(r===null||uo.current!==null||r.memoizedState!==null)&&(Xs=s)}function Lb(s){if(s.tag===22){if(ce(vn,vn.current),ce(_s,s),Xs===null){var r=s.alternate;r!==null&&r.memoizedState!==null&&(Xs=s)}}else er()}function er(){ce(vn,vn.current),ce(_s,_s.current)}function Na(s){ue(_s),Xs===s&&(Xs=null),ue(vn)}var vn=W(0);function Qu(s){for(var r=s;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||fp(l)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Nh(s,r,l,u){r=s.memoizedState,l=l(u,r),l=l==null?r:y({},r,l),s.memoizedState=l,s.lanes===0&&(s.updateQueue.baseState=l)}var Ch={enqueueSetState:function(s,r,l){s=s._reactInternals;var u=us(),m=Qa(u);m.payload=r,l!=null&&(m.callback=l),r=Za(s,m,u),r!==null&&(ds(r,s,u),Dl(r,s,u))},enqueueReplaceState:function(s,r,l){s=s._reactInternals;var u=us(),m=Qa(u);m.tag=1,m.payload=r,l!=null&&(m.callback=l),r=Za(s,m,u),r!==null&&(ds(r,s,u),Dl(r,s,u))},enqueueForceUpdate:function(s,r){s=s._reactInternals;var l=us(),u=Qa(l);u.tag=2,r!=null&&(u.callback=r),r=Za(s,u,l),r!==null&&(ds(r,s,l),Dl(r,s,l))}};function Ub(s,r,l,u,m,g,N){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(u,g,N):r.prototype&&r.prototype.isPureReactComponent?!Nl(l,u)||!Nl(m,g):!0}function zb(s,r,l,u){s=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==s&&Ch.enqueueReplaceState(r,r.state,null)}function si(s,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(s=s.defaultProps){l===r&&(l=y({},l));for(var m in s)l[m]===void 0&&(l[m]=s[m])}return l}var Zu=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)};function Ib(s){Zu(s)}function $b(s){console.error(s)}function Vb(s){Zu(s)}function Xu(s,r){try{var l=s.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Hb(s,r,l){try{var u=s.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Sh(s,r,l){return l=Qa(l),l.tag=3,l.payload={element:null},l.callback=function(){Xu(s,r)},l}function Yb(s){return s=Qa(s),s.tag=3,s}function Kb(s,r,l,u){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var g=u.value;s.payload=function(){return m(g)},s.callback=function(){Hb(r,l,u)}}var N=l.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(s.callback=function(){Hb(r,l,u),typeof m!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function Gk(s,r,l,u,m){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&_l(r,l,m,!0),l=_s.current,l!==null){switch(l.tag){case 13:return Xs===null?Wh():l.alternate===null&&Qt===0&&(Qt=3),l.flags&=-257,l.flags|=65536,l.lanes=m,u===eh?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Zh(s,u,m)),!1;case 22:return l.flags|=65536,u===eh?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Zh(s,u,m)),!1}throw Error(a(435,l.tag))}return Zh(s,u,m),Wh(),!1}if(bt)return r=_s.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=m,u!==Km&&(s=Error(a(422),{cause:u}),Al(Cs(s,l)))):(u!==Km&&(r=Error(a(423),{cause:u}),Al(Cs(r,l))),s=s.current.alternate,s.flags|=65536,m&=-m,s.lanes|=m,u=Cs(u,l),m=Sh(s.stateNode,u,m),sh(s,m),Qt!==4&&(Qt=2)),!1;var g=Error(a(520),{cause:u});if(g=Cs(g,l),Gl===null?Gl=[g]:Gl.push(g),Qt!==4&&(Qt=2),r===null)return!0;u=Cs(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,s=m&-m,l.lanes|=s,s=Sh(l.stateNode,u,s),sh(l,s),!1;case 1:if(r=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ir===null||!ir.has(g))))return l.flags|=65536,m&=-m,l.lanes|=m,m=Yb(m),Kb(m,s,l,u),sh(l,m),!1}l=l.return}while(l!==null);return!1}var Gb=Error(a(461)),Cn=!1;function _n(s,r,l,u){r.child=s===null?qb(r,null,l,u):go(r,s.child,l,u)}function Wb(s,r,l,u,m){l=l.render;var g=r.ref;if("ref"in u){var N={};for(var _ in u)_!=="ref"&&(N[_]=u[_])}else N=u;return ei(r),u=lh(s,r,l,N,g,m),_=ch(),s!==null&&!Cn?(uh(s,r,m),Ca(s,r,m)):(bt&&_&&Hm(r),r.flags|=1,_n(s,r,u,m),r.child)}function Qb(s,r,l,u,m){if(s===null){var g=l.type;return typeof g=="function"&&!Im(g)&&g.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=g,Zb(s,r,g,u,m)):(s=Mu(l.type,null,u,r,r.mode,m),s.ref=r.ref,s.return=r,r.child=s)}if(g=s.child,!Dh(s,m)){var N=g.memoizedProps;if(l=l.compare,l=l!==null?l:Nl,l(N,u)&&s.ref===r.ref)return Ca(s,r,m)}return r.flags|=1,s=xa(g,u),s.ref=r.ref,s.return=r,r.child=s}function Zb(s,r,l,u,m){if(s!==null){var g=s.memoizedProps;if(Nl(g,u)&&s.ref===r.ref)if(Cn=!1,r.pendingProps=u=g,Dh(s,m))(s.flags&131072)!==0&&(Cn=!0);else return r.lanes=s.lanes,Ca(s,r,m)}return Eh(s,r,l,u,m)}function Xb(s,r,l){var u=r.pendingProps,m=u.children,g=s!==null?s.memoizedState:null;if(u.mode==="hidden"){if((r.flags&128)!==0){if(u=g!==null?g.baseLanes|l:l,s!==null){for(m=r.child=s.child,g=0;m!==null;)g=g|m.lanes|m.childLanes,m=m.sibling;r.childLanes=g&~u}else r.childLanes=0,r.child=null;return Jb(s,r,u,l)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},s!==null&&Pu(r,g!==null?g.cachePool:null),g!==null?Zv(r,g):rh(),Lb(r);else return r.lanes=r.childLanes=536870912,Jb(s,r,g!==null?g.baseLanes|l:l,l)}else g!==null?(Pu(r,g.cachePool),Zv(r,g),er(),r.memoizedState=null):(s!==null&&Pu(r,null),rh(),er());return _n(s,r,m,l),r.child}function Jb(s,r,l,u){var m=Jm();return m=m===null?null:{parent:yn._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},s!==null&&Pu(r,null),rh(),Lb(r),s!==null&&_l(s,r,u,!0),null}function Ju(s,r){var l=r.ref;if(l===null)s!==null&&s.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(s===null||s.ref!==l)&&(r.flags|=4194816)}}function Eh(s,r,l,u,m){return ei(r),l=lh(s,r,l,u,void 0,m),u=ch(),s!==null&&!Cn?(uh(s,r,m),Ca(s,r,m)):(bt&&u&&Hm(r),r.flags|=1,_n(s,r,l,m),r.child)}function e0(s,r,l,u,m,g){return ei(r),r.updateQueue=null,l=Jv(r,u,l,m),Xv(s),u=ch(),s!==null&&!Cn?(uh(s,r,g),Ca(s,r,g)):(bt&&u&&Hm(r),r.flags|=1,_n(s,r,l,g),r.child)}function t0(s,r,l,u,m){if(ei(r),r.stateNode===null){var g=ro,N=l.contextType;typeof N=="object"&&N!==null&&(g=qn(N)),g=new l(u,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Ch,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=u,g.state=r.memoizedState,g.refs={},th(r),N=l.contextType,g.context=typeof N=="object"&&N!==null?qn(N):ro,g.state=r.memoizedState,N=l.getDerivedStateFromProps,typeof N=="function"&&(Nh(r,l,N,u),g.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(N=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),N!==g.state&&Ch.enqueueReplaceState(g,g.state,null),Fl(r,u,g,m),Rl(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(s===null){g=r.stateNode;var _=r.memoizedProps,B=si(l,_);g.props=B;var K=g.context,se=l.contextType;N=ro,typeof se=="object"&&se!==null&&(N=qn(se));var oe=l.getDerivedStateFromProps;se=typeof oe=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,se||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||K!==N)&&zb(r,g,u,N),Wa=!1;var G=r.memoizedState;g.state=G,Fl(r,u,g,m),Rl(),K=r.memoizedState,_||G!==K||Wa?(typeof oe=="function"&&(Nh(r,l,oe,u),K=r.memoizedState),(B=Wa||Ub(r,l,B,u,G,K,N))?(se||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=K),g.props=u,g.state=K,g.context=N,u=B):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{g=r.stateNode,nh(s,r),N=r.memoizedProps,se=si(l,N),g.props=se,oe=r.pendingProps,G=g.context,K=l.contextType,B=ro,typeof K=="object"&&K!==null&&(B=qn(K)),_=l.getDerivedStateFromProps,(K=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(N!==oe||G!==B)&&zb(r,g,u,B),Wa=!1,G=r.memoizedState,g.state=G,Fl(r,u,g,m),Rl();var Q=r.memoizedState;N!==oe||G!==Q||Wa||s!==null&&s.dependencies!==null&&Ru(s.dependencies)?(typeof _=="function"&&(Nh(r,l,_,u),Q=r.memoizedState),(se=Wa||Ub(r,l,se,u,G,Q,B)||s!==null&&s.dependencies!==null&&Ru(s.dependencies))?(K||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,Q,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,Q,B)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||N===s.memoizedProps&&G===s.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&G===s.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Q),g.props=u,g.state=Q,g.context=B,u=se):(typeof g.componentDidUpdate!="function"||N===s.memoizedProps&&G===s.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&G===s.memoizedState||(r.flags|=1024),u=!1)}return g=u,Ju(s,r),u=(r.flags&128)!==0,g||u?(g=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,s!==null&&u?(r.child=go(r,s.child,null,m),r.child=go(r,null,l,m)):_n(s,r,l,m),r.memoizedState=g.state,s=r.child):s=Ca(s,r,m),s}function n0(s,r,l,u){return El(),r.flags|=256,_n(s,r,l,u),r.child}var Ah={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _h(s){return{baseLanes:s,cachePool:$v()}}function kh(s,r,l){return s=s!==null?s.childLanes&~l:0,r&&(s|=ks),s}function s0(s,r,l){var u=r.pendingProps,m=!1,g=(r.flags&128)!==0,N;if((N=g)||(N=s!==null&&s.memoizedState===null?!1:(vn.current&2)!==0),N&&(m=!0,r.flags&=-129),N=(r.flags&32)!==0,r.flags&=-33,s===null){if(bt){if(m?Ja(r):er(),bt){var _=Wt,B;if(B=_){e:{for(B=_,_=Zs;B.nodeType!==8;){if(!_){_=null;break e}if(B=Ps(B.nextSibling),B===null){_=null;break e}}_=B}_!==null?(r.memoizedState={dehydrated:_,treeContext:Wr!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},B=is(18,null,null,0),B.stateNode=_,B.return=r,r.child=B,Yn=r,Wt=null,B=!0):B=!1}B||Xr(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return fp(_)?r.lanes=32:r.lanes=536870912,null;Na(r)}return _=u.children,u=u.fallback,m?(er(),m=r.mode,_=ed({mode:"hidden",children:_},m),u=Gr(u,m,l,null),_.return=r,u.return=r,_.sibling=u,r.child=_,m=r.child,m.memoizedState=_h(l),m.childLanes=kh(s,N,l),r.memoizedState=Ah,u):(Ja(r),Th(r,_))}if(B=s.memoizedState,B!==null&&(_=B.dehydrated,_!==null)){if(g)r.flags&256?(Ja(r),r.flags&=-257,r=Mh(s,r,l)):r.memoizedState!==null?(er(),r.child=s.child,r.flags|=128,r=null):(er(),m=u.fallback,_=r.mode,u=ed({mode:"visible",children:u.children},_),m=Gr(m,_,l,null),m.flags|=2,u.return=r,m.return=r,u.sibling=m,r.child=u,go(r,s.child,null,l),u=r.child,u.memoizedState=_h(l),u.childLanes=kh(s,N,l),r.memoizedState=Ah,r=m);else if(Ja(r),fp(_)){if(N=_.nextSibling&&_.nextSibling.dataset,N)var K=N.dgst;N=K,u=Error(a(419)),u.stack="",u.digest=N,Al({value:u,source:null,stack:null}),r=Mh(s,r,l)}else if(Cn||_l(s,r,l,!1),N=(l&s.childLanes)!==0,Cn||N){if(N=Bt,N!==null&&(u=l&-l,u=(u&42)!==0?1:$r(u),u=(u&(N.suspendedLanes|l))!==0?0:u,u!==0&&u!==B.retryLane))throw B.retryLane=u,ao(s,u),ds(N,s,u),Gb;_.data==="$?"||Wh(),r=Mh(s,r,l)}else _.data==="$?"?(r.flags|=192,r.child=s.child,r=null):(s=B.treeContext,Wt=Ps(_.nextSibling),Yn=r,bt=!0,Zr=null,Zs=!1,s!==null&&(Es[As++]=ya,Es[As++]=va,Es[As++]=Wr,ya=s.id,va=s.overflow,Wr=r),r=Th(r,u.children),r.flags|=4096);return r}return m?(er(),m=u.fallback,_=r.mode,B=s.child,K=B.sibling,u=xa(B,{mode:"hidden",children:u.children}),u.subtreeFlags=B.subtreeFlags&65011712,K!==null?m=xa(K,m):(m=Gr(m,_,l,null),m.flags|=2),m.return=r,u.return=r,u.sibling=m,r.child=u,u=m,m=r.child,_=s.child.memoizedState,_===null?_=_h(l):(B=_.cachePool,B!==null?(K=yn._currentValue,B=B.parent!==K?{parent:K,pool:K}:B):B=$v(),_={baseLanes:_.baseLanes|l,cachePool:B}),m.memoizedState=_,m.childLanes=kh(s,N,l),r.memoizedState=Ah,u):(Ja(r),l=s.child,s=l.sibling,l=xa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,s!==null&&(N=r.deletions,N===null?(r.deletions=[s],r.flags|=16):N.push(s)),r.child=l,r.memoizedState=null,l)}function Th(s,r){return r=ed({mode:"visible",children:r},s.mode),r.return=s,s.child=r}function ed(s,r){return s=is(22,s,null,r),s.lanes=0,s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},s}function Mh(s,r,l){return go(r,s.child,null,l),s=Th(r,r.pendingProps.children),s.flags|=2,r.memoizedState=null,s}function a0(s,r,l){s.lanes|=r;var u=s.alternate;u!==null&&(u.lanes|=r),Wm(s.return,r,l)}function Oh(s,r,l,u,m){var g=s.memoizedState;g===null?s.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:m}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=u,g.tail=l,g.tailMode=m)}function r0(s,r,l){var u=r.pendingProps,m=u.revealOrder,g=u.tail;if(_n(s,r,u.children,l),u=vn.current,(u&2)!==0)u=u&1|2,r.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=r.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&a0(s,l,r);else if(s.tag===19)a0(s,l,r);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}u&=1}switch(ce(vn,u),m){case"forwards":for(l=r.child,m=null;l!==null;)s=l.alternate,s!==null&&Qu(s)===null&&(m=l),l=l.sibling;l=m,l===null?(m=r.child,r.child=null):(m=l.sibling,l.sibling=null),Oh(r,!1,m,l,g);break;case"backwards":for(l=null,m=r.child,r.child=null;m!==null;){if(s=m.alternate,s!==null&&Qu(s)===null){r.child=m;break}s=m.sibling,m.sibling=l,l=m,m=s}Oh(r,!0,l,null,g);break;case"together":Oh(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Ca(s,r,l){if(s!==null&&(r.dependencies=s.dependencies),rr|=r.lanes,(l&r.childLanes)===0)if(s!==null){if(_l(s,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(s!==null&&r.child!==s.child)throw Error(a(153));if(r.child!==null){for(s=r.child,l=xa(s,s.pendingProps),r.child=l,l.return=r;s.sibling!==null;)s=s.sibling,l=l.sibling=xa(s,s.pendingProps),l.return=r;l.sibling=null}return r.child}function Dh(s,r){return(s.lanes&r)!==0?!0:(s=s.dependencies,!!(s!==null&&Ru(s)))}function Wk(s,r,l){switch(r.tag){case 3:Te(r,r.stateNode.containerInfo),Ga(r,yn,s.memoizedState.cache),El();break;case 27:case 5:Re(r);break;case 4:Te(r,r.stateNode.containerInfo);break;case 10:Ga(r,r.type,r.memoizedProps.value);break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ja(r),r.flags|=128,null):(l&r.child.childLanes)!==0?s0(s,r,l):(Ja(r),s=Ca(s,r,l),s!==null?s.sibling:null);Ja(r);break;case 19:var m=(s.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(_l(s,r,l,!1),u=(l&r.childLanes)!==0),m){if(u)return r0(s,r,l);r.flags|=128}if(m=r.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ce(vn,vn.current),u)break;return null;case 22:case 23:return r.lanes=0,Xb(s,r,l);case 24:Ga(r,yn,s.memoizedState.cache)}return Ca(s,r,l)}function i0(s,r,l){if(s!==null)if(s.memoizedProps!==r.pendingProps)Cn=!0;else{if(!Dh(s,l)&&(r.flags&128)===0)return Cn=!1,Wk(s,r,l);Cn=(s.flags&131072)!==0}else Cn=!1,bt&&(r.flags&1048576)!==0&&Pv(r,Du,r.index);switch(r.lanes=0,r.tag){case 16:e:{s=r.pendingProps;var u=r.elementType,m=u._init;if(u=m(u._payload),r.type=u,typeof u=="function")Im(u)?(s=si(u,s),r.tag=1,r=t0(null,r,u,s,l)):(r.tag=0,r=Eh(null,r,u,s,l));else{if(u!=null){if(m=u.$$typeof,m===R){r.tag=11,r=Wb(null,r,u,s,l);break e}else if(m===F){r.tag=14,r=Qb(null,r,u,s,l);break e}}throw r=Z(u)||u,Error(a(306,r,""))}}return r;case 0:return Eh(s,r,r.type,r.pendingProps,l);case 1:return u=r.type,m=si(u,r.pendingProps),t0(s,r,u,m,l);case 3:e:{if(Te(r,r.stateNode.containerInfo),s===null)throw Error(a(387));u=r.pendingProps;var g=r.memoizedState;m=g.element,nh(s,r),Fl(r,u,null,l);var N=r.memoizedState;if(u=N.cache,Ga(r,yn,u),u!==g.cache&&Qm(r,[yn],l,!0),Rl(),u=N.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:N.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=n0(s,r,u,l);break e}else if(u!==m){m=Cs(Error(a(424)),r),Al(m),r=n0(s,r,u,l);break e}else for(s=r.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,Wt=Ps(s.firstChild),Yn=r,bt=!0,Zr=null,Zs=!0,l=qb(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(El(),u===m){r=Ca(s,r,l);break e}_n(s,r,u,l)}r=r.child}return r;case 26:return Ju(s,r),s===null?(l=u1(r.type,null,r.pendingProps,null))?r.memoizedState=l:bt||(l=r.type,s=r.pendingProps,u=hd(xe.current).createElement(l),u[Bn]=r,u[Zn]=s,Tn(u,l,s),Nn(u),r.stateNode=u):r.memoizedState=u1(r.type,s.memoizedProps,r.pendingProps,s.memoizedState),null;case 27:return Re(r),s===null&&bt&&(u=r.stateNode=o1(r.type,r.pendingProps,xe.current),Yn=r,Zs=!0,m=Wt,cr(r.type)?(mp=m,Wt=Ps(u.firstChild)):Wt=m),_n(s,r,r.pendingProps.children,l),Ju(s,r),s===null&&(r.flags|=4194304),r.child;case 5:return s===null&&bt&&((m=u=Wt)&&(u=NT(u,r.type,r.pendingProps,Zs),u!==null?(r.stateNode=u,Yn=r,Wt=Ps(u.firstChild),Zs=!1,m=!0):m=!1),m||Xr(r)),Re(r),m=r.type,g=r.pendingProps,N=s!==null?s.memoizedProps:null,u=g.children,cp(m,g)?u=null:N!==null&&cp(m,N)&&(r.flags|=32),r.memoizedState!==null&&(m=lh(s,r,zk,null,null,l),sc._currentValue=m),Ju(s,r),_n(s,r,u,l),r.child;case 6:return s===null&&bt&&((s=l=Wt)&&(l=CT(l,r.pendingProps,Zs),l!==null?(r.stateNode=l,Yn=r,Wt=null,s=!0):s=!1),s||Xr(r)),null;case 13:return s0(s,r,l);case 4:return Te(r,r.stateNode.containerInfo),u=r.pendingProps,s===null?r.child=go(r,null,u,l):_n(s,r,u,l),r.child;case 11:return Wb(s,r,r.type,r.pendingProps,l);case 7:return _n(s,r,r.pendingProps,l),r.child;case 8:return _n(s,r,r.pendingProps.children,l),r.child;case 12:return _n(s,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Ga(r,r.type,u.value),_n(s,r,u.children,l),r.child;case 9:return m=r.type._context,u=r.pendingProps.children,ei(r),m=qn(m),u=u(m),r.flags|=1,_n(s,r,u,l),r.child;case 14:return Qb(s,r,r.type,r.pendingProps,l);case 15:return Zb(s,r,r.type,r.pendingProps,l);case 19:return r0(s,r,l);case 31:return u=r.pendingProps,l=r.mode,u={mode:u.mode,children:u.children},s===null?(l=ed(u,l),l.ref=r.ref,r.child=l,l.return=r,r=l):(l=xa(s.child,u),l.ref=r.ref,r.child=l,l.return=r,r=l),r;case 22:return Xb(s,r,l);case 24:return ei(r),u=qn(yn),s===null?(m=Jm(),m===null&&(m=Bt,g=Zm(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=l),m=g),r.memoizedState={parent:u,cache:m},th(r),Ga(r,yn,m)):((s.lanes&l)!==0&&(nh(s,r),Fl(r,null,null,l),Rl()),m=s.memoizedState,g=r.memoizedState,m.parent!==u?(m={parent:u,cache:u},r.memoizedState=m,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=m),Ga(r,yn,u)):(u=g.cache,Ga(r,yn,u),u!==m.cache&&Qm(r,[yn],l,!0))),_n(s,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Sa(s){s.flags|=4}function o0(s,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!p1(r)){if(r=_s.current,r!==null&&((gt&4194048)===gt?Xs!==null:(gt&62914560)!==gt&&(gt&536870912)===0||r!==Xs))throw Ol=eh,Vv;s.flags|=8192}}function td(s,r){r!==null&&(s.flags|=4),s.flags&16384&&(r=s.tag!==22?Ke():536870912,s.lanes|=r,bo|=r)}function Il(s,r){if(!bt)switch(s.tailMode){case"hidden":r=s.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?s.tail=null:l.sibling=null;break;case"collapsed":l=s.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||s.tail===null?s.tail=null:s.tail.sibling=null:u.sibling=null}}function It(s){var r=s.alternate!==null&&s.alternate.child===s.child,l=0,u=0;if(r)for(var m=s.child;m!==null;)l|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=s,m=m.sibling;else for(m=s.child;m!==null;)l|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=s,m=m.sibling;return s.subtreeFlags|=u,s.childLanes=l,r}function Qk(s,r,l){var u=r.pendingProps;switch(Ym(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(r),null;case 1:return It(r),null;case 3:return l=r.stateNode,u=null,s!==null&&(u=s.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),wa(yn),le(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(s===null||s.child===null)&&(Sl(r)?Sa(r):s===null||s.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Lv())),It(r),null;case 26:return l=r.memoizedState,s===null?(Sa(r),l!==null?(It(r),o0(r,l)):(It(r),r.flags&=-16777217)):l?l!==s.memoizedState?(Sa(r),It(r),o0(r,l)):(It(r),r.flags&=-16777217):(s.memoizedProps!==u&&Sa(r),It(r),r.flags&=-16777217),null;case 27:Pe(r),l=xe.current;var m=r.type;if(s!==null&&r.stateNode!=null)s.memoizedProps!==u&&Sa(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return It(r),null}s=ye.current,Sl(r)?Bv(r):(s=o1(m,u,l),r.stateNode=s,Sa(r))}return It(r),null;case 5:if(Pe(r),l=r.type,s!==null&&r.stateNode!=null)s.memoizedProps!==u&&Sa(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return It(r),null}if(s=ye.current,Sl(r))Bv(r);else{switch(m=hd(xe.current),s){case 1:s=m.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:s=m.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":s=m.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":s=m.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":s=m.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof u.is=="string"?m.createElement("select",{is:u.is}):m.createElement("select"),u.multiple?s.multiple=!0:u.size&&(s.size=u.size);break;default:s=typeof u.is=="string"?m.createElement(l,{is:u.is}):m.createElement(l)}}s[Bn]=r,s[Zn]=u;e:for(m=r.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===r)break e;for(;m.sibling===null;){if(m.return===null||m.return===r)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}r.stateNode=s;e:switch(Tn(s,l,u),l){case"button":case"input":case"select":case"textarea":s=!!u.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Sa(r)}}return It(r),r.flags&=-16777217,null;case 6:if(s&&r.stateNode!=null)s.memoizedProps!==u&&Sa(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(s=xe.current,Sl(r)){if(s=r.stateNode,l=r.memoizedProps,u=null,m=Yn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}s[Bn]=r,s=!!(s.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||e1(s.nodeValue,l)),s||Xr(r)}else s=hd(s).createTextNode(u),s[Bn]=r,r.stateNode=s}return It(r),null;case 13:if(u=r.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(m=Sl(r),u!==null&&u.dehydrated!==null){if(s===null){if(!m)throw Error(a(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Bn]=r}else El(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;It(r),m=!1}else m=Lv(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),m=!0;if(!m)return r.flags&256?(Na(r),r):(Na(r),null)}if(Na(r),(r.flags&128)!==0)return r.lanes=l,r;if(l=u!==null,s=s!==null&&s.memoizedState!==null,l){u=r.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool);var g=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048)}return l!==s&&l&&(r.child.flags|=8192),td(r,r.updateQueue),It(r),null;case 4:return le(),s===null&&ap(r.stateNode.containerInfo),It(r),null;case 10:return wa(r.type),It(r),null;case 19:if(ue(vn),m=r.memoizedState,m===null)return It(r),null;if(u=(r.flags&128)!==0,g=m.rendering,g===null)if(u)Il(m,!1);else{if(Qt!==0||s!==null&&(s.flags&128)!==0)for(s=r.child;s!==null;){if(g=Qu(s),g!==null){for(r.flags|=128,Il(m,!1),s=g.updateQueue,r.updateQueue=s,td(r,s),r.subtreeFlags=0,s=l,l=r.child;l!==null;)Fv(l,s),l=l.sibling;return ce(vn,vn.current&1|2),r.child}s=s.sibling}m.tail!==null&&zt()>ad&&(r.flags|=128,u=!0,Il(m,!1),r.lanes=4194304)}else{if(!u)if(s=Qu(g),s!==null){if(r.flags|=128,u=!0,s=s.updateQueue,r.updateQueue=s,td(r,s),Il(m,!0),m.tail===null&&m.tailMode==="hidden"&&!g.alternate&&!bt)return It(r),null}else 2*zt()-m.renderingStartTime>ad&&l!==536870912&&(r.flags|=128,u=!0,Il(m,!1),r.lanes=4194304);m.isBackwards?(g.sibling=r.child,r.child=g):(s=m.last,s!==null?s.sibling=g:r.child=g,m.last=g)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=zt(),r.sibling=null,s=vn.current,ce(vn,u?s&1|2:s&1),r):(It(r),null);case 22:case 23:return Na(r),ih(),u=r.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(It(r),r.subtreeFlags&6&&(r.flags|=8192)):It(r),l=r.updateQueue,l!==null&&td(r,l.retryQueue),l=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),s!==null&&ue(ti),null;case 24:return l=null,s!==null&&(l=s.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),wa(yn),It(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function Zk(s,r){switch(Ym(r),r.tag){case 1:return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 3:return wa(yn),le(),s=r.flags,(s&65536)!==0&&(s&128)===0?(r.flags=s&-65537|128,r):null;case 26:case 27:case 5:return Pe(r),null;case 13:if(Na(r),s=r.memoizedState,s!==null&&s.dehydrated!==null){if(r.alternate===null)throw Error(a(340));El()}return s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 19:return ue(vn),null;case 4:return le(),null;case 10:return wa(r.type),null;case 22:case 23:return Na(r),ih(),s!==null&&ue(ti),s=r.flags,s&65536?(r.flags=s&-65537|128,r):null;case 24:return wa(yn),null;case 25:return null;default:return null}}function l0(s,r){switch(Ym(r),r.tag){case 3:wa(yn),le();break;case 26:case 27:case 5:Pe(r);break;case 4:le();break;case 13:Na(r);break;case 19:ue(vn);break;case 10:wa(r.type);break;case 22:case 23:Na(r),ih(),s!==null&&ue(ti);break;case 24:wa(yn)}}function $l(s,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var m=u.next;l=m;do{if((l.tag&s)===s){u=void 0;var g=l.create,N=l.inst;u=g(),N.destroy=u}l=l.next}while(l!==m)}}catch(_){Ft(r,r.return,_)}}function tr(s,r,l){try{var u=r.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&s)===s){var N=u.inst,_=N.destroy;if(_!==void 0){N.destroy=void 0,m=r;var B=l,K=_;try{K()}catch(se){Ft(m,B,se)}}}u=u.next}while(u!==g)}}catch(se){Ft(r,r.return,se)}}function c0(s){var r=s.updateQueue;if(r!==null){var l=s.stateNode;try{Qv(r,l)}catch(u){Ft(s,s.return,u)}}}function u0(s,r,l){l.props=si(s.type,s.memoizedProps),l.state=s.memoizedState;try{l.componentWillUnmount()}catch(u){Ft(s,r,u)}}function Vl(s,r){try{var l=s.ref;if(l!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof l=="function"?s.refCleanup=l(u):l.current=u}}catch(m){Ft(s,r,m)}}function Js(s,r){var l=s.ref,u=s.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(m){Ft(s,r,m)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){Ft(s,r,m)}else l.current=null}function d0(s){var r=s.type,l=s.memoizedProps,u=s.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(m){Ft(s,s.return,m)}}function Rh(s,r,l){try{var u=s.stateNode;yT(u,s.type,l,r),u[Zn]=r}catch(m){Ft(s,s.return,m)}}function f0(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&cr(s.type)||s.tag===4}function Fh(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||f0(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&cr(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Ph(s,r,l){var u=s.tag;if(u===5||u===6)s=s.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(s,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(s),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=md));else if(u!==4&&(u===27&&cr(s.type)&&(l=s.stateNode,r=null),s=s.child,s!==null))for(Ph(s,r,l),s=s.sibling;s!==null;)Ph(s,r,l),s=s.sibling}function nd(s,r,l){var u=s.tag;if(u===5||u===6)s=s.stateNode,r?l.insertBefore(s,r):l.appendChild(s);else if(u!==4&&(u===27&&cr(s.type)&&(l=s.stateNode),s=s.child,s!==null))for(nd(s,r,l),s=s.sibling;s!==null;)nd(s,r,l),s=s.sibling}function m0(s){var r=s.stateNode,l=s.memoizedProps;try{for(var u=s.type,m=r.attributes;m.length;)r.removeAttributeNode(m[0]);Tn(r,u,l),r[Bn]=s,r[Zn]=l}catch(g){Ft(s,s.return,g)}}var Ea=!1,an=!1,Bh=!1,h0=typeof WeakSet=="function"?WeakSet:Set,Sn=null;function Xk(s,r){if(s=s.containerInfo,op=bd,s=Sv(s),Fm(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{l=(l=s.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var m=u.anchorOffset,g=u.focusNode;u=u.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var N=0,_=-1,B=-1,K=0,se=0,oe=s,G=null;t:for(;;){for(var Q;oe!==l||m!==0&&oe.nodeType!==3||(_=N+m),oe!==g||u!==0&&oe.nodeType!==3||(B=N+u),oe.nodeType===3&&(N+=oe.nodeValue.length),(Q=oe.firstChild)!==null;)G=oe,oe=Q;for(;;){if(oe===s)break t;if(G===l&&++K===m&&(_=N),G===g&&++se===u&&(B=N),(Q=oe.nextSibling)!==null)break;oe=G,G=oe.parentNode}oe=Q}l=_===-1||B===-1?null:{start:_,end:B}}else l=null}l=l||{start:0,end:0}}else l=null;for(lp={focusedElem:s,selectionRange:l},bd=!1,Sn=r;Sn!==null;)if(r=Sn,s=r.child,(r.subtreeFlags&1024)!==0&&s!==null)s.return=r,Sn=s;else for(;Sn!==null;){switch(r=Sn,g=r.alternate,s=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((s&1024)!==0&&g!==null){s=void 0,l=r,m=g.memoizedProps,g=g.memoizedState,u=l.stateNode;try{var Ye=si(l.type,m,l.elementType===l.type);s=u.getSnapshotBeforeUpdate(Ye,g),u.__reactInternalSnapshotBeforeUpdate=s}catch($e){Ft(l,l.return,$e)}}break;case 3:if((s&1024)!==0){if(s=r.stateNode.containerInfo,l=s.nodeType,l===9)dp(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":dp(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(a(163))}if(s=r.sibling,s!==null){s.return=r.return,Sn=s;break}Sn=r.return}}function p0(s,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:nr(s,l),u&4&&$l(5,l);break;case 1:if(nr(s,l),u&4)if(s=l.stateNode,r===null)try{s.componentDidMount()}catch(N){Ft(l,l.return,N)}else{var m=si(l.type,r.memoizedProps);r=r.memoizedState;try{s.componentDidUpdate(m,r,s.__reactInternalSnapshotBeforeUpdate)}catch(N){Ft(l,l.return,N)}}u&64&&c0(l),u&512&&Vl(l,l.return);break;case 3:if(nr(s,l),u&64&&(s=l.updateQueue,s!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Qv(s,r)}catch(N){Ft(l,l.return,N)}}break;case 27:r===null&&u&4&&m0(l);case 26:case 5:nr(s,l),r===null&&u&4&&d0(l),u&512&&Vl(l,l.return);break;case 12:nr(s,l);break;case 13:nr(s,l),u&4&&y0(s,l),u&64&&(s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(l=oT.bind(null,l),ST(s,l))));break;case 22:if(u=l.memoizedState!==null||Ea,!u){r=r!==null&&r.memoizedState!==null||an,m=Ea;var g=an;Ea=u,(an=r)&&!g?sr(s,l,(l.subtreeFlags&8772)!==0):nr(s,l),Ea=m,an=g}break;case 30:break;default:nr(s,l)}}function g0(s){var r=s.alternate;r!==null&&(s.alternate=null,g0(r)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(r=s.stateNode,r!==null&&gm(r)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Ut=null,es=!1;function Aa(s,r,l){for(l=l.child;l!==null;)x0(s,r,l),l=l.sibling}function x0(s,r,l){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Pt,l)}catch{}switch(l.tag){case 26:an||Js(l,r),Aa(s,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:an||Js(l,r);var u=Ut,m=es;cr(l.type)&&(Ut=l.stateNode,es=!1),Aa(s,r,l),Jl(l.stateNode),Ut=u,es=m;break;case 5:an||Js(l,r);case 6:if(u=Ut,m=es,Ut=null,Aa(s,r,l),Ut=u,es=m,Ut!==null)if(es)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(l.stateNode)}catch(g){Ft(l,r,g)}else try{Ut.removeChild(l.stateNode)}catch(g){Ft(l,r,g)}break;case 18:Ut!==null&&(es?(s=Ut,r1(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,l.stateNode),oc(s)):r1(Ut,l.stateNode));break;case 4:u=Ut,m=es,Ut=l.stateNode.containerInfo,es=!0,Aa(s,r,l),Ut=u,es=m;break;case 0:case 11:case 14:case 15:an||tr(2,l,r),an||tr(4,l,r),Aa(s,r,l);break;case 1:an||(Js(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&u0(l,r,u)),Aa(s,r,l);break;case 21:Aa(s,r,l);break;case 22:an=(u=an)||l.memoizedState!==null,Aa(s,r,l),an=u;break;default:Aa(s,r,l)}}function y0(s,r){if(r.memoizedState===null&&(s=r.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{oc(s)}catch(l){Ft(r,r.return,l)}}function Jk(s){switch(s.tag){case 13:case 19:var r=s.stateNode;return r===null&&(r=s.stateNode=new h0),r;case 22:return s=s.stateNode,r=s._retryCache,r===null&&(r=s._retryCache=new h0),r;default:throw Error(a(435,s.tag))}}function qh(s,r){var l=Jk(s);r.forEach(function(u){var m=lT.bind(null,s,u);l.has(u)||(l.add(u),u.then(m,m))})}function os(s,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var m=l[u],g=s,N=r,_=N;e:for(;_!==null;){switch(_.tag){case 27:if(cr(_.type)){Ut=_.stateNode,es=!1;break e}break;case 5:Ut=_.stateNode,es=!1;break e;case 3:case 4:Ut=_.stateNode.containerInfo,es=!0;break e}_=_.return}if(Ut===null)throw Error(a(160));x0(g,N,m),Ut=null,es=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)v0(r,s),r=r.sibling}var Fs=null;function v0(s,r){var l=s.alternate,u=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:os(r,s),ls(s),u&4&&(tr(3,s,s.return),$l(3,s),tr(5,s,s.return));break;case 1:os(r,s),ls(s),u&512&&(an||l===null||Js(l,l.return)),u&64&&Ea&&(s=s.updateQueue,s!==null&&(u=s.callbacks,u!==null&&(l=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var m=Fs;if(os(r,s),ls(s),u&512&&(an||l===null||Js(l,l.return)),u&4){var g=l!==null?l.memoizedState:null;if(u=s.memoizedState,l===null)if(u===null)if(s.stateNode===null){e:{u=s.type,l=s.memoizedProps,m=m.ownerDocument||m;t:switch(u){case"title":g=m.getElementsByTagName("title")[0],(!g||g[hl]||g[Bn]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(u),m.head.insertBefore(g,m.querySelector("head > title"))),Tn(g,u,l),g[Bn]=s,Nn(g),u=g;break e;case"link":var N=m1("link","href",m).get(u+(l.href||""));if(N){for(var _=0;_<N.length;_++)if(g=N[_],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){N.splice(_,1);break t}}g=m.createElement(u),Tn(g,u,l),m.head.appendChild(g);break;case"meta":if(N=m1("meta","content",m).get(u+(l.content||""))){for(_=0;_<N.length;_++)if(g=N[_],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){N.splice(_,1);break t}}g=m.createElement(u),Tn(g,u,l),m.head.appendChild(g);break;default:throw Error(a(468,u))}g[Bn]=s,Nn(g),u=g}s.stateNode=u}else h1(m,s.type,s.stateNode);else s.stateNode=f1(m,u,s.memoizedProps);else g!==u?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,u===null?h1(m,s.type,s.stateNode):f1(m,u,s.memoizedProps)):u===null&&s.stateNode!==null&&Rh(s,s.memoizedProps,l.memoizedProps)}break;case 27:os(r,s),ls(s),u&512&&(an||l===null||Js(l,l.return)),l!==null&&u&4&&Rh(s,s.memoizedProps,l.memoizedProps);break;case 5:if(os(r,s),ls(s),u&512&&(an||l===null||Js(l,l.return)),s.flags&32){m=s.stateNode;try{Zi(m,"")}catch(Q){Ft(s,s.return,Q)}}u&4&&s.stateNode!=null&&(m=s.memoizedProps,Rh(s,m,l!==null?l.memoizedProps:m)),u&1024&&(Bh=!0);break;case 6:if(os(r,s),ls(s),u&4){if(s.stateNode===null)throw Error(a(162));u=s.memoizedProps,l=s.stateNode;try{l.nodeValue=u}catch(Q){Ft(s,s.return,Q)}}break;case 3:if(xd=null,m=Fs,Fs=pd(r.containerInfo),os(r,s),Fs=m,ls(s),u&4&&l!==null&&l.memoizedState.isDehydrated)try{oc(r.containerInfo)}catch(Q){Ft(s,s.return,Q)}Bh&&(Bh=!1,b0(s));break;case 4:u=Fs,Fs=pd(s.stateNode.containerInfo),os(r,s),ls(s),Fs=u;break;case 12:os(r,s),ls(s);break;case 13:os(r,s),ls(s),s.child.flags&8192&&s.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Vh=zt()),u&4&&(u=s.updateQueue,u!==null&&(s.updateQueue=null,qh(s,u)));break;case 22:m=s.memoizedState!==null;var B=l!==null&&l.memoizedState!==null,K=Ea,se=an;if(Ea=K||m,an=se||B,os(r,s),an=se,Ea=K,ls(s),u&8192)e:for(r=s.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,m&&(l===null||B||Ea||an||ai(s)),l=null,r=s;;){if(r.tag===5||r.tag===26){if(l===null){B=l=r;try{if(g=B.stateNode,m)N=g.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{_=B.stateNode;var oe=B.memoizedProps.style,G=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;_.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(Q){Ft(B,B.return,Q)}}}else if(r.tag===6){if(l===null){B=r;try{B.stateNode.nodeValue=m?"":B.memoizedProps}catch(Q){Ft(B,B.return,Q)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===s)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=s.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,qh(s,l))));break;case 19:os(r,s),ls(s),u&4&&(u=s.updateQueue,u!==null&&(s.updateQueue=null,qh(s,u)));break;case 30:break;case 21:break;default:os(r,s),ls(s)}}function ls(s){var r=s.flags;if(r&2){try{for(var l,u=s.return;u!==null;){if(f0(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var m=l.stateNode,g=Fh(s);nd(s,g,m);break;case 5:var N=l.stateNode;l.flags&32&&(Zi(N,""),l.flags&=-33);var _=Fh(s);nd(s,_,N);break;case 3:case 4:var B=l.stateNode.containerInfo,K=Fh(s);Ph(s,K,B);break;default:throw Error(a(161))}}catch(se){Ft(s,s.return,se)}s.flags&=-3}r&4096&&(s.flags&=-4097)}function b0(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var r=s;b0(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),s=s.sibling}}function nr(s,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)p0(s,r.alternate,r),r=r.sibling}function ai(s){for(s=s.child;s!==null;){var r=s;switch(r.tag){case 0:case 11:case 14:case 15:tr(4,r,r.return),ai(r);break;case 1:Js(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&u0(r,r.return,l),ai(r);break;case 27:Jl(r.stateNode);case 26:case 5:Js(r,r.return),ai(r);break;case 22:r.memoizedState===null&&ai(r);break;case 30:ai(r);break;default:ai(r)}s=s.sibling}}function sr(s,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,m=s,g=r,N=g.flags;switch(g.tag){case 0:case 11:case 15:sr(m,g,l),$l(4,g);break;case 1:if(sr(m,g,l),u=g,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(K){Ft(u,u.return,K)}if(u=g,m=u.updateQueue,m!==null){var _=u.stateNode;try{var B=m.shared.hiddenCallbacks;if(B!==null)for(m.shared.hiddenCallbacks=null,m=0;m<B.length;m++)Wv(B[m],_)}catch(K){Ft(u,u.return,K)}}l&&N&64&&c0(g),Vl(g,g.return);break;case 27:m0(g);case 26:case 5:sr(m,g,l),l&&u===null&&N&4&&d0(g),Vl(g,g.return);break;case 12:sr(m,g,l);break;case 13:sr(m,g,l),l&&N&4&&y0(m,g);break;case 22:g.memoizedState===null&&sr(m,g,l),Vl(g,g.return);break;case 30:break;default:sr(m,g,l)}r=r.sibling}}function Lh(s,r){var l=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==l&&(s!=null&&s.refCount++,l!=null&&kl(l))}function Uh(s,r){s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&kl(s))}function ea(s,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)w0(s,r,l,u),r=r.sibling}function w0(s,r,l,u){var m=r.flags;switch(r.tag){case 0:case 11:case 15:ea(s,r,l,u),m&2048&&$l(9,r);break;case 1:ea(s,r,l,u);break;case 3:ea(s,r,l,u),m&2048&&(s=null,r.alternate!==null&&(s=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==s&&(r.refCount++,s!=null&&kl(s)));break;case 12:if(m&2048){ea(s,r,l,u),s=r.stateNode;try{var g=r.memoizedProps,N=g.id,_=g.onPostCommit;typeof _=="function"&&_(N,r.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(B){Ft(r,r.return,B)}}else ea(s,r,l,u);break;case 13:ea(s,r,l,u);break;case 23:break;case 22:g=r.stateNode,N=r.alternate,r.memoizedState!==null?g._visibility&2?ea(s,r,l,u):Hl(s,r):g._visibility&2?ea(s,r,l,u):(g._visibility|=2,xo(s,r,l,u,(r.subtreeFlags&10256)!==0)),m&2048&&Lh(N,r);break;case 24:ea(s,r,l,u),m&2048&&Uh(r.alternate,r);break;default:ea(s,r,l,u)}}function xo(s,r,l,u,m){for(m=m&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=s,N=r,_=l,B=u,K=N.flags;switch(N.tag){case 0:case 11:case 15:xo(g,N,_,B,m),$l(8,N);break;case 23:break;case 22:var se=N.stateNode;N.memoizedState!==null?se._visibility&2?xo(g,N,_,B,m):Hl(g,N):(se._visibility|=2,xo(g,N,_,B,m)),m&&K&2048&&Lh(N.alternate,N);break;case 24:xo(g,N,_,B,m),m&&K&2048&&Uh(N.alternate,N);break;default:xo(g,N,_,B,m)}r=r.sibling}}function Hl(s,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=s,u=r,m=u.flags;switch(u.tag){case 22:Hl(l,u),m&2048&&Lh(u.alternate,u);break;case 24:Hl(l,u),m&2048&&Uh(u.alternate,u);break;default:Hl(l,u)}r=r.sibling}}var Yl=8192;function yo(s){if(s.subtreeFlags&Yl)for(s=s.child;s!==null;)j0(s),s=s.sibling}function j0(s){switch(s.tag){case 26:yo(s),s.flags&Yl&&s.memoizedState!==null&&qT(Fs,s.memoizedState,s.memoizedProps);break;case 5:yo(s);break;case 3:case 4:var r=Fs;Fs=pd(s.stateNode.containerInfo),yo(s),Fs=r;break;case 22:s.memoizedState===null&&(r=s.alternate,r!==null&&r.memoizedState!==null?(r=Yl,Yl=16777216,yo(s),Yl=r):yo(s));break;default:yo(s)}}function N0(s){var r=s.alternate;if(r!==null&&(s=r.child,s!==null)){r.child=null;do r=s.sibling,s.sibling=null,s=r;while(s!==null)}}function Kl(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];Sn=u,S0(u,s)}N0(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)C0(s),s=s.sibling}function C0(s){switch(s.tag){case 0:case 11:case 15:Kl(s),s.flags&2048&&tr(9,s,s.return);break;case 3:Kl(s);break;case 12:Kl(s);break;case 22:var r=s.stateNode;s.memoizedState!==null&&r._visibility&2&&(s.return===null||s.return.tag!==13)?(r._visibility&=-3,sd(s)):Kl(s);break;default:Kl(s)}}function sd(s){var r=s.deletions;if((s.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];Sn=u,S0(u,s)}N0(s)}for(s=s.child;s!==null;){switch(r=s,r.tag){case 0:case 11:case 15:tr(8,r,r.return),sd(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,sd(r));break;default:sd(r)}s=s.sibling}}function S0(s,r){for(;Sn!==null;){var l=Sn;switch(l.tag){case 0:case 11:case 15:tr(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:kl(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,Sn=u;else e:for(l=s;Sn!==null;){u=Sn;var m=u.sibling,g=u.return;if(g0(u),u===l){Sn=null;break e}if(m!==null){m.return=g,Sn=m;break e}Sn=g}}}var eT={getCacheForType:function(s){var r=qn(yn),l=r.data.get(s);return l===void 0&&(l=s(),r.data.set(s,l)),l}},tT=typeof WeakMap=="function"?WeakMap:Map,St=0,Bt=null,dt=null,gt=0,Et=0,cs=null,ar=!1,vo=!1,zh=!1,_a=0,Qt=0,rr=0,ri=0,Ih=0,ks=0,bo=0,Gl=null,ts=null,$h=!1,Vh=0,ad=1/0,rd=null,ir=null,kn=0,or=null,wo=null,jo=0,Hh=0,Yh=null,E0=null,Wl=0,Kh=null;function us(){if((St&2)!==0&>!==0)return gt&-gt;if(L.T!==null){var s=lo;return s!==0?s:ep()}return $i()}function A0(){ks===0&&(ks=(gt&536870912)===0||bt?_e():536870912);var s=_s.current;return s!==null&&(s.flags|=32),ks}function ds(s,r,l){(s===Bt&&(Et===2||Et===9)||s.cancelPendingCommit!==null)&&(No(s,0),lr(s,gt,ks,!1)),Ge(s,l),((St&2)===0||s!==Bt)&&(s===Bt&&((St&2)===0&&(ri|=l),Qt===4&&lr(s,gt,ks,!1)),ta(s))}function _0(s,r,l){if((St&6)!==0)throw Error(a(327));var u=!l&&(r&124)===0&&(r&s.expiredLanes)===0||Ne(s,r),m=u?aT(s,r):Qh(s,r,!0),g=u;do{if(m===0){vo&&!u&&lr(s,r,0,!1);break}else{if(l=s.current.alternate,g&&!nT(l)){m=Qh(s,r,!1),g=!1;continue}if(m===2){if(g=r,s.errorRecoveryDisabledLanes&g)var N=0;else N=s.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){r=N;e:{var _=s;m=Gl;var B=_.current.memoizedState.isDehydrated;if(B&&(No(_,N).flags|=256),N=Qh(_,N,!1),N!==2){if(zh&&!B){_.errorRecoveryDisabledLanes|=g,ri|=g,m=4;break e}g=ts,ts=m,g!==null&&(ts===null?ts=g:ts.push.apply(ts,g))}m=N}if(g=!1,m!==2)continue}}if(m===1){No(s,0),lr(s,r,0,!0);break}e:{switch(u=s,g=m,g){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:lr(u,r,ks,!ar);break e;case 2:ts=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(m=Vh+300-zt(),10<m)){if(lr(u,r,ks,!ar),pe(u,0,!0)!==0)break e;u.timeoutHandle=s1(k0.bind(null,u,l,ts,rd,$h,r,ks,ri,bo,ar,g,2,-0,0),m);break e}k0(u,l,ts,rd,$h,r,ks,ri,bo,ar,g,0,-0,0)}}break}while(!0);ta(s)}function k0(s,r,l,u,m,g,N,_,B,K,se,oe,G,Q){if(s.timeoutHandle=-1,oe=r.subtreeFlags,(oe&8192||(oe&16785408)===16785408)&&(nc={stylesheets:null,count:0,unsuspend:BT},j0(r),oe=LT(),oe!==null)){s.cancelPendingCommit=oe(P0.bind(null,s,r,g,l,u,m,N,_,B,se,1,G,Q)),lr(s,g,N,!K);return}P0(s,r,g,l,u,m,N,_,B)}function nT(s){for(var r=s;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var m=l[u],g=m.getSnapshot;m=m.value;try{if(!rs(g(),m))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===s)break;for(;r.sibling===null;){if(r.return===null||r.return===s)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function lr(s,r,l,u){r&=~Ih,r&=~ri,s.suspendedLanes|=r,s.pingedLanes&=~r,u&&(s.warmLanes|=r),u=s.expirationTimes;for(var m=r;0<m;){var g=31-Gt(m),N=1<<g;u[g]=-1,m&=~N}l!==0&&st(s,l,r)}function id(){return(St&6)===0?(Ql(0),!1):!0}function Gh(){if(dt!==null){if(Et===0)var s=dt.return;else s=dt,ba=Jr=null,dh(s),po=null,Ul=0,s=dt;for(;s!==null;)l0(s.alternate,s),s=s.return;dt=null}}function No(s,r){var l=s.timeoutHandle;l!==-1&&(s.timeoutHandle=-1,bT(l)),l=s.cancelPendingCommit,l!==null&&(s.cancelPendingCommit=null,l()),Gh(),Bt=s,dt=l=xa(s.current,null),gt=r,Et=0,cs=null,ar=!1,vo=Ne(s,r),zh=!1,bo=ks=Ih=ri=rr=Qt=0,ts=Gl=null,$h=!1,(r&8)!==0&&(r|=r&32);var u=s.entangledLanes;if(u!==0)for(s=s.entanglements,u&=r;0<u;){var m=31-Gt(u),g=1<<m;r|=s[m],u&=~g}return _a=r,_u(),l}function T0(s,r){at=null,L.H=Ku,r===Ml||r===Bu?(r=Kv(),Et=3):r===Vv?(r=Kv(),Et=4):Et=r===Gb?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,cs=r,dt===null&&(Qt=1,Xu(s,Cs(r,s.current)))}function M0(){var s=L.H;return L.H=Ku,s===null?Ku:s}function O0(){var s=L.A;return L.A=eT,s}function Wh(){Qt=4,ar||(gt&4194048)!==gt&&_s.current!==null||(vo=!0),(rr&134217727)===0&&(ri&134217727)===0||Bt===null||lr(Bt,gt,ks,!1)}function Qh(s,r,l){var u=St;St|=2;var m=M0(),g=O0();(Bt!==s||gt!==r)&&(rd=null,No(s,r)),r=!1;var N=Qt;e:do try{if(Et!==0&&dt!==null){var _=dt,B=cs;switch(Et){case 8:Gh(),N=6;break e;case 3:case 2:case 9:case 6:_s.current===null&&(r=!0);var K=Et;if(Et=0,cs=null,Co(s,_,B,K),l&&vo){N=0;break e}break;default:K=Et,Et=0,cs=null,Co(s,_,B,K)}}sT(),N=Qt;break}catch(se){T0(s,se)}while(!0);return r&&s.shellSuspendCounter++,ba=Jr=null,St=u,L.H=m,L.A=g,dt===null&&(Bt=null,gt=0,_u()),N}function sT(){for(;dt!==null;)D0(dt)}function aT(s,r){var l=St;St|=2;var u=M0(),m=O0();Bt!==s||gt!==r?(rd=null,ad=zt()+500,No(s,r)):vo=Ne(s,r);e:do try{if(Et!==0&&dt!==null){r=dt;var g=cs;t:switch(Et){case 1:Et=0,cs=null,Co(s,r,g,1);break;case 2:case 9:if(Hv(g)){Et=0,cs=null,R0(r);break}r=function(){Et!==2&&Et!==9||Bt!==s||(Et=7),ta(s)},g.then(r,r);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:Hv(g)?(Et=0,cs=null,R0(r)):(Et=0,cs=null,Co(s,r,g,7));break;case 5:var N=null;switch(dt.tag){case 26:N=dt.memoizedState;case 5:case 27:var _=dt;if(!N||p1(N)){Et=0,cs=null;var B=_.sibling;if(B!==null)dt=B;else{var K=_.return;K!==null?(dt=K,od(K)):dt=null}break t}}Et=0,cs=null,Co(s,r,g,5);break;case 6:Et=0,cs=null,Co(s,r,g,6);break;case 8:Gh(),Qt=6;break e;default:throw Error(a(462))}}rT();break}catch(se){T0(s,se)}while(!0);return ba=Jr=null,L.H=u,L.A=m,St=l,dt!==null?0:(Bt=null,gt=0,_u(),Qt)}function rT(){for(;dt!==null&&!as();)D0(dt)}function D0(s){var r=i0(s.alternate,s,_a);s.memoizedProps=s.pendingProps,r===null?od(s):dt=r}function R0(s){var r=s,l=r.alternate;switch(r.tag){case 15:case 0:r=e0(l,r,r.pendingProps,r.type,void 0,gt);break;case 11:r=e0(l,r,r.pendingProps,r.type.render,r.ref,gt);break;case 5:dh(r);default:l0(l,r),r=dt=Fv(r,_a),r=i0(l,r,_a)}s.memoizedProps=s.pendingProps,r===null?od(s):dt=r}function Co(s,r,l,u){ba=Jr=null,dh(r),po=null,Ul=0;var m=r.return;try{if(Gk(s,m,r,l,gt)){Qt=1,Xu(s,Cs(l,s.current)),dt=null;return}}catch(g){if(m!==null)throw dt=m,g;Qt=1,Xu(s,Cs(l,s.current)),dt=null;return}r.flags&32768?(bt||u===1?s=!0:vo||(gt&536870912)!==0?s=!1:(ar=s=!0,(u===2||u===9||u===3||u===6)&&(u=_s.current,u!==null&&u.tag===13&&(u.flags|=16384))),F0(r,s)):od(r)}function od(s){var r=s;do{if((r.flags&32768)!==0){F0(r,ar);return}s=r.return;var l=Qk(r.alternate,r,_a);if(l!==null){dt=l;return}if(r=r.sibling,r!==null){dt=r;return}dt=r=s}while(r!==null);Qt===0&&(Qt=5)}function F0(s,r){do{var l=Zk(s.alternate,s);if(l!==null){l.flags&=32767,dt=l;return}if(l=s.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(s=s.sibling,s!==null)){dt=s;return}dt=s=l}while(s!==null);Qt=6,dt=null}function P0(s,r,l,u,m,g,N,_,B){s.cancelPendingCommit=null;do ld();while(kn!==0);if((St&6)!==0)throw Error(a(327));if(r!==null){if(r===s.current)throw Error(a(177));if(g=r.lanes|r.childLanes,g|=Um,nn(s,l,g,N,_,B),s===Bt&&(dt=Bt=null,gt=0),wo=r,or=s,jo=l,Hh=g,Yh=m,E0=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,cT(An,function(){return z0(),null})):(s.callbackNode=null,s.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=L.T,L.T=null,m=J.p,J.p=2,N=St,St|=4;try{Xk(s,r,l)}finally{St=N,J.p=m,L.T=u}}kn=1,B0(),q0(),L0()}}function B0(){if(kn===1){kn=0;var s=or,r=wo,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=L.T,L.T=null;var u=J.p;J.p=2;var m=St;St|=4;try{v0(r,s);var g=lp,N=Sv(s.containerInfo),_=g.focusedElem,B=g.selectionRange;if(N!==_&&_&&_.ownerDocument&&Cv(_.ownerDocument.documentElement,_)){if(B!==null&&Fm(_)){var K=B.start,se=B.end;if(se===void 0&&(se=K),"selectionStart"in _)_.selectionStart=K,_.selectionEnd=Math.min(se,_.value.length);else{var oe=_.ownerDocument||document,G=oe&&oe.defaultView||window;if(G.getSelection){var Q=G.getSelection(),Ye=_.textContent.length,$e=Math.min(B.start,Ye),Mt=B.end===void 0?$e:Math.min(B.end,Ye);!Q.extend&&$e>Mt&&(N=Mt,Mt=$e,$e=N);var $=Nv(_,$e),U=Nv(_,Mt);if($&&U&&(Q.rangeCount!==1||Q.anchorNode!==$.node||Q.anchorOffset!==$.offset||Q.focusNode!==U.node||Q.focusOffset!==U.offset)){var H=oe.createRange();H.setStart($.node,$.offset),Q.removeAllRanges(),$e>Mt?(Q.addRange(H),Q.extend(U.node,U.offset)):(H.setEnd(U.node,U.offset),Q.addRange(H))}}}}for(oe=[],Q=_;Q=Q.parentNode;)Q.nodeType===1&&oe.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<oe.length;_++){var ae=oe[_];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}bd=!!op,lp=op=null}finally{St=m,J.p=u,L.T=l}}s.current=r,kn=2}}function q0(){if(kn===2){kn=0;var s=or,r=wo,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=L.T,L.T=null;var u=J.p;J.p=2;var m=St;St|=4;try{p0(s,r.alternate,r)}finally{St=m,J.p=u,L.T=l}}kn=3}}function L0(){if(kn===4||kn===3){kn=0,gn();var s=or,r=wo,l=jo,u=E0;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?kn=5:(kn=0,wo=or=null,U0(s,s.pendingLanes));var m=s.pendingLanes;if(m===0&&(ir=null),Ha(l),r=r.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Pt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=L.T,m=J.p,J.p=2,L.T=null;try{for(var g=s.onRecoverableError,N=0;N<u.length;N++){var _=u[N];g(_.value,{componentStack:_.stack})}}finally{L.T=r,J.p=m}}(jo&3)!==0&&ld(),ta(s),m=s.pendingLanes,(l&4194090)!==0&&(m&42)!==0?s===Kh?Wl++:(Wl=0,Kh=s):Wl=0,Ql(0)}}function U0(s,r){(s.pooledCacheLanes&=r)===0&&(r=s.pooledCache,r!=null&&(s.pooledCache=null,kl(r)))}function ld(s){return B0(),q0(),L0(),z0()}function z0(){if(kn!==5)return!1;var s=or,r=Hh;Hh=0;var l=Ha(jo),u=L.T,m=J.p;try{J.p=32>l?32:l,L.T=null,l=Yh,Yh=null;var g=or,N=jo;if(kn=0,wo=or=null,jo=0,(St&6)!==0)throw Error(a(331));var _=St;if(St|=4,C0(g.current),w0(g,g.current,N,l),St=_,Ql(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Pt,g)}catch{}return!0}finally{J.p=m,L.T=u,U0(s,r)}}function I0(s,r,l){r=Cs(l,r),r=Sh(s.stateNode,r,2),s=Za(s,r,2),s!==null&&(Ge(s,2),ta(s))}function Ft(s,r,l){if(s.tag===3)I0(s,s,l);else for(;r!==null;){if(r.tag===3){I0(r,s,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ir===null||!ir.has(u))){s=Cs(l,s),l=Yb(2),u=Za(r,l,2),u!==null&&(Kb(l,u,r,s),Ge(u,2),ta(u));break}}r=r.return}}function Zh(s,r,l){var u=s.pingCache;if(u===null){u=s.pingCache=new tT;var m=new Set;u.set(r,m)}else m=u.get(r),m===void 0&&(m=new Set,u.set(r,m));m.has(l)||(zh=!0,m.add(l),s=iT.bind(null,s,r,l),r.then(s,s))}function iT(s,r,l){var u=s.pingCache;u!==null&&u.delete(r),s.pingedLanes|=s.suspendedLanes&l,s.warmLanes&=~l,Bt===s&&(gt&l)===l&&(Qt===4||Qt===3&&(gt&62914560)===gt&&300>zt()-Vh?(St&2)===0&&No(s,0):Ih|=l,bo===gt&&(bo=0)),ta(s)}function $0(s,r){r===0&&(r=Ke()),s=ao(s,r),s!==null&&(Ge(s,r),ta(s))}function oT(s){var r=s.memoizedState,l=0;r!==null&&(l=r.retryLane),$0(s,l)}function lT(s,r){var l=0;switch(s.tag){case 13:var u=s.stateNode,m=s.memoizedState;m!==null&&(l=m.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),$0(s,l)}function cT(s,r){return Lt(s,r)}var cd=null,So=null,Xh=!1,ud=!1,Jh=!1,ii=0;function ta(s){s!==So&&s.next===null&&(So===null?cd=So=s:So=So.next=s),ud=!0,Xh||(Xh=!0,dT())}function Ql(s,r){if(!Jh&&ud){Jh=!0;do for(var l=!1,u=cd;u!==null;){if(s!==0){var m=u.pendingLanes;if(m===0)var g=0;else{var N=u.suspendedLanes,_=u.pingedLanes;g=(1<<31-Gt(42|s)+1)-1,g&=m&~(N&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,K0(u,g))}else g=gt,g=pe(u,u===Bt?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(g&3)===0||Ne(u,g)||(l=!0,K0(u,g));u=u.next}while(l);Jh=!1}}function uT(){V0()}function V0(){ud=Xh=!1;var s=0;ii!==0&&(vT()&&(s=ii),ii=0);for(var r=zt(),l=null,u=cd;u!==null;){var m=u.next,g=H0(u,r);g===0?(u.next=null,l===null?cd=m:l.next=m,m===null&&(So=l)):(l=u,(s!==0||(g&3)!==0)&&(ud=!0)),u=m}Ql(s)}function H0(s,r){for(var l=s.suspendedLanes,u=s.pingedLanes,m=s.expirationTimes,g=s.pendingLanes&-62914561;0<g;){var N=31-Gt(g),_=1<<N,B=m[N];B===-1?((_&l)===0||(_&u)!==0)&&(m[N]=He(_,r)):B<=r&&(s.expiredLanes|=_),g&=~_}if(r=Bt,l=gt,l=pe(s,s===r?l:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),u=s.callbackNode,l===0||s===r&&(Et===2||Et===9)||s.cancelPendingCommit!==null)return u!==null&&u!==null&&Nt(u),s.callbackNode=null,s.callbackPriority=0;if((l&3)===0||Ne(s,l)){if(r=l&-l,r===s.callbackPriority)return r;switch(u!==null&&Nt(u),Ha(l)){case 2:case 8:l=Va;break;case 32:l=An;break;case 268435456:l=Qs;break;default:l=An}return u=Y0.bind(null,s),l=Lt(l,u),s.callbackPriority=r,s.callbackNode=l,r}return u!==null&&u!==null&&Nt(u),s.callbackPriority=2,s.callbackNode=null,2}function Y0(s,r){if(kn!==0&&kn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var l=s.callbackNode;if(ld()&&s.callbackNode!==l)return null;var u=gt;return u=pe(s,s===Bt?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),u===0?null:(_0(s,u,r),H0(s,zt()),s.callbackNode!=null&&s.callbackNode===l?Y0.bind(null,s):null)}function K0(s,r){if(ld())return null;_0(s,r,!0)}function dT(){wT(function(){(St&6)!==0?Lt(Ws,uT):V0()})}function ep(){return ii===0&&(ii=_e()),ii}function G0(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:wu(""+s)}function W0(s,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,s.id&&l.setAttribute("form",s.id),r.parentNode.insertBefore(l,r),s=new FormData(s),l.parentNode.removeChild(l),s}function fT(s,r,l,u,m){if(r==="submit"&&l&&l.stateNode===m){var g=G0((m[Zn]||null).action),N=u.submitter;N&&(r=(r=N[Zn]||null)?G0(r.formAction):N.getAttribute("formAction"),r!==null&&(g=r,N=null));var _=new Su("action","action",null,u,m);s.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ii!==0){var B=N?W0(m,N):new FormData(m);bh(l,{pending:!0,data:B,method:m.method,action:g},null,B)}}else typeof g=="function"&&(_.preventDefault(),B=N?W0(m,N):new FormData(m),bh(l,{pending:!0,data:B,method:m.method,action:g},g,B))},currentTarget:m}]})}}for(var tp=0;tp<Lm.length;tp++){var np=Lm[tp],mT=np.toLowerCase(),hT=np[0].toUpperCase()+np.slice(1);Rs(mT,"on"+hT)}Rs(_v,"onAnimationEnd"),Rs(kv,"onAnimationIteration"),Rs(Tv,"onAnimationStart"),Rs("dblclick","onDoubleClick"),Rs("focusin","onFocus"),Rs("focusout","onBlur"),Rs(Mk,"onTransitionRun"),Rs(Ok,"onTransitionStart"),Rs(Dk,"onTransitionCancel"),Rs(Mv,"onTransitionEnd"),Gi("onMouseEnter",["mouseout","mouseover"]),Gi("onMouseLeave",["mouseout","mouseover"]),Gi("onPointerEnter",["pointerout","pointerover"]),Gi("onPointerLeave",["pointerout","pointerover"]),Vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zl="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(" "),pT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zl));function Q0(s,r){r=(r&4)!==0;for(var l=0;l<s.length;l++){var u=s[l],m=u.event;u=u.listeners;e:{var g=void 0;if(r)for(var N=u.length-1;0<=N;N--){var _=u[N],B=_.instance,K=_.currentTarget;if(_=_.listener,B!==g&&m.isPropagationStopped())break e;g=_,m.currentTarget=K;try{g(m)}catch(se){Zu(se)}m.currentTarget=null,g=B}else for(N=0;N<u.length;N++){if(_=u[N],B=_.instance,K=_.currentTarget,_=_.listener,B!==g&&m.isPropagationStopped())break e;g=_,m.currentTarget=K;try{g(m)}catch(se){Zu(se)}m.currentTarget=null,g=B}}}}function ft(s,r){var l=r[pm];l===void 0&&(l=r[pm]=new Set);var u=s+"__bubble";l.has(u)||(Z0(r,s,2,!1),l.add(u))}function sp(s,r,l){var u=0;r&&(u|=4),Z0(l,s,u,r)}var dd="_reactListening"+Math.random().toString(36).slice(2);function ap(s){if(!s[dd]){s[dd]=!0,Vy.forEach(function(l){l!=="selectionchange"&&(pT.has(l)||sp(l,!1,s),sp(l,!0,s))});var r=s.nodeType===9?s:s.ownerDocument;r===null||r[dd]||(r[dd]=!0,sp("selectionchange",!1,r))}}function Z0(s,r,l,u){switch(w1(r)){case 2:var m=IT;break;case 8:m=$T;break;default:m=yp}l=m.bind(null,r,l,s),m=void 0,!Em||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(m=!0),u?m!==void 0?s.addEventListener(r,l,{capture:!0,passive:m}):s.addEventListener(r,l,!0):m!==void 0?s.addEventListener(r,l,{passive:m}):s.addEventListener(r,l,!1)}function rp(s,r,l,u,m){var g=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var N=u.tag;if(N===3||N===4){var _=u.stateNode.containerInfo;if(_===m)break;if(N===4)for(N=u.return;N!==null;){var B=N.tag;if((B===3||B===4)&&N.stateNode.containerInfo===m)return;N=N.return}for(;_!==null;){if(N=Hi(_),N===null)return;if(B=N.tag,B===5||B===6||B===26||B===27){u=g=N;continue e}_=_.parentNode}}u=u.return}av(function(){var K=g,se=Cm(l),oe=[];e:{var G=Ov.get(s);if(G!==void 0){var Q=Su,Ye=s;switch(s){case"keypress":if(Nu(l)===0)break e;case"keydown":case"keyup":Q=ck;break;case"focusin":Ye="focus",Q=Tm;break;case"focusout":Ye="blur",Q=Tm;break;case"beforeblur":case"afterblur":Q=Tm;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=ov;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=Z_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=fk;break;case _v:case kv:case Tv:Q=ek;break;case Mv:Q=hk;break;case"scroll":case"scrollend":Q=W_;break;case"wheel":Q=gk;break;case"copy":case"cut":case"paste":Q=nk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=cv;break;case"toggle":case"beforetoggle":Q=yk}var $e=(r&4)!==0,Mt=!$e&&(s==="scroll"||s==="scrollend"),$=$e?G!==null?G+"Capture":null:G;$e=[];for(var U=K,H;U!==null;){var ae=U;if(H=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||H===null||$===null||(ae=gl(U,$),ae!=null&&$e.push(Xl(U,ae,H))),Mt)break;U=U.return}0<$e.length&&(G=new Q(G,Ye,null,l,se),oe.push({event:G,listeners:$e}))}}if((r&7)===0){e:{if(G=s==="mouseover"||s==="pointerover",Q=s==="mouseout"||s==="pointerout",G&&l!==Nm&&(Ye=l.relatedTarget||l.fromElement)&&(Hi(Ye)||Ye[Vi]))break e;if((Q||G)&&(G=se.window===se?se:(G=se.ownerDocument)?G.defaultView||G.parentWindow:window,Q?(Ye=l.relatedTarget||l.toElement,Q=K,Ye=Ye?Hi(Ye):null,Ye!==null&&(Mt=c(Ye),$e=Ye.tag,Ye!==Mt||$e!==5&&$e!==27&&$e!==6)&&(Ye=null)):(Q=null,Ye=K),Q!==Ye)){if($e=ov,ae="onMouseLeave",$="onMouseEnter",U="mouse",(s==="pointerout"||s==="pointerover")&&($e=cv,ae="onPointerLeave",$="onPointerEnter",U="pointer"),Mt=Q==null?G:pl(Q),H=Ye==null?G:pl(Ye),G=new $e(ae,U+"leave",Q,l,se),G.target=Mt,G.relatedTarget=H,ae=null,Hi(se)===K&&($e=new $e($,U+"enter",Ye,l,se),$e.target=H,$e.relatedTarget=Mt,ae=$e),Mt=ae,Q&&Ye)t:{for($e=Q,$=Ye,U=0,H=$e;H;H=Eo(H))U++;for(H=0,ae=$;ae;ae=Eo(ae))H++;for(;0<U-H;)$e=Eo($e),U--;for(;0<H-U;)$=Eo($),H--;for(;U--;){if($e===$||$!==null&&$e===$.alternate)break t;$e=Eo($e),$=Eo($)}$e=null}else $e=null;Q!==null&&X0(oe,G,Q,$e,!1),Ye!==null&&Mt!==null&&X0(oe,Mt,Ye,$e,!0)}}e:{if(G=K?pl(K):window,Q=G.nodeName&&G.nodeName.toLowerCase(),Q==="select"||Q==="input"&&G.type==="file")var Oe=xv;else if(pv(G))if(yv)Oe=_k;else{Oe=Ek;var lt=Sk}else Q=G.nodeName,!Q||Q.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?K&&jm(K.elementType)&&(Oe=xv):Oe=Ak;if(Oe&&(Oe=Oe(s,K))){gv(oe,Oe,l,se);break e}lt&<(s,G,K),s==="focusout"&&K&&G.type==="number"&&K.memoizedProps.value!=null&&wm(G,"number",G.value)}switch(lt=K?pl(K):window,s){case"focusin":(pv(lt)||lt.contentEditable==="true")&&(to=lt,Pm=K,Cl=null);break;case"focusout":Cl=Pm=to=null;break;case"mousedown":Bm=!0;break;case"contextmenu":case"mouseup":case"dragend":Bm=!1,Ev(oe,l,se);break;case"selectionchange":if(Tk)break;case"keydown":case"keyup":Ev(oe,l,se)}var Le;if(Om)e:{switch(s){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else eo?mv(s,l)&&(Ve="onCompositionEnd"):s==="keydown"&&l.keyCode===229&&(Ve="onCompositionStart");Ve&&(uv&&l.locale!=="ko"&&(eo||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&eo&&(Le=rv()):(Ka=se,Am="value"in Ka?Ka.value:Ka.textContent,eo=!0)),lt=fd(K,Ve),0<lt.length&&(Ve=new lv(Ve,s,null,l,se),oe.push({event:Ve,listeners:lt}),Le?Ve.data=Le:(Le=hv(l),Le!==null&&(Ve.data=Le)))),(Le=bk?wk(s,l):jk(s,l))&&(Ve=fd(K,"onBeforeInput"),0<Ve.length&&(lt=new lv("onBeforeInput","beforeinput",null,l,se),oe.push({event:lt,listeners:Ve}),lt.data=Le)),fT(oe,s,K,l,se)}Q0(oe,r)})}function Xl(s,r,l){return{instance:s,listener:r,currentTarget:l}}function fd(s,r){for(var l=r+"Capture",u=[];s!==null;){var m=s,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=gl(s,l),m!=null&&u.unshift(Xl(s,m,g)),m=gl(s,r),m!=null&&u.push(Xl(s,m,g))),s.tag===3)return u;s=s.return}return[]}function Eo(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function X0(s,r,l,u,m){for(var g=r._reactName,N=[];l!==null&&l!==u;){var _=l,B=_.alternate,K=_.stateNode;if(_=_.tag,B!==null&&B===u)break;_!==5&&_!==26&&_!==27||K===null||(B=K,m?(K=gl(l,g),K!=null&&N.unshift(Xl(l,K,B))):m||(K=gl(l,g),K!=null&&N.push(Xl(l,K,B)))),l=l.return}N.length!==0&&s.push({event:r,listeners:N})}var gT=/\r\n?/g,xT=/\u0000|\uFFFD/g;function J0(s){return(typeof s=="string"?s:""+s).replace(gT,` 9`).replace(xT,"")}function e1(s,r){return r=J0(r),J0(s)===r}function md(){}function Tt(s,r,l,u,m,g){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Zi(s,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Zi(s,""+u);break;case"className":yu(s,"class",u);break;case"tabIndex":yu(s,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":yu(s,l,u);break;case"style":nv(s,u,g);break;case"data":if(r!=="object"){yu(s,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){s.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){s.removeAttribute(l);break}u=wu(""+u),s.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){s.setAttribute(l,"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 g=="function"&&(l==="formAction"?(r!=="input"&&Tt(s,r,"name",m.name,m,null),Tt(s,r,"formEncType",m.formEncType,m,null),Tt(s,r,"formMethod",m.formMethod,m,null),Tt(s,r,"formTarget",m.formTarget,m,null)):(Tt(s,r,"encType",m.encType,m,null),Tt(s,r,"method",m.method,m,null),Tt(s,r,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){s.removeAttribute(l);break}u=wu(""+u),s.setAttribute(l,u);break;case"onClick":u!=null&&(s.onclick=md);break;case"onScroll":u!=null&&ft("scroll",s);break;case"onScrollEnd":u!=null&&ft("scrollend",s);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(m.children!=null)throw Error(a(60));s.innerHTML=l}}break;case"multiple":s.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":s.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){s.removeAttribute("xlink:href");break}l=wu(""+u),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?s.setAttribute(l,""+u):s.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?s.setAttribute(l,""):s.removeAttribute(l);break;case"capture":case"download":u===!0?s.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?s.setAttribute(l,u):s.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?s.setAttribute(l,u):s.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?s.removeAttribute(l):s.setAttribute(l,u);break;case"popover":ft("beforetoggle",s),ft("toggle",s),xu(s,"popover",u);break;case"xlinkActuate":pa(s,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":pa(s,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":pa(s,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":pa(s,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":pa(s,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":pa(s,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":pa(s,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":pa(s,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":pa(s,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":xu(s,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=K_.get(l)||l,xu(s,l,u))}}function ip(s,r,l,u,m,g){switch(l){case"style":nv(s,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(m.children!=null)throw Error(a(60));s.innerHTML=l}}break;case"children":typeof u=="string"?Zi(s,u):(typeof u=="number"||typeof u=="bigint")&&Zi(s,""+u);break;case"onScroll":u!=null&&ft("scroll",s);break;case"onScrollEnd":u!=null&&ft("scrollend",s);break;case"onClick":u!=null&&(s.onclick=md);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hy.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),r=l.slice(2,m?l.length-7:void 0),g=s[Zn]||null,g=g!=null?g[l]:null,typeof g=="function"&&s.removeEventListener(r,g,m),typeof u=="function")){typeof g!="function"&&g!==null&&(l in s?s[l]=null:s.hasAttribute(l)&&s.removeAttribute(l)),s.addEventListener(r,u,m);break e}l in s?s[l]=u:u===!0?s.setAttribute(l,""):xu(s,l,u)}}}function Tn(s,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ft("error",s),ft("load",s);var u=!1,m=!1,g;for(g in l)if(l.hasOwnProperty(g)){var N=l[g];if(N!=null)switch(g){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Tt(s,r,g,N,l,null)}}m&&Tt(s,r,"srcSet",l.srcSet,l,null),u&&Tt(s,r,"src",l.src,l,null);return;case"input":ft("invalid",s);var _=g=N=m=null,B=null,K=null;for(u in l)if(l.hasOwnProperty(u)){var se=l[u];if(se!=null)switch(u){case"name":m=se;break;case"type":N=se;break;case"checked":B=se;break;case"defaultChecked":K=se;break;case"value":g=se;break;case"defaultValue":_=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,r));break;default:Tt(s,r,u,se,l,null)}}Xy(s,g,_,B,K,N,m,!1),vu(s);return;case"select":ft("invalid",s),u=N=g=null;for(m in l)if(l.hasOwnProperty(m)&&(_=l[m],_!=null))switch(m){case"value":g=_;break;case"defaultValue":N=_;break;case"multiple":u=_;default:Tt(s,r,m,_,l,null)}r=g,l=N,s.multiple=!!u,r!=null?Qi(s,!!u,r,!1):l!=null&&Qi(s,!!u,l,!0);return;case"textarea":ft("invalid",s),g=m=u=null;for(N in l)if(l.hasOwnProperty(N)&&(_=l[N],_!=null))switch(N){case"value":u=_;break;case"defaultValue":m=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:Tt(s,r,N,_,l,null)}ev(s,u,m,g),vu(s);return;case"option":for(B in l)l.hasOwnProperty(B)&&(u=l[B],u!=null)&&(B==="selected"?s.selected=u&&typeof u!="function"&&typeof u!="symbol":Tt(s,r,B,u,l,null));return;case"dialog":ft("beforetoggle",s),ft("toggle",s),ft("cancel",s),ft("close",s
vendor: 1,462 bytes, line 9
9);break;case"iframe":case"object":ft("load",s);break;case"video":case"audio":for(u=0;u<Zl.length;u++)ft(Zl[u],s);break;case"image":ft("error",s),ft("load",s);break;case"details":ft("toggle",s);break;case"embed":case"source":case"link":ft("error",s),ft("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in l)if(l.hasOwnProperty(K)&&(u=l[K],u!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Tt(s,r,K,u,l,null)}return;default:if(jm(r)){for(se in l)l.hasOwnProperty(se)&&(u=l[se],u!==void 0&&ip(s,r,se,u,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(u=l[_],u!=null&&Tt(s,r,_,u,l,null))}function yT(s,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,N=null,_=null,B=null,K=null,se=null;for(Q in l){var oe=l[Q];if(l.hasOwnProperty(Q)&&oe!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":B=oe;default:u.hasOwnProperty(Q)||Tt(s,r,Q,null,u,oe)}}for(var G in u){var Q=u[G];if(oe=l[G],u.hasOwnProperty(G)&&(Q!=null||oe!=null))switch(G){case"type":g=Q;break;case"name":m=Q;break;case"checked":K=Q;break;case"defaultChecked":se=Q;break;case"value":N=Q;break;case"defaultValue":_=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,r));break;default:Q!==oe&&Tt(s,r,G,Q,u,oe)}}bm(s,N,_,B,K,se,g,m);return;
vendor: 10,496 bytes, line 9
9case"select":Q=N=_=G=null;for(g in l)if(B=l[g],l.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":Q=B;default:u.hasOwnProperty(g)||Tt(s,r,g,null,u,B)}for(m in u)if(g=u[m],B=l[m],u.hasOwnProperty(m)&&(g!=null||B!=null))switch(m){case"value":G=g;break;case"defaultValue":_=g;break;case"multiple":N=g;default:g!==B&&Tt(s,r,m,g,u,B)}r=_,l=N,u=Q,G!=null?Qi(s,!!l,G,!1):!!u!=!!l&&(r!=null?Qi(s,!!l,r,!0):Qi(s,!!l,l?[]:"",!1));return;case"textarea":Q=G=null;for(_ in l)if(m=l[_],l.hasOwnProperty(_)&&m!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Tt(s,r,_,null,u,m)}for(N in u)if(m=u[N],g=l[N],u.hasOwnProperty(N)&&(m!=null||g!=null))switch(N){case"value":G=m;break;case"defaultValue":Q=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==g&&Tt(s,r,N,m,u,g)}Jy(s,G,Q);return;case"option":for(var Ye in l)G=l[Ye],l.hasOwnProperty(Ye)&&G!=null&&!u.hasOwnProperty(Ye)&&(Ye==="selected"?s.selected=!1:Tt(s,r,Ye,null,u,G));for(B in u)G=u[B],Q=l[B],u.hasOwnProperty(B)&&G!==Q&&(G!=null||Q!=null)&&(B==="selected"?s.selected=G&&typeof G!="function"&&typeof G!="symbol":Tt(s,r,B,G,u,Q));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 $e in l)G=l[$e],l.hasOwnProperty($e)&&G!=null&&!u.hasOwnProperty($e)&&Tt(s,r,$e,null,u,G);for(K in u)if(G=u[K],Q=l[K],u.hasOwnProperty(K)&&G!==Q&&(G!=null||Q!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,r));break;default:Tt(s,r,K,G,u,Q)}return;default:if(jm(r)){for(var Mt in l)G=l[Mt],l.hasOwnProperty(Mt)&&G!==void 0&&!u.hasOwnProperty(Mt)&&ip(s,r,Mt,void 0,u,G);for(se in u)G=u[se],Q=l[se],!u.hasOwnProperty(se)||G===Q||G===void 0&&Q===void 0||ip(s,r,se,G,u,Q);return}}for(var $ in l)G=l[$],l.hasOwnProperty($)&&G!=null&&!u.hasOwnProperty($)&&Tt(s,r,$,null,u,G);for(oe in u)G=u[oe],Q=l[oe],!u.hasOwnProperty(oe)||G===Q||G==null&&Q==null||Tt(s,r,oe,G,u,Q)}var op=null,lp=null;function hd(s){return s.nodeType===9?s:s.ownerDocument}function t1(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function n1(s,r){if(s===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&r==="foreignObject"?0:s}function cp(s,r){return s==="textarea"||s==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var up=null;function vT(){var s=window.event;return s&&s.type==="popstate"?s===up?!1:(up=s,!0):(up=null,!1)}var s1=typeof setTimeout=="function"?setTimeout:void 0,bT=typeof clearTimeout=="function"?clearTimeout:void 0,a1=typeof Promise=="function"?Promise:void 0,wT=typeof queueMicrotask=="function"?queueMicrotask:typeof a1<"u"?function(s){return a1.resolve(null).then(s).catch(jT)}:s1;function jT(s){setTimeout(function(){throw s})}function cr(s){return s==="head"}function r1(s,r){var l=r,u=0,m=0;do{var g=l.nextSibling;if(s.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(0<u&&8>u){l=u;var N=s.ownerDocument;if(l&1&&Jl(N.documentElement),l&2&&Jl(N.body),l&4)for(l=N.head,Jl(l),N=l.firstChild;N;){var _=N.nextSibling,B=N.nodeName;N[hl]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&N.rel.toLowerCase()==="stylesheet"||l.removeChild(N),N=_}}if(m===0){s.removeChild(g),oc(r);return}m--}else l==="$"||l==="$?"||l==="$!"?m++:u=l.charCodeAt(0)-48;else u=0;l=g}while(l);oc(r)}function dp(s){var r=s.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":dp(l),gm(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}s.removeChild(l)}}function NT(s,r,l,u){for(;s.nodeType===1;){var m=l;if(s.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(u){if(!s[hl])switch(r){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(g=s.getAttribute("rel"),g==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(g!==m.rel||s.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||s.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||s.getAttribute("title")!==(m.title==null?null:m.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(g=s.getAttribute("src"),(g!==(m.src==null?null:m.src)||s.getAttribute("type")!==(m.type==null?null:m.type)||s.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(r==="input"&&s.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&s.getAttribute("name")===g)return s}else return s;if(s=Ps(s.nextSibling),s===null)break}return null}function CT(s,r,l){if(r==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=Ps(s.nextSibling),s===null))return null;return s}function fp(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState==="complete"}function ST(s,r){var l=s.ownerDocument;if(s.data!=="$?"||l.readyState==="complete")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),s._reactRetry=u}}function Ps(s){for(;s!=null;s=s.nextSibling){var r=s.nodeType;if(r===1||r===3)break;if(r===8){if(r=s.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return s}var mp=null;function i1(s){s=s.previousSibling;for(var r=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"){if(r===0)return s;r--}else l==="/$"&&r++}s=s.previousSibling}return null}function o1(s,r,l){switch(r=hd(l),s){case"html":if(s=r.documentElement,!s)throw Error(a(452));return s;case"head":if(s=r.head,!s)throw Error(a(453));return s;case"body":if(s=r.body,!s)throw Error(a(454));return s;default:throw Error(a(451))}}function Jl(s){for(var r=s.attributes;r.length;)s.removeAttributeNode(r[0]);gm(s)}var Ts=new Map,l1=new Set;function pd(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var ka=J.d;J.d={f:ET,r:AT,D:_T,C:kT,L:TT,m:MT,X:DT,S:OT,M:RT};function ET(){var s=ka.f(),r=id();return s||r}function AT(s){var r=Yi(s);r!==null&&r.tag===5&&r.type==="form"?_b(r):ka.r(s)}var Ao=typeof document>"u"?null:document;function c1(s,r,l){var u=Ao;if(u&&typeof r=="string"&&r){var m=Ns(r);m='link[rel="'+s+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),l1.has(m)||(l1.add(m),s={rel:s,crossOrigin:l,href:r},u.querySelector(m)===null&&(r=u.createElement("link"),Tn(r,"link",s),Nn(r),u.head.appendChild(r)))}}function _T(s){ka.D(s),c1("dns-prefetch",s,null)}function kT(s,r){ka.C(s,r),c1("preconnect",s,r)}function TT(s,r,l){ka.L(s,r,l);var u=Ao;if(u&&s&&r){var m='link[rel="preload"][as="'+Ns(r)+'"]';r==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+Ns(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+Ns(l.imageSizes)+'"]')):m+='[href="'+Ns(s)+'"]';var g=m;switch(r){case"style":g=_o(s);break;case"script":g=ko(s)}Ts.has(g)||(s=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:s,as:r},l),Ts.set(g,s),u.querySelector(m)!==null||r==="style"&&u.querySelector(ec(g))||r==="script"&&u.querySelector(tc(g))||(r=u.createElement("link"),Tn(r,"link",s),Nn(r),u.head.appendChild(r)))}}function MT(s,r){ka.m(s,r);var l=Ao;if(l&&s){var u=r&&typeof r.as=="string"?r.as:"script",m='link[rel="modulepreload"][as="'+Ns(u)+'"][href="'+Ns(s)+'"]',g=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ko(s)}if(!Ts.has(g)&&(s=y({rel:"modulepreload",href:s},r),Ts.set(g,s),l.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(tc(g)))return}u=l.createElement("link"),Tn(u,"link",s),Nn(u),l.head.appendChild(u)}}}function OT(s,r,l){ka.S(s,r,l);var u=Ao;if(u&&s){var m=Ki(u).hoistableStyles,g=_o(s);r=r||"default";var N=m.get(g);if(!N){var _={loading:0,preload:null};if(N=u.querySelector(ec(g)))_.loading=5;else{s=y({rel:"stylesheet",href:s,"data-precedence":r},l),(l=Ts.get(g))&&hp(s,l);var B=N=u.createElement("link");Nn(B),Tn(B,"link",s),B._p=new Promise(function(K,se){B.onload=K,B.onerror=se}),B.addEventListener("load",function(){_.loading|=1}),B.addEventListener("error",function(){_.loading|=2}),_.loading|=4,gd(N,r,u)}N={type:"stylesheet",instance:N,count:1,state:_},m.set(g,N)}}}function DT(s,r){ka.X(s,r);var l=Ao;if(l&&s){var u=Ki(l).hoistableScripts,m=ko(s),g=u.get(m);g||(g=l.querySelector(tc(m)),g||(s=y({src:s,async:!0},r),(r=Ts.get(m))&&pp(s,r),g=l.createElement("script"),Nn(g),Tn(g,"link",s),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(m,g))}}function RT(s,r){ka.M(s,r);var l=Ao;if(l&&s){var u=Ki(l).hoistableScripts,m=ko(s),g=u.get(m);g||(g=l.querySelector(tc(m)),g||(s=y({src:s,async:!0,type:"module"},r),(r=Ts.get(m))&&pp(s,r),g=l.createElement("script"),Nn(g),Tn(g,"link",s),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(m,g))}}function u1(s,r,l,u){var m=(m=xe.current)?pd(m):null;if(!m)throw Error(a(446));switch(s){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=_o(l.href),l=Ki(m).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){s=_o(l.href);var g=Ki(m).hoistableStyles,N=g.get(s);if(N||(m=m.ownerDocument||m,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(s,N),(g=m.querySelector(ec(s)))&&!g._p&&(N.instance=g,N.state.loading=5),Ts.has(s)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ts.set(s,l),g||FT(m,s,l,N.state))),r&&u===null)throw Error(a(528,""));return N}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?
vendor: 4,459 bytes, line 9
9(r=ko(l),l=Ki(m).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,s))}}function _o(s){return'href="'+Ns(s)+'"'}function ec(s){return'link[rel="stylesheet"]['+s+"]"}function d1(s){return y({},s,{"data-precedence":s.precedence,precedence:null})}function FT(s,r,l,u){s.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=s.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),Tn(r,"link",l),Nn(r),s.head.appendChild(r))}function ko(s){return'[src="'+Ns(s)+'"]'}function tc(s){return"script[async]"+s}function f1(s,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=s.querySelector('style[data-href~="'+Ns(l.href)+'"]');if(u)return r.instance=u,Nn(u),u;var m=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),Nn(u),Tn(u,"style",m),gd(u,l.precedence,s),r.instance=u;case"stylesheet":m=_o(l.href);var g=s.querySelector(ec(m));if(g)return r.state.loading|=4,r.instance=g,Nn(g),g;u=d1(l),(m=Ts.get(m))&&hp(u,m),g=(s.ownerDocument||s).createElement("link"),Nn(g);var N=g;return N._p=new Promise(function(_,B){N.onload=_,N.onerror=B}),Tn(g,"link",u),r.state.loading|=4,gd(g,l.precedence,s),r.instance=g;case"script":return g=ko(l.src),(m=s.querySelector(tc(g)))?(r.instance=m,Nn(m),m):(u=l,(m=Ts.get(g))&&(u=y({},l),pp(u,m)),s=s.ownerDocument||s,m=s.createElement("script"),Nn(m),Tn(m,"link",u),s.head.appendChild(m),r.instance=m);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,gd(u,l.precedence,s));return r.instance}function gd(s,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,g=m,N=0;N<u.length;N++){var _=u[N];if(_.dataset.precedence===r)g=_;else if(g!==m)break}g?g.parentNode.insertBefore(s,g.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(s,r.firstChild))}function hp(s,r){s.crossOrigin==null&&(s.crossOrigin=r.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=r.referrerPolicy),s.title==null&&(s.title=r.title)}function pp(s,r){s.crossOrigin==null&&(s.crossOrigin=r.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=r.referrerPolicy),s.integrity==null&&(s.integrity=r.integrity)}var xd=null;function m1(s,r,l){if(xd===null){var u=new Map,m=xd=new Map;m.set(l,u)}else m=xd,u=m.get(l),u||(u=new Map,m.set(l,u));if(u.has(s))return u;for(u.set(s,null),l=l.getElementsByTagName(s),m=0;m<l.length;m++){var g=l[m];if(!(g[hl]||g[Bn]||s==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var N=g.getAttribute(r)||"";N=s+N;var _=u.get(N);_?_.push(g):u.set(N,[g])}}return u}function h1(s,r,l){s=s.ownerDocument||s,s.head.insertBefore(l,r==="title"?s.querySelector("head > title"):null)}function PT(s,r,l){if(l===1||r.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(s=r.disabled,typeof r.precedence=="string"&&s==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function p1(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}var nc=null;function BT(){}function qT(s,r,l){if(nc===null)throw Error(a(475));var u=nc;if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var m=_o(l.href),g=s.querySelector(ec(m));if(g){s=g._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(u.count++,u=yd.bind(u),s.then(u,u)),r.state.loading|=4,r.instance=g,Nn(g);return}g=s.ownerDocument||s,l=d1(l),(m=Ts.get(m))&&hp(l,m),g=g.createElement("link"),Nn(g);var N=g;N._p=new Promise(function(_,B){N.onload=_,N.onerror=B}),Tn(g,"link",l),r.instance=g}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(r,s),(s=r.state.preload)&&(r.state.loading&3)===0&&(u.count++,r=yd.bind(u),s.addEventListener("load",r),s.addEventListener("error",r))}}
vendor: 4,178 bytes, line 9
9function LT(){if(nc===null)throw Error(a(475));var s=nc;return s.stylesheets&&s.count===0&&gp(s,s.stylesheets),0<s.count?function(r){var l=setTimeout(function(){if(s.stylesheets&&gp(s,s.stylesheets),s.unsuspend){var u=s.unsuspend;s.unsuspend=null,u()}},6e4);return s.unsuspend=r,function(){s.unsuspend=null,clearTimeout(l)}}:null}function yd(){if(this.count--,this.count===0){if(this.stylesheets)gp(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var vd=null;function gp(s,r){s.stylesheets=null,s.unsuspend!==null&&(s.count++,vd=new Map,r.forEach(UT,s),vd=null,yd.call(s))}function UT(s,r){if(!(r.state.loading&4)){var l=vd.get(s);if(l)var u=l.get(null);else{l=new Map,vd.set(s,l);for(var m=s.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var N=m[g];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(l.set(N.dataset.precedence,N),u=N)}u&&l.set(null,u)}m=r.instance,N=m.getAttribute("data-precedence"),g=l.get(N)||u,g===u&&l.set(null,m),l.set(N,m),this.count++,u=yd.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),g?g.parentNode.insertBefore(m,g.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(m,s.firstChild)),r.state.loading|=4}}var sc={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function zT(s,r,l,u,m,g,N,_){this.tag=1,this.containerInfo=s,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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function g1(s,r,l,u,m,g,N,_,B,K,se,oe){return s=new zT(s,r,l,N,_,B,K,oe),r=1,g===!0&&(r|=24),g=is(3,null,null,r),s.current=g,g.stateNode=s,r=Zm(),r.refCount++,s.pooledCache=r,r.refCount++,g.memoizedState={element:u,isDehydrated:l,cache:r},th(g),s}function x1(s){return s?(s=ro,s):ro}function y1(s,r,l,u,m,g){m=x1(m),u.context===null?u.context=m:u.pendingContext=m,u=Qa(r),u.payload={element:l},g=g===void 0?null:g,g!==null&&(u.callback=g),l=Za(s,u,r),l!==null&&(ds(l,s,r),Dl(l,s,r))}function v1(s,r){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<r?l:r}}function xp(s,r){v1(s,r),(s=s.alternate)&&v1(s,r)}function b1(s){if(s.tag===13){var r=ao(s,67108864);r!==null&&ds(r,s,67108864),xp(s,67108864)}}var bd=!0;function IT(s,r,l,u){var m=L.T;L.T=null;var g=J.p;try{J.p=2,yp(s,r,l,u)}finally{J.p=g,L.T=m}}function $T(s,r,l,u){var m=L.T;L.T=null;var g=J.p;try{J.p=8,yp(s,r,l,u)}finally{J.p=g,L.T=m}}function yp(s,r,l,u){if(bd){var m=vp(u);if(m===null)rp(s,r,u,wd,l),j1(s,u);else if(HT(m,s,r,l,u))u.stopPropagation();else if(j1(s,u),r&4&&-1<VT.indexOf(s)){for(;m!==null;){var g=Yi(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var N=je(g.pendingLanes);if(N!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;N;){var B=1<<31-Gt(N);_.entanglements[1]|=B,N&=~B}ta(g),(St&6)===0&&(ad=zt()+500,Ql(0))}}break;case 13:_=ao(g,2),_!==null&&ds(_,g,2),id(),xp(g,2)}if(g=vp(u),g===null&&rp(s,r,u,wd,l),g===m)break;m=g}m!==null&&u.stopPropagation()}else rp(s,r,u,null,l)}}function vp(s){return s=Cm(s),bp(s)}var wd=null;function bp(s){if(wd=null,s=Hi(s),s!==null){var r=c(s);if(r===null)s=null;else{var l=r.tag;if(l===13){if(s=d(r),s!==null)return s;s=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;s=null}else r!==s&&(s=null)}}return wd=s,null}function w1(s){switch(s){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"invali
9d":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(Gs()){case Ws:return 2;case Va:return 8;case An:case zr:return 32;case Qs:return 268435456;default:return 32}default:return 32}}var wp=!1,ur=null,dr=null,fr=null,ac=new Map,rc=new Map,mr=[],VT="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 j1(s,r){switch(s){case"focusin":case"focusout":ur=null;break;case"dragenter":case"dragleave":dr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":ac.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":rc.delete(r.pointerId)}}function ic(s,r,l,u,m,g){return s===null||s.nativeEvent!==g?(s={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:g,targetContainers:[m]},r!==null&&(r=Yi(r),r!==null&&b1(r)),s):(s.eventSystemFlags|=u,r=s.targetContainers,m!==null&&r.indexOf(m)===-1&&r.push(m),s)}function HT(s,r,l,u,m){switch(r){case"focusin":return ur=ic(ur,s,r,l,u,m),!0;case"dragenter":return dr=ic(dr,s,r,l,u,m),!0;case"mouseover":return fr=ic(fr,s,r,l,u,m),!0;case"pointerover":var g=m.pointerId;return ac.set(g,ic(ac.get(g)||null,s,r,l,u,m)),!0;case"gotpointercapture":return g=m.pointerId,rc.set(g,ic(rc.get(g)||null,s,r,l,u,m)),!0}return!1}function N1(s){var r=Hi(s.target);if(r!==null){var l=c(r);if(l!==null){if(r=l.tag,r===13){if(r=d(l),r!==null){s.blockedOn=r,ml(s.priority,function(){if(l.tag===13){var u=us();u=$r(u);var m=ao(l,u);m!==null&&ds(m,l,u),xp(l,u)}});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function jd(s){if(s.blockedOn!==null)return!1;for(var r=s.targetContainers;0<r.length;){var l=vp(s.nativeEvent);if(l===null){l=s.nativeEvent;var u=new l.constructor(l.type,l);Nm=u,l.target.dispatchEvent(u),Nm=null}else return r=Yi(l),r!==null&&b1(r),s.blockedOn=l,!1;r.shift()}return!0}function C1(s,r,l){jd(s)&&l.delete(r)}function YT(){wp=!1,ur!==null&&jd(ur)&&(ur=null),dr!==null&&jd(dr)&&(dr=null),fr!==null&&jd(fr)&&(fr=null),ac.forEach(C1),rc.forEach(C1)}function Nd(s,r){s.blockedOn===r&&(s.blockedOn=null,wp||(wp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,YT)))}var Cd=null;function S1(s){Cd!==s&&(Cd=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cd===s&&(Cd=null);for(var r=0;r<s.length;r+=3){var l=s[r],u=s[r+1],m=s[r+2];if(typeof u!="function"){if(bp(u||l)===null)continue;break}var g=Yi(l);g!==null&&(s.splice(r,3),r-=3,bh(g,{pending:!0,data:m,method:l.method,action:u},u,m))}}))}function oc(s){function r(B){return Nd(B,s)}ur!==null&&Nd(ur,s),dr!==null&&Nd(dr,s),fr!==null&&Nd(fr,s),ac.forEach(r),rc.forEach(r);for(var l=0;l<mr.length;l++){var u=mr[l];u.blockedOn===s&&(u.blockedOn=null)}for(;0<mr.length&&(l=mr[0],l.blockedOn===null);)N1(l),l.blockedOn===null&&mr.shift();if(l=(s.ownerDocument||s).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var m=l[u],g=l[u+1],N=m[Zn]||null;if(typeof g=="function")N||S1(l);else if(N){var _=null;if(g&&g.hasAttribute("formAction")){if(m=g,N=g[Zn]||null)_=N.formAction;else if(bp(m)!==null)continue}else _=N.action;typeof _=="function"?l[u+1]=_:(l.splice(u,3),u-=3),S1(l)}}}function jp(s){this._internalRoot=s}Sd.prototype.render=jp.prototype.render=function(s){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=us();y1(l,u,s,r,null,null)},Sd.prototype.unmount=jp.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var r=s.containerInfo;y1(s.current,2,null,s,null,null),id(),r[Vi]=null}};function Sd(s){this._internalRoot=s}Sd.prototype.unstable_scheduleHydration=function(s){if(s){var r=$i();s={blockedOn:null,target:s,priority:r};for(var l=0;l<mr.length&&r!==0&&r<mr[l].priority;l++);mr.splice(l,0,s),l===0&&N1(s)}};var E1=t.version;if(E1!=="19.1.0")throw Error(a(527,E1,"19.1.0"));J.findDOMNode=function(s){var r=s._reactInternals;if(r===void 0)throw typeof s.render=="function"?Error(a(188)):(s=Object.keys(s).join(","),Error(a(268,s)));return s=h(r),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var KT={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.1.0"};
vendor: 27,872 bytes, line 9
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ed.isDisabled&&Ed.supportsFiber)try{Pt=Ed.inject(KT),Rt=Ed}catch{}}return cc.createRoot=function(s,r){if(!o(s))throw Error(a(299));var l=!1,u="",m=Ib,g=$b,N=Vb,_=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(N=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks)),r=g1(s,1,!1,null,null,l,u,m,g,N,_,null),s[Vi]=r.current,ap(s),new jp(r)},cc.hydrateRoot=function(s,r,l){if(!o(s))throw Error(a(299));var u=!1,m="",g=Ib,N=$b,_=Vb,B=null,K=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(B=l.unstable_transitionCallbacks),l.formState!==void 0&&(K=l.formState)),r=g1(s,1,!0,r,l??null,u,m,g,N,_,B,K),r.context=x1(null),l=r.current,u=us(),u=$r(u),m=Qa(u),m.callback=null,Za(l,m,u),l=u,r.current.lanes=l,Ge(r,l),ta(r),s[Vi]=r.current,ap(s),new Sd(r)},cc.version="19.1.0",cc}var P1;function aM(){if(P1)return Cp.exports;P1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cp.exports=sM(),Cp.exports}var rM=aM(),sl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},iM=class extends sl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ex=new iM,oM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lM=class{#e=oM;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},mi=new lM;function cM(e){setTimeout(e,0)}var uM=typeof window>"u"||"Deno"in globalThis;function Kn(){}function dM(e,t){return typeof e=="function"?e(t):e}function sg(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nr(e,t){return typeof e=="function"?e(t):e}function ms(e,t){return typeof e=="function"?e(t):e}function B1(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:c,queryKey:d,stale:f}=e;if(d){if(a){if(t.queryHash!==tx(d,t.options))return!1}else if(!_c(t.queryKey,d))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||c&&!c(t))}function q1(e,t){const{exact:n,status:a,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(gi(t.options.mutationKey)!==gi(c))return!1}else if(!_c(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function tx(e,t){return(t?.queryKeyHashFn||gi)(e)}function gi(e){return JSON.stringify(e,(t,n)=>ag(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function _c(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_c(e[n],t[n])):!1}var fM=Object.prototype.hasOwnProperty;function eN(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=L1(e)&&L1(t);if(!a&&!(ag(e)&&ag(t)))return t;const c=(a?e:Object.keys(e)).length,d=a?t:Object.keys(t),f=d.length,h=a?new Array(f):{};let p=0;for(let y=0;y<f;y++){const v=a?y:d[y],b=e[v],S=t[v];if(b===S){h[v]=b,(a?y<c:fM.call(e,v))&&p++;continue}if(b===null||S===null||typeof b!="object"||typeof S!="object"){h[v]=S;continue}const E=eN(b,S,n+1);h[v]=E,E===b&&p++}return c===f&&p===c?e:h}function Zd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function L1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ag(e){if(!U1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!U1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function U1(e){return Object.prototype.toString.call(e)==="[object Object]"}function mM(e){return new Promise(t=>{mi.setTimeout(t,e)})}function rg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eN(e,t):t}function hM(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function pM(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var nx=Symbol();function tN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===nx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sx(e,t){return typeof e=="function"?e(...t):!!e}function gM(e,t,n){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var kc=(()=>{let e=()=>uM;return{isServer(){return e()},setIsServer(t){e=t}}})();function ig(){let e,t;const n=new Promise((o,c)=>{e=o,t=c});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var xM=cM;function yM(){let e=[],t=0,n=f=>{f()},a=f=>{f()},o=xM;const c=f=>{t?e.push(f):o(()=>{n(f)})},d=()=>{const f=e;e=[],f.length&&o(()=>{a(()=>{f.forEach(h=>{n(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||d()}return h},batchCalls:f=>(...h)=>{c(()=>{f(...h)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{o=f}}}var wn=yM(),vM=class extends sl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Xd=new vM;function bM(e){return Math.min(1e3*2**e,3e4)}function nN(e){return(e??"online")==="online"?Xd.isOnline():!0}var og=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function sN(e){let t=!1,n=0,a;const o=ig(),c=()=>o.status!=="pending",d=w=>{if(!c()){const C=new og(w);b(C),e.onCancel?.(C)}},f=()=>{t=!0},h=()=>{t=!1},p=()=>ex.isFocused()&&(e.networkMode==="always"||Xd.isOnline())&&e.canRun(),y=()=>nN(e.networkMode)&&e.canRun(),v=w=>{c()||(a?.(),o.resolve(w))},b=w=>{c()||(a?.(),o.reject(w))},S=()=>new Promise(w=>{a=C=>{(c()||p())&&w(C)},e.onPause?.()}).then(()=>{a=void 0,c()||e.onContinue?.()}),E=()=>{if(c())return;let w;const C=n===0?e.initialPromise:void 0;try{w=C??e.fn()}catch(A){w=Promise.reject(A)}Promise.resolve(w).then(v).catch(A=>{if(c())return;const j=e.retry??(kc.isServer()?0:3),M=e.retryDelay??bM,R=typeof M=="function"?M(n,A):M,T=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,A);if(t||!T){b(A);return}n++,e.onFail?.(n,A),mM(R).then(()=>p()?void 0:S()).then(()=>{t?b(A):E()})})};return{promise:o,status:()=>o.status,cancel:d,continue:()=>(a?.(),o),cancelRetry:f,continueRetry:h,canStart:y,start:()=>(y()?E():S().then(E),o)}}var aN=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sg(this.gcTime)&&(this.#e=mi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(kc.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(mi.clearTimeout(this.#e),this.#e=void 0)}};function wM(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],d=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const p=async()=>{let y=!1;const v=E=>{gM(E,()=>t.signal,()=>y=!0)},b=tN(t.options,t.fetchOptions),S=async(E,w,C)=>{if(y)return Promise.reject(t.signal.reason);if(w==null&&E.pages.length)return Promise.resolve(E);const j=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:w,direction:C?"backward":"forward",meta:t.options.meta};return v(D),D})(),M=await b(j),{maxPages:R}=t.options,T=C?pM:hM;return{pages:T(E.pages,M,R),pageParams:T(E.pageParams,w,R)}};if(o&&c.length){const E=o==="backward",w=E?jM:z1,C={pages:c,pageParams:d},A=w(a,C);f=await S(C,A,E)}else{const E=e??c.length;do{const w=h===0?d[0]??a.initialPageParam:z1(a,f);if(h>0&&w==null)break;f=await S(f,w),h++}while(h<E)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=p}}}function z1(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function jM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var NM=class extends aN{#e;#t;#n;#s;#r;#a;#o;#i;constructor(e){super(),this.#i=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#s=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=$1(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=$1(this.options);t.data!==void 0&&(this.setState(I1(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const n=rg(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ms(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nx||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Nr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Jj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#i||this.#u()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const h=tN(this.options,t),y=(()=>{const v={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(v),v})();return this.#i=!1,this.options.persister?this.options.persister(h,y,this):h(y)},d=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:o};return a(h),h})();(this.#e==="infinite"?wM(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=sN({initialPromise:t?.initialPromise,fn:d.fetchFn,onCancel:h=>{h instanceof og&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(h,p)=>{this.#l({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#s.config.onSuccess?.(h,this),this.#s.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof og){if(h.silent)return this.#a.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#s.config.onError?.(h,this),this.#s.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...rN(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...I1(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),wn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function rN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var CM=class extends sl{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=ig(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#u;#l;#h;#d;#f;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),V1(this.#t,this.options)?this.#m():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lg(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ms(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#t.setOptions(this.options),t._defaulted&&!Zd(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&H1(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),a&&(this.#t!==n||ms(this.options.enabled,this.#t)!==ms(t.enabled,this.#t)||Nr(this.options.staleTime,this.#t)!==Nr(t.staleTime,this.#t))&&this.#g();const o=this.#x();a&&(this.#t!==n||ms(this.options.enabled,this.#t)!==ms(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return EM(this,n)&&(this.#s=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#j();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Kn)),t}#g(){this.#b();const e=Nr(this.options.staleTime,this.#t);if(kc.isServer()||this.#s.isStale||!sg(e))return;const n=Jj(this.#s.dataUpdatedAt,e)+1;this.#d=mi.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(kc.isServer()||ms(this.options.enabled,this.#t)===!1||!sg(this.#c)||this.#c===0)&&(this.#f=mi.setInterval(()=>{(this.options.refetchIntervalInBackground||ex.isFocused())&&this.#m()},this.#c))}#v(){this.#g(),this.#y(this.#x())}#b(){this.#d!==void 0&&(mi.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(mi.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#s,c=this.#r,d=this.#a,h=e!==n?e.state:this.#n,{state:p}=e;let y={...p},v=!1,b;if(t._optimisticResults){const k=this.hasListeners(),z=!k&&V1(e,t),X=k&&H1(e,n,t,a);(z||X)&&(y={...y,...rN(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:S,errorUpdatedAt:E,status:w}=y;b=y.data;let C=!1;if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let k;o?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(k=o.data,C=!0):k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,k!==void 0&&(w="success",b=rg(o?.data,k,t),v=!0)}if(t.select&&b!==void 0&&!C)if(o&&b===c?.data&&t.select===this.#u)b=this.#l;else try{this.#u=t.select,b=t.select(b),b=rg(o?.data,b,t),this.#l=b,this.#i=null}catch(k){this.#i=k}this.#i&&(S=this.#i,b=this.#l,E=Date.now(),w="error");const A=y.fetchStatus==="fetching",j=w==="pending",M=w==="error",R=j&&A,T=b!==void 0,F={status:w,fetchStatus:y.fetchStatus,isPending:j,isSuccess:w==="success",isError:M,isInitialLoading:R,isLoading:R,data:b,dataUpdatedAt:y.dataUpdatedAt,error:S,errorUpdatedAt:E,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:A,isRefetching:A&&!j,isLoadingError:M&&!T,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:M&&T,isStale:ax(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ms(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const k=F.data!==void 0,z=F.status==="error"&&!k,X=ne=>{z?ne.reject(F.error):k&&ne.resolve(F.data)},q=()=>{const ne=this.#o=F.promise=ig();X(ne)},Y=this.#o;switch(Y.status){case"pending":e.queryHash===n.queryHash&&X(Y);break;case"fulfilled":(z||F.data!==Y.value)&&q();break;case"rejected":(!z||F.error!==Y.reason)&&q();break}}return F}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Zd(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const c=new Set(o??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#s).some(d=>{const f=d;return this.#s[f]!==e[f]&&c.has(f)})};this.#N({listeners:n()})}#j(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#N(e){wn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function SM(e,t){return ms(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&ms(t.retryOnMount,e)===!1)}function V1(e,t){return SM(e,t)||e.state.data!==void 0&&lg(e,t,t.refetchOnMount)}function lg(e,t,n){if(ms(t.enabled,e)!==!1&&Nr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&ax(e,t)}return!1}function H1(e,t,n,a){return(e!==t||ms(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ax(e,n)}function ax(e,t){return ms(t.enabled,e)!==!1&&e.isStaleByTime(Nr(t.staleTime,e))}function EM(e,t){return!Zd(e.getCurrentResult(),t)}var AM=class extends aN{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||iN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=sN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#r({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const d=await this.options.onMutate?.(e,n);d!==this.state.context&&this.#r({type:"pending",context:d,variables:e,isPaused:o})}const c=await this.#s.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,n),await this.options.onSuccess?.(c,e,this.state.context,n),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(c,null,e,this.state.context,n),this.#r({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,n)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,e,this.state.context,n)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,n)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,n)}catch(d){Promise.reject(d)}throw this.#r({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),wn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function iN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _M=class extends sl{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new AM({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=Ad(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Ad(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ad(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Ad(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>q1(t,n))}findAll(e={}){return this.getAll().filter(t=>q1(e,t))}notify(e){wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>
9t.state.isPaused);return wn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Kn))))}};function Ad(e){return e.options.scope?.id}var kM=class extends sl{#e;#t=void 0;#n;#s;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Zd(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&gi(n.mutationKey)!==gi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#s=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??iN();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){wn.batch(()=>{if(this.#s&&this.hasListeners()){const n=this.#t.variables,a=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#s.onSuccess?.(t.data,n,a,o)}catch(c){Promise.reject(c)}
vendor: 5,859 bytes, line 9
9try{this.#s.onSettled?.(t.data,null,n,a,o)}catch(c){Promise.reject(c)}}else if(t?.type==="error"){try{this.#s.onError?.(t.error,n,a,o)}catch(c){Promise.reject(c)}try{this.#s.onSettled?.(void 0,t.error,n,a,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(n=>{n(this.#t)})})}},TM=class extends sl{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??tx(a,t);let c=this.get(o);return c||(c=new NM({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>B1(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>B1(e,n)):t}notify(e){wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},MM=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(e={}){this.#e=e.queryCache||new TM,this.#t=e.mutationCache||new _M,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ex.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Nr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(a.queryHash)?.state.data,d=dM(t,c);if(d!==void 0)return this.#e.build(this,a).setData(d,{...n,manual:!0})}setQueriesData(e,t,n){return wn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;wn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return wn.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=wn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Kn).catch(Kn)}invalidateQueries(e,t={}){return wn.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=wn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,n);return n.throwOnError||(c=c.catch(Kn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Nr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kn).catch(Kn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kn).catch(Kn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Xd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(gi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(a=>{_c(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(gi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{_c(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nx&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},x=Cf();const re=QT(x),al=WT({__proto__:null,default:re},[x]);var oN=x.createContext(void 0),Kt=e=>{const t=x.useContext(oN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},OM=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(oN.Provider,{value:e,children:t})),lN=x.createContext(!1),DM=()=>x.useContext(lN);lN.Provider;function RM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
9var FM=x.createContext(RM()),PM=()=>x.useContext(FM),BM=(e,t,n)=>{const a=n?.state.error&&typeof e.throwOnError=="function"?sx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},qM=e=>{x.useEffect(()=>{e.clearReset()},[e])},LM=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||sx(n,[e.error,a])),UM=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zM=(e,t)=>e.isLoading&&e.isFetching&&!t,IM=(e,t)=>e?.suspense&&t.isPending,Y1=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $M(e,t,n){const a=DM(),o=PM(),c=Kt(),d=c.defaultQueryOptions(e);c.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const f=c.getQueryCache().get(d.queryHash),h=e.subscribed!==!1;d._optimisticResults=a?"isRestoring":h?"optimistic":void 0,UM(d),BM(d,o,f),qM(o);const p=!c.getQueryCache().get(d.queryHash),[y]=x.useState(()=>new t(c,d)),v=y.getOptimisticResult(d),b=!a&&h;if(x.useSyncExternalStore(x.useCallback(S=>{const E=b?y.subscribe(wn.batchCalls(S)):Kn;return y.updateResult(),E},[y,b]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),x.useEffect(()=>{y.setOptions(d)},[d,y]),IM(d,v))throw Y1(d,y,o);if(LM({result:v,errorResetBoundary:o,throwOnError:d.throwOnError,query:f,suspense:d.suspense}))throw v.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(d,v),d.experimental_prefetchInRender&&!kc.isServer()&&zM(v,a)&&(p?Y1(d,y,o):f?.promise)?.catch(Kn).finally(()=>{y.updateResult()}),d.notifyOnChangeProps?v:y.trackResult(v)}function ln(e,t){return $M(e,CM)}function ht(e,t){const n=Kt(),[a]=x.useState(()=>new kM(n,e));x.useEffect(()=>{a.setOptions(e)},[a,e]);const o=x.useSyncExternalStore(x.useCallback(d=>a.subscribe(wn.batchCalls(d)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=x.useCallback((d,f)=>{a.mutate(d,f).catch(Kn)},[a]);if(o.error&&sx(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}var rl=Xj();function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function K1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function VM(...e){return t=>{let n=!1;const a=e.map(o=>{const c=K1(o,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let o=0;o<a.length;o++){const c=a[o];typeof c=="function"?c():K1(e[o],null)}}}}function nt(...e){return x.useCallback(VM(...e),e)}function ss(e,t=[]){let n=[];function a(c,d){const f=x.createContext(d);f.displayName=c+"Context";const h=n.length;n=[...n,d];const p=v=>{const{scope:b,children:S,...E}=v,w=b?.[e]?.[h]||f,C=x.useMemo(()=>E,Object.values(E));return i.jsx(w.Provider,{value:C,children:S})};p.displayName=c+"Provider";function y(v,b){const S=b?.[e]?.[h]||f,E=x.useContext(S);if(E)return E;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${c}\``)}return[p,y]}const o=()=>{const c=n.map(d=>x.createContext(d));return function(f){const h=f?.[e]||c;return x.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return o.scopeName=e,[a,HM(o,...t)]}function HM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(c){const d=a.reduce((f,{useScope:h,scopeName:p})=>{const v=h(c)[`__scope${p}`];return{...f,...v}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return n.scopeName=t.scopeName,n}function Er(e){const t=x.forwardRef((n,a)=>{let{children:o,...c}=n,d=null,f=!1;const h=[];G1(o)&&typeof _d=="function"&&(o=_d(o._payload)),x.Children.forEach(o,b=>{if(QM(b)){f=!0;const S=b;let E="child"in S.props?S.props.child:S.props.children;G1(E)&&typeof _d=="function"&&(E=_d(E._payload)),d=KM(S,E),h.push(d?.props?.children)}else h.push(b)}),d?d=x.cloneElement(d,void 0,h):!f&&x.Children.count(o)===1&&x.isValidElement(o)&&(d=o);const p=d?WM(d):void 0,y=nt(a,p);if(!d){if(o||o===0)throw new Error(f?eO(e):JM(e));return o}const v=GM(c,d.props??{});return d.type!==x.Fragment&&(v.ref=a?y:p),x.cloneElement(d,v)});return t.displayName=`${e}.Slot`,t}var cN=Er("Slot"),uN=Symbol.for("radix.slottable");function YM(e){const t=n=>"child"in n?n.children(n.child):n.children;return t.displayName=`${e}.Slottable`,t.__radixId=uN,t}var KM=(e,t)=>{if("child"in e.props){const n=e.props.child;return x.isValidElement(n)?x.cloneElement(n,void 0,e.props.children(n.props.children)):null}return x.isValidElement(t)?t:null};function GM(e,t){const n={...t};for(const a in t){const o=e[a],c=t[a];/^on[A-Z]/.test(a)?o&&c?n[a]=(...f)=>{const h=c(...f);return o(...f),h}:o&&(n[a]=o):a==="style"?n[a]={...o,...c}
9:a==="className"&&(n[a]=[o,c].filter(Boolean).join(" "))}return{...e,...n}}function WM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function QM(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uN}var ZM=Symbol.for("react.lazy");function G1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ZM&&"_payload"in e&&XM(e._payload)}function XM(e){return typeof e=="object"&&e!==null&&"then"in e}var JM=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,eO=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,_d=al[" use ".trim().toString()];function Sf(e){const t=e+"CollectionProvider",[n,a]=ss(t),[o,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=w=>{const{scope:C,children:A}=w,j=x.useRef(null),M=x.useRef(new Map).current;return i.jsx(o,{scope:C,itemMap:M,collectionRef:j,children:A})};d.displayName=t;const f=e+"CollectionSlot",h=Er(f),p=x.forwardRef((w,C)=>{const{scope:A,children:j}=w,M=c(f,A),R=nt(C,M.collectionRef);return i.jsx(h,{ref:R,children:j})});p.displayName=f;const y=e+"CollectionItemSlot",v="data-radix-collection-item",b=Er(y),S=x.forwardRef((w,C)=>{const{scope:A,children:j,...M}=w,R=x.useRef(null),T=nt(C,R),D=c(y,A);return x.useEffect(()=>(D.itemMap.set(R,{ref:R,...M}),()=>{D.itemMap.delete(R)})),i.jsx(b,{[v]:"",ref:T,children:j})});S.displayName=y;function E(w){const C=c(e+"CollectionConsumer",w);return x.useCallback(()=>{const j=C.collectionRef.current;if(!j)return[];const M=Array.from(j.querySelectorAll(`[${v}]`));return Array.from(C.itemMap.values()).sort((D,F)=>M.indexOf(D.ref.current)-M.indexOf(F.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:d,Slot:p,ItemSlot:S}
9,E,a]}var tO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ie=tO.reduce((e,t)=>{const n=Er(`Primitive.${t}`),a=x.forwardRef((o,c)=>{const{asChild:d,...f}=o,h=d?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(h,{...f,ref:c})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function rx(e,t){e&&rl.flushSync(()=>e.dispatchEvent(t))}function Wn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>((...n)=>t.current?.(...n)),[])}var jn=globalThis?.document?x.useLayoutEffect:()=>{},W1=al[" useEffectEvent ".trim().toString()],Q1=al[" useInsertionEffect ".trim().toString()];function nO(e){if(typeof W1=="function")return W1(e);const t=x.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Q1=="function"?Q1(()=>{t.current=e}):jn(()=>{t.current=e}),x.useMemo(()=>((...n)=>t.current?.(...n)),[])}var sO="DismissableLayer",cg="dismissableLayer.update",aO="dismissableLayer.pointerDownOutside",rO="dismissableLayer.focusOutside",Z1,ix=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ai=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:h,...p}=e,y=x.useContext(ix),[v,b]=x.useState(null),S=v?.ownerDocument??globalThis?.document,[,E]=x.useState({}),w=nt(t,b),C=Array.from(y.layers),[A]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),j=C.indexOf(A),M=v?C.indexOf(v):-1,R=y.layersWithOutsidePointerEventsDisabled.size>0,T=M>=j,D=x.useRef(!1),F=lO(q=>{const Y=q.target;if(!(Y instanceof Node))return;const ne=[...y.branches].some(Z=>Z.contains(Y));!T||ne||(c?.(q),f?.(q),q.defaultPrevented||h?.())},{ownerDocument:S,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:y.dismissableSurfaces}),k=cO(q=>{if(a&&D.current)return;const Y=q.target;[...y.branches].some(Z=>Z.contains(Y))||(d?.(q),f?.(q),q.defaultPrevented||h?.())},S),z=v?M===C.length-1:!1,X=nO(q=>{q.key==="Escape"&&(o?.(q),!q.defaultPrevented&&h&&(q.preventDefault(),h()))});return x.useEffect(()=>{if(z)return S.addEventListener("keydown",X,{capture:!0}),()=>S.removeEventListener("keydown",X,{capture:!0})},[S,z]),x.useEffect(()=>{if(v)return n&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(Z1=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(v)),y.layers.add(v),X1(),()=>{n&&(y.layersWithOutsidePointerEventsDisabled.delete(v),y.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Z1))}},[v,S,n,y]),x.useEffect(()=>()=>{v&&(y.layers.delete(v),y.layersWithOutsidePointerEventsDisabled.delete(v),X1())},[v,y]),x.useEffect(()=>{const q=()=>E({});return document.addEventListener(cg,q),()=>document.removeEventListener(cg,q)},[]),i.jsx(Ie.div,{...p,ref:w,style:{pointerEvents:R?T?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,k.onFocusCapture),onBlurCapture:be(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,F.onPointerDownCapture)})});Ai.displayName=sO;var iO="DismissableLayerBranch",dN=x.forwardRef((e,t)=>{const n=x.useContext(ix),a=x.useRef(null),o=nt(t,a);return x.useEffect(()=>{const c=a.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),i.jsx(Ie.div,{...e,ref:o})});dN.displayName=iO;function oO(){const e=x.useContext(ix),[t,n]=x.useState(null);return x.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function lO(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:a=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:c}=t,d=Wn(e),f=x.useRef(!1),h=x.useRef(!1),p=x.useRef(new Map),y=x.useRef(()=>{});return x.useEffect(()=>{function v(){h.current=!1,o.current=!1,p.current.clear()}function b(){return Array.from(p.current.values()).some(Boolean)}
9function S(j){if(!h.current)return;const M=j.target;M instanceof Node&&[...c].some(T=>T.contains(M))||p.current.set(j.type,!0),j.type==="click"&&window.setTimeout(()=>{h.current&&y.current()},0)}function E(j){h.current&&p.current.set(j.type,!1)}const w=j=>{if(j.target&&!f.current){let M=function(){n.removeEventListener("click",y.current);const T=b();v(),T||fN(aO,d,R,{discrete:!0})};const R={originalEvent:j};h.current=!0,o.current=a&&j.button===0,p.current.clear(),!a||j.button!==0?M():(n.removeEventListener("click",y.current),y.current=M,n.addEventListener("click",y.current,{once:!0}))}else n.removeEventListener("click",y.current),v();f.current=!1},C=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const j of C)n.addEventListener(j,S,!0),n.addEventListener(j,E);const A=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(A),n.removeEventListener("pointerdown",w),n.removeEventListener("click",y.current);for(const j of C)n.removeEventListener(j,S,!0),n.removeEventListener(j,E)}},[n,d,a,o,c]),{onPointerDownCapture:()=>f.current=!0}}function cO(e,t=globalThis?.document){const n=Wn(e),a=x.useRef(!1);return x.useEffect(()=>{const o=c=>{c.target&&!a.current&&fN(rO,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function X1(){const e=new CustomEvent(cg);document.dispatchEvent(e)}function fN(e,t,n,{discrete:a}){const o=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?rx(o,c):o.dispatchEvent(c)}var uO=Ai,dO=dN,fO="Portal",_i=x.forwardRef((e,t)=>{const{container:n,...a}=e,[o,c]=x.useState(!1);jn(()=>c(!0),[]);const d=n||o&&globalThis?.document?.body;return d?rl.createPortal(i.jsx(Ie.div,{...a,ref:t}),d):null});_i.displayName=fO;function mO(e,t){return x.useReducer((n,a)=>t[n][a]??n,e)}var Hn=e=>{const{present:t,children:n}=e,a=hO(t),o=typeof n=="function"?n({present:a.isPresent}):x.Children.only(n),c=pO(a.ref,gO(o));return typeof n=="function"||a.isPresent?x.cloneElement(o,{ref:c}):null};Hn.displayName="Presence";function hO(e){const[t,n]=x.useState(),a=x.useRef(null),o=x.useRef(e),c=x.useRef("none"),d=e?"mounted":"unmounted",[f,h]=mO(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const p=kd(a.current);c.current=f==="mounted"?p:"none"},[f]),jn(()=>{const p=a.current,y=o.current;if(y!==e){const b=c.current,S=kd(p);e?h("MOUNT"):S==="none"||p?.display==="none"?h("UNMOUNT"):h(y&&b!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),jn(()=>{if(t){let p;const y=t.ownerDocument.defaultView??window,v=S=>{const w=kd(a.current).includes(CSS.escape(S.animationName));if(S.target===t&&w&&(h("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",p=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},b=S=>{S.target===t&&(c.current=kd(a.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{y.clearTimeout(p),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:x.useCallback(p=>{a.current=p?getComputedStyle(p):null,n(p)},[])}}function J1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pO(...e){const t=x.useRef(e);return t.current=e,x.useCallback(n=>{const a=t.current;let o=!1;const c=a.map(d=>{const f=J1(d,n);return!o&&typeof f=="function"&&(o=!0),f});if(o)return()=>{for(let d=0;d<c.length;d++){const f=c[d];typeof f=="function"?f():J1(a[d],null)}}},[])}function kd(e){return e?.animationName||"none"}function gO(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xO=al[" useInsertionEffect ".trim().toString()]||jn;function ua({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[o,c,d]=yO({defaultProp:t,onChange:n}),f=e!==void 0,h=f?e:o;{const y=x.useRef(e!==void 0);x.useEffect(()=>{const v=y.current;v!==f&&console.warn(`${a} is changing from ${v?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=f},[f,a])}const p=x.useCallback(y=>{if(f){const v=vO(y)?y(e):y;v!==e&&d.current?.(v)}else c(y)},[f,e,c,d]);return[h,p]}function yO({defaultProp:e,onChange:t}){const[n,a]=x.useState(e),o=x.useRef(n),c=x.useRef(t);return xO(()=>{c.current=t},[t]),x.useEffect(()=>{o.current!==n&&(c.current?.(n),o.current=n)},[n,o]),[n,a,c]}function vO(e){return typeof e=="function"}var mN=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),bO="VisuallyHidden",Ef=x.forwardRef((e,t)=>
9i.jsx(Ie.span,{...e,ref:t,style:{...mN,...e.style}}));Ef.displayName=bO;var wO=Ef,ox="ToastProvider",[lx,jO,NO]=Sf("Toast"),[hN]=ss("Toast",[NO]),[CO,Af]=hN(ox),pN=e=>{const{__scopeToast:t,label:n="Notification",duration:a=5e3,swipeDirection:o="right",swipeThreshold:c=50,announcerContainer:d,children:f}=e,[h,p]=x.useState(null),[y,v]=x.useState(0),b=x.useRef(!1),S=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ox}\`. Expected non-empty \`string\`.`),i.jsx(lx.Provider,{scope:t,children:i.jsx(CO,{scope:t,label:n,duration:a,swipeDirection:o,swipeThreshold:c,toastCount:y,viewport:h,onViewportChange:p,onToastAdd:x.useCallback(()=>v(E=>E+1),[]),onToastRemove:x.useCallback(()=>v(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:b,isClosePausedRef:S,announcerContainer:d,children:f})})};pN.displayName=ox;var gN="ToastViewport",SO=["F8"],ug="toast.viewportPause",dg="toast.viewportResume",xN=x.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:a=SO,label:o="Notifications ({hotkey})",...c}=e,d=Af(gN,n),f=jO(n),h=x.useRef(null),p=x.useRef(null),y=x.useRef(null),v=x.useRef(null),b=nt(t,v,d.onViewportChange),S=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=d.toastCount>0;x.useEffect(()=>{const C=A=>{a.length!==0&&a.every(M=>A[M]||A.code===M)&&v.current?.focus()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[a]),x.useEffect(()=>{const C=h.current,A=v.current;if(E&&C&&A){const j=()=>
9{if(!d.isClosePausedRef.current){const D=new CustomEvent(ug);A.dispatchEvent(D),d.isClosePausedRef.current=!0}},M=()=>{if(d.isClosePausedRef.current){const D=new CustomEvent(dg);A.dispatchEvent(D),d.isClosePausedRef.current=!1}},R=D=>{!C.contains(D.relatedTarget)&&M()},T=()=>{C.contains(document.activeElement)||M()};return C.addEventListener("focusin",j),C.addEventListener("focusout",R),C.addEventListener("pointermove",j),C.addEventListener("pointerleave",T),window.addEventListener("blur",j),window.addEventListener("focus",M),()=>{C.removeEventListener("focusin",j),C.removeEventListener("focusout",R),C.removeEventListener("pointermove",j),C.removeEventListener("pointerleave",T),window.removeEventListener("blur",j),window.removeEventListener("focus",M)}}},[E,d.isClosePausedRef]);const w=x.useCallback(({tabbingDirection:C})=>{const j=f().map(M=>{const R=M.ref.current,T=[R,...qO(R)];return C==="forwards"?T:T.reverse()});return(C==="forwards"?j.reverse():j).flat()},[f]);return x.useEffect(()=>{const C=v.current;if(C){const A=j=>{const M=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!M){const T=document.activeElement,D=j.shiftKey;if(j.target===C&&D){p.current?.focus();return}const z=w({tabbingDirection:D?"backwards":"forwards"}),X=z.findIndex(q=>q===T);kp(z.slice(X+1))?j.preventDefault():D?p.current?.focus():y.current?.focus()}};return C.addEventListener("keydown",A),()=>C.removeEventListener("keydown",A)}},[f,w]),i.jsxs(dO,{ref:h,role:"region","aria-label":o.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&i.jsx(fg,{ref:p,onFocusFromOutsideViewport:()=>{const C=w({tabbingDirection:"forwards"});kp(C)}}),i.jsx(lx.Slot,{scope:n,children:i.jsx(Ie.ol,{tabIndex:-1,...c,ref:b})}),E&&i.jsx(fg,{ref:y,onFocusFromOutsideViewport:()=>{const C=w({tabbingDirection:"backwards"});kp(C)}})]})});xN.displayName=gN;var yN="ToastFocusProxy",fg=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:a,...o}=e,c=Af(yN,n);return i.jsx(Ef,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:d=>{const f=d.relatedTarget;!c.viewport?.contains(f)&&a()}})});fg.displayName=yN;var zc="Toast",EO="toast.swipeStart",AO="toast.swipeMove",_O="toast.swipeCancel",kO="toast.swipeEnd",vN=x.forwardRef((e,t)=>{const{forceMount:n,open:a,defaultOpen:o,onOpenChange:c,...d}=e,[f,h]=ua({prop:a,defaultProp:o??!0,onChange:c,caller:zc});return i.jsx(Hn,{present:n||f,children:i.jsx(OO,{open:f,...d,ref:t,onClose:()=>h(!1),onPause:Wn(e.onPause),onResume:Wn(e.onResume),onSwipeStart:be(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:be(e.onSwipeMove,p=>{const{x:y,y:v}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:be(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:be(e.onSwipeEnd,p=>{const{x:y,y:v}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),h(!1)})})})});vN.displayName=zc;var[TO,MO]=hN(zc,{onClose(){}}),OO=x.forwardRef((e,t)=>{const{__scopeToast:n,type:a="foreground",duration:o,open:c,onClose:d,onEscapeKeyDown:f,onPause:h,onResume:p,onSwipeStart:y,onSwipeMove:v,onSwipeCancel:b,onSwipeEnd:S,...E}=e,w=Af(zc,n),[C,A]=x.useState(null),j=nt(t,A),M=x.useRef(null),R=x.useRef(null),T=o||w.duration,D=x.useRef(0),F=x.useRef(T),k=x.useRef(0),{onToastAdd:z,onToastRemove:X}=w,q=Wn(()=>{C?.contains(document.activeElement)&&w.viewport?.focus(),d()}),Y=x.useCallback(Z=>
9{!Z||Z===1/0||(window.clearTimeout(k.current),D.current=new Date().getTime(),k.current=window.setTimeout(q,Z))},[q]);x.useEffect(()=>{const Z=w.viewport;if(Z){const me=()=>{Y(F.current),p?.()},L=()=>{const J=new Date().getTime()-D.current;F.current=F.current-J,window.clearTimeout(k.current),h?.()};return Z.addEventListener(ug,L),Z.addEventListener(dg,me),()=>{Z.removeEventListener(ug,L),Z.removeEventListener(dg,me)}}},[w.viewport,T,h,p,Y]),x.useEffect(()=>{c&&!w.isClosePausedRef.current&&Y(T)},[c,T,w.isClosePausedRef,Y]),x.useEffect(()=>()=>{window.clearTimeout(k.current)},[]),x.useEffect(()=>(z(),()=>X()),[z,X]);const ne=x.useMemo(()=>C?EN(C):null,[C]);return w.viewport?i.jsxs(i.Fragment,{children:[ne&&i.jsx(DO,{__scopeToast:n,role:"status","aria-live":a==="foreground"?"assertive":"polite",children:ne}),i.jsx(TO,{scope:n,onClose:q,children:rl.createPortal(i.jsx(lx.ItemSlot,{scope:n,children:i.jsx(uO,{asChild:!0,onEscapeKeyDown:be(f,()=>{w.isFocusedToastEscapeKeyDownRef.current||q(),w.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(Ie.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":w.swipeDirection,...E,ref:j,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:be(e.onKeyDown,Z=>{Z.key==="Escape"&&(f?.(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:be(e.onPointerDown,Z=>{Z.button===0&&(M.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:be(e.onPointerMove,Z=>{if(!M.current)return;const me=Z.clientX-M.current.x,L=Z.clientY-M.current.y,J=!!R.current,ee=["left","right"].includes(w.swipeDirection),te=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,O=ee?te(0,me):0,W=ee?0:te(0,L),ue=Z.pointerType==="touch"?10:2,ce={x:O,y:W},ye={originalEvent:Z,delta:ce};J?(R.current=ce,Td(AO,v,ye,{discrete:!1})):ew(ce,w.swipeDirection,ue)?(R.current=ce,Td(EO,y,ye,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(me)>ue||Math.abs(L)>ue)&&(M.current=null)}),onPointerUp:be(e.onPointerUp,Z=>{const me=R.current,L=Z.target;if(L.hasPointerCapture(Z.pointerId)&&L.releasePointerCapture(Z.pointerId),R.current=null,M.current=null,me){const J=Z.currentTarget,ee={originalEvent:Z,delta:me};ew(me,w.swipeDirection,w.swipeThreshold)?Td(kO,S,ee,{discrete:!0}):Td(_O,b,ee,{discrete:!0}),J.addEventListener("click",te=>te.preventDefault(),{once:!0})}})})})}),w.viewport)})]}):null}),DO=e=>{const{__scopeToast:t,children:n,...a}=e,o=Af(zc,t),[c,d]=x.useState(!1),[f,h]=x.useState(!1);return PO(()=>d(!0)),x.useEffect(()=>{const p=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(p)},[]),f?null:i.jsx(_i,{asChild:!0,container:o.announcerContainer||void 0,children:i.jsx(Ef,{...a,children:c&&i.jsxs(i.Fragment,{children:[o.label," ",n]})})})},RO="ToastTitle",bN=x.forwardRef((e,t)=>{const{__scopeToast:n,...a}=e;return i.jsx(Ie.div,{...a,ref:t})});bN.displayName=RO;var FO="ToastDescription",wN=x.forwardRef((e,t)=>{const{__scopeToast:n,...a}=e;return i.jsx(Ie.div,{...a,ref:t})});wN.displayName=FO;var jN="ToastAction",NN=x.forwardRef((e,t)=>{const{altText:n,...a}=e;return n.trim()?i.jsx(SN,{altText:n,asChild:!0,children:i.jsx(cx,{...a,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jN}\`. Expected non-empty \`string\`.`),null)});NN.displayName=jN;var CN="ToastClose",cx=x.forwardRef((e,t)=>{const{__scopeToast:n,...a}=e,o=MO(CN,n);return i.jsx(SN,{asChild:!0,children:i.jsx(Ie.button,{type:"button",...a,ref:t,onClick:be(e.onClick,o.onClose)})})});cx.displayName=CN;var SN=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:a,...o}=e;return i.jsx(Ie.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...o,ref:t})});function EN(e){const t=[];return Array.from(e.childNodes).forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&t.push(a.textContent),BO(a)){const o=a.ariaHidden||a.hidden||a.style.display==="none",c=a.dataset.radixToastAnnounceExclude==="";if(!o)if(c){const d=a.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...EN(a))}}),t}function Td(e,t,n,{discrete:a}){const o=n.originalEvent.currentTarget,c=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),a?rx(o,c):o.dispatchEvent(c)}var ew=(e,t,n=0)=>{const a=Math.abs(e.x),o=Math.abs(e.y),c=a>o;return t==="left"||t==="right"?c&&a>n:!c&&o>n};function PO(e=()=>{}){const t=Wn(e);jn(()=>{let n=0,a=0;return n=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(a)}},[t])}
vendor: 3,691 bytes, line 9
9function BO(e){return e.nodeType===e.ELEMENT_NODE}function qO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var LO=pN,AN=xN,_N=vN,kN=bN,TN=wN,MN=NN,ON=cx;const UO=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},zO=(e,t)=>({classGroupId:e,validator:t}),DN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Jd="-",tw=[],IO="arbitrary..",$O=e=>{const t=HO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return VO(d);const f=d.split(Jd),h=f[0]===""&&f.length>1?1:0;return RN(f,h,t)},getConflictingClassGroupIds:(d,f)=>{if(f){const h=a[d],p=n[d];return h?p?UO(p,h):h:p||tw}return n[d]||tw}}},RN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],c=n.nextPart.get(o);if(c){const p=RN(e,t+1,c);if(p)return p}const d=n.validators;if(d===null)return;const f=t===0?e.join(Jd):e.slice(t).join(Jd),h=d.length;for(let p=0;p<h;p++){const y=d[p];if(y.validator(f))return y.classGroupId}},VO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?IO+a:void 0})(),HO=e=>{const{theme:t,classGroups:n}=e;return YO(n,t)},YO=(e,t)=>{const n=DN();for(const a in e){const o=e[a];ux(o,n,a,t)}return n},ux=(e,t,n,a)=>{const o=e.length;for(let c=0;c<o;c++){const d=e[c];KO(d,t,n,a)}},KO=(e,t,n,a)=>{if(typeof e=="string"){GO(e,t,n);return}if(typeof e=="function"){WO(e,t,n,a);return}QO(e,t,n,a)},GO=(e,t,n)=>{const a=e===""?t:FN(t,e);a.classGroupId=n},WO=(e,t,n,a)=>{if(ZO(e)){ux(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(zO(n,e))},QO=(e,t,n,a)=>{const o=Object.entries(e),c=o.length;for(let d=0;d<c;d++){const[f,h]=o[d];ux(h,FN(t,f),n,a)}},FN=(e,t)=>{let n=e;const a=t.split(Jd),o=a.length;for(let c=0;c<o;c++){const d=a[c];let f=n.nextPart.get(d);f||(f=DN(),n.nextPart.set(d,f)),n=f}return n},ZO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,XO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(c,d)=>{n[c]=d,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(c){let d=n[c];if(d!==void 0)return d;if((d=a[c])!==void 0)return o(c,d),d},set(c,d){c in n?n[c]=d:o(c,d)}}},mg="!",nw=":",JO=[],sw=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),eD=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const c=[];let d=0,f=0,h=0,p;const y=o.length;for(let w=0;w<y;w++){const C=o[w];if(d===0&&f===0){if(C===nw){c.push(o.slice(h,w)),h=w+1;continue}if(C==="/"){p=w;continue}}C==="["?d++:C==="]"?d--:C==="("?f++:C===")"&&f--}const v=c.length===0?o:o.slice(h);let b=v,S=!1;v.endsWith(mg)?(b=v.slice(0,-1),S=!0):v.startsWith(mg)&&(b=v.slice(1),S=!0);const E=p&&p>h?p-h:void 0;return sw(c,S,b,E)};if(t){const o=t+nw,c=a;a=d=>d.startsWith(o)?c(d.slice(o.length)):sw(JO,!1,d,void 0,!0)}if(n){const o=a;a=c=>n({className:c,parseClassName:o})}return a},tD=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let c=0;c<n.length;c++){const d=n[c],f=d[0]==="[",h=t.has(d);f||h?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(d)):o.push(d)}return o.length>0&&(o.sort(),a.push(...o)),a}},nD=e=>
9({cache:XO(e.cacheSize),parseClassName:eD(e),sortModifiers:tD(e),postfixLookupClassGroupIds:sD(e),...$O(e)}),sD=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},aD=/\s+/,rD=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:c,postfixLookupClassGroupIds:d}=t,f=[],h=e.trim().split(aD);let p="";for(let y=h.length-1;y>=0;y-=1){const v=h[y],{isExternal:b,modifiers:S,hasImportantModifier:E,baseClassName:w,maybePostfixModifierPosition:C}=n(v);if(b){p=v+(p.length>0?" "+p:p);continue}let A=!!C,j;if(A){const F=w.substring(0,C);j=a(F);const k=j&&d[j]?a(w):void 0;k&&k!==j&&(j=k,A=!1)}else j=a(w);if(!j){if(!A){p=v+(p.length>0?" "+p:p);continue}if(j=a(w),!j){p=v+(p.length>0?" "+p:p);continue}A=!1}const M=S.length===0?"":S.length===1?S[0]:c(S).join(":"),R=E?M+mg:M,T=R+j;if(f.indexOf(T)>-1)continue;f.push(T);const D=o(j,A);for(let F=0;F<D.length;++F){const k=D[F];f.push(R+k)}p=v+(p.length>0?" "+p:p)}return p},iD=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=PN(n))&&(o&&(o+=" "),o+=a);return o},PN=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=PN(e[a]))&&(n&&(n+=" "),n+=t);return n},oD=(e,...t)=>{let n,a,o,c;const d=h=>{const p=t.reduce((y,v)=>v(y),e());return n=nD(p),a=n.cache.get,o=n.cache.set,c=f,f(h)},f=h=>{const p=a(h);if(p)return p;const y=rD(h,n);return o(h,y),y};return c=d,(...h)=>c(iD(...h))},lD=[],bn=e=>{const t=n=>n[e]||lD;return t.isThemeGetter=!0,t},BN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pr=e=>cD.test(e),rt=e=>!!e&&!Number.isNaN(Number(e)),na=e=>!!e&&Number.isInteger(Number(e)),Tp=e=>e.endsWith("%")&&rt(e.slice(0,-1)),Ta=e=>uD.test(e),LN=()=>!0,pD=e=>dD.test(e)&&!fD.test(e),dx=()=>!1,gD=e=>mD.test(e),xD=e=>hD.test(e),yD=e=>!ke(e)&&!Me(e),vD=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bD=e=>Rr(e,IN,dx),ke=e=>BN.test(e),oi=e=>Rr(e,$N,pD),aw=e=>Rr(e,_D,rt),wD=e=>Rr(e,HN,LN),jD=e=>Rr(e,VN,dx),rw=e=>Rr(e,UN,dx),ND=e=>Rr(e,zN,xD),Md=e=>Rr(e,YN,gD),Me=e=>qN.test(e),uc=e=>ki(e,$N),CD=e=>ki(e,VN),iw=e=>ki(e,UN),SD=e=>ki(e,IN),ED=e=>ki(e,zN),Od=e=>ki(e,YN,!0),AD=e=>ki(e,HN,!0),Rr=(e,t,n)=>{const a=BN.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},ki=(e,t,n=!1)=>{const a=qN.exec(e);return a?a[1]?t(a[1]):n:!1},UN=e=>e==="position"||e==="percentage",zN=e=>e==="image"||e==="url",IN=e=>e==="length"||e==="size"||e==="bg-size",$N=e=>e==="length",_D=e=>e==="number",VN=e=>e==="family-name",HN=e=>e==="number"||e==="weight",YN=e=>e==="shadow",kD=()=>{const e=bn("color"),t=bn("font"),n=bn("text"),a=bn("font-weight"),o=bn("tracking"),c=bn("leading"),d=bn("breakpoint"),f=bn("container"),h=bn("spacing"),p=bn("radius"),y=bn("shadow"),v=bn("inset-shadow"),b=bn("text-shadow"),S=bn("drop-shadow"),E=bn("blur"),w=bn("perspective"),C=bn("aspect"),A=bn("ease"),j=bn("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...R(),Me,ke],D=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],k=()=>[Me,ke,h],z=()=>[pr,"full","auto",...k()],X=()=>[na,"none","subgrid",Me,ke],q=()=>["auto",{span:["full",na,Me,ke]},na,Me,ke],Y=()=>[na,"auto",Me,ke],ne=()=>["auto","min","max","fr",Me,ke],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],me=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...k()],J=()=>[pr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],ee=()=>[pr,"screen","full","dvw","lvw","svw","min","max","fit",...k()],te=()=>[pr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],O=()=>[e,Me,ke],W=()=>[...R(),iw,rw,{position:[Me,ke]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",SD,bD,{size:[Me,ke]}],ye=()=>[Tp,uc,oi],Ee=()=>["","none","full",p,Me,ke],xe=()=>["",rt,uc,oi],he=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[rt,Tp,iw,rw],Re=()=>["","none",E,Me,ke],Pe=()=>["none",rt,Me,ke],ot=()=>["none",rt,Me,ke],Lt=()=>[rt,Me,ke],Nt=()=>[pr,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ta],breakpoint:[Ta],color:[LN],container:[Ta],"drop-shadow":[Ta],ease:["in","out","in-out"],font:[yD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ta],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ta],shadow:[Ta],spacing:["px",rt],text:[Ta],"text-shadow":[Ta],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",pr,ke,Me,C]}],container:["container"],"container-type":[{"@container":["","normal","size",Me,ke]}
vendor: 6,137 bytes, line 9
9],"container-named":[vD],columns:[{columns:[rt,ke,Me,f]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[na,"auto",Me,ke]}],basis:[{basis:[pr,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[rt,pr,"auto","initial","none",ke]}],grow:[{grow:["",rt,Me,ke]}],shrink:[{shrink:["",rt,Me,ke]}],order:[{order:[na,"first","last","none",Me,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...me(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[f,"screen",...J()]}],"min-w":[{"min-w":[f,"screen","none",...J()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,uc,oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,AD,wD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tp,ke]}],"font-family":[{font:[CD,jD,t]}],"font-features":[{"font-features":[ke]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Me,ke]}],"line-clamp":[{"line-clamp":[rt,"none",Me,aw]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",Me,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[rt,"from-font","auto",Me,oi]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[rt,"auto",Me,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[na,Me,ke]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},na,Me,ke],radial:["",Me,ke],conic:[na,Me,ke]},ED,ND]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:ye()}
vendor: 7,429 bytes, line 9
9],"gradient-via-pos":[{via:ye()}],"gradient-to-pos":[{to:ye()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[rt,Me,ke]}],"outline-w":[{outline:["",rt,uc,oi]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",y,Od,Md]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",v,Od,Md]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[rt,oi]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",b,Od,Md]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[rt,Me,ke]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[rt]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Me,ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[rt]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,ke]}],filter:[{filter:["","none",Me,ke]}],blur:[{blur:Re()}],brightness:[{brightness:[rt,Me,ke]}],contrast:[{contrast:[rt,Me,ke]}],"drop-shadow":[{"drop-shadow":["","none",S,Od,Md]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",rt,Me,ke]}],"hue-rotate":[{"hue-rotate":[rt,Me,ke]}],invert:[{invert:["",rt,Me,ke]}],saturate:[{saturate:[rt,Me,ke]}],sepia:[{sepia:["",rt,Me,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,ke]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[rt,Me,ke]}],"backdrop-contrast":[{"backdrop-contrast":[rt,Me,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",rt,Me,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[rt,Me,ke]}],"backdrop-invert":[{"backdrop-invert":["",rt,Me,ke]}],"backdrop-opacity":[{"backdrop-opacity":[rt,Me,ke]}],"backdrop-saturate":[{"backdrop-saturate":[rt,Me,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",rt,Me,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[rt,"initial",Me,ke]}],ease:[{ease:["linear","initial",A,Me,ke]}],delay:[{delay:[rt,Me,ke]}],animate:[{animate:["none",j,Me,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Me,ke]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:Lt()}],"skew-x":[{"skew-x":Lt()}],"skew-y":[{"skew-y":Lt()}],transform:[{transform:[Me,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Nt()}],"translate-x":[{"translate-x":Nt()}],"translate-y":[{"translate-y":Nt()}],"translate-z":[{"translate-z":Nt()}],"translate-none":["translate-none"],zoom:[{zoom:[na,Me,ke]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}
vendor: 5,182 bytes, line 9
9],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me,ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me,ke]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[rt,uc,oi,aw]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},TD=oD(kD);function KN(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;
vendor: 5,004 bytes, line 9
9t++)e[t]&&(n=KN(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function GN(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=KN(e))&&(a&&(a+=" "),a+=t);return a}function ie(...e){return TD(GN(e))}const ow=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lw=GN,_f=(e,t)=>n=>{var a;if(t?.variants==null)return lw(e,n?.class,n?.className);const{variants:o,defaultVariants:c}=t,d=Object.keys(o).map(p=>{const y=n?.[p],v=c?.[p];if(y===null)return null;const b=ow(y)||ow(v);return o[p][b]}),f=n&&Object.entries(n).reduce((p,y)=>{let[v,b]=y;return b===void 0||(p[v]=b),p},{}),h=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((p,y)=>{let{class:v,className:b,...S}=y;return Object.entries(S).every(E=>{let[w,C]=E;return Array.isArray(C)?C.includes({...c,...f}[w]):{...c,...f}[w]===C})?[...p,v,b]:p},[]);return lw(e,d,h,n?.class,n?.className)};const MD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),OD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),cw=e=>{const t=OD(e);return t.charAt(0).toUpperCase()+t.slice(1)},WN=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),DD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var RD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const FD=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:c,iconNode:d,...f},h)=>x.createElement("svg",{ref:h,...RD,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:WN("lucide",o),...!c&&!DD(f)&&{"aria-hidden":"true"},...f},[...d.map(([p,y])=>x.createElement(p,y)),...Array.isArray(c)?c:[c]]));const Se=(e,t)=>{const n=x.forwardRef(({className:a,...o},c)=>x.createElement(FD,{ref:c,iconNode:t,className:WN(`lucide-${MD(cw(e))}`,`lucide-${e}`,a),...o}));return n.displayName=cw(e),n};const PD=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],uw=Se("activity",PD);const BD=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],qD=Se("archive",BD);const LD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ic=Se("arrow-left",LD);const UD=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],zD=Se("arrow-up-down",UD);const ID=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],kf=Se("building-2",ID);const $D=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],dw=Se("calendar-days",$D);const VD=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],$c=Se("calendar",VD);const HD=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],QN=Se("chart-column",HD);const YD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vc=Se("check",YD);const KD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],il=Se("chevron-down",KD);const GD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],fx=Se("chevron-left",GD);const WD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ti=Se("chevron-right",WD);const QD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],mx=Se("chevron-up",QD);const ZD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ZN=Se("circle-alert",ZD);const XD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ho=Se("circle-check",XD);const JD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ef=Se("circle-plus",JD);const eR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],fw=Se("circle-x",eR);const tR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],XN=Se("circle",tR);
9const nR=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],JN=Se("clipboard-list",nR);const sR=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aR=Se("clock-3",sR);const rR=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],hx=Se("clock",rR);const iR=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],hg=Se("cloud-upload",iR);const oR=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],px=Se("code-xml",oR);const lR=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],cR=Se("copy",lR);const uR=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],dR=Se("database",uR);const fR=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],mR=Se("ellipsis-vertical",fR);const hR=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],gx=Se("external-link",hR);const pR=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],eC=Se("eye",pR);const gR=[["path",{d:"M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z",key:"1340ok"}],["path",{d:"M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z",key:"1hz3m3"}],["path",{d:"M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z",key:"1oz8n2"}],["path",{d:"M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z",key:"1ff65i"}],["path",{d:"M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z",key:"pdip6e"}]],xR=Se("figma",gR);const yR=[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]],Tf=Se("file-archive",yR);const vR=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],bR=Se("file-code",vR);const wR=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],jR=Se("file-image",wR);const NR=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],xx=Se("file-pen",NR);const CR=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yx=Se("file-text",CR);const SR=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ER=Se("folder-open",SR);const AR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],_R=Se("funnel",AR);const kR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],tC=Se("globe",kR);const TR=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}
9]],mw=Se("hash",TR);const MR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Fa=Se("image",MR);const OR=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]],Hc=Se("images",OR);const DR=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],nC=Se("key-round",DR);const RR=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],FR=Se("layout-dashboard",RR);const PR=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],BR=Se("layers",PR);const qR=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],sC=Se("link",qR);const LR=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],UR=Se("list-filter",LR);const zR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ns=Se("loader-circle",zR);const IR=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],pg=Se("log-out",IR);const $R=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Oa=Se("lock",$R);const VR=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],xi=Se("mail",VR);const HR=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],vx=Se("megaphone",HR);const YR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]],Yc=Se("message-square-warning",YR);const KR=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],aC=Se("paintbrush",KR);const GR=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Pa=Se("palette",GR);const WR=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],QR=Se("paperclip",WR);const ZR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],XR=Se("pen",ZR);const JR=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ar=Se("pencil",JR);const eF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tF=Se("plus",eF);const nF=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],hw=Se("refresh-ccw",nF);const sF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}
9],["path",{d:"M21 15H3",key:"9uk58r"}]],aF=Se("rows-3",sF);const rF=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],iF=Se("save",rF);const oF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Tc=Se("search",oF);const lF=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],rC=Se("send",lF);const cF=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],uF=Se("settings-2",cF);const dF=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],fF=Se("share-2",dF);const mF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],bx=Se("shield-check",mF);const hF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],pF=Se("shield",hF);const gF=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
9],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],xF=Se("sparkles",gF);const yF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],tf=Se("square-plus",yF);const vF=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fr=Se("trash-2",vF);const bF=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],wx=Se("triangle-alert",bF);const wF=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],jF=Se("unlink",wF);const NF=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],pw=Se("upload",NF);const CF=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],jx=Se("user-plus",CF);const SF=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],yi=Se("users",SF);const EF=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],za=Se("video",EF);const AF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mf=Se("x",AF),_F=LO,iC=x.forwardRef(({className:e,...t},n)=>i.jsx(AN,{ref:n,className:ie("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));iC.displayName=AN.displayName;const kF=_f("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),oC=x.forwardRef(({className:e,variant:t,...n},a)=>i.jsx(_N,{ref:a,className:ie(kF({variant:t}),e),...n}));oC.displayName=_N.displayName;const TF=x.forwardRef(({className:e,...t},n)=>i.jsx(MN,{ref:n,className:ie("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));TF.displayName=MN.displayName;const lC=x.forwardRef(({className:e,...t},n)=>i.jsx(ON,{ref:n,className:ie("absolute right-2 top-2 rounded-md p-1 text-foreground
9/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground/70 group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive-foreground group-[.destructive]:focus:ring-offset-destructive",e),"toast-close":"",...t,children:i.jsx(Mf,{className:"h-4 w-4"})}));lC.displayName=ON.displayName;const cC=x.forwardRef(({className:e,...t},n)=>i.jsx(kN,{ref:n,className:ie("text-sm font-semibold",e),...t}));cC.displayName=kN.displayName;const uC=x.forwardRef(({className:e,...t},n)=>i.jsx(TN,{ref:n,className:ie("text-sm opacity-90",e),...t}));uC.displayName=TN.displayName;const MF=1,OF=1e6;let Mp=0;function DF(){return Mp=(Mp+1)%Number.MAX_SAFE_INTEGER,Mp.toString()}const Op=new Map,gw=e=>{if(Op.has(e))return;const t=setTimeout(()=>{Op.delete(e),Cc({type:"REMOVE_TOAST",toastId:e})},OF);Op.set(e,t)},RF=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,MF)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?gw(n):e.toasts.forEach(a=>{gw(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},$d=[];let Vd={toasts:[]};function Cc(e){Vd=RF(Vd,e),$d.forEach(t=>{t(Vd)})}function FF({...e}){const t=DF(),n=o=>Cc({type:"UPDATE_TOAST",toast:{...o,id:t}}),a=()=>Cc({type:"DISMISS_TOAST",toastId:t});return Cc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||a()}}}),{id:t,dismiss:a,update:n}}function pn(){const[e,t]=x.useState(Vd);return x.useEffect(()=>($d.push(t),()=>{const n=$d.indexOf(t);n>-1&&$d.splice(n,1)}),[e]),{...e,toast:FF,dismiss:n=>Cc({type:"DISMISS_TOAST",toastId:n})}}function PF(){const{toasts:e}=pn();return i.jsxs(_F,{children:[e.map(function({id:t,title:n,description:a,action:o,...c}){return i.jsxs(oC,{...c,children:[i.jsxs("div",{className:"grid gap-1",children:[n&&i.jsx(cC,{children:n}),a&&i.jsx(uC,{children:a})]}),o,i.jsx(lC,{})]},t)}),i.jsx(iC,{})]})}var BF=al[" useId ".trim().toString()]||(()=>{}),qF=0;function Vs(e){const[t,n]=x.useState(BF());return jn(()=>{n(a=>a??String(qF++))},[e]),t?`radix-${t}`:""}const LF=["top","right","bottom","left"],_r=Math.min,gs=Math.max,nf=Math.round,Dd=Math.floor,oa=e=>({x:e,y:e}),UF={left:"right",right:"left",bottom:"top",top:"bottom"};function gg(e,t,n){return gs(e,_r(t,n))}function Ba(e,t){return typeof e=="function"?e(t):e}function qa(e){return e.split("-")[0]}function ol(e){return e.split("-")[1]}function Nx(e){return e==="x"?"y":"x"}function Cx(e){return e==="y"?"height":"width"}function ra(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Sx(e){return Nx(ra(e))}function zF(e,t,n){n===void 0&&(n=!1);const a=ol(e),o=Sx(e),c=Cx(o);let d=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(d=sf(d)),[d,sf(d)]}function IF(e){const t=sf(e);return[xg(e),t,xg(t)]}function xg(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xw=["left","right"],yw=["right","left"],$F=["top","bottom"],VF=["bottom","top"];function HF(e,t,n){switch(e){case"top":case"bottom":return n?t?yw:xw:t?xw:yw;case"left":case"right":return t?$F:VF;default:return[]}}function YF(e,t,n,a){const o=ol(e);let c=HF(qa(e),n==="start",a);return o&&(c=c.map(d=>d+"-"+o),t&&(c=c.concat(c.map(xg)))),c}function sf(e){const t=qa(e);return UF[t]+e.slice(t.length)}function KF(e){return{top:0,right:0,bottom:0,left:0,...e}}function dC(e){return typeof e!="number"?KF(e):{top:e,right:e,bottom:e,left:e}}function af(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function vw(e,t,n){let{reference:a,floating:o}=e;const c=ra(t),d=Sx(t),f=Cx(d),h=qa(t),p=c==="y",y=a.x+a.width/2-o.width/2,v=a.y+a.height/2-o.height/2,b=a[f]/2-o[f]/2;let S;switch(h){case"top":S={x:y,y:a.y-o.height};break;case"bottom":S={x:y,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:v};break;case"left":S={x:a.x-o.width,y:v};break;default:S={x:a.x,y:a.y}}switch(ol(t)){case"start":S[d]-=b*(n&&p?-1:1);break;case"end":S[d]+=b*(n&&p?-1:1);break}return S}async function GF(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:c,rects:d,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:b=!1,padding:S=0}=Ba(t,e),E=dC(S),C=f[b?v==="floating"?"reference":"floating":v],A=af(await c.getClippingRect
vendor: 4,729 bytes, line 9
9({element:(n=await(c.isElement==null?void 0:c.isElement(C)))==null||n?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:p,rootBoundary:y,strategy:h})),j=v==="floating"?{x:a,y:o,width:d.floating.width,height:d.floating.height}:d.reference,M=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),R=await(c.isElement==null?void 0:c.isElement(M))?await(c.getScale==null?void 0:c.getScale(M))||{x:1,y:1}:{x:1,y:1},T=af(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:j,offsetParent:M,strategy:h}):j);return{top:(A.top-T.top+E.top)/R.y,bottom:(T.bottom-A.bottom+E.bottom)/R.y,left:(A.left-T.left+E.left)/R.x,right:(T.right-A.right+E.right)/R.x}}const WF=50,QF=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:c=[],platform:d}=n,f=d.detectOverflow?d:{...d,detectOverflow:GF},h=await(d.isRTL==null?void 0:d.isRTL(t));let p=await d.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:v}=vw(p,a,h),b=a,S=0;const E={};for(let w=0;w<c.length;w++){const C=c[w];if(!C)continue;const{name:A,fn:j}=C,{x:M,y:R,data:T,reset:D}=await j({x:y,y:v,initialPlacement:a,placement:b,strategy:o,middlewareData:E,rects:p,platform:f,elements:{reference:e,floating:t}});y=M??y,v=R??v,E[A]={...E[A],...T},D&&S<WF&&(S++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(p=D.rects===!0?await d.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:y,y:v}=vw(p,b,h)),w=-1)}return{x:y,y:v,placement:b,strategy:o,middlewareData:E}},ZF=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:c,platform:d,elements:f,middlewareData:h}=t,{element:p,padding:y=0}=Ba(e,t)||{};if(p==null)return{};const v=dC(y),b={x:n,y:a},S=Sx(o),E=Cx(S),w=await d.getDimensions(p),C=S==="y",A=C?"top":"left",j=C?"bottom":"right",M=C?"clientHeight":"clientWidth",R=c.reference[E]+c.reference[S]-b[S]-c.floating[E],T=b[S]-c.reference[S],D=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let F=D?D[M]:0;(!F||!await(d.isElement==null?void 0:d.isElement(D)))&&(F=f.floating[M]||c.floating[E]);const k=R/2-T/2,z=F/2-w[E]/2-1,X=_r(v[A],z),q=_r(v[j],z),Y=X,ne=F-w[E]-q,Z=F/2-w[E]/2+k,me=gg(Y,Z,ne),L=!h.arrow&&ol(o)!=null&&Z!==me&&c.reference[E]/2-(Z<Y?X:q)-w[E]/2<0,J=L?Z<Y?Z-Y:Z-ne:0;return{[S]:b[S]+J,data:{[S]:me,centerOffset:Z-me-J,...L&&{alignmentOffset:J}},reset:L}}}),XF=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:o,middlewareData:c,rects:d,initialPlacement:f,platform:h,elements:p}=t,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:w=!0,...C}=Ba(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const A=qa(o),j=ra(f),M=qa(f)===f,R=await(h.isRTL==null?void 0:h.isRTL(p.floating)),T=b||(M||!w?[sf(f)]:IF(f)),D=E!=="none";!b&&D&&T.push(...YF(f,w,E,R));const F=[f,...T],k=await h.detectOverflow(t,C),z=[];let X=((a=c.flip)==null?void 0:a.overflows)||[];if(y&&z.push(k[A]),v){const Z=zF(o,d,R);z.push(k[Z[0]],k[Z[1]])}if(X=[...X,{placement:o,overflows:z}],!z.every(Z=>Z<=0)){var q,Y;const Z=(((q=c.flip)==null?void 0:q.index)||0)+1,me=F[Z];if(me&&(!(v==="alignment"?j!==ra(me):!1)||X.every(ee=>ra(ee.placement)===j?ee.overflows[0]>0:!0)))return{data:{index:Z,overflows:X},reset:{placement:me}};let L=(Y=X.filter(J=>J.overflows[0]<=0).sort((J,ee)=>J.overflows[1]-ee.overflows[1])[0])==null?void 0:Y.placement;if(!L)switch(S){case"bestFit":{var ne;const J=(ne=X.filter(ee=>{if(D){const te=ra(ee.placement);return te===j||te==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(te=>te>0).reduce((te,O)=>te+O,0)]).sort((ee,te)=>ee[1]-te[1])[0])==null?void 0:ne[0];J&&(L=J);break}case"initialPlacement":L=f;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function bw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ww(e){return LF.some(t=>e[t]>=0)}const JF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:o="referenceHidden",...c}=Ba(e,t);switch(o){case"referenceHidden":{const d=await a.detectOverflow(t,{...c,elementContext:"reference"}),f=bw(d,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ww(f)}}}case"escaped":{const d=await a.detectOverflow(t,{...c,altBoundary:!0}),f=bw(d,n.floating);return{data:{escapedOffsets:f,escaped:ww(f)}}}default:return{}}}}},fC=new Set(["left","top"]);async function e4(e,t){const{placement:n,platform:a,elements:o}=e,c=await(a.isRTL==null?void 0:a.isRTL(o.floating)),d=qa(n),f=ol(n),h=ra(n)==="y",p=fC.has(d)?-1:1,y=c&&h?-1:1,v=
9Ba(t,e);let{mainAxis:b,crossAxis:S,alignmentAxis:E}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof E=="number"&&(S=f==="end"?E*-1:E),h?{x:S*y,y:b*p}:{x:b*p,y:S*y}}const t4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:o,y:c,placement:d,middlewareData:f}=t,h=await e4(t,e);return d===((n=f.offset)==null?void 0:n.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:o+h.x,y:c+h.y,data:{...h,placement:d}}}}},n4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:o,platform:c}=t,{mainAxis:d=!0,crossAxis:f=!1,limiter:h={fn:A=>{let{x:j,y:M}=A;return{x:j,y:M}}},...p}=Ba(e,t),y={x:n,y:a},v=await c.detectOverflow(t,p),b=ra(qa(o)),S=Nx(b);let E=y[S],w=y[b];if(d){const A=S==="y"?"top":"left",j=S==="y"?"bottom":"right",M=E+v[A],R=E-v[j];E=gg(M,E,R)}if(f){const A=b==="y"?"top":"left",j=b==="y"?"bottom":"right",M=w+v[A],R=w-v[j];w=gg(M,w,R)}const C=h.fn({...t,[S]:E,[b]:w});return{...C,data:{x:C.x-n,y:C.y-a,enabled:{[S]:d,[b]:f}}}}}},s4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:o,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=Ba(e,t),y={x:n,y:a},v=ra(o),b=Nx(v);let S=y[b],E=y[v];const w=Ba(f,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(h){const M=b==="y"?"height":"width",R=c.reference[b]-c.floating[M]+C.mainAxis,T=c.reference[b]+c.reference[M]-C.mainAxis;S<R?S=R:S>T&&(S=T)}if(p){var A,j;const M=b==="y"?"width":"height",R=fC.has(qa(o)),T=c.reference[v]-c.floating[M]+(R&&((A=d.offset)==null?void 0:A[v])||0)+(R?0:C.crossAxis),D=c.reference[v]+c.reference[M]+(R?0:((j=d.offset)==null?void 0:j[v])||0)-(R?C.crossAxis:0);E<T?E=T:E>D&&(E=D)}return{[b]:S,[v]:E}}}},a4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:o,rects:c,platform:d,elements:f}=t,{apply:h=()=>{},...p}=Ba(e,t),y=await d.detectOverflow(t,p),v=qa(o),b=ol(o),S=ra(o)==="y",{width:E,height:w}=c.floating;let C,A;v==="top"||v==="bottom"?(C=v,A=b===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(A=v,C=b==="end"?"top":"bottom");const j=w-y.top-y.bottom,M=E-y.left-y.right,R=_r(w-y[C],j),T=_r(E-y[A],M),D=!t.middlewareData.shift;let F=R,k=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=M),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(F=j),D&&!b){const X=gs(y.left,0),q=gs(y.right,0),Y=gs(y.top,0),ne=gs(y.bottom,0);S?k=E-2*(X!==0||q!==0?X+q:gs(y.left,y.right)):F=w-2*(Y!==0||ne!==0?Y+ne:gs(y.top,y.bottom))}await h({...t,availableWidth:k,availableHeight:F});const z=await d.getDimensions(f.floating);return E!==z.width||w!==z.height?{reset:{rects:!0}}:{}}}};function Of(){return typeof window<"u"}function ll(e){return mC(e)?(e.nodeName||"").toLowerCase():"#document"}function ys(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fa(e){var t;return(t=(mC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mC(e){return Of()?e instanceof Node||e instanceof ys(e).Node:!1}function Hs(e){return Of()?e instanceof Element||e instanceof ys(e).Element:!1}function Ia(e){return Of()?e instanceof HTMLElement||e instanceof ys(e).HTMLElement:!1}function jw(e){return!Of()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ys(e).ShadowRoot}function Kc(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!=="inline"&&o!=="contents"}function r4(e){return/^(table|td|th)$/.test(ll(e))}function Df(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const i4=/transform|translate|scale|rotate|perspective|filter/,o4=/paint|layout|strict|content/,li=e=>!!e&&e!=="none";let Dp;function Ex(e){const t=Hs(e)?Ys(e):e;return li(t.transform)||li(t.translate)||li(t.scale)||li(t.rotate)||li(t.perspective)||!Ax()&&(li(t.backdropFilter)||li(t.filter))||i4.test(t.willChange||"")||o4.test(t.contain||"")}function l4(e){let t=kr(e);for(;Ia(t)&&!Yo(t);){if(Ex(t))return t;if(Df(t))return null;t=kr(t)}return null}function Ax(){return Dp==null&&(Dp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dp}function Yo(e){return/^(html|body|#document)$/.test(ll(e))}function Ys(e){return ys(e).getComputedStyle(e)}function Rf(e){return Hs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kr(e){if(ll(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jw(e)&&e.host||fa(e);return jw(t)?t.host:t}function hC(e){const t=kr(e);return Yo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ia(t)&&Kc(t)?t:hC(t)}function Mc(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hC(e),c=o===((a=e.ownerDocument)==null?void 0:a.body),d=ys(o);if(c){const f=yg(d);
vendor: 6,686 bytes, line 9
9return t.concat(d,d.visualViewport||[],Kc(o)?o:[],f&&n?Mc(f):[])}else return t.concat(o,Mc(o,[],n))}function yg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pC(e){const t=Ys(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=Ia(e),c=o?e.offsetWidth:n,d=o?e.offsetHeight:a,f=nf(n)!==c||nf(a)!==d;return f&&(n=c,a=d),{width:n,height:a,$:f}}function _x(e){return Hs(e)?e:e.contextElement}function Io(e){const t=_x(e);if(!Ia(t))return oa(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:c}=pC(t);let d=(c?nf(n.width):n.width)/a,f=(c?nf(n.height):n.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const c4=oa(0);function gC(e){const t=ys(e);return!Ax()||!t.visualViewport?c4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function u4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ys(e)?!1:t}function vi(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),c=_x(e);let d=oa(1);t&&(a?Hs(a)&&(d=Io(a)):d=Io(e));const f=u4(c,n,a)?gC(c):oa(0);let h=(o.left+f.x)/d.x,p=(o.top+f.y)/d.y,y=o.width/d.x,v=o.height/d.y;if(c){const b=ys(c),S=a&&Hs(a)?ys(a):a;let E=b,w=yg(E);for(;w&&a&&S!==E;){const C=Io(w),A=w.getBoundingClientRect(),j=Ys(w),M=A.left+(w.clientLeft+parseFloat(j.paddingLeft))*C.x,R=A.top+(w.clientTop+parseFloat(j.paddingTop))*C.y;h*=C.x,p*=C.y,y*=C.x,v*=C.y,h+=M,p+=R,E=ys(w),w=yg(E)}}return af({width:y,height:v,x:h,y:p})}function Ff(e,t){const n=Rf(e).scrollLeft;return t?t.left+n:vi(fa(e)).left+n}function xC(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Ff(e,n),o=n.top+t.scrollTop;return{x:a,y:o}}function d4(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const c=o==="fixed",d=fa(a),f=t?Df(t.floating):!1;if(a===d||f&&c)return n;let h={scrollLeft:0,scrollTop:0},p=oa(1);const y=oa(0),v=Ia(a);if((v||!v&&!c)&&((ll(a)!=="body"||Kc(d))&&(h=Rf(a)),v)){const S=vi(a);p=Io(a),y.x=S.x+a.clientLeft,y.y=S.y+a.clientTop}const b=d&&!v&&!c?xC(d,h):oa(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-h.scrollLeft*p.x+y.x+b.x,y:n.y*p.y-h.scrollTop*p.y+y.y+b.y}}function f4(e){return Array.from(e.getClientRects())}function m4(e){const t=fa(e),n=Rf(e),a=e.ownerDocument.body,o=gs(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),c=gs(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let d=-n.scrollLeft+Ff(e);const f=-n.scrollTop;return Ys(a).direction==="rtl"&&(d+=gs(t.clientWidth,a.clientWidth)-o),{width:o,height:c,x:d,y:f}}const Nw=25;function h4(e,t){const n=ys(e),a=fa(e),o=n.visualViewport;let c=a.clientWidth,d=a.clientHeight,f=0,h=0;if(o){c=o.width,d=o.height;const y=Ax();(!y||y&&t==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}const p=Ff(a);if(p<=0){const y=a.ownerDocument,v=y.body,b=getComputedStyle(v),S=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(a.clientWidth-v.clientWidth-S);E<=Nw&&(c-=E)}else p<=Nw&&(c+=p);return{width:c,height:d,x:f,y:h}}function p4(e,t){const n=vi(e,!0,t==="fixed"),a=n.top+e.clientTop,o=n.left+e.clientLeft,c=Ia(e)?Io(e):oa(1),d=e.clientWidth*c.x,f=e.clientHeight*c.y,h=o*c.x,p=a*c.y;return{width:d,height:f,x:h,y:p}}function Cw(e,t,n){let a;if(t==="viewport")a=h4(e,n);else if(t==="document")a=m4(fa(e));else if(Hs(t))a=p4(t,n);else{const o=gC(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return af(a)}function yC(e,t){const n=kr(e);return n===t||!Hs(n)||Yo(n)?!1:Ys(n).position==="fixed"||yC(n,t)}function g4(e,t){const n=t.get(e);if(n)return n;let a=Mc(e,[],!1).filter(f=>Hs(f)&&ll(f)!=="body"),o=null;const c=Ys(e).position==="fixed";let d=c?kr(e):e;for(;Hs(d)&&!Yo(d);){const f=Ys(d),h=Ex(d);!h&&f.position==="fixed"&&(o=null),(c?!h&&!o:!h&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Kc(d)&&!h&&yC(e,d))?a=a.filter(y=>y!==d):o=f,d=kr(d)}return t.set(e,a),a}function x4(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const d=[...n==="clippingAncestors"?Df(t)?[]:g4(t,this._c):[].concat(n),a],f=Cw(t,d[0],o);let h=f.top,p=f.right,y=f.bottom,v=f.left;for(let b=1;b<d.length;b++){const S=Cw(t,d[b],o);h=gs(S.top,h),p=_r(S.right,p),y=_r(S.bottom,y),v=gs(S.left,v)}return{width:p-v,height:y-h,x:v,y:h}}function y4(e){const{width:t,height:n}=pC(e);return{width:t,height:n}}function v4(e,t,n){const a=Ia(t),o=fa(t),c=n==="fixed",d=vi(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=oa(0);function p(){h.x=Ff(o)}if(a||!a&&!c)if((ll(t)!=="body"||Kc(o))&&(f=Rf(t)),a){const S=vi(t,!0,c,t);h.x=S.x+t.clientLeft,h.y=S.y+t.clientTop}else o&&p();c&&!a&&o&&p();const y=o&&!a&&!c?xC(o,f):oa(0),v=d.left+f.scrollLeft-h.x-y.x,b=d.top+f.scrollTop-h.y-y.y;return{x:v,y:b,width:d.width,height:d.height}}function Rp(e){return Ys(e).position==="static"}function Sw(e,t){if(!Ia(e)||Ys(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fa(e)===n&&(n=n.ownerDocument.body),n}function vC(e,t){const n=ys(e);if(Df(e))return n;if(!Ia(e)){let o=kr(e);for(;o&&!Yo(o);){if(Hs(o)&&!Rp(o))return o;o=kr(o)}return n}let a=Sw(e,t);for(;a&&r4(a)&&Rp(a);)a=Sw(a,t);return a&&Yo(a)&&Rp(a)&&!Ex(a)?n:a||l4(e)||n}const b4=async function(e){const t=this.getOffsetParent||vC,n=this.getDimensions,a=await n(e.floating);return{reference:v4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function w4(e){return Ys(e).direction==="rtl"}const j4={convertOffsetParentRelativeRectToViewportRelativeRect:d4,getDocumentElement:fa,getClippingRect:x4,getOffsetParent:vC,getElementRects:b4,getClientRects:f4,getDimensions:y4,getScale:Io,isElement:Hs,isRTL:w4};function bC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function N4(e,t){let n=null,a;const o=fa(e);function c(){var f;clearTimeout(a),(f=n)==null||f.disconnect(),n=null}function d(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),c();const p=e.getBoundingClientRect(),{left:y,top:v,width:b,height:S}=p;if(f||t(),!b||!S)return;const E=Dd(v),w=Dd(o.clientWidth-(y+b)),C=Dd(o.clientHeight-(v+S)),A=Dd(y),M={rootMargin:-E+"px "+-w+"px "+-C+"px "+-A+"px",threshold:gs(0,_r(1,h))||1};let R=!0;function T(D){const F=D[0].intersectionRatio;if(F!==h){if(!R)return d();F?d(!1,F):a=setTimeout(()=>{d(!1,1e-7)},1e3)}F===1&&!bC(p,e.getBoundingClientRect())&&d(),R=!1}try{n=new IntersectionObserver(T,{...M,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,M)}n.observe(e)}return d(!0),c}function C4(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,p=_x(e),y=o||c?[...p?Mc(p):[],...t?Mc(t):[]]:[];
vendor: 2,358 bytes, line 9
9y.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),c&&A.addEventListener("resize",n)});const v=p&&f?N4(p,n):null;let b=-1,S=null;d&&(S=new ResizeObserver(A=>{let[j]=A;j&&j.target===p&&S&&t&&(S.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(t)})),n()}),p&&!h&&S.observe(p),t&&S.observe(t));let E,w=h?vi(e):null;h&&C();function C(){const A=vi(e);w&&!bC(w,A)&&n(),w=A,E=requestAnimationFrame(C)}return n(),()=>{var A;y.forEach(j=>{o&&j.removeEventListener("scroll",n),c&&j.removeEventListener("resize",n)}),v?.(),(A=S)==null||A.disconnect(),S=null,h&&cancelAnimationFrame(E)}}const S4=t4,E4=n4,A4=XF,_4=a4,k4=JF,Ew=ZF,T4=s4,M4=(e,t,n)=>{const a=new Map,o={platform:j4,...n},c={...o.platform,_c:a};return QF(e,t,{...o,platform:c})};var O4=typeof document<"u",D4=function(){},Hd=O4?x.useLayoutEffect:D4;function rf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!rf(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=n;a--!==0;){const c=o[a];if(!(c==="_owner"&&e.$$typeof)&&!rf(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function wC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Aw(e,t){const n=wC(e);return Math.round(t*n)/n}function Fp(e){const t=x.useRef(e);return Hd(()=>{t.current=e}),t}function R4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[y,v]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,S]=x.useState(a);rf(b,a)||S(a);const[E,w]=x.useState(null),[C,A]=x.useState(null),j=x.useCallback(ee=>{ee!==D.current&&(D.current=ee,w(ee))},[]),M=x.useCallback(ee=>{ee!==F.current&&(F.current=ee,A(ee))},[]),R=c||E,T=d||C,D=x.useRef(null),F=x.useRef(null),k=x.useRef(y),z=h!=null,X=Fp(h),q=Fp(o),Y=Fp(p),ne=x.useCallback(()=>{if(!D.current||!F.current)return;const ee={placement:t,strategy:n,middleware:b};q.current&&(ee.platform=q.current),M4(D.current,F.current,ee).then(te=>
9{const O={...te,isPositioned:Y.current!==!1};Z.current&&!rf(k.current,O)&&(k.current=O,rl.flushSync(()=>{v(O)}))})},[b,t,n,q,Y]);Hd(()=>{p===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,v(ee=>({...ee,isPositioned:!1})))},[p]);const Z=x.useRef(!1);Hd(()=>(Z.current=!0,()=>{Z.current=!1}),[]),Hd(()=>{if(R&&(D.current=R),T&&(F.current=T),R&&T){if(X.current)return X.current(R,T,ne);ne()}},[R,T,ne,X,z]);const me=x.useMemo(()=>({reference:D,floating:F,setReference:j,setFloating:M}),[j,M]),L=x.useMemo(()=>({reference:R,floating:T}),[R,T]),J=x.useMemo(()=>{const ee={position:n,left:0,top:0};if(!L.floating)return ee;const te=Aw(L.floating,y.x),O=Aw(L.floating,y.y);return f?{...ee,transform:"translate("+te+"px, "+O+"px)",...wC(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:O}},[n,f,L.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:ne,refs:me,elements:L,floatingStyles:J}),[y,ne,me,L,J])}const F4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:o}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?Ew({element:a.current,padding:o}).fn(n):{}:a?Ew({element:a,padding:o}).fn(n):{}}}},P4=(e,t)=>{const n=S4(e);return{name:n.name,fn:n.fn,options:[e,t]}},B4=(e,t)=>{const n=E4(e);return{name:n.name,fn:n.fn,options:[e,t]}},q4=(e,t)=>({fn:T4(e).fn,options:[e,t]}),L4=(e,t)=>{const n=A4(e);return{name:n.name,fn:n.fn,options:[e,t]}},U4=(e,t)=>{const n=_4(e);return{name:n.name,fn:n.fn,options:[e,t]}},z4=(e,t)=>{const n=k4(e);return{name:n.name,fn:n.fn,options:[e,t]}},I4=(e,t)=>{const n=F4(e);return{name:n.name,fn:n.fn,options:[e,t]}};var $4="Arrow",jC=x.forwardRef((e,t)=>{const{children:n,width:a=10,height:o=5,...c}=e;return i.jsx(Ie.svg,{...c,ref:t,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});jC.displayName=$4;var V4=jC;function kx(e){const[t,n]=x.useState(void 0);return jn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let d,f;if("borderBoxSize"in c){const h=c.borderBoxSize,p=Array.isArray(h)?h[0]:h;d=p.inlineSize,f=p.blockSize}else d=e.offsetWidth,f=e.offsetHeight;n({width:d,height:f})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Tx="Popper",[NC,Pr]=ss(Tx),[H4,CC]=NC(Tx),SC=e=>{const{__scopePopper:t,children:n}=e,[a,o]=x.useState(null),[c,d]=x.useState(void 0);return i.jsx(H4,{scope:t,anchor:a,onAnchorChange:o,placementState:c,setPlacementState:d,children:n})};SC.displayName=Tx;var EC="PopperAnchor",AC=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...o}=e,c=CC(EC,n),d=x.useRef(null),f=c.onAnchorChange,h=x.useCallback(E=>{d.current=E,E&&f(E)},[f]),p=nt(t,h),y=x.useRef(null);x.useEffect(()=>{if(!a)return;const E=y.current;y.current=a.current,E!==y.current&&f(y.current)});const v=c.placementState&&Ox(c.placementState),b=v?.[0],S=v?.[1];return a?null:i.jsx(Ie.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...o,ref:p})});AC.displayName=EC;var Mx="PopperContent",[Y4,K4]=NC(Mx),_C=x.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:c="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:v="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:E,...w}=e,C=CC(Mx,n),[A,j]=x.useState(null),M=nt(t,j),[R,T]=x.useState(null),D=kx(R),F=D?.width??0,k=D?.height??0,z=a+(c!=="center"?"-"+c:""),X=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},q=Array.isArray(p)?p:[p],Y=q.length>0,ne={padding:X,boundary:q.filter(W4),altBoundary:Y},{refs:Z,floatingStyles:me,placement:L,isPositioned:J,middlewareData:ee}=R4({strategy:"fixed",placement:z,whileElementsMounted:(...Te)=>C4(...Te,{animationFrame:S==="always"}),elements:{reference:C.anchor},middleware:[P4({mainAxis:o+k,alignmentAxis:d}),h&&B4({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?q4():void 0,...ne}),h&&L4({...ne}),U4({...ne,apply:({elements:Te,rects:le,availableWidth:Re,availableHeight:Pe})=>{const{width:ot,height:Lt}=le.reference,Nt=Te.floating.style;Nt.setProperty("--radix-popper-available-width",`${Re}px`),Nt.setProperty("--radix-popper-available-height",`${Pe}px`),Nt.setProperty("--radix-popper-anchor-width",`${ot}px`),Nt.setProperty("--radix-popper-anchor-height",`${Lt}px`)}}),R&&I4({element:R,padding:f}),Q4({arrowWidth:F,arrowHeight:k}),b&&z4({strategy:"referenceHidden",...ne,boundary:Y?ne.boundary:void 0})]}),te=C.setPlacementState;jn(()=>(te(L),()=>{te(void 0)}),[L,te]);const[O,W]=Ox(L),ue=Wn(E);jn(()=>{J&&ue?.()},[J,ue]);const ce=ee.arrow?.x,ye=ee.arrow?.y,Ee=ee.arrow?.centerOffset!==0,[xe,he]=x.use
vendor: 4,211 bytes, line 9
9State();return jn(()=>{A&&he(window.getComputedStyle(A).zIndex)},[A]),i.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:J?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(" "),...ee.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Y4,{scope:n,placedSide:O,placedAlign:W,onArrowChange:T,arrowX:ce,arrowY:ye,shouldHideArrow:Ee,children:i.jsx(Ie.div,{"data-side":O,"data-align":W,...w,ref:M,style:{...w.style,animation:J?void 0:"none"}})})})});_C.displayName=Mx;var kC="PopperArrow",G4={top:"bottom",right:"left",bottom:"top",left:"right"},TC=x.forwardRef(function(t,n){const{__scopePopper:a,...o}=t,c=K4(kC,a),d=G4[c.placedSide];return i.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:i.jsx(V4,{...o,ref:n,style:{...o.style,display:"block"}})})});TC.displayName=kC;function W4(e){return e!==null}var Q4=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:o}=t,d=o.arrow?.centerOffset!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[p,y]=Ox(n),v={start:"0%",center:"50%",end:"100%"}[y],b=(o.arrow?.x??0)+f/2,S=(o.arrow?.y??0)+h/2;let E="",w="";return p==="bottom"?(E=d?v:`${b}px`,w=`${-h}px`):p==="top"?(E=d?v:`${b}px`,w=`${a.floating.height+h}px`):p==="right"?(E=`${-h}px`,w=d?v:`${S}px`):p==="left"&&(E=`${a.floating.width+h}px`,w=d?v:`${S}px`),{data:{x:E,y:w}}}});function Ox(e){const[t,n="center"]=e.split("-");return[t,n]}var Dx=SC,Gc=AC,Pf=_C,Bf=TC,[qf]=ss("Tooltip",[Pr]),Rx=Pr(),MC="TooltipProvider",Z4=700,_w="tooltip.open",[X4,OC]=qf(MC),DC=e=>{const{__scopeTooltip:t,delayDuration:n=Z4,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:c}=e,d=x.useRef(!0),f=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const p=h.current;return()=>window.clearTimeout(p)},[]),i.jsx(X4,{scope:t,isOpenDelayedRef:d,delayDuration:n,onOpen:x.useCallback(()=>{a<=0||(window.clearTimeout(h.current),d.current=!1)},[a]),onClose:x.useCallback(()=>{a<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,a))},[a]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(p=>{f.current=p},[]),disableHoverableContent:o,children:c})};DC.displayName=MC;var RC="Tooltip",[DH,Wc]=qf(RC),vg="TooltipTrigger",J4=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,o=Wc(vg,n),c=OC(vg,n),d=Rx(n),f=x.useRef(null),h=nt(t,f,o.onTriggerChange),p=x.useRef(!1),y=x.useRef(!1),v=x.useCallback(()=>p.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),i.jsx(Gc,{asChild:!0,...d,children:i.jsx(Ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:h,onPointerMove:be(e.onPointerMove,b=>{b.pointerType!=="touch"&&!y.current&&!c.isPointerInTransitRef.current&&(o.onTriggerEnter(),y.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),y.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:be(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});J4.displayName=vg;var Fx="TooltipPortal",[e3,t3]=qf(Fx,{forceMount:void 0}),FC=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:o}=e,c=Wc(Fx,t);return i.jsx(e3,{scope:t,forceMount:n,children:i.jsx(Hn,{present:n||c.open,children:i.jsx(_i,{asChild:!0,container:o,children:a})})})};FC.displayName=Fx;var Ko="TooltipContent",PC=x.forwardRef((e,t)=>{const n=t3(Ko,e.__scopeTooltip),{forceMount:a=n.forceMount,side:o="top",...c}=e,d=Wc(Ko,e.__scopeTooltip);return i.jsx(Hn,{present:a||d.open,children:d.disableHoverableContent?i.jsx(BC,{side:o,...c,ref:t}):i.jsx(n3,{side:o,...c,ref:t})})}),n3=x.forwardRef((e,t)=>
vendor: 4,351 bytes, line 9
9{const n=Wc(Ko,e.__scopeTooltip),a=OC(Ko,e.__scopeTooltip),o=x.useRef(null),c=nt(t,o),[d,f]=x.useState(null),{trigger:h,onClose:p}=n,y=o.current,{onPointerInTransitChange:v}=a,b=x.useCallback(()=>{f(null),v(!1)},[v]),S=x.useCallback((E,w)=>{const C=E.currentTarget,A={x:E.clientX,y:E.clientY},j=o3(A,C.getBoundingClientRect()),M=l3(A,j),R=c3(w.getBoundingClientRect()),T=d3([...M,...R]);f(T),v(!0)},[v]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(h&&y){const E=C=>S(C,y),w=C=>S(C,h);return h.addEventListener("pointerleave",E),y.addEventListener("pointerleave",w),()=>{h.removeEventListener("pointerleave",E),y.removeEventListener("pointerleave",w)}}},[h,y,S,b]),x.useEffect(()=>{if(d){const E=w=>{const C=w.target,A={x:w.clientX,y:w.clientY},j=h?.contains(C)||y?.contains(C),M=!u3(A,d);j?b():M&&(b(),p())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[h,y,d,p,b]),i.jsx(BC,{...e,ref:c})}),[s3,a3]=qf(RC,{isInside:!1}),r3=YM("TooltipContent"),BC=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":o,onEscapeKeyDown:c,onPointerDownOutside:d,...f}=e,h=Wc(Ko,n),p=Rx(n),{onClose:y}=h;return x.useEffect(()=>(document.addEventListener(_w,y),()=>document.removeEventListener(_w,y)),[y]),x.useEffect(()=>{if(h.trigger){const v=b=>{b.target instanceof Node&&b.target.contains(h.trigger)&&y()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[h.trigger,y]),i.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:v=>v.preventDefault(),onDismiss:y,children:i.jsxs(Pf,{"data-state":h.stateAttribute,...p,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(r3,{children:a}),i.jsx(s3,{scope:n,isInside:!0,children:i.jsx(wO,{id:h.contentId,role:"tooltip",children:o||a})})]})})});PC.displayName=Ko;var qC="TooltipArrow",i3=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,o=Rx(n);return a3(qC,n).isInside?null:i.jsx(Bf,{...o,...a,ref:t})});i3.displayName=qC;function o3(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),c=Math.abs(t.left-e.x);switch(Math.min(n,a,o,c)){case c:return"left";case o:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function l3(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function c3(e){const{top:t,right:n,bottom:a,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:a},{x:o,y:a}]}function u3(e,t){const{x:n,y:a}=e;let o=!1;for(let c=0,d=t.length-1;c<t.length;d=c++){const f=t[c],h=t[d],p=f.x,y=f.y,v=h.x,b=h.y;y>a!=b>a&&n<(v-p)*(a-y)/(b-y)+p&&(o=!o)}return o}function d3(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),f3(t)}function f3(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const o=e[a];for(;t.length>=2;){const c=t[t.length-1],d=t[t.length-2];if((c.x-d.x)*(o.y-d.y)>=(c.y-d.y)*(o.x-d.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;n.length>=2;){const c=n[n.length-1],d=n[n.length-2];if((c.x-d.x)*(o.y-d.y)>=(c.y-d.y)*(o.x-d.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var m3=DC,h3=FC,LC=PC;const p3=m3,g3=x.forwardRef(({className:e,sideOffset:t=4,...n},a)=>i.jsx(h3,{children:i.jsx(LC,{ref:a,sideOffset:t,className:ie("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
9de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));g3.displayName=LC.displayName;const wt=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ie("rounded-xl border bg-card text-card-foreground shadow",e),...t}));wt.displayName="Card";const xc=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ie("flex flex-col space-y-1.5 p-6",e),...t}));xc.displayName="CardHeader";const yc=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ie("font-semibold leading-none tracking-tight",e),...t}));yc.displayName="CardTitle";const x3=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ie("text-sm text-muted-foreground",e),...t}));x3.displayName="CardDescription";const Dn=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ie("p-6 pt-0",e),...t}));Dn.displayName="CardContent";const y3=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ie("flex items-center p-6 pt-0",e),...t}));y3.displayName="CardFooter";function v3(){return i.jsx("div",{className:"min-h-screen w-full flex items-center justify-center",style:{backgroundColor:"#FFFFFF"},children:i.jsx(wt,{className:"w-full max-w-md mx-4",style:{backgroundColor:"#FFFFFF",borderColor:"#E5E7EB"},children:i.jsxs(Dn,{className:"pt-6",children:[i.jsxs("div",{className:"flex mb-4 gap-2",children:[i.jsx(ZN,{className:"h-8 w-8",style:{color:"#A32D2D"}}),i.jsx("h1",{className:"text-2xl font-bold",style:{color:"#000000"},children:"404 Page Not Found"})]}),i.jsx("p",{className:"mt-4 text-sm",style:{color:"#4B5563"},children:"Did you forget to add the page to the router?"})]})})})}function b3(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,a,o,c,d=[],f="",h=e.split("/");for(h[0]||h.shift();o=h.shift();)n=o[0],n==="*"?(d.push(n),f+=o[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(a=o.indexOf("?",1),c=o.indexOf(".",1),d.push(o.substring(1,~a?a:~c?c:o.length)),f+=~a&&!~c?"(?:/([^/]+?))?":"/([^/]+?)",~c&&(f+=(~a?"?":"")+"\\"+o.substring(c))):f+="/"+o;return{keys:d,pattern:new RegExp("^"+f+(t?"(?=$|/)":"/?$"),"i")}}var Pp={exports:{}},Bp={};var kw;function w3(){if(kw)return Bp;kw=1;var e=Cf();function t(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function f(v,b){var S=b(),E=a({inst:{value:S,getSnapshot:b}}),w=E[0].inst,C=E[1];return c(function(){w.value=S,w.getSnapshot=b,h(w)&&C({inst:w})},[v,S,b]),o(function(){return h(w)&&C({inst:w}),v(function(){h(w)&&C({inst:w})})},[v]),d(S),S}function h(v){var b=v.getSnapshot;v=v.value;try{var S=b();return!n(v,S)}catch{return!0}}function p(v,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return Bp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Bp}var Tw;function j3(){return Tw||(Tw=1,Pp.exports=w3()),Pp.exports}var N3=j3();const C3=al.useInsertionEffect,S3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E3=S3?x.useLayoutEffect:x.useEffect,A3=C3||E3,UC=e=>{const t=x.useRef([e,(...n)=>t[0](...n)]).current;return A3(()=>{t[0]=e}),t[1]},_3="popstate",Px="pushState",Bx="replaceState",k3="hashchange",Mw=[_3,Px,Bx,k3],T3=e=>{for(const t of Mw)addEventListener(t,e);return()=>{for(const t of Mw)removeEventListener(t,e)}},zC=(e,t)=>N3.useSyncExternalStore(T3,e,t),Ow=()=>location.search,M3=({ssrSearch:e}={})=>zC(Ow,e!=null?()=>e:Ow),Dw=()=>location.pathname,O3=({ssrPath:e}={})=>zC(Dw,e!=null?()=>e:Dw),D3=(e,{replace:t=!1,state:n=null}={})=>history[t?Bx:Px](n,"",e),R3=(e={})=>[O3(e),D3],Rw=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Rw]>"u"){for(const e of[Px,Bx]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),a=new Event(e);return a.arguments=arguments,dispatchEvent(a),n}}Object.defineProperty(window,Rw,{value:!0})}const F3=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",IC=(e="")=>e==="/"?"":e,P3=(e,t)=>
9e[0]==="~"?e.slice(1):IC(t)+e,B3=(e="",t)=>F3(bg(IC(e)),bg(t)),q3=e=>e[0]==="?"?e.slice(1):e,bg=e=>{try{return decodeURI(e)}catch{return e}},L3=e=>bg(q3(e)),$C={hook:R3,searchHook:M3,parser:b3,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},VC=x.createContext($C),cl=()=>x.useContext(VC),HC={},YC=x.createContext(HC),qx=()=>x.useContext(YC),Lf=e=>{const[t,n]=e.hook(e);return[B3(e.base,t),UC((a,o)=>e.aroundNav(n,P3(a,e.base),o))]},ws=()=>Lf(cl()),U3=()=>{const e=cl();return L3(e.searchHook(e))},KC=(e,t,n,a)=>{const{pattern:o,keys:c}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",a),d=o.exec(n)||[],[f,...h]=d;return f!==void 0?[!0,(()=>{const p=c!==!1?Object.fromEntries(c.map((v,b)=>[v,h[b]])):d.groups;let y={...h};return p&&Object.assign(y,p),y})(),...a?[f]:[]]:[!1,null]},GC=({children:e,...t})=>{const n=cl(),a=t.hook?$C:n;let o=a;const[c,d=t.ssrSearch??""]=t.ssrPath?.split("?")??[];c&&(t.ssrSearch=d,t.ssrPath=c),t.hrefs=t.hrefs??t.hook?.hrefs,t.searchHook=t.searchHook??t.hook?.searchHook;let f=x.useRef({}),h=f.current,p=h;for(let y in a){const v=y==="base"?a[y]+(t[y]??""):t[y]??a[y];h===p&&v!==p[y]&&(f.current=p={...p}),p[y]=v,(v!==a[y]||v!==o[y])&&(o=p)}return x.createElement(VC.Provider,{value:o,children:e})},Fw=({children:e,component:t},n)=>t?x.createElement(t,{params:n}):typeof e=="function"?e(n):e,z3=e=>{let t=x.useRef(HC);const n=t.current;return t.current=Object.keys(e).length!==Object.keys(n).length||Object.entries(e).some(([a,o])=>o!==n[a])?e:n},Un=({path:e,nest:t,match:n,...a})=>{const o=cl(),[c]=Lf(o),[d,f,h]=n??KC(o.parser,e,c,t),p=z3({...qx(),...f});if(!d)return null;const y=h?x.createElement(GC,{base:h},Fw(a,p)):Fw(a,p);return x.createElement(YC.Provider,{value:p,children:y})},xs=x.forwardRef((e,t)=>{const n=cl(),[a,o]=Lf(n),{to:c="",href:d=c,onClick:f,asChild:h,children:p,className:y,replace:v,state:b,transition:S,...E}=e,w=UC(A=>{A.ctrlKey||A.metaKey||A.altKey||A.shiftKey||A.button!==0||(f?.(A),A.defaultPrevented||(A.preventDefault(),o(d,e)))}),C=n.hrefs(d[0]==="~"?d.slice(1):n.base+d,n);return h&&x.isValidElement(p)?x.cloneElement(p,{onClick:w,href:C}):x.createElement("a",{...E,onClick:w,href:C,className:y?.call?y(a===d):y,children:p,ref:t})}),WC=e=>Array.isArray(e)?e.flatMap(t=>WC(t&&t.type===x.Fragment?t.props.children:t)):[e],I3=({children:e,location:t})=>{const n=cl(),[a]=Lf(n);for(const o of WC(e)){let c=0;if(x.isValidElement(o)&&(c=KC(n.parser,o.props.path,t||a,o.props.nest))[0])return x.cloneElement(o,{match:c})}return null},$3=new Set([204,205,304]),V3="application/json, application/problem+json";function QC(e){return typeof Request<"u"&&e instanceof Request}function H3(e,t){return t?t.toUpperCase():QC(e)?e.method.toUpperCase():"GET"}function Y3(e){return typeof URL<"u"&&e instanceof URL}function K3(e){return typeof e=="string"?e:Y3(e)?e.toString():e.url}function G3(...e){const t=new Headers;for(const n of e)n&&new Headers(n).forEach((a,o)=>{t.set(o,a)});return t}function ZC(e){const t=e.get("content-type");return t?t.split(";",1)[0].trim().toLowerCase():null}function wg(e){return e==="application/json"||!!e?.endsWith("+json")}function XC(e){return!!(e&&(e.startsWith("text/")||e==="application/xml"||e==="text/xml"||e.endsWith("+xml")||e==="application/x-www-form-urlencoded"))}function JC(e,t){return!!(t==="HEAD"||$3.has(e.status)||e.headers.get("content-length")==="0"||e.body===null)}function eS(e){return e.charCodeAt(0)===65279?e.slice(1):e}function tS(e){const t=e.trimStart();return t.startsWith("{")||t.startsWith("[")}function dc(e,t){if(!e||typeof e!="object")return;const n=e[t];if(typeof n!="string")return;const a=n.trim();return a===""?void 0:a}function W3(e,t=300){return e.length>t?`${e.slice(0,t-1)}â¦`:e}function Q3(e,t){const n=`HTTP ${e.status} ${e.statusText}`;if(typeof t=="string"){const d=t.trim();return d?`${n}: ${W3(d)}`:n}const a=dc(t,"title"),o=dc(t,"detail"),c=dc(t,"message")??dc(t,"error_description")??dc(t,"error");return a&&o?`${n}: ${a} â ${o}`:o?`${n}: ${o}`:c?`${n}: ${c}`:a?`${n}: ${a}`:n}class Z3 extends Error{name="ApiError";status;statusText;data;headers;response;method;url;constructor(t,n,a){super(Q3(t,n)),Object.setPrototypeOf(this,new.target.prototype),this.status=t.status,this.statusText=t.statusText,this.data=n,this.headers=t.headers,this.response=t,this.method=a.method,this.url=t.url||a.url}}
9class X3 extends Error{name="ResponseParseError";status;statusText;headers;response;method;url;rawBody;cause;constructor(t,n,a,o){super(`Failed to parse response from ${o.method} ${t.url||o.url} (${t.status} ${t.statusText}) as JSON`),Object.setPrototypeOf(this,new.target.prototype),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers,this.response=t,this.method=o.method,this.url=t.url||o.url,this.rawBody=n,this.cause=a}}async function J3(e,t){const n=await e.text(),a=eS(n);if(a.trim()==="")return null;try{return JSON.parse(a)}catch(o){throw new X3(e,n,o,t)}}async function eP(e,t){if(JC(e,t))return null;const n=ZC(e.headers);if(n&&!wg(n)&&!XC(n))return typeof e.blob=="function"?e.blob():e.text();const a=await e.text(),o=eS(a);if(o.trim()==="")return null;if(wg(n)||tS(o))try{return JSON.parse(o)}catch{return a}return a}function tP(e){const t=ZC(e.headers);return wg(t)?"json":XC(t)||t==null?"text":"blob"}async function nP(e,t,n){if(JC(e,n.method))return null;switch(t==="auto"?tP(e):t){case"json":return J3(e,n);case"text":{const o=await e.text();return o===""?null:o}case"blob":if(typeof e.blob!="function")throw new TypeError('Blob responses are not supported in this runtime. Use responseType "json" or "text" instead.');return e.blob()}}async function Be(e,t={}){e=e;const{responseType:n="auto",headers:a,...o}=t,c=H3(e,o.method);if(o.body!=null&&(c==="GET"||c==="HEAD"))throw new TypeError(`customFetch: ${c} requests cannot have a body.`);const d=G3(QC(e)?e.headers:void 0,a);typeof o.body=="string"&&!d.has("content-type")&&tS(o.body)&&d.set("content-type","application/json"),n==="json"&&!d.has("accept")&&d.set("accept",V3);const f={method:c,url:K3(e)},h=await fetch(e,{...o,method:c,headers:d});if(!h.ok){const p=await eP(h,c);throw new Z3(h,p,f)}return await nP(h,n,f)}const cn=(e,t)=>{const n={queryKey:t};for(const a of Object.keys(e))a!=="queryKey"&&Object.defineProperty(n,a,{enumerable:!0,configurable:!0,get:()=>e[a]});return n},sP=()=>"/api/health/diagnostics",aP=async e=>Be(sP(),{...e,method:"GET"}),rP=()=>["/api/health/diagnostics"],iP=e=>{const{query:t,request:n}={};return{queryKey:t?.queryKey??rP(),queryFn:({signal:c})=>aP({signal:c,...n}),...t}};function oP(e){const t=iP(),n=ln(t);return cn(n,t.queryKey)}const lP=()=>"/api/auth/login",cP=async(e,t)=>Be(lP(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),uP=e=>{const t=["login"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return cP(d,a)},...n}},dP=e=>ht(uP(e)),fP=()=>"/api/auth/logout",mP=async e=>Be(fP(),{...e,method:"POST"}),hP=e=>{const t=["logout"],{mutation:n,request:a}={mutation:{mutationKey:t},request:void 0};return{mutationFn:()=>mP(a),...n}},pP=e=>ht(hP()),gP=()=>"/api/auth/me",xP=async e=>Be(gP(),{...e,method:"GET"}),Lx=()=>["/api/auth/me"],yP=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??Lx(),queryFn:({signal:c})=>xP({signal:c,...n}),...t}};function vP(e){const t=yP(e),n=ln(t);return cn(n,t.queryKey)}const bP=()=>"/api/team",wP=async e=>Be(bP(),{...e,method:"GET"}),Yd=()=>["/api/team"],jP=e=>{const{query:t,request:n}={};return{queryKey:t?.queryKey??Yd(),queryFn:({signal:c})=>wP({signal:c,...n}),...t}};function NP(e){const t=jP(),n=ln(t);return cn(n,t.queryKey)}const CP=()=>"/api/team",SP=async(e,t)=>Be(CP(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),EP=e=>{const t=["createTeamMember"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return SP(d,a)},...n}},AP=e=>ht(EP(e)),_P=e=>`/api/team/${e}`,kP=async(e,t,n)=>Be(_P(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),TP=e=>{const t=["updateTeamMember"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return kP(d,f,a)},...n}},MP=e=>ht(TP(e)),OP=e=>`/api/team/${e}`,DP=async(e,t)=>Be(OP(e),{...t,method:"DELETE"}),RP=e=>{const t=["deleteTeamMember"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return DP(d,a)},...n}},FP=e=>
9ht(RP(e)),PP=()=>"/api/clients",BP=async e=>Be(PP(),{...e,method:"GET"}),Sc=()=>["/api/clients"],qP=e=>{const{query:t,request:n}={};return{queryKey:t?.queryKey??Sc(),queryFn:({signal:c})=>BP({signal:c,...n}),...t}};function Br(e){const t=qP(),n=ln(t);return cn(n,t.queryKey)}const LP=()=>"/api/clients",UP=async(e,t)=>Be(LP(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),zP=e=>{const t=["createClient"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return UP(d,a)},...n}},IP=e=>ht(zP(e)),$P=e=>`/api/clients/${e}`,VP=async(e,t,n)=>Be($P(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),HP=e=>{const t=["updateClient"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return VP(d,f,a)},...n}},nS=e=>ht(HP(e)),YP=e=>`/api/clients/${e}`,KP=async(e,t)=>Be(YP(e),{...t,method:"DELETE"}),GP=e=>{const t=["deleteClient"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return KP(d,a)},...n}},WP=e=>ht(GP(e)),QP=e=>`/api/clients/${e}/users`,ZP=async(e,t)=>Be(QP(e),{...t,method:"GET"}),jg=e=>[`/api/clients/${e}/users`],XP=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??jg(e),queryFn:({signal:d})=>ZP(e,{signal:d,...a}),enabled:e!=null,...n}};function JP(e,t){const n=XP(e,t),a=ln(n);return cn(a,n.queryKey)}const e5=e=>`/api/clients/${e}/users`,t5=async(e,t,n)=>Be(e5(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),n5=e=>{const t=["createClientUser"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{clientId:d,data:f}=c??{};return t5(d,f,a)},...n}},s5=e=>ht(n5(e)),a5=(e,t)=>`/api/clients/${e}/users/${t}`,r5=async(e,t,n,a)=>Be(a5(e,t),{...a,method:"PATCH",headers:{"Content-Type":"application/json",...a?.headers},body:JSON.stringify(n)}),i5=e=>{const t=["updateClientUser"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{clientId:d,userId:f,data:h}=c??{};return r5(d,f,h,a)},...n}},o5=e=>ht(i5(e)),l5=(e,t)=>`/api/clients/${e}/users/${t}`,c5=async(e,t,n)=>Be(l5(e,t),{...n,method:"DELETE"}),u5=e=>{const t=["deleteClientUser"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{clientId:d,userId:f}=c??{};return c5(d,f,a)},...n}},d5=e=>ht(u5(e)),f5=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/posts?${n}`:"/api/posts"},m5=async(e,t)=>Be(f5(e),{...t,method:"GET"}),hi=e=>["/api/posts",...e?[e]:[]],h5=(e,t)=>{const{query:n,request:a}={};return{queryKey:n?.queryKey??hi(e),queryFn:({signal:d})=>m5(e,{signal:d,...a}),...n}};function Ux(e,t){const n=h5(e),a=ln(n);return cn(a,n.queryKey)}const p5=()=>"/api/posts",g5=async(e,t)=>Be(p5(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),x5=e=>{const t=["createPost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return g5(d,a)},...n}},y5=e=>ht(x5(e)),v5=e=>{const t=new URLSearchParams;Object.entries(e||{}
9).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/posts/summary?${n}`:"/api/posts/summary"},b5=async(e,t)=>Be(v5(e),{...t,method:"GET"}),Uf=e=>["/api/posts/summary",...e?[e]:[]],w5=(e,t)=>{const{query:n,request:a}={};return{queryKey:n?.queryKey??Uf(e),queryFn:({signal:d})=>b5(e,{signal:d,...a}),...n}};function j5(e,t){const n=w5(e),a=ln(n);return cn(a,n.queryKey)}const N5=e=>`/api/posts/${e}`,C5=async(e,t)=>Be(N5(e),{...t,method:"GET"}),zx=e=>[`/api/posts/${e}`],S5=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??zx(e),queryFn:({signal:d})=>C5(e,{signal:d,...a}),enabled:e!=null,...n}};function E5(e,t){const n=S5(e,t),a=ln(n);return cn(a,n.queryKey)}const A5=e=>`/api/posts/${e}`,_5=async(e,t,n)=>Be(A5(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),k5=e=>{const t=["updatePost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return _5(d,f,a)},...n}},sS=e=>ht(k5(e)),T5=e=>`/api/posts/${e}`,M5=async(e,t)=>Be(T5(e),{...t,method:"DELETE"}),O5=e=>{const t=["deletePost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return M5(d,a)},...n}},aS=e=>ht(O5(e)),D5=()=>"/api/client/auth/login",R5=async(e,t)=>Be(D5(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),F5=e=>{const t=["clientLogin"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return R5(d,a)},...n}},P5=e=>ht(F5(e)),B5=()=>"/api/client/auth/logout",q5=async e=>Be(B5(),{...e,method:"POST"}),L5=e=>{const t=["clientLogout"],{mutation:n,request:a}={mutation:{mutationKey:t},request:void 0};return{mutationFn:()=>q5(a),...n}},U5=e=>ht(L5()),z5=()=>"/api/client/auth/me",I5=async e=>Be(z5(),{...e,method:"GET"}),Ix=()=>["/api/client/auth/me"],$5=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??Ix(),queryFn:({signal:c})=>I5({signal:c,...n}),...t}};function V5(e){const t=$5(e),n=ln(t);return cn(n,t.queryKey)}const H5=()=>"/api/client/auth/change-password",Y5=async(e,t)=>Be(H5(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),K5=e=>{const t=["changeClientPassword"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return Y5(d,a)},...n}},G5=e=>ht(K5(e)),W5=()=>"/api/client/posts",Q5=async e=>Be(W5(),{...e,method:"GET"}),zo=()=>["/api/client/posts"],Z5=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??zo(),queryFn:({signal:c})=>Q5({signal:c,...n}),...t}};function X5(e){const t=Z5(e),n=ln(t);return cn(n,t.queryKey)}const J5=e=>`/api/client/posts/${e}/approve`,e9=async(e,t)=>Be(J5(e),{...t,method:"POST"}),t9=e=>{const t=["approveClientPost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return e9(d,a)},...n}},n9=e=>ht(t9(e)),s9=e=>`/api/client/posts/${e}/comments`,a9=async(e,t)=>Be(s9(e),{...t,method:"GET"}),Ng=e=>[`/api/client/posts/${e}/comments`],r9=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??Ng(e),queryFn:({signal:d})=>a9(e,{signal:d,...a}),enabled:e!=null,...n}};function i9(e,t){const n=r9(e,t),a=ln(n);return cn(a,n.queryKey)}const o9=e=>`/api/client/posts/${e}/comments`,l9=async(e,t,n)=>Be(o9(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),c9=e=>{const t=["createClientPostComment"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return l9(d,f,a)},...n}},u9=e=>ht(c9(e)),d9=e=>`/api/posts/${e}/comments`,f9=async(e,t)=>Be(d9(e),{...t,method:"GET"}),$x=e=>[`/api/posts/${e}/comments`],m9=(e,t)=>
9{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??$x(e),queryFn:({signal:d})=>f9(e,{signal:d,...a}),enabled:e!=null,...n}};function rS(e,t){const n=m9(e,t),a=ln(n);return cn(a,n.queryKey)}const h9=e=>`/api/posts/${e}/comments`,p9=async(e,t,n)=>Be(h9(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),g9=e=>{const t=["createAdminPostComment"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return p9(d,f,a)},...n}},x9=e=>ht(g9(e)),y9=()=>"/api/client/posts/bulk-approve",v9=async(e,t)=>Be(y9(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),b9=e=>{const t=["bulkApproveClientPosts"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return v9(d,a)},...n}},w9=e=>ht(b9(e)),j9=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/design-projects?${n}`:"/api/design-projects"},N9=async(e,t)=>Be(j9(e),{...t,method:"GET"}),pi=e=>["/api/design-projects",...e?[e]:[]],C9=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??pi(e),queryFn:({signal:d})=>N9(e,{signal:d,...a}),...n}};function iS(e,t){const n=C9(e,t),a=ln(n);return cn(a,n.queryKey)}const S9=()=>"/api/design-projects",E9=async(e,t)=>Be(S9(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),A9=e=>{const t=["createDesignProject"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return E9(d,a)},...n}},oS=e=>ht(A9(e)),_9=e=>`/api/design-projects/${e}`,k9=async(e,t,n)=>Be(_9(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),T9=e=>{const t=["updateDesignProject"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return k9(d,f,a)},...n}},lS=e=>ht(T9(e)),M9=e=>`/api/design-projects/${e}`,O9=async(e,t)=>Be(M9(e),{...t,method:"DELETE"}),D9=e=>{const t=["deleteDesignProject"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return O9(d,a)},...n}},R9=e=>ht(D9(e)),F9=e=>`/api/design-projects/${e}/comments`,P9=async(e,t)=>Be(F9(e),{...t,method:"GET"}),Cg=e=>[`/api/design-projects/${e}/comments`],B9=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??Cg(e),queryFn:({signal:d})=>P9(e,{signal:d,...a}),enabled:e!=null,...n}};function q9(e,t){const n=B9(e,t),a=ln(n);return cn(a,n.queryKey)}const L9=e=>`/api/design-projects/${e}/comments`,U9=async(e,t,n)=>Be(L9(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),z9=e=>{const t=["createAdminDesignProjectComment"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return U9(d,f,a)},...n}},I9=e=>ht(z9(e)),$9=()=>"/api/client/design-projects",V9=async e=>Be($9(),{...e,method:"GET"}),Vx=()=>["/api/client/design-projects"],H9=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??Vx(),queryFn:({signal:c})=>V9({signal:c,...n}),...t}};function Y9(e){const t=H9(e),n=ln(t);return cn(n,t.queryKey)}const K9=e=>`/api/client/design-projects/${e}/approve`,G9=async(e,t)=>Be(K9(e),{...t,method:"POST"}),W9=e=>{const t=["approveClientDesignProject"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return G9(d,a)},...n}},Q9=e=>ht(W9(e)),Z9=e=>`/api/client/design-projects/${e}/comments`,X9=async(e,t)=>Be(Z9(e),{...t,method:"GET"}),Sg=e=>[`/api/client/design-projects/${e}/comments`],J9=(e,t)=>
9{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??Sg(e),queryFn:({signal:d})=>X9(e,{signal:d,...a}),enabled:e!=null,...n}};function e8(e,t){const n=J9(e,t),a=ln(n);return cn(a,n.queryKey)}const t8=e=>`/api/client/design-projects/${e}/comments`,n8=async(e,t,n)=>Be(t8(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),s8=e=>{const t=["createClientDesignProjectComment"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return n8(d,f,a)},...n}},a8=e=>ht(s8(e)),r8=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/strategy/posts?${n}`:"/api/strategy/posts"},i8=async(e,t)=>Be(r8(e),{...t,method:"GET"}),cS=e=>["/api/strategy/posts",...e?[e]:[]],o8=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??cS(e),queryFn:({signal:d})=>i8(e,{signal:d,...a}),...n}};function l8(e,t){const n=o8(e,t),a=ln(n);return cn(a,n.queryKey)}const c8=()=>"/api/strategy/posts",u8=async(e,t)=>Be(c8(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),d8=e=>{const t=["createStrategyPost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return u8(d,a)},...n}},f8=e=>ht(d8(e)),m8=e=>`/api/strategy/posts/${e}`,h8=async(e,t,n)=>Be(m8(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),p8=e=>{const t=["updateStrategyPost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return h8(d,f,a)},...n}},g8=e=>ht(p8(e)),x8=e=>`/api/strategy/posts/${e}`,y8=async(e,t)=>Be(x8(e),{...t,method:"DELETE"}),v8=e=>{const t=["deleteStrategyPost"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return y8(d,a)},...n}},b8=e=>ht(v8(e)),w8=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/strategy/options?${n}`:"/api/strategy/options"},j8=async(e,t)=>Be(w8(e),{...t,method:"GET"}),of=e=>["/api/strategy/options",...e?[e]:[]],N8=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??of(e),queryFn:({signal:d})=>j8(e,{signal:d,...a}),...n}};function uS(e,t){const n=N8(e,t),a=ln(n);return cn(a,n.queryKey)}const C8=()=>"/api/strategy/options",S8=async(e,t)=>Be(C8(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),E8=e=>{const t=["createStrategyOption"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return S8(d,a)},...n}},A8=e=>ht(E8(e)),_8=e=>`/api/strategy/options/${e}`,k8=async(e,t,n)=>Be(_8(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),T8=e=>{const t=["updateStrategyOption"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d,data:f}=c??{};return k8(d,f,a)},...n}},M8=e=>ht(T8(e)),O8=e=>`/api/strategy/options/${e}`,D8=async(e,t)=>Be(O8(e),{...t,method:"DELETE"}),R8=e=>{const t=["deleteStrategyOption"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{id:d}=c??{};return D8(d,a)},...n}},F8=e=>ht(R8(e)),P8=e=>{const t=new URLSearchParams;Object.entries(e||{}
9).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/strategy/settings?${n}`:"/api/strategy/settings"},B8=async(e,t)=>Be(P8(e),{...t,method:"GET"}),Eg=e=>["/api/strategy/settings",...e?[e]:[]],q8=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??Eg(e),queryFn:({signal:d})=>B8(e,{signal:d,...a}),...n}};function L8(e,t){const n=q8(e,t),a=ln(n);return cn(a,n.queryKey)}const U8=()=>"/api/strategy/settings",z8=async(e,t)=>Be(U8(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),I8=e=>{const t=["updateStrategySettings"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return z8(d,a)},...n}},$8=e=>ht(I8(e)),V8=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([a,o])=>{o!==void 0&&t.append(a,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/strategy/notes?${n}`:"/api/strategy/notes"},H8=async(e,t)=>Be(V8(e),{...t,method:"GET"}),Ag=e=>["/api/strategy/notes",...e?[e]:[]],Y8=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??Ag(e),queryFn:({signal:d})=>H8(e,{signal:d,...a}),...n}};function K8(e,t){const n=Y8(e,t),a=ln(n);return cn(a,n.queryKey)}const G8=()=>"/api/strategy/notes",W8=async(e,t)=>Be(G8(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),Q8=e=>{const t=["upsertStrategyNote"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{data:d}=c??{};return W8(d,a)},...n}},Z8=e=>ht(Q8(e)),X8=e=>`/api/clients/${e}/reporting-connectors`,J8=async(e,t)=>Be(X8(e),{...t,method:"GET"}),Kd=e=>[`/api/clients/${e}/reporting-connectors`],e6=(e,t)=>{const{query:n,request:a}=t??{};return{queryKey:n?.queryKey??Kd(e),queryFn:({signal:d})=>J8(e,{signal:d,...a}),enabled:e!=null,...n}};function t6(e,t){const n=e6(e,t),a=ln(n);return cn(a,n.queryKey)}const n6=(e,t)=>`/api/clients/${e}/reporting-connectors/${t}`,s6=async(e,t,n,a)=>Be(n6(e,t),{...a,method:"PUT",headers:{"Content-Type":"application/json",...a?.headers},body:JSON.stringify(n)}),a6=e=>{const t=["upsertClientReportingConnector"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{clientId:d,category:f,data:h}=c??{};return s6(d,f,h,a)},...n}},r6=e=>ht(a6(e)),i6=(e,t)=>`/api/clients/${e}/reporting-connectors/${t}`,o6=async(e,t,n)=>Be(i6(e,t),{...n,method:"DELETE"}),l6=e=>{const t=["deleteClientReportingConnector"],{mutation:n,request:a}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:c=>{const{clientId:d,category:f}=c??{};return o6(d,f,a)},...n}},c6=e=>ht(l6(e)),dS=x.createContext(void 0);function Pw(e){return typeof e=="object"&&e!==null&&"status"in e&&e.status===401}function u6({children:e}){const[t]=ws(),n=t==="/admin"||t.startsWith("/admin/"),{data:a,isLoading:o,error:c}=vP({query:{enabled:n,retry:(d,f)=>!Pw(f)&&d<2,retryDelay:d=>Math.min(500*2**d,2e3),refetchOnMount:"always",refetchOnWindowFocus:!0,queryKey:Lx()}});return i.jsx(dS.Provider,{value:{admin:n&&!Pw(c)&&a||null,isLoading:n&&o},children:e})}function ma(){const e=x.useContext(dS);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function Bs({children:e,requireSuperAdmin:t=!1}){const{admin:n,isLoading:a}=ma(),[,o]=ws();return x.useEffect(()=>{if(!a){if(!n){o("/admin-login-hasgduh73265s");return}t&&n.role!=="super_admin"&&o("/admin")}},[n,a,t,o]),a?i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:i.jsx("div",{className:"w-8 h-8 rounded-full border-4 border-primary border-t-transparent animate-spin"})}):!n||t&&n.role!=="super_admin"?null:i.jsx(i.Fragment,{children:e})}const fS=x.createContext(void 0);function Bw(e){return typeof e=="object"&&e!==null&&"status"in e&&e.status===401}function d6({children:e}){const[t]=ws(),n=t==="/dashboard"||t.startsWith("/dashboard/"),{data:a,isLoading:o,error:c}=V5({query:{enabled:n,retry:(d,f)=>!Bw(f)&&d<2,retryDelay:d=>Math.min(500*2**d,2e3),refetchOnMount:"always",refetchOnWindowFocus:!0,queryKey:Ix()}});return i.jsx(fS.Provider,{value:{client:n&&!Bw(c)&&a||null,isLoading:n&&o},children:e})}function zf(){const e=x.useContext(fS);if(e===void 0)throw new Error("useClientAuth must be used within a ClientAuthProvider");return e}function f6({children:e}){const{client:t,isLoading:n}=zf(),[,a]=ws();return x.useEffect(()=>{n||t||a("/client-login")},[t,n,a]),n?i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:i.jsx("div",{className:"w-8 h-8 rounded-full border-4 border-primary border-t-transparent animate-spin"})}):t?i.jsx(i.Fragment,{children:e}):null}const Go="/assets/growth-shark-logo-brPDS97k.png";function qs({children:e}){const{admin:t}=ma(),[n]=ws(),a=pP();async function o(){try{await a.mutateAsync()}finally{window.location.href="/admin-login-hasgduh73265s"}}if(!t)return i.jsx(i.Fragment,{children:e});const c=t.role==="super_admin",d=t.role==="staff",f=t.departments??[],h=!d||f.includes("social_media"),p=!d||f.includes("design"),y=!d,v=[{href:"/admin/posts/new",label:"Create Post",icon:tf},{href:"/admin/post-details",label:"Post Details",icon:xx},{href:"/admin/strategy",label:"Strategy",icon:JN},{href:"/admin/calendar",label:"Calendar",icon:$c}],b=v.some(j=>n===j.href||n.startsWith(j.href+"/")),[S,E]=x.useState(b),w=[{href:"/admin/clients",label:"Clients",icon:kf}];c&&w.push({href:"/admin/team",label:"Team Management",icon:yi});const C=n==="/admin",A=n==="/admin/design"||n.startsWith("/admin/design/");return i.jsxs("div",{className:"flex h-[100dvh] w-full overflow-hidden bg-background",children:[i.jsxs("aside",{className:"w-64 border-r border-sidebar-border bg-sidebar text-sidebar-foreground flex flex-col hidden md:flex shadow-[4px_0_24px_rgba(0,0,0,0.02)] z-10 relative",children:[i.jsxs("div",{className:"h-16 flex items-center px-6 border-b border-sidebar-border font-display font-bold tracking-tight text-xl text-[#111827] gap-2",children:[i.jsx("img",{src:Go,alt:"The Growth Shark",className:"w-8 h-8 rounded-lg"}),"The Growth Shark"]}),i.jsxs("div",{className:"p-4 flex-1 overflow-y-auto space-y-1",children:[i.jsx(xs,{href:"/admin",children:i.jsxs("div",{className:ie("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-bold transition-all cursor-pointer",C?"bg-[#F8F9FB] text-[#004AAC]":"text-[#374151] hover:bg-[#F8F9FB] hover:text-[#004AAC]"),children:[i.jsx(FR,{className:ie("w-4 h-4",C?"text-[#00CEA6]":"text-[#9CA3AF]")}),"Dashboard"]})}),h&&i.jsxs("div",{className:"mt-1",children:[i.jsxs("button",{onClick:()=>E(j=>!j),className:ie("w-full flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-bold transition-all cursor-pointer",b?"bg-[#F8F9FB] text-[#004AAC]":"text-[#374151] hover:bg-[#F8F9FB] hover:text-[#004AAC]"),children:[i.jsx(fF,{className:ie("w-4 h-4",b?"text-[#00CEA6]":"text-[#9CA3AF]")}),i.jsx("span",{className:"flex-1 text-left",children:"Social Media"}),S?i.jsx(il,{className:"w-3.5 h-3.5 text-[#9CA3AF]"}):i.jsx(Ti,{className:"w-3.5 h-3.5 text-[#9CA3AF]"})]}),S&&i.jsx("div",{className:"mt-0.5 ml-3 pl-4 border-l border-[#
9E9EBF0] space-y-0.5",children:v.map(j=>{const M=n===j.href;return i.jsx(xs,{href:j.href,children:i.jsxs("div",{className:ie("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm font-bold transition-all cursor-pointer",M?"bg-[#F8F9FB] text-[#004AAC]":"text-[#374151] hover:bg-[#F8F9FB] hover:text-[#004AAC]"),children:[i.jsx(j.icon,{className:ie("w-3.5 h-3.5",M?"text-[#00CEA6]":"text-[#9CA3AF]")}),j.label]})},j.href)})})]}),p&&i.jsx(xs,{href:"/admin/design",children:i.jsxs("div",{className:ie("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-bold transition-all cursor-pointer",A?"bg-[#F8F9FB] text-[#004AAC]":"text-[#374151] hover:bg-[#F8F9FB] hover:text-[#004AAC]"),children:[i.jsx(aC,{className:ie("w-4 h-4",A?"text-[#00CEA6]":"text-[#9CA3AF]")}),"Design and Dev"]})}),y&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"text-[11px] font-bold text-[#C1C7D0] uppercase tracking-wider mb-2 mt-6 px-2",children:"Management"}),w.map(j=>{const M=n===j.href;return i.jsxs("div",{children:[i.jsx(xs,{href:j.href,children:i.jsxs("div",{className:ie("flex items-center gap-2.5 px-3 py-1.5 rounded-md text-sm font-bold transition-all cursor-pointer",M?"bg-[#F8F9FB] text-[#004AAC]":"text-[#374151] hover:bg-[#F8F9FB] hover:text-[#004AAC]"),children:[i.jsx(j.icon,{className:ie("w-4 h-4",M?"text-[#00CEA6]":"text-[#9CA3AF]")}),j.label]})}),j.href==="/admin/team"&&i.jsx(xs,{href:"/admin/system-health",children:i.jsxs("div",{className:ie("ml-7 flex items-center gap-2.5 rounded-md px-3 py-1.5 text-sm font-bold transition-all cursor-pointer",n==="/admin/system-health"?"bg-[#F8F9FB] text-[#004AAC]":"text-[#6B7280] hover:bg-[#F8F9FB] hover:text-[#004AAC]"),children:[i.jsx(uw,{className:ie("h-3.5 w-3.5",n==="/admin/system-health"?"text-[#00CEA6]":"text-[#9CA3AF]")}),"System Health"]})})]},j.href)})]})]}),i.jsxs("div",{className:"p-4 border-t border-sidebar-border space-y-4",children:[i.jsxs("div",{className:"px-2",children:[i.jsx("p",{className:"text-sm font-bold text-[#111827]",children:t.name}),i.jsx("p",{className:"text-xs text-[#9CA3AF] truncate",children:t.email}),i.jsx("p",{className:"text-xs font-bold text-[#00CEA6] mt-1 uppercase tracking-wider",children:t.role==="super_admin"?"Super Admin":t.role==="manager"?"Manager":"Staff"})]}),i.jsxs("button",{onClick:o,className:"flex items-center gap-3 px-3 py-2 w-full rounded-md text-sm font-bold text-destructive hover:bg-destructive/10 transition-colors",children:[i.jsx(pg,{className:"w-4 h-4"}),"Logout"]})]})]}),i.jsxs("main",{className:"flex-1 flex flex-col h-full overflow-hidden bg-background relative z-0",children:[i.jsxs("header",{className:"md:hidden h-16 border-b border-border flex items-center px-4 justify-between bg-card shrink-0",children:[i.jsxs("div",{className:"font-display font-bold tracking-tight text-lg flex items-center gap-2 text-[#111827]",children:[i.jsx("img",{src:Go,alt:"The Growth Shark",className:"w-8 h-8 rounded-lg"}),"The Growth Shark"]}),i.jsx("button",{onClick:o,className:"p-2 text-[#9CA3AF] hover:bg-accent rounded-md",children:i.jsx(pg,{className:"w-5 h-5"})}),c&&i.jsx(xs,{href:"/admin/system-health",children:i.jsx("button",{"aria-label":"System Health",className:"p-2 text-[#9CA3AF] hover:bg-accent rounded-md",children:i.jsx(uw,{className:"w-5 h-5"})})})]}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:e})]})]})}const Oc=_f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground shadow-sm border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ve=x.forwardRef(({className:e,variant:t,size:n,asChild:a=!1,...o},c)=>{const d=a?cN:"button";return i.jsx(d,{className:ie(Oc({variant:t,size:n,className:e})),ref:c,...o})});ve.displayName="Button";const ze=x.forwardRef(({className:e,type:t,...n},a)=>i.jsx("input",{type:t,className:ie("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...n}));ze.displayName="Input";var m6="Label",mS=x.forwardRef((e,t)=>
9i.jsx(Ie.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));mS.displayName=m6;var hS=mS;const h6=_f("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jt=x.forwardRef(({className:e,...t},n)=>i.jsx(hS,{ref:n,className:ie(h6(),e),...t}));jt.displayName=hS.displayName;var qp="focusScope.autoFocusOnMount",Lp="focusScope.autoFocusOnUnmount",qw={bubbles:!1,cancelable:!0},p6="FocusScope",Qc=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...d}=e,[f,h]=x.useState(null),p=Wn(o),y=Wn(c),v=x.useRef(null),b=nt(t,h),S=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(a){let w=function(M){if(S.paused||!f)return;const R=M.target;f.contains(R)?v.current=R:yr(v.current,{select:!0})},C=function(M){if(S.paused||!f)return;const R=M.relatedTarget;R!==null&&(f.contains(R)||yr(v.current,{select:!0}))},A=function(M){if(document.activeElement===document.body)for(const T of M)T.removedNodes.length>0&&yr(f)};document.addEventListener("focusin",w),document.addEventListener("focusout",C);const j=new MutationObserver(A);return f&&j.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",C),j.disconnect()}}},[a,f,S.paused]),x.useEffect(()=>{if(f){Uw.add(S);const w=document.activeElement;if(!f.contains(w)){const A=new CustomEvent(qp,qw);f.addEventListener(qp,p),f.dispatchEvent(A),A.defaultPrevented||(g6(w6(pS(f)),{select:!0}),document.activeElement===w&&yr(f))}return()=>{f.removeEventListener(qp,p),setTimeout(()=>{const A=new CustomEvent(Lp,qw);f.addEventListener(Lp,y),f.dispatchEvent(A),A.defaultPrevented||yr(w??document.body,{select:!0}),f.removeEventListener(Lp,y),Uw.remove(S)},0)}}},[f,p,y,S]);const E=x.useCallback(w=>{if(!n&&!a||S.paused)return;const C=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,A=document.activeElement;if(C&&A){const j=w.currentTarget,[M,R]=x6(j);M&&R?!w.shiftKey&&A===R?(w.preventDefault(),n&&yr(M,{select:!0})):w.shiftKey&&A===M&&(w.preventDefault(),n&&yr(R,{select:!0})):A===j&&w.preventDefault()}},[n,a,S.paused]);return i.jsx(Ie.div,{tabIndex:-1,...d,ref:b,onKeyDown:E})});Qc.displayName=p6;function g6(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(yr(a,{select:t}),document.activeElement!==n)return}function x6(e){const t=pS(e),n=Lw(t,e),a=Lw(t.reverse(),e);return[n,a]}function pS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lw(e,t){for(const n of e)if(!y6(n,{upTo:t}))return n}function y6(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function v6(e){return e instanceof HTMLInputElement&&"select"in e}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&v6(e)&&t&&e.select()}}var Uw=b6();function b6(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=zw(e,t),e.unshift(t)},remove(t){e=zw(e,t),e[0]?.resume()}}}function zw(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function w6(e){return e.filter(t=>t.tagName!=="A")}var Rd=0,To=null;function If(){x.useEffect(()=>{To||(To={start:Iw(),end:Iw()});const{start:e,end:t}=To;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Rd++,()=>{Rd===1&&(To?.start.remove(),To?.end.remove(),To=null),Rd=Math.max(0,Rd-1)}},[])}function Iw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 4,267 bytes, line 9
9style.position="fixed",e.style.pointerEvents="none",e}var aa=function(){return aa=Object.assign||function(t){for(var n,a=1,o=arguments.length;a<o;a++){n=arguments[a];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(t[c]=n[c])}return t},aa.apply(this,arguments)};function gS(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}function j6(e,t,n){if(n||arguments.length===2)for(var a=0,o=t.length,c;a<o;a++)(c||!(a in t))&&(c||(c=Array.prototype.slice.call(t,0,a)),c[a]=t[a]);return e.concat(c||Array.prototype.slice.call(t))}var Gd="right-scroll-bar-position",Wd="width-before-scroll-bar",N6="with-scroll-bars-hidden",C6="--removed-body-scroll-bar-size";function Up(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function S6(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var o=n.value;o!==a&&(n.value=a,n.callback(a,o))}}}})[0];return n.callback=t,n.facade}var E6=typeof window<"u"?x.useLayoutEffect:x.useEffect,$w=new WeakMap;function A6(e,t){var n=S6(null,function(a){return e.forEach(function(o){return Up(o,a)})});return E6(function(){var a=$w.get(n);if(a){var o=new Set(a),c=new Set(e),d=n.current;o.forEach(function(f){c.has(f)||Up(f,null)}),c.forEach(function(f){o.has(f)||Up(f,d)})}$w.set(n,e)},[e]),n}function _6(e){return e}function k6(e,t){t===void 0&&(t=_6);var n=[],a=!1,o={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(c){var d=t(c,a);return n.push(d),function(){n=n.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(a=!0;n.length;){var d=n;n=[],d.forEach(c)}n={push:function(f){return c(f)},filter:function(){return n}}},assignMedium:function(c){a=!0;var d=[];if(n.length){var f=n;n=[],f.forEach(c),d=n}var h=function(){var y=d;d=[],y.forEach(c)},p=function(){return Promise.resolve().then(h)};p(),n={push:function(y){d.push(y),p()},filter:function(y){return d=d.filter(y),n}}}};return o}function T6(e){e===void 0&&(e={});var t=k6(null);return t.options=aa({async:!0,ssr:!1},e),t}var xS=function(e){var t=e.sideCar,n=gS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return x.createElement(a,aa({},n))};xS.isSideCarExport=!0;function M6(e,t){return e.useMedium(t),xS}var yS=T6(),zp=function(){},$f=x.forwardRef(function(e,t){var n=x.useRef(null),a=x.useState({onScrollCapture:zp,onWheelCapture:zp,onTouchMoveCapture:zp}),o=a[0],c=a[1],d=e.forwardProps,f=e.children,h=e.className,p=e.removeScrollBar,y=e.enabled,v=e.shards,b=e.sideCar,S=e.noRelative,E=e.noIsolation,w=e.inert,C=e.allowPinchZoom,A=e.as,j=A===void 0?"div":A,M=e.gapMode,R=gS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=b,D=A6([n,t]),F=aa(aa({},R),o);return x.createElement(x.Fragment,null,y&&x.createElement(T,{sideCar:yS,removeScrollBar:p,shards:v,noRelative:S,noIsolation:E,inert:w,setCallbacks:c,allowPinchZoom:!!C,lockRef:n,gapMode:M}),d?x.cloneElement(x.Children.only(f),aa(aa({},F),{ref:D})):x.createElement(j,aa({},F,{className:h,ref:D}),f))});$f.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$f.classNames={fullWidth:Wd,zeroRight:Gd};var O6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function D6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=O6();return t&&e.setAttribute("nonce",t),e}function R6(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function F6(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var P6=function(){var e=0,t=null;return{add:function(n){e==0&&(t=D6())&&(R6(t,n),F6(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}}
vendor: 4,206 bytes, lines 9-49
9,B6=function(){var e=P6();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vS=function(){var e=B6(),t=function(n){var a=n.styles,o=n.dynamic;return e(a,o),null};return t},q6={left:0,top:0,right:0,gap:0},Ip=function(e){return parseInt(e||"",10)||0},L6=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ip(n),Ip(a),Ip(o)]},U6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return q6;var t=L6(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},z6=vS(),$o="data-scroll-locked",I6=function(e,t,n,a){var o=e.left,c=e.top,d=e.right,f=e.gap;return n===void 0&&(n="margin"),` 10 .`.concat(N6,` { 11 overflow: hidden `).concat(a,`; 12 padding-right: `).concat(f,"px ").concat(a,`; 13 } 14 body[`).concat($o,`] { 15 overflow: hidden `).concat(a,`; 16 overscroll-behavior: contain; 17 `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&` 18 padding-left: `.concat(o,`px; 19 padding-top: `).concat(c,`px; 20 padding-right: `).concat(d,`px; 21 margin-left:0; 22 margin-top:0; 23 margin-right: `).concat(f,"px ").concat(a,`; 24 `),n==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),` 25 } 26 27 .`).concat(Gd,` { 28 right: `).concat(f,"px ").concat(a,`; 29 } 30 31 .`).concat(Wd,` { 32 margin-right: `).concat(f,"px ").concat(a,`; 33 } 34 35 .`).concat(Gd," .").concat(Gd,` { 36 right: 0 `).concat(a,`; 37 } 38 39 .`).concat(Wd," .").concat(Wd,` { 40 margin-right: 0 `).concat(a,`; 41 } 42 43 body[`).concat($o,`] { 44 `).concat(C6,": ").concat(f,`px; 45 } 46`)},Vw=function(){var e=parseInt(document.body.getAttribute($o)||"0",10);return isFinite(e)?e:0},$6=function(){x.useEffect(function(){return document.body.setAttribute($o,(Vw()+1).toString()),function(){var e=Vw()-1;e<=0?document.body.removeAttribute($o):document.body.setAttribute($o,e.toString())}},[])},V6=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;$6();var c=x.useMemo(function(){return U6(o)},[o]);return x.createElement(z6,{styles:I6(c,!t,o,n?"":"!important")})},_g=!1;if(typeof window<"u")try{var Fd=Object.defineProperty({},"passive",{get:function(){return _g=!0,!0}});window.addEventListener("test",Fd,Fd),window.removeEventListener("test",Fd,Fd)}catch{_g=!1}var Mo=_g?{passive:!1}:!1,H6=function(e){return e.tagName==="TEXTAREA"},bS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!H6(e)&&n[t]==="visible")},Y6=function(e){return bS(e,"overflowY")},K6=function(e){return bS(e,"overflowX")},Hw=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=wS(e,a);if(o){var c=jS(e,a),d=c[1],f=c[2];if(d>f)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},G6=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},W6=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},wS=function(e,t){return e==="v"?Y6(t):K6(t)},jS=function(e,t){return e==="v"?G6(t):W6(t)},Q6=function(e,t){return e==="h"&&t==="rtl"?-1:1},Z6=function(e,t,n,a,o){var c=Q6(e,window.getComputedStyle(t).direction),d=c*a,f=n.target,h=t.contains(f),p=!1,y=d>0,v=0,b=0;do{if(!f)break;var S=jS(e,f),E=S[0],w=S[1],C=S[2],A=w-C-c*E;(E||A)&&wS(e,f)&&(v+=A,b+=E);var j=f.parentNode;f=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(y&&Math.abs(v)<1||!y&&Math.abs(b)<1)&&(p=!0),p},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yw=function(e){return[e.deltaX,e.deltaY]},Kw=function(e){return e&&"current"in e?e.current:e},X6=function(e,t){return e[0]===t[0]&&e[1]===t[1]},J6=function(e){return` 47 .block-interactivity-`.concat(e,` {pointer-events: none;} 48 .allow-interactivity-`).concat(e,` {pointer-events: all;} 49`)},eB=0,Oo=[];function tB(e){var t=x.useRef([]),n=x.useRef([0,0]),a=x.useRef(),o=x.use
vendor: 9,371 bytes, line 49
49State(eB++)[0],c=x.useState(vS)[0],d=x.useRef(e);x.useEffect(function(){d.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=j6([e.lockRef.current],(e.shards||[]).map(Kw),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=x.useCallback(function(w,C){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!d.current.allowPinchZoom;var A=Pd(w),j=n.current,M="deltaX"in w?w.deltaX:j[0]-A[0],R="deltaY"in w?w.deltaY:j[1]-A[1],T,D=w.target,F=Math.abs(M)>Math.abs(R)?"h":"v";if("touches"in w&&F==="h"&&D.type==="range")return!1;var k=window.getSelection(),z=k&&k.anchorNode,X=z?z===D||z.contains(D):!1;if(X)return!1;var q=Hw(F,D);if(!q)return!0;if(q?T=F:(T=F==="v"?"h":"v",q=Hw(F,D)),!q)return!1;if(!a.current&&"changedTouches"in w&&(M||R)&&(a.current=T),!T)return!0;var Y=a.current||T;return Z6(Y,C,w,Y==="h"?M:R)},[]),h=x.useCallback(function(w){var C=w;if(!(!Oo.length||Oo[Oo.length-1]!==c)){var A="deltaY"in C?Yw(C):Pd(C),j=t.current.filter(function(T){return T.name===C.type&&(T.target===C.target||C.target===T.shadowParent)&&X6(T.delta,A)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var M=(d.current.shards||[]).map(Kw).filter(Boolean).filter(function(T){return T.contains(C.target)}),R=M.length>0?f(C,M[0]):!d.current.noIsolation;R&&C.cancelable&&C.preventDefault()}}},[]),p=x.useCallback(function(w,C,A,j){var M={name:w,delta:C,target:A,should:j,shadowParent:nB(A)};t.current.push(M),setTimeout(function(){t.current=t.current.filter(function(R){return R!==M})},1)},[]),y=x.useCallback(function(w){n.current=Pd(w),a.current=void 0},[]),v=x.useCallback(function(w){p(w.type,Yw(w),w.target,f(w,e.lockRef.current))},[]),b=x.useCallback(function(w){p(w.type,Pd(w),w.target,f(w,e.lockRef.current))},[]);x.useEffect(function(){return Oo.push(c),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Mo),document.addEventListener("touchmove",h,Mo),document.addEventListener("touchstart",y,Mo),function(){Oo=Oo.filter(function(w){return w!==c}),document.removeEventListener("wheel",h,Mo),document.removeEventListener("touchmove",h,Mo),document.removeEventListener("touchstart",y,Mo)}},[]);var S=e.removeScrollBar,E=e.inert;return x.createElement(x.Fragment,null,E?x.createElement(c,{styles:J6(o)}):null,S?x.createElement(V6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sB=M6(yS,tB);var Zc=x.forwardRef(function(e,t){return x.createElement($f,aa({},e,{ref:t,sideCar:sB}))});Zc.classNames=$f.classNames;var aB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Do=new WeakMap,Bd=new WeakMap,qd={},$p=0,NS=function(e){return e&&(e.host||NS(e.parentNode))},rB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=NS(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},iB=function(e,t,n,a){var o=rB(t,Array.isArray(e)?e:[e]);qd[n]||(qd[n]=new WeakMap);var c=qd[n],d=[],f=new Set,h=new Set(o),p=function(v){!v||f.has(v)||(f.add(v),p(v.parentNode))};o.forEach(p);var y=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(b){if(f.has(b))y(b);else try{var S=b.getAttribute(a),E=S!==null&&S!=="false",w=(Do.get(b)||0)+1,C=(c.get(b)||0)+1;Do.set(b,w),c.set(b,C),d.push(b),w===1&&E&&Bd.set(b,!0),C===1&&b.setAttribute(n,"true"),E||b.setAttribute(a,"true")}catch(A){console.error("aria-hidden: cannot operate on ",b,A)}})};return y(t),f.clear(),$p++,function(){d.forEach(function(v){var b=Do.get(v)-1,S=c.get(v)-1;Do.set(v,b),c.set(v,S),b||(Bd.has(v)||v.removeAttribute(a),Bd.delete(v)),S||v.removeAttribute(n)}),$p--,$p||(Do=new WeakMap,Do=new WeakMap,Bd=new WeakMap,qd={})}},Vf=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=aB(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),iB(a,o,n,"aria-hidden")):function(){return null}},Hf="Dialog",[CS,SS]=ss(Hf),[oB,Ks]=CS(Hf),Hx=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:o,onOpenChange:c,modal:d=!0}=e,f=x.useRef(null),h=x.useRef(null),[p,y]=ua({prop:a,defaultProp:o??!1,onChange:c,caller:Hf});return i.jsx(oB,{scope:t,triggerRef:f,contentRef:h,contentId:Vs(),titleId:Vs(),descriptionId:Vs(),open:p,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(v=>!v),[y]),modal:d,children:n})};Hx.displayName=Hf;var ES="DialogTrigger",Yx=x.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Ks(ES,n),c=nt(t,o.triggerRef);return i.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Wx(o.open),...a,ref:c,onClick:be(e.onClick,o.onOpenToggle)})});Yx.displayName=ES;var Kx="DialogPortal",[lB,AS]=CS(Kx,{forceMount:void 0}),Gx=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:o}=e,c=Ks(Kx,t);return i.jsx(lB,{scope:t,forceMount:n,children:x.Children.map(a,d=>i.jsx(Hn,{present:n||c.open,children:i.jsx(_i,{asChild:!0,container:o,children:d})}))})};Gx.displayName=Kx;var lf="DialogOverlay",Yf=x.forwardRef((e,t)=>{const n=AS(lf,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,c=Ks(lf,e.__scopeDialog);return c.modal?i.jsx(Hn,{present:a||c.open,children:i.jsx(uB,{...o,ref:t})}):null});Yf.displayName=lf;var cB=Er("DialogOverlay.RemoveScroll"),uB=x.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Ks(lf,n),c=oO(),d=nt(t,c);return i.jsx(Zc,{as:cB,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(Ie.div,{"data-state":Wx(o.open),...a,ref:d,style:{pointerEvents:"auto",...a.style}})})}),Wo="DialogContent",Kf=x.forwardRef((e,t)=>{const n=AS(Wo,e.__scopeDialog),{forceMount:a=n.forceMount,...o}=e,c=Ks(Wo,e.__scopeDialog);return i.jsx(Hn,{present:a||c.open,children:c.modal?i.jsx(dB,{...o,ref:t}):i.jsx(fB,{...o,ref:t})})});Kf.displayName=Wo;var dB=x.forwardRef((e,t)=>{const n=Ks(Wo,e.__scopeDialog),a=x.useRef(null),o=nt(t,n.contentRef,a);return x.useEffect(()=>{const c=a.current;if(c)return Vf(c)},[]),i.jsx(_S,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:be(e.onCloseAutoFocus,c=>{c.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&c.preventDefault()}),onFocusOutside:be(e.onFocusOutside,c=>c.preventDefault())})}),fB=x.forwardRef((e,t)=>{const n=Ks(Wo,e.__scopeDialog),a=x.useRef(!1),o=x.useRef(!1);return i.jsx(_S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(a.current||n.triggerRef.current?.focus(),c.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=c.target;n.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.current&&c.preventDefault()}})}),_S=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:c,...d}=e,f=Ks(Wo,n);return If(),i.jsx(i.Fragment,{children:i.jsx(Qc,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:c,children:i.jsx(Ai,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Wx(f.open),...d,ref:t,deferPointerDownOutside:!0,onDismiss:()=>f.onOpenChange(!1)})})})}),kS="DialogTitle",Gf=x.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Ks(kS,n);return i.jsx(Ie.h2,{id:o.titleId,...a,ref:t})});Gf.displayName=kS;var TS="DialogDescription",Wf=x.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Ks(TS,n);return i.jsx(Ie.p,{id:o.descriptionId,...a,ref:t})});Wf.displayName=TS;var MS="DialogClose",Qf=x.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,o=Ks(MS,n);return i.jsx(Ie.button,{type:"button",...a,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});Qf.displayName=MS;function Wx(e){return e?"open":"closed"}const Vn=Hx,Xc=Yx,mB=Gx,OS=x.forwardRef(({className:e,...t},n)=>i.jsx(Yf,{ref:n,className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));OS.displayName=Yf.displayName;const Rn=x.forwardRef(({className:e,children:t,...n},a)=>i.jsxs(mB,{children:[i.jsx(OS,{}),i.jsxs(Kf,{ref:a,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg max-h-[85vh] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
49nded-lg",e),...n,children:[t,i.jsxs(Qf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(Mf,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Rn.displayName=Kf.displayName;const Fn=({className:e,...t})=>i.jsx("div",{className:ie("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Fn.displayName="DialogHeader";const DS=({className:e,...t})=>i.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DS.displayName="DialogFooter";const Pn=x.forwardRef(({className:e,...t},n)=>i.jsx(Gf,{ref:n,className:ie("text-lg font-semibold leading-none tracking-tight",e),...t}));Pn.displayName=Gf.displayName;const bi=x.forwardRef(({className:e,...t},n)=>i.jsx(Wf,{ref:n,className:ie("text-sm text-muted-foreground",e),...t}));bi.displayName=Wf.displayName;function hB({children:e}){const{client:t}=zf(),n=U5(),{toast:a}=pn(),[o,c]=x.useState(!1),[d,f]=x.useState(""),[h,p]=x.useState(""),[y,v]=x.useState(""),b=G5({mutation:{onSuccess:()=>{a({title:"Password changed successfully"}),c(!1),f(""),p(""),v("")},onError:w=>{const C=w.status===401?"Your current password is incorrect.":"Could not change your password. Please try again.";a({title:C,variant:"destructive"})}}});async function S(){try{await n.mutateAsync()}finally{window.location.href="/client-login"}}if(!t)return i.jsx(i.Fragment,{children:e});function E(w){if(w.preventDefault(),h.length<8){a({title:"New password must be at least 8 characters.",variant:"destructive"});return}if(h!==y){a({title:"New passwords do not match.",variant:"destructive"});return}b.mutate({data:{currentPassword:d,newPassword:h}})}return i.jsxs("div",{className:"min-h-[100dvh] w-full bg-background flex flex-col",children:[i.jsxs("header",{className:"h-16 border-b border-border bg-card flex items-center px-4 md:px-8 justify-between shrink-0",children:[i.jsxs("div",{className:"font-display font-bold tracking-tight text-lg flex items-center gap-2 text-[#111827]",children:[i.jsx("img",{src:Go,alt:"The Growth Shark",className:"w-8 h-8 rounded-lg"}),"The Growth Shark"]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"text-right hidden sm:block",children:[i.jsx("p",{className:"text-sm font-bold text-[#111827] leading-tight",children:t.name}),i.jsx("p",{className:"text-xs text-[#9CA3AF] leading-tight",children:t.email})]}),i.jsx("button",{onClick:()=>c(!0),className:"p-2 text-[#9CA3AF] hover:bg-accent hover:text-[#004AAC] rounded-md transition-colors","aria-label":"Change password",title:"Change password",children:i.jsx(nC,{className:"w-5 h-5"})}),i.jsx("button",{onClick:S,className:"p-2 text-[#9CA3AF] hover:bg-accent hover:text-destructive rounded-md transition-colors","aria-label":"Log out",children:i.jsx(pg,{className:"w-5 h-5"})})]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:e}),i.jsx(Vn,{open:o,onOpenChange:c,children:i.jsxs(Rn,{children:[i.jsxs(Fn,{children:[i.jsx(Pn,{children:"Change password"}),i.jsx(bi,{children:"Enter your current password, then choose a new password with at least 8 characters."})]}),i.jsxs("form",{onSubmit:E,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(jt,{htmlFor:"current-password",children:"Current password"}),i.jsx(ze,{id:"current-password",type:"password",autoComplete:"current-password",value:d,onChange:w=>f(w.target.value),required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(jt,{htmlFor:"new-password",children:"New password"}),i.jsx(ze,{id:"new-password",type:"password",autoComplete:"new-password",value:h,onChange:w=>p(w.target.value),minLength:8,required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(jt,{htmlFor:"confirm-password",children:"Confirm new password"}),i.jsx(ze,{id:"confirm-password",type:"password",autoComplete:"new-password",value:y,onChange:w=>v(w.target.value),minLength:8,required:!0})]}),i.jsxs(DS,{children:[i.jsx(ve,{type:"button",variant:"outline",onClick:()=>c(!1),children:"Cancel"}),i.jsx(ve,{type:"submit",disabled:b.isPending,children:b.isPending?"Changingâ¦":"Change password"})]})]})]})})]})}function pB(){return i.jsxs("div",{className:"min-h-[100dvh] bg-[#F8F9FB] flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-20",style:{backgroundImage:"radial-gradient(#00CEA6 1px, transparent 1px)",backgroundSize:"32px 32px"}}),i.jsxs("div",{className:"w-full max-w-lg relative z-10 text-center",children:[i.jsxs("div",{className:"flex flex-col items-center mb-10",children:[i.jsx("img",{src:Go,alt:"The Growth Shark",className:"w-16 h-16 rounded-2xl mb-4 shadow-lg shadow-[#00CEA6]/20"}),i.jsx("h1",{className:"text-3xl font-display font-bold text-[#111827] tracking-tight",children:"The Growth Shark"}),i.jsx("p",{className:"text-[#9CA3AF] mt-2 font-bold uppercase tracking-wider text-sm",children:"Choose how you'd like to sign in"})]}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsx(xs,{href:"/admin-login-hasgduh73265s",children:i.jsxs("div",{className:"cursor-pointer bg-white border border-[#
49E9EBF0] rounded-2xl shadow-[0_8px_30px_rgb(0,0,0,0.04)] p-8 flex flex-col items-center gap-3 hover:border-[#00CEA6] transition-colors h-full",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#F8F9FB] flex items-center justify-center",children:i.jsx(bx,{className:"w-6 h-6 text-[#004AAC]"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-bold text-[#111827]",children:"Admin Login"}),i.jsx("p",{className:"text-sm text-[#9CA3AF] mt-1",children:"Growth Shark team members"})]})]})}),i.jsx(xs,{href:"/client-login",children:i.jsxs("div",{className:"cursor-pointer bg-white border border-[#E9EBF0] rounded-2xl shadow-[0_8px_30px_rgb(0,0,0,0.04)] p-8 flex flex-col items-center gap-3 hover:border-[#00CEA6] transition-colors h-full",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#F8F9FB] flex items-center justify-center",children:i.jsx(yi,{className:"w-6 h-6 text-[#00CEA6]"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-bold text-[#111827]",children:"Client Login"}),i.jsx("p",{className:"text-sm text-[#9CA3AF] mt-1",children:"Review and approve your content"})]})]})})]})]})]})}var Jc=e=>e.type==="checkbox",wr=e=>e instanceof Date,On=e=>e==null;const Qx=e=>typeof e=="object";var Vt=e=>!On(e)&&!Array.isArray(e)&&Qx(e)&&!wr(e),kg=e=>Vt(e)&&e.target?Jc(e.target)?e.target.checked:e.target.value:e,RS=(e,t)=>t.split(".").some((n,a,o)=>!isNaN(Number(n))&&e.has(o.slice(0,a).join("."))),FS=e=>{const t=e.constructor&&e.constructor.prototype;return Vt(t)&&t.hasOwnProperty("isPrototypeOf")},Zf=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Zt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Zf&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Vt(e)&&FS(e)))return e;const a=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=Zt(e[o]));return a}const vr={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Is={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Us={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},PS="root",Zx=["__proto__","constructor","prototype"],gB=/^\w*$/;var eu=e=>gB.test(e),qt=e=>e===void 0;const xB=/[.[\]'"]/;var Xf=e=>e.split(xB).filter(Boolean),we=(e,t,n)=>{if(!t||!Vt(e))return n;const a=eu(t)?[t]:Xf(t);if(a.some(c=>Zx.includes(c)))return n;const o=a.reduce((c,d)=>On(c)?void 0:c[d],e);return qt(o)||o===e?qt(e[t])?n:e[t]:o},hs=e=>typeof e=="boolean",In=e=>typeof e=="function",Ct=(e,t,n)=>{let a=-1;const o=eu(t)?[t]:Xf(t),c=o.length,d=c-1;for(;++a<c;){const f=o[a];let h=n;if(a!==d){const p=e[f];h=Vt(p)||Array.isArray(p)?p:isNaN(+o[a+1])?{}:[]}if(Zx.includes(f))return;e[f]=h,e=e[f]}};const Xx=re.createContext(null);Xx.displayName="HookFormControlContext";const Jx=()=>re.useContext(Xx);var BS=(e,t,n,a=!0)=>{const o={};for(const c in e)Object.defineProperty(o,c,{get:()=>{const d=c;return t._proxyFormState[d]!==Is.all&&(t._proxyFormState[d]=!a||Is.all),n&&(n[d]=!0),e[d]}});return o};const ey=Zf?re.useLayoutEffect:re.useEffect;function yB(e){const t=Jx(),{control:n=t,disabled:a,name:o,exact:c}=e||{},[d,f]=re.useState(()=>({...n._formState,defaultValues:n._defaultValues})),h=re.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return ey(()=>n._subscribe({name:o,formState:h.current,exact:c,callback:p=>{!a&&f({...n._formState,...p,defaultValues:n._defaultValues})}}),[o,a,c]),re.useEffect(()=>{h.current.isValid&&n._setValid(!0)},[n]),re.useMemo(()=>BS(d,n,h.current,!1),[d,n])}var $n=e=>typeof e=="string",Tg=(e,t,n,a,o)=>$n(e)?(a&&t.watch.add(e),we(n,e,o)):Array.isArray(e)?e.map(c=>(a&&t.watch.add(c),we(n,c))):(a&&(t.watchAll=!0),n),Mg=e=>On(e)||!Qx(e);const Gw=(e,t)=>t.length===0&&!Array.isArray(e)&&!FS(e);function ps(e,t,n=new WeakMap){if(e===t)return!0;if(Mg(e)||Mg(t))return Object.is(e,t);if(wr(e)&&wr(t))return Object.is(e.getTime(),t.getTime());const a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;if(Gw(e,a)||Gw(t,o))return Object.is(e,t);if(!a.length&&Array.isArray(e)!==Array.isArray(t))return!1;const c=n.get(e);if(c&&c.has(t))return!0;
49if(c)c.add(t);else{const d=new WeakSet;d.add(t),n.set(e,d)}for(const d of a){const f=e[d];if(!(d in t))return!1;if(d!=="ref"){const h=t[d];if(wr(f)&&wr(h)||(Vt(f)||Array.isArray(f))&&(Vt(h)||Array.isArray(h))?!ps(f,h,n):!Object.is(f,h))return!1}}return!0}function vB(e){const t=Jx(),{control:n=t,name:a,defaultValue:o,disabled:c,exact:d,compute:f}=e||{},h=re.useRef(o),p=re.useRef(f),y=re.useRef(void 0),v=re.useRef(n),b=re.useRef(a);p.current=f;const[S,E]=re.useState(()=>{const R=n._getWatch(a,h.current);return p.current?p.current(R):R}),w=re.useCallback(R=>{const T=Tg(a,n._names,R||n._formValues,!1,h.current);return p.current?p.current(T):T},[n._formValues,n._names,a]),C=re.useCallback(R=>{if(!c){const T=Tg(a,n._names,R||n._formValues,!1,h.current);if(p.current){const D=p.current(T);ps(D,y.current)||(E(D),y.current=D)}else E(T)}},[n._formValues,n._names,c,a]);ey(()=>((v.current!==n||!ps(b.current,a))&&(v.current=n,b.current=a,C()),n._subscribe({name:a,formState:{values:!0},exact:d,callback:R=>{C(R.values)}})),[n,d,a,C]),re.useEffect(()=>n._removeUnmounted());const A=v.current!==n,j=b.current,M=re.useMemo(()=>{if(c)return null;const R=!A&&!ps(j,a);return A||R?w():null},[c,A,a,j,w]);return M!==null?M:S}function bB(e){const t=Jx(),{name:n,disabled:a,control:o=t,shouldUnregister:c,defaultValue:d,exact:f=!0}=e,h=RS(o._names.array,n),p=re.useMemo(()=>we(o._formValues,n,we(o._defaultValues,n,d)),[o,n,d]),y=vB({control:o,name:n,defaultValue:p,exact:f}),v=yB({control:o,name:n,exact:f}),b=re.useRef(e),S=re.useRef(null),E=re.useRef(o.register(n,{...e.rules,value:y,...hs(e.disabled)?{disabled:e.disabled}:{}}));b.current=e;const w=re.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(v.errors,n)},isDirty:{enumerable:!0,get:()=>!!we(v.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!we(v.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!we(v.validatingFields,n)},error:{enumerable:!0,get:()=>we(v.errors,n)}}),[v,n]),C=re.useCallback(R=>{const T=kg(R);return we(o._fields,n)||(E.current=o.register(n,{...b.current.rules,value:T})),E.current.onChange({target:{value:kg(R),name:n},type:vr.CHANGE})},[n,o]),A=re.useCallback(()=>E.current.onBlur({target:{value:we(o._formValues,n),name:n},type:vr.BLUR}),[n,o._formValues]),j=re.useCallback(R=>{R&&(S.current={focus:()=>In(R.focus)&&R.focus(),select:()=>In(R.select)&&R.select(),setCustomValidity:D=>In(R.setCustomValidity)&&R.setCustomValidity(D),reportValidity:()=>In(R.reportValidity)&&R.reportValidity()});const T=we(o._fields,n);T&&T._f&&R&&(T._f.ref=S.current)},[o._fields,n]),M=re.useMemo(()=>({name:n,value:y,...hs(a)||v.disabled?{disabled:v.disabled||a}:{},onChange:C,onBlur:A,ref:j}),[n,a,v.disabled,C,A,j,y]);return re.useEffect(()=>{const R=o._options.shouldUnregister||c;o.register(n,{...b.current.rules,...hs(b.current.disabled)?{disabled:b.current.disabled}:{}});const T=(D,F)=>{const k=we(o._fields,D);k&&k._f&&(k._f.mount=F)};if(T(n,!0),R){const D=Zt(we(c?o._defaultValues:o._options.values||o._defaultValues,n,we(o._options.defaultValues,n,b.current.defaultValue)));Ct(o._defaultValues,n,D),qt(we(o._formValues,n))&&Ct(o._formValues,n,D)}if(!h&&o.register(n),S.current){const D=we(o._fields,n);D&&D._f&&(D._f.ref=S.current)}return()=>{(h?R&&!o._state.action:R)?o.unregister(n):T(n,!1)}},[n,o,h,c]),re.useEffect(()=>{o._setDisabledField({disabled:a,name:n})},[a,n,o]),re.useMemo(()=>({field:M,formState:v,fieldState:w}),[M,v,w])}const wB=e=>e.render(bB(e)),qS=e=>{const t={};for(const n of Object.keys(e))if(Qx(e[n])&&e[n]!==null&&!wr(e[n])){const a=qS(e[n]);for(const o of Object.keys(a))t[`${n}.${o}`]=a[o]}else t[n]=e[n];return t},ty=re.createContext(null);ty.displayName="HookFormContext";const jB=()=>re.useContext(ty),NB=({children:e,watch:t,getValues:n,getFieldState:a,setError:o,clearErrors:c,setValue:d,setValues:f,trigger:h,formState:p,resetField:y,reset:v,handleSubmit:b,unregister:S,control:E,register:w,setFocus:C,subscribe:A})=>{const j=re.useMemo(()=>({watch:t,getValues:n,getFieldState:a,setError:o,clearErrors:c,setValue:d,setValues:f,trigger:h,formState:p,resetField:y,reset:v,handleSubmit:b,unregister:S,control:E,register:w,setFocus:C,subscribe:A}),[c,E,p,a,n,b,w,v,y,o,C,d,f,A,h,S,t]);return re.createElement(ty.Provider,{value:j},re.createElement(Xx.Provider,{value:j.control},e))};var LS=(e,t,n,a,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:o||!0}}:{},US=e=>Array.isArray(e)?e.filter(Boolean):[],Qd=e=>Array.isArray(e)?e:[e],Ww=()=>{let e=[];return{get observers(){return e},next:o=>{for(const c of e)c.next&&c.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(c=>c!==o)}}),unsubscribe:()=>{e=[]}}};function zS(e,t){const n={};for(const a in e)if(e.hasOwnProperty(a)){const o=e[a],c=t[a];if(o&&Vt(o)&&c){const d=zS(o,c);Vt(d)&&(n[a]=d)}else e[a]&&(n[a]=c)}return n}var Mn=e=>Vt(e)&&!Object.keys(e).length,ny=e=>e.type==="file",cf=e=>{if(!Zf)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},IS=e=>e.type==="select-multiple",sy=e=>e.type==="radio",CB=e=>sy(e)||Jc(e),Vp=e=>cf(e)&&e.isConnected;function SB(e,t){const n=t.slice(0,-1).length;let a=0;for(;a<n;){if(On(e)){e=void 0;break}e=e[t[a]],a++}return e}function EB(e){for(const t in e)if(e.hasOwnProperty(t)&&!qt(e[t]))return!1;return!0}function fn(e,t){if($n(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:eu(t)?[t]:Xf(t);if(n.some(d=>Zx.includes(String(d))))return e;
49const a=n.length===1?e:SB(e,n),o=n.length-1,c=n[o];return a&&delete a[c],o!==0&&(Vt(a)&&Mn(a)||Array.isArray(a)&&EB(a))&&fn(e,n.slice(0,-1)),e}var AB=e=>{for(const t in e)if(In(e[t]))return!0;return!1};function $S(e){return Array.isArray(e)||Vt(e)&&!AB(e)}function Og(e,t={}){for(const n in e){const a=e[n];$S(a)?(t[n]=Array.isArray(a)?[]:{},Og(a,t[n])):qt(a)||(t[n]=!0)}return t}function Dg(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>Dg(n));return t.some(n=>n!==void 0)?t:void 0}if(Vt(e)){const t={};for(const n in e){const a=Dg(e[n]);qt(a)||(t[n]=a)}return Object.keys(t).length?t:void 0}}}function ui(e,t,n){n||(n=Og(t));for(const a in e){const o=e[a];if($S(o))qt(t)||Mg(n[a])?n[a]=Og(o,Array.isArray(o)?[]:{}):ui(o,On(t)?{}:t[a],n[a]);else{const c=t[a];n[a]=!ps(o,c)}}return Dg(n)||{}}const Qw={value:!1,isValid:!1},Zw={value:!0,isValid:!0};var VS=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!qt(e[0].attributes.value)?qt(e[0].value)||e[0].value===""?Zw:{value:e[0].value,isValid:!0}:Zw:Qw}return Qw},HS=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>qt(e)?e:t?e===""?NaN:e&&+e:n&&$n(e)?new Date(e):a?a(e):e;const Xw={isValid:!1,value:null};var YS=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Xw):Xw;function Jw(e){const t=e.ref;return ny(t)?t.files:sy(t)?YS(e.refs).value:IS(t)?[...t.selectedOptions].map(({value:n})=>n):Jc(t)?VS(e.refs).value:HS(qt(t.value)?e.ref.value:t.value,e)}var _B=(e,t,n,a)=>{const o={};for(const c of e){const d=we(t,c);d&&Ct(o,c,d._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:a}},uf=e=>e instanceof RegExp,fc=e=>qt(e)?e:uf(e)?e.source:Vt(e)?uf(e.value)?e.value.source:e.value:e,Ld=e=>({isOnSubmit:!e||e===Is.onSubmit,isOnBlur:e===Is.onBlur,isOnChange:e===Is.onChange,isOnAll:e===Is.all,isOnTouch:e===Is.onTouched});const ej="AsyncFunction";var kB=e=>{if(!e||!e.validate)return!1;if(In(e.validate))return e.validate.constructor.name===ej;if(Vt(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===ej)return!0}return!1},TB=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Hp=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const a of t.watch)if(e.startsWith(a)&&e.charAt(a.length)===".")return!0;return!1};const Ec=(e,t,n,a)=>{for(const o of n||Object.keys(e)){const c=we(e,o);if(c){const{_f:d,...f}=c;if(d){if(d.refs&&d.refs[0]&&t(d.refs[0],o)&&!a)return!0;if(d.ref&&t(d.ref,d.name)&&!a)return!0;if(Ec(f,t))break}else if(Vt(f)&&Ec(f,t))break}}};function tj(e,t,n){const a=we(e,n);if(a||eu(n))return{error:a,name:n};const o=n.split(".");for(;o.length;){const c=o.join("."),d=we(t,c),f=we(e,c);if(d&&!Array.isArray(d)&&n!==c)return{name:n};if(f&&f.type)return{name:c,error:f};if(f&&f.root&&f.root.type)return{name:`${c}.root`,error:f.root};o.pop()}return{name:n}}var MB=(e,t,n,a)=>{n(e);const{name:o,...c}=e,d=Object.keys(c);return!d.length||a&&d.length>=Object.keys(t).length||d.find(f=>t[f]===(!a||Is.all))},OB=(e,t,n)=>!e||!t||e===t||Qd(e).some(a=>a&&(n?a===t||a.startsWith(t+"."):a.startsWith(t)||t.startsWith(a))),DB=(e,t,n,a,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?a.isOnBlur:o.isOnBlur)?!e:(n?a.isOnChange:o.isOnChange)?e:!0,RB=(e,t)=>!US(we(e,t)).length&&fn(e,t),nj=(e,t,n)=>{const a=we(e,n),o=Array.isArray(a)?a:[];return Ct(o,PS,t[n]),Ct(e,n,o),e};function sj(e,t,n="validate"){if($n(e)||Array.isArray(e)&&e.every($n)||hs(e)&&!e)return{type:n,message:$n(e)?e:"",ref:t}}var Ro=e=>Vt(e)&&!uf(e)?e:{value:e,message:""},aj=async(e,t,n,a,o,c)=>{const{ref:d,refs:f,required:h,maxLength:p,minLength:y,min:v,max:b,pattern:S,validate:E,name:w,valueAsNumber:C,mount:A}=e._f,j=we(n,w);if(!A||t.has(w))return{};const M=f?f[0]:d,R=Y=>{if(o&&M.reportValidity){const ne=hs(Y)?"":Y||"";f?f.forEach(Z=>Z.setCustomValidity(ne)):M.setCustomValidity(ne),M.reportValidity()}},T={},D=sy(d),F=Jc(d),k=D||F,z=(C||ny(d))&&qt(d.value)&&qt(j)||cf(d)&&d.value===""||j===""||Array.isArray(j)&&!j.length,X=LS.bind(null,w,a,T),q=(Y,ne,Z,me=Us.maxLength,L=Us.minLength)=>{const J=Y?ne:Z;T[w]={type:Y?me:L,message:J,ref:d,...X(Y?me:L,J)}};
49if(c?!Array.isArray(j)||!j.length:h&&(!k&&(z||On(j))||hs(j)&&!j||F&&!VS(f).isValid||D&&!YS(f).isValid)){const{value:Y,message:ne}=$n(h)?{value:!!h,message:h}:Ro(h);if(Y&&(T[w]={type:Us.required,message:ne,ref:M,...X(Us.required,ne)},!a))return R(ne),T}if(!z&&(!On(v)||!On(b))){let Y,ne;const Z=Ro(b),me=Ro(v);if(!On(j)&&!isNaN(j)){const L=d.valueAsNumber||j&&+j;On(Z.value)||(Y=L>Z.value),On(me.value)||(ne=L<me.value)}else{const L=d.valueAsDate||new Date(j),J=O=>new Date(new Date().toDateString()+" "+O),ee=d.type=="time",te=d.type=="week";$n(Z.value)&&j&&(Y=ee?J(j)>J(Z.value):te?j>Z.value:L>new Date(Z.value)),$n(me.value)&&j&&(ne=ee?J(j)<J(me.value):te?j<me.value:L<new Date(me.value))}if((Y||ne)&&(q(!!Y,Z.message,me.message,Us.max,Us.min),!a))return R(T[w].message),T}if((p||y)&&!z&&($n(j)||c&&Array.isArray(j))){const Y=Ro(p),ne=Ro(y),Z=!On(Y.value)&&j.length>+Y.value,me=!On(ne.value)&&j.length<+ne.value;if((Z||me)&&(q(Z,Y.message,ne.message),!a))return R(T[w].message),T}if(S&&!z&&$n(j)){const{value:Y,message:ne}=Ro(S);if(uf(Y)&&!j.match(Y)&&(T[w]={type:Us.pattern,message:ne,ref:d,...X(Us.pattern,ne)},!a))return R(ne),T}if(E){if(In(E)){const Y=await E(j,n),ne=sj(Y,M);if(ne&&(T[w]={...ne,...X(Us.validate,ne.message)},!a))return R(ne.message),T}else if(Vt(E)){let Y={};for(const ne in E){if(!Mn(Y)&&!a)break;const Z=sj(await E[ne](j,n),M,ne);Z&&(Y={...Z,...X(ne,Z.message)},R(Z.message),a&&(T[w]=Y))}if(!Mn(Y)&&(T[w]={ref:M,...Y},!a))return T}}return R(!0),T};const FB={mode:Is.onSubmit,reValidateMode:Is.onChange,shouldFocusError:!0},Yp="form",KS={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function PB(e={}){let t={...FB,...e},n={...Zt(KS),isLoading:In(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},a={},o=Vt(t.defaultValues)||Vt(t.values)?Zt(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:Zt(o),d={action:!1,mount:!1,watch:!1,keepIsValid:!1},f={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},h,p=0,y=0,v=Ld(t.mode),b=Ld(t.reValidateMode);const S={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={...S};let w={...E};const C={array:Ww(),state:Ww()},A=t.criteriaMode===Is.all,j=P=>I=>{clearTimeout(p),p=setTimeout(P,I)},M=async P=>{if(!d.keepIsValid&&!t.disabled&&(E.isValid||w.isValid||P)){let I;t.resolver?(I=Mn((await ne()).errors),R()):I=await L({fields:a,onlyCheckValid:!0,eventType:vr.VALID}),I!==n.isValid&&C.state.next({isValid:I})}},R=(P,I)=>{!t.disabled&&(E.isValidating||E.validatingFields||w.isValidating||w.validatingFields)&&((P||Array.from(f.mount)).forEach(V=>{V&&(I?Ct(n.validatingFields,V,I):fn(n.validatingFields,V))}),C.state.next({validatingFields:n.validatingFields,isValidating:!Mn(n.validatingFields)}))},T=()=>{n.dirtyFields=ui(o,c)},D=(P,I=[],V,de,fe=!0,je=!0)=>{if(de&&V&&!t.disabled){if(d.action=!0,je&&Array.isArray(we(a,P))){const pe=V(we(a,P),de.argA,de.argB);fe&&Ct(a,P,pe)}if(je&&Array.isArray(we(n.errors,P))){const pe=V(we(n.errors,P),de.argA,de.argB);fe&&Ct(n.errors,P,pe),RB(n.errors,P)}if((E.touchedFields||w.touchedFields)&&je&&Array.isArray(we(n.touchedFields,P))){const pe=V(we(n.touchedFields,P),de.argA,de.argB);fe&&Ct(n.touchedFields,P,pe)}(E.dirtyFields||w.dirtyFields)&&T(),C.state.next({name:P,isDirty:ee(P,I),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ct(c,P,I)},F=(P,I)=>{Ct(n.errors,P,I),n.errors={...n.errors},C.state.next({errors:n.errors})},k=P=>{n.errors=P,C.state.next({errors:n.errors,isValid:!1})},z=P=>{const I=eu(P)?[P]:Xf(P);let V=c,de=o;for(let fe=0;fe<I.length-1;fe++){const je=I[fe];if(V=On(V)?V:V[je],de=On(de)?de:de[je],V===null&&de!==null)return!0}return!1},X=(P,I,V,de)=>{const fe=we(a,P);if(fe){if(z(P))return;const je=qt(we(c,P)),pe=we(c,P,qt(V)?we(o,P):V);qt(pe)||de&&de.defaultChecked||I?Ct(c,P,I?pe:Jw(fe._f)):W(P,pe),d.mount&&!d.action&&(M(),je&&n.isDirty&&(E.isDirty||w.isDirty)&&(ee()||(n.isDirty=!1,C.state.next({...n}))),e.shouldUnregister&&je&&!qt(we(c,P))&&Hp(P,f)&&(d.watch=!0))}},q=(P,I,V,de,fe)=>{let je=!1,pe=!1;const Ne={name:P};if(!t.disabled){if(!V||de){const He=ps(we(o,P),I);
49(E.isDirty||w.isDirty)&&(pe=n.isDirty,n.isDirty=Ne.isDirty=!He||ee(),je=pe!==Ne.isDirty),pe=!!we(n.dirtyFields,P),He!==n.isDirty?n.dirtyFields=ui(o,c):He?fn(n.dirtyFields,P):Ct(n.dirtyFields,P,!0),Ne.dirtyFields=n.dirtyFields,je=je||(E.dirtyFields||w.dirtyFields)&&pe!==!He}if(V){const He=we(n.touchedFields,P);He||(Ct(n.touchedFields,P,V),Ne.touchedFields=n.touchedFields,je=je||(E.touchedFields||w.touchedFields)&&He!==V)}je&&fe&&C.state.next(Ne)}return je?Ne:{}},Y=(P,I,V,de)=>{const fe=we(n.errors,P),je=(E.isValid||w.isValid)&&hs(I)&&n.isValid!==I;if(t.delayError&&V?(h=j(()=>F(P,V)),h(t.delayError)):(clearTimeout(p),h=null,V?Ct(n.errors,P,V):fn(n.errors,P),n.errors={...n.errors}),(V?!ps(fe,V):fe)||!Mn(de)||je){const pe={...de,...je&&hs(I)?{isValid:I}:{},errors:n.errors,name:P};n={...n,...pe},C.state.next(pe)}},ne=async P=>(R(P,!0),await t.resolver(c,t.context,_B(P||f.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),Z=async P=>{const{errors:I}=await ne(P);if(R(P),P){for(const V of P){const de=we(I,V);de?f.array.has(V)&&Vt(de)&&!Object.keys(de).some(fe=>!Number.isNaN(Number(fe)))?nj(n.errors,{[V]:de},V):Ct(n.errors,V,de):fn(n.errors,V)}n.errors={...n.errors}}else n.errors=I;return I},me=async({name:P,eventType:I})=>{if(e.validate){const V=await e.validate({formValues:c,formState:n,name:P,eventType:I});if(Vt(V))for(const de in V){const fe=V[de];fe&&ot(`${Yp}.${de}`,{message:$n(fe.message)?fe.message:"",type:fe.type||Us.validate})}else $n(V)||!V?ot(Yp,{message:V||"",type:Us.validate}):Pe(Yp);return V}return!0},L=async({fields:P,onlyCheckValid:I,name:V,eventType:de,context:fe={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(fe.runRootValidation=!0,!await me({name:V,eventType:de})&&(fe.valid=!1,I)))return fe.valid;for(const je in P){const pe=P[je];if(pe){const{_f:Ne,...He}=pe;if(Ne){const _e=f.array.has(Ne.name),Ke=pe._f&&kB(pe._f),qe=E.validatingFields||E.isValidating||w.validatingFields||w.isValidating;Ke&&qe&&R([Ne.name],!0);const Ge=await aj(pe,f.disabled,c,A,t.shouldUseNativeValidation&&!I,_e);if(Ke&&qe&&R([Ne.name]),Ge[Ne.name]&&(fe.valid=!1,I)||(!I&&(we(Ge,Ne.name)?_e?nj(n.errors,Ge,Ne.name):Ct(n.errors,Ne.name,Ge[Ne.name]):fn(n.errors,Ne.name)),e.shouldUseNativeValidation&&Ge[Ne.name]))break}!Mn(He)&&await L({context:fe,onlyCheckValid:I,fields:He,name:je,eventType:de})}}return fe.valid},J=()=>{for(const P of f.unMount){const I=we(a,P);I&&(I._f.refs?I._f.refs.every(V=>!Vp(V)):!Vp(I._f.ref))&&gn(P)}f.unMount=new Set},ee=(P,I)=>!t.disabled&&(P&&I&&Ct(c,P,I),!ps(d.mount?c:o,o)),te=(P,I,V)=>Tg(P,f,{...d.mount?c:qt(I)?o:$n(P)?{[P]:I}:I},V,I),O=P=>US(we(d.mount?c:o,P,t.shouldUnregister?we(o,P,[]):[])),W=(P,I,V={},de=!1,fe=!1)=>{const je=we(a,P);let pe=I;if(je){const Ne=je._f;Ne&&(!Ne.disabled&&Ct(c,P,HS(I,Ne)),pe=cf(Ne.ref)&&On(I)?"":I,IS(Ne.ref)?[...Ne.ref.options].forEach(He=>He.selected=pe.includes(He.value)):Ne.refs?Jc(Ne.ref)?Ne.refs.forEach(He=>{(!He.defaultChecked||!He.disabled)&&(Array.isArray(pe)?He.checked=!!pe.find(_e=>_e===He.value):He.checked=pe===He.value||!!pe)}):Ne.refs.forEach(He=>He.checked=He.value===pe):ny(Ne.ref)?Ne.ref.value="":(Ne.ref.value=pe,!Ne.ref.type&&!fe&&C.state.next({name:P,values:de?c:Zt(c)})))}(V.shouldDirty||V.shouldTouch)&&q(P,pe,V.shouldTouch,V.shouldDirty,!fe),V.shouldValidate&&Te(P)},ue=(P,I,V,de=!1,fe=!1)=>{for(const je in I){if(!I.hasOwnProperty(je))return;const pe=I[je],Ne=P+"."+je,He=we(a,Ne);(f.array.has(P)||Vt(pe)||He&&!He._f)&&!wr(pe)?ue(Ne,pe,V,de,fe):W(Ne,pe,V,de,fe)}},ce=(P,I,V,de,fe=!1)=>{const je=we(a,P),pe=f.array.has(P),Ne=de?I:Zt(I),He=we(c,P),_e=ps(He,Ne);if(_e||Ct(c,P,Ne),pe)C.array.next({name:P,values:de?c:Zt(c)}),(E.isDirty||E.dirtyFields||w.isDirty||w.dirtyFields)&&V.shouldDirty&&(T(),fe||C.state.next({name:P,dirtyFields:n.dirtyFields,isDirty:ee(P,Ne)}));else{const Ke=Array.isArray(Ne)&&!Ne.length||Mn(Ne);!je||je._f||On(Ne)||Ke?W(P,Ne,V,de,fe):ue(P,Ne,V,de,fe)}if(!_e&&!fe){const Ke=Hp(P,f),qe=de?c:Zt(c);C.state.next({...Ke&&n,name:d.mount||Ke?P:void 0,values:qe})}},ye=(P,I,V={})=>ce(P,I,V,!1),Ee=(P,I={})=>{const V=In(P)?P(c):P;if(!ps(c,V)){c={...c,...V};const de=qS(V);for(const fe of f.mount)fe in de&&ce(fe,de[fe],I,!0,!0);C.state.next({...n,name:void 0,type:void 0,...y?{values:c}:{}}),I.shouldValidate&&M()}},xe=async P=>{d.mount=!0;const I=P.target;let V=I.name,de=!0;const fe=we(a,V),je=pe=>{de=Number.isNaN(pe)||wr(pe)&&isNaN(pe.getTime())||ps(pe,we(c,V,pe))};if(fe){let pe,Ne;const He=I.type?Jw(fe._f):kg(P),_e=P.type===vr.BLUR||P.type===vr.FOCUS_OUT,Ke=!TB(fe._f)&&!e.validate&&!t.resolver&&!we(n.errors,V)&&!fe._f.deps,qe=Ke||DB(_e,we(n.touchedFields,V),n.isSubmitted,b,v),Ge=Hp(V,f,_e);
49Ct(c,V,He),_e?(!I||!I.readOnly)&&(fe._f.onBlur&&fe._f.onBlur(P),h&&h(0)):fe._f.onChange&&fe._f.onChange(P);const nn=q(V,He,_e),st=!Mn(nn)||Ge;if(!_e&&C.state.next({name:V,type:P.type,...y?{values:Zt(c)}:{}}),qe)return(!Ke||!n.isValid)&&(E.isValid||w.isValid)&&(t.mode==="onBlur"?_e&&M():_e||M()),st&&C.state.next({name:V,...Ge?{}:nn});if(!t.resolver&&e.validate&&await me({name:V,eventType:P.type}),!_e&&Ge&&C.state.next({...n}),t.resolver){const{errors:Ir}=await ne([V]);if(R([V]),je(He),!de){!Mn(nn)&&C.state.next(nn);return}const $r=tj(n.errors,a,V),Ha=tj(Ir,a,$r.name||V);pe=Ha.error,V=Ha.name,Ne=Mn(Ir)}else R([V],!0),pe=(await aj(fe,f.disabled,c,A,t.shouldUseNativeValidation))[V],R([V]),je(He),de&&(pe?Ne=!1:(E.isValid||w.isValid)&&(Ne=await L({fields:a,onlyCheckValid:!0,name:V,eventType:P.type})));de&&(fe._f.deps&&(!Array.isArray(fe._f.deps)||fe._f.deps.length>0)&&Te(fe._f.deps),Y(V,Ne,pe,nn))}},he=(P,I)=>{if(we(n.errors,I)&&P.focus)return P.focus(),1},Te=async(P,I={})=>{let V,de;const fe=Qd(P);if(t.resolver){const je=await Z(qt(P)?P:fe);V=Mn(je),de=P?!fe.some(pe=>we(je,pe)):V}else P?(de=(await Promise.all(fe.map(async je=>{const pe=we(a,je);return await L({fields:pe&&pe._f?{[je]:pe}:pe,eventType:vr.TRIGGER})}))).every(Boolean),!(!de&&!n.isValid)&&M()):de=V=await L({fields:a,name:P,eventType:vr.TRIGGER});return C.state.next({...!$n(P)||(E.isValid||w.isValid)&&V!==n.isValid?{}:{name:P},...t.resolver||!P?{isValid:V}:{},errors:n.errors}),I.shouldFocus&&!de&&Ec(a,he,P?fe:f.mount),de},le=(P,I)=>{let V={...d.mount?c:o};return I&&(V=zS(I.dirtyFields?n.dirtyFields:n.touchedFields,V)),qt(P)?V:$n(P)?we(V,P):P.map(de=>we(V,de))},Re=(P,I)=>({invalid:!!we((I||n).errors,P),isDirty:!!we((I||n).dirtyFields,P),error:we((I||n).errors,P),isValidating:!!we(n.validatingFields,P),isTouched:!!we((I||n).touchedFields,P)}),Pe=P=>{const I=P?Qd(P):void 0;I?.forEach(V=>fn(n.errors,V)),I?I.forEach(V=>{C.state.next({name:V,errors:n.errors})}):C.state.next({errors:{}})},ot=(P,I,V)=>{const de=(we(a,P,{_f:{}})._f||{}).ref,fe=we(n.errors,P)||{},{ref:je,message:pe,type:Ne,...He}=fe;Ct(n.errors,P,{...He,...I,ref:de}),C.state.next({name:P,errors:n.errors,isValid:!1}),V&&V.shouldFocus&&de&&de.focus&&de.focus()},Lt=(P,I)=>{if(In(P)){y++;const{unsubscribe:V}=C.state.subscribe({next:fe=>"values"in fe&&P(fe.values||te(void 0,I),fe)});let de=!1;return{unsubscribe:()=>{de||(de=!0,y--,V())}}}return te(P,I,!0)},Nt=P=>{var I;const V=!!(!((I=P.formState)===null||I===void 0)&&I.values);V&&y++;const{unsubscribe:de}=C.state.subscribe({next:je=>{if(OB(P.name,je.name,P.exact)&&MB(je,P.formState||E,Pt,P.reRenderRoot)){const pe={...c};P.callback({values:pe,...n,...je,defaultValues:o})}}});if(!V)return de;let fe=!1;return()=>{fe||(fe=!0,y--,de())}},as=P=>(d.mount=!0,w={...w,...P.formState},Nt({...P,formState:{...S,...P.formState}})),gn=(P,I={})=>{for(const V of P?Qd(P):f.mount)f.mount.delete(V),f.array.delete(V),I.keepValue||(fn(a,V),fn(c,V)),!I.keepError&&fn(n.errors,V),!I.keepDirty&&fn(n.dirtyFields,V),!I.keepTouched&&fn(n.touchedFields,V),!I.keepIsValidating&&fn(n.validatingFields,V),!t.shouldUnregister&&!I.keepDefaultValue&&fn(o,V);C.state.next({values:Zt(c)}),C.state.next({...n,...I.keepDirty?{isDirty:ee()}:{}}),!I.keepIsValid&&M()},zt=({disabled:P,name:I})=>{if(hs(P)&&d.mount||P||f.disabled.has(I)){const fe=f.disabled.has(I)!==!!P;P?f.disabled.add(I):f.disabled.delete(I),fe&&d.mount&&!d.action&&M()}},Gs=(P,I={})=>{let V=we(a,P);const de=hs(I.disabled)||hs(t.disabled),fe=!f.registerName.has(P)&&V&&V._f&&!V._f.mount;return Ct(a,P,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:P}},name:P,mount:!0,...I}}),f.mount.add(P),V&&!fe?zt({disabled:hs(I.disabled)?I.disabled:t.disabled,name:P}):X(P,!0,I.value),{...de?{disabled:I.disabled||t.disabled}:{},...t.progressive?{required:!!I.required,min:fc(I.min),max:fc(I.max),minLength:fc(I.minLength),maxLength:fc(I.maxLength),pattern:fc(I.pattern)}:{},name:P,onChange:xe,onBlur:xe,ref:je=>{if(je){f.registerName.add(P),Gs(P,I),f.registerName.delete(P),V=we(a,P);const pe=qt(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,Ne=CB(pe),He=V._f.refs||[];if(Ne?He.find(_e=>_e===pe):pe===V._f.ref)return;Ct(a,P,{_f:{...V._f,...Ne?{refs:[...He.filter(Vp),pe,...Array.isArray(we(o,P))?[{}]:[]],ref:{type:pe.type,name:P}}:{ref:pe}}}),X(P,!1,void 0,pe)}else V=we(a,P,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||I.shouldUnregister)&&!(RS(f.array,P)&&d.action)&&f.unMount.add(P)}}},Ws=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Ec(a,he,f.mount),Va=P=>{hs(P)&&(C.state.next({disabled:P}),Ec(a,(I,V)=>{const de=we(a,V);de&&(I.disabled=de._f.disabled||P,Array.isArray(de._f.refs)&&de._f.refs.forEac
49h(fe=>{fe.disabled=de._f.disabled||P}))},0,!1))},An=(P,I)=>async V=>{let de;V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist());let fe=Zt(c);if(C.state.next({isSubmitting:!0}),t.resolver){const{errors:je,values:pe}=await ne();R(),n.errors=je,fe=Zt(pe)}else await L({fields:a,eventType:vr.SUBMIT});if(f.disabled.size)for(const je of f.disabled)fn(fe,je);if(fn(n.errors,PS),Mn(n.errors)){C.state.next({errors:{}});try{await P(fe,V)}catch(je){de=je}}else I&&await I({...n.errors},V),Ws(),setTimeout(Ws);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Mn(n.errors)&&!de,submitCount:n.submitCount+1,errors:n.errors}),de)throw de},zr=(P,I={})=>{we(a,P)&&(qt(I.defaultValue)?ye(P,Zt(we(o,P))):(ye(P,I.defaultValue),Ct(o,P,Zt(I.defaultValue))),I.keepTouched||fn(n.touchedFields,P),I.keepDirty||(fn(n.dirtyFields,P),n.isDirty=I.defaultValue?ee(P,Zt(we(o,P))):ee()),I.keepError||(fn(n.errors,P),E.isValid&&M()),C.state.next({...n}))},Qs=(P,I={})=>{const V=P?Zt(P):o,de=Zt(V),fe=Mn(P),je=de;if(I.keepDefaultValues||(o=V),!I.keepValues){if(I.keepDirtyValues){const pe=new Set([...f.mount,...Object.keys(ui(o,c))]);for(const Ne of Array.from(pe)){const He=we(n.dirtyFields,Ne),_e=we(c,Ne),Ke=we(je,Ne);He&&!qt(_e)?Ct(je,Ne,_e):!He&&!qt(Ke)&&ye(Ne,Ke)}}else{if(Zf&&qt(P))for(const pe of f.mount){const Ne=we(a,pe);if(Ne&&Ne._f){const He=Array.isArray(Ne._f.refs)?Ne._f.refs[0]:Ne._f.ref;if(cf(He)){const _e=He.closest("form");if(_e){_e.reset();break}}}}if(I.keepFieldsRef)for(const pe of f.mount)ye(pe,we(je,pe));else a={}}if(t.shouldUnregister){if(c=I.keepDefaultValues?Zt(o):{},I.keepFieldsRef)for(const pe of f.mount)Ct(c,pe,we(je,pe))}else c=Zt(je);C.array.next({values:{...je}}),C.state.next({name:void 0,type:void 0,values:{...je}})}f={mount:I.keepDirtyValues?f.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},d.mount=!E.isValid||!!I.keepIsValid||!!I.keepDirtyValues||!t.shouldUnregister&&!Mn(je),d.watch=!!t.shouldUnregister,d.keepIsValid=!!I.keepIsValid,d.action=!1,I.keepErrors||(n.errors={}),C.state.next({submitCount:I.keepSubmitCount?n.submitCount:0,isDirty:fe?!1:I.keepDirty?n.isDirty:I.keepValues?ee():!!(I.keepDefaultValues&&!ps(P,o)),isSubmitted:I.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:fe?{}:I.keepDirtyValues?I.keepDefaultValues&&c?ui(o,c):n.dirtyFields:I.keepDefaultValues&&P?ui(o,P):I.keepDirty?n.dirtyFields:{},touchedFields:I.keepTouched?n.touchedFields:{},errors:I.keepErrors?n.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ce=(P,I)=>Qs(In(P)?P(c):P,{...t.resetOptions,...I}),pt=(P,I={})=>{const V=we(a,P),de=V&&V._f;if(de){const fe=de.refs?de.refs[0]:de.ref;fe.focus&&setTimeout(()=>{fe.focus(),I.shouldSelect&&In(fe.select)&&fe.select()})}},Pt=P=>{const{name:I,type:V,values:de,...fe}=P;n={...n,...fe}},Gt={control:{register:Gs,unregister:gn,getFieldState:Re,handleSubmit:An,setError:ot,_subscribe:Nt,_runSchema:ne,_updateIsValidating:R,_focusError:Ws,_getWatch:te,_getDirty:ee,_setValid:M,_setFieldArray:D,_setDisabledField:zt,_setErrors:k,_getFieldArray:O,_reset:Qs,_resetDefaultValues:()=>In(t.defaultValues)&&t.defaultValues().then(P=>{Ce(P,t.resetOptions),C.state.next({isLoading:!1})}),_removeUnmounted:J,_disableForm:Va,_subjects:C,_proxyFormState:E,get _fields(){return a},get _formValues(){return c},get _state(){return d},set _state(P){d=P},get _defaultValues(){return o},get _names(){return f},set _names(P){f=P},get _formState(){return n},get _options(){return t},set _options(P){t={...t,...P},v=Ld(t.mode),b=Ld(t.reValidateMode)}},subscribe:as,trigger:Te,register:Gs,handleSubmit:An,watch:Lt,setValue:ye,setValues:Ee,getValues:le,reset:Ce,resetField:zr,resetDefaultValues:(P,I={})=>{if(o=Zt(P),!I.keepDirty){const V=ui(o,c);n.dirtyFields=V,n.isDirty=!Mn(V)}I.keepIsValid||M(),C.state.next({...n,defaultValues:o})},clearErrors:Pe,unregister:gn,setError:ot,setFocus:pt,getFieldState:Re};return{...Gt,formControl:Gt}}function wi(e={}){const t=re.useRef(void 0),n=re.useRef(void 0),a=re.useRef(e.formControl),[o,c]=re.useState(()=>({...Zt(KS),isLoading:In(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:In(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&a.current!==e.formControl)if(a.current=e.formControl,e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!In(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:f,...h}=PB(e);t.current={...h,formState:o}}const d=t.current.control;return d._options=e,ey(()=>{const f=d._subscribe({formState:d._proxyFormState,callback:()=>c({...d._formState,defaultValues:d._defaultValues}),reRenderRoot:!0});return c(h=>({...h,isReady:!0})),d._formState.isReady=!0,f},[d]),re.useEffect(()=>d._disableForm(e.disabled),[d,e.disabled]),re.useEffect(()=>{e.mode&&(d._options.mode=e.mode),e.reValidateMode&&(d._options.reValidateMode=e.reValidateMode)},[d,e.mode,e.reValidateMode]),re.useEffect(()=>{e.errors&&(d._setErrors(e.errors),d._focusError())},[d,e.errors]),re.useEffect(()=>{e.shouldUnregister&&d._subjects.state.next({values:d._getWatch()})},[d,e.shouldUnregister]),re.useEffect(()=>{if(d._proxyFormState.isDirty){const f=d._getDirty();f!==o.isDirty&&d._subjects.state.next({isDirty:f})}},[d,o.isDirty]),re.useEffect(()=>{var f;e.values&&!ps(e.values,n.current)?(d._reset(e.values,{keepFieldsRef:!0,...d._options.resetOptions}),!((f=d._options.resetOptions)===null||f===void 0)&&f.keepIsValid||d._setValid(),n.current=e.values,c(h=>({...h}))):d._resetDefaultValues()},[d,e.values]),re.useEffect(()=>{d._state.mount||(d._setValid(),d._state.mount=!0),d._state.watch&&(d._state.watch=!1,d._subjects.state.next({...d._formState})),d._removeUnmounted()}),t.current.formState=re.useMemo(()=>BS(o,d),[d,o]),t.current}const rj=(e,t,n)=>{if(e&&"reportValidity"in e){const a=we(n,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},GS=(e,t)=>{for(const n in t.fields){const a=t.fields[n];a&&a.ref&&"reportValidity"in a.ref?rj(a.ref,n,e):a.refs&&a.refs.forEac
vendor: 3,036 bytes, line 49
49h(o=>rj(o,n,e))}},BB=(e,t)=>{t.shouldUseNativeValidation&&GS(e,t);const n={};for(const a in e){const o=we(t.fields,a),c=Object.assign(e[a]||{},{ref:o&&o.ref});if(qB(t.names||Object.keys(e),a)){const d=Object.assign({},we(n,a));Ct(d,"root",c),Ct(n,a,d)}else Ct(n,a,c)}return n},qB=(e,t)=>e.some(n=>n.startsWith(t+"."));var LB=function(e,t){for(var n={};e.length;){var a=e[0],o=a.code,c=a.message,d=a.path.join(".");if(!n[d])if("unionErrors"in a){var f=a.unionErrors[0].errors[0];n[d]={message:f.message,type:f.code}}else n[d]={message:c,type:o};if("unionErrors"in a&&a.unionErrors.forEach(function(y){return y.errors.forEach(function(v){return e.push(v)})}),t){var h=n[d].types,p=h&&h[a.code];n[d]=LS(d,t,n,o,p?[].concat(p,a.message):a.message)}e.shift()}return n},ji=function(e,t,n){return n===void 0&&(n={}),function(a,o,c){try{return Promise.resolve((function(d,f){try{var h=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(p){return c.shouldUseNativeValidation&&GS({},c),{errors:{},values:n.raw?a:p}})}catch(p){return f(p)}return h&&h.then?h.then(void 0,f):h})(0,function(d){if((function(f){return Array.isArray(f?.errors)})(d))return{values:{},errors:BB(LB(d.errors,!c.shouldUseNativeValidation&&c.criteriaMode==="all"),c)};throw d}))}catch(d){return Promise.reject(d)}}},vt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const c={};for(const d of o)c[d]=d;return c},e.getValidEnumValues=o=>{const c=e.objectKeys(o).filter(f=>typeof o[o[f]]!="number"),d={};for(const f of c)d[f]=o[f];return e.objectValues(d)},e.objectValues=o=>e.objectKeys(o).map(function(c){return o[c]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const c=[];for(const d in o)Object.prototype.hasOwnProperty.call(o,d)&&c.push(d);return c},e.find=(o,c)=>{for(const d of o)if(c(d))return d},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function a(o,c=" | "){return o.map(d=>typeof d=="string"?`'${d}'`:d).join(c)}e.joinValues=a,e.jsonStringifyReplacer=(o,c)=>typeof c=="bigint"?c.toString():c})(vt||(vt={}));var ij;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ij||(ij={}));const De=vt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),br=e=>{switch(typeof e){case"undefined":return De.undefined;case"string":return De.string;case"number":return Number.isNaN(e)?De.nan:De.number;case"boolean":return De.boolean;case"function":return De.function;case"bigint":return De.bigint;case"symbol":return De.symbol;case"object":return Array.isArray(e)?De.array:e===null?De.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?De.promise:typeof Map<"u"&&e instanceof Map?De.map:typeof Set<"u"&&e instanceof Set?De.set:typeof Date<"u"&&e instanceof Date?De.date:De.object;default:return De.unknown}}
vendor: 16,373 bytes, line 49
49,ge=vt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class La extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(c){return c.message},a={_errors:[]},o=c=>{for(const d of c.issues)if(d.code==="invalid_union")d.unionErrors.map(o);else if(d.code==="invalid_return_type")o(d.returnTypeError);else if(d.code==="invalid_arguments")o(d.argumentsError);else if(d.path.length===0)a._errors.push(n(d));else{let f=a,h=0;for(;h<d.path.length;){const p=d.path[h];h===d.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(n(d))):f[p]=f[p]||{_errors:[]},f=f[p],h++}}};return o(this),a}static assert(t){if(!(t instanceof La))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,vt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const o of this.issues)if(o.path.length>0){const c=o.path[0];n[c]=n[c]||[],n[c].push(t(o))}else a.push(t(o));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}La.create=e=>new La(e);const Rg=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===De.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,vt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${vt.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${vt.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${vt.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:vt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,vt.assertNever(e)}return{message:n}};let UB=Rg;function zB(){return UB}const IB=e=>{const{data:t,path:n,errorMaps:a,issueData:o}=e,c=[...n,...o.path||[]],d={...o,path:c};if(o.message!==void 0)return{...o,path:c,message:o.message};let f="";const h=a.filter(p=>!!p).slice().reverse();for(const p of h)f=p(d,{data:t,defaultError:f}).message;return{...o,path:c,message:f}};function Ae(e,t){const n=zB(),a=IB({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Rg?void 0:Rg].filter(o=>!!o)});e.common.issues.push(a)}class vs{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const o of n){if(o.status==="aborted")return Ze;o.status==="dirty"&&t.dirty(),a.push(o.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const o of n){const c=await o.key,d=await o.value;a.push({key:c,value:d})}return vs.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const o of n){const{key:c,value:d}=o;if(c.status==="aborted"||d.status==="aborted")return Ze;c.status==="dirty"&&t.dirty(),d.status==="dirty"&&t.dirty(),c.value!=="__proto__"&&(typeof d.value<"u"||o.alwaysSet)&&(a[c.value]=d.value)}return{status:t.value,value:a}}}const Ze=Object.freeze({status:"aborted"}),vc=e=>({status:"dirty",value:e}),Ds=e=>({status:"valid",value:e}),oj=e=>e.status==="aborted",lj=e=>e.status==="dirty",Qo=e=>e.status==="valid",df=e=>typeof Promise<"u"&&e instanceof Promise;var Fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Fe||(Fe={}));class Tr{constructor(t,n,a,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cj=(e,t)=>{if(Qo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new La(e.common.issues);return this._error=n,this._error}}};function ut(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:o}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(d,f)=>{const{message:h}=e;return d.code==="invalid_enum_value"?{message:h??f.defaultError}:typeof f.data>"u"?{message:h??a??f.defaultError}:d.code!=="invalid_type"?{message:f.defaultError}:{message:h??n??f.defaultError}},description:o}}class xt{get description(){return this._def.description}_getType(t){return br(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new vs,ctx:{common:t.parent.common,data:t.data,parsedType:br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(df(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:br(t)},o=this._parseSync({data:t,path:a.path,parent:a});return cj(a,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:br(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Qo(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Qo(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:br(t)},o=this._parse({data:t,path:a.path,parent:a}),c=await(df(o)?o:Promise.resolve(o));return cj(a,c)}refine(t,n){const a=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,c)=>{const d=t(o),f=()=>c.addIssue({code:ge.custom,...a(o)});return typeof Promise<"u"&&d instanceof Promise?d.then(h=>h?!0:(f(),!1)):d?!0:(f(),!1)})}refinement(t,n){return this._refinement((a,o)=>t(a)?!0:(o.addIssue(typeof n=="function"?n(a,o):n),!1))}_refinement(t){return new Jo({schema:this,typeName:Xe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Cr.create(this,this._def)}nullable(){return el.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return la.create(this)}promise(){return hf.create(this,this._def)}or(t){return ff.create([this,t],this._def)}and(t){return mf.create(this,t,this._def)}transform(t){return new Jo({...ut(this._def),schema:this,typeName:Xe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bg({...ut(this._def),innerType:this,defaultValue:n,typeName:Xe.ZodDefault})}brand(){return new d7({typeName:Xe.ZodBranded,type:this,...ut(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new qg({...ut(this._def),innerType:this,catchValue:n,typeName:Xe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ay.create(this,t)}readonly(){return Lg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $B=/^c[^\s-]{8,}$/i,VB=/^[0-9a-z]+$/,HB=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YB=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,KB=/^[a-z0-9_-]{21}$/i,GB=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,WB=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,QB=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ZB="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Kp;const XB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,JB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,e7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,t7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,n7=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,s7=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,WS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",a7=new RegExp(`^${WS}$`);function QS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function r7(e){return new RegExp(`^${QS(e)}$`)}function i7(e){let t=`${WS}T${QS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function o7(e,t){return!!((t==="v4"||!t)&&XB.test(e)||(t==="v6"||!t)&&e7.test(e))}function l7(e,t){if(!GB.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(a));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function c7(e,t){return!!((t==="v4"||!t)&&JB.test(e)||(t==="v6"||!t)&&t7.test(e))}class jr extends xt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==De.string){const c=this._getOrReturnCtx(t);return Ae(c,{code:ge.invalid_type,expected:De.string,received:c.parsedType}),Ze}const a=new vs;let o;for(const c of this._def.checks)if(c.kind==="min")t.data.length<c.value&&(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="max")t.data.length>c.value&&(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="length"){const d=t.data.length>c.value,f=t.data.length<c.value;(d||f)&&(o=this._getOrReturnCtx(t,o),d?Ae(o,{code:ge.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):f&&Ae(o,{code:ge.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),a.dirty())}else if(c.kind==="email")QB.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"email",code:ge.invali
vendor: 5,882 bytes, line 49
49d_string,message:c.message}),a.dirty());else if(c.kind==="emoji")Kp||(Kp=new RegExp(ZB,"u")),Kp.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"emoji",code:ge.invalid_string,message:c.message}),a.dirty());else if(c.kind==="uuid")YB.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"uuid",code:ge.invalid_string,message:c.message}),a.dirty());else if(c.kind==="nanoid")KB.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"nanoid",code:ge.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid")$B.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"cuid",code:ge.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid2")VB.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"cuid2",code:ge.invalid_string,message:c.message}),a.dirty());else if(c.kind==="ulid")HB.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"ulid",code:ge.invalid_string,message:c.message}),a.dirty());else if(c.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Ae(o,{validation:"url",code:ge.invalid_string,message:c.message}),a.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"regex",code:ge.invalid_string,message:c.message}),a.dirty())):c.kind==="trim"?t.data=t.data.trim():c.kind==="includes"?t.data.includes(c.value,c.position)||(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),a.dirty()):c.kind==="toLowerCase"?t.data=t.data.toLowerCase():c.kind==="toUpperCase"?t.data=t.data.toUpperCase():c.kind==="startsWith"?t.data.startsWith(c.value)||(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.invalid_string,validation:{startsWith:c.value},message:c.message}),a.dirty()):c.kind==="endsWith"?t.data.endsWith(c.value)||(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.invalid_string,validation:{endsWith:c.value},message:c.message}),a.dirty()):c.kind==="datetime"?i7(c).test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.invalid_string,validation:"datetime",message:c.message}),a.dirty()):c.kind==="date"?a7.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.invalid_string,validation:"date",message:c.message}),a.dirty()):c.kind==="time"?r7(c).test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.invalid_string,validation:"time",message:c.message}),a.dirty()):c.kind==="duration"?WB.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"duration",code:ge.invalid_string,message:c.message}),a.dirty()):c.kind==="ip"?o7(t.data,c.version)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"ip",code:ge.invalid_string,message:c.message}),a.dirty()):c.kind==="jwt"?l7(t.data,c.alg)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"jwt",code:ge.invalid_string,message:c.message}),a.dirty()):c.kind==="cidr"?c7(t.data,c.version)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"cidr",code:ge.invalid_string,message:c.message}),a.dirty()):c.kind==="base64"?n7.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"base64",code:ge.invalid_string,message:c.message}),a.dirty()):c.kind==="base64url"?s7.test(t.data)||(o=this._getOrReturnCtx(t,o),Ae(o,{validation:"base64url",code:ge.invalid_string,message:c.message}),a.dirty()):vt.assertNever(c);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...Fe.errToObj(a)})}_addCheck(t){return new jr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Fe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Fe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Fe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Fe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Fe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Fe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Fe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Fe.errToObj(n)})}nonempty(t){return this.min(1,Fe.errToObj(t))}trim(){return new jr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new jr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new jr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 17,229 bytes, line 49
49get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}jr.create=e=>new jr({checks:[],typeName:Xe.ZodString,coerce:e?.coerce??!1,...ut(e)});function u7(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,o=n>a?n:a,c=Number.parseInt(e.toFixed(o).replace(".","")),d=Number.parseInt(t.toFixed(o).replace(".",""));return c%d/10**o}class Zo extends xt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==De.number){const c=this._getOrReturnCtx(t);return Ae(c,{code:ge.invalid_type,expected:De.number,received:c.parsedType}),Ze}let a;const o=new vs;for(const c of this._def.checks)c.kind==="int"?vt.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.invalid_type,expected:"integer",received:"float",message:c.message}),o.dirty()):c.kind==="min"?(c.inclusive?t.data<c.value:t.data<=c.value)&&(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),o.dirty()):c.kind==="max"?(c.inclusive?t.data>c.value:t.data>=c.value)&&(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),o.dirty()):c.kind==="multipleOf"?u7(t.data,c.value)!==0&&(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):c.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.not_finite,message:c.message}),o.dirty()):vt.assertNever(c);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Fe.toString(n))}setLimit(t,n,a,o){return new Zo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Fe.toString(o)}]})}_addCheck(t){return new Zo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Fe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&vt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Zo.create=e=>new Zo({checks:[],typeName:Xe.ZodNumber,coerce:e?.coerce||!1,...ut(e)});class Dc extends xt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==De.bigint)return this._getInvalidInput(t);let a;const o=new vs;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?t.data<c.value:t.data<=c.value)&&(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),o.dirty()):c.kind==="max"?(c.inclusive?t.data>c.value:t.data>=c.value)&&(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),o.dirty()):c.kind==="multipleOf"?t.data%c.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),Ae(a,{code:ge.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):vt.assertNever(c);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ae(n,{code:ge.invalid_type,expected:De.bigint,received:n.parsedType}),Ze}gte(t,n){return this.setLimit("min",t,!0,Fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Fe.toString(n))}setLimit(t,n,a,o){return new Dc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Fe.toString(o)}]})}_addCheck(t){return new Dc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Fe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dc.create=e=>new Dc({checks:[],typeName:Xe.ZodBigInt,coerce:e?.coerce??!1,...ut(e)});class uj extends xt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==De.boolean){const a=this._getOrReturnCtx(t);return Ae(a,{code:ge.invalid_type,expected:De.boolean,received:a.parsedType}),Ze}return Ds(t.data)}}uj.create=e=>new uj({typeName:Xe.ZodBoolean,coerce:e?.coerce||!1,...ut(e)});class Rc extends xt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==De.date){const c=this._getOrReturnCtx(t);return Ae(c,{code:ge.invalid_type,expected:De.date,received:c.parsedType}),Ze}if(Number.isNaN(t.data.getTime())){const c=this._getOrReturnCtx(t);return Ae(c,{code:ge.invalid_date}),Ze}const a=new vs;let o;for(const c of this._def.checks)c.kind==="min"?t.data.getTime()<c.value&&(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),a.dirty()):c.kind==="max"?t.data.getTime()>c.value&&(o=this._getOrReturnCtx(t,o),Ae(o,{code:ge.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),a.dirty()):vt.assertNever(c);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Rc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Fe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Rc.create=e=>new Rc({checks:[],coerce:e?.coerce||!1,typeName:Xe.ZodDate,...ut(e)});class dj extends xt{_parse(t){if(this._getType(t)!==De.symbol){const a=this._getOrReturnCtx(t);return Ae(a,{code:ge.invalid_type,expected:De.symbol,received:a.parsedType}),Ze}return Ds(t.data)}}dj.create=e=>new dj({typeName:Xe.ZodSymbol,...ut(e)});class fj extends xt{_parse(t){if(this._getType(t)!==De.undefined){const a=this._getOrReturnCtx(t);return Ae(a,{code:ge.invalid_type,expected:De.undefined,received:a.parsedType}),Ze}return Ds(t.data)}}fj.create=e=>new fj({typeName:Xe.ZodUndefined,...ut(e)});class mj extends xt{_parse(t){if(this._getType(t)!==De.null){const a=this._getOrReturnCtx(t);return Ae(a,{code:ge.invalid_type,expected:De.null,received:a.parsedType}),Ze}return Ds(t.data)}}mj.create=e=>new mj({typeName:Xe.ZodNull,...ut(e)});class hj extends xt{constructor(){super(...arguments),this._any=!0}_parse(t){return Ds(t.data)}}hj.create=e=>new hj({typeName:Xe.ZodAny,...ut(e)});class pj extends xt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ds(t.data)}}pj.create=e=>new pj({typeName:Xe.ZodUnknown,...ut(e)});class Mr extends xt{_parse(t){const n=this._getOrReturnCtx(t);return Ae(n,{code:ge.invalid_type,expected:De.never,received:n.parsedType}),Ze}}Mr.create=e=>new Mr({typeName:Xe.ZodNever,...ut(e)});class gj extends xt{_parse(t){if(this._getType(t)!==De.undefined){const a=this._getOrReturnCtx(t);return Ae(a,{code:ge.invalid_type,expected:De.void,received:a.parsedType}),Ze}return Ds(t.data)}}gj.create=e=>new gj({typeName:Xe.ZodVoid,...ut(e)});class la extends xt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),o=this._def;if(n.parsedType!==De.array)return Ae(n,{code:ge.invalid_type,expected:De.array,received:n.parsedType}),Ze;if(o.exactLength!==null){const d=n.data.length>o.exactLength.value,f=n.data.length<o.exactLength.value;(d||f)&&(Ae(n,{code:d?ge.too_big:ge.too_small,minimum:f?o.exactLength.value:void 0,maximum:d?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),a.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Ae(n,{code:ge.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),a.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(Ae(n,{code:ge.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((d,f)=>o.type._parseAsync(new Tr(n,d,n.path,f)))).then(d=>vs.mergeArray(a,d));const c=[...n.data].map((d,f)=>o.type._parseSync(new Tr(n,d,n.path,f)));return vs.mergeArray(a,c)}get element(){return this._def.type}min(t,n){return new la({...this._def,minLength:{value:t,message:Fe.toString(n)}})}max(t,n){return new la({...this._def,maxLength:{value:t,message:Fe.toString(n)}})}length(t,n){return new la({...this._def,exactLength:{value:t,message:Fe.toString(n)}})}nonempty(t){return this.min(1,t)}}la.create=(e,t)=>new la({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Xe.ZodArray,...ut(t)});function Lo(e){if(e instanceof mn){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Cr.create(Lo(a))}return new mn({...e._def,shape:()=>t})}else return e instanceof la?new la({...e._def,type:Lo(e.element)}):e instanceof Cr?Cr.create(Lo(e.unwrap())):e instanceof el?el.create(Lo(e.unwrap())):e instanceof Ni?Ni.create(e.items.map(t=>Lo(t))):e}class mn extends xt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=vt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==De.object){const p=this._getOrReturnCtx(t);return Ae(p,{code:ge.invalid_type,expected:De.object,received:p.parsedType}),Ze}const{status:a,ctx:o}=this._processInputParams(t),{shape:c,keys:d}=this._getCached(),f=[];if(!(this._def.catchall instanceof Mr&&this._def.unknownKeys==="strip"))for(const p in o.data)d.includes(p)||f.push(p);const h=[];for(const p of d){const y=c[p],v=o.data[p];h.push({key:{status:"valid",value:p},value:y._parse(new Tr(o,v,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Mr){const p=this._def.unknownKeys;if(p==="passthrough")for(const y of f)h.push({key:{status:"valid",value:y},value:{status:"valid",value:o.data[y]}});else if(p==="strict")f.length>0&&(Ae(o,{code:ge.unrecognized_keys,keys:f}),a.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const y of f){const v=o.data[y];h.push({key:{status:"valid",value:y},value:p._parse(new Tr(o,v,o.path,y)),alwaysSet:y in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const y of h){const v=await y.key,b=await y.value;p.push({key:v,value:b,alwaysSet:y.alwaysSet})}return p}).then(p=>vs.mergeObjectSync(a,p)):vs.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(t){return Fe.errToObj,new mn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const o=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Fe.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new mn({...this._def,unknownKeys:"strip"})}passthrough(){return new mn({...this._def,unknownKeys:"passthrough"})}extend(t){return new mn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Xe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mn({...this._def,catchall:t})}pick(t){const n={};for(const a of vt.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new mn({...this._def,shape:()=>n})}omit(t){const n={};for(const a of vt.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new mn({...this._def,shape:()=>n})}deepPartial(){return Lo(this)}partial(t){const n={};for(const a of vt.objectKeys(this.shape)){const o=this.shape[a];t&&!t[a]?n[a]=o:n[a]=o.optional()}return new mn({...this._def,shape:()=>n})}required(t){const n={};for(const a of vt.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let c=this.shape[a];for(;c instanceof Cr;)c=c._def.innerType;n[a]=c}return new mn({...this._def,shape:()=>n})}keyof(){return ZS(vt.objectKeys(this.shape))}}mn.create=(e,t)=>new mn({shape:()=>e,unknownKeys:"strip",catchall:Mr.create(),typeName:Xe.ZodObject,...ut(t)});mn.strictCreate=(e,t)=>new mn({shape:()=>e,unknownKeys:"strict",catchall:Mr.create(),typeName:Xe.ZodObject,...ut(t)});mn.lazycreate=(e,t)=>new mn({shape:e,unknownKeys:"strip",catchall:Mr.create(),typeName:Xe.ZodObject,...ut(t)});class ff extends xt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function o(c){for(const f of c)if(f.result.status==="valid")return f.result;for(const f of c)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const d=c.map(f=>new La(f.ctx.common.issues));return Ae(n,{code:ge.invalid_union,unionErrors:d}),Ze}if(n.common.async)return Promise.all(a.map(async c=>{const d={...n,common:{...n.common,issues:[]},parent:null};return{result:await c._parseAsync({data:n.data,path:n.path,parent:d}),ctx:d}})).then(o);{let c;const d=[];for(const h of a){const p={...n,common:{...n.common,issues:[]},parent:null},y=h._parseSync({data:n.data,path:n.path,parent:p});if(y.status==="valid")return y;y.status==="dirty"&&!c&&(c={result:y,ctx:p}),p.common.issues.length&&d.push(p.common.issues)}if(c)return n.common.issues.push(...c.ctx.common.issues),c.result;const f=d.map(h=>new La(h));return Ae(n,{code:ge.invalid_union,unionErrors:f}),Ze}}get options(){return this._def.options}}ff.create=(e,t)=>new ff({options:e,typeName:Xe.ZodUnion,...ut(t)});function Fg(e,t){const n=br(e),a=br(t);if(e===t)return{valid:!0,data:e};if(n===De.object&&a===De.object){const o=vt.objectKeys(t),c=vt.objectKeys(e).filter(f=>o.indexOf(f)!==-1),d={...e,...t};for(const f of c){const h=Fg(e[f],t[f]);if(!h.valid)return{valid:!1};d[f]=h.data}return{valid:!0,data:d}}else if(n===De.array&&a===De.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let c=0;c<e.length;c++){const d=e[c],f=t[c],h=Fg(d,f);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return n===De.date&&a===De.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class mf extends xt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=(c,d)=>
vendor: 4,098 bytes, line 49
49{if(oj(c)||oj(d))return Ze;const f=Fg(c.value,d.value);return f.valid?((lj(c)||lj(d))&&n.dirty(),{status:n.value,value:f.data}):(Ae(a,{code:ge.invalid_intersection_types}),Ze)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([c,d])=>o(c,d)):o(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}mf.create=(e,t,n)=>new mf({left:e,right:t,typeName:Xe.ZodIntersection,...ut(n)});class Ni extends xt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==De.array)return Ae(a,{code:ge.invalid_type,expected:De.array,received:a.parsedType}),Ze;if(a.data.length<this._def.items.length)return Ae(a,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ze;!this._def.rest&&a.data.length>this._def.items.length&&(Ae(a,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const c=[...a.data].map((d,f)=>{const h=this._def.items[f]||this._def.rest;return h?h._parse(new Tr(a,d,a.path,f)):null}).filter(d=>!!d);return a.common.async?Promise.all(c).then(d=>vs.mergeArray(n,d)):vs.mergeArray(n,c)}get items(){return this._def.items}rest(t){return new Ni({...this._def,rest:t})}}Ni.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ni({items:e,typeName:Xe.ZodTuple,rest:null,...ut(t)})};class xj extends xt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==De.map)return Ae(a,{code:ge.invalid_type,expected:De.map,received:a.parsedType}),Ze;const o=this._def.keyType,c=this._def.valueType,d=[...a.data.entries()].map(([f,h],p)=>({key:o._parse(new Tr(a,f,a.path,[p,"key"])),value:c._parse(new Tr(a,h,a.path,[p,"value"]))}));if(a.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const h of d){const p=await h.key,y=await h.value;if(p.status==="aborted"||y.status==="aborted")return Ze;(p.status==="dirty"||y.status==="dirty")&&n.dirty(),f.set(p.value,y.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const h of d){const p=h.key,y=h.value;if(p.status==="aborted"||y.status==="aborted")return Ze;(p.status==="dirty"||y.status==="dirty")&&n.dirty(),f.set(p.value,y.value)}return{status:n.value,value:f}}}}xj.create=(e,t,n)=>new xj({valueType:t,keyType:e,typeName:Xe.ZodMap,...ut(n)});class Fc extends xt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==De.set)return Ae(a,{code:ge.invalid_type,expected:De.set,received:a.parsedType}),Ze;const o=this._def;o.minSize!==null&&a.data.size<o.minSize.value&&(Ae(a,{code:ge.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&a.data.size>o.maxSize.value&&(Ae(a,{code:ge.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const c=this._def.valueType;function d(h){const p=new Set;for(const y of h){if(y.status==="aborted")return Ze;y.status==="dirty"&&n.dirty(),p.add(y.value)}return{status:n.value,value:p}}const f=[...a.data.values()].map((h,p)=>c._parse(new Tr(a,h,a.path,p)));return a.common.async?Promise.all(f).then(h=>d(h)):d(f)}min(t,n){return new Fc({...this._def,minSize:{value:t,message:Fe.toString(n)}})}max(t,n){return new Fc({...this._def,maxSize:{value:t,message:Fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Fc.create=(e,t)=>new Fc({valueType:e,minSize:null,maxSize:null,typeName:Xe.ZodSet,...ut(t)});class yj extends xt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}yj.create=(e,t)=>new yj({getter:e,typeName:Xe.ZodLazy,...ut(t)});class Pg extends xt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);
vendor: 4,243 bytes, line 49
49return Ae(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ze}return{status:"valid",value:t.data}}get value(){return this._def.value}}Pg.create=(e,t)=>new Pg({value:e,typeName:Xe.ZodLiteral,...ut(t)});function ZS(e,t){return new Xo({values:e,typeName:Xe.ZodEnum,...ut(t)})}class Xo extends xt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return Ae(n,{expected:vt.joinValues(a),received:n.parsedType,code:ge.invalid_type}),Ze}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return Ae(n,{received:n.data,code:ge.invalid_enum_value,options:a}),Ze}return Ds(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Xo.create(t,{...this._def,...n})}exclude(t,n=this._def){return Xo.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}Xo.create=ZS;class vj extends xt{_parse(t){const n=vt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==De.string&&a.parsedType!==De.number){const o=vt.objectValues(n);return Ae(a,{expected:vt.joinValues(o),received:a.parsedType,code:ge.invalid_type}),Ze}if(this._cache||(this._cache=new Set(vt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=vt.objectValues(n);return Ae(a,{received:a.data,code:ge.invalid_enum_value,options:o}),Ze}return Ds(t.data)}get enum(){return this._def.values}}vj.create=(e,t)=>new vj({values:e,typeName:Xe.ZodNativeEnum,...ut(t)});class hf extends xt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==De.promise&&n.common.async===!1)return Ae(n,{code:ge.invalid_type,expected:De.promise,received:n.parsedType}),Ze;const a=n.parsedType===De.promise?n.data:Promise.resolve(n.data);return Ds(a.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hf.create=(e,t)=>new hf({type:e,typeName:Xe.ZodPromise,...ut(t)});class Jo extends xt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Xe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),o=this._def.effect||null,c={addIssue:d=>{Ae(a,d),d.fatal?n.abort():n.dirty()},get path(){return a.path}};if(c.addIssue=c.addIssue.bind(c),o.type==="preprocess"){const d=o.transform(a.data,c);if(a.common.async)return Promise.resolve(d).then(async f=>{if(n.value==="aborted")return Ze;const h=await this._def.schema._parseAsync({data:f,path:a.path,parent:a});return h.status==="aborted"?Ze:h.status==="dirty"||n.value==="dirty"?vc(h.value):h});{if(n.value==="aborted")return Ze;const f=this._def.schema._parseSync({data:d,path:a.path,parent:a});return f.status==="aborted"?Ze:f.status==="dirty"||n.value==="dirty"?vc(f.value):f}}if(o.type==="refinement"){const d=f=>{const h=o.refinement(f,c);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(a.common.async===!1){const f=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return f.status==="aborted"?Ze:(f.status==="dirty"&&n.dirty(),d(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(f=>f.status==="aborted"?Ze:(f.status==="dirty"&&n.dirty(),d(f.value).then(()=>({status:n.value,value:f.value}))))}if(o.type==="transform")if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Qo(d))return Ze;const f=o.transform(d.value,c);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>Qo(d)?Promise.resolve(o.transform(d.value,c)).then(f=>({status:n.value,value:f})):Ze);vt.assertNever(o)}}
49Jo.create=(e,t,n)=>new Jo({schema:e,typeName:Xe.ZodEffects,effect:t,...ut(n)});Jo.createWithPreprocess=(e,t,n)=>new Jo({schema:t,effect:{type:"preprocess",transform:e},typeName:Xe.ZodEffects,...ut(n)});class Cr extends xt{_parse(t){return this._getType(t)===De.undefined?Ds(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Cr.create=(e,t)=>new Cr({innerType:e,typeName:Xe.ZodOptional,...ut(t)});class el extends xt{_parse(t){return this._getType(t)===De.null?Ds(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}el.create=(e,t)=>new el({innerType:e,typeName:Xe.ZodNullable,...ut(t)});class Bg extends xt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===De.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Bg.create=(e,t)=>new Bg({innerType:e,typeName:Xe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ut(t)});class qg extends xt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return df(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new La(a.common.issues)},input:a.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new La(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}qg.create=(e,t)=>new qg({innerType:e,typeName:Xe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ut(t)});class bj extends xt{_parse(t){if(this._getType(t)!==De.nan){const a=this._getOrReturnCtx(t);return Ae(a,{code:ge.invalid_type,expected:De.nan,received:a.parsedType}),Ze}return{status:"valid",value:t.data}}}bj.create=e=>new bj({typeName:Xe.ZodNaN,...ut(e)});class d7 extends xt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class ay extends xt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return c.status==="aborted"?Ze:c.status==="dirty"?(n.dirty(),vc(c.value)):this._def.out._parseAsync({data:c.value,path:a.path,parent:a})})();{const o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?Ze:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}static create(t,n){return new ay({in:t,out:n,typeName:Xe.ZodPipeline})}}class Lg extends xt{_parse(t){const n=this._def.innerType._parse(t),a=o=>(Qo(o)&&(o.value=Object.freeze(o.value)),o);return df(n)?n.then(o=>a(o)):a(n)}unwrap(){return this._def.innerType}}Lg.create=(e,t)=>new Lg({innerType:e,typeName:Xe.ZodReadonly,...ut(t)});var Xe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Xe||(Xe={}));const ct=jr.create,f7=Zo.create,m7=Rc.create;Mr.create;const tu=la.create,Mi=mn.create,XS=ff.create;mf.create;Ni.create;const ry=Pg.create,pf=Xo.create;hf.create;Cr.create;el.create;const Ci=NB,JS=x.createContext(null),Je=({...e})=>i.jsx(JS.Provider,{value:{name:e.name},children:i.jsx(wB,{...e})}),Jf=()=>{const e=x.useContext(JS),t=x.useContext(eE),{getFieldState:n,formState:a}=jB();if(!e)throw new Error("useFormField should be used within <FormField>");if(!t)throw new Error("useFormField should be used within <FormItem>");const o=n(e.name,a),{id:c}=t;return{id:c,name:e.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...o}},eE=x.createContext(null),We=x.forwardRef(({className:e,...t},n)=>{const a=x.useId();return i.jsx(eE.Provider,{value:{id:a},children:i.jsx("div",{ref:n,className:ie("space-y-2",e),...t})})});We.displayName="FormItem";const Qe=x.forwardRef(({className:e,...t},n)=>{const{error:a,formItemId:o}=Jf();return i.jsx(jt,{ref:n,className:ie(a&&"text-destructive",e),htmlFor:o,...t})});Qe.displayName="FormLabel";const tt=x.forwardRef(({...e},t)=>{const{error:n,formItemId:a,formDescriptionId:o,formMessageId:c}=Jf();return i.jsx(cN,{ref:t,id:a,"aria-describedby":n?`${o} ${c}`:`${o}`,"aria-invalid":!!n,...e})});tt.displayName="FormControl";const Ug=x.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:a}=Jf();return i.jsx("p",{ref:n,id:a,className:ie("text-[0.8rem] text-muted-foreground",e),...t})});Ug.displayName="FormDescription";const it=x.forwardRef(({className:e,children:t,...n},a)=>{const{error:o,formMessageId:c}=Jf(),d=o?String(o?.message??""):t;return d?i.jsx("p",{ref:a,id:c,className:ie("text-[0.8rem] font-medium text-destructive",e),...n,children:d}):null});it.displayName="FormMessage";const h7=Mi({email:ct().email("Please enter a valid email address"),password:ct().min(1,"Password is required")});function p7(){const[,e]=ws(),{admin:t}=ma();x.useEffect(()=>{t&&e("/admin")},[t,e]);const n=wi({resolver:ji(h7),defaultValues:{email:"",password:""}}),a=Kt(),o=dP({mutation:{onSuccess:async d=>{const f=Lx();await a.cancelQueries({queryKey:f}),a.setQueryData(f,d),a.invalidateQueries({predicate:h=>h.queryKey[0]!==f[0]}),e("/admin")}}});function c(d){o.mutate({data:d})}return i.jsxs("div",{className:"min-h-[100dvh] bg-[#F8F9FB] flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-20",style:{backgroundImage:"radial-gradient(#00CEA6 1px, transparent 1px)",backgroundSize:"32px 32px"}}),i.jsxs("div",{className:"w-full max-w-md bg-white border border-[#
49E9EBF0] rounded-2xl shadow-[0_8px_30px_rgb(0,0,0,0.04)] p-8 relative overflow-hidden",children:[i.jsx(xs,{href:"/",children:i.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[#9CA3AF] hover:text-[#374151] text-sm font-bold mb-6 cursor-pointer relative z-10",children:[i.jsx(Ic,{className:"w-4 h-4"})," Back"]})}),i.jsxs("div",{className:"flex flex-col items-center mb-8 relative z-10",children:[i.jsx("img",{src:Go,alt:"The Growth Shark",className:"w-16 h-16 rounded-2xl mb-4 shadow-lg shadow-[#00CEA6]/20"}),i.jsx("h1",{className:"text-3xl font-display font-bold text-[#111827] tracking-tight",children:"The Growth Shark"}),i.jsx("p",{className:"text-[#9CA3AF] mt-2 font-bold uppercase tracking-wider text-sm",children:"Internal Operations Panel"})]}),i.jsx(Ci,{...n,children:i.jsxs("form",{onSubmit:n.handleSubmit(c),className:"space-y-6 relative z-10",children:[o.error&&i.jsx("div",{className:"p-4 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm font-bold",children:"Account not found. Please check your email and password."}),i.jsx(Je,{control:n.control,name:"email",render:({field:d})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"text-[#111827] font-bold",children:"Email Address"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"[email protected]",className:"bg-[#F8F9FB] border-[#E9EBF0] focus-visible:ring-[#00CEA6] h-12",...d})}),i.jsx(it,{})]})}),i.jsx(Je,{control:n.control,name:"password",render:({field:d})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"text-[#111827] font-bold",children:"Password"}),i.jsx(tt,{children:i.jsx(ze,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"bg-[#F8F9FB] border-[#E9EBF0] focus-visible:ring-[#00CEA6] h-12",...d})}),i.jsx(it,{})]})}),i.jsx(ve,{type:"submit",className:"w-full h-12 text-base font-bold btn-primary",disabled:o.isPending,children:o.isPending?"Authenticating...":"Sign In"})]})})]})]})}const g7=Mi({email:ct().email("Please enter a valid email address"),password:ct().min(1,"Password is required")});function x7(){const[,e]=ws(),{client:t}=zf();x.useEffect(()=>{t&&e("/dashboard")},[t,e]);const n=wi({resolver:ji(g7),defaultValues:{email:"",password:""}}),a=Kt(),o=P5({mutation:{onSuccess:async d=>{const f=Ix();await a.cancelQueries({queryKey:f}),a.setQueryData(f,d),a.invalidateQueries({predicate:h=>h.queryKey[0]!==f[0]}),e("/dashboard")}}});function c(d){o.mutate({data:d})}return i.jsxs("div",{className:"min-h-[100dvh] bg-[#F8F9FB] flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-20",style:{backgroundImage:"radial-gradient(#00CEA6 1px, transparent 1px)",backgroundSize:"32px 32px"}}),i.jsxs("div",{className:"w-full max-w-md bg-white border border-[#E9EBF0] rounded-2xl shadow-[0_8px_30px_rgb(0,0,0,0.04)] p-8 relative overflow-hidden",children:[i.jsx(xs,{href:"/",children:i.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[#9CA3AF] hover:text-[#374151] text-sm font-bold mb-6 cursor-pointer relative z-10",children:[i.jsx(Ic,{className:"w-4 h-4"})," Back"]})}),i.jsxs("div",{className:"flex flex-col items-center mb-8 relative z-10",children:[i.jsx("img",{src:Go,alt:"The Growth Shark",className:"w-16 h-16 rounded-2xl mb-4 shadow-lg shadow-[#00CEA6]/20"}),i.jsx("h1",{className:"text-3xl font-display font-bold text-[#111827] tracking-tight",children:"The Growth Shark"}),i.jsx("p",{className:"text-[#9CA3AF] mt-2 font-bold uppercase tracking-wider text-sm",children:"Client Portal"})]}),i.jsx(Ci,{...n,children:i.jsxs("form",{onSubmit:n.handleSubmit(c),className:"space-y-6 relative z-10",children:[o.error&&i.jsx("div",{className:"p-4 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm font-bold",children:"Account not found. Please check your email and password."}),i.jsx(Je,{control:n.control,name:"email",render:({field:d})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"text-[#111827] font-bold",children:"Email Address"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"[email protected]",className:"bg-[#F8F9FB] border-[#E9EBF0] focus-visible:ring-[#00CEA6] h-12",...d})}),i.jsx(it,{})]})}),i.jsx(Je,{control:n.control,name:"password",render:({field:d})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"text-[#111827] font-bold",children:"Password"}),i.jsx(tt,{children:i.jsx(ze,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"bg-[#F8F9FB] border-[#
49E9EBF0] focus-visible:ring-[#00CEA6] h-12",...d})}),i.jsx(it,{})]})}),i.jsx(ve,{type:"submit",className:"w-full h-12 text-base font-bold btn-primary",disabled:o.isPending,children:o.isPending?"Signing in...":"Sign In"})]})})]})]})}function on(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function da(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function y7(e,t){const n=on(e);return isNaN(t)?da(e,NaN):(n.setDate(n.getDate()+t),n)}function iy(e,t){const n=on(e);if(isNaN(t))return da(e,NaN);if(!t)return n;const a=n.getDate(),o=da(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const c=o.getDate();return a>=c?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}const tE=6048e5,v7=864e5;let b7={};function nu(){return b7}function Si(e,t){const n=nu(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=on(e),c=o.getDay(),d=(c<a?7:0)+c-a;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function gf(e){return Si(e,{weekStartsOn:1})}function nE(e){const t=on(e),n=t.getFullYear(),a=da(e,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=gf(a),c=da(e,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const d=gf(c);return t.getTime()>=o.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function xf(e){const t=on(e);return t.setHours(0,0,0,0),t}function wj(e){const t=on(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function w7(e,t){const n=xf(e),a=xf(t),o=+n-wj(n),c=+a-wj(a);return Math.round((o-c)/v7)}function j7(e){const t=nE(e),n=da(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),gf(n)}function zg(e,t){const n=xf(e),a=xf(t);return+n==+a}function N7(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function C7(e){if(!N7(e)&&typeof e!="number")return!1;const t=on(e);return!isNaN(Number(t))}function sE(e){const t=on(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function S7(e,t){const n=on(e.start),a=on(e.end);let o=+n>+a;const c=o?+n:+a,d=o?a:n;d.setHours(0,0,0,0);let f=1;const h=[];for(;+d<=c;)h.push(on(d)),d.setDate(d.getDate()+f),d.setHours(0,0,0,0);return o?h.reverse():h}function Ac(e){const t=on(e);return t.setDate(1),t.setHours(0,0,0,0),t}function E7(e){const t=on(e),n=da(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function aE(e,t){const n=nu(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=on(e),c=o.getDay(),d=(c<a?-7:0)+6-(c-a);return o.setDate(o.getDate()+d),o.setHours(23,59,59,999),o}const A7={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_7=(e,t,n)=>{let a;const o=A7[e];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Gp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const k7={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},T7={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},M7={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},O7={date:Gp({formats:k7,defaultWidth:"full"}),time:Gp({formats:T7,defaultWidth:"full"}),dateTime:Gp({formats:M7,defaultWidth:"full"})},D7={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R7=(e,t,n,a)=>D7[e];function mc(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let o;if(a==="formatting"&&e.formattingValues){const d=e.defaultFormattingWidth||e.defaultWidth,f=n?.width?String(n.width):d;o=e.formattingValues[f]||e.formattingValues[d]}else{const d=e.defaultWidth,f=n?.width?String(n.width):e.defaultWidth;o=e.values[f]||e.values[d]}const c=e.argumentCallback?e.argumentCallback(t):t;return o[c]}}const F7={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},P7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},B7={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},q7={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
49ay","Saturday"]},L7={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},U7={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},z7=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},I7={ordinalNumber:z7,era:mc({values:F7,defaultWidth:"wide"}),quarter:mc({values:P7,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mc({values:B7,defaultWidth:"wide"}),day:mc({values:q7,defaultWidth:"wide"}),dayPeriod:mc({values:L7,defaultWidth:"wide",formattingValues:U7,defaultFormattingWidth:"wide"})};function hc(e){return(t,n={})=>{const a=n.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],c=t.match(o);if(!c)return null;const d=c[0],f=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(f)?V7(f,v=>v.test(d)):$7(f,v=>v.test(d));let p;p=e.valueCallback?e.valueCallback(h):h,p=n.valueCallback?n.valueCallback(p):p;const y=t.slice(d.length);return{value:p,rest:y}}}function $7(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function V7(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function H7(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const o=a[0],c=t.match(e.parsePattern);if(!c)return null;let d=e.valueCallback?e.valueCallback(c[0]):c[0];d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(o.length);return{value:d,rest:f}}}const Y7=/^(\d+)(th|st|nd|rd)?/i,K7=/\d+/i,G7={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},W7={any:[/^b/i,/^(a|c)/i]},Q7={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Z7={any:[/1/i,/2/i,/3/i,/4/i]},X7={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},J7={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},eq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},tq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},nq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},aq={ordinalNumber:H7({matchPattern:Y7,parsePattern:K7,valueCallback:e=>parseInt(e,10)}),era:hc({matchPatterns:G7,defaultMatchWidth:"wide",parsePatterns:W7,defaultParseWidth:"any"}),quarter:hc({matchPatterns:Q7,defaultMatchWidth:"wide",parsePatterns:Z7,defaultParseWidth:"any",valueCallback:e=>e+1}),month:hc({matchPatterns:X7,defaultMatchWidth:"wide",parsePatterns:J7,defaultParseWidth:"any"}),day:hc({matchPatterns:eq,defaultMatchWidth:"wide",parsePatterns:tq,defaultParseWidth:"any"}),dayPeriod:hc({matchPatterns:nq,defaultMatchWidth:"any",parsePatterns:sq,defaultParseWidth:"any"})},rq={code:"en-US",formatDistance:_7,formatLong:O7,formatRelative:R7,localize:I7,match:aq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iq(e){const t=on(e);return w7(t,E7(t))+1}function oq(e){const t=on(e),n=+gf(t)-+j7(t);return Math.round(n/tE)+1}function rE(e,t){const n=on(e),a=n.getFullYear(),o=nu(),c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=da(e,0);d.setFullYear(a+1,0,c),d.setHours(0,0,0,0);const f=Si(d,t),h=da(e,0);h.setFullYear(a,0,c),h.setHours(0,0,0,0);const p=Si(h,t);return n.getTime()>=f.getTime()?a+1:n.getTime()>=p.getTime()?a:a-1}function lq(e,t){const n=nu(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=rE(e,t),c=da(e,0);return c.setFullYear(o,0,a),c.setHours(0,0,0,0),Si(c,t)}function cq(e,t){const n=on(e),a=+Si(n,t)-+lq(n,t);return Math.round(a/tE)+1}function At(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const gr={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return At(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):At(n+1,2)},d(e,t){return At(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return At(e.getHours()%12||12,t.length)},H(e,t){return At(e.getHours(),t.length)},m(e,t){return At(e.getMinutes(),t.length)},s(e,t){return At(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),o=Math.trunc(a*Math.pow(10,n-3));return At(o,t.length)}},Fo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jj={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),o=a>0?a:1-a;return n.ordinalNumber(o,{unit:"year"})}return gr.y(e,t)},Y:function(e,t,n,a){const o=rE(e,a),c=o>0?o:1-o;if(t==="YY"){const d=c%100;return At(d,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):At(c,t.length)},R:function(e,t){const n=nE(e);return At(n,t.length)},u:function(e,t){const n=e.getFullYear();return At(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return At(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return At(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return gr.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return At(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const o=cq(e,a);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):At(o,t.length)},I:function(e,t,n){const a=oq(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):At(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):gr.d(e,t)},D:function(e,t,n){const a=iq(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):At(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const o=e.getDay(),c=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return At(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const o=e.getDay(),c=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return At(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return At(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let o;switch(a===12?o=Fo.noon:a===0?o=Fo.midnight:o=a/12>
vendor: 4,193 bytes, line 49
49=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let o;switch(a>=17?o=Fo.evening:a>=12?o=Fo.afternoon:a>=4?o=Fo.morning:o=Fo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return gr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):gr.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):At(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):At(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):gr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):gr.s(e,t)},S:function(e,t){return gr.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Cj(a);case"XXXX":case"XX":return di(a);default:return di(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return Cj(a);case"xxxx":case"xx":return di(a);default:return di(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Nj(a,":");default:return"GMT"+di(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Nj(a,":");default:return"GMT"+di(a,":")}},t:function(e,t,n){const a=Math.trunc(e.getTime()/1e3);return At(a,t.length)},T:function(e,t,n){const a=e.getTime();return At(a,t.length)}};function Nj(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),o=Math.trunc(a/60),c=a%60;return c===0?n+String(o):n+String(o)+t+At(c,2)}function Cj(e,t){return e%60===0?(e>0?"-":"+")+At(Math.abs(e)/60,2):di(e,t)}function di(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),o=At(Math.trunc(a/60),2),c=At(a%60,2);return n+o+t+c}const Sj=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},iE=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},uq=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return Sj(e,t);let c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Sj(a,t)).replace("{{time}}",iE(o,t))},dq={p:iE,P:uq},fq=/^D+$/,mq=/^Y+$/,hq=["D","DD","YY","YYYY"];function pq(e){return fq.test(e)}function gq(e){return mq.test(e)}function xq(e,t,n){const a=yq(e,t,n);if(console.warn(a),hq.includes(e))throw new RangeError(a)}function yq(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wq=/^'([^]*?)'?$/,jq=/''/g,Nq=/[a-zA-Z]/;function Jt(e,t,n){const a=nu(),o=a.locale??rq,c=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,d=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,f=on(e);if(!C7(f))throw new RangeError("Invalid time value");let h=t.match(bq).map(y=>{const v=y[0];if(v==="p"||v==="P"){const b=dq[v];return b(y,o.formatLong)}return y}).join("").match(vq).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const v=y[0];if(v==="'")return{isToken:!1,value:Cq(y)};if(jj[v])return{isToken:!0,value:y};
49if(v.match(Nq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(h=o.localize.preprocessor(f,h));const p={firstWeekContainsDate:c,weekStartsOn:d,locale:o};return h.map(y=>{if(!y.isToken)return y.value;const v=y.value;(gq(v)||pq(v))&&xq(v,t,String(e));const b=jj[v[0]];return b(f,v,o.localize,p)}).join("")}function Cq(e){const t=e.match(wq);return t?t[1].replace(jq,"'"):e}function oy(e,t){const n=on(e),a=on(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function oE(e,t){return iy(e,-1)}const rn=x.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:ie("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));rn.displayName="Textarea";function Ud(e){if(e.type)return e.type;const t=e.name?.split(".").pop()?.toLowerCase();return t&&{mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm",m4v:"video/x-m4v"}[t]||"application/octet-stream"}function su(e={}){const t=e.basePath??"/api/storage",[n,a]=x.useState(!1),[o,c]=x.useState(null),[d,f]=x.useState(0),h=x.useCallback(async S=>{const E=await fetch(`${t}/uploads/request-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S.name,size:S.size,contentType:Ud(S)})});if(!E.ok){const w=await E.json().catch(()=>({}));throw new Error(w.error||"Failed to get upload URL")}return E.json()},[t]),p=x.useCallback(async(S,E)=>{let w;try{w=await fetch(E,{method:"PUT",body:S,headers:{"Content-Type":Ud(S)}})}catch{throw new Error("Could not reach storage. Check your connection and try again.")}if(!w.ok)throw w.status===403?new Error("The upload link was rejected or expired. Please retry the upload."):w.status===413?new Error("Storage rejected the file size. Try a smaller video."):new Error(`Storage rejected the upload (HTTP ${w.status}). Please retry.`)},[]),y=x.useCallback(async S=>{a(!0),c(null),f(0);try{f(10);const E=await h(S);return f(30),await p(S,E.uploadURL),f(100),e.onSuccess?.(E),E}catch(E){const w=E instanceof Error?E:new Error("Upload failed");throw c(w),e.onError?.(w),w}finally{a(!1)}},[h,p,e]),v=x.useCallback(async S=>{try{return await y(S)}catch{return null}},[y]),b=x.useCallback(async S=>{const E=await fetch(`${t}/uploads/request-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S.name,size:S.size,contentType:Ud(S)})});if(!E.ok)throw new Error("Failed to get upload URL");return{method:"PUT",url:(await E.json()).uploadURL,headers:{"Content-Type":Ud(S)}}},[t]);return{uploadFile:v,uploadFileOrThrow:y,getUploadParameters:b,isUploading:n,error:o,progress:d}}const lE="/api/storage",Sq="/api/client/storage";function Eq({a:e,storageBasePath:t}){const n=`${t}${e.url}`;return i.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"w-14 h-14 rounded-md overflow-hidden border border-[#E9EBF0] block shrink-0",children:e.mediaType==="video"?i.jsx("div",{className:"w-full h-full bg-black/80 flex items-center justify-center",children:i.jsx(za,{className:"w-4 h-4 text-white"})}):i.jsx("img",{src:n,className:"w-full h-full object-cover",alt:"Attachment"})})}function au({comments:e,isLoading:t,emptyLabel:n="No comments yet.",hideDirectionTag:a=!1,storageBasePath:o=lE}){return t?i.jsx("p",{className:"text-sm text-[#9CA3AF] font-medium",children:"Loading comments..."}):!e||e.length===0?i.jsx("p",{className:"text-sm text-[#9CA3AF] font-medium",children:n}):i.jsx("div",{className:"space-y-3",children:e.map(c=>{let d="border-[#E9EBF0] bg-[#F8F9FB]",f="text-[#004AAC]";return c.isInternal?(d="border-[#FDE68A] bg-[#FFFBEB]",f="text-[#92400E]"):c.authorType==="client"&&(d="border-[#FCEBEB] bg-[#FCEBEB]/40",f="text-[#A32D2D]"),i.jsxs("div",{className:`rounded-md border p-3 space-y-1.5 ${d}`,children:[i.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[i.jsxs("span",{className:`font-bold text-xs uppercase tracking-wider flex items-center gap-1.5 ${f}`,children:[c.isInternal?i.jsx(Oa,{className:"w-3.5 h-3.5"}):i.jsx(Yc,{className:"w-3.5 h-3.5"}),c.authorName,c.isInternal&&i.jsx("span",{className:"ml-1 text-[10px] font-bold bg-[#FDE68A] text-[#92400E] px-1.5 py-0.5 rounded border border-[#FCD34D]",children:"Internal"}),!a&&!c.isInternal&&c.authorType==="admin"&&i.jsx("span",{className:"ml-1 text-[10px] font-bold bg-[#E0F2FE] text-[#0369A1] px-1.5 py-0.5 rounded border border-[#BAE6FD]",children:"Team â Client"})]}),i.jsx("span",{className:"text-[11px] text-[#9CA3AF] font-medium",children:Jt(new Date(c.createdAt),"MMM d, h:mm a")})]}),i.jsx("p",{className:"text-sm text-[#374151] whitespace-pre-wrap",children:c.comment}),c.attachments.length>0&&i.jsx("div",{className:"flex gap-2 flex-wrap pt-1",children:c.attachments.map((h,p)=>i.jsx(Eq,{a:h,storageBasePath:o},p))})]},c.id)})})}function cE({onSubmit:e,isSubmitting:t,placeholder:n="Leave a comment or request changes...",submitLabel:a="Send",onApprove:o,isApproving:c,approveLabel:d="Approve",storageBasePath:f=lE}){const[h,p]=x.useState(""),[y,v]=x.useState([]),[b,S]=x.useState(!1),{uploadFile:E}=su({basePath:f}),{toast:w}=pn();async function C(j){const M=j.target.files?.[0];if(j.target.value="",!M)return;const R=M.type.startsWith("video/")?"video":"image";S(!0);try{const T=await E(M);T?v(D=>[...D,{url:T.objectPath,mediaType:R}]):w({title:"Failed to upload attachment",variant:"destructive"})}finally{S(!1)}}function A(){h.trim()&&(e(h.trim(),y),p(""),v([]))}return i.jsxs("div",{className:"space-y-3",children:[i.jsx(rn,{value:h,onChange:j=>p(j.target.value),placeholder:n,className:"bg-[#F8F9FB] border-[#
49E9EBF0] min-h-[90px]"}),i.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[i.jsxs("div",{className:"flex flex-wrap gap-2",children:[y.map((j,M)=>i.jsxs("div",{className:"relative w-12 h-12 rounded-md overflow-hidden border border-[#E9EBF0]",children:[j.mediaType==="video"?i.jsx("div",{className:"w-full h-full bg-black/80 flex items-center justify-center",children:i.jsx(za,{className:"w-4 h-4 text-white"})}):i.jsx("img",{src:`${f}${j.url}`,className:"w-full h-full object-cover",alt:"Attachment"}),i.jsx("button",{type:"button",onClick:()=>v(R=>R.filter((T,D)=>D!==M)),className:"absolute top-0.5 right-0.5 bg-black/60 rounded-full p-0.5 text-white hover:bg-black/80",children:i.jsx(Mf,{className:"w-2.5 h-2.5"})})]},M)),i.jsxs("label",{className:"w-12 h-12 rounded-md border border-dashed border-[#D1D5DB] flex items-center justify-center cursor-pointer text-[#9CA3AF] hover:border-[#00CEA6] hover:text-[#00CEA6] transition-colors",children:[b?i.jsx(ns,{className:"w-4 h-4 animate-spin"}):i.jsx(QR,{className:"w-4 h-4"}),i.jsx("input",{type:"file",accept:"image/*,video/*",className:"hidden",onChange:C,disabled:b})]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o&&i.jsxs(ve,{type:"button",onClick:o,disabled:c,className:"font-bold h-10 bg-[#00CEA6] hover:bg-[#00b891] text-white gap-2 shrink-0",children:[i.jsx(Ho,{className:"w-4 h-4"}),c?"Approvingâ¦":d]}),i.jsx(ve,{onClick:A,disabled:!h.trim()||t||b,className:"font-bold btn-primary h-10 shrink-0",children:t?"Sending...":a})]})]})]})}function uE({onSubmit:e,isSubmitting:t,submitLabel:n,onApprove:a,isApproving:o,approveLabel:c}){return i.jsx(cE,{onSubmit:e,isSubmitting:t,placeholder:"Leave a comment or request changes...",submitLabel:n,onApprove:a,isApproving:o,approveLabel:c,storageBasePath:Sq})}function dE({onSubmit:e,isSubmitting:t,internalOnly:n=!1}){const[a,o]=x.useState(n),c=n||a;return i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex rounded-lg border border-[#E9EBF0] overflow-hidden text-xs font-bold",children:[i.jsxs("button",{type:"button",onClick:()=>o(!1),disabled:n,className:`flex-1 flex items-center justify-center gap-1.5 py-2 transition-colors ${n?"bg-[#F3F4F6] text-[#9CA3AF] cursor-not-allowed":c?"bg-white text-[#9CA3AF] hover:bg-[#F8F9FB]":"bg-[#004AAC] text-white"}`,children:[n?i.jsx(Oa,{className:"w-3.5 h-3.5"}):i.jsx(yi,{className:"w-3.5 h-3.5"}),"Reply to Client",n&&i.jsx("span",{className:"rounded bg-[#E5E7EB] px-1.5 py-0.5 text-[9px] uppercase tracking-wider text-[#6B7280]",children:"Locked"})]}),i.jsxs("button",{type:"button",onClick:()=>o(!0),disabled:n,className:`flex-1 flex items-center justify-center gap-1.5 py-2 transition-colors ${c?`bg-[#92400E] text-white ${n?"cursor-default":""}`:"bg-white text-[#9CA3AF] hover:bg-[#F8F9FB]"}`,children:[i.jsx(Oa,{className:"w-3.5 h-3.5"}),"Internal Note"]})]}),n?i.jsxs("p",{className:"text-xs font-bold flex items-center gap-1.5 text-[#92400E] bg-[#FFFBEB] border border-[#FDE68A] px-2.5 py-1.5 rounded-md",children:[i.jsx(Oa,{className:"w-3 h-3 shrink-0"}),"Internal team note"]}):c?i.jsxs("p",{className:"text-xs font-bold flex items-center gap-1.5 text-[#92400E] bg-[#FFFBEB] border border-[#FDE68A] px-2.5 py-1.5 rounded-md",children:[i.jsx(Oa,{className:"w-3 h-3 shrink-0"}),"Only your team will see this â it will never be shown to the client."]}):i.jsxs("p",{className:"text-xs font-medium flex items-center gap-1.5 text-[#0369A1] bg-[#E0F2FE] border border-[#BAE6FD] px-2.5 py-1.5 rounded-md",children:[i.jsx(yi,{className:"w-3 h-3 shrink-0"}),"The client will see this reply in their portal."]}),i.jsx(cE,{onSubmit:(d,f)=>e(d,f,c),isSubmitting:t,placeholder:c?"Leave an internal team note...":"Reply to the client..."})]})}const Wp=new Map;async function Aq(e,t){const n=`${t}:${e}`,a=Wp.get(n);if(a)return a;const o=(async()=>{const c=Date.now()+36e4;for(let d=0;Date.now()<c;d++){const f=await fetch(`/api/${t?"client/":""}storage/videos/fallback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({objectPath:e})});if(f.status===429){await new Promise(p=>setTimeout(p,Math.min(2e3*(d+1),1e4)));continue}const h=await f.json().catch(()=>({}));if(!f.ok)throw new Error(h.error||"This video could not be prepared for your browser.");if(h.objectPath!==`${e}.webm`)throw new Error("Video processing returned an unexpected file.");return h.objectPath}throw new Error("Video processing is busy. Please try again.")})();Wp.set(n,o);try{return await o}finally{Wp.delete(n)}}function _q(){return typeof document>"u"?!1:!!document.createElement("video").canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')}function Pc({objectPath:e,client:t=!1,className:n,onError:a,...o}){const c=`/api/${t?"client/":""}storage`,d=`${c}${e}
49`,[f,h]=x.useState(null),[p,y]=x.useState(null),[v,b]=x.useState(!1),S=x.useRef(0),E=x.useRef(e);E.current=e;const w=x.useCallback(async()=>{const C=++S.current;b(!0),y(null);try{const A=await Aq(e,t);S.current===C&&E.current===e&&h(`${c}${A}`)}catch(A){S.current===C&&E.current===e&&y(A instanceof Error?A.message:"This video could not be played.")}finally{S.current===C&&E.current===e&&b(!1)}},[e,t,c]);return x.useEffect(()=>(++S.current,y(null),_q()?(b(!1),h(d)):(h(null),w()),()=>{++S.current}),[d,w]),v||!f||p?i.jsx("div",{className:`flex min-h-32 items-center justify-center bg-black/90 p-4 text-center text-xs text-white ${n??""}`,children:p?i.jsxs("div",{children:[i.jsx("p",{children:p}),i.jsx("button",{type:"button",className:"mt-2 underline",onClick:()=>{w()},children:"Retry video"})]}):"Preparing video for playback..."}):i.jsx("video",{...o,src:f,className:n,onError:C=>{a?.(C),f===d?w():y("This video could not be played in your browser. Please retry.")}})}function Ej(e,[t,n]){return Math.min(n,Math.max(t,e))}var kq=x.createContext(void 0);function em(e){const t=x.useContext(kq);return e||t||"ltr"}function ly(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Tq=[" ","Enter","ArrowUp","ArrowDown"],Mq=[" ","Enter"],Ei="Select",[tm,nm,Oq]=Sf(Ei),[Oi]=ss(Ei,[Oq,Pr]),sm=Pr(),[Dq,qr]=Oi(Ei),[Rq,Fq]=Oi(Ei),Pq="SelectProvider";function fE(e){const{__scopeSelect:t,children:n,open:a,defaultOpen:o,onOpenChange:c,value:d,defaultValue:f,onValueChange:h,dir:p,name:y,autoComplete:v,disabled:b,required:S,form:E,internal_do_not_use_render:w}=e,C=sm(t),[A,j]=x.useState(null),[M,R]=x.useState(null),[T,D]=x.useState(!1),F=em(p),[k,z]=ua({prop:a,defaultProp:o??!1,onChange:c,caller:Ei}),[X,q]=ua({prop:d,defaultProp:f,onChange:h,caller:Ei}),Y=x.useRef(null),ne=A?!!E||!!A.closest("form"):!0,[Z,me]=x.useState(new Set),L=Vs(),J=Array.from(Z).map(W=>W.props.value).join(";"),ee=x.useCallback(W=>{me(ue=>new Set(ue).add(W))},[]),te=x.useCallback(W=>{me(ue=>{const ce=new Set(ue);return ce.delete(W),ce})},[]),O={required:S,trigger:A,onTriggerChange:j,valueNode:M,onValueNodeChange:R,valueNodeHasChildren:T,onValueNodeHasChildrenChange:D,contentId:L,value:X,onValueChange:q,open:k,onOpenChange:z,dir:F,triggerPointerDownPosRef:Y,disabled:b,name:y,autoComplete:v,form:E,nativeOptions:Z,nativeSelectKey:J,isFormControl:ne};return i.jsx(Dx,{...C,children:i.jsx(Dq,{scope:t,...O,children:i.jsx(tm.Provider,{scope:t,children:i.jsx(Rq,{scope:t,onNativeOptionAdd:ee,onNativeOptionRemove:te,children:Qq(w)?w(O):n})})})})}fE.displayName=Pq;var mE=e=>{const{__scopeSelect:t,children:n,...a}=e;return i.jsx(fE,{__scopeSelect:t,...a,internal_do_not_use_render:({isFormControl:o})=>i.jsxs(i.Fragment,{children:[n,o?i.jsx(FE,{__scopeSelect:t}):null]})})};mE.displayName=Ei;var hE="SelectTrigger",cy=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...o}=e,c=sm(n),d=qr(hE,n),f=d.disabled||a,h=nt(t,d.onTriggerChange),p=nm(n),y=x.useRef("touch"),[v,b,S]=PE(w=>{const C=p().filter(M=>!M.disabled),A=C.find(M=>M.value===d.value),j=BE(C,w,A);j!==void 0&&d.onValueChange(j.value)}),E=w=>{f||(d.onOpenChange(!0),S()),w&&(d.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return i.jsx(Gc,{asChild:!0,...c,children:i.jsx(Ie.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":am(d.value)?"":void 0,...o,ref:h,onClick:be(o.onClick,w=>{w.currentTarget.focus(),y.current!=="mouse"&&E(w)}),onPointerDown:be(o.onPointerDown,w=>{y.current=w.pointerType;const C=w.target;C.hasPointerCapture(w.pointerId)&&C.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(E(w),w.preventDefault())}),onKeyDown:be(o.onKeyDown,w=>{const C=v.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&b(w.key),!(C&&w.key===" ")&&Tq.includes(w.key)&&(E(),w.preventDefault())})})})});cy.displayName=hE;var pE="SelectValue",gE=x.forwardRef((e,t)=>
49{const{__scopeSelect:n,className:a,style:o,children:c,placeholder:d="",...f}=e,h=qr(pE,n),{onValueNodeHasChildrenChange:p}=h,y=c!==void 0,v=nt(t,h.onValueNodeChange);jn(()=>{p(y)},[p,y]);const b=am(h.value);return i.jsx(Ie.span,{...f,asChild:b?!1:f.asChild,ref:v,style:{pointerEvents:"none"},children:i.jsx(x.Fragment,{children:b?d:c},b?"placeholder":"value")})});gE.displayName=pE;var Bq="SelectIcon",xE=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...o}=e;return i.jsx(Ie.span,{"aria-hidden":!0,...o,ref:t,children:a||"â¼"})});xE.displayName=Bq;var yE="SelectPortal",[qq,Lq]=Oi(yE,{forceMount:void 0}),vE=e=>{const{__scopeSelect:t,forceMount:n,...a}=e;return i.jsx(qq,{scope:e.__scopeSelect,forceMount:n,children:i.jsx(_i,{asChild:!0,...a})})};vE.displayName=yE;var Or="SelectContent",uy=x.forwardRef((e,t)=>{const n=Lq(Or,e.__scopeSelect),{forceMount:a=n.forceMount,...o}=e,c=qr(Or,e.__scopeSelect),[d,f]=x.useState();return jn(()=>{f(new DocumentFragment)},[]),i.jsx(Hn,{present:a||c.open,children:({present:h})=>h?i.jsx(jE,{...o,ref:t}):i.jsx(bE,{...o,fragment:d})})});uy.displayName=Or;var bE=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,fragment:o}=e;return o?rl.createPortal(i.jsx(wE,{scope:n,children:i.jsx(tm.Slot,{scope:n,children:i.jsx("div",{ref:t,children:a})})}),o):null});bE.displayName="SelectContentFragment";var zs=10,[wE,Lr]=Oi(Or),Uq="SelectContentImpl",zq=Er("SelectContent.RemoveScroll"),jE=x.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:a="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:c,onPointerDownOutside:d,side:f,sideOffset:h,align:p,alignOffset:y,arrowPadding:v,collisionBoundary:b,collisionPadding:S,sticky:E,hideWhenDetached:w,avoidCollisions:C,...A}=e,j=qr(Or,n),[M,R]=x.useState(null),[T,D]=x.useState(null),F=nt(t,R),[k,z]=x.useState(null),[X,q]=x.useState(null),Y=nm(n),[ne,Z]=x.useState(!1),me=x.useRef(!1);x.useEffect(()=>{if(M)return Vf(M)},[M]),If();const L=x.useCallback(he=>{const[Te,...le]=Y().map(ot=>ot.ref.current),[Re]=le.slice(-1),Pe=document.activeElement;for(const ot of he)if(ot===Pe||(ot?.scrollIntoView({block:"nearest"}),ot===Te&&T&&(T.scrollTop=0),ot===Re&&T&&(T.scrollTop=T.scrollHeight),ot?.focus(),document.activeElement!==Pe))return},[Y,T]),J=x.useCallback(()=>L([k,M]),[L,k,M]);x.useEffect(()=>{ne&&J()},[ne,J]);const{onOpenChange:ee,triggerPointerDownPosRef:te}=j;x.useEffect(()=>{if(M){let he={x:0,y:0};const Te=Re=>{he={x:Math.abs(Math.round(Re.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(Re.pageY)-(te.current?.y??0))}},le=Re=>{he.x<=10&&he.y<=10?Re.preventDefault():Re.composedPath().includes(M)||ee(!1),document.removeEventListener("pointermove",Te),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",Te),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Te),document.removeEventListener("pointerup",le,{capture:!0})}}},[M,ee,te]),x.useEffect(()=>{const he=()=>ee(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[ee]);const[O,W]=PE(he=>{const Te=Y().filter(Pe=>!Pe.disabled),le=Te.find(Pe=>Pe.ref.current===document.activeElement),Re=BE(Te,he,le);Re&&setTimeout(()=>Re.ref.current?.focus())}),ue=x.useCallback((he,Te,le)=>{const Re=!me.current&&!le;(j.value!==void 0&&j.value===Te||Re)&&(z(he),Re&&(me.current=!0))},[j.value]),ce=x.useCallback(()=>M?.focus(),[M]),ye=x.useCallback((he,Te,le)=>{const Re=!me.current&&!le;(j.value!==void 0&&j.value===Te||Re)&&q(he)},[j.value]),Ee=a==="popper"?Ig:NE,xe=Ee===Ig?{side:f,sideOffset:h,align:p,alignOffset:y,arrowPadding:v,collisionBoundary:b,collisionPadding:S,sticky:E,hideWhenDetached:w,avoidCollisions:C}:{};return i.jsx(wE,{scope:n,content:M,viewport:T,onViewportChange:D,itemRefCallback:ue,selectedItem:k,onItemLeave:ce,itemTextRefCallback:ye,focusSelectedItem:J,selectedItemText:X,position:a,isPositioned:ne,searchRef:O,children:i.jsx(Zc,{as:zq,allowPinchZoom:!0,children:i.jsx(Qc,{asChild:!0,trapped:j.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:be(o,he=>{j.trigger?.focus({preventScroll:!0}),he.preventDefault()}),children:i.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:i.jsx(Ee,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:he=>he.preventDefault(),...A,...xe,onPlaced:()=>Z(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:be(A.onKeyDown,he=>{const Te=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!Te&&he.key.length===1&&W(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Re=Y().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);
vendor: 8,822 bytes, line 49
49if(["ArrowUp","End"].includes(he.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const Pe=he.target,ot=Re.indexOf(Pe);Re=Re.slice(ot+1)}setTimeout(()=>L(Re)),he.preventDefault()}})})})})})})});jE.displayName=Uq;var Iq="SelectItemAlignedPosition",NE=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...o}=e,c=qr(Or,n),d=Lr(Or,n),[f,h]=x.useState(null),[p,y]=x.useState(null),v=nt(t,y),b=nm(n),S=x.useRef(!1),E=x.useRef(!0),{viewport:w,selectedItem:C,selectedItemText:A,focusSelectedItem:j}=d,M=x.useCallback(()=>{if(c.trigger&&c.valueNode&&f&&p&&w&&C&&A){const F=c.trigger.getBoundingClientRect(),k=p.getBoundingClientRect(),z=c.valueNode.getBoundingClientRect(),X=A.getBoundingClientRect();if(c.dir!=="rtl"){const Pe=X.left-k.left,ot=z.left-Pe,Lt=F.left-ot,Nt=F.width+Lt,as=Math.max(Nt,k.width),gn=window.innerWidth-zs,zt=Ej(ot,[zs,Math.max(zs,gn-as)]);f.style.minWidth=Nt+"px",f.style.left=zt+"px"}else{const Pe=k.right-X.right,ot=window.innerWidth-z.right-Pe,Lt=window.innerWidth-F.right-ot,Nt=F.width+Lt,as=Math.max(Nt,k.width),gn=window.innerWidth-zs,zt=Ej(ot,[zs,Math.max(zs,gn-as)]);f.style.minWidth=Nt+"px",f.style.right=zt+"px"}const q=b(),Y=window.innerHeight-zs*2,ne=w.scrollHeight,Z=window.getComputedStyle(p),me=parseInt(Z.borderTopWidth,10),L=parseInt(Z.paddingTop,10),J=parseInt(Z.borderBottomWidth,10),ee=parseInt(Z.paddingBottom,10),te=me+L+ne+ee+J,O=Math.min(C.offsetHeight*5,te),W=window.getComputedStyle(w),ue=parseInt(W.paddingTop,10),ce=parseInt(W.paddingBottom,10),ye=F.top+F.height/2-zs,Ee=Y-ye,xe=C.offsetHeight/2,he=C.offsetTop+xe,Te=me+L+he,le=te-Te;if(Te<=ye){const Pe=q.length>0&&C===q[q.length-1].ref.current;f.style.bottom="0px";const ot=p.clientHeight-w.offsetTop-w.offsetHeight,Lt=Math.max(Ee,xe+(Pe?ce:0)+ot+J),Nt=Te+Lt;f.style.height=Nt+"px"}else{const Pe=q.length>0&&C===q[0].ref.current;f.style.top="0px";const Lt=Math.max(ye,me+w.offsetTop+(Pe?ue:0)+xe)+le;f.style.height=Lt+"px",w.scrollTop=Te-ye+w.offsetTop}f.style.margin=`${zs}px 0`,f.style.minHeight=O+"px",f.style.maxHeight=Y+"px",a?.(),requestAnimationFrame(()=>S.current=!0)}},[b,c.trigger,c.valueNode,f,p,w,C,A,c.dir,a]);jn(()=>M(),[M]);const[R,T]=x.useState();jn(()=>{p&&T(window.getComputedStyle(p).zIndex)},[p]);const D=x.useCallback(F=>{F&&E.current===!0&&(M(),j?.(),E.current=!1)},[M,j]);return i.jsx(Vq,{scope:n,contentWrapper:f,shouldExpandOnScrollRef:S,onScrollButtonChange:D,children:i.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:i.jsx(Ie.div,{...o,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});NE.displayName=Iq;var $q="SelectPopperPosition",Ig=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:o=zs,...c}=e,d=sm(n);return i.jsx(Pf,{...d,...c,ref:t,align:a,collisionPadding:o,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ig.displayName=$q;var[Vq,dy]=Oi(Or,{}),$g="SelectViewport",CE=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...o}=e,c=Lr($g,n),d=dy($g,n),f=nt(t,c.onViewportChange),h=x.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),i.jsx(tm.Slot,{scope:n,children:i.jsx(Ie.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:be(o.onScroll,p=>{const y=p.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=d;if(b?.current&&v){const S=Math.abs(h.current-y.scrollTop);if(S>0){const E=window.innerHeight-zs*2,w=parseFloat(v.style.minHeight),C=parseFloat(v.style.height),A=Math.max(w,C);if(A<E){const j=A+S,M=Math.min(E,j),R=j-M;v.style.height=M+"px",v.style.bottom==="0px"&&(y.scrollTop=R>0?R:0,v.style.justifyContent="flex-end")}}}h.current=y.scrollTop})})})]})});CE.displayName=$g;var SE="SelectGroup",[Hq,Yq]=Oi(SE),EE=x.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,o=Vs();return i.jsx(Hq,{scope:n,id:o,children:i.jsx(Ie.div,{role:"group","aria-labelledby":o,...a,ref:t})})});EE.displayName=SE;var AE="SelectLabel",fy=x.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,o=Yq(AE,n);return i.jsx(Ie.div,{id:o.id,...a,ref:t})});fy.displayName=AE;var yf="SelectItem",[Kq,_E]=Oi(yf),my=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:o=!1,textValue:c,...d}=e,f=qr(yf,n),h=Lr(yf,n),p=f.value===a,[y,v]=x.useState(c??""),[b,S]=x.useState(!1),E=Wn(M=>h.itemRefCallback?.(M,a,o)),w=nt(t,E),C=Vs(),A=x.useRef("touch"),j=()=>{o||(f.onValueChange(a),f.onOpenChange(!1))};return i.jsx(Kq,{scope:n,value:a,disabled:o,textId:C,isSelected:p,onItemTextChange:x.useCallback(M=>{v(R=>R||(M?.textContent??"").trim())},[]),children:i.jsx(tm.ItemSlot,{scope:n,value:a,disabled:o,textValue:y,children:i.jsx(Ie.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":p&&b,"data-state":p?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...d,ref:w,onFocus:be(d.onFocus,()=>S(!0)),onBlur:be(d.onBlur,()=>S(!1)),onClick:be(d.onClick,()=>{A.current!=="mouse"&&j()}),onPointerUp:be(d.onPointerUp,()=>{A.current==="mouse"&&j()}),onPointerDown:be(d.onPointerDown,M=>{A.current=M.pointerType}),onPointerMove:be(d.onPointerMove,M=>{A.current=M.pointerType,o?h.onItemLeave?.():A.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(d.onPointerLeave,M=>{M.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:be(d.onKeyDown,M=>{h.searchRef?.current!==""&&M.key===" "||(Mq.includes(M.key)&&j(),M.key===" "&&M.preventDefault())})})})})});my.displayName=yf;var bc="SelectItemText",kE=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:o,...c}=e,d=qr(bc,n),f=Lr(bc,n),h=_E(bc,n),p=Fq(bc,n),[y,v]=x.useState(null),b=Wn(j=>f.itemTextRefCallback?.(j,h.value,h.disabled)),S=nt(t,v,h.onItemTextChange,b),E=y?.textContent,w=x.useMemo(()=>i.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=p;return jn(()=>(C(w),()=>A(w)),[C,A,w]),i.jsxs(i.Fragment,{children:[i.jsx(Ie.span,{id:h.textId,...c,ref:S}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!am(d.value)?rl.createPortal(c.children,d.valueNode):null]})});kE.displayName=bc;var TE="SelectItemIndicator",ME=x.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return _E(TE,n).isSelected?i.jsx(Ie.span,{"aria-hidden":!0,...a,ref:t}):null});ME.displayName=TE;var Vg="SelectScrollUpButton",hy=x.forwardRef((e,t)=>{const n=Lr(Vg,e.__scopeSelect),a=dy(Vg,e.__scopeSelect),[o,c]=x.useState(!1),d=nt(t,a.onScrollButtonChange);return jn(()=>{if(n.viewport&&n.isPositioned){let f=function(){const p=h.scrollTop>0;c(p)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),o?i.jsx(OE,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});hy.displayName=Vg;var Hg="SelectScrollDownButton",py=x.forwardRef((e,t)=>{const n=Lr(Hg,e.__scopeSelect),a=dy(Hg,e.__scopeSelect),[o,c]=x.useState(!1),d=nt(t,a.onScrollButtonChange);return jn(()=>{if(n.viewport&&n.isPositioned){let f=function(){const p=h.scrollHeight-h.clientHeight,y=Math.ceil(h.scrollTop)<p;c(y)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),o?i.jsx(OE,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});py.displayName=Hg;var OE=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...o}=e,c=Lr("SelectScrollButton",n),d=x.useRef(null),f=nm(n),h=x.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return x.useEffect(()=>()=>h(),[h]),jn(()=>{f().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),i.jsx(Ie.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(a,50))}),onPointerMove:be(o.onPointerMove,()=>{c.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(a,50))}),onPointerLeave:be(o.onPointerLeave,()=>{h()})})}),Gq="SelectSeparator",gy=x.forwardRef((e,t)=>
49{const{__scopeSelect:n,...a}=e;return i.jsx(Ie.div,{"aria-hidden":!0,...a,ref:t})});gy.displayName=Gq;var DE="SelectArrow",Wq=x.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,o=sm(n);return Lr(DE,n).position==="popper"?i.jsx(Bf,{...o,...a,ref:t}):null});Wq.displayName=DE;var RE="SelectBubbleInput",FE=x.forwardRef(({__scopeSelect:e,...t},n)=>{const a=qr(RE,e),{value:o,onValueChange:c,required:d,disabled:f,name:h,autoComplete:p,form:y}=a,{nativeOptions:v,nativeSelectKey:b}=a,S=x.useRef(null),E=nt(n,S),w=o??"",C=ly(w),A=Array.from(v).some(j=>(j.props.value??"")==="");return x.useEffect(()=>{const j=S.current;if(!j)return;const M=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(M,"value").set;if(C!==w&&T){const D=new Event("change",{bubbles:!0});T.call(j,w),j.dispatchEvent(D)}},[C,w]),i.jsxs(Ie.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:h,autoComplete:p,disabled:f,form:y,onChange:j=>c(j.target.value),...t,style:{...mN,...t.style},ref:E,defaultValue:w,children:[am(o)&&!A?i.jsx("option",{value:""}):null,Array.from(v)]},b)});FE.displayName=RE;function Qq(e){return typeof e=="function"}function am(e){return e===""||e===void 0}function PE(e){const t=Wn(e),n=x.useRef(""),a=x.useRef(0),o=x.useCallback(d=>{const f=n.current+d;t(f),(function h(p){n.current=p,window.clearTimeout(a.current),p!==""&&(a.current=window.setTimeout(()=>h(""),1e3))})(f)},[t]),c=x.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,o,c]}function BE(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let d=Zq(e,Math.max(c,0));o.length===1&&(d=d.filter(p=>p!==n));const h=d.find(p=>p.textValue.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}function Zq(e,t){return e.map((n,a)=>e[(t+a)%e.length])}const en=mE,Aj=EE,tn=gE,Ht=x.forwardRef(({className:e,children:t,...n},a)=>i.jsxs(cy,{ref:a,className:ie("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,i.jsx(xE,{asChild:!0,children:i.jsx(il,{className:"h-4 w-4 opacity-50"})})]}));Ht.displayName=cy.displayName;const qE=x.forwardRef(({className:e,...t},n)=>i.jsx(hy,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(mx,{className:"h-4 w-4"})}));qE.displayName=hy.displayName;const LE=x.forwardRef(({className:e,...t},n)=>i.jsx(py,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(il,{className:"h-4 w-4"})}));LE.displayName=py.displayName;const Yt=x.forwardRef(({className:e,children:t,position:n="popper",...a},o)=>i.jsx(vE,{children:i.jsxs(uy,{ref:o,className:ie("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...a,children:[i.jsx(qE,{}),i.jsx(CE,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(LE,{})]})}));Yt.displayName=uy.displayName;const Yg=x.forwardRef(({className:e,...t},n)=>i.jsx(fy,{ref:n,className:ie("px-2 py-1.5 text-sm font-semibold",e),...t}));Yg.displayName=fy.displayName;const mt=x.forwardRef(({className:e,children:t,...n},a)=>i.jsxs(my,{ref:a,className:ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(ME,{children:i.jsx(Vc,{className:"h-4 w-4"})})}),i.jsx(kE,{children:t})]}));mt.displayName=my.displayName;const UE=x.forwardRef(({className:e,...t},n)=>i.jsx(gy,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",e),...t}));UE.displayName=gy.displayName;const ru=x.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:ie("w-full caption-bottom text-sm",e),...t})}));ru.displayName="Table";const iu=x.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:ie("[&_tr]:border-b",e),...t}));iu.displayName="TableHeader";const ou=x.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:ie("[&_tr:last-child]:border-0",e),...t}));ou.displayName="TableBody";const Xq=x.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:ie("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Xq.displayName="TableFooter";const Gn=x.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:ie("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Gn.displayName="TableRow";const Xt=x.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:ie("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Xt.displayName="TableHead";const Ot=x.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:ie("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Ot.displayName="TableCell";const Jq=x.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:ie("mt-4 text-sm text-muted-foreground",e),...t}));Jq.displayName="TableCaption";const eL=_f("whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover-elevate ",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-xs",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-xs",outline:"text-foreground border [border-color:var(--badge-outline)]"}},defaultVariants:{variant:"default"}});function ca({className:e,variant:t,...n}){return i.jsx("div",{className:ie(eL({variant:t}),e),...n})}function tL(e,t){const[n,a]=x.useState(e);return x.useEffect(()=>{const o=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}var zE="AlertDialog",[nL]=ss(zE,[SS]),$a=SS(),IE=e=>{const{__scopeAlertDialog:t,...n}=e,a=$a(t);return i.jsx(Hx,{...a,...n,modal:!0})};IE.displayName=zE;var sL="AlertDialogTrigger",$E=x.forwardRef((e,t)=>
49{const{__scopeAlertDialog:n,...a}=e,o=$a(n);return i.jsx(Yx,{...o,...a,ref:t})});$E.displayName=sL;var aL="AlertDialogPortal",VE=e=>{const{__scopeAlertDialog:t,...n}=e,a=$a(t);return i.jsx(Gx,{...a,...n})};VE.displayName=aL;var rL="AlertDialogOverlay",HE=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=$a(n);return i.jsx(Yf,{...o,...a,ref:t})});HE.displayName=rL;var YE="AlertDialogContent",[iL,oL]=nL(YE),KE=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...o}=e,c=$a(n),d=x.useRef(null),f=nt(t,d),h=x.useRef(null);return i.jsx(iL,{scope:n,cancelRef:h,children:i.jsx(Kf,{role:"alertdialog",...c,...o,ref:f,onOpenAutoFocus:be(o.onOpenAutoFocus,p=>{p.preventDefault(),h.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:a})})});KE.displayName=YE;var lL="AlertDialogTitle",GE=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=$a(n);return i.jsx(Gf,{...o,...a,ref:t})});GE.displayName=lL;var cL="AlertDialogDescription",WE=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=$a(n);return i.jsx(Wf,{...o,...a,ref:t})});WE.displayName=cL;var uL="AlertDialogAction",QE=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,o=$a(n);return i.jsx(Qf,{...o,...a,ref:t})});QE.displayName=uL;var ZE="AlertDialogCancel",XE=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:o}=oL(ZE,n),c=$a(n),d=nt(t,o);return i.jsx(Qf,{...c,...a,ref:d})});XE.displayName=ZE;var dL=IE,fL=$E,mL=VE,JE=HE,eA=KE,tA=QE,nA=XE,sA=GE,aA=WE;const ul=dL,dl=fL,hL=mL,rA=x.forwardRef(({className:e,...t},n)=>i.jsx(JE,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));rA.displayName=JE.displayName;const Di=x.forwardRef(({className:e,...t},n)=>i.jsxs(hL,{children:[i.jsx(rA,{}),i.jsx(eA,{ref:n,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Di.displayName=eA.displayName;const Ri=({className:e,...t})=>i.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ri.displayName="AlertDialogHeader";const Fi=({className:e,...t})=>i.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fi.displayName="AlertDialogFooter";const Pi=x.forwardRef(({className:e,...t},n)=>i.jsx(sA,{ref:n,className:ie("text-lg font-semibold",e),...t}));Pi.displayName=sA.displayName;const Bi=x.forwardRef(({className:e,...t},n)=>i.jsx(aA,{ref:n,className:ie("text-sm text-muted-foreground",e),...t}));Bi.displayName=aA.displayName;const qi=x.forwardRef(({className:e,...t},n)=>i.jsx(tA,{ref:n,className:ie(Oc(),e),...t}));qi.displayName=tA.displayName;const Li=x.forwardRef(({className:e,...t},n)=>i.jsx(nA,{ref:n,className:ie(Oc({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Li.displayName=nA.displayName;function Dr(e){const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e)}function iA(e){const t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),a=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${a}`}function lu(e){if(!e)return"";const[t,n="00"]=e.split(":"),a=Number(t);if(!Number.isInteger(a)||a<0||a>23)return e;const o=a>=12?"PM":"AM";return`${a%12||12}:${n} ${o} ET`}const pL=["facebook","instagram","tiktok","pinterest","linkedin"],gL=["needs_revision","pending","needs_caption","approved"],_j="growth-shark-admin-selected-client",xL={social_media:"Social Media",design:"Design",content:"Content",web_dev:"Web Dev",seo:"SEO",email_sms:"Email / SMS"};function Ui({status:e}){const n={needs_caption:{label:"Draft",bg:"#FFF4E0",text:"#8A5A0B"},pending:{label:"Pending Approval",bg:"#FFF4E0",text:"#8A5A0B"},needs_revision:{label:"Needs Revision",bg:"#FCEBEB",text:"#A32D2D"},approved:{label:"Approved",bg:"#E3F7F2",text:"#0F6E56"},posted:{label:"Posted",bg:"#E3F7F2",text:"#0F6E56"}}[e];return i.jsx(ca,{variant:"secondary",className:"font-bold uppercase tracking-wider text-[10px] border-transparent hover:opacity-100",style:{backgroundColor:n.bg,color:n.text},children:n.label})}function oA({priority:e}){if(e==="normal")return null;const t=e==="urgent"?{label:"Urgent",className:"bg-[#FCEBEB] text-[#A32D2D] border-[#F5C2C2]"}:{label:"High Priority",className:"bg-[#FFF4E0] text-[#8A5A0B] border-[#F4D9A8]"};return i.jsx(ca,{className:`font-bold uppercase tracking-wider text-[10px] ${t.className}`,children:t.label})}function yL({post:e,open:t,onOpenChange:n}){const[a,o]=x.useState(0),c=Kt(),d=e?.media??[],f=d[a],{data:h,isLoading:p}=rS(e?.id??0,{query:{enabled:t&&!!e,queryKey:$x(e?.id??0)}});return x.useEffect(()=>{t&&h!==void 0&&c.invalidateQueries({queryKey:hi()})},[t,h,c]),i.jsx(Vn,{open:t,onOpenChange:y=>{n(y),y||o(0)}
49,children:i.jsx(Rn,{className:"max-w-2xl border-[#E9EBF0]",children:e&&i.jsxs(i.Fragment,{children:[i.jsx(Fn,{children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Pn,{className:"text-[#111827] font-display",children:e.title||"Untitled Post"}),i.jsx(Ui,{status:e.status}),i.jsx(oA,{priority:e.priority})]})}),i.jsxs("div",{className:"space-y-5",children:[i.jsx("div",{className:"rounded-lg border border-[#E9EBF0] overflow-hidden bg-black/5 flex items-center justify-center min-h-[220px]",children:f?f.mediaType==="video"?i.jsx(Pc,{objectPath:f.url,controls:!0,preload:"metadata",className:"w-full max-h-[350px]"}):i.jsx("img",{src:`/api/storage${f.url}`,alt:"Post media",className:"w-full max-h-[350px] object-contain"}):i.jsxs("div",{className:"text-center p-8 text-[#9CA3AF]",children:[i.jsx(Fa,{className:"w-10 h-10 mx-auto mb-2 opacity-20"}),i.jsx("p",{className:"text-sm font-bold",children:"No media attached"})]})}),d.length>1&&i.jsx("div",{className:"flex gap-2 overflow-x-auto",children:d.map((y,v)=>i.jsx("button",{type:"button",onClick:()=>o(v),className:`w-14 h-14 rounded-md overflow-hidden border-2 shrink-0 ${v===a?"border-[#00CEA6]":"border-transparent"}`,children:y.mediaType==="video"?i.jsx("div",{className:"w-full h-full bg-black/80 flex items-center justify-center",children:i.jsx(za,{className:"w-4 h-4 text-white"})}):i.jsx("img",{src:`/api/storage${y.url}`,className:"w-full h-full object-cover",alt:""})},v))}),i.jsxs("div",{className:"space-y-2 pt-1",children:[i.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[#9CA3AF]",children:"Comments"}),i.jsx(au,{comments:h,isLoading:p})]}),i.jsx("div",{className:"space-y-3",children:e.platforms.map(y=>{const v=`caption${y.charAt(0).toUpperCase()+y.slice(1)}`,b=e[v];return i.jsxs("div",{className:"rounded-md border border-[#E9EBF0] overflow-hidden",children:[i.jsx("div",{className:"bg-[#F8F9FB] px-3 py-2 border-b border-[#E9EBF0] font-bold capitalize text-xs text-[#111827]",children:y==="linkedin"?"LinkedIn":y}),i.jsx("div",{className:"p-3 text-sm text-[#374151] whitespace-pre-wrap bg-white",children:b||i.jsx("span",{className:"text-[#9CA3AF] italic",children:"No caption written yet."})})]},y)})})]})]})})})}function cu({platforms:e}){return i.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:e.map(t=>i.jsx(ca,{variant:"outline",className:"capitalize text-[10px] px-2 py-0.5 border-[#D1D5DB] text-[#374151] font-bold",children:t==="linkedin"?"LinkedIn":t},t))})}function vL(){const e=U3(),t=x.useMemo(()=>new URLSearchParams(e).get("department")??void 0,[e]),[n,a]=x.useState(()=>typeof window>"u"?"all":window.localStorage.getItem(_j)??"all"),[o,c]=x.useState("all"),[d,f]=x.useState("all"),[h,p]=x.useState("all"),[y,v]=x.useState("active"),[b,S]=x.useState(""),E=tL(b,300),[w,C]=x.useState(null),{data:A}=Br(),j=Kt(),{toast:M}=pn(),R=n!=="all"?A?.find(q=>q.id.toString()===n):void 0;x.useEffect(()=>{window.localStorage.setItem(_j,n)},[n]),x.useEffect(()=>{!A||n==="all"||A.some(q=>String(q.id)===n)||a("all")},[A,n]);const T=x.useMemo(()=>({...n!=="all"?{clientId:Number(n)}:{},...t?{department:t}:{}}),[n,t]),{data:D}=j5(T),F=x.useMemo(()=>({...n!=="all"?{clientId:Number(n)}:{},...o!=="all"?{platform:o}:{},...d!=="all"?{status:d}:{},...t?{department:t}:{},...E?{search:E}:{},...h!=="all"?{month:h}:{},view:y}),[n,o,d,t,E,h,y]),{data:k,isLoading:z}=Ux(F),X=aS({mutation:{onSuccess:()=>{M({title:"Post deleted"}),j.invalidateQueries({queryKey:hi()}),j.invalidateQueries({queryKey:Uf()})}}});return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1600px] mx-auto space-y-8",children:[i.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827]",children:"Content Overview"}),i.jsx("p",{className:"text-[#374151] mt-1 font-medium",children:"Manage and track all client workflows."})]}),i.jsx(xs,{href:"/admin/posts/new",className:"inline-flex",children:i.jsxs(ve,{className:"font-bold btn-primary h-11 px-6",children:[i.jsx(tf,{className:"w-5 h-5 mr-2"}),"Create Post"]})})]}
49),i.jsx(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] bg-[#F8F9FB]",children:i.jsxs(Dn,{className:"p-4 flex flex-col md:flex-row items-start md:items-center gap-3",children:[i.jsxs("div",{className:"flex items-center gap-2 text-[#374151] font-bold text-sm shrink-0",children:[i.jsx(kf,{className:"w-4 h-4 text-[#004AAC]"}),"Viewing:"]}),i.jsxs(en,{value:n,onValueChange:a,children:[i.jsx(Ht,{className:"w-full md:w-[280px] bg-white border-[#E9EBF0] h-11 font-bold text-[#111827]",children:i.jsx(tn,{placeholder:"All Clients"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Clients"}),A?.map(q=>i.jsx(mt,{value:q.id.toString(),children:q.name},q.id))]})]}),t&&i.jsxs(ca,{variant:"secondary",className:"h-9 px-3 gap-2 bg-white border border-[#E9EBF0] text-[#374151] font-bold",children:["Department: ",xL[t]??t,i.jsx(xs,{href:"/admin",children:i.jsx(Mf,{className:"w-3.5 h-3.5 cursor-pointer hover:text-destructive"})})]}),R&&i.jsxs("span",{className:"text-sm text-[#9CA3AF] font-medium",children:["Stats and posts below are scoped to ",i.jsx("span",{className:"font-bold text-[#374151]",children:R.name}),"."]})]})}),D&&i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-4",children:[{label:"Draft",value:D.needsCaption},{label:"Pending",value:D.pending},{label:"Needs Revision",value:D.needsRevision},{label:"Approved",value:D.approved},{label:"Posted",value:D.posted},{label:"Total Active",value:D.total}].map(q=>i.jsx(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] overflow-hidden",children:i.jsxs(Dn,{className:"p-5 flex flex-col justify-center relative",children:[i.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-[#9CA3AF] mb-1",children:q.label}),i.jsx("span",{className:"text-3xl font-bold font-display text-[#111827]",children:q.value}),q.label==="Total Active"&&i.jsx("div",{className:"absolute right-0 bottom-0 w-16 h-16 brand-gradient opacity-10 rounded-tl-full pointer-events-none"})]})},q.label))}),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] overflow-hidden",children:[i.jsxs("div",{className:"p-4 border-b border-[#E9EBF0] bg-[#F8F9FB] space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(ve,{type:"button",variant:y==="active"?"default":"outline",onClick:()=>{v("active"),f("all")},className:y==="active"?"btn-primary font-bold":"font-bold bg-white",children:[i.jsx(UR,{className:"w-4 h-4 mr-2"}),"Active Posts"]}),i.jsxs(ve,{type:"button",variant:y==="published"?"default":"outline",onClick:()=>{v("published"),f("all")},className:y==="published"?"btn-primary font-bold":"font-bold bg-white",children:[i.jsx(qD,{className:"w-4 h-4 mr-2"}),"Published Archive",D?i.jsxs("span",{className:"ml-2 opacity-75",children:["(",D.posted,")"]}):null]})]}),i.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Tc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#9CA3AF]"}),i.jsx(ze,{placeholder:"Search...",value:b,onChange:q=>S(q.target.value),className:"pl-9 bg-white w-full border-[#E9EBF0]"})]}),i.jsxs("div",{className:"flex flex-wrap gap-4 w-full md:w-auto",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs font-bold text-[#6B7280] whitespace-nowrap",children:"Posting month"}),i.jsx(ze,{type:"month",value:h==="all"?"":h,onChange:q=>p(q.target.value||"all"),"aria-label":"Filter by intended posting month",className:"w-[155px] bg-white border-[#E9EBF0]"})]}),i.jsxs(en,{value:o,onValueChange:c,children:[i.jsx(Ht,{className:"w-[150px] bg-white border-[#E9EBF0]",children:i.jsx(tn,{placeholder:"All Platforms"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Platforms"}),pL.map(q=>i.jsx(mt,{value:q,className:"capitalize",children:q==="linkedin"?"LinkedIn":q},q))]})]}),i.jsxs(en,{value:d,onValueChange:f,children:[i.jsx(Ht,{className:"w-[180px] bg-white border-[#E9EBF0]",children:i.jsx(tn,{placeholder:"All Statuses"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Statuses"}),(y==="published"?["posted"]:gL).map(q=>i.jsx(mt,{value:q,className:"capitalize",children:q.replace("_"," ")},q))]})]})]})]}),y==="active"&&i.jsx("p",{className:"text-xs font-medium text-[#6B7280]",children:"Posts needing revisions appear first, followed by items awaiting review, drafts, and approved posts."})]}),i.jsxs(ru,{children:[i.jsx(iu,{className:"bg-white",children:i.jsxs(Gn,{className:"border-[#
49E9EBF0]",children:[i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider",children:"Client"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider",children:"Media"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider",children:"Platforms"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider",children:"Status"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider",children:"Schedule"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider text-right",children:"Actions"})]})}),i.jsx(ou,{children:z?i.jsx(Gn,{children:i.jsx(Ot,{colSpan:6,className:"h-32 text-center text-[#9CA3AF]",children:i.jsxs("div",{className:"flex items-center justify-center gap-2 font-bold",children:[i.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-[#00CEA6] border-t-transparent animate-spin"}),"Loading posts..."]})})}):k&&k.length>0?k.map(q=>i.jsxs(Gn,{className:"group transition-colors hover:bg-[#F8F9FB] border-[#E9EBF0]",children:[i.jsxs(Ot,{children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("div",{className:"font-bold text-[#111827]",children:q.title||"Untitled Post"}),(q.unreadCommentCount??0)>0&&i.jsx(ca,{className:"bg-[#DBEAFE] text-[#1E40AF] border-[#BFDBFE] font-bold animate-pulse",children:"New Comment"}),i.jsx(oA,{priority:q.priority})]}),i.jsx("div",{className:"text-xs font-medium text-[#9CA3AF]",children:q.clientName})]}),i.jsx(Ot,{children:i.jsxs("div",{className:"flex items-center gap-2 text-[#374151]",children:[q.media.length>1?i.jsx(Hc,{className:"w-4 h-4 text-[#004AAC]"}):q.media[0]?.mediaType==="video"?i.jsx(za,{className:"w-4 h-4 text-[#004AAC]"}):i.jsx(Fa,{className:"w-4 h-4 text-[#004AAC]"}),i.jsx("span",{className:"text-xs uppercase tracking-wider font-bold",children:q.media.length>1?`Carousel (${q.media.length})`:q.media[0]?.mediaType||"None"})]})}),i.jsx(Ot,{children:i.jsx(cu,{platforms:q.platforms})}),i.jsx(Ot,{children:i.jsx(Ui,{status:q.status})}),i.jsxs(Ot,{children:[q.postingMonth&&i.jsxs("div",{className:"text-xs font-bold text-[#004AAC] mb-1",children:["Posting month: ",Jt(Dr(`${q.postingMonth}-01`),"MMMM yyyy")]}),q.scheduledDate?i.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-[#374151] whitespace-nowrap font-medium",children:[i.jsx(hx,{className:"w-3.5 h-3.5 text-[#9CA3AF]"}),Jt(Dr(q.scheduledDate),"MMM d, yyyy"),q.scheduledTime&&` ${lu(q.scheduledTime)}`]}):i.jsx("span",{className:"text-sm text-[#9CA3AF] italic",children:"Not scheduled"})]}),i.jsx(Ot,{className:"text-right",children:i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(ve,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-[#374151] hover:bg-[#374151]/10 hover:text-[#111827]",onClick:()=>C(q.id),children:i.jsx(eC,{className:"w-4 h-4"})}),i.jsx(xs,{href:`/admin/posts/${q.id}`,children:i.jsx(ve,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-[#004AAC] hover:bg-[#004AAC]/10 hover:text-[#004AAC]",children:i.jsx(XR,{className:"w-4 h-4"})})}),i.jsxs(ul,{children:[i.jsx(dl,{asChild:!0,children:i.jsx(ve,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-[#9CA3AF] hover:text-destructive hover:bg-destructive/10",children:i.jsx(Fr,{className:"w-4 h-4"})})}),i.jsxs(Di,{className:"border-[#E9EBF0]",children:[i.jsxs(Ri,{children:[i.jsx(Pi,{className:"text-[#111827] font-display",children:"Delete Post"}),i.jsxs(Bi,{className:"text-[#374151]",children:["Are you sure you want to delete this post for ",q.clientName,"? This action cannot be undone."]})]}),i.jsxs(Fi,{children:[i.jsx(Li,{className:"font-bold border-[#E5E7EB]",children:"Cancel"}),i.jsx(qi,{onClick:()=>X.mutate({id:q.id}),className:"bg-destructive hover:bg-destructive/90 text-white font-bold",children:"Delete"})]})]})]})]})})]},q.id)):i.jsx(Gn,{children:i.jsx(Ot,{colSpan:6,className:"h-48 text-center",children:i.jsxs("div",{className:"flex flex-col items-center justify-center text-[#9CA3AF]",children:[i.jsx("div",{className:"w-12 h-12 bg-[#F8F9FB] rounded-full flex items-center justify-center mb-3 border border-[#
49E9EBF0]",children:i.jsx(Tc,{className:"w-6 h-6 opacity-50"})}),i.jsx("p",{className:"font-bold text-[#111827]",children:"No items found"}),i.jsx("p",{className:"text-sm mt-1",children:"Try adjusting your filters or search query."})]})})})})]})]}),i.jsx(yL,{post:k?.find(q=>q.id===w)??null,open:w!==null,onOpenChange:q=>{q||C(null)}})]})}var rm="Popover",[lA]=ss(rm,[Pr]),uu=Pr(),[bL,Ur]=lA(rm),cA=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:o,onOpenChange:c,modal:d=!1}=e,f=uu(t),h=x.useRef(null),[p,y]=x.useState(!1),[v,b]=ua({prop:a,defaultProp:o??!1,onChange:c,caller:rm});return i.jsx(Dx,{...f,children:i.jsx(bL,{scope:t,contentId:Vs(),triggerRef:h,open:v,onOpenChange:b,onOpenToggle:x.useCallback(()=>b(S=>!S),[b]),hasCustomAnchor:p,onCustomAnchorAdd:x.useCallback(()=>y(!0),[]),onCustomAnchorRemove:x.useCallback(()=>y(!1),[]),modal:d,children:n})})};cA.displayName=rm;var uA="PopoverAnchor",wL=x.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Ur(uA,n),c=uu(n),{onCustomAnchorAdd:d,onCustomAnchorRemove:f}=o;return x.useEffect(()=>(d(),()=>f()),[d,f]),i.jsx(Gc,{...c,...a,ref:t})});wL.displayName=uA;var dA="PopoverTrigger",fA=x.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=Ur(dA,n),c=uu(n),d=nt(t,o.triggerRef),f=i.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":xA(o.open),...a,ref:d,onClick:be(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?f:i.jsx(Gc,{asChild:!0,...c,children:f})});fA.displayName=dA;var xy="PopoverPortal",[jL,NL]=lA(xy,{forceMount:void 0}),mA=e=>{const{__scopePopover:t,forceMount:n,children:a,container:o}=e,c=Ur(xy,t);return i.jsx(jL,{scope:t,forceMount:n,children:i.jsx(Hn,{present:n||c.open,children:i.jsx(_i,{asChild:!0,container:o,children:a})})})};mA.displayName=xy;var tl="PopoverContent",hA=x.forwardRef((e,t)=>{const n=NL(tl,e.__scopePopover),{forceMount:a=n.forceMount,...o}=e,c=Ur(tl,e.__scopePopover);return i.jsx(Hn,{present:a||c.open,children:c.modal?i.jsx(SL,{...o,ref:t}):i.jsx(EL,{...o,ref:t})})});hA.displayName=tl;var CL=Er("PopoverContent.RemoveScroll"),SL=x.forwardRef((e,t)=>{const n=Ur(tl,e.__scopePopover),a=x.useRef(null),o=nt(t,a),c=x.useRef(!1);return x.useEffect(()=>{const d=a.current;if(d)return Vf(d)},[]),i.jsx(Zc,{as:CL,allowPinchZoom:!0,children:i.jsx(pA,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,d=>{d.preventDefault(),c.current||n.triggerRef.current?.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,d=>{const f=d.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,p=f.button===2||h;c.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:be(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),EL=x.forwardRef((e,t)=>{const n=Ur(tl,e.__scopePopover),a=x.useRef(!1),o=x.useRef(!1);return i.jsx(pA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(a.current||n.triggerRef.current?.focus(),c.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=c.target;n.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.current&&c.preventDefault()}})}),pA=x.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:y,...v}=e,b=Ur(tl,n),S=uu(n);return If(),i.jsx(Qc,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:c,children:i.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:i.jsx(Pf,{"data-state":xA(b.open),role:"dialog",id:b.contentId,...S,...v,ref:t,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),gA="PopoverClose",AL=x.forwardRef((e,t)=>
49{const{__scopePopover:n,...a}=e,o=Ur(gA,n);return i.jsx(Ie.button,{type:"button",...a,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});AL.displayName=gA;var _L="PopoverArrow",kL=x.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,o=uu(n);return i.jsx(Bf,{...o,...a,ref:t})});kL.displayName=_L;function xA(e){return e?"open":"closed"}var TL=cA,ML=fA,OL=mA,yA=hA;const vA=TL,bA=ML,yy=x.forwardRef(({className:e,align:t="center",sideOffset:n=4,...a},o)=>i.jsx(OL,{children:i.jsx(yA,{ref:o,align:t,sideOffset:n,className:ie("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...a})}));yy.displayName=yA.displayName;function DL(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const RL={},wc={};function Ma(e,t){try{const a=(RL[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return a in wc?wc[a]:kj(a,a.split(":"))}catch{if(e in wc)return wc[e];const n=e?.match(FL);return n?kj(e,n.slice(1)):NaN}}const FL=/([+-]\d\d):?(\d\d)?/;function kj(e,t){const n=+(t[0]||0),a=+(t[1]||0),o=+(t[2]||0)/60;return wc[e]=n*60+a>0?n*60+a+o:n*60-a-o}class ia extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ma(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),wA(this,t)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ia(...n,t):new ia(Date.now(),t)}withTimeZone(t){return new ia(+this,t)}getTimezoneOffset(){const t=-Ma(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),vf(this),+this}[Symbol.for("constructDateFrom")](t){return new ia(+new Date(t),this.timeZone)}}const Tj=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Tj.test(e))return;const t=e.replace(Tj,"$1UTC");ia.prototype[t]&&(e.startsWith("get")?ia.prototype[e]=function(){return this.internal[t]()}:(ia.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),PL(this),+this},ia.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),vf(this),+this}))});function vf(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ma(e.timeZone,e)*60))}function PL(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),wA(e)}function wA(e,t){const n=Array.isArray(t)?BL(t):+e.internal,a=Ma(e.timeZone,e),o=a>0?Math.floor(a):Math.ceil(a),c=new Date(+e);c.setUTCHours(c.getUTCHours()-1);const d=-new Date(+e).getTimezoneOffset(),f=-new Date(+c).getTimezoneOffset(),h=d-f;let p=d;if(h&&d!==o){const z=Date.prototype.getHours.apply(e),X=Array.isArray(t)?t[3]||0:e.internal.getUTCHours();if(z!==X){const q=new Date(+e),Y=d-o;Y&&q.setUTCMinutes(q.getUTCMinutes()+Y);const ne=Ma(e.timeZone,q);(ne>0?Math.floor(ne):Math.ceil(ne))===o&&(p=f)}}const y=p-o;y&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const v=new Date(+e);v.setUTCSeconds(0);const b=d>0?v.getSeconds():(v.getSeconds()-60)%60,S=Math.round(-(Ma(e.timeZone,e)*60))%60;(S||b)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+S+b);const E=Ma(e.timeZone,e),w=E>0?Math.floor(E):Math.ceil(E),A=-new Date(+e).getTimezoneOffset()-w,j=w!==o,M=A-y,R=w-o,T=n-w*60*1e3,D=R>0&&Mj(e)-n===R*60*1e3&&Mj(e,T)!==n;if(j&&M&&!D){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+M);const z=Ma(e.timeZone,e),X=z>0?Math.floor(z):Math.ceil(z),q=w-X;q&&M<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+q)}vf(e);const k=(t?n:n+S*1e3)-+e.internal;k&&Math.abs(k)<1800*1e3&&(Date.prototype.setTime.call(e,+e+k),vf(e))}function BL(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function Mj(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-Ma(e.timeZone,n)*60)),+n}class zn extends ia{static tz(t,...n){return n.length?new zn(...n,t):new zn(Date.now(),t)}toISOString(){const[t,n,a]=this.tzComponents(),o=`${t}${n}:${a}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()}
49 ${this.toTimeString()}`}toDateString(){const[t,n,a,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${a} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,a,o]=this.tzComponents();return`${t} GMT${n}${a}${o} (${DL(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",a=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,a,o]}withTimeZone(t){return new zn(+this,t)}[Symbol.for("constructDateFrom")](t){return new zn(+new Date(t),this.timeZone)}}const jA=6048e5,qL=864e5,Oj=Symbol.for("constructDateFrom");function hn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Oj in e?e[Oj](t):e instanceof Date?new e.constructor(t):new Date(t)}function Dt(e,t){return hn(t||e,e)}function NA(e,t,n){const a=Dt(e,n?.in);return isNaN(t)?hn(e,NaN):(t&&a.setDate(a.getDate()+t),a)}function CA(e,t,n){const a=Dt(e,n?.in);if(isNaN(t))return hn(e,NaN);if(!t)return a;const o=a.getDate(),c=hn(e,a.getTime());c.setMonth(a.getMonth()+t+1,0);const d=c.getDate();return o>=d?c:(a.setFullYear(c.getFullYear(),c.getMonth(),o),a)}let LL={};function du(){return LL}function nl(e,t){const n=du(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Dt(e,t?.in),c=o.getDay(),d=(c<a?7:0)+c-a;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function Bc(e,t){return nl(e,{...t,weekStartsOn:1})}function SA(e,t){const n=Dt(e,t?.in),a=n.getFullYear(),o=hn(n,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const c=Bc(o),d=hn(n,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const f=Bc(d);return n.getTime()>=c.getTime()?a+1:n.getTime()>=f.getTime()?a:a-1}function Dj(e){const t=Dt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fl(e,...t){const n=hn.bind(null,t.find(a=>typeof a=="object"));return t.map(n)}function qc(e,t){const n=Dt(e,t?.in);return n.setHours(0,0,0,0),n}function vy(e,t,n){const[a,o]=fl(n?.in,e,t),c=qc(a),d=qc(o),f=+c-Dj(c),h=+d-Dj(d);return Math.round((f-h)/qL)}function UL(e,t){const n=SA(e,t),a=hn(e,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),Bc(a)}function zL(e,t,n){return NA(e,t*7,n)}function IL(e,t,n){return CA(e,t*12,n)}function $L(e,t){let n,a=t?.in;return e.forEach(o=>{!a&&typeof o=="object"&&(a=hn.bind(null,o));const c=Dt(o,a);(!n||n<c||isNaN(+c))&&(n=c)}),hn(a,n||NaN)}function VL(e,t){let n,a=t?.in;return e.forEach(o=>{!a&&typeof o=="object"&&(a=hn.bind(null,o));const c=Dt(o,a);(!n||n>c||isNaN(+c))&&(n=c)}),hn(a,n||NaN)}function HL(e,t,n){const[a,o]=fl(n?.in,e,t);return+qc(a)==+qc(o)}function EA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function YL(e){return!(!EA(e)&&typeof e!="number"||isNaN(+Dt(e)))}function AA(e,t,n){const[a,o]=fl(n?.in,e,t),c=a.getFullYear()-o.getFullYear(),d=a.getMonth()-o.getMonth();return c*12+d}function KL(e,t){const n=Dt(e,t?.in),a=n.getMonth();return n.setFullYear(n.getFullYear(),a+1,0),n.setHours(23,59,59,999),n}function _A(e,t){const[n,a]=fl(e,t.start,t.end);return{start:n,end:a}}function GL(e,t){const{start:n,end:a}=_A(t?.in,e);let o=+n>+a;const c=o?+n:+a,d=o?a:n;d.setHours(0,0,0,0),d.setDate(1);let f=1;const h=[];for(;+d<=c;)h.push(hn(n,d)),d.setMonth(d.getMonth()+f);return o?h.reverse():h}function WL(e,t){const n=Dt(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function QL(e,t){const n=Dt(e,t?.in),a=n.getFullYear();return n.setFullYear(a+1,0,0),n.setHours(23,59,59,999),n}function kA(e,t){const n=Dt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ZL(e,t){const{start:n,end:a}=_A(t?.in,e);let o=+n>+a;const c=o?+n:+a,d=o?a:n;d.setHours(0,0,0,0),d.setMonth(0,1);let f=1;const h=[];for(;+d<=c;)h.push(hn(n,d)),d.setFullYear(d.getFullYear()+f);return o?h.reverse():h}function TA(e,t){const n=du(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Dt(e,t?.in),c=o.getDay(),d=(c<a?-7:0)+6-(c-a);return o.setDate(o.getDate()+d),o.setHours(23,59,59,999),o}function XL(e,t){return TA(e,{...t,weekStartsOn:1}
vendor: 17,631 bytes, line 49
49)}const JL={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},eU=(e,t,n)=>{let a;const o=JL[e];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Qp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tU={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nU={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sU={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aU={date:Qp({formats:tU,defaultWidth:"full"}),time:Qp({formats:nU,defaultWidth:"full"}),dateTime:Qp({formats:sU,defaultWidth:"full"})},rU={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iU=(e,t,n,a)=>rU[e];function pc(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let o;if(a==="formatting"&&e.formattingValues){const d=e.defaultFormattingWidth||e.defaultWidth,f=n?.width?String(n.width):d;o=e.formattingValues[f]||e.formattingValues[d]}else{const d=e.defaultWidth,f=n?.width?String(n.width):e.defaultWidth;o=e.values[f]||e.values[d]}const c=e.argumentCallback?e.argumentCallback(t):t;return o[c]}}const oU={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lU={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cU={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uU={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},fU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},mU=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},hU={ordinalNumber:mU,era:pc({values:oU,defaultWidth:"wide"}),quarter:pc({values:lU,defaultWidth:"wide",argumentCallback:e=>e-1}),month:pc({values:cU,defaultWidth:"wide"}),day:pc({values:uU,defaultWidth:"wide"}),dayPeriod:pc({values:dU,defaultWidth:"wide",formattingValues:fU,defaultFormattingWidth:"wide"})};function gc(e){return(t,n={})=>{const a=n.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],c=t.match(o);if(!c)return null;const d=c[0],f=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(f)?gU(f,v=>v.test(d)):pU(f,v=>v.test(d));let p;p=e.valueCallback?e.valueCallback(h):h,p=n.valueCallback?n.valueCallback(p):p;const y=t.slice(d.length);return{value:p,rest:y}}}function pU(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function gU(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function xU(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const o=a[0],c=t.match(e.parsePattern);if(!c)return null;let d=e.valueCallback?e.valueCallback(c[0]):c[0];d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(o.length);return{value:d,rest:f}}}const yU=/^(\d+)(th|st|nd|rd)?/i,vU=/\d+/i,bU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wU={any:[/^b/i,/^(a|c)/i]},jU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},NU={any:[/1/i,/2/i,/3/i,/4/i]},CU={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},SU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},EU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},AU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_U={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},kU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},TU={ordinalNumber:xU({matchPattern:yU,parsePattern:vU,valueCallback:e=>parseInt(e,10)}),era:gc({matchPatterns:bU,defaultMatchWidth:"wide",parsePatterns:wU,defaultParseWidth:"any"}),quarter:gc({matchPatterns:jU,defaultMatchWidth:"wide",parsePatterns:NU,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gc({matchPatterns:CU,defaultMatchWidth:"wide",parsePatterns:SU,defaultParseWidth:"any"}),day:gc({matchPatterns:EU,defaultMatchWidth:"wide",parsePatterns:AU,defaultParseWidth:"any"}),dayPeriod:gc({matchPatterns:_U,defaultMatchWidth:"any",parsePatterns:kU,defaultParseWidth:"any"})},Uo={code:"en-US",formatDistance:eU,formatLong:aU,formatRelative:iU,localize:hU,match:TU,options:{weekStartsOn:0,firstWeekContainsDate:1}};function MU(e,t){const n=Dt(e,t?.in);return vy(n,kA(n))+1}function by(e,t){const n=Dt(e,t?.in),a=+Bc(n)-+UL(n);return Math.round(a/jA)+1}function MA(e,t){const n=Dt(e,t?.in),a=n.getFullYear(),o=du(),c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=hn(t?.in||e,0);d.setFullYear(a+1,0,c),d.setHours(0,0,0,0);const f=nl(d,t),h=hn(t?.in||e,0);h.setFullYear(a,0,c),h.setHours(0,0,0,0);const p=nl(h,t);return+n>=+f?a+1:+n>=+p?a:a-1}function OU(e,t){const n=du(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=MA(e,t),c=hn(t?.in||e,0);return c.setFullYear(o,0,a),c.setHours(0,0,0,0),nl(c,t)}function wy(e,t){const n=Dt(e,t?.in),a=+nl(n,t)-+OU(n,t);return Math.round(a/jA)+1}function _t(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const xr={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return _t(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_t(n+1,2)},d(e,t){return _t(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _t(e.getHours()%12||12,t.length)},H(e,t){return _t(e.getHours(),t.length)},m(e,t){return _t(e.getMinutes(),t.length)},s(e,t){return _t(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),o=Math.trunc(a*Math.pow(10,n-3));return _t(o,t.length)}},Po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rj={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),o=a>0?a:1-a;return n.ordinalNumber(o,{unit:"year"})}return xr.y(e,t)},Y:function(e,t,n,a){const o=MA(e,a),c=o>0?o:1-o;if(t==="YY"){const d=c%100;return _t(d,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):_t(c,t.length)},R:function(e,t){const n=SA(e);return _t(n,t.length)},u:function(e,t){const n=e.getFullYear();return _t(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return _t(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return _t(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return xr.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return _t(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const o=wy(e,a);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):_t(o,t.length)},I:function(e,t,n){const a=by(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):_t(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):xr.d(e,t)},D:function(e,t,n){const a=MU(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_t(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const o=e.getDay(),c=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return _t(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const o=e.getDay(),c=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return _t(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return _t(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let o;switch(a===12?o=Po.noon:a===0?o=Po.midnight:o=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let o;switch(a>=17?o=Po.evening:a>=12?o=Po.afternoon:a>=4?o=Po.morning:o=Po.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return xr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):xr.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_t(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):_t(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xr.s(e,t)},S:function(e,t){return xr.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Pj(a);case"XXXX":case"XX":return fi(a);default:return fi(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return Pj(a);case"xxxx":case"xx":return fi(a);default:return fi(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Fj(a,":");default:return"GMT"+fi(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Fj(a,":");default:return"GMT"+fi(a,":")}},t:function(e,t,n){const a=Math.trunc(+e/1e3);return _t(a,t.length)},T:function(e,t,n){return _t(+e,t.length)}};function Fj(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),o=Math.trunc(a/60),c=a%60;return c===0?n+String(o):n+String(o)+t+_t(c,2)}function Pj(e,t){return e%60===0?(e>0?"-":"+")+_t(Math.abs(e)/60,2):fi(e,t)}function fi(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),o=_t(Math.trunc(a/60),2),c=_t(a%60,2);return n+o+t+c}const Bj=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},OA=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},DU=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return Bj(e,t);let c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Bj(a,t)).replace("{{time}}",OA(o,t))},RU={p:OA,P:DU},FU=/^D+$/,PU=/^Y+$/,BU=["D","DD","YY","YYYY"];function qU(e){return FU.test(e)}function LU(e){return PU.test(e)}function UU(e,t,n){const a=zU(e,t,n);if(console.warn(a),BU.includes(e))throw new RangeError(a)}function zU(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const IU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$U=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VU=/^'([^]*?)'?$/,HU=/''/g,YU=/[a-zA-Z]/;function jc(e,t,n){const a=du(),o=n?.locale??a.locale??Uo,c=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,d=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,f=Dt(e,n?.in);if(!YL(f))throw new RangeError("Invalid time value");let h=t.match($U).map(y=>{const v=y[0];if(v==="p"||v==="P"){const b=RU[v];return b(y,o.formatLong)}return y}).join("").match(IU).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const v=y[0];if(v==="'")return{isToken:!1,value:KU(y)};if(Rj[v])return{isToken:!0,value:y};
49if(v.match(YU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(h=o.localize.preprocessor(f,h));const p={firstWeekContainsDate:c,weekStartsOn:d,locale:o};return h.map(y=>{if(!y.isToken)return y.value;const v=y.value;(!n?.useAdditionalWeekYearTokens&&LU(v)||!n?.useAdditionalDayOfYearTokens&&qU(v))&&UU(v,t,String(e));const b=Rj[v[0]];return b(f,v,o.localize,p)}).join("")}function KU(e){const t=e.match(VU);return t?t[1].replace(HU,"'"):e}function GU(e,t){const n=Dt(e,t?.in),a=n.getFullYear(),o=n.getMonth(),c=hn(n,0);return c.setFullYear(a,o+1,0),c.setHours(0,0,0,0),c.getDate()}function WU(e,t){return Dt(e,t?.in).getMonth()}function QU(e,t){return Dt(e,t?.in).getFullYear()}function ZU(e,t){return+Dt(e)>+Dt(t)}function XU(e,t){return+Dt(e)<+Dt(t)}function JU(e,t,n){const[a,o]=fl(n?.in,e,t);return a.getFullYear()===o.getFullYear()&&a.getMonth()===o.getMonth()}function ez(e,t,n){const[a,o]=fl(n?.in,e,t);return a.getFullYear()===o.getFullYear()}function tz(e,t,n){const a=Dt(e,n?.in),o=a.getFullYear(),c=a.getDate(),d=hn(e,0);d.setFullYear(o,t,15),d.setHours(0,0,0,0);const f=GU(d);return a.setMonth(t,Math.min(c,f)),a}function nz(e,t,n){const a=Dt(e,n?.in);return isNaN(+a)?hn(e,NaN):(a.setFullYear(t),a)}const qj=5,sz=4;function az(e,t){const n=t.startOfMonth(e),a=n.getDay()>0?n.getDay():7,o=t.addDays(e,-a+1),c=t.addDays(o,qj*7-1);return t.getMonth(e)===t.getMonth(c)?qj:sz}function DA(e,t){const n=t.startOfMonth(e),a=n.getDay();return a===1?n:a===0?t.addDays(n,-6):t.addDays(n,-1*(a-1))}function rz(e,t){const n=DA(e,t),a=az(e,t);return t.addDays(n,a*7-1)}const RA={...Uo,labels:{labelDayButton:(e,t,n,a)=>{let o;a&&typeof a.format=="function"?o=a.format.bind(a):o=(d,f)=>jc(d,f,{locale:Uo,...n});let c=o(e,"PPPP");return t.today&&(c=`Today, ${c}`),t.selected&&(c=`${c}, selected`),c},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let a;return n&&typeof n.format=="function"?a=n.format.bind(n):a=(o,c)=>jc(o,c,{locale:Uo,...t}),a(e,"LLLL yyyy")},labelGridcell:(e,t,n,a)=>{let o;a&&typeof a.format=="function"?o=a.format.bind(a):o=(d,f)=>jc(d,f,{locale:Uo,...n});let c=o(e,"PPPP");return t?.today&&(c=`Today, ${c}`),c},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let a;return n&&typeof n.format=="function"?a=n.format.bind(n):a=(o,c)=>jc(o,c,{locale:Uo,...t}),a(e,"cccc")}}};class bs{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?zn.tz(this.options.timeZone):new this.Date,this.newDate=(a,o,c)=>this.overrides?.newDate?this.overrides.newDate(a,o,c):this.options.timeZone?new zn(a,o,c,this.options.timeZone):new Date(a,o,c),this.addDays=(a,o)=>this.overrides?.addDays?this.overrides.addDays(a,o):NA(a,o),this.addMonths=(a,o)=>this.overrides?.addMonths?this.overrides.addMonths(a,o):CA(a,o),this.addWeeks=(a,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(a,o):zL(a,o),this.addYears=(a,o)=>this.overrides?.addYears?this.overrides.addYears(a,o):IL(a,o),this.differenceInCalendarDays=(a,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(a,o):vy(a,o),this.differenceInCalendarMonths=(a,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(a,o):AA(a,o),this.eachMonthOfInterval=a=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(a):GL(a),this.eachYearOfInterval=a=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(a):ZL(a),c=new Set(o.map(f=>this.getYear(f)));if(c.size===o.length)return o;const d=[];return c.forEach(f=>{d.push(new Date(f,0,1))}),d},this.endOfBroadcastWeek=a=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(a):rz(a,this),this.endOfISOWeek=a=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(a):XL(a),this.endOfMonth=a=>this.overrides?.endOfMonth?this.overrides.endOfMonth(a):KL(a),this.endOfWeek=(a,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(a,o):TA(a,this.options),this.endOfYear=a=>this.overrides?.endOfYear?this.overrides.endOfYear(a):QL(a),this.format=(a,o,c)=>{const d=this.overrides?.format?this.overrides.format(a,o,this.options):jc(a,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(d):d},this.getISOWeek=a=>this.overrides?.getISOWeek?this.overrides.getISOWeek(a):by(a),this.getMonth=(a,o)=>this.overrides?.getMonth?this.overrides.getMonth(a,this.options):WU(a,this.options),this.getYear=(a,o)=>this.overrides?.getYear?this.overrides.getYear(a,this.options):QU(a,this.options),this.getWeek=(a,o)=>this.overrides?.getWeek?this.overrides.getWeek(a,this.options):wy(a,this.options),this.isAfter=(a,o)=>this.overrides?.isAfter?this.overrides.isAfter(a,o):ZU(a,o),this.isBefore=(a,o)=>this.overrides?.isBefore?this.overrides.isBefore(a,o):XU(a,o),this.isDate=a=>this.overrides?.isDate?this.overrides.isDate(a):EA(a),this.isSameDay=(a,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(a,o):HL(a,o),this.isSameMonth=(a,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(a,o):JU(a,o),this.isSameYear=(a,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(a,o):ez(a,o),this.max=a=>this.overrides?.max?this.overrides.max(a):$L(a),this.min=a=>this.overrides?.min?this.overrides.min(a):VL(a),this.setMonth=(a,o)=>this.overrides?.setMonth?this.overrides.setMonth(a,o):tz(a,o),this.setYear=(a,o)=>this.overrides?.setYear?this.overrides.setYear(a,o):nz(a,o),this.startOfBroadcastWeek=(a,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(a,this):DA(a,this),this.startOfDay=a=>this.overrides?.startOfDay?this.overrides.startOfDay(a):qc(a),this.startOfISOWeek=a=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(a):Bc(a),this.startOfMonth=a=>this.overrides?.startOfMonth?this.overrides.startOfMonth(a):WL(a),this.startOfWeek=(a,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(a,this.options):nl(a,this.options),this.startOfYear=a=>this.overrides?.startOfYear?this.overrides.startOfYear(a):kA(a),this.options={locale:RA,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),a={};for(let o=0;o<10;
49o++)a[o.toString()]=n.format(o);return a}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,a=>n[a]||a)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&bs.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:a,numerals:o}=this.options,c=n?.code;if(c&&bs.yearFirstLocales.has(c))try{return new Intl.DateTimeFormat(c,{month:"long",year:"numeric",timeZone:a,numberingSystem:o}).format(t)}catch{}const d=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,d)}}bs.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const ha=new bs;class FA{constructor(t,n,a=ha){this.date=t,this.displayMonth=n,this.outside=!!(n&&!a.isSameMonth(t,n)),this.dateLib=a,this.isoDate=a.format(t,"yyyy-MM-dd"),this.displayMonthId=a.format(n,"yyyy-MM"),this.dateMonthId=a.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class iz{constructor(t,n){this.date=t,this.weeks=n}}class oz{constructor(t,n){this.days=n,this.weekNumber=t}}function lz(e){return re.createElement("button",{...e})}function cz(e){return re.createElement("span",{...e})}function uz(e){const{size:t=24,orientation:n="left",className:a}=e;return re.createElement("svg",{className:a,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&re.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&re.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&re.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&re.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function dz(e){const{day:t,modifiers:n,...a}=e;return re.createElement("td",{...a})}function fz(e){const{day:t,modifiers:n,...a}=e,o=re.useRef(null);return re.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),re.createElement("button",{ref:o,...a})}var Ue;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Ue||(Ue={}));var $t;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})($t||($t={}));var $s;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})($s||($s={}));var fs;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(fs||(fs={}));function mz(e){const{options:t,className:n,components:a,classNames:o,...c}=e,d=[o[Ue.Dropdown],n].join(" "),f=t?.find(({value:h})=>h===c.value);return re.createElement("span",{"data-disabled":c.disabled,className:o[Ue.DropdownRoot]},re.createElement(a.Select,{className:d,...c},t?.map(({value:h,label:p,disabled:y})=>re.createElement(a.Option,{key:h,value:h,disabled:y},p))),re.createElement("span",{className:o[Ue.CaptionLabel],"aria-hidden":!0},f?.label,re.createElement(a.Chevron,{orientation:"down",size:18,className:o[Ue.Chevron]})))}function hz(e){return re.createElement("div",{...e})}function pz(e){return re.createElement("div",{...e})}function gz(e){const{calendarMonth:t,displayIndex:n,...a}=e;return re.createElement("div",{...a},e.children)}function xz(e){const{calendarMonth:t,displayIndex:n,...a}=e;return re.createElement("div",{...a}
vendor: 5,490 bytes, line 49
49)}function yz(e){return re.createElement("table",{...e})}function vz(e){return re.createElement("div",{...e})}const PA=x.createContext(void 0);function fu(){const e=x.useContext(PA);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function bz(e){const{components:t}=fu();return re.createElement(t.Dropdown,{...e})}function wz(e){const{onPreviousClick:t,onNextClick:n,previousMonth:a,nextMonth:o,...c}=e,{components:d,classNames:f,labels:{labelPrevious:h,labelNext:p}}=fu(),y=x.useCallback(b=>{o&&n?.(b)},[o,n]),v=x.useCallback(b=>{a&&t?.(b)},[a,t]);return re.createElement("nav",{...c},re.createElement(d.PreviousMonthButton,{type:"button",className:f[Ue.PreviousMonthButton],tabIndex:a?void 0:-1,"aria-disabled":a?void 0:!0,"aria-label":h(a),onClick:v},re.createElement(d.Chevron,{disabled:a?void 0:!0,className:f[Ue.Chevron],orientation:"left"})),re.createElement(d.NextMonthButton,{type:"button",className:f[Ue.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":p(o),onClick:y},re.createElement(d.Chevron,{disabled:o?void 0:!0,orientation:"right",className:f[Ue.Chevron]})))}function jz(e){const{components:t}=fu();return re.createElement(t.Button,{...e})}function Nz(e){return re.createElement("option",{...e})}function Cz(e){const{components:t}=fu();return re.createElement(t.Button,{...e})}function Sz(e){const{rootRef:t,...n}=e;return re.createElement("div",{...n,ref:t})}function Ez(e){return re.createElement("select",{...e})}function Az(e){const{week:t,...n}=e;return re.createElement("tr",{...n})}function _z(e){return re.createElement("th",{...e})}function kz(e){return re.createElement("thead",{"aria-hidden":!0},re.createElement("tr",{...e}))}function Tz(e){const{week:t,...n}=e;return re.createElement("th",{...n})}function Mz(e){return re.createElement("th",{...e})}function Oz(e){return re.createElement("tbody",{...e})}function Dz(e){const{components:t}=fu();return re.createElement(t.Dropdown,{...e})}const Rz=Object.freeze(Object.defineProperty({__proto__:null,Button:lz,CaptionLabel:cz,Chevron:uz,Day:dz,DayButton:fz,Dropdown:mz,DropdownNav:hz,Footer:pz,Month:gz,MonthCaption:xz,MonthGrid:yz,Months:vz,MonthsDropdown:bz,Nav:wz,NextMonthButton:jz,Option:Nz,PreviousMonthButton:Cz,Root:Sz,Select:Ez,Week:Az,WeekNumber:Tz,WeekNumberHeader:Mz,Weekday:_z,Weekdays:kz,Weeks:Oz,YearsDropdown:Dz},Symbol.toStringTag,{value:"Module"}));function Da(e,t,n=!1,a=ha){let{from:o,to:c}=e;const{differenceInCalendarDays:d,isSameDay:f}=a;return o&&c?(d(c,o)<0&&([o,c]=[c,o]),d(t,o)>=(n?1:0)&&d(c,t)>=(n?1:0)):!n&&c?f(c,t):!n&&o?f(o,t):!1}function jy(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function im(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ny(e){return!!(e&&typeof e=="object"&&"after"in e)}function Cy(e){return!!(e&&typeof e=="object"&&"before"in e)}function BA(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function qA(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ra(e,t,n=ha){const a=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:c,isAfter:d}=n;return a.some(f=>{if(typeof f=="boolean")return f;if(n.isDate(f))return o(e,f);if(qA(f,n))return f.some(h=>o(e,h));if(im(f))return Da(f,e,!1,n);if(BA(f))return Array.isArray(f.dayOfWeek)?f.dayOfWeek.includes(e.getDay()):f.dayOfWeek===e.getDay();if(jy(f)){const h=c(f.before,e),p=c(f.after,e),y=h>0,v=p<0;return d(f.before,f.after)?v&&y:y||v}return Ny(f)?c(e,f.after)>0:Cy(f)?c(f.before,e)>0:typeof f=="function"?f(e):!1})}function Fz(e,t,n,a,o){const{disabled:c,hidden:d,modifiers:f,showOutsideDays:h,broadcastCalendar:p,today:y=o.today()}=t,{isSameDay:v,isSameMonth:b,startOfMonth:S,isBefore:E,endOfMonth:w,isAfter:C}=o,A=n&&S(n),j=a&&w(a),M={[$t.focused]:[],[$t.outside]:[],[$t.disabled]:[],[$t.hidden]:[],[$t.today]:[]},R={};for(const T of e){const{date:D,displayMonth:F}=T,k=!!(F&&!b(D,F)),z=!!(A&&E(D,A)),X=!!(j&&C(D,j)),q=!!(c&&Ra(D,c,o)),Y=!!(d&&Ra(D,d,o))||z||X||!p&&!h&&k||p&&h===!1&&k,ne=v(D,y);k&&M.outside.push(T),q&&M.disabled.push(T),Y&&M.hidden.push(T),ne&&M.today.push(T),f&&Object.keys(f).forEach(Z=>{const me=f?.[Z];me&&Ra(D,me,o)&&(R[Z]?R[Z].push(T):R[Z]=[T])})}return T=>{const D={[$t.focused]:!1,[$t.disabled]:!1,[$t.hidden]:!1,[$t.outside]:!1,[$t.today]:!1},F={};for(const k in M){const z=M[k];D[k]=z.some(X=>X===T)}for(const k in R)F[k]=R[k].some(z=>z===T);return{...D,...F}}}function Pz(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[c])=>(n[c]?o.push(n[c]):t[$t[c]]?o.push(t[$t[c]]):t[$s[c]]&&o.push(t[$s[c]]),o),[t[Ue.Day]])}function Bz(e){return{...Rz,...e}}function qz(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,a])=>{n.startsWith("data-")&&(t[n]=a)}),t}function Sy(){const e={};for(const t in Ue)e[Ue[t]]=`rdp-${Ue[t]}`;for(const t in $t)e[$t[t]]=`rdp-${$t[t]}`;for(const t in $s)e[$s[t]]=`rdp-${$s[t]}`;for(const t in fs)e[fs[t]]=`rdp-${fs[t]}`;return e}function LA(e,t,n){return(n??new bs(t)).formatMonthYear(e)}const Lz=LA;function Uz(e,t,n){return(n??new bs(t)).format(e,"d")}function zz(e,t=ha){return t.format(e,"LLLL")}function Iz(e,t,n){return(n??new bs(t)).format(e,"cccccc")}function $z(e,t=ha){return e<10?t.formatNumber(`0${e.toLocaleStr
49ing()}`):t.formatNumber(`${e.toLocaleString()}`)}function Vz(){return""}function UA(e,t=ha){return t.format(e,"yyyy")}const Hz=UA,Yz=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:LA,formatDay:Uz,formatMonthCaption:Lz,formatMonthDropdown:zz,formatWeekNumber:$z,formatWeekNumberHeader:Vz,formatWeekdayName:Iz,formatYearCaption:Hz,formatYearDropdown:UA},Symbol.toStringTag,{value:"Module"}));function Kz(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Yz,...e}}function Ey(e,t,n,a){let o=(a??new bs(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Gz=Ey;function Ay(e,t,n){return(n??new bs(t)).formatMonthYear(e)}const Wz=Ay;function zA(e,t,n,a){let o=(a??new bs(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function IA(e){return"Choose the Month"}function $A(){return""}const Qz="Go to the Next Month";function VA(e,t){return Qz}function HA(e){return"Go to the Previous Month"}function YA(e,t,n){return(n??new bs(t)).format(e,"cccc")}function KA(e,t){return`Week ${e}`}function GA(e){return"Week Number"}function WA(e){return"Choose the Year"}const Zz=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Wz,labelDay:Gz,labelDayButton:Ey,labelGrid:Ay,labelGridcell:zA,labelMonthDropdown:IA,labelNav:$A,labelNext:VA,labelPrevious:HA,labelWeekNumber:KA,labelWeekNumberHeader:GA,labelWeekday:YA,labelYearDropdown:WA},Symbol.toStringTag,{value:"Module"})),Ls=(e,t,n)=>t||(n?typeof n=="function"?n:(...a)=>n:e);function Xz(e,t){const n=t.locale?.labels??{};return{...Zz,...e??{},labelDayButton:Ls(Ey,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Ls(IA,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Ls(VA,e?.labelNext,n.labelNext),labelPrevious:Ls(HA,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Ls(KA,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Ls(WA,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Ls(Ay,e?.labelGrid,n.labelGrid),labelGridcell:Ls(zA,e?.labelGridcell,n.labelGridcell),labelNav:Ls($A,e?.labelNav,n.labelNav),labelWeekNumberHeader:Ls(GA,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Ls(YA,e?.labelWeekday,n.labelWeekday)}}function Jz(e,t,n,a,o){const{startOfMonth:c,startOfYear:d,endOfYear:f,eachMonthOfInterval:h,getMonth:p}=o;return h({start:d(e),end:f(e)}).map(b=>{const S=a.formatMonthDropdown(b,o),E=p(b),w=t&&b<c(t)||n&&b>c(n)||!1;return{value:E,label:S,disabled:w}})}function eI(e,t={},n={}){let a={...t?.[Ue.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{a={...a,...n?.[o]}}),a}function tI(e,t,n,a){const o=a??e.today(),c=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),d=[];for(let f=0;f<7;f++){const h=e.addDays(c,f);d.push(h)}return d}function nI(e,t,n,a,o=!1){if(!e||!t)return;const{startOfYear:c,endOfYear:d,eachYearOfInterval:f,getYear:h}=a,p=c(e),y=d(t),v=f({start:p,end:y});return o&&v.reverse(),v.map(b=>{const S=n.formatYearDropdown(b,a);return{value:h(b),label:S,disabled:!1}})}function sI(e,t={}){const{weekStartsOn:n,locale:a}=t,o=n??a?.options?.weekStartsOn??0,c=f=>{const h=typeof f=="number"||typeof f=="string"?new Date(f):f;return new zn(h.getFullYear(),h.getMonth(),h.getDate(),12,0,0,e)},d=f=>{const h=c(f);return new Date(h.getFullYear(),h.getMonth(),h.getDate(),0,0,0,0)};return{today:()=>c(zn.tz(e)),newDate:(f,h,p)=>new zn(f,h,p,12,0,0,e),startOfDay:f=>c(f),startOfWeek:(f,h)=>{const p=c(f),y=h?.weekStartsOn??o,v=(p.getDay()-y+7)%7;return p.setDate(p.getDate()-v),p},startOfISOWeek:f=>{const h=c(f),p=(h.getDay()-1+7)%7;return h.setDate(h.getDate()-p),h},startOfMonth:f=>{const h=c(f);return h.setDate(1),h},startOfYear:f=>{const h=c(f);return h.setMonth(0,1),h},endOfWeek:(f,h)=>{const p=c(f),b=(((h?.weekStartsOn??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+b),p},endOfISOWeek:f=>{const h=c(f),p=(7-h.getDay())%7;return h.setDate(h.getDate()+p),h},endOfMonth:f=>{const h=c(f);return h.setMonth(h.getMonth()+1,0),h},endOfYear:f=>{const h=c(f);return h.setMonth(11,31),h},eachMonthOfInterval:f=>{const h=c(f.start),p=c(f.end),y=[],v=new zn(h.getFullYear(),h.getMonth(),1,12,0,0,e),b=p.getFullYear()*12+p.getMonth();for(;v.getFullYear()*12+v.getMonth()<=b;
vendor: 6,664 bytes, line 49
49)y.push(new zn(v,e)),v.setMonth(v.getMonth()+1,1);return y},addDays:(f,h)=>{const p=c(f);return p.setDate(p.getDate()+h),p},addWeeks:(f,h)=>{const p=c(f);return p.setDate(p.getDate()+h*7),p},addMonths:(f,h)=>{const p=c(f);return p.setMonth(p.getMonth()+h),p},addYears:(f,h)=>{const p=c(f);return p.setFullYear(p.getFullYear()+h),p},eachYearOfInterval:f=>{const h=c(f.start),p=c(f.end),y=[],v=new zn(h.getFullYear(),0,1,12,0,0,e);for(;v.getFullYear()<=p.getFullYear();)y.push(new zn(v,e)),v.setFullYear(v.getFullYear()+1,0,1);return y},getWeek:(f,h)=>{const p=d(f);return wy(p,{weekStartsOn:h?.weekStartsOn??o,firstWeekContainsDate:h?.firstWeekContainsDate??a?.options?.firstWeekContainsDate??1})},getISOWeek:f=>{const h=d(f);return by(h)},differenceInCalendarDays:(f,h)=>{const p=d(f),y=d(h);return vy(p,y)},differenceInCalendarMonths:(f,h)=>{const p=d(f),y=d(h);return AA(p,y)}}}const mu=e=>e instanceof HTMLElement?e:null,Zp=e=>[...e.querySelectorAll("[data-animated-month]")??[]],aI=e=>mu(e.querySelector("[data-animated-month]")),Xp=e=>mu(e.querySelector("[data-animated-caption]")),Jp=e=>mu(e.querySelector("[data-animated-weeks]")),rI=e=>mu(e.querySelector("[data-animated-nav]")),iI=e=>mu(e.querySelector("[data-animated-weekdays]"));function oI(e,t,{classNames:n,months:a,focused:o,dateLib:c}){const d=x.useRef(null),f=x.useRef(a),h=x.useRef(!1);x.useLayoutEffect(()=>{const p=f.current;if(f.current=a,!t||!e.current||!(e.current instanceof HTMLElement)||a.length===0||p.length===0||a.length!==p.length)return;const y=c.isSameMonth(a[0].date,p[0].date),v=c.isAfter(a[0].date,p[0].date),b=v?n[fs.caption_after_enter]:n[fs.caption_before_enter],S=v?n[fs.weeks_after_enter]:n[fs.weeks_before_enter],E=d.current,w=e.current.cloneNode(!0);if(w instanceof HTMLElement?(Zp(w).forEach(M=>{if(!(M instanceof HTMLElement))return;const R=aI(M);R&&M.contains(R)&&M.removeChild(R);const T=Xp(M);T&&T.classList.remove(b);const D=Jp(M);D&&D.classList.remove(S)}),d.current=w):d.current=null,h.current||y||o)return;const C=E instanceof HTMLElement?Zp(E):[],A=Zp(e.current);if(A?.every(j=>j instanceof HTMLElement)&&C&&C.every(j=>j instanceof HTMLElement)){h.current=!0,e.current.style.isolation="isolate";const j=rI(e.current);j&&(j.style.zIndex="1"),A.forEach((M,R)=>{const T=C[R];if(!T)return;M.style.position="relative",M.style.overflow="hidden";const D=Xp(M);D&&D.classList.add(b);const F=Jp(M);F&&F.classList.add(S);const k=()=>{h.current=!1,e.current&&(e.current.style.isolation=""),j&&(j.style.zIndex=""),D&&D.classList.remove(b),F&&F.classList.remove(S),M.style.position="",M.style.overflow="",M.contains(T)&&M.removeChild(T)};T.style.pointerEvents="none",T.style.position="absolute",T.style.overflow="hidden",T.setAttribute("aria-hidden","true");const z=iI(T);z&&(z.style.opacity="0");const X=Xp(T);X&&(X.classList.add(v?n[fs.caption_before_exit]:n[fs.caption_after_exit]),X.addEventListener("animationend",k));const q=Jp(T);q&&q.classList.add(v?n[fs.weeks_before_exit]:n[fs.weeks_after_exit]),M.insertBefore(T,M.firstChild)})}})}function lI(e,t,n,a){const o=e[0],c=e[e.length-1],{ISOWeek:d,fixedWeeks:f,broadcastCalendar:h}=n??{},{addDays:p,differenceInCalendarDays:y,differenceInCalendarMonths:v,endOfBroadcastWeek:b,endOfISOWeek:S,endOfMonth:E,endOfWeek:w,isAfter:C,startOfBroadcastWeek:A,startOfISOWeek:j,startOfWeek:M}=a,R=h?A(o,a):d?j(o):M(o),T=h?b(c):d?S(E(c)):w(E(c)),D=t&&(h?b(t):d?S(t):w(t)),F=D&&C(T,D)?D:T,k=y(F,R),z=v(c,o)+1,X=[];for(let ne=0;ne<=k;ne++){const Z=p(R,ne);X.push(Z)}const Y=(h?35:42)*z;if(f&&X.length<Y){const ne=Y-X.length;for(let Z=0;Z<ne;Z++){const me=p(X[X.length-1],1);X.push(me)}}return X}function cI(e){const t=[];return e.reduce((n,a)=>{const o=a.weeks.reduce((c,d)=>c.concat(d.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function uI(e,t,n,a){const{numberOfMonths:o=1}=n,c=[];for(let d=0;d<o;d++){const f=a.addMonths(e,d);if(t&&f>t)break;c.push(f)}return c}function Lj(e,t,n,a){const{month:o,defaultMonth:c,today:d=a.today(),numberOfMonths:f=1}=e;let h=o||c||d;const{differenceInCalendarMonths:p,addMonths:y,startOfMonth:v}=a;if(n&&p(n,h)<f-1){const b=-1*(f-1);h=y(n,b)}return t&&p(h,t)<0&&(h=t),v(h)}function dI(e,t,n,a){const{addDays:o,endOfBroadcastWeek:c,endOfISOWeek:d,endOfMonth:f,endOfWeek:h,getISOWeek:p,getWeek:y,startOfBroadcastWeek:v,startOfISOWeek:b,startOfWeek:S}=a,E=e.reduce((w,C)=>{const A=n.broadcastCalendar?v(C,a):n.ISOWeek?b(C):S(C),j=n.broadcastCalendar?c(C):n.ISOWeek?d(f(C)):h(f(C)),M=t.filter(F=>F>=A&&F<=j),R=n.broadcastCalendar?35:42;if(n.fixedWeeks&&M.length<R){const F=t.filter(k=>{const z=R-M.length;return k>j&&k<=o(j,z)});M.push(...F)}const T=M.reduce((F,k)=>{const z=n.ISOWeek?p(k):y(k),X=F.find(Y=>Y.weekNumber===z),q=new FA(k,C,a);return X?X.days.push(q):F.push(new oz(z,[q])),F},[]),D=new iz(C,T);return w.push(D),w},[]);return n.reverseMonths?E.reverse():E}function fI(e,t){let{startMonth:n,endMonth:a}=e;const{startOfYear:o,startOfDay:c,startOfMonth:d,endOfMonth:f,addYears:h,endOfYear:p,newDate:y,today:v}=t,{fromYear:b,toYear:S,fromMonth:E,toMonth:w}=e;!n&&E&&(n=E),!n&&b&&(n=t.newDate(b,0,1)),!a&&w&&(a=w),!a&&S&&(a=y(S,11,31));const C=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=d(n):b?n=y(b,0,1):!n&&C&&(n=o(h(e.today??v(),-100))),a?a=f(a):S?a=y(S,11,31):!a&&C&&(a=p(e.today??v())),[n&&c(n),a&&c(a)]}function mI(e,t,n,a){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:c=1}=n,{startOfMonth:d,addMonths:f,differenceInCalendarMonths:h}=a,p=o?c:1,y=d(e);if(!t)return f(y,p);if(!(h(t,e)<c))return f(y,p)}function hI(e,t,n,a){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:c}=n,{startOfMonth:d,addMonths:f,differenceInCalendarMonths:h}=a,p=o?c??1:1,y=d(e);if(!t)return f(y,-p);if(!(h(y,t)<=0))return f(y,-p)}function pI(e){const t=[];return e.reduce((n,a)=>n.concat(a.weeks.slice()),t.slice())}function om(e,t){const[n,a]=x.useState(e);return[t===void 0?n:t,a]}function gI(e,t){const[n,a]=fI(e,t),{startOfMonth:o,endOfMonth:c}=t,d=Lj(e,n,a,t),[f,h]=om(d,e.month?d:void 0);x.useEffect(()=>{const R=Lj(e,n,a,t);h(R)},[e.timeZone]);const{months:p,weeks:y,days:v,previousMonth:b,nextMonth:S}=x.useMemo(()=>{const R=uI(f,a,{numberOfMonths:e.numberOfMonths},t),T=lI(R,e.endMonth?c(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),D=dI(R,T,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),F=pI(D),k=cI(D),z=hI(f,n,e,t),X=mI(f,a,e,t);return{months:D,weeks:F,days:k,previousMonth:z,nextMonth:X}},[t,f.getTime(),a?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endM
49onth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:E,onMonthChange:w}=e,C=R=>y.some(T=>T.days.some(D=>D.isEqualTo(R))),A=R=>{if(E)return;let T=o(R);n&&T<o(n)&&(T=o(n)),a&&T>o(a)&&(T=o(a)),h(T),w?.(T)};return{months:p,weeks:y,days:v,navStart:n,navEnd:a,previousMonth:b,nextMonth:S,goToMonth:A,goToDay:R=>{C(R)||A(R.date)}}}var sa;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(sa||(sa={}));function Uj(e){return!e[$t.disabled]&&!e[$t.hidden]&&!e[$t.outside]}function xI(e,t,n,a){let o,c=-1;for(const d of e){const f=t(d);Uj(f)&&(f[$t.focused]&&c<sa.FocusedModifier?(o=d,c=sa.FocusedModifier):a?.isEqualTo(d)&&c<sa.LastFocused?(o=d,c=sa.LastFocused):n(d.date)&&c<sa.Selected?(o=d,c=sa.Selected):f[$t.today]&&c<sa.Today&&(o=d,c=sa.Today))}return o||(o=e.find(d=>Uj(t(d)))),o}function yI(e,t,n,a,o,c,d){const{ISOWeek:f,broadcastCalendar:h}=c,{addDays:p,addMonths:y,addWeeks:v,addYears:b,endOfBroadcastWeek:S,endOfISOWeek:E,endOfWeek:w,max:C,min:A,startOfBroadcastWeek:j,startOfISOWeek:M,startOfWeek:R}=d;let D={day:p,week:v,month:y,year:b,startOfWeek:F=>h?j(F,d):f?M(F):R(F),endOfWeek:F=>h?S(F):f?E(F):w(F)}[e](n,t==="after"?1:-1);return t==="before"&&a?D=C([a,D]):t==="after"&&o&&(D=A([o,D])),D}function QA(e,t,n,a,o,c,d,f=0){if(f>365)return;const h=yI(e,t,n.date,a,o,c,d),p=!!(c.disabled&&Ra(h,c.disabled,d)),y=!!(c.hidden&&Ra(h,c.hidden,d)),v=h,b=new FA(h,v,d);return!p&&!y?b:QA(e,t,b,a,o,c,d,f+1)}function vI(e,t,n,a,o){const{autoFocus:c}=e,[d,f]=x.useState(),h=xI(t.days,n,a||(()=>!1),d),[p,y]=x.useState(c?h:void 0);return{isFocusTarget:w=>!!h?.isEqualTo(w),setFocused:y,focused:p,blur:()=>{f(p),y(void 0)},moveFocus:(w,C)=>{if(!p)return;const A=QA(w,C,p,t.navStart,t.navEnd,e,o);A&&(e.disableNavigation&&!t.days.some(M=>M.isEqualTo(A))||(t.goToDay(A),y(A)))}}}function bI(e,t){const{selected:n,required:a,onSelect:o}=e,[c,d]=om(n,o?n:void 0),f=o?n:c,{isSameDay:h}=t,p=S=>f?.some(E=>h(E,S))??!1,{min:y,max:v}=e;return{selected:f,select:(S,E,w)=>{let C=[...f??[]];if(p(S)){if(f?.length===y||a&&f?.length===1)return;C=f?.filter(A=>!h(A,S))}else f?.length===v?C=[S]:C=[...C,S];return o||d(C),o?.(C,S,E,w),C},isSelected:p}}function wI(e,t,n=0,a=0,o=!1,c=ha){const{from:d,to:f}=t||{},{isSameDay:h,isAfter:p,isBefore:y}=c;let v;if(!d&&!f)v={from:e,to:n>0?void 0:e};else if(d&&!f)h(d,e)?n===0?v={from:d,to:e}:o?v={from:d,to:void 0}:v=void 0:y(e,d)?v={from:e,to:d}:v={from:d,to:e};else if(d&&f)if(h(d,e)&&h(f,e))o?v={from:d,to:f}:v=void 0;else if(h(d,e))v={from:d,to:n>0?void 0:e};else if(h(f,e))v={from:e,to:n>0?void 0:e};else if(y(e,d))v={from:e,to:f};else if(p(e,d))v={from:d,to:e};else if(p(e,f))v={from:d,to:e};else throw new Error("Invalid range");if(v?.from&&v?.to){const b=c.differenceInCalendarDays(v.to,v.from);a>0&&b>a?v={from:e,to:void 0}:n>1&&b<n&&(v={from:e,to:void 0})}return v}function jI(e,t,n=ha){const a=Array.isArray(t)?t:[t];let o=e.from;const c=n.differenceInCalendarDays(e.to,e.from),d=Math.min(c,6);for(let f=0;f<=d;f++){if(a.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function zj(e,t,n=ha){return Da(e,t.from,!1,n)||Da(e,t.to,!1,n)||Da(t,e.from,!1,n)||Da(t,e.to,!1,n)}function NI(e,t,n=ha){const a=Array.isArray(t)?t:[t];if(a.filter(f=>typeof f!="function").some(f=>typeof f=="boolean"?f:n.isDate(f)?Da(e,f,!1,n):qA(f,n)?f.some(h=>Da(e,h,!1,n)):im(f)?f.from&&f.to?zj(e,{from:f.from,to:f.to},n):!1:BA(f)?jI(e,f.dayOfWeek,n):jy(f)?n.isAfter(f.before,f.after)?zj(e,{from:n.addDays(f.after,1),to:n.addDays(f.before,-1)},n):Ra(e.from,f,n)||Ra(e.to,f,n):Ny(f)||Cy(f)?Ra(e.from,f,n)||Ra(e.to,f,n):!1))return!0;const d=a.filter(f=>typeof f=="function");if(d.length){let f=e.from;const h=n.differenceInCalendarDays(e.to,e.from);for(let p=0;p<=h;p++){if(d.some(y=>y(f)))return!0;f=n.addDays(f,1)}}return!1}function CI(e,t){const{disabled:n,excludeDisabled:a,resetOnSelect:o,selected:c,required:d,onSelect:f}=e,[h,p]=om(c,f?c:void 0),y=f?c:h;return{selected:y,select:(S,E,w)=>{const{min:C,max:A}=e;let j;if(S){const M=y?.from,R=y?.to,T=!!M&&!!R,D=!!M&&!!R&&t.isSameDay(M,R)&&t.isSameDay(S,M);o&&(T||!y?.from)?!d&&D?j=void 0:j={from:S,to:void 0}:j=wI(S,y,C,A,d,t)}return a&&n&&j?.from&&j.to&&NI({from:j.from,to:j.to},n,t)&&(j.from=S,j.to=void 0),f||p(j),f?.(j,S,E,w),j},isSelected:S=>y&&Da(y,S,!1,t)}}function SI(e,t){const{selected:n,required:a,onSelect:o}=e,[c,d]=om(n,o?n:void 0),f=o?n:c,{isSameDay:h}=t;return{selected:f,select:(v,b,S)=>{let E=v;return!a&&f&&f&&h(v,f)&&(E=void 0),o||d(E),o?.(E,v,b,S),E},isSelected:v=>f?h(f,v):!1}}function EI(e,t){const n=SI(e,t),a=bI(e,t),o=CI(e,t);switch(e.mode){case"single":return n;case"multiple":return a;case"range":return o;default:return}}function Ms(e,t){return e instanceof zn&&e.timeZone===t?e:new zn(e,t)}
49function Bo(e,t,n){return Ms(e,t)}function Ij(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Bo(e,t):Array.isArray(e)?e.map(a=>a instanceof Date?Bo(a,t):a):im(e)?{...e,from:e.from?Ms(e.from,t):e.from,to:e.to?Ms(e.to,t):e.to}:jy(e)?{before:Bo(e.before,t),after:Bo(e.after,t)}:Ny(e)?{after:Bo(e.after,t)}:Cy(e)?{before:Bo(e.before,t)}:e}function eg(e,t,n){return e&&(Array.isArray(e)?e.map(a=>Ij(a,t)):Ij(e,t))}function AI(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Ms(t.today,n)),t.month&&(t.month=Ms(t.month,n)),t.defaultMonth&&(t.defaultMonth=Ms(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Ms(t.startMonth,n)),t.endMonth&&(t.endMonth=Ms(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Ms(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(_e=>Ms(_e,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Ms(t.selected.from,n):t.selected.from,to:t.selected.to?Ms(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=eg(t.disabled,n)),t.hidden!==void 0&&(t.hidden=eg(t.hidden,n)),t.modifiers)){const _e={};Object.keys(t.modifiers).forEach(Ke=>{_e[Ke]=eg(t.modifiers?.[Ke],n)}),t.modifiers=_e}const{components:a,formatters:o,labels:c,dateLib:d,locale:f,classNames:h}=x.useMemo(()=>{const _e={...RA,...t.locale},Ke=t.broadcastCalendar?1:t.weekStartsOn,qe=t.noonSafe&&t.timeZone?sI(t.timeZone,{weekStartsOn:Ke,locale:_e}):void 0,Ge=t.dateLib&&qe?{...qe,...t.dateLib}:t.dateLib??qe,nn=new bs({locale:_e,weekStartsOn:Ke,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Ge);return{dateLib:nn,components:Bz(t.components),formatters:Kz(t.formatters),labels:Xz(t.labels,nn.options),locale:_e,classNames:{...Sy(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:d.today()});const{captionLayout:p,mode:y,navLayout:v,numberOfMonths:b=1,onDayBlur:S,onDayClick:E,onDayFocus:w,onDayKeyDown:C,onDayMouseEnter:A,onDayMouseLeave:j,onNextClick:M,onPrevClick:R,showWeekNumber:T,styles:D}=t,{formatCaption:F,formatDay:k,formatMonthDropdown:z,formatWeekNumber:X,formatWeekNumberHeader:q,formatWeekdayName:Y,formatYearDropdown:ne}=o,Z=gI(t,d),{days:me,months:L,navStart:J,navEnd:ee,previousMonth:te,nextMonth:O,goToMonth:W}=Z,ue=Fz(me,t,J,ee,d),{isSelected:ce,select:ye,selected:Ee}=EI(t,d)??{},{blur:xe,focused:he,isFocusTarget:Te,moveFocus:le,setFocused:Re}=vI(t,Z,ue,ce??(()=>!1),d),{labelDayButton:Pe,labelGridcell:ot,labelGrid:Lt,labelMonthDropdown:Nt,labelNav:as,labelPrevious:gn,labelNext:zt,labelWeekday:Gs,labelWeekNumber:Ws,labelWeekNumberHeader:Va,labelYearDropdown:An}=c,zr=x.useMemo(()=>tI(d,t.ISOWeek,t.broadcastCalendar,t.today),[d,t.ISOWeek,t.broadcastCalendar,t.today]),Qs=y!==void 0||E!==void 0,Ce=x.useCallback(()=>{te&&(W(te),R?.(te))},[te,W,R]),pt=x.useCallback(()=>{O&&(W(O),M?.(O))},[W,O,M]),Pt=x.useCallback((_e,Ke)=>qe=>{qe.preventDefault(),qe.stopPropagation(),Re(_e),!Ke.disabled&&(ye?.(_e.date,Ke,qe),E?.(_e.date,Ke,qe))},[ye,E,Re]),Rt=x.useCallback((_e,Ke)=>qe=>{Re(_e),w?.(_e.date,Ke,qe)},[w,Re]),xn=x.useCallback((_e,Ke)=>qe=>{xe(),S?.(_e.date,Ke,qe)},[xe,S]),Gt=x.useCallback((_e,Ke)=>qe=>{const Ge={ArrowLeft:[qe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[qe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[qe.shiftKey?"year":"week","after"],ArrowUp:[qe.shiftKey?"year":"week","before"],PageUp:[qe.shiftKey?"year":"month","before"],PageDown:[qe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ge[qe.key]){qe.preventDefault(),qe.stopPropagation();const[nn,st]=Ge[qe.key];le(nn,st)}C?.(_e.date,Ke,qe)},[le,C,t.dir]),P=x.useCallback((_e,Ke)=>qe=>{A?.(_e.date,Ke,qe)},[A]),I=x.useCallback((_e,Ke)=>qe=>{j?.(_e.date,Ke,qe)},[j]),V=x.useCallback(_e=>Ke=>{const qe=Number(Ke.target.value),Ge=d.setMonth(d.startOfMonth(_e),qe);W(Ge)},[d,W]),de=x.useCallback(_e=>Ke=>{const qe=Number(Ke.target.value),Ge=d.setYear(d.startOfMonth(_e),qe);W(Ge)},[d,W]),{className:fe,style:je}=x.useMemo(()=>
vendor: 3,055 bytes, line 49
49({className:[h[Ue.Root],t.className].filter(Boolean).join(" "),style:{...D?.[Ue.Root],...t.style}}),[h,t.className,t.style,D]),pe=qz(t),Ne=x.useRef(null);oI(Ne,!!t.animate,{classNames:h,months:L,focused:he,dateLib:d});const He={dayPickerProps:t,selected:Ee,select:ye,isSelected:ce,months:L,nextMonth:O,previousMonth:te,goToMonth:W,getModifiers:ue,components:a,classNames:h,styles:D,labels:c,formatters:o};return re.createElement(PA.Provider,{value:He},re.createElement(a.Root,{rootRef:t.animate?Ne:void 0,className:fe,style:je,dir:t.dir,id:t.id,lang:t.lang??f.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...pe},re.createElement(a.Months,{className:h[Ue.Months],style:D?.[Ue.Months]},!t.hideNavigation&&!v&&re.createElement(a.Nav,{"data-animated-nav":t.animate?"true":void 0,className:h[Ue.Nav],style:D?.[Ue.Nav],"aria-label":as(),onPreviousClick:Ce,onNextClick:pt,previousMonth:te,nextMonth:O}),L.map((_e,Ke)=>re.createElement(a.Month,{"data-animated-month":t.animate?"true":void 0,className:h[Ue.Month],style:D?.[Ue.Month],key:Ke,displayIndex:Ke,calendarMonth:_e},v==="around"&&!t.hideNavigation&&Ke===0&&re.createElement(a.PreviousMonthButton,{type:"button",className:h[Ue.PreviousMonthButton],tabIndex:te?void 0:-1,"aria-disabled":te?void 0:!0,"aria-label":gn(te),onClick:Ce,"data-animated-button":t.animate?"true":void 0},re.createElement(a.Chevron,{disabled:te?void 0:!0,className:h[Ue.Chevron],orientation:t.dir==="rtl"?"right":"left"})),re.createElement(a.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:h[Ue.MonthCaption],style:D?.[Ue.MonthCaption],calendarMonth:_e,displayIndex:Ke},p?.startsWith("dropdown")?re.createElement(a.DropdownNav,{className:h[Ue.Dropdowns],style:D?.[Ue.Dropdowns]},(()=>{const qe=p==="dropdown"||p==="dropdown-months"?re.createElement(a.MonthsDropdown,{key:"month",className:h[Ue.MonthsDropdown],"aria-label":Nt(),classNames:h,components:a,disabled:!!t.disableNavigation,onChange:V(_e.date),options:Jz(_e.date,J,ee,o,d),style:D?.[Ue.Dropdown],value:d.getMonth(_e.date)}):re.createElement("span",{key:"month"},z(_e.date,d)),Ge=p==="dropdown"||p==="dropdown-years"?re.createElement(a.YearsDropdown,{key:"year",className:h[Ue.YearsDropdown],"aria-label":An(d.options),classNames:h,components:a,disabled:!!t.disableNavigation,onChange:de(_e.date),options:nI(J,ee,o,d,!!t.reverseYears),style:D?.[Ue.Dropdown],value:d.getYear(_e.date)}):re.createElement("span",{key:"year"},ne(_e.date,d));return d.getMonthYearOrder()==="year-first"?[Ge,qe]:[qe,Ge]})(),re.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},F(_e.date,d.options,d))):re.createElement(a.CaptionLabel,{className:h[Ue.CaptionLabel],role:"status","aria-live":"polite"},F(_e.date,d.options,d))),v==="around"&&!t.hideNavigation&&Ke===b-1&&re.createElement(a.NextMonthButton,{type:"button",className:h[Ue.
49NextMonthButton],tabIndex:O?void 0:-1,"aria-disabled":O?void 0:!0,"aria-label":zt(O),onClick:pt,"data-animated-button":t.animate?"true":void 0},re.createElement(a.Chevron,{disabled:O?void 0:!0,className:h[Ue.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Ke===b-1&&v==="after"&&!t.hideNavigation&&re.createElement(a.Nav,{"data-animated-nav":t.animate?"true":void 0,className:h[Ue.Nav],style:D?.[Ue.Nav],"aria-label":as(),onPreviousClick:Ce,onNextClick:pt,previousMonth:te,nextMonth:O}),re.createElement(a.MonthGrid,{role:"grid","aria-multiselectable":y==="multiple"||y==="range","aria-label":Lt(_e.date,d.options,d)||void 0,className:h[Ue.MonthGrid],style:D?.[Ue.MonthGrid]},!t.hideWeekdays&&re.createElement(a.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:h[Ue.Weekdays],style:D?.[Ue.Weekdays]},T&&re.createElement(a.WeekNumberHeader,{"aria-label":Va(d.options),className:h[Ue.WeekNumberHeader],style:D?.[Ue.WeekNumberHeader],scope:"col"},q()),zr.map(qe=>re.createElement(a.Weekday,{"aria-label":Gs(qe,d.options,d),className:h[Ue.Weekday],key:String(qe),style:D?.[Ue.Weekday],scope:"col"},Y(qe,d.options,d)))),re.createElement(a.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:h[Ue.Weeks],style:D?.[Ue.Weeks]},_e.weeks.map(qe=>re.createElement(a.Week,{className:h[Ue.Week],key:qe.weekNumber,style:D?.[Ue.Week],week:qe},T&&re.createElement(a.WeekNumber,{week:qe,style:D?.[Ue.WeekNumber],"aria-label":Ws(qe.weekNumber,{locale:f}),className:h[Ue.WeekNumber],scope:"row",role:"rowheader"},X(qe.weekNumber,d)),qe.days.map(Ge=>{const{date:nn}=Ge,st=ue(Ge);if(st[$t.focused]=!st.hidden&&!!he?.isEqualTo(Ge),st[$s.selected]=ce?.(nn)||st.selected,im(Ee)){const{from:$i,to:ml}=Ee;st[$s.range_start]=!!($i&&ml&&d.isSameDay(nn,$i)),st[$s.range_end]=!!($i&&ml&&d.isSameDay(nn,ml)),st[$s.range_middle]=Da(Ee,nn,!0,d)}const Ir=eI(st,D,t.modifiersStyles),$r=Pz(st,h,t.modifiersClassNames),Ha=!Qs&&!st.hidden?ot(nn,st,d.options,d):void 0;return re.createElement(a.Day,{key:`${Ge.isoDate}_${Ge.displayMonthId}`,day:Ge,modifiers:st,className:$r.join(" "),style:Ir,role:"gridcell","aria-selected":st.selected||void 0,"aria-label":Ha,"data-day":Ge.isoDate,"data-month":Ge.outside?Ge.dateMonthId:void 0,"data-selected":st.selected||void 0,"data-disabled":st.disabled||void 0,"data-hidden":st.hidden||void 0,"data-outside":Ge.outside||void 0,"data-focused":st.focused||void 0,"data-today":st.today||void 0},!st.hidden&&Qs?re.createElement(a.DayButton,{className:h[Ue.DayButton],style:D?.[Ue.DayButton],type:"button",day:Ge,modifiers:st,disabled:!st.focused&&st.disabled||void 0,"aria-disabled":st.focused&&st.disabled||void 0,tabIndex:Te(Ge)?0:-1,"aria-label":Pe(nn,st,d.options,d),onClick:Pt(Ge,st),onBlur:xn(Ge,st),onFocus:Rt(Ge,st),onKeyDown:Gt(Ge,st),onMouseEnter:P(Ge,st),onMouseLeave:I(Ge,st)},k(nn,d.options,d)):!st.hidden&&k(Ge.date,d.options,d))})))))))),t.footer&&re.createElement(a.Footer,{className:h[Ue.Footer],style:D?.[Ue.Footer],role:"status","aria-live":"polite"},t.footer)))}function ZA({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:a="label",buttonVariant:o="ghost",formatters:c,components:d,...f}){const h=Sy();return i.jsx(AI,{showOutsideDays:n,className:ie("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:a,formatters:{formatMonthDropdown:p=>p.toLocaleString("default",{month:"short"}),...c},classNames:{root:ie("w-fit",h.root),months:ie("relative flex flex-col gap-4 md:flex-row",h.months),month:ie("flex w-full flex-col gap-4",h.month),nav:ie("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",h.nav),button_previous:ie(Oc({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",h.button_previous),button_next:ie(Oc({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",h.button_next),month_caption:ie("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",h.month_caption),dropdowns:ie("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",h.dropdowns),dropdown_root:ie("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",h.dropdown_root),dropdown:ie("bg-popover absolute inset-0 opacity-0",h.dropdown),caption_label:ie("select-none font-medium",a==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",h.caption_label),table:"w-full border-collapse",weekdays:ie("flex",h.weekdays),weekday:ie("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",h.weekday),week:ie("mt-2 flex w-full",h.week),week_number_header:ie("w-[--cell-size] select-none",h.week_number_header),week_number:ie("text-muted-foreground select-none text-[0.8rem]",h.week_number),day:ie("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",h.day),range_start:ie("bg-accent rounded-l-md",h.range_start),range_middle:ie("rounded-none",h.range_middle),range_end:ie("bg-accent rounded-r-md",h.range_end),today:ie("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",h.today),outside:ie("text-muted-foreground aria-selected:text-muted-foreground",h.outside),disabled:ie("text-muted-foreground opacity-50",h.disabled),hidden:ie("invisible",h.hidden),...t}
49,components:{Root:({className:p,rootRef:y,...v})=>i.jsx("div",{"data-slot":"calendar",ref:y,className:ie(p),...v}),Chevron:({className:p,orientation:y,...v})=>y==="left"?i.jsx(fx,{className:ie("size-4",p),...v}):y==="right"?i.jsx(Ti,{className:ie("size-4",p),...v}):i.jsx(il,{className:ie("size-4",p),...v}),DayButton:_I,WeekNumber:({children:p,...y})=>i.jsx("td",{...y,children:i.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:p})}),...d},...f})}function _I({className:e,day:t,modifiers:n,...a}){const o=Sy(),c=x.useRef(null);return x.useEffect(()=>{n.focused&&c.current?.focus()},[n.focused]),i.jsx(ve,{ref:c,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:ie("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",o.day,e),...a})}async function Kg(e){let t;try{t=await fetch("/api/storage/uploads/prepare-video",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({objectPath:e})})}catch{throw new Error("Could not reach video processing. Check your connection and retry.")}if(!t.ok){const a=await t.json().catch(()=>({}));throw new Error(a.error||"Could not prepare the video for playback.")}const n=await t.json();if(typeof n.objectPath!="string")throw new Error("Video processing returned an invalid result. Please retry.");return n.objectPath}const kI=150*1024*1024,Gg="image/*,video/mp4,video/quicktime,video/webm,video/x-m4v,.mp4,.mov,.webm,.m4v",TI="image/*",MI="video/mp4,video/quicktime,video/webm,video/x-m4v,.mp4,.mov,.webm,.m4v",OI=new Set(["video/mp4","video/quicktime","video/webm","video/x-m4v"]),DI=new Set(["mp4","mov","webm","m4v"]);function RI(e){return e.split(".").pop()?.toLowerCase()??""}function Wg(e,t={}){const n=e.type.toLowerCase(),a=OI.has(n)||!n&&DI.has(RI(e.name)),o=n.startsWith("image/");return t.imageOnly&&!o?{ok:!1,error:"Choose an image for a single post, or switch to Reel to upload a video."}:t.videoOnly&&!a?{ok:!1,error:"Choose a reel video in MP4, MOV, WebM, or M4V format."}:a?e.size>kI?{ok:!1,error:"Reel videos must be 150 MB or smaller."}:{ok:!0,mediaType:"video"}:o?{ok:!0,mediaType:"image"}:{ok:!1,error:"Choose an image or a reel video in MP4, MOV, WebM, or M4V format."}}const FI=[{value:"needs_caption",label:"Draft"},{value:"pending",label:"Pending Review"},{value:"approved",label:"Approved"},{value:"needs_revision",label:"Needs Revision"},{value:"posted",label:"Posted"}];function tg({value:e,onSave:t}){const[n,a]=x.useState(!1),[o,c]=x.useState(e),d=x.useRef(null);x.useEffect(()=>{n&&d.current?.focus()},[n]),x.useEffect(()=>{n||c(e)},[e,n]);const f=()=>{a(!1),o.trim()&&o!==e?t(o.trim()):c(e)};return n?i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx("input",{ref:d,value:o,onChange:h=>c(h.target.value),onBlur:f,onKeyDown:h=>h.key==="Enter"&&f(),className:"text-xs font-bold text-[#374151] border border-[#004AAC] rounded px-1 py-0.5 outline-none w-44"}),i.jsx("button",{onClick:f,className:"text-[#004AAC]",children:i.jsx(Vc,{className:"w-3 h-3"})})]}):i.jsxs("span",{className:"inline-flex items-center gap-1 group cursor-pointer",onClick:()=>a(!0),children:[i.jsx("span",{className:"text-xs font-bold text-[#374151]",children:e}),i.jsx(Ar,{className:"w-3 h-3 text-[#9CA3AF] opacity-0 group-hover:opacity-100 transition-opacity"})]})}function ci({show:e}){return i.jsxs("div",{className:`absolute top-2 right-3 flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider text-[#00CEA6] bg-[#E3F7F2] px-2 py-0.5 rounded transition-opacity duration-500 ${e?"opacity-100":"opacity-0 pointer-events-none"}`,children:[i.jsx(iF,{className:"w-3 h-3"})," Saved"]})}function _y({post:e,open:t,onOpenChange:n,onDeleted:a}){return i.jsx(Vn,{open:t,onOpenChange:n,children:i.jsx(Rn,{className:"max-w-[1100px] w-[95vw] border-[#
49E9EBF0] max-h-[92vh] overflow-hidden flex flex-col p-0 gap-0",children:e?i.jsx(PI,{post:e,onClose:()=>n(!1),onDeleted:a},e.id):i.jsx("div",{className:"p-10 text-center text-[#9CA3AF] font-bold",children:"Loading..."})})})}function PI({post:e,onClose:t,onDeleted:n}){const a=Kt(),{toast:o}=pn(),{uploadFileOrThrow:c,isUploading:d}=su(),[f,h]=x.useState(!1),{admin:p}=ma(),y=p?.role==="staff",[v,b]=x.useState({facebook:e.captionFacebook||"",instagram:e.captionInstagram||"",tiktok:e.captionTiktok||"",pinterest:e.captionPinterest||"",linkedin:e.captionLinkedin||""}),[S,E]=x.useState(e.media||[]),[w,C]=x.useState(e.title??""),[A,j]=x.useState(e.postingMonth??""),[M,R]=x.useState(e.scheduledDate?Dr(e.scheduledDate):void 0),[T,D]=x.useState(e.scheduledTime?.slice(0,5)??""),[F,k]=x.useState(e.status),[z,X]=x.useState(e.priority??"normal"),[q,Y]=x.useState(e.captionDirection??""),[ne,Z]=x.useState(e.creativeDirection??""),[me,L]=x.useState(e.reelDirections??""),[J,ee]=x.useState(e.workingCanvaLink??""),[te,O]=x.useState(e.workingCaption??""),[W,ue]=x.useState(e.hashtags??""),[ce,ye]=x.useState(e.recommendedMusic??""),[Ee,xe]=x.useState(null),he=$x(e.id),{data:Te,isLoading:le}=rS(e.id,{query:{queryKey:he}});x.useEffect(()=>{Te!==void 0&&a.invalidateQueries({queryKey:hi()})},[Te,a]);const Re={clientId:e.clientId},{data:Pe}=L8(Re,{query:{queryKey:Eg(Re)}}),ot=$8({mutation:{onSuccess:Ce=>{a.setQueryData(Eg(Re),Ce)}}}),Lt={caption:Pe?.captionDirectionLabel??"By Carter, for Cami",creative:Pe?.creativeDirectionLabel??"By Carter, for Abdur",reel:Pe?.reelDirectionsLabel??"By Carter, for Nkechi"},Nt=(Ce,pt)=>{const Pt={caption:"captionDirectionLabel",creative:"creativeDirectionLabel",reel:"reelDirectionsLabel"};ot.mutate({data:{clientId:e.clientId,[Pt[Ce]]:pt}})},as=()=>{a.invalidateQueries({queryKey:hi()}),a.invalidateQueries({queryKey:Uf()}),a.invalidateQueries({queryKey:zx(e.id)})},gn=sS({mutation:{onSuccess:()=>{as(),o({title:"Post saved"})},onError:()=>{o({title:"Failed to save post",variant:"destructive"})}}}),zt=aS({mutation:{onSuccess:()=>{o({title:"Post deleted"}),as(),t(),n?.()},onError:()=>{o({title:"Failed to delete post",variant:"destructive"})}}}),Gs=x9({mutation:{onSuccess:()=>{a.invalidateQueries({queryKey:he}),a.invalidateQueries({queryKey:hi()})},onError:()=>{o({title:"Failed to post comment",variant:"destructive"})}}}),Ws=()=>{if(f||d)return;const Ce={title:w.trim()||null,media:S,postingMonth:A||null,scheduledDate:M?iA(M):null,scheduledTime:M&&T?T:null,status:F,priority:z};e.platforms.forEach(pt=>{Ce[`caption${pt.charAt(0).toUpperCase()+pt.slice(1)}`]=v[pt]}),gn.mutate({id:e.id,data:Ce})},Va=Ce=>{k(Ce),gn.mutate({id:e.id,data:{status:Ce}},{onSuccess:pt=>{pt?.status&&k(pt.status)}})},An=(Ce,pt,Pt)=>{pt!==(Pt??"")&&gn.mutate({id:e.id,data:{[Ce]:pt}},{onSuccess:()=>{xe(Ce),setTimeout(()=>xe(null),2e3)}})};async function zr(Ce,pt){const Pt=pt.target.files?.[0];if(pt.target.value="",!Pt)return;const Rt=Wg(Pt);if(!Rt.ok){o({title:"File not added",description:Rt.error,variant:"destructive"});return}h(!0);try{const xn=await c(Pt),Gt=Rt.mediaType==="video"?await Kg(xn.objectPath):xn.objectPath;E(P=>{const I=[...P];return I[Ce]={url:Gt,mediaType:Rt.mediaType},I})}catch(xn){o({title:"Upload failed",description:xn instanceof Error?xn.message:"Please retry.",variant:"destructive"})}finally{h(!1)}}async function Qs(Ce){const pt=Ce.target.files?.[0];if(Ce.target.value="",!pt)return;const Pt=Wg(pt);if(!Pt.ok){o({title:"File not added",description:Pt.error,variant:"destructive"});return}h(!0);try{const Rt=await c(pt),xn=Pt.mediaType==="video"?await Kg(Rt.objectPath):Rt.objectPath;E(Gt=>[...Gt,{url:xn,mediaType:Pt.mediaType}])}catch(Rt){o({title:"Upload failed",description:Rt instanceof Error?Rt.message:"Please retry.",variant:"destructive"})}finally{h(!1)}}return i.jsxs("div",{className:"flex flex-col h-full min-h-0 bg-[#F8F9FB]",children:[i.jsx(Fn,{className:"p-5 border-b border-[#E9EBF0] bg-white shrink-0 shadow-sm z-10 space-y-0",children:i.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap pr-8",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx(Pn,{className:"text-xl font-bold font-display text-[#111827] truncate",children:e.title||"Untitled Post"}),i.jsx(bi,{className:"sr-only",children:"Edit post captions, media, production details, schedule, and status."}),i.jsxs("div",{className:"flex items-center gap-3 mt-1 text-sm flex-wrap",children:[i.jsx(Ui,{status:F}),i.jsx(cu,{platforms:e.platforms}),i.jsx("span",{className:"text-[#D1D5DB]",children:"â¢"}),i.jsxs("span",{className:"font-medium text-[#9CA3AF]",children:["by ",e.createdByName]}),i.jsx("span",{className:"text-[#D1D5DB]",children:"â¢"}),i.jsx("span",{className:"font-medium text-[#9CA3AF]",children:Jt(new Date(e.createdAt),"MMM d, yyyy")})]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap",children:[i.jsxs(ul,{children:[i.jsx(dl,{asChild:!0,children:i.jsxs(ve,{variant:"outline",className:"text-destructive border-[#
49E5E7EB] hover:bg-destructive/10 hover:text-destructive hover:border-destructive/30 h-10 px-4 font-bold",disabled:zt.isPending||gn.isPending||d||f,children:[i.jsx(Fr,{className:"w-4 h-4 mr-2"}),zt.isPending?"Deleting...":"Delete"]})}),i.jsxs(Di,{className:"border-[#E9EBF0]",children:[i.jsxs(Ri,{children:[i.jsx(Pi,{className:"text-[#111827] font-display",children:"Delete Post"}),i.jsxs(Bi,{className:"text-[#374151]",children:["Are you sure you want to delete this post for ",e.clientName,"? Its captions, media links, and comments will be removed. This action cannot be undone."]})]}),i.jsxs(Fi,{children:[i.jsx(Li,{className:"font-bold border-[#E5E7EB]",children:"Cancel"}),i.jsx(qi,{onClick:()=>zt.mutate({id:e.id}),className:"bg-destructive hover:bg-destructive/90 text-white font-bold",children:"Delete"})]})]})]}),i.jsx(ve,{onClick:Ws,disabled:gn.isPending||d||f,className:"btn-primary font-bold px-7 h-10",children:gn.isPending?"Saving...":"Save"})]})]})}),i.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-8 min-h-0",children:[i.jsx(wt,{className:"border-[#E9EBF0] shadow-sm",children:i.jsxs("div",{className:"p-4 space-y-2",children:[i.jsx("label",{htmlFor:`post-title-${e.id}`,className:"text-sm font-bold text-[#111827]",children:"Post Title"}),i.jsx(ze,{id:`post-title-${e.id}`,value:w,onChange:Ce=>C(Ce.target.value),placeholder:"Add a descriptive title",className:"bg-white border-[#E9EBF0]"}),i.jsxs("p",{className:"text-xs text-[#6B7280] font-medium",children:["Client: ",e.clientName,". This title is used in Slack notifications."]})]})}),i.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsx("div",{className:"bg-[#F8F9FB] px-4 py-3 border-b border-[#E9EBF0] font-bold text-sm text-[#111827]",children:"Status"}),i.jsx("div",{className:"p-4 bg-white",children:i.jsxs(en,{value:F,onValueChange:Ce=>Va(Ce),children:[i.jsx(Ht,{className:"bg-white border-[#E9EBF0] h-10 font-bold",children:i.jsx(tn,{})}),i.jsx(Yt,{children:FI.map(Ce=>i.jsx(mt,{value:Ce.value,children:Ce.label},Ce.value))})]})})]}),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsx("div",{className:"bg-[#F8F9FB] px-4 py-3 border-b border-[#E9EBF0] font-bold text-sm text-[#111827]",children:"Client Priority"}),i.jsxs("div",{className:"p-4 bg-white",children:[i.jsxs(en,{value:z,onValueChange:Ce=>{const pt=Ce;X(pt),gn.mutate({id:e.id,data:{priority:pt}})},children:[i.jsx(Ht,{className:"bg-white border-[#E9EBF0] h-10 font-bold",children:i.jsx(tn,{})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"normal",children:"Normal"}),i.jsx(mt,{value:"high",children:"High"}),i.jsx(mt,{value:"urgent",children:"Urgent"})]})]}),i.jsx("p",{className:"text-[11px] font-medium text-[#9CA3AF] mt-2",children:"High and urgent priorities are shown to the client."})]})]}),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"bg-[#F8F9FB] px-4 py-3 border-b border-[#E9EBF0] font-bold text-sm text-[#111827] flex items-center gap-2",children:[i.jsx(hx,{className:"w-4 h-4 text-[#00CEA6]"})," Schedule"]}),i.jsxs("div",{className:"p-4 bg-white",children:[i.jsxs("div",{className:"mb-4 space-y-1.5",children:[i.jsx("label",{htmlFor:`posting-month-${e.id}`,className:"text-xs font-bold text-[#374151]",children:"Posting Month"}),i.jsx(ze,{id:`posting-month-${e.id}`,type:"month",value:A,onChange:Ce=>j(Ce.target.value),className:"bg-white border-[#E9EBF0]"}),i.jsx("p",{className:"text-[11px] text-[#9CA3AF] font-medium",children:"This can be set before the exact posting date is known."})]}),i.jsxs(vA,{children:[i.jsx(bA,{asChild:!0,children:i.jsxs(ve,{variant:"outline",className:ie("w-full pl-3 text-left font-bold bg-white border-[#E9EBF0] focus:ring-[#00CEA6]",!M&&"text-[#9CA3AF]"),children:[M?Jt(M,"PPP"):i.jsx("span",{children:"Not scheduled"}),i.jsx($c,{className:"ml-auto h-4 w-4 text-[#004AAC]"})]})}),i.jsx(yy,{className:"w-auto p-0 border-[#E9EBF0]",align:"start",children:i.jsx(ZA,{mode:"single",selected:M,onSelect:Ce=>{R(Ce),Ce||D("")},initialFocus:!0})})]}),i.jsxs("div",{className:"mt-3 space-y-1.5",children:[i.jsx("label",{htmlFor:`scheduled-time-${e.id}`,className:"text-xs font-bold text-[#374151]",children:"Posting Time (Eastern Time)"}),i.jsx(ze,{id:`scheduled-time-${e.id}`,type:"time",step:60,value:T,onChange:Ce=>
49D(Ce.target.value),disabled:!M,className:"bg-white border-[#E9EBF0]"})]}),i.jsx("p",{className:"text-[11px] text-[#9CA3AF] font-medium mt-2",children:"Eastern Time is shown unchanged to everyone. Changes are applied when you click Save."})]})]})]}),i.jsx(wt,{className:"border-[#E9EBF0] shadow-sm",children:i.jsxs("div",{className:"p-4 space-y-4",children:[i.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[#9CA3AF]",children:"Comments"}),i.jsx(au,{comments:Te,isLoading:le,emptyLabel:"No comments yet on this post."}),i.jsx("div",{className:"pt-2 border-t border-[#E9EBF0]",children:i.jsx(dE,{isSubmitting:Gs.isPending,internalOnly:y,onSubmit:(Ce,pt,Pt)=>{Gs.mutate({id:e.id,data:{comment:Ce,attachment:pt,isInternal:Pt}})}})})]})}),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm",children:[i.jsxs("div",{className:"p-3 border-b border-[#E9EBF0] bg-[#F8F9FB] flex items-center gap-1.5",children:[S.length>1&&i.jsx(Hc,{className:"w-4 h-4 text-[#004AAC]"}),i.jsx("span",{className:"font-bold text-sm text-[#111827]",children:S.length>1?`Carousel â ${S.length} slides`:"Media"})]}),S.length===0?i.jsxs("div",{className:"p-6 flex flex-col items-center justify-center gap-3 text-center bg-white",children:[i.jsx("p",{className:"text-sm font-bold text-[#9CA3AF]",children:"No media attached yet"}),i.jsxs("label",{className:"bg-white border border-[#E9EBF0] shadow-sm rounded-md px-4 py-2 text-sm font-bold text-[#374151] flex items-center gap-2 cursor-pointer hover:bg-[#F8F9FB]",children:[d||f?i.jsx(ns,{className:"w-4 h-4 text-[#00CEA6] animate-spin"}):i.jsx(hg,{className:"w-4 h-4"}),f?"Preparing media...":d?"Uploading...":"Upload image or reel",i.jsx("input",{type:"file",accept:Gg,className:"hidden",onChange:Qs,disabled:d||f})]}),i.jsx("p",{className:"text-[11px] text-[#9CA3AF] font-medium",children:"Media is attached to the post when you click Save."})]}):i.jsx("div",{className:S.length>1?"grid grid-cols-2 gap-3 p-3":"",children:S.map((Ce,pt)=>i.jsxs("div",{className:"aspect-video flex items-center justify-center relative bg-black/5 rounded-md overflow-hidden",children:[Ce.mediaType==="video"?i.jsx(Pc,{objectPath:Ce.url,controls:!0,preload:"metadata",className:"max-h-full max-w-full"}):i.jsx("img",{src:`/api/storage${Ce.url}`,alt:"Post media",className:"max-h-full max-w-full object-contain"}),i.jsxs("label",{className:"absolute bottom-2 right-2 bg-white border border-[#E9EBF0] shadow-sm rounded-md px-2.5 py-1 text-[11px] font-bold text-[#374151] flex items-center gap-1 cursor-pointer hover:bg-[#F8F9FB]",children:[i.jsx(hg,{className:"w-3 h-3"})," Replace",i.jsx("input",{type:"file",accept:Gg,className:"hidden",onChange:Pt=>zr(pt,Pt),disabled:d||f})]}),(d||f)&&i.jsx("div",{className:"absolute inset-0 bg-white/80 flex items-center justify-center",children:i.jsxs("div",{className:"flex flex-col items-center gap-2 text-xs font-medium text-[#374151]",children:[i.jsx(ns,{className:"w-5 h-5 text-[#00CEA6] animate-spin"}),f&&"Preparing video for playback..."]})})]},pt))})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-[#9CA3AF] mb-3",children:"Platform Captions"}),i.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.platforms.map(Ce=>i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm focus-within:border-[#00CEA6] focus-within:ring-1 focus-within:ring-[#00CEA6]/20 transition-all",children:[i.jsx("div",{className:"px-4 py-3 border-b border-[#E9EBF0] bg-[#F8F9FB]",children:i.jsx("span",{className:"font-bold text-sm capitalize text-[#111827]",children:Ce==="linkedin"?"LinkedIn":Ce})}),i.jsx(rn,{value:v[Ce],onChange:pt=>b({...v,[Ce]:pt.target.value}),placeholder:`Caption for ${Ce}...`,className:"min-h-[140px] resize-none border-0 focus-visible:ring-0 rounded-none bg-transparent p-4 text-[#374151]"})]},Ce))})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2 border-b border-[#E9EBF0] pb-2 mb-4",children:[i.jsx(xx,{className:"w-4 h-4 text-[#004AAC]"}),i.jsx("h3",{className:"font-bold text-[#111827] uppercase tracking-wider text-xs",children:"Internal Directions"}),i.jsx("span",{className:"text-[10px] text-[#9CA3AF] font-medium ml-1",children:"â never shown to clients. Click a label to rename it."})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-1 relative",children:[i.jsxs("label",{className:"text-xs font-bold text-[#374151] flex items-center gap-1",children:["Caption Direction â"," ",i.jsx(tg,{value:Lt.caption,onSave:Ce=>Nt("caption",Ce)})]}),i.jsx(rn,{value:q,onChange:Ce=>Y(Ce.target.value),onBlur:()=>An("captionDirection",q,e.captionDirection),className:"min-h-[100px] border-[#
49E9EBF0] text-sm resize-y",placeholder:"Notes for the copywriter..."}),i.jsx(ci,{show:Ee==="captionDirection"})]}),i.jsxs("div",{className:"space-y-1 relative",children:[i.jsxs("label",{className:"text-xs font-bold text-[#374151] flex items-center gap-1",children:["Creative Direction â"," ",i.jsx(tg,{value:Lt.creative,onSave:Ce=>Nt("creative",Ce)})]}),i.jsx(rn,{value:ne,onChange:Ce=>Z(Ce.target.value),onBlur:()=>An("creativeDirection",ne,e.creativeDirection),className:"min-h-[100px] border-[#E9EBF0] text-sm resize-y",placeholder:"Notes for the designer..."}),i.jsx(ci,{show:Ee==="creativeDirection"})]}),i.jsxs("div",{className:"space-y-1 relative md:col-span-2",children:[i.jsxs("label",{className:"text-xs font-bold text-[#374151] flex items-center gap-1",children:["Reel Directions â"," ",i.jsx(tg,{value:Lt.reel,onSave:Ce=>Nt("reel",Ce)})]}),i.jsx(rn,{value:me,onChange:Ce=>L(Ce.target.value),onBlur:()=>An("reelDirections",me,e.reelDirections),className:"min-h-[80px] border-[#E9EBF0] text-sm resize-y",placeholder:"Audio, timing, on-screen text..."}),i.jsx(ci,{show:Ee==="reelDirections"})]})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"flex items-center gap-2 border-b border-[#E9EBF0] pb-2 mb-4",children:i.jsx("h3",{className:"font-bold text-[#111827] uppercase tracking-wider text-xs",children:"Production"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-1 relative",children:[i.jsx("label",{className:"text-xs font-bold text-[#374151]",children:"Working Canva Link"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(sC,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#9CA3AF]"}),i.jsx(ze,{value:J,onChange:Ce=>ee(Ce.target.value),onBlur:()=>An("workingCanvaLink",J,e.workingCanvaLink),className:"pl-9 border-[#
49E9EBF0]",placeholder:"https://canva.com/..."}),i.jsx(ci,{show:Ee==="workingCanvaLink"})]}),J&&i.jsx(ve,{variant:"outline",size:"icon",className:"shrink-0 border-[#E9EBF0] text-[#004AAC]",onClick:()=>window.open(J,"_blank"),children:i.jsx(gx,{className:"w-4 h-4"})})]})]}),i.jsxs("div",{className:"space-y-1 relative",children:[i.jsx("label",{className:"text-xs font-bold text-[#374151]",children:"Working Caption"}),i.jsx(rn,{value:te,onChange:Ce=>O(Ce.target.value),onBlur:()=>An("workingCaption",te,e.workingCaption),className:"min-h-[150px] border-[#E9EBF0] text-sm resize-y font-mono",placeholder:"Draft caption text..."}),i.jsx(ci,{show:Ee==="workingCaption"})]}),i.jsxs("div",{className:"space-y-1 relative",children:[i.jsx("label",{className:"text-xs font-bold text-[#374151]",children:"Hashtags"}),i.jsx(rn,{value:W,onChange:Ce=>ue(Ce.target.value),onBlur:()=>An("hashtags",W,e.hashtags),className:"min-h-[60px] border-[#E9EBF0] text-sm resize-y text-[#004AAC]",placeholder:"#growthshark #marketing..."}),i.jsx(ci,{show:Ee==="hashtags"})]}),i.jsxs("div",{className:"space-y-1 relative",children:[i.jsx("label",{className:"text-xs font-bold text-[#374151]",children:"Recommended Music"}),i.jsx(rn,{value:ce,onChange:Ce=>ye(Ce.target.value),onBlur:()=>An("recommendedMusic",ce,e.recommendedMusic),className:"min-h-[60
49px] border-[#E9EBF0] text-sm resize-y",placeholder:"Song title, artist, or audio vibe notes..."}),i.jsx(ci,{show:Ee==="recommendedMusic"})]})]})]})]})]})}function BI(e){for(const t of e.platforms){const n=`caption${t.charAt(0).toUpperCase()+t.slice(1)}`;if(e[n])return e[n]}return""}function qI(){const[e,t]=x.useState(()=>Ac(new Date)),[n,a]=x.useState(null),[o,c]=x.useState("all"),d=Si(Ac(e),{weekStartsOn:1}),f=aE(sE(e),{weekStartsOn:1}),h=[];for(let C=d;C<=f;C=y7(C,1))h.push(C);const p=[];for(let C=0;C<h.length;C+=7)p.push(h.slice(C,C+7));const{data:y}=Br(),v=o==="all"?{}:{clientId:Number(o)},{data:b,isLoading:S}=Ux(v),E=b?.find(C=>C.id===n),w=C=>b?b.filter(A=>A.scheduledDate?zg(Dr(A.scheduledDate),C):!1):[];return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1600px] mx-auto space-y-6 flex flex-col min-h-[calc(100vh-2rem)]",children:[i.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 shrink-0",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold font-display tracking-tight",children:"Content Calendar"}),i.jsx("p",{className:"text-muted-foreground mt-1 font-medium",children:"Monthly view of all scheduled posts across departments."})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(en,{value:o,onValueChange:C=>{c(C),a(null)},children:[i.jsx(Ht,{className:"w-[210px] bg-white border-[#E9EBF0] font-bold",children:i.jsx(tn,{placeholder:"All Clients"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Clients"}),y?.map(C=>i.jsx(mt,{value:String(C.id),children:C.name},C.id))]})]}),i.jsx(ve,{variant:"outline",onClick:()=>t(Ac(new Date)),className:"font-semibold shadow-sm text-[#004AAC] border-[#004AAC]/20 hover:bg-[#004AAC]/5",children:"This Month"}),i.jsxs("div",{className:"flex items-center gap-1 bg-card border border-border rounded-md p-1 shadow-sm",children:[i.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>t(oE(e)),className:"h-8 w-8 hover:bg-muted","aria-label":"Previous month",children:i.jsx(fx,{className:"w-4 h-4"})}),i.jsx("div",{className:"text-sm font-bold min-w-[150px] text-center text-[#111827]",children:Jt(e,"MMMM yyyy")}),i.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>t(iy(e,1)),className:"h-8 w-8 hover:bg-muted","aria-label":"Next month",children:i.jsx(Ti,{className:"w-4 h-4"})})]})]})]}),i.jsxs("div",{className:"flex-1 bg-card rounded-xl border border-border shadow-sm overflow-hidden flex flex-col",children:[i.jsx("div",{className:"grid grid-cols-7 border-b border-border bg-muted/50 shrink-0",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(C=>i.jsx("div",{className:"p-2.5 text-center text-xs font-bold uppercase tracking-wider text-muted-foreground border-r border-border last:border-r-0",children:C},C))}),i.jsx("div",{className:"flex-1 grid",style:{gridTemplateRows:`repeat(${p.length}, minmax(140px, 1fr))`},children:p.map((C,A)=>i.jsx("div",{className:"grid grid-cols-7 border-b border-border last:border-b-0",children:C.map(j=>{const M=w(j),R=oy(j,e),T=zg(j,new Date);return i.jsxs("div",{className:`border-r border-border last:border-r-0 p-1.5 space-y-1.5 overflow-y-auto ${R?"bg-background":"bg-muted/30"}`,children:[i.jsx("div",{className:`text-xs font-bold w-6 h-6 flex items-center justify-center rounded-full ${T?"bg-[#00CEA6] text-white shadow-sm":R?"text-[#111827]":"text-muted-foreground/50"}`,children:Jt(j,"d")}),S?i.jsx("div",{className:"h-10 bg-muted/30 rounded animate-pulse"}):M.map(D=>{const F=D.media[0],k=BI(D);return i.jsx("button",{type:"button",onClick:()=>a(D.id),className:"w-full text-left rounded-md border border-border/80 bg-white shadow-sm hover:shadow-md hover:border-[#00CEA6]/50 transition-all overflow-hidden group",children:i.jsxs("div",{className:"flex gap-1.5 p-1.5 items-start",children:[i.jsxs("div",{className:"w-9 h-9 rounded bg-black/5 overflow-hidden shrink-0 flex items-center justify-center relative",children:[F?F.mediaType==="video"?i.jsx(za,{className:"w-4 h-4 text-[#9CA3AF]"}):i.jsx("img",{src:`/api/storage${F.url}`,className:"w-full h-full object-cover",alt:""}
49):i.jsx($c,{className:"w-3.5 h-3.5 text-[#D1D5DB]"}),D.media.length>1&&i.jsxs("div",{className:"absolute bottom-0 right-0 bg-black/60 text-white text-[8px] font-bold px-0.5 rounded-tl flex items-center gap-0.5",children:[i.jsx(Hc,{className:"w-2 h-2"})," ",D.media.length]})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"text-[11px] font-bold text-[#111827] leading-tight truncate",children:D.title||"Untitled Post"}),i.jsx("div",{className:"text-[9px] text-[#6B7280] truncate",children:D.clientName}),D.scheduledTime&&i.jsx("div",{className:"text-[9px] font-bold text-[#004AAC]",children:lu(D.scheduledTime)}),i.jsx("div",{className:"text-[10px] text-[#374151] leading-snug truncate",children:k||i.jsx("span",{className:"italic text-[#9CA3AF]",children:"No caption yet"})}),i.jsx("div",{className:"mt-0.5 scale-90 origin-left",children:i.jsx(Ui,{status:D.status})})]})]})},D.id)})]},j.toISOString())})},A))})]}),i.jsx(_y,{post:E,open:n!==null,onOpenChange:C=>!C&&a(null)})]})}var lm="Switch",[LI]=ss(lm),[UI,ky]=LI(lm);function zI(e){const{__scopeSwitch:t,checked:n,children:a,defaultChecked:o,disabled:c,form:d,name:f,onCheckedChange:h,required:p,value:y="on",internal_do_not_use_render:v}=e,[b,S]=ua({prop:n,defaultProp:o??!1,onChange:h,caller:lm}),[E,w]=x.useState(null),[C,A]=x.useState(null),j=x.useRef(!1),M=E?!!d||!!E.closest("form"):!0,R={checked:b,setChecked:S,disabled:c,control:E,setControl:w,name:f,form:d,value:y,hasConsumerStoppedPropagationRef:j,required:p,defaultChecked:o,isFormControl:M,bubbleInput:C,setBubbleInput:A};return i.jsx(UI,{scope:t,...R,children:II(v)?v(R):a})}var XA="SwitchTrigger",JA=x.forwardRef(({__scopeSwitch:e,onClick:t,...n},a)=>{const{value:o,disabled:c,checked:d,required:f,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:y,isFormControl:v,bubbleInput:b}=ky(XA,e),S=nt(a,h);return i.jsx(Ie.button,{type:"button",role:"switch","aria-checked":d,"aria-required":f,"data-state":a2(d),"data-disabled":c?"":void 0,disabled:c,value:o,...n,ref:S,onClick:be(t,E=>{p(w=>!w),b&&v&&(y.current=E.isPropagationStopped(),y.current||E.stopPropagation())})})});JA.displayName=XA;var Ty=x.forwardRef((e,t)=>{const{__scopeSwitch:n,name:a,checked:o,defaultChecked:c,required:d,disabled:f,value:h,onCheckedChange:p,form:y,...v}=e;return i.jsx(zI,{__scopeSwitch:n,checked:o,defaultChecked:c,disabled:f,required:d,onCheckedChange:p,name:a,form:y,value:h,internal_do_not_use_render:({isFormControl:b})=>i.jsxs(i.Fragment,{children:[i.jsx(JA,{...v,ref:t,__scopeSwitch:n}),b&&i.jsx(s2,{__scopeSwitch:n})]})})});Ty.displayName=lm;var e2="SwitchThumb",t2=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...a}=e,o=ky(e2,n);return i.jsx(Ie.span,{"data-state":a2(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t})});t2.displayName=e2;var n2="SwitchBubbleInput",s2=x.forwardRef(({__scopeSwitch:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:o,checked:c,defaultChecked:d,required:f,disabled:h,name:p,value:y,form:v,bubbleInput:b,setBubbleInput:S}=ky(n2,e),E=nt(n,S),w=ly(c),C=kx(a);x.useEffect(()=>{const j=b;if(!j)return;const M=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(M,"checked").set,D=!o.current;if(w!==c&&T){const F=new Event("click",{bubbles:D});T.call(j,c),j.dispatchEvent(F)}},[b,w,c,o]);const A=x.useRef(c);return i.jsx(Ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??A.current,required:f,disabled:h,name:p,value:y,form:v,...t,tabIndex:-1,ref:E,style:{...t.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});s2.displayName=n2;function II(e){return typeof e=="function"}function a2(e){return e?"checked":"unchecked"}const r2=x.forwardRef(({className:e,...t},n)=>i.jsx(Ty,{className:ie("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:i.jsx(t2,{className:ie("pointer-events-none block h-4 w-4 roun
49ded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));r2.displayName=Ty.displayName;const i2=["January","February","March","April","May","June","July","August","September","October","November","December"],$I=["Q1 2025","Q2 2025","Q3 2025","Q4 2025","Q1 2026","Q2 2026","Q3 2026","Q4 2026"];function VI(e=new Date){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`}function o2(e){const t=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(e);if(!t)return e;const n=Number(t[2])-1;return`${i2[n]} ${t[1]}`}function HI(e){return/^Q[1-4] \d{4}$/.test(e)}function YI(){const e=new Date().getFullYear();return[e-1,e,e+1].map(t=>({year:t,months:i2.map((n,a)=>({value:`${t}-${String(a+1).padStart(2,"0")}`,label:`${n} ${t}`}))}))}function KI({clientId:e,planningPeriod:t}){const n=Kt(),a=t,o=o2(t),{data:c,isLoading:d}=K8({clientId:e,quarter:a},{query:{enabled:!0,queryKey:Ag({clientId:e,quarter:a})}}),f=Z8({mutation:{onSuccess:(b,S)=>{n.setQueryData(Ag({clientId:S.data.clientId,quarter:S.data.quarter}),b)}}}),[h,p]=x.useState(""),y=`${e}-${a}`,v=x.useRef(null);return x.useEffect(()=>{v.current!==null&&v.current!==y&&(v.current=null,p("")),!d&&v.current!==y&&(p(c?.notes??""),v.current=y)},[c,d,y]),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] overflow-hidden",children:[i.jsxs("div",{className:"bg-[#F8F9FB] px-4 py-3 border-b border-[#E9EBF0] font-bold text-[#111827] text-sm",children:[o," Notes"]}),i.jsx(rn,{value:h,onChange:b=>p(b.target.value),onBlur:()=>{h!==(c?.notes??"")&&f.mutate({data:{clientId:e,quarter:a,notes:h}})},placeholder:`Add high-level strategy notes for ${o}...`,className:"border-0 focus-visible:ring-0 rounded-none resize-none min-h-[120px] bg-white text-sm"})]})}function zd({title:e,category:t,clientId:n,options:a,showApprovalToggle:o=!1,createOption:c,updateOption:d,deleteOption:f}){const[h,p]=x.useState(""),y=()=>{const v=h.split(",").map(b=>b.trim()).filter(Boolean);if(v.length){for(const b of v)c.mutate({data:{clientId:n,category:t,value:b}});p("")}};return i.jsxs("div",{className:"space-y-3",children:[i.jsx("h3",{className:"font-bold text-sm text-[#111827] uppercase tracking-wider",children:e}),o&&i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:'Toggle "Approval" on a status to make posts with that status appear in Post Details.'}),i.jsx("div",{className:"space-y-2",children:a.map(v=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ze,{defaultValue:v.value,onBlur:b=>{b.target.value!==v.value&&b.target.value.trim()&&d.mutate({id:v.id,data:{value:b.target.value.trim()}})},className:"h-9 border-[#E9EBF0] flex-1"}),o&&i.jsxs("div",{className:"flex items-center gap-2 shrink-0 border border-[#E9EBF0] rounded-md px-3 h-9 bg-[#F8F9FB]",children:[i.jsx(r2,{checked:v.isApprovalStatus,onCheckedChange:b=>d.mutate({id:v.id,data:{isApprovalStatus:b}})}),i.jsx("span",{className:"text-xs font-bold text-[#374151]",children:"Approval"})]}),i.jsx(ve,{variant:"ghost",size:"icon",className:"h-9 w-9 text-[#9CA3AF] hover:text-destructive shrink-0",onClick:()=>f.mutate({id:v.id}),children:i.jsx(Fr,{className:"w-4 h-4"})})]},v.id))}),i.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[i.jsx(ze,{placeholder:"Add values separated by commasâ¦",value:h,onChange:v=>p(v.target.value),onKeyDown:v=>v.key==="Enter"&&y(),className:"h-9 border-[#E9EBF0] flex-1"}),i.jsx(ve,{onClick:y,disabled:!h.trim(),className:"btn-primary h-9 px-4 font-bold text-sm shrink-0",children:"Save"})]})]})}function GI({clientId:e}){const t=Kt(),n=()=>t.invalidateQueries({queryKey:of({clientId:e})}),{data:a=[]}=uS({clientId:e},{query:{enabled:!0,queryKey:of({clientId:e})}}),o=A8({mutation:{onSuccess:n}}),c=M8({mutation:{onSuccess:n}}),d=F8({mutation:{onSuccess:n}}),f=x.useMemo(()=>a.filter(v=>v.category==="content_pillar"),[a]),h=x.useMemo(()=>a.filter(v=>v.category==="post_type"),[a]),p=x.useMemo(()=>a.filter(v=>v.category==="status"),[a]),y=x.useMemo(()=>a.filter(v=>v.category==="platform"),[a]);
49return i.jsxs(Rn,{className:"max-w-2xl border-[#E9EBF0] max-h-[85vh] overflow-y-auto",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"text-[#111827] font-display",children:"Manage Strategy Options"})}),i.jsxs("div",{className:"space-y-8 py-4",children:[i.jsx(zd,{title:"Content Pillars",category:"content_pillar",clientId:e,options:f,createOption:o,updateOption:c,deleteOption:d}),i.jsx(zd,{title:"Post Types",category:"post_type",clientId:e,options:h,createOption:o,updateOption:c,deleteOption:d}),i.jsx(zd,{title:"Statuses",category:"status",clientId:e,options:p,showApprovalToggle:!0,createOption:o,updateOption:c,deleteOption:d}),i.jsx(zd,{title:"Platforms",category:"platform",clientId:e,options:y,createOption:o,updateOption:c,deleteOption:d})]})]})}function WI({post:e,options:t,updatePost:n,deletePost:a}){const o=x.useMemo(()=>t.filter(v=>v.category==="content_pillar"),[t]),c=x.useMemo(()=>t.filter(v=>v.category==="post_type"),[t]),d=x.useMemo(()=>t.filter(v=>v.category==="status"),[t]),f=x.useMemo(()=>t.filter(v=>v.category==="platform"),[t]),[h,p]=x.useState(e.topic??"");x.useEffect(()=>{p(e.topic??"")},[e.id,e.topic]);const y=(v,b,S,E)=>i.jsxs(en,{value:b??"none",onValueChange:w=>n.mutate({id:e.id,data:{[v]:w==="none"?null:w}}),children:[i.jsx(Ht,{className:"h-9 border-transparent hover:border-[#E9EBF0] focus:ring-0 focus:border-[#004AAC] shadow-none bg-transparent min-w-[140px]",children:i.jsx(tn,{placeholder:E})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"none",className:"text-[#9CA3AF] italic",children:"None"}),S.map(w=>i.jsx(mt,{value:w.value,children:w.value},w.id))]})]});return i.jsxs(Gn,{className:"border-[#E9EBF0] hover:bg-transparent",children:[i.jsx(Ot,{className:"p-2",children:i.jsx(ze,{value:h,onChange:v=>p(v.target.value),onBlur:()=>{h!==(e.topic??"")&&n.mutate({id:e.id,data:{topic:h}})},className:"h-9 border-transparent hover:border-[#E9EBF0] focus-visible:border-[#004AAC] bg-transparent shadow-none px-2 rounded-sm",placeholder:"Post topic..."})}),i.jsx(Ot,{className:"p-2 w-[160px]",children:y("platform",e.platform,f,"Platform")}),i.jsx(Ot,{className:"p-2 w-[180px]",children:y("contentPillar",e.contentPillar,o,"Content Pillar")}),i.jsx(Ot,{className:"p-2 w-[160px]",children:y("postType",e.postType,c,"Post Type")}),i.jsx(Ot,{className:"p-2 w-[160px]",children:y("status",e.status,d,"Status")}),i.jsx(Ot,{className:"p-2 w-[52px] text-right",children:i.jsx(ve,{variant:"ghost",size:"icon",className:"h-8 w-8 text-[#9CA3AF] hover:text-destructive hover:bg-destructive/10",onClick:()=>a.mutate({id:e.id}),children:i.jsx(Fr,{className:"w-4 h-4"})})})]})}const QI=[{value:"none",label:"Default order"},{value:"platform",label:"Platform"},{value:"contentPillar",label:"Content Pillar"},{value:"postType",label:"Post Type"},{value:"status",label:"Status"}];function ZI(){const e=Kt(),[t,n]=x.useState("none"),[a,o]=x.useState(()=>VI()),[c,d]=x.useState("none"),f=x.useMemo(()=>YI(),[]),{data:h}=Br(),p=t!=="none"?Number(t):null,y=o2(a),v=HI(a),{data:b=[]}=uS({clientId:p},{query:{enabled:!!p,queryKey:of({clientId:p})}}),S={clientId:p,quarter:a},{data:E=[]}=l8(S,{query:{enabled:!!p&&!!a,queryKey:cS(S)}}),w=x.useMemo(()=>c==="none"?E:[...E].sort((T,D)=>{const F=T[c]??"",k=D[c]??"";return F.localeCompare(k)}),[E,c]),C=()=>e.invalidateQueries({predicate:T=>{const[D,F]=T.queryKey;return D==="/api/strategy/posts"&&F?.clientId===p}}),A=f8({mutation:{onSuccess:C}}),j=g8({mutation:{onSuccess:C}}),M=b8({mutation:{onSuccess:C}}),R=()=>{!p||v||A.mutate({data:{clientId:p,quarter:a,topic:""}})};return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1400px] mx-auto space-y-8",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827]",children:"Strategy"}),i.jsx("p",{className:"text-[#374151] mt-1 font-medium",children:"Internal content planning and direction."})]}),i.jsx(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] bg-[#F8F9FB]",children:i.jsxs(Dn,{className:"p-4 flex flex-wrap gap-4 items-center",children:[i.jsxs("div",{className:"flex items-center gap-2 text-[#374151] font-bold text-sm shrink-0",children:[i.jsx(kf,{className:"w-4 h-4 text-[#004AAC]"}),"Client:"]}),i.jsxs(en,{value:t,onValueChange:T=>{n(T),d("none")}
49,children:[i.jsx(Ht,{className:"w-[260px] bg-white border-[#E9EBF0] font-bold h-10",children:i.jsx(tn,{placeholder:"Select a client..."})}),i.jsx(Yt,{children:h?.map(T=>i.jsx(mt,{value:T.id.toString(),children:T.name},T.id))})]}),i.jsx("div",{className:"w-px h-8 bg-[#E9EBF0] mx-1 hidden sm:block"}),i.jsxs(en,{value:a,onValueChange:o,children:[i.jsx(Ht,{className:"w-[210px] bg-white border-[#E9EBF0] font-bold h-10",children:i.jsx(tn,{placeholder:"Month"})}),i.jsxs(Yt,{className:"max-h-[360px]",children:[f.map(({year:T,months:D})=>i.jsxs(Aj,{children:[i.jsx(Yg,{className:"text-xs uppercase tracking-wider text-[#9CA3AF]",children:T}),D.map(F=>i.jsx(mt,{value:F.value,children:F.label},F.value))]},T)),i.jsx(UE,{}),i.jsxs(Aj,{children:[i.jsx(Yg,{className:"text-xs uppercase tracking-wider text-[#9CA3AF]",children:"Legacy quarterly plans"}),$I.map(T=>i.jsxs(mt,{value:T,children:[T," (Legacy)"]},T))]})]})]}),p&&i.jsx("div",{className:"ml-auto",children:i.jsxs(Vn,{children:[i.jsx(Xc,{asChild:!0,children:i.jsxs(ve,{variant:"outline",className:"h-10 border-[#E9EBF0] bg-white font-bold text-[#374151]",children:[i.jsx(uF,{className:"w-4 h-4 mr-2 text-[#9CA3AF]"}),"Manage Options"]})}),i.jsx(GI,{clientId:p})]})})]})}),p?i.jsxs("div",{className:"space-y-6",children:[v&&i.jsxs("div",{className:"rounded-lg border border-[#FDE68A] bg-[#FFFBEB] px-4 py-3 text-sm text-[#92400E]",children:[i.jsx("p",{className:"font-bold",children:"Viewing a legacy quarterly plan"}),i.jsx("p",{className:"mt-0.5",children:"This plan remains separate from monthly plans and has not been moved into a specific month."})]}),i.jsx(KI,{clientId:p,planningPeriod:a}),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[#E9EBF0] bg-[#F8F9FB] gap-4 flex-wrap",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-bold text-[#111827]",children:"Content Plan"}),i.jsx("p",{className:"text-xs text-[#9CA3AF] mt-0.5",children:y})]}),i.jsxs("div",{className:"flex items-center gap-3 ml-auto",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(zD,{className:"w-4 h-4 text-[#9CA3AF]"}),i.jsxs(en,{value:c,onValueChange:d,children:[i.jsx(Ht,{className:"h-9 w-[180px] border-[#E9EBF0] bg-white text-sm font-bold",children:i.jsx(tn,{})}),i.jsx(Yt,{children:QI.map(T=>i.jsx(mt,{value:T.value,children:T.label},T.value))})]})]}),!v&&i.jsxs(ve,{onClick:R,disabled:A.isPending,className:"btn-primary h-9 font-bold px-4",children:[i.jsx(tF,{className:"w-4 h-4 mr-2"}),"Add Post"]})]})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs(ru,{children:[i.jsx(iu,{className:"bg-white",children:i.jsxs(Gn,{className:"border-[#E9EBF0]",children:[i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider h-10",children:"Topic"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider h-10",children:"Platform"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider h-10",children:"Content Pillar"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider h-10",children:"Post Type"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase text-xs tracking-wider h-10",children:"Status"}),i.jsx(Xt,{className:"w-[52px]"})]})}),i.jsx(ou,{children:w.length===0?i.jsx(Gn,{children:i.jsxs(Ot,{colSpan:6,className:"h-32 text-center text-[#9CA3AF]",children:[i.jsxs("p",{className:"font-bold text-[#374151]",children:["No posts planned for ",y,"."]}),i.jsx("p",{className:"text-sm",children:v?"Legacy quarterly plans are read-only for new posts â plan new content under a month instead.":'Click "Add Post" to start planning for this month.'})]})}):w.map(T=>i.jsx(WI,{post:T,options:b,updatePost:j,deletePost:M},T.id))})]})})]})]}):i.jsxs("div",{className:"text-center py-20 border border-dashed border-[#E9EBF0] rounded-xl bg-[#F8F9FB]",children:[i.jsx(JN,{className:"w-10 h-10 text-[#9CA3AF] mx-auto mb-3 opacity-50"}),i.jsx("h3",{className:"font-bold text-[#111827] text-lg",children:"No Client Selected"}),i.jsx("p",{className:"text-[#374151]",children:"Select a client above to view and manage their strategy."})]})]})}var cm="Checkbox",[XI]=ss(cm),[JI,My]=XI(cm);function e$(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:o,disabled:c,form:d,name:f,onCheckedChange:h,required:p,value:y="on",internal_do_not_use_render:v}=e,[b,S]=ua({prop:n,defaultProp:o??!1,onChange:h,caller:cm}),[E,w]=x.useState(null),[C,A]=x.useState(null),j=x.useRef(!1),M=E?!!d||!!E.closest("form"):!0,R={checked:b,disabled:c,setChecked:S,control:E,setControl:w,name:f,form:d,value:y,hasConsumerStoppedPropagationRef:j,required:p,defaultChecked:Sr(o)?!1:o,isFormControl:M,bubbleInput:C,setBubbleInput:A};
49return i.jsx(JI,{scope:t,...R,children:t$(v)?v(R):a})}var l2="CheckboxTrigger",c2=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},o)=>{const{control:c,value:d,disabled:f,checked:h,required:p,setControl:y,setChecked:v,hasConsumerStoppedPropagationRef:b,isFormControl:S,bubbleInput:E}=My(l2,e),w=nt(o,y),C=x.useRef(h);return x.useEffect(()=>{const A=c?.form;if(A){const j=()=>v(C.current);return A.addEventListener("reset",j),()=>A.removeEventListener("reset",j)}},[c,v]),i.jsx(Ie.button,{type:"button",role:"checkbox","aria-checked":Sr(h)?"mixed":h,"aria-required":p,"data-state":h2(h),"data-disabled":f?"":void 0,disabled:f,value:d,...a,ref:w,onKeyDown:be(t,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:be(n,A=>{v(j=>Sr(j)?!0:!j),E&&S&&(b.current=A.isPropagationStopped(),b.current||A.stopPropagation())})})});c2.displayName=l2;var Oy=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:c,required:d,disabled:f,value:h,onCheckedChange:p,form:y,...v}=e;return i.jsx(e$,{__scopeCheckbox:n,checked:o,defaultChecked:c,disabled:f,required:d,onCheckedChange:p,name:a,form:y,value:h,internal_do_not_use_render:({isFormControl:b})=>i.jsxs(i.Fragment,{children:[i.jsx(c2,{...v,ref:t,__scopeCheckbox:n}),b&&i.jsx(m2,{__scopeCheckbox:n})]})})});Oy.displayName=cm;var u2="CheckboxIndicator",d2=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,c=My(u2,n);return i.jsx(Hn,{present:a||Sr(c.checked)||c.checked===!0,children:i.jsx(Ie.span,{"data-state":h2(c.checked),"data-disabled":c.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});d2.displayName=u2;var f2="CheckboxBubbleInput",m2=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:o,checked:c,defaultChecked:d,required:f,disabled:h,name:p,value:y,form:v,bubbleInput:b,setBubbleInput:S}=My(f2,e),E=nt(n,S),w=ly(c),C=kx(a);x.useEffect(()=>{const j=b;if(!j)return;const M=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(M,"checked").set,D=!o.current;if(w!==c&&T){const F=new Event("click",{bubbles:D});j.indeterminate=Sr(c),T.call(j,Sr(c)?!1:c),j.dispatchEvent(F)}},[b,w,c,o]);const A=x.useRef(Sr(c)?!1:c);return i.jsx(Ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??A.current,required:f,disabled:h,name:p,value:y,form:v,...t,tabIndex:-1,ref:E,style:{...t.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});m2.displayName=f2;function t$(e){return typeof e=="function"}function Sr(e){return e==="indeterminate"}function h2(e){return Sr(e)?"indeterminate":e?"checked":"unchecked"}const Ua=x.forwardRef(({className:e,...t},n)=>i.jsx(Oy,{ref:n,className:ie("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:i.jsx(d2,{className:ie("grid place-content-center text-current"),children:i.jsx(Vc,{className:"h-4 w-4"})})}));Ua.displayName=Oy.displayName;const n$=[{value:"all",label:"All Statuses"},{value:"needs_caption",label:"Draft"},{value:"pending",label:"Pending Review"},{value:"approved",label:"Approved"},{value:"needs_revision",label:"Needs Revision"},{value:"posted",label:"Posted"}],s$={facebook:"captionFacebook",instagram:"captionInstagram",tiktok:"captionTiktok",pinterest:"captionPinterest",linkedin:"captionLinkedin"};function a$({url:e,mediaType:t}){const n=`/api/storage${e}`;return t==="video"?i.jsx("div",{className:"w-full h-full bg-black/80 flex items-center justify-center",children:i.jsx(za,{className:"w-5 h-5 text-white"})}):i.jsx("img",{src:n,className:"w-full h-full object-cover",alt:"Post media"})}function r$({post:e}){const t=e.platforms.map(n=>({platform:n,caption:e[s$[n]]})).filter(n=>n.caption);return t.length===0?i.jsx("p",{className:"text-sm text-[#9CA3AF] italic",children:"No captions yet"}):i.jsx("div",{className:"space-y-1.5",children:t.map(({platform:n,caption:a})=>i.jsxs("div",{className:"text-sm text-[#374151] line-clamp-2",children:[i.jsxs("span",{className:"font-bold capitalize text-[#111827]",children:[n==="linkedin"?"LinkedIn":n,": "]}),a]},n))})}function i$(){const[,e]=ws(),[t,n]=x.useState("all"),[a,o]=x.useState("all"),{data:c}=Br(),d={};t!=="all"&&(d.clientId=Number(t)),a!=="all"&&(d.status=a);const{data:f,isLoading:h}
49=Ux(d),[p,y]=x.useState(null),[v,b]=x.useState(new Set),[S,E]=x.useState(!1),w=Kt(),{toast:C}=pn(),A=sS(),j=f?.find(F=>F.id===p);x.useEffect(()=>{b(new Set),y(null)},[t,a]);const M=!!f&&f.length>0&&f.every(F=>v.has(F.id));function R(){f&&b(M?new Set:new Set(f.map(F=>F.id)))}function T(F){b(k=>{const z=new Set(k);return z.has(F)?z.delete(F):z.add(F),z})}async function D(){if(v.size!==0){E(!0);try{await Promise.all(Array.from(v).map(F=>A.mutateAsync({id:F,data:{status:"pending"}}))),C({title:`Sent ${v.size} post${v.size>1?"s":""} for review`}),b(new Set),w.invalidateQueries({queryKey:hi()}),w.invalidateQueries({queryKey:Uf()})}catch{C({title:"Failed to send some posts for review",variant:"destructive"})}finally{E(!1)}}}return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1200px] mx-auto space-y-5",children:[i.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-4",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827] flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 brand-gradient rounded-lg flex items-center justify-center shadow-sm",children:i.jsx(xx,{className:"w-6 h-6 text-white"})}),"Post Details"]}),i.jsx("p",{className:"text-[#374151] mt-2 font-medium",children:"Browse, manage, and edit production details for every post."})]}),i.jsxs(ve,{onClick:()=>e("/admin/posts/new"),className:"btn-primary font-bold h-11 px-6 gap-2 shrink-0",children:[i.jsx(tf,{className:"w-4 h-4"}),"New Post"]})]}),i.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[i.jsx(_R,{className:"w-4 h-4 text-[#004AAC] shrink-0"}),i.jsxs(en,{value:t,onValueChange:F=>n(F),children:[i.jsx(Ht,{className:"w-[200px] bg-white border-[#E9EBF0] h-10 font-bold",children:i.jsx(tn,{placeholder:"All Clients"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Clients"}),c?.map(F=>i.jsx(mt,{value:F.id.toString(),children:F.name},F.id))]})]}),i.jsxs(en,{value:a,onValueChange:F=>o(F),children:[i.jsx(Ht,{className:"w-[180px] bg-white border-[#E9EBF0] h-10 font-bold",children:i.jsx(tn,{placeholder:"All Statuses"})}),i.jsx(Yt,{children:n$.map(F=>i.jsx(mt,{value:F.value,children:F.label},F.value))})]})]}),i.jsx(wt,{className:"border-[#E9EBF0] bg-[#F8F9FB]",children:i.jsxs(Dn,{className:"p-4 flex items-center justify-between gap-3 flex-wrap",children:[i.jsxs("label",{className:`flex items-center gap-2 select-none ${!f||f.length===0?"opacity-40 cursor-not-allowed":"cursor-pointer"}`,children:[i.jsx(Ua,{checked:M,onCheckedChange:R,disabled:!f||f.length===0}),i.jsxs("span",{className:"text-sm font-bold text-[#374151]",children:["Select All (",f?.length||0," post",(f?.length||0)===1?"":"s",")"]})]}),i.jsxs(ve,{onClick:D,disabled:v.size===0||S,className:"font-bold h-10 btn-primary",children:[i.jsx(rC,{className:"w-3.5 h-3.5 mr-2"}),S?"Sending...":`Send for Review${v.size>0?` (${v.size})`:""}`]})]})}),h?i.jsxs("div",{className:"p-10 text-center text-[#9CA3AF] font-bold flex items-center justify-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full border-4 border-[#00CEA6] border-t-transparent animate-spin"}),"Loading posts..."]}):f&&f.length>0?i.jsx("div",{className:"space-y-4",children:f.map(F=>{const k=F.media??[];return i.jsx(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)] hover:shadow-md transition-shadow",children:i.jsxs(Dn,{className:"p-5 flex flex-col md:flex-row gap-5",children:[i.jsx("div",{className:"pt-1",children:i.jsx(Ua,{checked:v.has(F.id),onCheckedChange:()=>T(F.id)})}),i.jsx("button",{type:"button",onClick:()=>y(F.id),className:"flex gap-2 shrink-0 overflow-x-auto md:w-48 text-left",children:k.length>0?k.slice(0,3).map((z,X)=>i.jsxs("div",{className:"relative w-20 h-20 md:w-full md:h-24 rounded-md overflow-hidden border border-[#E9EBF0] shrink-0 bg-black/5",children:[i.jsx(a$,{url:z.url,mediaType:z.mediaType}),k.length>1&&i.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 py-0.5 text-center",children:i.jsxs("span",{className:"text-[9px] font-bold text-white",children:["Slide ",X+1]})}),X===2&&k.length>3&&i.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:i.jsxs("span",{className:"text-white font-bold text-sm",children:["+",k.length-3]})})]},X)):i.jsx("div",{className:"w-20 h-20 md:w-full md:h-24 rounded-md border border-dashed border-[#
49E9EBF0] flex items-center justify-center text-[#D1D5DB] shrink-0",children:i.jsx(Fa,{className:"w-6 h-6"})})}),i.jsxs("div",{className:"flex-1 min-w-0 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-wrap min-w-0",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"font-bold text-[#111827] truncate",children:F.title||"Untitled Post"}),i.jsx("div",{className:"text-xs font-medium text-[#9CA3AF] truncate",children:F.clientName})]}),i.jsx(cu,{platforms:F.platforms})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx(Ui,{status:F.status}),(F.unreadCommentCount??0)>0&&i.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold bg-[#FECACA] text-[#991B1B] px-2 py-0.5 rounded-full border border-[#FCA5A5] animate-pulse",children:"ð¬ New comment"}),i.jsxs(ve,{size:"sm",variant:"outline",onClick:()=>y(F.id),className:"font-bold h-8 border-[#E9EBF0] text-[#374151]",children:[i.jsx(Ar,{className:"w-3.5 h-3.5 mr-1.5"}),"Edit"]})]})]}),i.jsx(r$,{post:F}),i.jsxs("div",{className:"flex items-center gap-4 text-[11px] font-medium text-[#9CA3AF] flex-wrap",children:[i.jsxs("span",{children:["Created ",Jt(new Date(F.createdAt),"MMM d, yyyy")]}),F.scheduledDate&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(hx,{className:"w-3 h-3"}),"Scheduled ",Jt(Dr(F.scheduledDate),"MMM d, yyyy"),F.scheduledTime&&` at ${lu(F.scheduledTime)}`]}),F.department&&i.jsx("span",{className:"font-bold text-[#004AAC] bg-[#004AAC]/10 px-1.5 py-0.5 rounded uppercase tracking-wider text-[10px]",children:F.department.replace(/_/g," ")})]})]})]})},F.id)})}):i.jsxs("div",{className:"p-16 text-center",children:[i.jsx(Fa,{className:"w-10 h-10 mx-auto mb-3 text-[#D1D5DB]"}),i.jsx("p",{className:"text-[#374151] font-bold",children:"No posts found"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:"Adjust filters or create a post."}),i.jsxs(ve,{onClick:()=>e("/admin/posts/new"),className:"mt-4 btn-primary font-bold h-10 gap-2",children:[i.jsx(tf,{className:"w-4 h-4"}),"New Post"]})]}),i.jsx(_y,{post:j,open:p!==null,onOpenChange:F=>!F&&y(null)})]})}const o$=["facebook","instagram","tiktok","pinterest","linkedin"],$j=["social_media","design","content","web_dev","seo","email_sms"],l$=[{value:"single",label:"Single Post",description:"One image, one post.",icon:jR},{value:"reel",label:"Reel",description:"One video reel, one post.",icon:za},{value:"bulk",label:"Bulk Batch",description:"Many files, one post per file, each with its own caption.",icon:BR},{value:"carousel",label:"Carousel",description:"Many files grouped into one post with a shared caption.",icon:Hc}],c$=Mi({title:ct().optional(),clientId:f7().min(1,"Please select a client"),platforms:tu(pf(["facebook","instagram","tiktok","pinterest","linkedin"])).min(1,"Select at least one platform"),department:pf(["social_media","design","content","web_dev","seo","email_sms"]).nullable(),postingMonth:ct().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional().or(ry("")),scheduledDate:m7().optional().nullable(),scheduledTime:ct().optional(),captionInstagram:ct().optional(),captionFacebook:ct().optional(),captionTiktok:ct().optional(),captionPinterest:ct().optional(),captionLinkedin:ct().optional()});function u$(){const[,e]=ws(),{toast:t}=pn(),{admin:n}=ma(),{data:a}=Br(),[o,c]=x.useState("single"),[d,f]=x.useState([]),[h,p]=x.useState({}),{uploadFileOrThrow:y}=su(),v=wi({resolver:ji(c$),defaultValues:{title:"",platforms:[],department:null,postingMonth:"",scheduledTime:""}}),b=v.watch("platforms"),S=n?.role==="staff",E=x.useMemo(()=>(n?.departments??[]).filter(k=>$j.includes(k)),[n?.departments]),w=S?E:$j,C=S&&E.length===1?E[0]:null;x.useEffect(()=>{C&&v.setValue("department",C,{shouldValidate:!0})},[v,C]);const A=y5({mutation:{onError:k=>{t({title:"Failed to create post",description:k?.response?.data?.error??"Check the post details and try again.",variant:"destructive"})}}});function j(k){c(k),f([]),p({})}async function M(k){const z=Array.from(k.target.files||[]);if(!z.length)return;k.target.value="";const X=z.map(Z=>({file:Z,validation:Wg(Z,{videoOnly:o==="reel",imageOnly:o==="single"})})),q=X.filter(Z=>!Z.validation.ok);if(q.length>
490){const Z=q[0].validation;t({title:"Some files werenât added",description:Z.ok?void 0:Z.error,variant:"destructive"})}const Y=X.flatMap(({file:Z,validation:me})=>me.ok?[{id:Math.random().toString(36).substring(7),file:Z,mediaType:me.mediaType,mediaUrl:null,status:"uploading"}]:[]);if(!Y.length)return;const ne=o==="single"||o==="reel"?Y.slice(0,1):Y;(o==="single"||o==="reel")&&Y.length>1&&t({title:o==="reel"?"One reel at a time":"One file at a time",description:"Only the first selected file was added."}),f(o==="single"||o==="reel"?ne:Z=>[...Z,...ne]);for(const Z of ne)await R(Z)}async function R(k){f(z=>z.map(X=>X.id===k.id?{...X,status:"uploading",error:void 0}:X));try{const z=await y(k.file);k.mediaType==="video"&&f(q=>q.map(Y=>Y.id===k.id?{...Y,status:"preparing"}:Y));const X=k.mediaType==="video"?await Kg(z.objectPath):z.objectPath;f(q=>q.map(Y=>Y.id===k.id?{...Y,mediaUrl:X,status:"success"}:Y))}catch(z){const X=z instanceof Error?z.message:"Upload failed. Please retry.";f(q=>q.map(Y=>Y.id===k.id?{...Y,status:"error",error:X}:Y)),t({title:`Could not upload ${k.file.name}`,description:X,variant:"destructive"})}}function T(k){f(z=>z.filter(X=>X.id!==k)),p(z=>{const X={...z};return delete X[k],X})}function D(k,z,X){p(q=>({...q,[k]:{...q[k],[z]:X}}))}async function F(k){const z=k.department??C;if(S&&!z){v.setError("department",{message:"Choose one of your assigned departments before creating a post."});return}if(d.some(Y=>Y.status==="uploading"||Y.status==="preparing")){t({title:"Uploads in progress",description:"Please wait for all media to finish uploading.",variant:"destructive"});return}const X={title:k.title?.trim()||null,clientId:k.clientId,platforms:k.platforms,department:z,postingMonth:k.postingMonth||null,scheduledDate:k.scheduledDate?iA(k.scheduledDate):null,scheduledTime:k.scheduledDate&&k.scheduledTime?k.scheduledTime:null};if(d.some(Y=>Y.status==="error")){t({title:"Some uploads failed",description:"Retry or remove failed files before creating the post.",variant:"destructive"});return}const q=d.filter(Y=>Y.status==="success");if(o==="reel"&&q.length!==1){t({title:"Add a reel before creating this post",description:"Upload one MP4, MOV, WebM, or M4V video reel.",variant:"destructive"});return}try{if(o==="carousel")await A.mutateAsync({data:{...X,media:q.map(Y=>({url:Y.mediaUrl,mediaType:Y.mediaType})),captionFacebook:k.captionFacebook||null,captionInstagram:k.captionInstagram||null,captionTiktok:k.captionTiktok||null,captionPinterest:k.captionPinterest||null,captionLinkedin:k.captionLinkedin||null}});else if(o==="bulk"){if(q.length===0){t({title:"Add at least one file for a bulk batch",variant:"destructive"});return}for(const Y of q){const ne=h[Y.id]||{};await A.mutateAsync({data:{...X,media:[{url:Y.mediaUrl,mediaType:Y.mediaType}],captionFacebook:ne.facebook||null,captionInstagram:ne.instagram||null,captionTiktok:ne.tiktok||null,captionPinterest:ne.pinterest||null,captionLinkedin:ne.linkedin||null}})}}else await A.mutateAsync({data:{...X,media:q.length?[{url:q[0].mediaUrl,mediaType:q[0].mediaType}]:[],captionFacebook:k.captionFacebook||null,captionInstagram:k.captionInstagram||null,captionTiktok:k.captionTiktok||null,captionPinterest:k.captionPinterest||null,captionLinkedin:k.captionLinkedin||null}});t({title:o==="bulk"?`${q.length} posts created`:"Post created successfully"}),e("/admin")}catch{}}return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1200px] mx-auto space-y-8",children:[i.jsxs("div",{children:[i.jsxs(ve,{variant:"ghost",className:"mb-4 text-[#9CA3AF] hover:text-[#111827] -ml-4",onClick:()=>e("/admin"),children:[i.jsx(Ic,{className:"w-4 h-4 mr-2"}),"Back to Dashboard"]}),i.jsx("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827]",children:"Create New Post"}),i.jsx("p",{className:"text-[#374151] mt-1 font-medium",children:"Choose an image post, a reel, a bulk batch, or a carousel."})]}),i.jsx("div",{className:"grid sm:grid-cols-2 xl:grid-cols-4 gap-4",children:l$.map(k=>i.jsxs("button",{type:"button",onClick:()=>j(k.value),className:ie("text-left p-4 rounded-xl border-2 transition-all bg-white",o===k.value?"border-[#00CEA6] shadow-md ring-1 ring-[#00CEA6]/20":"border-[#
49E9EBF0] hover:border-[#D1D5DB]"),children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[i.jsx(k.icon,{className:ie("w-5 h-5",o===k.value?"text-[#00CEA6]":"text-[#9CA3AF]")}),i.jsx("span",{className:"font-bold text-[#111827]",children:k.label})]}),i.jsx("p",{className:"text-xs text-[#374151] font-medium",children:k.description})]},k.value))}),i.jsx(Ci,{...v,children:i.jsxs("form",{onSubmit:v.handleSubmit(F),className:"space-y-8",children:[i.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[i.jsxs("div",{className:"space-y-6 md:col-span-1",children:[i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm",children:[i.jsx(xc,{className:"bg-[#F8F9FB] border-b border-[#E9EBF0]",children:i.jsx(yc,{className:"text-lg text-[#111827]",children:"Post Settings"})}),i.jsxs(Dn,{className:"p-6 space-y-6",children:[i.jsx(Je,{control:v.control,name:"clientId",render:({field:k})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Client"}),i.jsxs(en,{onValueChange:z=>k.onChange(Number(z)),value:k.value?.toString()||"",children:[i.jsx(tt,{children:i.jsx(Ht,{className:"bg-white border-[#E9EBF0] focus:ring-[#00CEA6]",children:i.jsx(tn,{placeholder:"Select a client"})})}),i.jsx(Yt,{children:a?.map(z=>i.jsx(mt,{value:z.id.toString(),children:z.name},z.id))})]}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"title",render:({field:k})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Post Title"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"e.g. September product launch",className:"bg-white border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...k})}),i.jsx("p",{className:"text-xs text-[#6B7280] font-medium",children:"Used to identify this post in the portal and Slack notifications."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"department",render:({field:k})=>i.jsxs(We,{children:[i.jsxs(Qe,{className:"font-bold text-[#111827]",children:["Department",S?"":" (Optional)"]}),i.jsxs(en,{onValueChange:z=>k.onChange(z),value:k.value||C||"",disabled:S&&w.length===0,children:[i.jsx(tt,{children:i.jsx(Ht,{className:"bg-white border-[#E9EBF0] focus:ring-[#00CEA6]",children:i.jsx(tn,{placeholder:"Select department"})})}),i.jsx(Yt,{children:w.map(z=>i.jsx(mt,{value:z,className:"capitalize",children:z.replace("_"," ")},z))})]}),S&&w.length===0&&i.jsx("p",{className:"text-sm font-medium text-destructive",children:"Your account has no departments assigned. Ask a manager to assign one before creating posts."}),S&&w.length>1&&i.jsx("p",{className:"text-xs text-[#6B7280] font-medium",children:"You can create posts only in your assigned departments."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"platforms",render:()=>i.jsxs(We,{children:[i.jsx("div",{className:"mb-4",children:i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Target Platforms"})}),i.jsx("div",{className:"space-y-3",children:o$.map(k=>i.jsx(Je,{control:v.control,name:"platforms",render:({field:z})=>i.jsxs(We,{className:"flex flex-row items-center space-x-3 space-y-0",children:[i.jsx(tt,{children:i.jsx(Ua,{checked:z.value?.includes(k),onCheckedChange:X=>X?z.onChange([...z.value,k]):z.onChange(z.value?.filter(q=>q!==k)),className:"border-[#D1D5DB] data-[state=checked]:bg-[#00CEA6] data-[state=checked]:border-[#00CEA6]"})}),i.jsx(Qe,{className:"font-bold text-[#374151] capitalize cursor-pointer",children:k==="linkedin"?"LinkedIn":k})]},k)},k))}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"postingMonth",render:({field:k})=>i.jsxs(We,{className:"mb-4",children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Posting Month (Optional)"}),i.jsx(tt,{children:i.jsx(ze,{type:"month",className:"bg-white border-[#E9EBF0]",...k})}),i.jsx("p",{className:"text-[11px] text-[#9CA3AF] font-medium",children:"Assign the intended month now, even if the exact posting date is not known yet."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"scheduledDate",render:({field:k})=>i.jsxs(We,{className:"flex flex-col",children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Schedule Date (Optional)"}),i.jsxs(vA,{children:[i.jsx(bA,{asChild:!0,children:i.jsx(tt,{children:i.jsxs(ve,{variant:"outline",className:ie("w-full pl-3 text-left font-bold bg-white border-[#
49E9EBF0] hover:bg-[#F8F9FB]",!k.value&&"text-[#9CA3AF]"),children:[k.value?Jt(k.value,"PPP"):i.jsx("span",{children:"Pick a date"}),i.jsx($c,{className:"ml-auto h-4 w-4 opacity-50 text-[#004AAC]"})]})})}),i.jsx(yy,{className:"w-auto p-0 border-[#E9EBF0]",align:"start",children:i.jsx(ZA,{mode:"single",selected:k.value||void 0,onSelect:z=>{k.onChange(z),z||v.setValue("scheduledTime","")},disabled:z=>z<new Date(new Date().setHours(0,0,0,0)),initialFocus:!0})})]}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"scheduledTime",render:({field:k})=>i.jsxs(We,{className:"mt-4",children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Posting Time (Eastern Time)"}),i.jsx(tt,{children:i.jsx(ze,{type:"time",step:60,disabled:!v.watch("scheduledDate"),className:"bg-white border-[#E9EBF0]",...k})}),i.jsx("p",{className:"text-[11px] text-[#9CA3AF] font-medium",children:"This Eastern Time is shown unchanged to every viewer."}),i.jsx(it,{})]})})]})]}),i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm",children:[i.jsxs(xc,{className:"bg-[#F8F9FB] border-b border-[#E9EBF0] flex flex-row items-center justify-between",children:[i.jsx(yc,{className:"text-lg text-[#111827]",children:o==="reel"?"Reel":"Media"}),i.jsx("span",{className:"text-xs font-bold bg-[#004AAC]/10 text-[#004AAC] px-2 py-1 rounded capitalize",children:o})]}),i.jsxs(Dn,{className:"p-6",children:[d.length>0&&i.jsx("div",{className:"grid grid-cols-2 gap-3 mb-4",children:d.map((k,z)=>i.jsxs("div",{className:ie("relative rounded-md overflow-hidden border border-[#E9EBF0] bg-black/5 group",o==="reel"?"mx-auto w-40 aspect-[9/16]":"aspect-square"),children:[(k.status==="uploading"||k.status==="preparing")&&i.jsxs("div",{className:"absolute inset-0 bg-white/80 flex flex-col gap-2 items-center justify-center z-10 p-2 text-center",children:[i.jsx(ns,{className:"w-6 h-6 text-[#00CEA6] animate-spin"}),k.status==="preparing"&&i.jsx("span",{className:"text-xs font-medium text-[#374151]",children:"Preparing video for playback..."})]}),k.status==="error"&&i.jsxs("div",{className:"absolute inset-0 bg-white/95 flex flex-col gap-2 items-center justify-center z-10 p-2 text-center",children:[i.jsx("span",{className:"text-xs font-bold text-destructive break-words",children:k.error||"Upload failed"}),i.jsx("button",{type:"button",className:"text-xs font-bold underline text-[#111827]",onClick:()=>{R(k)},children:"Retry upload"})]}),k.mediaType==="image"&&k.mediaUrl&&i.jsx("img",{src:`/api/storage${k.mediaUrl}`,className:"w-full h-full object-cover",alt:""}),k.mediaType==="video"&&k.mediaUrl&&i.jsx(Pc,{objectPath:k.mediaUrl,controls:!0,muted:!0,preload:"metadata",className:"w-full h-full object-cover bg-black"}),o==="carousel"&&i.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 py-1 text-center",children:i.jsxs("span",{className:"text-[10px] font-bold text-white uppercase tracking-wider",children:["Slide ",z+1]})}),i.jsx("button",{type:"button",onClick:()=>T(k.id),"aria-label":`Remove ${k.mediaType==="video"?"reel":"image"} ${z+1}`,className:"absolute z-20 top-1 right-1 bg-black/70 text-white p-1 rounded opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:focus-visible:opacity-100 transition-opacity focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",children:"Ã"})]},k.id))}),(o==="bulk"||o==="carousel"||d.length===0)&&i.jsxs("div",{className:"border-2 border-dashed border-[#D1D5DB] rounded-lg p-6 flex flex-col items-center justify-center text-center bg-white transition-colors hover:bg-[#F8F9FB] hover:border-[#00CEA6] cursor-pointer relative",children:[i.jsx("input",{type:"file",accept:o==="reel"?MI:o==="single"?TI:Gg,multiple:o==="bulk"||o==="carousel",onChange:M,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx(hg,{className:"w-8 h-8 text-[#9CA3AF] mb-3"}),i.jsx("p",{className:"font-bold text-[#111827]",children:o==="reel"?"Upload reel":"Upload media"}),i.jsxs("p",{className:"text-xs text-[#9CA3AF] mt-1 font-medium",children:[o==="single"&&"One image for this post",o==="reel"&&"MP4, MOV, WebM, or M4V â 150 MB max",o==="bulk"&&"Each image or reel becomes its own post",o==="carousel"&&"All images or reels join one carousel post"]})]})]})]})]})]}),i.jsx("div",{className:"md:col-span-2 space-y-6",children:o==="bulk"?i.jsxs(wt,{className:"border-[#
49E9EBF0] shadow-sm",children:[i.jsxs(xc,{className:"bg-[#F8F9FB] border-b border-[#E9EBF0]",children:[i.jsx(yc,{className:"text-lg text-[#111827]",children:"Per-Media Captions"}),i.jsx("p",{className:"text-sm text-[#374151] mt-1 font-medium",children:"Each file becomes its own post. Leave a caption blank to save that post as a Draft."})]}),i.jsx(Dn,{className:"p-6 space-y-6",children:d.length===0?i.jsx("div",{className:"py-12 text-center text-[#9CA3AF] font-bold border-2 border-dashed border-[#E9EBF0] rounded-lg bg-[#F8F9FB]",children:"Upload files to write a caption for each one."}):b.length===0?i.jsx("div",{className:"py-12 text-center text-[#9CA3AF] font-bold border-2 border-dashed border-[#E9EBF0] rounded-lg bg-[#F8F9FB]",children:"Select target platforms first to write captions."}):d.map((k,z)=>i.jsxs("div",{className:"border border-[#E9EBF0] rounded-lg overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[#F8F9FB] border-b border-[#E9EBF0]",children:[i.jsx("div",{className:"w-10 h-10 rounded overflow-hidden bg-black/5 shrink-0 flex items-center justify-center",children:k.mediaType==="image"&&k.mediaUrl?i.jsx("img",{src:`/api/storage${k.mediaUrl}`,className:"w-full h-full object-cover",alt:""}):k.mediaType==="video"&&k.mediaUrl?i.jsx(Pc,{objectPath:k.mediaUrl,muted:!0,preload:"metadata",className:"w-full h-full object-cover"}):i.jsx(Fa,{className:"w-4 h-4 text-[#9CA3AF]"})}),i.jsxs("span",{className:"font-bold text-sm text-[#111827]",children:["Media ",z+1]}),(k.status==="uploading"||k.status==="preparing")&&i.jsx(ns,{className:"w-4 h-4 text-[#00CEA6] animate-spin ml-auto"})]}),i.jsx("div",{className:"p-3 space-y-3",children:b.map(X=>i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-bold capitalize text-[#374151] mb-1 block",children:X==="linkedin"?"LinkedIn":X}),i.jsx(rn,{value:h[k.id]?.[X]||"",onChange:q=>D(k.id,X,q.target.value),placeholder:`Caption for ${X}...`,className:"min-h-[70px] bg-white border-[#E9EBF0] text-sm"})]},X))})]},k.id))})]}):i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm h-full",children:[i.jsxs(xc,{className:"bg-[#F8F9FB] border-b border-[#E9EBF0]",children:[i.jsx(yc,{className:"text-lg text-[#111827]",children:o==="carousel"?"Shared Caption":"Captions"}),i.jsx("p",{className:"text-sm text-[#374151] mt-1 font-medium",children:o==="carousel"?"One caption per platform is shared across every item in this carousel.":"Leave blank to save as a Draft."})]}),i.jsx(Dn,{className:"p-6 space-y-6",children:b.length===0?i.jsx("div",{className:"py-12 text-center text-[#9CA3AF] font-bold border-2 border-dashed border-[#E9EBF0] rounded-lg bg-[#F8F9FB]",children:"Select target platforms first to write captions."}):b.map(k=>i.jsx(Je,{control:v.control,name:`caption${k.charAt(0).toUpperCase()+k.slice(1)}`,render:({field:z})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold capitalize text-base flex items-center gap-2 text-[#111827]",children:k==="linkedin"?"LinkedIn":k}),i.jsx(tt,{children:i.jsx(rn,{placeholder:`Write ${k} caption...`,className:"min-h-[120px] bg-white border-[#E9EBF0] focus-visible:ring-[#00CEA6] text-[#374151]",...z})}),i.jsx(it,{})]})},k))})]})})]}),i.jsxs("div",{className:"flex justify-end gap-4 border-t border-[#E9EBF0] pt-6",children:[i.jsx(ve,{type:"button",variant:"outline",onClick:()=>e("/admin"),className:"px-6 h-12 font-bold text-[#374151] border-[#E9EBF0]",children:"Cancel"}),i.jsx(ve,{type:"submit",disabled:A.isPending||d.some(k=>k.status==="uploading"||k.status==="preparing"),className:"px-8 h-12 font-bold btn-primary",children:A.isPending?"Saving...":o==="bulk"?`Create ${d.length||0} Posts`:"Create Post"})]})]})})]})}function d$(){const{id:e}=qx(),[,t]=ws(),n=e?parseInt(e,10):0,{data:a,isLoading:o,error:c}=E5(n,{query:{enabled:!!n,queryKey:zx(n)}});return c?i.jsxs("div",{className:"p-10 text-center space-y-4",children:[i.jsx("p",{className:"text-destructive font-bold",children:"Failed to load post. It may have been deleted."}),i.jsxs(ve,{variant:"outline",onClick:()=>t("/admin"),className:"font-bold",children:[i.jsx(Ic,{className:"w-4 h-4 mr-1"})," Back to Dashboard"]})]}):o||!a?i.jsxs("div",{className:"p-10 text-center text-[#9CA3AF] font-bold flex items-center justify-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full border-4 border-[#00CEA6] border-t-transparent animate-spin"}),"Loading..."]}):i.jsx("div",{className:"min-h-[50vh]",children:i.jsx(_y,{post:a,open:!0,onOpenChange:d=>{d||t("/admin")},onDeleted:()=>t("/admin")})})}var ng="rovingFocusGroup.onEntryFocus",f$={bubbles:!1,cancelable:!0},hu="RovingFocusGroup",[Qg,p2,m$]=Sf(hu),[h$,um]=ss(hu,[m$]),[p$,g$]=h$(hu),g2=x.forwardRef((e,t)=>
vendor: 5,621 bytes, line 49
49i.jsx(Qg.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Qg.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(x$,{...e,ref:t})})}));g2.displayName=hu;var x$=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:p,preventScrollOnEntryFocus:y=!1,...v}=e,b=x.useRef(null),S=nt(t,b),E=em(c),[w,C]=ua({prop:d,defaultProp:f??null,onChange:h,caller:hu}),[A,j]=x.useState(!1),M=Wn(p),R=p2(n),T=x.useRef(!1),[D,F]=x.useState(0);return x.useEffect(()=>{const k=b.current;if(k)return k.addEventListener(ng,M),()=>k.removeEventListener(ng,M)},[M]),i.jsx(p$,{scope:n,orientation:a,dir:E,loop:o,currentTabStopId:w,onItemFocus:x.useCallback(k=>C(k),[C]),onItemShiftTab:x.useCallback(()=>j(!0),[]),onFocusableItemAdd:x.useCallback(()=>F(k=>k+1),[]),onFocusableItemRemove:x.useCallback(()=>F(k=>k-1),[]),children:i.jsx(Ie.div,{tabIndex:A||D===0?-1:0,"data-orientation":a,...v,ref:S,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{T.current=!0}),onFocus:be(e.onFocus,k=>{const z=!T.current;if(k.target===k.currentTarget&&z&&!A){const X=new CustomEvent(ng,f$);if(k.currentTarget.dispatchEvent(X),!X.defaultPrevented){const q=R().filter(L=>L.focusable),Y=q.find(L=>L.active),ne=q.find(L=>L.id===w),me=[Y,ne,...q].filter(Boolean).map(L=>L.ref.current);v2(me,y)}}T.current=!1}),onBlur:be(e.onBlur,()=>j(!1))})})}),x2="RovingFocusGroupItem",y2=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:c,children:d,...f}=e,h=Vs(),p=c||h,y=g$(x2,n),v=y.currentTabStopId===p,b=p2(n),{onFocusableItemAdd:S,onFocusableItemRemove:E,currentTabStopId:w}=y;return x.useEffect(()=>{if(a)return S(),()=>E()},[a,S,E]),i.jsx(Qg.ItemSlot,{scope:n,id:p,focusable:a,active:o,children:i.jsx(Ie.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:t,onMouseDown:be(e.onMouseDown,C=>{a?y.onItemFocus(p):C.preventDefault()}),onFocus:be(e.onFocus,()=>y.onItemFocus(p)),onKeyDown:be(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){y.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const A=b$(C,y.orientation,y.dir);if(A!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let M=b().filter(R=>R.focusable).map(R=>R.ref.current);if(A==="last")M.reverse();else if(A==="prev"||A==="next"){A==="prev"&&M.reverse();const R=M.indexOf(C.currentTarget);M=y.loop?w$(M,R+1):M.slice(R+1)}setTimeout(()=>v2(M))}}),children:typeof d=="function"?d({isCurrentTabStop:v,hasTabStop:w!=null}):d})})});y2.displayName=x2;var y$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function v$(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function b$(e,t,n){const a=v$(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return y$[a]}function v2(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function w$(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var b2=g2,w2=y2,Zg=["Enter"," "],j$=["ArrowDown","PageUp","Home"],j2=["ArrowUp","PageDown","End"],N$=[...j$,...j2],C$={ltr:[...Zg,"ArrowRight"],rtl:[...Zg,"ArrowLeft"]},S$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pu="Menu",[Lc,E$,A$]=Sf(pu),[zi,N2]=ss(pu,[A$,Pr,um]),dm=Pr(),C2=um(),[_$,Ii]=zi(pu),[k$,gu]=zi(pu),S2=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:o,onOpenChange:c,modal:d=!0}=e,f=dm(t),[h,p]=x.useState(null),y=x.useRef(!1),v=Wn(c),b=em(o);return x.useEffect(()=>{const S=()=>{y.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>y.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),x.useEffect(()=>{if(!n)return;const S=()=>v(!1);return window.addEventListener("blur",S),()=>window.removeEventListener("blur",S)},[n,v]),i.jsx(Dx,{...f,children:i.jsx(_$,{scope:t,open:n,onOpenChange:v,content:h,onContentChange:p,children:i.jsx(k$,{scope:t,onClose:x.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:b,modal:d,children:a})})})};S2.displayName=pu;var T$="MenuAnchor",Dy=x.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=dm(n);return i.jsx(Gc,{...o,...a,ref:t})});Dy.displayName=T$;var Ry="MenuPortal",[M$,E2]=zi(Ry,{forceMount:void 0}),A2=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:o}=e,c=Ii(Ry,t);return i.jsx(M$,{scope:t,forceMount:n,children:i.jsx(Hn,{present:n||c.open,children:i.jsx(_i,{asChild:!0,container:o,children:a})})})};A2.displayName=Ry;var Os="MenuContent",[O$,Fy]=zi(Os),_2=x.forwardRef((e,t)=>{const n=E2(Os,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,c=Ii(Os,e.__scopeMenu),d=gu(Os,e.__scopeMenu);return i.jsx(Lc.Provider,{scope:e.__scopeMenu,children:i.jsx(Hn,{present:a||c.open,children:i.jsx(Lc.Slot,{scope:e.__scopeMenu,children:d.modal?i.jsx(D$,{...o,ref:t}):i.jsx(R$,{...o,ref:t})})})})}),D$=x.forwardRef((e,t)=>{const n=Ii(Os,e.__scopeMenu),a=x.useRef(null),o=nt(t,a);return x.useEffect(()=>{const c=a.current;if(c)return Vf(c)},[]),i.jsx(Py,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:be(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),R$=x.forwardRef((e,t)=>
vendor: 15,427 bytes, line 49
49{const n=Ii(Os,e.__scopeMenu);return i.jsx(Py,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),F$=Er("MenuContent.ScrollLock"),Py=x.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:p,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:b,onDismiss:S,disableOutsideScroll:E,...w}=e,C=Ii(Os,n),A=gu(Os,n),j=dm(n),M=C2(n),R=E$(n),[T,D]=x.useState(null),F=x.useRef(null),k=nt(t,F,C.onContentChange),z=x.useRef(0),X=x.useRef(""),q=x.useRef(0),Y=x.useRef(null),ne=x.useRef("right"),Z=x.useRef(0),me=E?Zc:x.Fragment,L=E?{as:F$,allowPinchZoom:!0}:void 0,J=te=>{const O=X.current+te,W=R().filter(he=>!he.disabled),ue=document.activeElement,ce=W.find(he=>he.ref.current===ue)?.textValue,ye=W.map(he=>he.textValue),Ee=K$(ye,O,ce),xe=W.find(he=>he.textValue===Ee)?.ref.current;(function he(Te){X.current=Te,window.clearTimeout(z.current),Te!==""&&(z.current=window.setTimeout(()=>he(""),1e3))})(O),xe&&setTimeout(()=>xe.focus())};x.useEffect(()=>()=>window.clearTimeout(z.current),[]),If();const ee=x.useCallback(te=>ne.current===Y.current?.side&&W$(te,Y.current?.area),[]);return i.jsx(O$,{scope:n,searchRef:X,onItemEnter:x.useCallback(te=>{ee(te)&&te.preventDefault()},[ee]),onItemLeave:x.useCallback(te=>{ee(te)||(F.current?.focus(),D(null))},[ee]),onTriggerLeave:x.useCallback(te=>{ee(te)&&te.preventDefault()},[ee]),pointerGraceTimerRef:q,onPointerGraceIntentChange:x.useCallback(te=>{Y.current=te},[]),children:i.jsx(me,{...L,children:i.jsx(Qc,{asChild:!0,trapped:o,onMountAutoFocus:be(c,te=>{te.preventDefault(),F.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:i.jsx(Ai,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:b,onDismiss:S,children:i.jsx(b2,{asChild:!0,...M,dir:A.dir,orientation:"vertical",loop:a,currentTabStopId:T,onCurrentTabStopIdChange:D,onEntryFocus:be(h,te=>{A.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Pf,{role:"menu","aria-orientation":"vertical","data-state":V2(C.open),"data-radix-menu-content":"",dir:A.dir,...j,...w,ref:k,style:{outline:"none",...w.style},onKeyDown:be(w.onKeyDown,te=>{const W=te.target.closest("[data-radix-menu-content]")===te.currentTarget,ue=te.ctrlKey||te.altKey||te.metaKey,ce=te.key.length===1;W&&(te.key==="Tab"&&te.preventDefault(),!ue&&ce&&J(te.key));const ye=F.current;if(te.target!==ye||!N$.includes(te.key))return;te.preventDefault();const xe=R().filter(he=>!he.disabled).map(he=>he.ref.current);j2.includes(te.key)&&xe.reverse(),H$(xe)}),onBlur:be(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(z.current),X.current="")}),onPointerMove:be(e.onPointerMove,Uc(te=>{const O=te.target,W=Z.current!==te.clientX;if(te.currentTarget.contains(O)&&W){const ue=te.clientX>Z.current?"right":"left";ne.current=ue,Z.current=te.clientX}}))})})})})})})});_2.displayName=Os;var P$="MenuGroup",By=x.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return i.jsx(Ie.div,{role:"group",...a,ref:t})});By.displayName=P$;var B$="MenuLabel",k2=x.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return i.jsx(Ie.div,{...a,ref:t})});k2.displayName=B$;var bf="MenuItem",Vj="menu.itemSelect",fm=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...o}=e,c=x.useRef(null),d=gu(bf,e.__scopeMenu),f=Fy(bf,e.__scopeMenu),h=nt(t,c),p=x.useRef(!1),y=()=>{const v=c.current;if(!n&&v){const b=new CustomEvent(Vj,{bubbles:!0,cancelable:!0});v.addEventListener(Vj,S=>a?.(S),{once:!0}),rx(v,b),b.defaultPrevented?p.current=!1:d.onClose()}};return i.jsx(T2,{...o,ref:h,disabled:n,onClick:be(e.onClick,y),onPointerDown:v=>{e.onPointerDown?.(v),p.current=!0},onPointerUp:be(e.onPointerUp,v=>{p.current||v.currentTarget?.click()}),onKeyDown:be(e.onKeyDown,v=>{const b=f.searchRef.current!=="";n||b&&v.key===" "||Zg.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})});fm.displayName=bf;var T2=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:o,...c}=e,d=Fy(bf,n),f=C2(n),h=x.useRef(null),p=nt(t,h),[y,v]=x.useState(!1),[b,S]=x.useState("");return x.useEffect(()=>{const E=h.current;E&&S((E.textContent??"").trim())},[c.children]),i.jsx(Lc.ItemSlot,{scope:n,disabled:a,textValue:o??b,children:i.jsx(w2,{asChild:!0,...f,focusable:!a,children:i.jsx(Ie.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:p,onPointerMove:be(e.onPointerMove,Uc(E=>{a?d.onItemLeave(E):(d.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:be(e.onPointerLeave,Uc(E=>d.onItemLeave(E))),onFocus:be(e.onFocus,()=>v(!0)),onBlur:be(e.onBlur,()=>v(!1))})})})}),q$="MenuCheckboxItem",M2=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...o}=e;return i.jsx(P2,{scope:e.__scopeMenu,checked:n,children:i.jsx(fm,{role:"menuitemcheckbox","aria-checked":wf(n)?"mixed":n,...o,ref:t,"data-state":Ly(n),onSelect:be(o.onSelect,()=>a?.(wf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});M2.displayName=q$;var O2="MenuRadioGroup",[L$,U$]=zi(O2,{value:void 0,onValueChange:()=>{}}),D2=x.forwardRef((e,t)=>{const{value:n,onValueChange:a,...o}=e,c=Wn(a);return i.jsx(L$,{scope:e.__scopeMenu,value:n,onValueChange:c,children:i.jsx(By,{...o,ref:t})})});D2.displayName=O2;var R2="MenuRadioItem",F2=x.forwardRef((e,t)=>{const{value:n,...a}=e,o=U$(R2,e.__scopeMenu),c=n===o.value;return i.jsx(P2,{scope:e.__scopeMenu,checked:c,children:i.jsx(fm,{role:"menuitemradio","aria-checked":c,...a,ref:t,"data-state":Ly(c),onSelect:be(a.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});F2.displayName=R2;var qy="MenuItemIndicator",[P2,z$]=zi(qy,{checked:!1}),B2=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...o}=e,c=z$(qy,n);return i.jsx(Hn,{present:a||wf(c.checked)||c.checked===!0,children:i.jsx(Ie.span,{...o,ref:t,"data-state":Ly(c.checked)})})});B2.displayName=qy;var I$="MenuSeparator",q2=x.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return i.jsx(Ie.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});q2.displayName=I$;var $$="MenuArrow",L2=x.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,o=dm(n);return i.jsx(Bf,{...o,...a,ref:t})});L2.displayName=$$;var V$="MenuSub",[RH,U2]=zi(V$),Nc="MenuSubTrigger",z2=x.forwardRef((e,t)=>{const n=Ii(Nc,e.__scopeMenu),a=gu(Nc,e.__scopeMenu),o=U2(Nc,e.__scopeMenu),c=Fy(Nc,e.__scopeMenu),d=x.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=c,p={__scopeMenu:e.__scopeMenu},y=x.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);x.useEffect(()=>y,[y]),x.useEffect(()=>{const b=f.current;return()=>{window.clearTimeout(b),h(null)}},[f,h]);const v=nt(t,o.onTriggerChange);return i.jsx(Dy,{asChild:!0,...p,children:i.jsx(T2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?o.contentId:void 0,"data-state":V2(n.open),...e,ref:v,onClick:b=>{e.onClick?.(b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:be(e.onPointerMove,Uc(b=>{c.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!n.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),y()},100))})),onPointerLeave:be(e.onPointerLeave,Uc(b=>{y();const S=n.content?.getBoundingClientRect();if(S){const E=n.content?.dataset.side,w=E==="right",C=w?-5:5,A=S[w?"left":"right"],j=S[w?"right":"left"];c.onPointerGraceIntentChange({area:[{x:b.clientX+C,y:b.clientY},{x:A,y:S.top},{x:j,y:S.top},{x:j,y:S.bottom},{x:A,y:S.bottom}],side:E}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(b),b.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:be(e.onKeyDown,b=>{const S=c.searchRef.current!=="";e.disabled||S&&b.key===" "||C$[a.dir].includes(b.key)&&(n.onOpenChange(!0),n.content?.focus(),b.preventDefault())})})})});z2.displayName=Nc;var I2="MenuSubContent",$2=x.forwardRef((e,t)=>{const n=E2(Os,e.__scopeMenu),{forceMount:a=n.forceMount,align:o="start",...c}=e,d=Ii(Os,e.__scopeMenu),f=gu(Os,e.__scopeMenu),h=U2(I2,e.__scopeMenu),p=x.useRef(null),y=nt(t,p);return i.jsx(Lc.Provider,{scope:e.__scopeMenu,children:i.jsx(Hn,{present:a||d.open,children:i.jsx(Lc.Slot,{scope:e.__scopeMenu,children:i.jsx(Py,{id:h.contentId,"aria-labelledby":h.triggerId,...c,ref:y,align:o,side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{f.isUsingKeyboardRef.current&&p.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:be(e.onFocusOutside,v=>{v.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:be(e.onEscapeKeyDown,v=>{f.onClose(),v.preventDefault()}),onKeyDown:be(e.onKeyDown,v=>{const b=v.currentTarget.contains(v.target),S=S$[f.dir].includes(v.key);b&&S&&(d.onOpenChange(!1),h.trigger?.focus(),v.preventDefault())})})})})})});$2.displayName=I2;function V2(e){return e?"open":"closed"}function wf(e){return e==="indeterminate"}function Ly(e){return wf(e)?"indeterminate":e?"checked":"unchecked"}function H$(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Y$(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function K$(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let d=Y$(e,Math.max(c,0));o.length===1&&(d=d.filter(p=>p!==n));const h=d.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}function G$(e,t){const{x:n,y:a}=e;let o=!1;for(let c=0,d=t.length-1;c<t.length;d=c++){const f=t[c],h=t[d],p=f.x,y=f.y,v=h.x,b=h.y;y>a!=b>a&&n<(v-p)*(a-y)/(b-y)+p&&(o=!o)}return o}function W$(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return G$(n,t)}function Uc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Q$=S2,Z$=Dy,X$=A2,J$=_2,eV=By,tV=k2,nV=fm,sV=M2,aV=D2,rV=F2,iV=B2,oV=q2,lV=L2,cV=z2,uV=$2,mm="DropdownMenu",[dV]=ss(mm,[N2]),Qn=N2(),[fV,H2]=dV(mm),Y2=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:o,defaultOpen:c,onOpenChange:d,modal:f=!0}=e,h=Qn(t),p=x.useRef(null),[y,v]=ua({prop:o,defaultProp:c??!1,onChange:d,caller:mm});return i.jsx(fV,{scope:t,triggerId:Vs(),triggerRef:p,contentId:Vs(),open:y,onOpenChange:v,onOpenToggle:x.useCallback(()=>v(b=>!b),[v]),modal:f,children:i.jsx(Q$,{...h,open:y,onOpenChange:v,dir:a,modal:f,children:n})})};Y2.displayName=mm;var K2="DropdownMenuTrigger",G2=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...o}=e,c=H2(K2,n),d=Qn(n),f=nt(t,c.triggerRef);return i.jsx(Z$,{asChild:!0,...d,children:i.jsx(Ie.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:f,onPointerDown:be(e.onPointerDown,h=>{!a&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:be(e.onKeyDown,h=>{a||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});G2.displayName=K2;var mV="DropdownMenuPortal",W2=e=>{const{__scopeDropdownMenu:t,...n}=e,a=Qn(t);return i.jsx(X$,{...a,...n})};W2.displayName=mV;var Q2="DropdownMenuContent",Z2=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=H2(Q2,n),c=Qn(n),d=x.useRef(!1);return i.jsx(J$,{id:o.contentId,"aria-labelledby":o.triggerId,...c,...a,ref:t,onCloseAutoFocus:be(e.onCloseAutoFocus,f=>{d.current||o.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:be(e.onInteractOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,y=h.button===2||p;(!o.modal||y)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Z2.displayName=Q2;var hV="DropdownMenuGroup",pV=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(eV,{...o,...a,ref:t})});pV.displayName=hV;var gV="DropdownMenuLabel",X2=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(tV,{...o,...a,ref:t})});X2.displayName=gV;var xV="DropdownMenuItem",J2=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(nV,{...o,...a,ref:t})});J2.displayName=xV;var yV="DropdownMenuCheckboxItem",e_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(sV,{...o,...a,ref:t})});e_.displayName=yV;var vV="DropdownMenuRadioGroup",bV=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(aV,{...o,...a,ref:t})});bV.displayName=vV;var wV="DropdownMenuRadioItem",t_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(rV,{...o,...a,ref:t})});t_.displayName=wV;var jV="DropdownMenuItemIndicator",n_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(iV,{...o,...a,ref:t})});n_.displayName=jV;var NV="DropdownMenuSeparator",s_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(oV,{...o,...a,ref:t})});s_.displayName=NV;var CV="DropdownMenuArrow",SV=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(lV,{...o,...a,ref:t})});SV.displayName=CV;var EV="DropdownMenuSubTrigger",a_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(cV,{...o,...a,ref:t})});a_.displayName=EV;var AV="DropdownMenuSubContent",r_=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,o=Qn(n);return i.jsx(uV,{...o,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});r_.displayName=AV;var _V=Y2,kV=G2,TV=W2,i_=Z2,o_=X2,l_=J2,c_=e_,u_=t_,d_=n_,f_=s_,m_=a_,h_=r_;const MV=_V,OV=kV,DV=x.forwardRef(({className:e,inset:t,children:n,...a},o)=>i.jsxs(m_,{ref:o,className:ie("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[n,i.jsx(Ti,{className:"ml-auto"})]}));DV.displayName=m_.displayName;const RV=x.forwardRef(({className:e,...t},n)=>i.jsx(h_,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
49de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));RV.displayName=h_.displayName;const p_=x.forwardRef(({className:e,sideOffset:t=4,...n},a)=>i.jsx(TV,{children:i.jsx(i_,{ref:a,sideOffset:t,className:ie("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));p_.displayName=i_.displayName;const Xg=x.forwardRef(({className:e,inset:t,...n},a)=>i.jsx(l_,{ref:a,className:ie("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Xg.displayName=l_.displayName;const FV=x.forwardRef(({className:e,children:t,checked:n,...a},o)=>i.jsxs(c_,{ref:o,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...a,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(d_,{children:i.jsx(Vc,{className:"h-4 w-4"})})}),t]}));FV.displayName=c_.displayName;const PV=x.forwardRef(({className:e,children:t,...n},a)=>i.jsxs(u_,{ref:a,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(d_,{children:i.jsx(XN,{className:"h-2 w-2 fill-current"})})}),t]}));PV.displayName=u_.displayName;const BV=x.forwardRef(({className:e,inset:t,...n},a)=>i.jsx(o_,{ref:a,className:ie("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));BV.displayName=o_.displayName;const qV=x.forwardRef(({className:e,...t},n)=>i.jsx(f_,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",e),...t}));qV.displayName=f_.displayName;const g_=[{value:"social_media",label:"Social Media",icon:vx},{value:"design",label:"Design",icon:Pa},{value:"content",label:"Content",icon:yx},{value:"web_dev",label:"Web Dev",icon:px},{value:"seo",label:"SEO",icon:Tc},{value:"email_sms",label:"Email / SMS",icon:xi}],Hj=[{value:"super_admin",label:"Super Admin"},{value:"manager",label:"Manager"},{value:"staff",label:"Staff"}];function LV({role:e}){return e==="super_admin"?i.jsxs(ca,{variant:"default",className:"bg-[#00CEA6]/10 text-[#00CEA6] hover:bg-[#00CEA6]/20 border-transparent flex w-fit items-center gap-1 font-bold uppercase tracking-wider text-[10px] shadow-none",children:[i.jsx(bx,{className:"w-3 h-3"})," Super Admin"]}):e==="manager"?i.jsxs(ca,{variant:"default",className:"bg-[#004AAC]/10 text-[#004AAC] hover:bg-[#004AAC]/20 border-transparent flex w-fit items-center gap-1 font-bold uppercase tracking-wider text-[10px] shadow-none",children:[i.jsx(pF,{className:"w-3 h-3"})," Manager"]}):i.jsx(ca,{variant:"secondary",className:"bg-[#E9EBF0] text-[#374151] flex w-fit items-center gap-1 font-bold uppercase tracking-wider text-[10px] border-transparent hover:opacity-100",children:"Staff"})}function UV({departments:e,role:t}){return t==="super_admin"||t==="manager"?i.jsx("span",{className:"text-xs text-[#9CA3AF] font-medium italic",children:"All departments"}):e.length===0?i.jsx("span",{className:"text-xs text-[#9CA3AF] font-medium italic",children:"No departments"}):i.jsx("div",{className:"flex flex-wrap gap-1",children:e.map(n=>{const a=g_.find(o=>o.value===n);return i.jsx(ca,{variant:"secondary",className:"bg-[#F8F9FB] text-[#374151] border border-[#
49E9EBF0] font-bold text-[10px] uppercase tracking-wider",children:a?.label??n},n)})})}function Yj({value:e,onChange:t}){function n(a){t(e.includes(a)?e.filter(o=>o!==a):[...e,a])}return i.jsx("div",{className:"space-y-2",children:g_.map(a=>i.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer select-none group",children:[i.jsx(Ua,{checked:e.includes(a.value),onCheckedChange:()=>n(a.value),className:"border-[#E9EBF0]"}),i.jsx(a.icon,{className:"w-3.5 h-3.5 text-[#9CA3AF] group-hover:text-[#374151]"}),i.jsx("span",{className:"text-sm font-medium text-[#374151]",children:a.label})]},a.value))})}const zV=Mi({name:ct().min(1,"Name is required"),email:ct().email("Invalid email"),password:ct().min(8,"Password must be at least 8 characters"),role:pf(["super_admin","manager","staff"]).default("staff"),departments:tu(ct()).default([])}),IV=Mi({name:ct().min(1,"Name is required"),email:ct().email("Invalid email"),password:XS([ry(""),ct().min(8,"Password must be at least 8 characters")]).optional(),role:pf(["super_admin","manager","staff"]),departments:tu(ct()).default([])});function $V(){const{data:e,isLoading:t}=NP(),[n,a]=x.useState(!1),[o,c]=x.useState(null),{toast:d}=pn(),f=Kt(),h=wi({resolver:ji(zV),defaultValues:{name:"",email:"",password:"",role:"staff",departments:[]}}),p=h.watch("role"),y=wi({resolver:ji(IV),defaultValues:{name:"",email:"",password:"",role:"staff",departments:[]}}),v=y.watch("role");x.useEffect(()=>{o&&y.reset({name:o.name,email:o.email,password:"",role:o.role,departments:o.departments??[]})},[o]);const b=AP({mutation:{onSuccess:()=>{d({title:"Team member added"}),a(!1),h.reset(),f.invalidateQueries({queryKey:Yd()})},onError:A=>{d({title:"Failed to add member",description:A.message,variant:"destructive"})}}}),S=MP({mutation:{onSuccess:()=>{d({title:"Team member updated"}),c(null),f.invalidateQueries({queryKey:Yd()})},onError:A=>{d({title:"Failed to update member",description:A.message,variant:"destructive"})}}}),E=FP({mutation:{onSuccess:()=>{d({title:"Team member removed"}),f.invalidateQueries({queryKey:Yd()})}}}),w=A=>{b.mutate({data:{name:A.name,email:A.email,password:A.password,role:A.role,departments:A.role==="staff"?A.departments:[]}})},C=A=>{o&&S.mutate({id:o.id,data:{name:A.name,email:A.email,role:A.role,departments:A.role==="staff"?A.departments:[],...A.password?{password:A.password}:{}}})};return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1200px] mx-auto space-y-8",children:[i.jsxs("div",{className:"flex justify-between items-end gap-4",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827] flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 brand-gradient rounded-lg flex items-center justify-center shadow-sm",children:i.jsx(yi,{className:"w-6 h-6 text-white"})}),"Team Management"]}),i.jsx("p",{className:"text-[#374151] mt-2 font-medium",children:"Manage agency staff access and permissions."})]}),i.jsxs(Vn,{open:n,onOpenChange:a,children:[i.jsx(Xc,{asChild:!0,children:i.jsxs(ve,{className:"font-bold px-6 shadow-sm h-11 btn-primary",children:[i.jsx(jx,{className:"w-5 h-5 mr-2"})," Add Member"]})}),i.jsxs(Rn,{className:"sm:max-w-[480px] border-[#E9EBF0]",children:[i.jsxs(Fn,{children:[i.jsx(Pn,{className:"text-[#111827] font-display",children:"Add Team Member"}),i.jsx(bi,{className:"text-[#374151]",children:"Create a new staff account with role and department access."})]}),i.jsx(Ci,{...h,children:i.jsxs("form",{onSubmit:h.handleSubmit(w),className:"space-y-5 pt-4",children:[i.jsx(Je,{control:h.control,name:"name",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Full Name"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"Jane Doe",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...A})}),i.jsx(it,{})]})}),i.jsx(Je,{control:h.control,name:"email",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Email Address"}),i.jsx(tt,{children:i.jsx(ze,{type:"email",placeholder:"[email protected]",className:"border-[#
49E9EBF0] focus-visible:ring-[#00CEA6]",...A})}),i.jsx(it,{})]})}),i.jsx(Je,{control:h.control,name:"password",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Temporary Password"}),i.jsx(tt,{children:i.jsx(ze,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...A})}),i.jsx(it,{})]})}),i.jsx(Je,{control:h.control,name:"role",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Role"}),i.jsxs(en,{value:A.value,onValueChange:A.onChange,children:[i.jsx(tt,{children:i.jsx(Ht,{className:"border-[#E9EBF0] focus:ring-[#00CEA6]",children:i.jsx(tn,{})})}),i.jsx(Yt,{children:Hj.map(j=>i.jsx(mt,{value:j.value,children:j.label},j.value))})]}),i.jsx(it,{})]})}),p==="staff"&&i.jsx(Je,{control:h.control,name:"departments",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Department Access"}),i.jsx(Ug,{className:"text-xs text-[#9CA3AF]",children:"Select which departments this staff member can access."}),i.jsx(tt,{children:i.jsx(Yj,{value:A.value,onChange:A.onChange})})]})}),i.jsx("div",{className:"flex justify-end pt-4",children:i.jsx(ve,{type:"submit",disabled:b.isPending,className:"w-full font-bold btn-primary h-11",children:b.isPending?"Creating...":"Create Account"})})]})})]})]})]}),i.jsx(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:i.jsxs(ru,{children:[i.jsx(iu,{className:"bg-[#F8F9FB]",children:i.jsxs(Gn,{className:"border-[#E9EBF0]",children:[i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs w-[260px]",children:"Name"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs",children:"Role"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs",children:"Departments"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs",children:"Joined"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs text-right",children:"Actions"})]})}),i.jsx(ou,{children:t?i.jsx(Gn,{children:i.jsx(Ot,{colSpan:5,className:"h-32 text-center text-[#9CA3AF]",children:"Loading team..."})}):e?.map(A=>i.jsxs(Gn,{className:"border-[#E9EBF0] hover:bg-[#F8F9FB] transition-colors",children:[i.jsx(Ot,{children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-[#004AAC]/10 text-[#004AAC] flex items-center justify-center font-bold font-display uppercase border border-[#004AAC]/20",children:A.name.substring(0,2)}),i.jsxs("div",{children:[i.jsx("div",{className:"font-bold text-[#111827]",children:A.name}),i.jsxs("div",{className:"text-xs text-[#9CA3AF] font-medium flex items-center gap-1 mt-0.5",children:[i.jsx(xi,{className:"w-3 h-3"})," ",A.email]})]})]})}),i.jsx(Ot,{children:i.jsx(LV,{role:A.role})}),i.jsx(Ot,{children:i.jsx(UV,{departments:A.departments??[],role:A.role})}),i.jsx(Ot,{className:"text-sm text-[#374151] font-medium",children:Jt(new Date(A.createdAt),"MMM d, yyyy")}),i.jsx(Ot,{className:"text-right",children:i.jsxs(MV,{children:[i.jsx(OV,{asChild:!0,children:i.jsxs(ve,{variant:"ghost",className:"h-8 w-8 p-0 text-[#9CA3AF] hover:text-[#111827] hover:bg-[#E9EBF0]",children:[i.jsx("span",{className:"sr-only",children:"Open menu"}),i.jsx(mR,{className:"h-4 w-4"})]})}),i.jsxs(p_,{align:"end",className:"border-[#E9EBF0]",children:[i.jsxs(Xg,{onClick:()=>c(A),className:"font-bold text-[#374151] focus:text-[#004AAC] focus:bg-[#004AAC]/10",children:[i.jsx(Ar,{className:"mr-2 h-4 w-4"}),i.jsx("span",{children:"Edit Details"})]}),i.jsxs(Xg,{className:"font-bold text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{confirm(`Remove ${A.name} from the team?`)&&E.mutate({id:A.id})},children:[i.jsx(Fr,{className:"mr-2 h-4 w-4"}),i.jsx("span",{children:"Remove Account"})]})]})]})})]},A.id))})]})}),i.jsx(Vn,{open:!!o,onOpenChange:A=>!A&&c(null),children:i.jsxs(Rn,{className:"sm:max-w-[480px] border-[#E9EBF0]",children:[i.jsxs(Fn,{children:[i.jsx(Pn,{className:"text-[#111827] font-display",children:"Edit Team Member"}),i.jsx(bi,{className:"text-[#374151]",children:"Update details, role, or department access. Leave password blank to keep it unchanged."})]}),i.jsx(Ci,{...y,children:i.jsxs("form",{onSubmit:y.handleSubmit(C),className:"space-y-5 pt-4",children:[i.jsx(Je,{control:y.control,name:"name",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Full Name"}
49),i.jsx(tt,{children:i.jsx(ze,{className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...A})}),i.jsx(it,{})]})}),i.jsx(Je,{control:y.control,name:"email",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Email Address"}),i.jsx(tt,{children:i.jsx(ze,{type:"email",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...A})}),i.jsx(it,{})]})}),i.jsx(Je,{control:y.control,name:"role",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Role"}),i.jsxs(en,{value:A.value,onValueChange:A.onChange,children:[i.jsx(tt,{children:i.jsx(Ht,{className:"border-[#E9EBF0] focus:ring-[#00CEA6]",children:i.jsx(tn,{})})}),i.jsx(Yt,{children:Hj.map(j=>i.jsx(mt,{value:j.value,children:j.label},j.value))})]}),i.jsx(it,{})]})}),v==="staff"&&i.jsx(Je,{control:y.control,name:"departments",render:({field:A})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Department Access"}),i.jsx(Ug,{className:"text-xs text-[#9CA3AF]",children:"Select which departments this staff member can access."}),i.jsx(tt,{children:i.jsx(Yj,{value:A.value,onChange:A.onChange})})]})}),i.jsx(Je,{control:y.control,name:"password",render:({field:A})=>i.jsxs(We,{children:[i.jsxs(Qe,{className:"font-bold text-[#111827] flex items-center gap-1.5",children:[i.jsx(nC,{className:"w-3.5 h-3.5"})," Reset Password (Optional)"]}),i.jsx(tt,{children:i.jsx(ze,{type:"password",placeholder:"Leave blank to keep current password",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...A})}),i.jsx(it,{})]})}),i.jsx("div",{className:"flex justify-end pt-4",children:i.jsx(ve,{type:"submit",disabled:S.isPending,className:"w-full font-bold btn-primary h-11",children:S.isPending?"Saving...":"Save Changes"})})]})})]})})]})}const Jg=[{value:"social_media",label:"Social Media",icon:vx},{value:"design",label:"Design",icon:Pa},{value:"content",label:"Content",icon:yx},{value:"web_dev",label:"Web Dev",icon:px},{value:"seo",label:"SEO",icon:Tc},{value:"email_sms",label:"Email / SMS",icon:xi}],VV=Mi({name:ct().min(1,"Name is required"),contactName:ct().optional(),email:ct().email("Invalid email"),password:ct().min(8,"Password must be at least 8 characters"),departments:tu(ct()).default([]),slackChannel:ct().optional(),seoBrandTerms:ct().default(""),seoRecipePathPatterns:ct().default(""),seoRetailLocatorPatterns:ct().default("")}),HV=Mi({name:ct().min(1,"Name is required"),contactName:ct().optional(),email:ct().email("Invalid email"),password:XS([ry(""),ct().min(8,"Password must be at least 8 characters")]),departments:tu(ct()).default([]),slackChannel:ct().optional(),seoBrandTerms:ct().default(""),seoRecipePathPatterns:ct().default(""),seoRetailLocatorPatterns:ct().default("")});function qo(e){return[...new Set(e.split(/[\n,]/).map(t=>t.trim()).filter(Boolean))]}function YV({departments:e}){return e.length===0?i.jsx("span",{className:"text-xs text-[#9CA3AF] font-medium",children:"No departments assigned"}):i.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map(t=>{const n=Jg.find(a=>a.value===t);return i.jsx(ca,{variant:"secondary",className:"bg-[#004AAC]/10 text-[#004AAC] border-transparent font-bold text-[10px] uppercase tracking-wider",children:n?.label??t},t)})})}function KV(){const{admin:e}=ma(),t=e?.role==="super_admin",[,n]=ws(),{data:a,isLoading:o}=Br(),[c,d]=x.useState(!1),[f,h]=x.useState(null),{toast:p}=pn(),y=Kt(),v=wi({resolver:ji(VV),defaultValues:{name:"",contactName:"",email:"",password:"",departments:[],slackChannel:"",seoBrandTerms:"",seoRecipePathPatterns:"",seoRetailLocatorPatterns:""}}),b=wi({resolver:ji(HV),defaultValues:{name:"",contactName:"",email:"",password:"",departments:[],slackChannel:"",seoBrandTerms:"",seoRecipePathPatterns:"",seoRetailLocatorPatterns:""}});x.useEffect(()=>{f&&b.reset({name:f.name,contactName:f.contactName||"",email:f.email,password:"",departments:f.departments,slackChannel:f.slackChannel||"",seoBrandTerms:(f.seoBrandTerms??[]).join(` 50`),seoRecipePathPatterns:(f.seoRecipePatterns??[]).join(` 51`),seoRetailLocatorPatterns:(f.seoRetailLocatorPatterns??[]).join(` 52`)})},[f]);const S=IP({mutation:{onSuccess:()=>{p({title:"Client added"}),d(!1),v.reset(),y.invalidateQueries({queryKey:Sc()})},onError:j=>{p({title:"Failed to add client",description:j.message,variant:"destructive"})}}}),E=nS({mutation:{onSuccess:()=>{p({title:"Client updated"}),h(null),y.invalidateQueries({queryKey:Sc()})},onError:j=>{p({title:"Failed to update client",description:j.message,variant:"destructive"})}}}),w=WP({mutation:{onSuccess:()=>{p({title:"Client removed"}),y.invalidateQueries({queryKey:Sc()})},onError:j=>{p({title:"Failed to remove client",description:j.message,variant:"destructive"})}}}),C=j=>{S.mutate({data:{...j,contactName:j.contactName||void 0,departments:j.departments,slackChannel:j.slackChannel||void 0,seoBrandTerms:qo(j.seoBrandTerms),seoRecipePatterns:qo(j.seoRecipePathPatterns),seoRetailLocatorPatterns:qo(j.seoRetailLocatorPatterns)}})},A=j=>{f&&E.mutate({id:f.id,data:{name:j.name,contactName:j.contactName||"",email:j.email,...j.password?{password:j.password}:{},departments:j.departments,slackChannel:j.slackChannel||null,seoBrandTerms:qo(j.seoBrandTerms),seoRecipePatterns:qo(j.seoRecipePathPatterns),seoRetailLocatorPatterns:qo(j.seoRetailLocatorPatterns)}})};return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1200px] mx-auto
52space-y-8",children:[i.jsxs("div",{className:"flex justify-between items-end gap-4",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827] flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 brand-gradient rounded-lg flex items-center justify-center shadow-sm",children:i.jsx(kf,{className:"w-6 h-6 text-white"})}),"Clients"]}),i.jsx("p",{className:"text-[#374151] mt-2 font-medium",children:"Add clients and control which departments they can see in the client portal."})]}),i.jsxs(Vn,{open:c,onOpenChange:d,children:[i.jsx(Xc,{asChild:!0,children:i.jsxs(ve,{className:"font-bold px-6 shadow-sm h-11 btn-primary",children:[i.jsx(jx,{className:"w-5 h-5 mr-2"})," Add Client"]})}),i.jsxs(Rn,{className:"sm:max-w-[425px] border-[#E9EBF0]",children:[i.jsxs(Fn,{children:[i.jsx(Pn,{className:"text-[#111827] font-display",children:"Add Client"}),i.jsx(bi,{className:"text-[#374151]",children:"The client can log in at /client-login with these credentials."})]}),i.jsx(Ci,{...v,children:i.jsxs("form",{onSubmit:v.handleSubmit(C),className:"space-y-5 pt-4",children:[i.jsx(Je,{control:v.control,name:"name",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Client Name"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"Hoosier Masonry Solutions",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"contactName",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Contact Person"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"Cara",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Shown as the greeting in the client portal instead of the client name. Leave blank to use the client name."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"slackChannel",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Slack Channel"}),i.jsx(tt,{children:i.jsxs("div",{className:"relative",children:[i.jsx(mw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-[#9CA3AF]"}),i.jsx(ze,{placeholder:"approvals-pioneer",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6] pl-8",...j})]})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Private Slack channel for notifications (without #). Leave blank to use the shared default."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"email",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Email Address"}),i.jsx(tt,{children:i.jsx(ze,{type:"email",placeholder:"[email protected]",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"password",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Password"}),i.jsx(tt,{children:i.jsx(ze,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx(it,{})]})}),i.jsxs("div",{className:"space-y-4 rounded-md border border-[#E9EBF0] bg-[#F8F9FB] p-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-sm text-[#111827]",children:"SEO Classification"}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium mt-1",children:"These settings classify branded queries, recipe pages, and Where to Buy/retail pages in SEO reporting. Enter one value per line or separate values with commas."})]}),i.jsx(Je,{control:v.control,name:"seoBrandTerms",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Brand Terms"}),i.jsx(tt,{children:i.jsx(rn,{placeholder:"Brand name, product line",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6] min-h-20",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Terms that identify branded search queries."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"seoRecipePathPatterns",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Recipe Path Patterns"}),i.jsx(tt,{children:i.jsx(rn,{placeholder:"/recipes/, /recipe/",className:"border-[#
52E9EBF0] focus-visible:ring-[#00CEA6] min-h-20",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"URL patterns used to classify recipe pages."}),i.jsx(it,{})]})}),i.jsx(Je,{control:v.control,name:"seoRetailLocatorPatterns",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Where to Buy / Retail Patterns"}),i.jsx(tt,{children:i.jsx(rn,{placeholder:"/where-to-buy/, /retailers/",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6] min-h-20",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"URL patterns used to classify Where to Buy and retail pages."}),i.jsx(it,{})]})})]}),i.jsx(Je,{control:v.control,name:"departments",render:()=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Departments"}),i.jsx("div",{className:"space-y-2 pt-1",children:Jg.map(j=>i.jsx(Je,{control:v.control,name:"departments",render:({field:M})=>{const R=M.value?.includes(j.value);return i.jsxs(We,{className:"flex items-center gap-2.5 space-y-0",children:[i.jsx(tt,{children:i.jsx(Ua,{checked:R,onCheckedChange:T=>{const D=M.value??[];M.onChange(T?[...D,j.value]:D.filter(F=>F!==j.value))}})}),i.jsxs(Qe,{className:"font-medium text-sm text-[#374151] flex items-center gap-1.5 !mt-0",children:[i.jsx(j.icon,{className:"w-3.5 h-3.5 text-[#9CA3AF]"}),j.label]})]})}},j.value))}),i.jsx(it,{})]})}),i.jsx("div",{className:"flex justify-end pt-4",children:i.jsx(ve,{type:"submit",disabled:S.isPending,className:"w-full font-bold btn-primary h-11",children:S.isPending?"Creating...":"Create Client"})})]})})]})]})]}),i.jsx(wt,{className:"border-[#E9EBF0] shadow-sm",children:i.jsxs(ru,{children:[i.jsx(iu,{className:"bg-[#F8F9FB]",children:i.jsxs(Gn,{className:"border-[#E9EBF0]",children:[i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs w-[280px]",children:"Client"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs",children:"Departments"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs",children:"Added"}),i.jsx(Xt,{className:"font-bold text-[#9CA3AF] uppercase tracking-wider text-xs text-right",children:"Actions"})]})}),i.jsx(ou,{children:o?i.jsx(Gn,{children:i.jsx(Ot,{colSpan:4,className:"h-32 text-center text-[#9CA3AF]",children:"Loading clients..."})}):a?.length===0?i.jsx(Gn,{children:i.jsx(Ot,{colSpan:4,className:"h-32 text-center text-[#9CA3AF]",children:"No clients yet."})}):a?.map(j=>i.jsxs(Gn,{className:"border-[#E9EBF0] hover:bg-[#F8F9FB] transition-colors",children:[i.jsx(Ot,{children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-[#004AAC]/10 text-[#004AAC] flex items-center justify-center font-bold font-display uppercase border border-[#004AAC]/20",children:j.name.substring(0,2)}),i.jsxs("div",{children:[i.jsxs("div",{className:"font-bold text-[#111827] flex items-center gap-1.5",children:[j.name,j.contactName&&i.jsxs("span",{className:"text-xs font-medium text-[#9CA3AF]",children:["â Contact: ",j.contactName]})]}),i.jsxs("div",{className:"text-xs text-[#9CA3AF] font-medium flex items-center gap-1 mt-0.5",children:[i.jsx(xi,{className:"w-3 h-3"})," ",j.email]})]})]})}),i.jsx(Ot,{children:i.jsx(YV,{departments:j.departments})}),i.jsx(Ot,{className:"text-sm text-[#374151] font-medium",children:Jt(new Date(j.createdAt),"MMM d, yyyy")}),i.jsx(Ot,{className:"text-right",children:i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsxs(ve,{variant:"ghost",className:"h-8 px-3 text-[#374151] hover:text-[#004AAC] hover:bg-[#004AAC]/10 font-bold",onClick:()=>n(`/admin/clients/${j.id}`),title:"Portal Users",children:[i.jsx(yi,{className:"mr-2 h-3.5 w-3.5"}),"Users"]}),i.jsxs(ve,{variant:"ghost",className:"h-8 px-3 text-[#374151] hover:text-[#004AAC] hover:bg-[#004AAC]/10 font-bold",onClick:()=>n(`/admin/clients/${j.id}`),title:"Design Projects",children:[i.jsx(Pa,{className:"mr-2 h-3.5 w-3.5"}),"Design"]}),i.jsxs(ve,{variant:"ghost",className:"h-8 px-3 text-[#374151] hover:text-[#004AAC] hover:bg-[#004AAC]/10 font-bold",onClick:()=>h(j),children:[i.jsx(Ar,{className:"mr-2 h-3.5 w-3.5"}),"Edit"]}),t&&i.jsxs(ul,{children:[i.jsx(dl,{asChild:!0,children:i.jsxs(ve,{variant:"ghost",className:"h-8 px-3 text-destructive hover:text-destructive hover:bg-destructive/10 font-bold",children:[i.jsx(Fr,{className:"mr-2 h-3.5 w-3.5"}),"Delete"]})}
52),i.jsxs(Di,{className:"border-[#E9EBF0]",children:[i.jsxs(Ri,{children:[i.jsxs(Pi,{className:"text-[#111827] font-display",children:["Delete ",j.name,"?"]}),i.jsx(Bi,{className:"text-[#374151]",children:"This permanently removes their account and login access. This action cannot be undone."})]}),i.jsxs(Fi,{children:[i.jsx(Li,{className:"font-bold border-[#E5E7EB]",children:"Cancel"}),i.jsx(qi,{onClick:()=>w.mutate({id:j.id}),className:"bg-destructive hover:bg-destructive/90 text-white font-bold",children:"Delete"})]})]})]})]})})]},j.id))})]})}),i.jsx(Vn,{open:!!f,onOpenChange:j=>!j&&h(null),children:i.jsxs(Rn,{className:"sm:max-w-[425px] border-[#E9EBF0]",children:[i.jsxs(Fn,{children:[i.jsx(Pn,{className:"text-[#111827] font-display",children:"Edit Client"}),i.jsxs(bi,{className:"text-[#374151]",children:["Update ",f?.name,"'s account details and department access."]})]}),i.jsx(Ci,{...b,children:i.jsxs("form",{onSubmit:b.handleSubmit(A),className:"space-y-5 pt-4",children:[i.jsx(Je,{control:b.control,name:"name",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Client Name"}),i.jsx(tt,{children:i.jsx(ze,{className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx(it,{})]})}),i.jsx(Je,{control:b.control,name:"contactName",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Contact Person"}),i.jsx(tt,{children:i.jsx(ze,{placeholder:"Cara",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Shown as the greeting in the client portal instead of the client name. Leave blank to use the client name."}),i.jsx(it,{})]})}),i.jsx(Je,{control:b.control,name:"slackChannel",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Slack Channel"}),i.jsx(tt,{children:i.jsxs("div",{className:"relative",children:[i.jsx(mw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-[#9CA3AF]"}),i.jsx(ze,{placeholder:"approvals-pioneer",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6] pl-8",...j})]})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Private Slack channel for notifications (without #). Leave blank to use the shared default."}),i.jsx(it,{})]})}),i.jsx(Je,{control:b.control,name:"email",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Email Address"}),i.jsx(tt,{children:i.jsx(ze,{type:"email",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx(it,{})]})}),i.jsx(Je,{control:b.control,name:"password",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"New Password"}),i.jsx(tt,{children:i.jsx(ze,{type:"password",placeholder:"Leave blank to keep current password",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6]",...j})}),i.jsx(it,{})]})}),i.jsxs("div",{className:"space-y-4 rounded-md border border-[#E9EBF0] bg-[#F8F9FB] p-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-sm text-[#111827]",children:"SEO Classification"}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium mt-1",children:"These settings classify branded queries, recipe pages, and Where to Buy/retail pages in SEO reporting. Enter one value per line or separate values with commas."})]}),i.jsx(Je,{control:b.control,name:"seoBrandTerms",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Brand Terms"}),i.jsx(tt,{children:i.jsx(rn,{placeholder:"Brand name, product line",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6] min-h-20",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Terms that identify branded search queries."}),i.jsx(it,{})]})}),i.jsx(Je,{control:b.control,name:"seoRecipePathPatterns",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Recipe Path Patterns"}),i.jsx(tt,{children:i.jsx(rn,{placeholder:"/recipes/, /recipe/",className:"border-[#
52E9EBF0] focus-visible:ring-[#00CEA6] min-h-20",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"URL patterns used to classify recipe pages."}),i.jsx(it,{})]})}),i.jsx(Je,{control:b.control,name:"seoRetailLocatorPatterns",render:({field:j})=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Where to Buy / Retail Patterns"}),i.jsx(tt,{children:i.jsx(rn,{placeholder:"/where-to-buy/, /retailers/",className:"border-[#E9EBF0] focus-visible:ring-[#00CEA6] min-h-20",...j})}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"URL patterns used to classify Where to Buy and retail pages."}),i.jsx(it,{})]})})]}),i.jsx(Je,{control:b.control,name:"departments",render:()=>i.jsxs(We,{children:[i.jsx(Qe,{className:"font-bold text-[#111827]",children:"Departments"}),i.jsx("div",{className:"space-y-2 pt-1",children:Jg.map(j=>i.jsx(Je,{control:b.control,name:"departments",render:({field:M})=>{const R=M.value?.includes(j.value);return i.jsxs(We,{className:"flex items-center gap-2.5 space-y-0",children:[i.jsx(tt,{children:i.jsx(Ua,{checked:R,onCheckedChange:T=>{const D=M.value??[];M.onChange(T?[...D,j.value]:D.filter(F=>F!==j.value))}})}),i.jsxs(Qe,{className:"font-medium text-sm text-[#374151] flex items-center gap-1.5 !mt-0",children:[i.jsx(j.icon,{className:"w-3.5 h-3.5 text-[#9CA3AF]"}),j.label]})]})}},j.value))}),i.jsx(it,{})]})}),i.jsx("div",{className:"flex justify-end pt-4",children:i.jsx(ve,{type:"submit",disabled:E.isPending,className:"w-full font-bold btn-primary h-11",children:E.isPending?"Saving...":"Save Changes"})})]})})]})})]})}const Vo=[{value:"design",label:"Design"},{value:"development",label:"Development",timestampKey:"developmentAt"},{value:"push_live",label:"Push Live",timestampKey:"pushLiveAt"}];function GV(e){return e==="figma_review"||e==="design_approved"||e==="design"?"design":e==="development"?"development":"push_live"}function Uy({stage:e,timestamps:t,size:n="md"}){const a=GV(e),o=Vo.findIndex(c=>c.value===a);return i.jsx("div",{className:"flex items-start gap-1 flex-wrap",children:Vo.map((c,d)=>{const f=d<o,h=d===o,p=f&&t&&c.timestampKey?t[c.timestampKey]:null,y=n==="md"&&p?Jt(new Date(p),"MMM d"):null;return i.jsxs("div",{className:"flex items-start gap-1",children:[i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsxs("div",{className:`flex items-center gap-1.5 rounded-full border font-bold transition-colors ${n==="sm"?"text-[10px] px-2 py-0.5":"text-xs px-2.5 py-1"} ${h?"bg-[#004AAC] text-white border-[#004AAC]":f?"bg-[#00CEA6]/15 text-[#0F6E56] border-[#00CEA6]/40":"bg-[#F8F9FB] text-[#9CA3AF] border-[#E9EBF0]"}`,children:[f?i.jsx(Ho,{className:n==="sm"?"w-2.5 h-2.5 shrink-0":"w-3 h-3 shrink-0"}):i.jsx(XN,{className:`shrink-0 ${n==="sm"?"w-2.5 h-2.5":"w-3 h-3"} ${h?"fill-white":""}`}),i.jsx("span",{className:n==="sm"?"":"whitespace-nowrap",children:c.label})]}),y&&i.jsx("span",{className:"text-[10px] text-[#9CA3AF] font-medium mt-0.5 leading-none",children:y})]}),d<Vo.length-1&&i.jsx(Ti,{className:`mt-1 shrink-0 ${n==="sm"?"w-3 h-3":"w-4 h-4"} ${d<o?"text-[#00CEA6]":"text-[#D1D5DB]"}`})]},c.value)})})}function WV(e){try{return e.includes("figma.com/embed")?e:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e)}`}catch{return e}}function x_({figmaUrl:e,height:t=480}){if(!e)return i.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 bg-[#F8F9FB] border-2 border-dashed border-[#E9EBF0] rounded-lg",style:{height:t},children:[i.jsx(xR,{className:"w-8 h-8 text-[#D1D5DB]"}),i.jsx("p",{className:"text-sm font-bold text-[#9CA3AF]",children:"No Figma file linked yet"})]});const n=WV(e);return i.jsxs("div",{className:"w-full rounded-lg overflow-hidden border border-[#E9EBF0] bg-[#F8F9FB] relative",style:{height:t},children:[i.jsx("iframe",{src:n,className:"w-full h-full",title:"Figma design embed"}),i.jsx("div",{className:"absolute top-0 left-0 right-0 bg-white border-b border-[#E9EBF0]",style:{height:44},"aria-hidden":"true"})]})}const Kj=1280,Gj=900;function Wj({src:e,title:t}){const n=x.useRef(null),[a,o]=x.useState(1);return x.useEffect(()=>{const c=n.current;if(!c)return;const d=new ResizeObserver(([f])=>{f.contentRect.width>0&&o(f.contentRect.width/Kj)});return d.observe(c),()=>d.disconnect()},[]),i.jsx("div",{ref:n,className:"w-full rounded-lg overflow-hidden border border-[#
52E9EBF0] bg-[#F8F9FB]",style:{height:Gj*a},children:i.jsx("iframe",{src:e,title:t,sandbox:"allow-scripts",style:{width:Kj,height:Gj,transform:`scale(${a})`,transformOrigin:"top left",border:"none"}})})}function y_({project:e,audience:t}){const n="/api",a=t==="client"?`${n}/client/storage`:`${n}/storage`,o=t==="client"?`${n}/client/design-projects`:`${n}/design-projects`;return!(e.figmaUrl||e.htmlFileUrl||e.htmlZipFileUrl||e.liveUrl)?i.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 bg-[#F8F9FB] border-2 border-dashed border-[#E9EBF0] rounded-lg py-12",children:[i.jsx(Pa,{className:"w-8 h-8 text-[#D1D5DB]"}),i.jsx("p",{className:"text-sm font-bold text-[#9CA3AF]",children:"Design files coming soon"}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Your team will link the design here once it's ready."})]}):i.jsxs("div",{className:"space-y-6",children:[e.figmaUrl&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xs font-bold text-[#9CA3AF] uppercase tracking-wider",children:"Design Preview"}),i.jsx(x_,{figmaUrl:e.figmaUrl,height:420})]}),e.htmlFileUrl&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xs font-bold text-[#374151] uppercase tracking-wider",children:"HTML Design Preview"}),i.jsx(Wj,{src:`${a}${e.htmlFileUrl}`,title:"HTML design preview"})]}),e.htmlZipFileUrl&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("p",{className:"flex items-center gap-2 text-xs font-bold text-[#374151] uppercase tracking-wider",children:[i.jsx(Tf,{className:"w-4 h-4 text-[#00CEA6]"}),"HTML Folder Preview"]}),i.jsx(Wj,{src:`${o}/${e.id}/html-package/index.html`,title:"HTML folder preview"})]}),e.liveUrl&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(tC,{className:"w-4 h-4 text-[#004AAC]"}),i.jsx("span",{className:"text-xs font-bold text-[#374151] uppercase tracking-wider",children:"Live Page Preview"}),i.jsxs("a",{href:e.liveUrl,target:"_blank",rel:"noreferrer",className:"ml-auto flex items-center gap-1 text-xs font-bold text-[#004AAC] hover:text-[#00CEA6] transition-colors",children:[i.jsx(gx,{className:"w-3 h-3"}),"Visit Page"]})]}),i.jsx("div",{className:"w-full rounded-lg overflow-hidden border border-[#E9EBF0] bg-[#F8F9FB]",style:{height:420},children:i.jsx("iframe",{src:e.liveUrl,className:"w-full h-full",title:"Live page preview",sandbox:"allow-scripts allow-same-origin allow-forms"})})]})]})}const QV=[{value:"design",label:"Design"},{value:"figma_review",label:"Client Review"},{value:"design_approved",label:"Client Approved"},{value:"development",label:"Development"},{value:"push_live",label:"Push Live"}];function ZV(e){return e==="design_approved"?"development":e==="development"?"push_live":null}function XV({project:e}){const{admin:t}=ma(),n=t?.role==="staff",a=Kt(),{toast:o}=pn(),{data:c,isLoading:d}=q9(e.id,{query:{queryKey:Cg(e.id)}}),f=I9({mutation:{onSuccess:()=>{o({title:"Comment posted"}),a.invalidateQueries({queryKey:Cg(e.id)})},onError:()=>o({title:"Failed to post comment",variant:"destructive"})}});return i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{className:"text-xs font-bold text-[#9CA3AF] uppercase tracking-wider flex items-center gap-1.5",children:[i.jsx(Yc,{className:"w-3.5 h-3.5"}),"Comments"]}),i.jsx(au,{comments:c,isLoading:d}),i.jsx("div",{className:"border-t border-[#E9EBF0] pt-3",children:i.jsx(dE,{isSubmitting:f.isPending,internalOnly:n,onSubmit:(h,p,y)=>{f.mutate({id:e.id,data:{comment:h,attachment:p,isInternal:y}})}})})]})}function JV({clientId:e,onSuccess:t}){const[n,a]=x.useState(!1),[o,c]=x.useState(""),[d,f]=x.useState(""),{toast:h}=pn(),p=oS({mutation:{onSuccess:()=>{h({title:"Design project created"}),a(!1),c(""),f(""),t()},onError:y=>{const v=y?.status;h(v===401?{title:"Session expired â please sign in to the admin portal again.",variant:"destructive"}:{title:"Failed to create project",variant:"destructive"})}}});return i.jsxs(Vn,{open:n,onOpenChange:a,children:[i.jsx(Xc,{asChild:!0,children:i.jsxs(ve,{className:"font-bold btn-primary h-10",children:[i.jsx(ef,{className:"w-4 h-4 mr-2"}),"Add Project"]})}
52),i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-md",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"font-display text-[#111827]",children:"New Design Project"})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Project Name"}),i.jsx(ze,{value:o,onChange:y=>c(y.target.value),placeholder:"e.g. Brand Refresh 2025",className:"border-[#E9EBF0]"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Figma URL (optional)"}),i.jsx(ze,{value:d,onChange:y=>f(y.target.value),placeholder:"https://www.figma.com/file/...",className:"border-[#E9EBF0]"}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Paste the share link from Figma"})]}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",onClick:()=>a(!1),className:"font-bold border-[#E9EBF0]",children:"Cancel"}),i.jsx(ve,{onClick:()=>p.mutate({data:{clientId:e,name:o,figmaUrl:d||null}}),disabled:!o.trim()||p.isPending,className:"font-bold btn-primary",children:p.isPending?"Creating...":"Create"})]})]})]})]})}function eH({project:e,onSuccess:t}){const{admin:n}=ma(),a=n?.role==="manager"||n?.role==="super_admin",[o,c]=x.useState(!1),[d,f]=x.useState(e.name),[h,p]=x.useState(e.figmaUrl??""),[y,v]=x.useState(e.liveUrl??""),[b,S]=x.useState(e.htmlFileUrl??""),[E,w]=x.useState(e.htmlZipFileUrl??""),[C,A]=x.useState(e.stage),[j,M]=x.useState(!1),[R,T]=x.useState(!1),{toast:D}=pn(),{uploadFile:F}=su();x.useEffect(()=>{o&&(f(e.name),p(e.figmaUrl??""),v(e.liveUrl??""),S(e.htmlFileUrl??""),w(e.htmlZipFileUrl??""),A(e.stage))},[o,e]);const k=lS({mutation:{onSuccess:()=>{D({title:"Project updated"}),c(!1),t()},onError:q=>D({title:"Couldnât update project",description:q instanceof Error?q.message.replace(/^HTTP \d+\s*[^:]*:\s*/,""):"Check that the HTML package includes one index.html file.",variant:"destructive"})}});async function z(q){const Y=q.target.files?.[0];if(q.target.value="",!!Y){if(!Y.name.toLowerCase().endsWith(".html")){D({title:"Choose a .html file",variant:"destructive"});return}M(!0);try{const Z=(await F(Y))?.objectPath??"";S(Z),D({title:"HTML file uploaded"})}catch{D({title:"Upload failed",variant:"destructive"})}finally{M(!1)}}}async function X(q){const Y=q.target.files?.[0];if(q.target.value="",!!Y){if(!Y.name.toLowerCase().endsWith(".zip")){D({title:"Choose a .zip file",variant:"destructive"});return}if(Y.size>25*1024*1024){D({title:"ZIP files must be 25 MB or smaller",variant:"destructive"});return}T(!0);try{const Z=(await F(Y))?.objectPath??"";if(!Z)throw new Error("Upload failed");w(Z),D({title:"HTML folder ZIP uploaded"})}catch{D({title:"ZIP upload failed",variant:"destructive"})}finally{T(!1)}}}return i.jsxs(Vn,{open:o,onOpenChange:c,children:[i.jsx(Xc,{asChild:!0,children:i.jsxs(ve,{variant:"outline",size:"sm",className:"h-8 font-bold border-[#E9EBF0] text-[#374151]",children:[i.jsx(Ar,{className:"w-3.5 h-3.5 mr-1.5"}),"Edit"]})}),i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-md max-h-[90vh] overflow-y-auto",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"font-display text-[#111827]",children:"Edit Design Project"})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Project Name"}),i.jsx(ze,{value:d,onChange:q=>f(q.target.value),className:"border-[#E9EBF0]"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Figma URL"}),i.jsx(ze,{value:h,onChange:q=>p(q.target.value),placeholder:"https://www.figma.com/file/...",className:"border-[#E9EBF0]"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["Live Page URL"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),i.jsx(ze,{value:y,onChange:q=>v(q.target.value),placeholder:"https://yoursite.com/page",className:"border-[#E9EBF0]"}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:'Shown to the client as an iframe preview labeled "Live Page Preview."'})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["HTML Design File"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),b&&i.jsx("p",{className:"text-xs text-[#00CEA6] font-bold",children:"â File uploaded"}),i.jsx("label",{className:"block",children:i.jsx(ze,{type:"file",accept:".html",onCh
52ange:z,disabled:j,className:"border-[#E9EBF0] cursor-pointer"})}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Upload a self-contained .html file (inline styles/scripts). Clients see it as an iframe preview."}),j&&i.jsxs("p",{className:"text-xs text-[#9CA3AF] flex items-center gap-1",children:[i.jsx(ns,{className:"w-3 h-3 animate-spin"})," Uploadingâ¦"]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["HTML Folder ZIP"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),E&&i.jsxs("p",{className:"text-xs text-[#00CEA6] font-bold flex items-center gap-1",children:[i.jsx(Tf,{className:"w-3.5 h-3.5"})," ZIP uploaded"]}),i.jsx("label",{className:"block",children:i.jsx(ze,{type:"file",accept:".zip,application/zip,application/x-zip-compressed",onChange:X,disabled:R,className:"border-[#E9EBF0] cursor-pointer"})}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Upload a ZIP containing index.html and its assets (25 MB max). Clients see the complete folder preview."}),R&&i.jsxs("p",{className:"text-xs text-[#9CA3AF] flex items-center gap-1",children:[i.jsx(ns,{className:"w-3 h-3 animate-spin"})," Uploadingâ¦"]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Stage"}),i.jsxs(en,{value:C,onValueChange:q=>A(q),disabled:!a,children:[i.jsx(Ht,{className:"border-[#E9EBF0]",children:i.jsx(tn,{})}),i.jsx(Yt,{children:QV.map(q=>i.jsx(mt,{value:q.value,children:q.label},q.value))})]}),!a&&i.jsxs("p",{className:"text-xs font-medium text-[#9CA3AF] flex items-center gap-1",children:[i.jsx(Oa,{className:"w-3 h-3"}),"Client review stages are controlled by managers and super admins."]})]}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",onClick:()=>c(!1),className:"font-bold border-[#E9EBF0]",children:"Cancel"}),i.jsx(ve,{onClick:()=>k.mutate({id:e.id,data:{name:d,figmaUrl:h||null,liveUrl:y||null,htmlFileUrl:b||null,htmlZipFileUrl:E||null,stage:C}}),disabled:!d.trim()||k.isPending||j||R,className:"font-bold btn-primary",children:k.isPending?"Saving...":"Save"})]})]})]})]})}function tH({project:e,onUpdated:t,onDeleted:n}){const{admin:a}=ma(),o=a?.role==="manager"||a?.role==="super_admin",{toast:c}=pn(),[d,f]=x.useState(!1),h=Kt(),p=lS({mutation:{onSuccess:()=>{c({title:"Stage advanced"}),h.invalidateQueries({queryKey:pi({clientId:e.clientId})})},onError:()=>c({title:"Failed to advance stage",variant:"destructive"})}}),y=R9({mutation:{onSuccess:()=>{c({title:"Project deleted"}),n()},onError:()=>c({title:"Failed to delete project",variant:"destructive"})}}),v=ZV(e.stage),b=e.stage==="figma_review",S=e.stage==="design_approved";return i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 bg-[#F8F9FB] border-b border-[#E9EBF0] flex items-start justify-between gap-4 flex-wrap",children:[i.jsxs("div",{className:"space-y-2 flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("h3",{className:"font-bold text-[#111827] text-base truncate",children:e.name}),b&&i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider rounded-full bg-[#FFF7E6] text-[#9A5B00] border border-[#F5D69E] px-2 py-0.5",children:"Awaiting Client Approval"}),S&&i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider rounded-full bg-[#E3F7F2] text-[#0F6E56] border border-[#B7EBDD] px-2 py-0.5",children:"Client Approved"})]}),i.jsx(Uy,{stage:e.stage,timestamps:{designApprovedAt:e.designApprovedAt,developmentAt:e.developmentAt,pushLiveAt:e.pushLiveAt}})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.stage==="design"&&i.jsxs(ve,{size:"sm",variant:o?"default":"outline",className:`h-8 font-bold ${o?"btn-primary":"text-[#9CA3AF] border-[#D1D5DB]"}`,disabled:!o||p.isPending,title:o?void 0:"Only managers and super admins can send designs for client review.",onClick:()=>p.mutate({id:e.id,data:{stage:"figma_review"}}
52),children:[o?i.jsx(rC,{className:"w-3.5 h-3.5 mr-1"}):i.jsx(Oa,{className:"w-3.5 h-3.5 mr-1"}),o?"Send for Client Review":"Send for Client Review (Managers only)"]}),v&&i.jsxs(ve,{size:"sm",variant:"outline",className:"h-8 font-bold border-[#004AAC] text-[#004AAC] hover:bg-[#004AAC]/10",disabled:!o||p.isPending,title:o?void 0:"Only managers and super admins can advance client review stages.",onClick:()=>p.mutate({id:e.id,data:{stage:v}}),children:[o?i.jsx(Ti,{className:"w-3.5 h-3.5 mr-1"}):i.jsx(Oa,{className:"w-3.5 h-3.5 mr-1"}),o?v==="development"?"Start Development":"Push Live":"Advance Stage (Managers only)"]}),i.jsx(eH,{project:e,onSuccess:t}),i.jsxs(ul,{children:[i.jsx(dl,{asChild:!0,children:i.jsx(ve,{variant:"outline",size:"sm",className:"h-8 font-bold border-[#E9EBF0] text-destructive hover:bg-destructive/10 hover:border-destructive/30",children:i.jsx(Fr,{className:"w-3.5 h-3.5"})})}),i.jsxs(Di,{className:"border-[#E9EBF0]",children:[i.jsxs(Ri,{children:[i.jsx(Pi,{className:"font-display text-[#111827]",children:"Delete Project"}),i.jsxs(Bi,{children:["This will permanently delete ",i.jsx("strong",{children:e.name})," and all its comments."]})]}),i.jsxs(Fi,{children:[i.jsx(Li,{className:"font-bold border-[#E9EBF0]",children:"Cancel"}),i.jsx(qi,{onClick:()=>y.mutate({id:e.id}),className:"bg-destructive hover:bg-destructive/90 text-white font-bold",children:"Delete"})]})]})]})]})]}),i.jsxs(Dn,{className:"p-5 space-y-5",children:[i.jsx(y_,{project:e,audience:"admin"}),i.jsxs("button",{type:"button",onClick:()=>f(E=>!E),className:"text-xs font-bold text-[#004AAC] hover:text-[#00CEA6] flex items-center gap-1 transition-colors",children:[i.jsx(Yc,{className:"w-3.5 h-3.5"}),d?"Hide":"Show"," comments"]}),d&&i.jsx(XV,{project:e})]})]})}function nH({client:e}){const t=Kt(),{toast:n}=pn(),{data:a,isLoading:o}=JP(e.id,{query:{queryKey:jg(e.id)}}),[c,d]=x.useState(!1),[f,h]=x.useState(null),[p,y]=x.useState({name:"",email:"",password:""}),[v,b]=x.useState({name:"",email:"",password:""});function S(){t.invalidateQueries({queryKey:jg(e.id)})}const E=s5({mutation:{onSuccess:()=>{n({title:"Portal user added"}),y({name:"",email:"",password:""}),d(!1),S()},onError:R=>n({title:"Couldnât add portal user",description:R.message,variant:"destructive"})}}),w=o5({mutation:{onSuccess:()=>{n({title:"Portal user updated"}),h(null),b({name:"",email:"",password:""}),S()},onError:R=>n({title:"Couldnât update portal user",description:R.message,variant:"destructive"})}}),C=d5({mutation:{onSuccess:()=>{n({title:"Portal user removed"}),S()},onError:R=>n({title:"Couldnât remove portal user",description:R.message,variant:"destructive"})}});function A(R){b({name:R.name,email:R.email,password:""}),h(R)}function j(){if(!p.name.trim()||!p.email.trim()||p.password.length<8){n({title:"Complete all user details",description:"A name, email, and password of at least 8 characters are required.",variant:"destructive"});return}E.mutate({clientId:e.id,data:{name:p.name.trim(),email:p.email.trim(),password:p.password}})}function M(){if(!f||!v.name.trim()||!v.email.trim()){n({title:"Name and email are required",variant:"destructive"});return}if(v.password&&v.password.length<8){n({title:"Password is too short",description:"Use at least 8 characters.",variant:"destructive"});return}w.mutate({clientId:e.id,userId:f.id,data:{name:v.name.trim(),email:v.email.trim(),...v.password?{password:v.password}:{}}})}return i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 bg-[#F8F9FB] border-b border-[#E9EBF0] flex items-center justify-between gap-4 flex-wrap",children:[i.jsxs("div",{children:[i.jsxs("h2",{className:"font-display font-bold text-lg text-[#111827] flex items-center gap-2",children:[i.jsx(yi,{className:"w-5 h-5 text-[#004AAC]"}),"Portal Users"]}),i.jsxs("p",{className:"text-sm text-[#6B7280] mt-1",children:["Each user has their own login and shares access to all of ",e.name,"'s portal content."]})]}),i.jsxs(ve,{className:"btn-primary font-bold",onClick:()=>d(!0),children:[i.jsx(jx,{className:"w-4 h-4 mr-2"}),"Add User"]})]}),i.jsxs(Dn,{className:"p-5 space-y-3",children:[i.jsxs("div",{className:"rounded-lg border border-[#
52E9EBF0] p-4 bg-white flex items-center justify-between gap-4 flex-wrap",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("p",{className:"font-bold text-[#111827]",children:e.contactName||e.name}),i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider bg-[#004AAC]/10 text-[#004AAC] rounded-full px-2 py-0.5",children:"Primary login"})]}),i.jsxs("p",{className:"text-sm text-[#6B7280] flex items-center gap-1.5 mt-1",children:[i.jsx(xi,{className:"w-3.5 h-3.5"})," ",e.email]})]}),i.jsx("p",{className:"text-xs text-[#9CA3AF] font-medium",children:"Manage this account from the Clients list."})]}),o?i.jsx("div",{className:"py-6 text-center text-sm text-[#9CA3AF] font-medium",children:"Loading additional usersâ¦"}):a?.length===0?i.jsx("div",{className:"py-6 text-center border border-dashed border-[#E9EBF0] rounded-lg text-sm text-[#9CA3AF] font-medium",children:"No additional portal users yet."}):a?.map(R=>i.jsxs("div",{className:"rounded-lg border border-[#E9EBF0] p-4 bg-white flex items-center justify-between gap-4 flex-wrap",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"font-bold text-[#111827]",children:R.name}),i.jsxs("p",{className:"text-sm text-[#6B7280] flex items-center gap-1.5 mt-1",children:[i.jsx(xi,{className:"w-3.5 h-3.5"})," ",R.email]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(ve,{variant:"outline",size:"sm",className:"font-bold border-[#E9EBF0]",onClick:()=>A(R),children:[i.jsx(Ar,{className:"w-3.5 h-3.5 mr-1.5"}),"Edit"]}),i.jsxs(ul,{children:[i.jsx(dl,{asChild:!0,children:i.jsxs(ve,{variant:"outline",size:"sm",className:"font-bold text-destructive border-destructive/20 hover:bg-destructive/10 hover:text-destructive",children:[i.jsx(Fr,{className:"w-3.5 h-3.5 mr-1.5"}),"Remove"]})}),i.jsxs(Di,{className:"border-[#E9EBF0]",children:[i.jsxs(Ri,{children:[i.jsxs(Pi,{className:"font-display text-[#111827]",children:["Remove ",R.name,"?"]}),i.jsxs(Bi,{children:["They will no longer be able to sign in to ",e.name,"'s portal. This does not remove any client content."]})]}),i.jsxs(Fi,{children:[i.jsx(Li,{className:"font-bold border-[#E9EBF0]",children:"Cancel"}),i.jsx(qi,{className:"bg-destructive hover:bg-destructive/90 text-white font-bold",onClick:()=>C.mutate({clientId:e.id,userId:R.id}),children:"Remove User"})]})]})]})]})]},R.id))]}),i.jsx(Vn,{open:c,onOpenChange:d,children:i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-md",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"font-display text-[#111827]",children:"Add Portal User"})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Name"}),i.jsx(ze,{value:p.name,onChange:R=>y(T=>({...T,name:R.target.value})),placeholder:"Jordan Smith"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Email Address"}),i.jsx(ze,{type:"email",value:p.email,onChange:R=>y(T=>({...T,email:R.target.value})),placeholder:"[email protected]"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Temporary Password"}),i.jsx(ze,{type:"password",value:p.password,onChange:R=>y(T=>({...T,password:R.target.value})),placeholder:"At least 8 characters"})]}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",className:"font-bold border-[#E9EBF0]",onClick:()=>d(!1),children:"Cancel"}),i.jsx(ve,{className:"font-bold btn-primary",disabled:E.isPending,onClick:j,children:E.isPending?"Addingâ¦":"Add User"})]})]})]})}),i.jsx(Vn,{open:!!f,onOpenChange:R=>!R&&h(null),children:i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-md",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"font-display text-[#111827]",children:"Edit Portal User"})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Name"}),i.jsx(ze,{value:v.name,onChange:R=>b(T=>({...T,name:R.target.value}))})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Email Address"}),i.jsx(ze,{type:"email",value:v.email,onChange:R=>b(T=>({...T,email:R.target.value}))})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Reset Password"}),i.jsx(ze,{type:"password",value:v.password,onChange:R=>b(T=>({...T,password:R.target.value})),placeholder:"Leave blank to keep current password"})]}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",className:"font-bold border-[#
52E9EBF0]",onClick:()=>h(null),children:"Cancel"}),i.jsx(ve,{className:"font-bold btn-primary",disabled:w.isPending,onClick:M,children:w.isPending?"Savingâ¦":"Save Changes"})]})]})]})})]})}const Qj=[{value:"seo",label:"SEO"},{value:"google_ads",label:"Google Ads"},{value:"ga4",label:"Google Analytics 4"},{value:"facebook_organic",label:"Facebook Organic"},{value:"meta_ads",label:"Meta Ads"},{value:"tiktok_ads",label:"TikTok Ads"},{value:"instagram_organic",label:"Instagram Organic"},{value:"tiktok_organic",label:"TikTok Organic"},{value:"email_campaigns",label:"Email Campaigns"}];function sH({client:e}){const t=Kt(),{toast:n}=pn(),{data:a,isLoading:o}=t6(e.id,{query:{queryKey:Kd(e.id)}}),[c,d]=x.useState(null),[f,h]=x.useState({connectorSlug:"",externalAccountId:""}),[p,y]=x.useState(!1),[v,b]=x.useState({brandTerms:"",recipePatterns:"",retailLocatorPatterns:""});x.useEffect(()=>{p&&b({brandTerms:(e.seoBrandTerms??[]).join(` 53`),recipePatterns:(e.seoRecipePatterns??[]).join(` 54`),retailLocatorPatterns:(e.seoRetailLocatorPatterns??[]).join(` 55`)})},[p,e.seoBrandTerms,e.seoRecipePatterns,e.seoRetailLocatorPatterns]);const S=r6({mutation:{onSuccess:()=>{n({title:"Reporting connector saved"}),t.invalidateQueries({queryKey:Kd(e.id)}),d(null)},onError:T=>n({title:"Failed to save connector",description:T.message,variant:"destructive"})}}),E=c6({mutation:{onSuccess:()=>{n({title:"Reporting connector removed"}),t.invalidateQueries({queryKey:Kd(e.id)})},onError:T=>n({title:"Failed to remove connector",description:T.message,variant:"destructive"})}}),w=nS({mutation:{onSuccess:()=>{n({title:"SEO classification settings saved"}),t.invalidateQueries({queryKey:Sc()}),y(!1)},onError:T=>n({title:"Failed to save SEO classification settings",description:T.message,variant:"destructive"})}});function C(T,D){d(T),h({connectorSlug:D?.connectorSlug||"",externalAccountId:D?.externalAccountId||""})}function A(){if(c){if(!f.connectorSlug.trim()||!f.externalAccountId.trim()){n({title:"Missing fields",description:"Both connector slug and external account ID are required.",variant:"destructive"});return}S.mutate({clientId:e.id,category:c,data:{connectorSlug:f.connectorSlug.trim(),externalAccountId:f.externalAccountId.trim()}})}}function j(T){return T.split(/[,\n]/).map(D=>D.trim()).filter(Boolean)}function M(){b({brandTerms:(e.seoBrandTerms??[]).join(` 56`),recipePatterns:(e.seoRecipePatterns??[]).join(` 57`),retailLocatorPatterns:(e.seoRetailLocatorPatterns??[]).join(` 58`)}),y(!0)}function R(){w.mutate({id:e.id,data:{seoBrandTerms:j(v.brandTerms),seoRecipePatterns:j(v.recipePatterns),seoRetailLocatorPatterns:j(v.retailLocatorPatterns)}})}return i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 bg-[#F8F9FB] border-b border-[#E9EBF0] flex items-start justify-between gap-4 flex-wrap",children:[i.jsxs("div",{children:[i.jsxs("h2",{className:"font-display font-bold text-lg text-[#111827] flex items-center gap-2",children:[i.jsx(dR,{className:"w-5 h-5 text-[#004AAC]"}),"Reporting Connectors"]}),i.jsx("p",{className:"text-sm text-[#6B7280] mt-1",children:"Map data sources to Windsor reporting API endpoints for this client."})]}),i.jsxs(ve,{variant:"outline",className:"font-bold border-[#004AAC] text-[#004AAC] hover:bg-[#004AAC]/10",onClick:M,children:[i.jsx(Ar,{className:"w-4 h-4 mr-2"}),"SEO Classification"]})]}),i.jsx(Dn,{className:"p-5",children:o?i.jsxs("div",{className:"py-6 text-center text-sm text-[#9CA3AF] font-medium flex items-center justify-center gap-2",children:[i.jsx(ns,{className:"w-4 h-4 animate-spin"})," Loading connectors..."]}):i.jsx("div",{className:"space-y-4",children:Qj.map(T=>{const D=a?.find(k=>k.category===T.value),F=!!D;return i.jsxs("div",{className:"rounded-lg border border-[#E9EBF0] p-4 bg-white flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 transition-colors hover:border-[#D1D5DB]",children:[i.jsxs("div",{className:"min-w-0 flex items-center gap-3 w-full sm:w-auto",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center border shrink-0 ${F?"bg-[#E3F7F2] border-[#B7EBDD]":"bg-[#F3F4F6] border-[#
58E5E7EB]"}`,children:i.jsx(QN,{className:`w-5 h-5 ${F?"text-[#0F6E56]":"text-[#9CA3AF]"}`})}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("p",{className:"font-bold text-[#111827]",children:T.label}),F?i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider bg-[#E3F7F2] text-[#0F6E56] rounded-full px-2 py-0.5 flex items-center gap-1",children:"Connected"}):i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider bg-[#F3F4F6] text-[#6B7280] rounded-full px-2 py-0.5",children:"Not Configured"})]}),F&&i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-3 mt-1.5 min-w-0",children:[i.jsxs("span",{className:"text-sm text-[#6B7280] flex items-center gap-1.5 truncate",title:"Connector Slug",children:[i.jsx(sC,{className:"w-3.5 h-3.5 text-[#9CA3AF] shrink-0"}),i.jsx("span",{className:"truncate",children:D.connectorSlug})]}),i.jsx("span",{className:"text-[#D1D5DB] hidden sm:inline",children:"|"}),i.jsx("span",{className:"text-sm text-[#6B7280] truncate",title:"External Account ID",children:D.externalAccountId})]}),!F&&i.jsx("p",{className:"text-sm text-[#9CA3AF] mt-1",children:"Missing data mapping"})]})]}),i.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto mt-2 sm:mt-0 justify-end",children:[i.jsx(ve,{variant:"outline",size:"sm",className:`font-bold ${F?"border-[#E9EBF0] text-[#374151]":"border-[#004AAC] text-[#004AAC] hover:bg-[#004AAC]/10"}`,onClick:()=>C(T.value,D),children:F?i.jsxs(i.Fragment,{children:[i.jsx(Ar,{className:"w-3.5 h-3.5 mr-1.5"})," Edit"]}):i.jsxs(i.Fragment,{children:[i.jsx(ef,{className:"w-3.5 h-3.5 mr-1.5"})," Configure"]})}),F&&i.jsxs(ul,{children:[i.jsx(dl,{asChild:!0,children:i.jsxs(ve,{variant:"outline",size:"sm",className:"font-bold text-destructive border-destructive/20 hover:bg-destructive/10 hover:text-destructive px-2",children:[i.jsx(jF,{className:"w-3.5 h-3.5"}),i.jsx("span",{className:"sr-only",children:"Disconnect"})]})}),i.jsxs(Di,{className:"border-[#E9EBF0]",children:[i.jsxs(Ri,{children:[i.jsxs(Pi,{className:"font-display text-[#111827]",children:["Disconnect ",T.label,"?"]}),i.jsxs(Bi,{children:["This will remove the data mapping. The client will no longer see data for ",T.label," in their reporting portal."]})]}),i.jsxs(Fi,{children:[i.jsx(Li,{className:"font-bold border-[#E9EBF0]",children:"Cancel"}),i.jsx(qi,{className:"bg-destructive hover:bg-destructive/90 text-white font-bold",onClick:()=>E.mutate({clientId:e.id,category:T.value}),children:"Disconnect"})]})]})]})]})]},T.value)})})}),i.jsx(Vn,{open:!!c,onOpenChange:T=>!T&&d(null),children:i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-md",children:[i.jsx(Fn,{children:i.jsxs(Pn,{className:"font-display text-[#111827]",children:["Configure ",Qj.find(T=>T.value===c)?.label]})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsxs("div",{className:"bg-[#FFF7E6] border border-[#F5D69E] rounded-md p-3 flex gap-2",children:[i.jsx(ZN,{className:"w-5 h-5 text-[#9A5B00] shrink-0 mt-0.5"}),i.jsx("p",{className:"text-xs text-[#9A5B00] leading-relaxed font-medium",children:"Do not enter API keys here. The connector slug and account ID should match your Windsor mapping configuration."})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Connector Slug"}),i.jsx(ze,{value:f.connectorSlug,onChange:T=>h(D=>({...D,connectorSlug:T.target.value})),placeholder:"e.g. google_ads_client_xyz",className:"border-[#E9EBF0]"}),i.jsx("p",{className:"text-[11px] text-[#6B7280]",children:"The connector slug in Windsor."})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"External Account ID / Property ID"}),i.jsx(ze,{value:f.externalAccountId,onChange:T=>h(D=>({...D,externalAccountId:T.target.value})),placeholder:"e.g. 123-456-7890",className:"border-[#E9EBF0]"}),i.jsx("p",{className:"text-[11px] text-[#6B7280]",children:"The specific account, site, or property identifier."})]}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",className:"font-bold border-[#
58E9EBF0]",onClick:()=>d(null),children:"Cancel"}),i.jsx(ve,{className:"font-bold btn-primary",disabled:S.isPending,onClick:A,children:S.isPending?"Savingâ¦":"Save Configuration"})]})]})]})}),i.jsx(Vn,{open:p,onOpenChange:y,children:i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-xl",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"font-display text-[#111827]",children:"SEO Classification Settings"})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsx("p",{className:"text-sm text-[#6B7280]",children:"Add one value per line or separate values with commas. These settings classify SEO reporting for this client."}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{htmlFor:"seo-brand-terms",className:"font-bold text-[#374151]",children:"Brand Terms"}),i.jsx(rn,{id:"seo-brand-terms",value:v.brandTerms,onChange:T=>b(D=>({...D,brandTerms:T.target.value})),placeholder:`e.g. Growth Shark 59Growth Shark Agency`,className:"min-h-24 border-[#E9EBF0]"}),i.jsx("p",{className:"text-[11px] text-[#6B7280]",children:"Queries matching these terms are classified as branded."})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{htmlFor:"seo-recipe-patterns",className:"font-bold text-[#374151]",children:"Recipe URL Patterns"}),i.jsx(rn,{id:"seo-recipe-patterns",value:v.recipePatterns,onChange:T=>b(D=>({...D,recipePatterns:T.target.value})),placeholder:`/recipes/
60/recipe/`,className:"min-h-24 border-[#E9EBF0]"}),i.jsx("p",{className:"text-[11px] text-[#6B7280]",children:"Landing-page paths matching these patterns are classified as recipes."})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{htmlFor:"seo-retail-locator-patterns",className:"font-bold text-[#374151]",children:"Retail Locator URL Patterns"}),i.jsx(rn,{id:"seo-retail-locator-patterns",value:v.retailLocatorPatterns,onChange:T=>b(D=>({...D,retailLocatorPatterns:T.target.value})),placeholder:`/store-locator/ 61/where-to-buy/`,className:"min-h-24 border-[#E9EBF0]"}),i.jsx("p",{className:"text-[11px] text-[#6B7280]",children:"Landing-page paths matching these patterns are classified as retail locator pages."})]}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",className:"font-bold border-[#E9EBF0]",disabled:w.isPending,onClick:()=>y(!1),children:"Cancel"}),i.jsx(ve,{className:"font-bold btn-primary",disabled:w.isPending,onClick:R,children:w.isPending?"Savingâ¦":"Save Settings"})]})]})]})})]})}function aH(){const{id:e}=qx(),[,t]=ws(),n=e?parseInt(e,10):0,{data:a,isLoading:o}=Br(),c=a?.find(y=>y.id===n),d=Kt(),{data:f,isLoading:h}=iS({clientId:n},{query:{enabled:!!n,queryKey:pi({clientId:n})}});function p(){d.invalidateQueries({queryKey:pi({clientId:n})})}return o?i.jsxs("div",{className:"p-10 text-center text-[#9CA3AF] font-bold flex items-center justify-center gap-3",children:[i.jsx(ns,{className:"w-6 h-6 animate-spin text-[#00CEA6]"})," Loading..."]}):c?i.jsxs("div",{className:"p-6 md:p-10 max-w-[1200px] mx-auto space-y-6",children:[i.jsx("div",{className:"flex items-center gap-4 -ml-1",children:i.jsxs(ve,{variant:"ghost",size:"sm",className:"text-[#9CA3AF] hover:text-[#111827]",onClick:()=>t("/admin/clients"),children:[i.jsx(Ic,{className:"w-4 h-4 mr-1"})," Clients"]})}),i.jsx("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-end gap-4 border-b border-[#E9EBF0] pb-6",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[i.jsx("div",{className:"w-10 h-10 brand-gradient rounded-lg flex items-center justify-center shadow-sm",children:i.jsx(Pa,{className:"w-5 h-5 text-white"})}),i.jsx("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827]",children:c.name})]}),i.jsx("p",{className:"text-[#9CA3AF] text-sm font-medium ml-[52px]",children:"Client Settings & Configuration"})]})}),i.jsx(nH,{client:c}),i.jsx(sH,{client:c}),i.jsxs("div",{className:"mt-8 pt-8 border-t border-[#E9EBF0]",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6",children:[i.jsx("h2",{className:"font-display font-bold text-xl text-[#111827]",children:"Design Projects"}),i.jsx(JV,{clientId:n,onSuccess:p})]}),h?i.jsxs("div",{className:"p-16 text-center text-[#9CA3AF] font-bold flex items-center justify-center gap-3",children:[i.jsx(ns,{className:"w-6 h-6 animate-spin text-[#00CEA6]"})," Loading projects..."]}):!f||f.length===0?i.jsxs("div",{className:"p-16 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#F8F9FB] border border-[#E9EBF0] flex items-center justify-center mx-auto mb-4",children:i.jsx(Pa,{className:"w-6 h-6 text-[#00CEA6]"})}),i.jsx("p",{className:"text-[#374151] font-bold",children:"No design projects yet"}),i.jsxs("p",{className:"text-[#9CA3AF] text-sm mt-1",children:['Click "Add Project" to create the first one for ',c.name,"."]})]}):i.jsx("div",{className:"space-y-6",children:f.map(y=>i.jsx(tH,{project:y,onUpdated:p,onDeleted:p},y.id))})]})]}):i.jsx("div",{className:"p-10 text-center text-destructive font-bold",children:"Client not found."})}function rH(e){return e instanceof Error?e.message.replace(/^HTTP \d+\s*[^:]*:\s*/,""):"Check that the HTML package includes one index.html file."}function iH(){const[,e]=ws(),t=Kt(),{toast:n}=pn(),{admin:a}=ma();a?.role;const o=a?.role==="manager"||a?.role==="super_admin",[c,d]=x.useState("all"),[f,h]=x.useState("all"),[p,y]=x.useState(null),[v,b]=x.useState(!1),[S,E]=x.useState(""),[w,C]=x.useState(""),[A,j]=x.useState(""),[M,R]=x.useState(""),[T,D]=x.useState(""),[F,k]=x.useState(""),[z,X]=x.useState(!1),[q,Y]=x.useState(!1),[ne,Z]=x.useState("design"),[me,L]=x.useState(""),J=x.useRef(null),ee=x.useRef(null),{uploadFile:te}=su(),{data:O,isLoading:W}=iS(void 0,{query:{queryKey:pi()}}),{data:ue}=Br(),ce=oS({mutation:{onSuccess:le=>{n({title:"Design project created"}),t.setQueryData(pi(),Re=>[le,...Re?.filter(Pe=>
61Pe.id!==le.id)??[]]),t.invalidateQueries({queryKey:pi()}),b(!1),E(""),C(""),j(""),R(""),D(""),k(""),Z("design"),L("")},onError:le=>{if(le?.status===401)n({title:"Session expired â please sign in to the admin portal again.",variant:"destructive"});else{const Pe=rH(le);L(Pe),n({title:"Couldnât create project",description:Pe,variant:"destructive"})}}}});async function ye(le){const Re=le.target.files?.[0];if(Re){X(!0);try{const Pe=await te(Re);D(Pe?.objectPath??""),n({title:"HTML file uploaded"})}catch{n({title:"Upload failed",variant:"destructive"})}finally{X(!1)}}}async function Ee(le){const Re=le.target.files?.[0];if(le.target.value="",!!Re){if(!Re.name.toLowerCase().endsWith(".zip")){n({title:"Choose a .zip file",variant:"destructive"});return}if(Re.size>25*1024*1024){n({title:"ZIP files must be 25 MB or smaller",variant:"destructive"});return}Y(!0);try{const Pe=await te(Re);if(!Pe?.objectPath)throw new Error("Upload failed");k(Pe.objectPath),n({title:"HTML folder ZIP uploaded"})}catch{n({title:"ZIP upload failed",variant:"destructive"})}finally{Y(!1)}}}function xe(){E(""),C(""),j(""),R(""),D(""),k(""),Z("design"),L(""),b(!0)}const he=x.useMemo(()=>O?O.filter(le=>!(c!=="all"&&le.clientId.toString()!==c||f!=="all"&&le.stage!==f)):[],[O,c,f]),Te=x.useMemo(()=>O?Vo.reduce((le,Re)=>(le[Re.value]=O.filter(Pe=>Pe.stage===Re.value).length,le),{}):{},[O]);return i.jsxs("div",{className:"p-6 md:p-10 max-w-[1200px] mx-auto space-y-6",children:[i.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-4",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827] flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 brand-gradient rounded-lg flex items-center justify-center shadow-sm",children:i.jsx(aC,{className:"w-6 h-6 text-white"})}),"Design Projects"]}),i.jsx("p",{className:"text-[#374151] mt-2 font-medium",children:"All design projects across every client â track progress from Design through to Push Live."})]}),i.jsxs(ve,{onClick:xe,className:"font-bold btn-primary h-10 shrink-0",children:[i.jsx(ef,{className:"w-4 h-4 mr-2"}),"New Design Project"]})]}),!W&&O&&O.length>0&&i.jsx("div",{className:"flex gap-2 flex-wrap",children:Vo.map(le=>{const Re=Te[le.value]??0;if(Re===0)return null;const Pe=f===le.value;return i.jsxs("button",{type:"button",onClick:()=>h(Pe?"all":le.value),className:`text-xs font-bold px-3 py-1.5 rounded-full border transition-colors ${Pe?"bg-[#004AAC] text-white border-[#004AAC]":"bg-[#F8F9FB] text-[#374151] border-[#E9EBF0] hover:border-[#004AAC]/40 hover:text-[#004AAC]"}`,children:[le.label," · ",Re]},le.value)})}),i.jsxs("div",{className:"flex gap-3 flex-wrap items-center",children:[i.jsxs(en,{value:c,onValueChange:d,children:[i.jsx(Ht,{className:"w-48 border-[#E9EBF0] font-bold text-sm h-9",children:i.jsx(tn,{placeholder:"All Clients"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Clients"}),ue?.map(le=>i.jsx(mt,{value:le.id.toString(),children:le.name},le.id))]})]}),i.jsxs(en,{value:f,onValueChange:h,children:[i.jsx(Ht,{className:"w-64 border-[#E9EBF0] font-bold text-sm h-9",children:i.jsx(tn,{placeholder:"All Stages"})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"all",children:"All Stages"}),Vo.map(le=>i.jsx(mt,{value:le.value,children:le.label},le.value))]})]}),(c!=="all"||f!=="all")&&i.jsx(ve,{variant:"ghost",size:"sm",className:"text-[#9CA3AF] hover:text-[#374151] font-bold",onClick:()=>{d("all"),h("all")},children:"Clear filters"}),!W&&i.jsxs("span",{className:"text-xs font-bold text-[#9CA3AF] ml-auto",children:[he.length," project",he.length!==1?"s":""]})]}),W?i.jsxs("div",{className:"p-16 text-center flex items-center justify-center gap-3 text-[#9CA3AF] font-bold",children:[i.jsx(ns,{className:"w-6 h-6 animate-spin text-[#00CEA6]"}),"Loading..."]}):he.length===0?i.jsxs("div",{className:"p-16 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#F8F9FB] border border-[#E9EBF0] flex items-center justify-center mx-auto mb-4",children:i.jsx(ER,{className:"w-6 h-6 text-[#00CEA6]"})}),i.jsx("p",{className:"text-[#374151] font-bold",children:O?.length===0?"N
61o design projects yet":"No projects match your filters"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:O?.length===0?"Create your first project to get started.":"Try clearing the filters above."}),O?.length===0&&i.jsxs(ve,{onClick:xe,className:"mt-4 font-bold btn-primary",children:[i.jsx(ef,{className:"w-4 h-4 mr-2"}),"New Design Project"]})]}):i.jsx(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:i.jsx("div",{className:"divide-y divide-[#E9EBF0]",children:he.map(le=>i.jsxs("div",{children:[i.jsxs("div",{className:"px-5 py-4 hover:bg-[#F8F9FB] transition-colors flex items-center gap-4 flex-wrap",children:[i.jsxs("div",{className:"flex items-center gap-2 w-36 shrink-0",children:[i.jsx("div",{className:"w-7 h-7 rounded-full bg-[#004AAC]/10 border border-[#004AAC]/20 flex items-center justify-center text-[#004AAC] text-[10px] font-bold font-display uppercase shrink-0",children:le.clientName.substring(0,2)}),i.jsx("span",{className:"text-xs font-bold text-[#9CA3AF] truncate",children:le.clientName})]}),i.jsx("div",{className:"flex-1 min-w-[120px]",children:i.jsx("p",{className:"font-bold text-[#111827] text-sm",children:le.name})}),i.jsx("div",{className:"flex-1 min-w-[300px]",children:i.jsx(Uy,{stage:le.stage,size:"sm"})}),i.jsxs(ve,{variant:"outline",size:"sm",className:"font-bold h-8 border-[#
61E9EBF0] text-[#374151] hover:text-[#004AAC] shrink-0","aria-expanded":p===le.id,"aria-controls":`design-preview-${le.id}`,onClick:()=>y(p===le.id?null:le.id),children:[p===le.id?i.jsx(mx,{className:"w-4 h-4 mr-1"}):i.jsx(il,{className:"w-4 h-4 mr-1"}),p===le.id?"Hide Preview":"Preview"]}),i.jsx(ve,{variant:"outline",size:"sm",className:"font-bold h-8 border-[#E9EBF0] text-[#374151] hover:text-[#004AAC] hover:border-[#004AAC]/30 shrink-0",onClick:()=>e(`/admin/clients/${le.clientId}`),children:"View Project"})]}),p===le.id&&i.jsx("div",{id:`design-preview-${le.id}`,className:"border-t border-[#E9EBF0] px-5 py-6 bg-white",children:i.jsx(y_,{project:le,audience:"admin"})})]},le.id))})}),i.jsx(Vn,{open:v,onOpenChange:b,children:i.jsxs(Rn,{className:"border-[#E9EBF0] max-w-lg max-h-[90vh] overflow-y-auto",children:[i.jsx(Fn,{children:i.jsx(Pn,{className:"font-display text-[#111827]",children:"New Design Project"})}),i.jsxs("div",{className:"space-y-4 pt-2",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Client"}),i.jsxs(en,{value:S,onValueChange:E,children:[i.jsx(Ht,{className:"border-[#E9EBF0]",children:i.jsx(tn,{placeholder:"Select a clientâ¦"})}),i.jsx(Yt,{children:ue?.map(le=>i.jsx(mt,{value:le.id.toString(),children:le.name},le.id))})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Project Name"}),i.jsx(ze,{value:w,onChange:le=>C(le.target.value),placeholder:"e.g. Brand Refresh 2025",className:"border-[#E9EBF0]"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(jt,{className:"font-bold text-[#374151]",children:"Stage"}),i.jsxs(en,{value:ne,onValueChange:Z,disabled:!o,children:[i.jsx(Ht,{className:"border-[#E9EBF0]",children:i.jsx(tn,{})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"design",children:"Design"}),i.jsx(mt,{value:"development",children:"Development"}),i.jsx(mt,{value:"push_live",children:"Push Live"})]})]}),!o&&i.jsxs("p",{className:"text-xs font-medium text-[#9CA3AF] flex items-center gap-1",children:[i.jsx(Oa,{className:"w-3 h-3"}),"New projects start in Design. Managers and super admins control client review stages."]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["Figma URL"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),i.jsx(ze,{value:A,onChange:le=>j(le.target.value),placeholder:"https://www.figma.com/file/...",className:"border-[#E9EBF0]"})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["HTML Design File"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(ve,{type:"button",variant:"outline",size:"sm",className:"font-bold border-[#E9EBF0] gap-2",disabled:z,onClick:()=>J.current?.click(),children:[z?i.jsx(ns,{className:"w-4 h-4 animate-spin"}):i.jsx(pw,{className:"w-4 h-4"}),z?"Uploadingâ¦":"Upload .html file"]}),T&&i.jsxs("span",{className:"flex items-center gap-1 text-xs text-[#00CEA6] font-bold",children:[i.jsx(bR,{className:"w-3.5 h-3.5"}),"File uploaded"]})]}),i.jsx("input",{ref:J,type:"file",accept:".html,text/html",className:"hidden",onChange:ye})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["HTML Folder ZIP"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(ve,{type:"button",variant:"outline",size:"sm",className:"font-bold border-[#E9EBF0] gap-2",disabled:q,onClick:()=>ee.current?.click(),children:[q?i.jsx(ns,{className:"w-4 h-4 animate-spin"}):i.jsx(pw,{className:"w-4 h-4"}),q?"Uploadingâ¦":"Upload HTML folder ZIP"]}),F&&i.jsxs("span",{className:"flex items-center gap-1 text-xs text-[#00CEA6] font-bold",children:[i.jsx(Tf,{className:"w-3.5 h-3.5"}),"ZIP uploaded"]})]}),i.jsx("input",{ref:ee,type:"file",accept:".zip,application/zip,application/x-zip-compressed",className:"hidden",onChange:Ee}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Upload a ZIP with index.html and its images, styles, scripts, or fonts (25 MB max)."})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs(jt,{className:"font-bold text-[#374151]",children:["Live Page URL"," ",i.jsx("span",{className:"font-normal text-[#9CA3AF]",children:"(optional)"})]}),i.jsx(ze,{value:M,onChange:le=>R(le.target.value),placeholder:"https://clientsite.com/page",className:"border-[#
61E9EBF0]"}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Staging or live URL â shown as an iframe preview to the client."})]}),me&&i.jsx("p",{role:"alert",className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm font-medium text-red-700",children:me}),i.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[i.jsx(ve,{variant:"outline",onClick:()=>b(!1),className:"font-bold border-[#E9EBF0]",children:"Cancel"}),i.jsx(ve,{onClick:()=>{L(""),ce.mutate({data:{clientId:parseInt(S,10),name:w.trim(),figmaUrl:A.trim()||null,liveUrl:M.trim()||null,htmlFileUrl:T||null,htmlZipFileUrl:F||null,stage:o?ne:"design"}})},disabled:!S||!w.trim()||ce.isPending||z||q,className:"font-bold btn-primary",children:ce.isPending?"Creatingâ¦":"Create Project"})]})]})]})})]})}var hm="Tabs",[oH]=ss(hm,[um]),v_=um(),[lH,zy]=oH(hm),b_=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:o,defaultValue:c,orientation:d="horizontal",dir:f,activationMode:h="automatic",...p}=e,y=em(f),[v,b]=ua({prop:a,onChange:o,defaultProp:c??"",caller:hm});return i.jsx(lH,{scope:n,baseId:Vs(),value:v,onValueChange:b,orientation:d,dir:y,activationMode:h,children:i.jsx(Ie.div,{dir:y,"data-orientation":d,...p,ref:t})})});b_.displayName=hm;var w_="TabsList",j_=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...o}=e,c=zy(w_,n),d=v_(n);return i.jsx(b2,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:a,children:i.jsx(Ie.div,{role:"tablist","aria-orientation":c.orientation,...o,ref:t})})});j_.displayName=w_;var N_="TabsTrigger",C_=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:o=!1,...c}=e,d=zy(N_,n),f=v_(n),h=A_(d.baseId,a),p=__(d.baseId,a),y=a===d.value;return i.jsx(w2,{asChild:!0,...f,focusable:!o,active:y,children:i.jsx(Ie.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":p,"data-state":y?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...c,ref:t,onMouseDown:be(e.onMouseDown,v=>{!o&&v.button===0&&v.ctrlKey===!1?d.onValueChange(a):v.preventDefault()}),onKeyDown:be(e.onKeyDown,v=>{[" ","Enter"].includes(v.key)&&d.onValueChange(a)}),onFocus:be(e.onFocus,()=>{const v=d.activationMode!=="manual";!y&&!o&&v&&d.onValueChange(a)})})})});C_.displayName=N_;var S_="TabsContent",E_=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:o,children:c,...d}=e,f=zy(S_,n),h=A_(f.baseId,a),p=__(f.baseId,a),y=a===f.value,v=x.useRef(y);return x.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),i.jsx(Hn,{present:o||y,children:({present:b})=>i.jsx(Ie.div,{"data-state":y?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:p,tabIndex:0,...d,ref:t,style:{...e.style,animationDuration:v.current?"0s":void 0},children:b&&c})})});E_.displayName=S_;function A_(e,t){return`${e}-trigger-${t}`}function __(e,t){return`${e}-content-${t}`}var cH=b_,k_=j_,T_=C_,M_=E_;const uH=cH,O_=x.forwardRef(({className:e,...t},n)=>i.jsx(k_,{ref:n,className:ie("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));O_.displayName=k_.displayName;const D_=x.forwardRef(({className:e,...t},n)=>i.jsx(T_,{ref:n,className:ie("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));D_.displayName=T_.displayName;const R_=x.forwardRef(({className:e,...t},n)=>i.jsx(M_,{ref:n,className:ie("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));R_.displayName=M_.displayName;function dH(e){return e.scheduledDate?Dr(e.scheduledDate):new Date(e.createdAt)}function F_({visibleMonth:e,onChange:t}){return i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs("div",{className:"flex items-center gap-1 bg-white border border-[#
61E9EBF0] rounded-md p-1 shadow-sm",children:[i.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>t(oE(e)),className:"h-8 w-8","aria-label":"Previous month",children:i.jsx(fx,{className:"w-4 h-4"})}),i.jsx("div",{className:"text-sm font-bold min-w-[130px] text-center text-[#111827]",children:Jt(e,"MMMM yyyy")}),i.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>t(iy(e,1)),className:"h-8 w-8","aria-label":"Next month",children:i.jsx(Ti,{className:"w-4 h-4"})})]})})}function fH(e){for(const t of e.platforms){const n=`caption${t.charAt(0).toUpperCase()+t.slice(1)}`;if(e[n])return e[n]}return""}function mH({posts:e,visibleMonth:t,onVisibleMonthChange:n,onOpenPost:a}){const o=x.useMemo(()=>{const d=Si(Ac(t),{weekStartsOn:1}),f=aE(sE(t),{weekStartsOn:1});return S7({start:d,end:f})},[t]),c=x.useMemo(()=>{const d=new Map;for(const f of e){if(!f.scheduledDate)continue;const h=Jt(Dr(f.scheduledDate),"yyyy-MM-dd");d.has(h)||d.set(h,[]),d.get(h).push(f)}return d},[e]);return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"flex items-center justify-between gap-3",children:i.jsx(F_,{visibleMonth:t,onChange:n})}),i.jsxs("div",{className:"rounded-xl border border-[#E9EBF0] shadow-sm overflow-hidden bg-white",children:[i.jsx("div",{className:"grid grid-cols-7 border-b border-[#E9EBF0] bg-[#F8F9FB]",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(d=>i.jsx("div",{className:"p-2.5 text-center text-xs font-bold uppercase tracking-wider text-[#9CA3AF]",children:d},d))}),i.jsx("div",{className:"grid grid-cols-7",children:o.map(d=>{const f=c.get(Jt(d,"yyyy-MM-dd"))??[],h=oy(d,t);return i.jsxs("div",{className:`border-r border-b border-[#E9EBF0] last:border-r-0 min-h-[150px] p-1.5 space-y-1.5 ${h?"bg-white":"bg-[#F8F9FB]/60"}`,children:[i.jsx("div",{className:`text-xs font-bold w-6 h-6 flex items-center justify-center rounded-full ${zg(d,new Date)?"bg-[#00CEA6] text-white":h?"text-[#111827]":"text-[#D1D5DB]"}`,children:Jt(d,"d")}),f.map(p=>{const y=p.media[0],v=fH(p);return i.jsxs(wt,{onClick:()=>a(p),className:"border border-[#E9EBF0] shadow-none hover:shadow-md hover:border-[#00CEA6]/50 transition-all cursor-pointer overflow-hidden",children:[y&&i.jsxs("div",{className:"h-12 bg-black/5 border-b border-[#E9EBF0] overflow-hidden relative",children:[y.mediaType==="video"?i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/10",children:i.jsx(za,{className:"w-4 h-4 text-white drop-shadow-md"})}):i.jsx("img",{src:`/api/client/storage${y.url}`,className:"w-full h-full object-contain",alt:""}),p.media.length>1&&i.jsxs("div",{className:"absolute top-0.5 right-0.5 bg-black/60 text-white text-[9px] font-bold px-1 py-0.5 rounded flex items-center gap-0.5",children:[i.jsx(Hc,{className:"w-2.5 h-2.5"})," ",p.media.length]})]}),i.jsxs("div",{className:"p-1.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#111827] leading-snug line-clamp-1 mb-0.5",children:p.title||"Untitled Post"}),p.scheduledTime&&i.jsx("p",{className:"text-[9px] font-bold text-[#004AAC] mb-0.5",children:lu(p.scheduledTime)}),i.jsx("p",{className:"text-[10px] text-[#374151] leading-snug line-clamp-2",children:v||i.jsx("span",{className:"italic text-[#9CA3AF]",children:"No caption yet"})})]})]},p.id)}),f.length===0&&!h&&i.jsx("div",{className:"h-8 flex items-center justify-center text-[#D1D5DB]",children:i.jsx($c,{className:"w-3.5 h-3.5 opacity-40"})})]},d.toISOString())})})]})]})}function hH(e){return e==="approved"||e==="posted"?"approved":"review"}function pH(e,t){return e.filter(n=>hH(n.status)===t)}const Iy="/api/client/storage";function P_({url:e,mediaType:t}){const n=`${Iy}${e}`;return t==="video"?i.jsx("div",{className:"w-full h-full bg-black/80 flex items-center justify-center","aria-label":"Video",children:i.jsx(za,{className:"w-6 h-6 text-white"})}):i.jsx("img",{src:n,className:"w-full h-full object-contain",alt:"Post media"})}function Zj({url:e,mediaType:t}){const n=`${Iy}${e}`;return t==="video"?i.jsx(Pc,{objectPath:e,client:!0,className:"w-full max-h-[60vh] object-contain rounded-md bg-black",controls:!0,autoPlay:!0}):i.jsx("img",{src:n,className:"w-full max-h-[60vh] object-contain rounded-md",alt:"Post media"})}const B_={facebook:"captionFacebook",instagram:"captionInstagram",tiktok:"captionTiktok",pinterest:"captionPinterest",linkedin:"captionLinkedin"};function gH({platform:e,text:t}){const[n,a]=x.useState(!1);if(!t)return i.jsx("p",{className:"text-sm text-[#9CA3AF] italic",children:"No caption yet"});async function o(){try{await navigator.clipboard.writeText(t),a(!0),setTimeout(()=>a(!1),2e3)}catch{}}return i.jsxs("div",{className:"space-y-1",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx("label",{className:"text-sm font-bold capitalize text-[#111827]",children:e==="linkedin"?"LinkedIn":e}),i.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-[10px] font-bold text-[#004AAC] hover:text-[#00CEA6] transition-colors uppercase tracking-wider",children:[n?i.jsx(Vc,{className:"w-3 h-3"}):i.jsx(cR,{className:"w-3 h-3"}),n?"Copied!":"Copy text"]})]}),i.jsx("p",{className:"text-sm text-[#374151] bg-[#F8F9FB] rounded-md p-3 whitespace-pre-wrap border border-[#
61E9EBF0]",children:t})]})}function xH({post:e,open:t,onOpenChange:n,onPostUpdated:a}){const o=Kt(),{toast:c}=pn(),[d,f]=x.useState(0),[h,p]=x.useState(e);x.useEffect(()=>{t&&(f(0),p(e))},[t,e?.id]);const{data:y,isLoading:v}=i9(e?.id??0,{query:{enabled:t&&!!e,queryKey:Ng(e?.id??0)}});function b(){o.invalidateQueries({queryKey:zo()}),e&&o.invalidateQueries({queryKey:Ng(e.id)})}const S=n9({mutation:{onSuccess:A=>{p(A),a?.(A),c({title:"Post approved"}),b()},onError:()=>c({title:"Failed to approve post",variant:"destructive"})}}),E=u9({mutation:{onSuccess:()=>{p(A=>A&&A.status==="pending"?{...A,status:"needs_revision"}:A),c({title:"Comment sent"}),b()},onError:()=>c({title:"Failed to send comment",variant:"destructive"})}});if(!h)return null;const w=h.status==="pending",C=h.media??[];return i.jsx(Vn,{open:t,onOpenChange:n,children:i.jsxs(Rn,{className:"sm:max-w-[640px] border-[#E9EBF0] max-h-[90vh] overflow-y-auto",children:[i.jsx(Fn,{children:i.jsxs(Pn,{className:"text-[#111827] font-display flex items-center justify-between gap-3 pr-6",children:[i.jsx("span",{children:h.title||"Untitled Post"}),i.jsx(Ui,{status:h.status})]})}),i.jsxs("div",{className:"space-y-4",children:[C.length>0?i.jsx("div",{className:"space-y-3",children:C.length===1?i.jsx(Zj,{url:C[0].url,mediaType:C[0].mediaType},0):i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Zj,{url:C[d].url,mediaType:C[d].mediaType}),i.jsxs("div",{className:"absolute top-2 left-2 bg-black/60 text-white text-xs font-bold px-2 py-1 rounded",children:["Slide ",d+1," of ",C.length]})]}),i.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:C.map((A,j)=>i.jsxs("button",{type:"button",onClick:()=>f(j),className:`shrink-0 flex flex-col items-center gap-1 ${j===d?"opacity-100":"opacity-60 hover:opacity-90"}`,children:[i.jsx("div",{className:`w-14 h-14 rounded-md overflow-hidden border-2 bg-black/5 ${j===d?"border-[#00CEA6]":"border-[#E9EBF0]"}`,children:i.jsx(P_,{url:A.url,mediaType:A.mediaType})}),i.jsxs("span",{className:"text-[10px] font-bold text-[#9CA3AF]",children:["Slide ",j+1]})]},j))})]})}):i.jsx("div",{className:"h-40 rounded-md border border-dashed border-[#E9EBF0] flex items-center justify-center text-[#D1D5DB]",children:i.jsx(Fa,{className:"w-8 h-8"})}),i.jsx(cu,{platforms:h.platforms}),h.priority!=="normal"&&i.jsxs("div",{className:`flex items-center gap-2 rounded-md border p-3 font-bold ${h.priority==="urgent"?"bg-[#FCEBEB] border-[#F5C2C2] text-[#A32D2D]":"bg-[#FFF4E0] border-[#F4D9A8] text-[#8A5A0B]"}`,children:[i.jsx(wx,{className:"w-4 h-4"}),h.priority==="urgent"?"Urgent review requested":"High-priority review"]}),i.jsx("div",{className:"space-y-4",children:h.platforms.map(A=>i.jsx(gH,{platform:A,text:h[B_[A]]??null},A))}),i.jsxs("div",{className:"space-y-3 pt-3 border-t border-[#E9EBF0]",children:[i.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[#9CA3AF]",children:"Comments"}),i.jsx(au,{comments:y,isLoading:v,emptyLabel:"No comments yet. Leave one below if you'd like something changed.",storageBasePath:Iy}),i.jsx(uE,{isSubmitting:E.isPending,submitLabel:w?"Send Revision":"Send Comment",onApprove:w?()=>S.mutate({id:h.id}):void 0,isApproving:S.isPending,approveLabel:"Approve",onSubmit:(A,j)=>{E.mutate({id:h.id,data:{comment:A,attachment:j}})}})]})]})]})})}function yH({post:e}){return i.jsx("div",{className:"space-y-2",children:e.platforms.map(t=>{const n=e[B_[t]];return n?i.jsxs("div",{className:"text-sm text-[#374151]",children:[i.jsxs("span",{className:"font-bold capitalize text-[#111827]",children:[t==="linkedin"?"LinkedIn":t,": "]}),n]},t):null})})}function vH(){const{data:e,isLoading:t}=X5({query:{queryKey:zo()}}),n=Kt(),{toast:a}=pn(),[o,c]=x.useState(new Set),[d,f]=x.useState(null),[h,p]=x.useState("list"),[y,v]=x.useState("review"),[b,S]=x.useState(()=>Ac(new Date)),E=x.useMemo(()=>pH(e??[],y),[e,y]),w=x.useMemo(()=>E.filter(D=>oy(dH(D),b)),[E,b]),C=x.useMemo(()=>w.filter(D=>D.status==="pending"),[w]);function A(){n.invalidateQueries({queryKey:zo()})}function j(D){n.setQueryData(zo(),F=>F?.map(k=>k.id===D.id?D:k)),f(F=>F?.id===D.id?D:F)}const M=w9({mutation:{onSuccess:D=>{a({title:`${D.approved.length} post${D.approved.length===1?"":"s"} approved`}),c(new Set),n.setQueryData(zo(),F=>{const k=new Map(D.approved.map(z=>[z.id,z]));return F?.map(z=>k.get(z.id)??z)}),A()},onError:()=>a({title:"Failed to approve posts",variant:"destructive"})}});function R(D){c(F=>{const k=new Set(F);return k.has(D)?k.delete(D):k.add(D),k})}function T(){o.size===C.length?c(new Set):c(new Set(C.map(D=>D.id)))}return x.useEffect(()=>{c(new Set)},[y,b]),t?i.jsxs("div",{className:"p-10 text-center text-[#9CA3AF] font-bold flex items-center justify-center gap-3",children:[i.jsx("div",{className:"w-6 h-6 rounded-full border-4 border-[#00CEA6] border-t-transparent animate-spin"}),"Loading posts..."]}):i.jsxs("div",{className:"space-y-5",children:[i.jsxs("div",{role:"tablist","aria-label":"Client post sections",className:"inline-flex w-full sm:w-auto rounded-lg border border-[#
61E9EBF0] bg-[#F8F9FB] p-1",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":y==="review",onClick:()=>v("review"),className:`flex-1 sm:flex-none rounded-md px-4 py-2 text-sm font-bold transition-colors ${y==="review"?"bg-white text-[#004AAC] shadow-sm":"text-[#6B7280] hover:text-[#111827]"}`,children:"For Review"}),i.jsx("button",{type:"button",role:"tab","aria-selected":y==="approved",onClick:()=>v("approved"),className:`flex-1 sm:flex-none rounded-md px-4 py-2 text-sm font-bold transition-colors ${y==="approved"?"bg-white text-[#004AAC] shadow-sm":"text-[#6B7280] hover:text-[#111827]"}`,children:"Approved Posts"})]}),i.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[h==="list"&&i.jsx(F_,{visibleMonth:b,onChange:S}),i.jsxs(en,{value:h,onValueChange:D=>p(D),children:[i.jsx(Ht,{className:"w-[160px] bg-white border-[#E9EBF0] font-bold h-10",children:i.jsx(tn,{})}),i.jsxs(Yt,{children:[i.jsx(mt,{value:"list",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(aF,{className:"w-4 h-4"})," List View"]})}),i.jsx(mt,{value:"calendar",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(dw,{className:"w-4 h-4"})," Calendar View"]})})]})]})]}),!e||e.length===0?i.jsxs("div",{className:"p-16 text-center",children:[i.jsx(Fa,{className:"w-10 h-10 mx-auto mb-3 text-[#D1D5DB]"}),i.jsx("p",{className:"text-[#374151] font-bold",children:"No posts yet"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:"Your social media content will show up here once it's ready for review."})]}):h==="calendar"?i.jsxs("div",{className:"space-y-4",children:[w.length===0&&i.jsxs("div",{className:"rounded-xl border border-dashed border-[#E9EBF0] bg-[#F8F9FB] p-5 text-center",children:[i.jsx("p",{className:"text-[#374151] font-bold",children:y==="review"?"No posts awaiting review":"No approved posts this month"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:y==="review"?`You're all caught up for ${Jt(b,"MMMM yyyy")}.`:`Posts you approve for ${Jt(b,"MMMM yyyy")} will appear here.`})]}),i.jsx(mH,{posts:E,visibleMonth:b,onVisibleMonthChange:S,onOpenPost:D=>f(D)})]}):i.jsxs(i.Fragment,{children:[C.length>0&&i.jsx(wt,{className:"border-[#E9EBF0] bg-[#F8F9FB]",children:i.jsxs(Dn,{className:"p-4 flex items-center justify-between gap-3 flex-wrap",children:[i.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[i.jsx(Ua,{checked:o.size>0&&o.size===C.length,onCheckedChange:T}),i.jsxs("span",{className:"text-sm font-bold text-[#374151]",children:["Select All (",C.length," awaiting approval)"]})]}),i.jsxs(ve,{disabled:o.size===0||M.isPending,onClick:()=>M.mutate({data:{ids:Array.from(o)}}),className:"font-bold btn-primary h-10",children:[i.jsx(Ho,{className:"w-4 h-4 mr-2"}),M.isPending?"Approving...":`Approve Selected${o.size>0?` (${o.size})`:""}`]})]})}),w.length===0?i.jsxs("div",{className:"p-16 text-center",children:[i.jsx(Fa,{className:"w-10 h-10 mx-auto mb-3 text-[#D1D5DB]"}),i.jsx("p",{className:"text-[#374151] font-bold",children:y==="review"?"No posts awaiting review":"No approved posts this month"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:y==="review"?`You're all caught up for ${Jt(b,"MMMM yyyy")}.`:`Posts you approve for ${Jt(b,"MMMM yyyy")} will appear here.`})]}):i.jsx("div",{className:"space-y-4",children:w.map(D=>{const F=D.status==="pending",k=D.media??[];return i.jsx(wt,{className:"border-[#E9EBF0] shadow-[0_2px_10px_rgba(0,0,0,0.02)]",children:i.jsxs(Dn,{className:"p-5 flex flex-col md:flex-row gap-5",children:[F&&i.jsx("div",{className:"pt-1",children:i.jsx(Ua,{checked:o.has(D.id),onCheckedChange:()=>R(D.id)})}),i.jsx("div",{className:"flex gap-2 shrink-0 overflow-x-auto md:w-48",children:k.length>0?k.slice(0,3).map((z,X)=>i.jsxs("div",{className:"relative w-20 h-20 md:w-full md:h-24 rounded-md overflow-hidden border border-[#E9EBF0] shrink-0 bg-black/5",children:[i.jsx(P_,{url:z.url,mediaType:z.mediaType}),k.length>1&&i.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 py-0.5 text-center",children:i.jsxs("span",{className:"text-[9px] font-bold text-white",children:["Slide ",X+1]})}),X===2&&k.length>3&&i.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:i.jsxs("span",{className:"text-white font-bold text-sm",children:["+",k.length-3]})})]},X)):i.jsx("div",{className:"w-20 h-20 md:w-full md:h-24 rounded-md border border-dashed border-[#
61E9EBF0] flex items-center justify-center text-[#D1D5DB] shrink-0",children:i.jsx(Fa,{className:"w-6 h-6"})})}),i.jsxs("div",{className:"flex-1 min-w-0 space-y-3",children:[i.jsx("div",{className:"font-bold text-[#111827] text-base",children:D.title||"Untitled Post"}),i.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[i.jsx(cu,{platforms:D.platforms}),i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[D.scheduledDate&&i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-bold text-[#374151]",children:[i.jsx(dw,{className:"w-3.5 h-3.5 text-[#9CA3AF]"}),Jt(Dr(D.scheduledDate),"MMM d, yyyy"),D.scheduledTime&&` ${lu(D.scheduledTime)}`]}),i.jsx(Ui,{status:D.status}),D.priority!=="normal"&&i.jsxs("span",{className:`inline-flex items-center gap-1 text-[10px] font-bold px-2 py-0.5 rounded-full border ${D.priority==="urgent"?"bg-[#FCEBEB] text-[#A32D2D] border-[#F5C2C2]":"bg-[#FFF4E0] text-[#8A5A0B] border-[#F4D9A8]"}`,children:[i.jsx(wx,{className:"w-3 h-3"}),D.priority==="urgent"?"Urgent":"High Priority"]}),(D.unreadCommentCount??0)>0&&i.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold bg-[#DBEAFE] text-[#1E40AF] px-2 py-0.5 rounded-full border border-[#BFDBFE] animate-pulse",children:"ð¬ New comment"}),i.jsxs(ve,{size:"sm",variant:"outline",onClick:()=>
61f(D),className:"font-bold h-8 border-[#E9EBF0] text-[#374151]",children:[i.jsx(eC,{className:"w-3.5 h-3.5 mr-1.5"}),"View"]})]})]}),i.jsx(yH,{post:D})]})]})},D.id)})})]}),i.jsx(xH,{post:d,open:d!==null,onOpenChange:D=>!D&&f(null),onPostUpdated:j})]})}const q_="/api/client/storage";function bH({project:e,canApprove:t,onApprove:n,isApproving:a}){const o=Kt(),{toast:c}=pn(),{data:d,isLoading:f}=e8(e.id,{query:{queryKey:Sg(e.id)}}),h=a8({mutation:{onSuccess:()=>{c({title:"Comment sent"}),o.invalidateQueries({queryKey:Sg(e.id)})},onError:()=>c({title:"Failed to send comment",variant:"destructive"})}});return i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{className:"text-xs font-bold text-[#9CA3AF] uppercase tracking-wider flex items-center gap-1.5",children:[i.jsx(Yc,{className:"w-3.5 h-3.5"}),"Comments"]}),i.jsx(au,{comments:d,isLoading:f,emptyLabel:"No comments yet. Leave one below if you have feedback.",hideDirectionTag:!0,storageBasePath:q_}),i.jsx(uE,{isSubmitting:h.isPending,onSubmit:(p,y)=>{h.mutate({id:e.id,data:{comment:p,attachment:y}})},submitLabel:"Send Revision",onApprove:t?n:void 0,isApproving:a,approveLabel:"Approve Design"})]})}function wH({url:e}){return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(tC,{className:"w-4 h-4 text-[#004AAC]"}),i.jsx("span",{className:"text-xs font-bold text-[#374151] uppercase tracking-wider",children:"Live Page Preview"}),i.jsxs("a",{href:e,target:"_blank",rel:"noreferrer",className:"ml-auto flex items-center gap-1 text-xs font-bold text-[#004AAC] hover:text-[#00CEA6] transition-colors",children:[i.jsx(gx,{className:"w-3 h-3"}),"Visit Page"]})]}),i.jsx("div",{className:"w-full rounded-lg overflow-hidden border border-[#E9EBF0] bg-[#F8F9FB]",style:{height:420},children:i.jsx("iframe",{src:e,className:"w-full h-full",title:"Live page preview",sandbox:"allow-scripts allow-same-origin allow-forms"})})]})}const jf=1280,Nf=900;function jH({storageUrl:e}){const t=`${q_}${e}`,n=x.useRef(null),[a,o]=x.useState(1);x.useEffect(()=>{const d=n.current;if(!d)return;const f=new ResizeObserver(([h])=>{const p=h.contentRect.width;p>0&&o(p/jf)});return f.observe(d),()=>f.disconnect()},[]);const c=Nf*a;return i.jsx("div",{ref:n,className:"w-full rounded-lg overflow-hidden border border-[#E9EBF0] bg-[#F8F9FB]",style:{height:c},children:i.jsx("iframe",{src:t,title:"HTML design preview",sandbox:"allow-scripts allow-same-origin",style:{width:jf,height:Nf,transform:`scale(${a})`,transformOrigin:"top left",border:"none"}})})}function NH({projectId:e}){const t=`/api/client/design-projects/${e}/html-package/index.html`,n=x.useRef(null),[a,o]=x.useState(1);return x.useEffect(()=>{const c=n.current;if(!c)return;const d=new ResizeObserver(([f])=>{const h=f.contentRect.width;h>0&&o(h/jf)});return d.observe(c),()=>d.disconnect()},[]),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Tf,{className:"w-4 h-4 text-[#00CEA6]"}),i.jsx("span",{className:"text-xs font-bold text-[#374151] uppercase tracking-wider",children:"HTML Folder Preview"})]}),i.jsx("div",{ref:n,className:"w-full rounded-lg overflow-hidden border border-[#E9EBF0] bg-[#F8F9FB]",style:{height:Nf*a},children:i.jsx("iframe",{src:t,title:"HTML folder preview",sandbox:"allow-scripts",style:{width:jf,height:Nf,transform:`scale(${a})`,transformOrigin:"top left",border:"none"}})})]})}function CH({project:e}){const t=!e.clientApprovedAt&&(e.stage==="figma_review"||e.stage==="development"),[n,a]=x.useState(t);x.useEffect(()=>{t&&a(!0)},[t]);const o=Kt(),{toast:c}=pn(),d=Q9({mutation:{onSuccess:()=>{c({title:"Design approved! Your team has been notified."}),o.invalidateQueries({queryKey:Vx()})},onError:()=>c({title:"Failed to approve design",variant:"destructive"})}});return i.jsxs(wt,{className:"border-[#E9EBF0] shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 bg-[#F8F9FB] border-b border-[#E9EBF0] space-y-3",children:[i.jsx("h3",{className:"font-bold text-[#111827] text-base",children:e.name}),i.jsx(Uy,{stage:e.stage,timestamps:{designApprovedAt:e.designApprovedAt,developmentAt:e.developmentAt,pushLiveAt:e.pushLiveAt}})]}),i.jsxs(Dn,{className:"p-5 space-y-6",children:[e.clientApprovedAt&&i.jsxs("div",{className:"rounded-xl border border-[#A7F3D0] bg-[#E3F7F2] px-4 py-3 flex items-center gap-2",children:[i.jsx(Ho,{className:"w-4 h-4 text-[#00CEA6] shrink-0"}),i.jsx("p",{className:"text-sm font-bold text-[#00CEA6]",children:"You approved this design â your team has been notified."})]}),e.figmaUrl&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xs font-bold text-[#9CA3AF] uppercase tracking-wider",children:"Design Preview"}),i.jsx(x_,{figmaUrl:e.figmaUrl,height:420})]}),e.htmlFileUrl&&i.jsx(jH,{storageUrl:e.htmlFileUrl}),e.htmlZipFileUrl&&i.jsx(NH,{projectId:e.id}),e.liveUrl&&i.jsx(wH,{url:e.liveUrl}),!e.figmaUrl&&!e.htmlFileUrl&&!e.htmlZipFileUrl&&!e.liveUrl&&i.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 bg-[#F8F9FB] border-2 border-dashed border-[#
61E9EBF0] rounded-lg py-12",children:[i.jsx(Pa,{className:"w-8 h-8 text-[#D1D5DB]"}),i.jsx("p",{className:"text-sm font-bold text-[#9CA3AF]",children:"Design files coming soon"}),i.jsx("p",{className:"text-xs text-[#9CA3AF]",children:"Your team will link the design here once it's ready."})]}),i.jsxs("div",{className:"border-t border-[#E9EBF0] pt-4 space-y-3",children:[i.jsxs("button",{type:"button",onClick:()=>a(f=>!f),className:"flex items-center gap-2 text-sm font-bold text-[#374151] hover:text-[#004AAC] transition-colors w-full",children:[i.jsx(Yc,{className:"w-4 h-4 text-[#9CA3AF]"}),"Feedback & Comments",n?i.jsx(mx,{className:"w-4 h-4 ml-auto text-[#9CA3AF]"}):i.jsx(il,{className:"w-4 h-4 ml-auto text-[#9CA3AF]"})]}),n&&i.jsx(bH,{project:e,canApprove:t,onApprove:()=>d.mutate({id:e.id}),isApproving:d.isPending})]})]})]})}function SH(){const{data:e,isLoading:t}=Y9({query:{queryKey:Vx(),refetchInterval:5e3,refetchOnMount:"always",refetchOnWindowFocus:!0}});return t?i.jsxs("div",{className:"p-16 text-center text-[#9CA3AF] font-bold flex items-center justify-center gap-3",children:[i.jsx(ns,{className:"w-6 h-6 rounded-full border-4 border-[#00CEA6] border-t-transparent animate-spin"}),"Loading..."]}):!e||e.length===0?i.jsxs("div",{className:"p-16 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#F8F9FB] border border-[#E9EBF0] flex items-center justify-center mx-auto mb-4",children:i.jsx(Pa,{className:"w-6 h-6 text-[#00CEA6]"})}),i.jsx("p",{className:"text-[#374151] font-bold",children:"No design projects yet"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:"Your design work will appear here once your team has set it up."})]}):i.jsx("div",{className:"space-y-6",children:e.map(n=>i.jsx(CH,{project:n},n.id))})}function Id({label:e}){return i.jsxs("div",{className:"p-16 text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#F8F9FB] border border-[#E9EBF0] flex items-center justify-center mx-auto mb-4",children:i.jsx(xF,{className:"w-6 h-6 text-[#00CEA6]"})}),i.jsxs("p",{className:"text-[#374151] font-bold",children:[e," is coming soon"]}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:"We're building this out -- check back shortly."})]})}const EH=[{value:"social_media",label:"Social Media",icon:vx},{value:"design",label:"Design",icon:Pa},{value:"content",label:"Content",icon:yx},{value:"web_dev",label:"Web Dev",icon:px},{value:"seo",label:"SEO",icon:Tc},{value:"email_sms",label:"Email / SMS",icon:xi}];function AH(){const{client:e}=zf(),t=x.useMemo(()=>EH.filter(o=>e?.departments.includes(o.value)),[e]),[n,a]=x.useState(t[0]?.value??"social_media");return e?t.length===0?i.jsxs("div",{className:"p-16 text-center max-w-lg mx-auto",children:[i.jsx("p",{className:"text-[#374151] font-bold",children:"No services assigned yet"}),i.jsx("p",{className:"text-[#9CA3AF] text-sm mt-1",children:"Your account isn't enrolled in any departments yet. Reach out to your Growth Shark contact to get set up."})]}):i.jsxs("div",{className:"p-6 md:p-10 max-w-[1100px] mx-auto space-y-6",children:[i.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"text-3xl font-bold font-display tracking-tight text-[#111827]",children:["Welcome Back ",(e.contactName||e.name).split(" ")[0]," ð"]}),i.jsx("p",{className:"text-[#374151] mt-1 font-medium",children:"Review and manage your content below."})]}),(e.name==="Pioneer Sugar"||e.name==="Allergy Free Bakery")&&i.jsx(ve,{asChild:!0,className:"h-10 px-[18px] text-[15px] font-semibold text-white shadow-sm self-start sm:self-center bg-gradient-to-r from-[#7458E8] to-[#3F7CF3] hover:from-[#684DDB] hover:to-[#3470E8]",children:i.jsxs("a",{href:"/reportngjkdhaJHjhjkakjcdqwukjmnsa/?client-reporting=1",children:[i.jsx(QN,{className:"mr-2 h-[18px] w-[18px]"}),"Reporting Dashboard"]})})]}),i.jsxs(uH,{value:n,onValueChange:a,children:[i.jsx(O_,{className:"bg-[#F8F9FB] border border-[#E9EBF0] h-11 p-1",children:t.map(o=>i.jsxs(D_,{value:o.value,className:"font-bold gap-2 data-[state=active]:text-[#004AAC]",children:[i.jsx(o.icon,{className:"w-4 h-4"}),o.label]},o.value))}),t.map(o=>i.jsxs(R_,{value:o.value,className:"pt-6",children:[o.value==="social_media"&&i.jsx(vH,{}),o.value==="design"&&i.jsx(SH,{}),o.value==="content"&&i.jsx(Id,{label:"Content"}),o.value==="web_dev"&&i.jsx(Id,{label:"Web Dev"}),o.value==="seo"&&i.jsx(Id,{label:"SEO"}),o.value==="email_sms"&&i.jsx(Id,{label:"Email / SMS"})]},o.value))]})]}):null}function _H(){const{data:e,error:t,isPending:n,isFetching:a,refetch:o}=oP(),c=e?.checks.filter(d=>d.status==="fail").length??0;return i.jsxs("div",{className:"mx-auto w-full max-w-6xl space-y-6 p-4 sm:p-6 lg:p-10",children:[i.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-bold text-[#004AAC]",children:[i.jsx(bx,{className:"h-4 w-4 text-[#00A987]"}),"Super-admin diagnostics"]}),i.jsx("h1",{className:"font-display text-3xl font-bold tracking-tight text-[#111827]",children:"System Health"}),i.jsx("p",{className:"mt-2 max-w-2xl text-sm font-medium leading-6 text-[#5F6B7A]",children:"Check the approval portalâs critical workflows before clients run into a problem. These
61checks cover the items below, not every possible visual or business-logic bug."})]}),i.jsxs(ve,{type:"button",onClick:()=>o(),disabled:a,className:"h-11 shrink-0 bg-[#004AAC] px-5 font-bold text-white hover:bg-[#003D8F]",children:[i.jsx(hw,{className:`mr-2 h-4 w-4 ${a?"animate-spin":""}`}),a?"Running checksâ¦":"Run checks again"]})]}),n?i.jsx("div",{className:"rounded-2xl border border-[#E9EBF0] bg-white p-8 shadow-sm",children:i.jsxs("div",{className:"flex items-center gap-3 font-bold text-[#374151]",children:[i.jsx(hw,{className:"h-5 w-5 animate-spin text-[#00A987]"}),"Checking critical workflowsâ¦"]})}):t||!e?i.jsx("div",{className:"rounded-2xl border border-red-200 bg-red-50 p-6",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(wx,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600"}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-bold text-red-900",children:"Check unavailable"}),i.jsx("p",{className:"mt-1 text-sm font-medium text-red-700",children:"The diagnostics service could not be reached. Try again, then review the server logs if the problem continues."})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`rounded-2xl border p-6 shadow-sm ${e.status==="operational"?"border-emerald-200 bg-emerald-50":"border-red-200 bg-red-50"}`,children:i.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[e.status==="operational"?i.jsx(Ho,{className:"mt-0.5 h-6 w-6 shrink-0 text-emerald-600"}):i.jsx(fw,{className:"mt-0.5 h-6 w-6 shrink-0 text-red-600"}),i.jsxs("div",{children:[i.jsx("h2",{className:`text-lg font-bold ${e.status==="operational"?"text-emerald-950":"text-red-950"}`,children:e.status==="operational"?"All monitored systems operational":`${c} ${c===1?"issue":"issues"} detected`}),i.jsx("p",{className:`mt-1 text-sm font-medium ${e.status==="operational"?"text-emerald-700":"text-red-700"}`,children:e.status==="operational"?"Every critical workflow check below passed.":"Review the failed checks below before clients use the affected workflows."})]})]}),i.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold text-[#5F6B7A]",children:[i.jsx(aR,{className:"h-4 w-4"}),"Checked ",new Date(e.checkedAt).toLocaleString()]})]})}),i.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.checks.map(d=>{const f=d.status==="pass";return i.jsx("article",{className:`rounded-2xl border bg-white p-5 shadow-sm ${f?"border-[#E9EBF0]":"border-red-200"}`,children:i.jsxs("div",{className:"flex items-start gap-3",children:[f?i.jsx(Ho,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-600"}):i.jsx(fw,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsx("h3",{className:"font-bold text-[#111827]",children:d.label}),i.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] font-extrabold uppercase tracking-wide ${f?"bg-emerald-50 text-emerald-700":"bg-red-50 text-red-700"}`,children:f?"Passed":"Failed"})]}),i.jsx("p",{className:"mt-2 text-sm font-medium leading-5 text-[#374151]",children:d.detail}),i.jsxs("p",{className:"mt-3 text-xs font-medium leading-5 text-[#7A8594]",children:[i.jsx("span",{className:"font-bold",children:"If this fails:"})," ",d.userImpact]}),i.jsxs("p",{className:"mt-3 text-[11px] font-bold text-[#9CA3AF]",children:["Completed in ",d.durationMs," ms"]})]})]})},d.key)})})]})]})}const kH=new MM;function TH(){return i.jsxs(I3,{children:[i.jsx(Un,{path:"/",component:pB}),i.jsx(Un,{path:"/admin-login-hasgduh73265s",component:p7}),i.jsx(Un,{path:"/client-login",component:x7}),i.jsx(Un,{path:"/admin",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(vL,{})})})}),i.jsx(Un,{path:"/admin/calendar",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(qI,{})})})}),i.jsx(Un,{path:"/admin/strategy",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(ZI,{})})})}),i.jsx(Un,{path:"/admin/post-details",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(i$,{})})})}),i.jsx(Un,{path:"/admin/posts/new",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(u$,{})})})}),i.jsx(Un,{path:"/admin/posts/:id",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(d$,{})})})}),i.jsx(Un,{path:"/admin/team",children:i.jsx(Bs,{requireSuperAdmin:!0,children:i.jsx(qs,{children:i.jsx($V,{})})})}),i.jsx(Un,{path:"/admin/system-health",children:i.jsx(Bs,{requireSuperAdmin:!0,children:i.jsx(qs,{children:i.jsx(_H,{})})})}),i.jsx(Un,{path:"/admin/design",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(iH,{})})})}),i.jsx(Un,{path:"/admin/clients/:id",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(aH,{})})})}),i.jsx(Un,{path:"/admin/clients",children:i.jsx(Bs,{children:i.jsx(qs,{children:i.jsx(KV,{})})})}),i.jsx(Un,{path:"/dashboard",children:i.jsx(f6,{children:i.jsx(hB,{children:i.jsx(AH,{})})})}),i.jsx(Un,{component:v3})]})}function MH(){return i.jsx(OM,{client:kH,children:i.jsx(GC,{base:"/".replace(/\/$/,""),children:i.jsx(u6,{children:i.jsx(d6,{children:i.jsxs(p3,{children:[i.jsx(TH,{}),i.jsx(PF,{})]})})})})})}rM.createRoot(document.getElementById("root")).render(i.jsx(MH,{}));
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.