@gallop.software/studio 2.3.149 → 2.3.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,94 @@
1
+ function ng(i,s){for(var f=0;f<s.length;f++){const d=s[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in i)){const m=Object.getOwnPropertyDescriptor(d,h);m&&Object.defineProperty(i,h,m.get?m:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const C of m.addedNodes)C.tagName==="LINK"&&C.rel==="modulepreload"&&d(C)}).observe(document,{childList:!0,subtree:!0});function f(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function d(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function ag(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fc={exports:{}},ni={};var tp;function lg(){if(tp)return ni;tp=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(d,h,m){var C=null;if(m!==void 0&&(C=""+m),h.key!==void 0&&(C=""+h.key),"key"in h){m={};for(var D in h)D!=="key"&&(m[D]=h[D])}else m=h;return h=m.ref,{$$typeof:i,type:d,key:C,ref:h!==void 0?h:null,props:m}}return ni.Fragment=s,ni.jsx=f,ni.jsxs=f,ni}var np;function og(){return np||(np=1,Fc.exports=lg()),Fc.exports}var ii=og(),Jc={exports:{}},qe={};var ap;function ig(){if(ap)return qe;ap=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),B=Symbol.iterator;function q(x){return x===null||typeof x!="object"?null:(x=B&&x[B]||x["@@iterator"],typeof x=="function"?x:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,re={};function K(x,_,P){this.props=x,this.context=_,this.refs=re,this.updater=P||H}K.prototype.isReactComponent={},K.prototype.setState=function(x,_){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,_,"setState")},K.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function ue(){}ue.prototype=K.prototype;function oe(x,_,P){this.props=x,this.context=_,this.refs=re,this.updater=P||H}var fe=oe.prototype=new ue;fe.constructor=oe,Y(fe,K.prototype),fe.isPureReactComponent=!0;var X=Array.isArray;function I(){}var W={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function U(x,_,P){var ae=P.ref;return{$$typeof:i,type:x,key:_,ref:ae!==void 0?ae:null,props:P}}function Q(x,_){return U(x.type,_,x.props)}function he(x){return typeof x=="object"&&x!==null&&x.$$typeof===i}function me(x){var _={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(P){return _[P]})}var ge=/\/+/g;function le(x,_){return typeof x=="object"&&x!==null&&x.key!=null?me(""+x.key):_.toString(36)}function Ee(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(I,I):(x.status="pending",x.then(function(_){x.status==="pending"&&(x.status="fulfilled",x.value=_)},function(_){x.status==="pending"&&(x.status="rejected",x.reason=_)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function E(x,_,P,ae,we){var Ae=typeof x;(Ae==="undefined"||Ae==="boolean")&&(x=null);var Ye=!1;if(x===null)Ye=!0;else switch(Ae){case"bigint":case"string":case"number":Ye=!0;break;case"object":switch(x.$$typeof){case i:case s:Ye=!0;break;case T:return Ye=x._init,E(Ye(x._payload),_,P,ae,we)}}if(Ye)return we=we(x),Ye=ae===""?"."+le(x,0):ae,X(we)?(P="",Ye!=null&&(P=Ye.replace(ge,"$&/")+"/"),E(we,_,P,"",function(Kt){return Kt})):we!=null&&(he(we)&&(we=Q(we,P+(we.key==null||x&&x.key===we.key?"":(""+we.key).replace(ge,"$&/")+"/")+Ye)),_.push(we)),1;Ye=0;var bt=ae===""?".":ae+":";if(X(x))for(var Oe=0;Oe<x.length;Oe++)ae=x[Oe],Ae=bt+le(ae,Oe),Ye+=E(ae,_,P,Ae,we);else if(Oe=q(x),typeof Oe=="function")for(x=Oe.call(x),Oe=0;!(ae=x.next()).done;)ae=ae.value,Ae=bt+le(ae,Oe++),Ye+=E(ae,_,P,Ae,we);else if(Ae==="object"){if(typeof x.then=="function")return E(Ee(x),_,P,ae,we);throw _=String(x),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return Ye}function F(x,_,P){if(x==null)return x;var ae=[],we=0;return E(x,ae,"","",function(Ae){return _.call(P,Ae,we++)}),ae}function $(x){if(x._status===-1){var _=x._result;_=_(),_.then(function(P){(x._status===0||x._status===-1)&&(x._status=1,x._result=P)},function(P){(x._status===0||x._status===-1)&&(x._status=2,x._result=P)}),x._status===-1&&(x._status=0,x._result=_)}if(x._status===1)return x._result.default;throw x._result}var ze=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},Ue={map:F,forEach:function(x,_,P){F(x,function(){_.apply(this,arguments)},P)},count:function(x){var _=0;return F(x,function(){_++}),_},toArray:function(x){return F(x,function(_){return _})||[]},only:function(x){if(!he(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return qe.Activity=z,qe.Children=Ue,qe.Component=K,qe.Fragment=f,qe.Profiler=h,qe.PureComponent=oe,qe.StrictMode=d,qe.Suspense=w,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,qe.__COMPILER_RUNTIME={__proto__:null,c:function(x){return W.H.useMemoCache(x)}},qe.cache=function(x){return function(){return x.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(x,_,P){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var ae=Y({},x.props),we=x.key;if(_!=null)for(Ae in _.key!==void 0&&(we=""+_.key),_)!ne.call(_,Ae)||Ae==="key"||Ae==="__self"||Ae==="__source"||Ae==="ref"&&_.ref===void 0||(ae[Ae]=_[Ae]);var Ae=arguments.length-2;if(Ae===1)ae.children=P;else if(1<Ae){for(var Ye=Array(Ae),bt=0;bt<Ae;bt++)Ye[bt]=arguments[bt+2];ae.children=Ye}return U(x.type,we,ae)},qe.createContext=function(x){return x={$$typeof:C,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:m,_context:x},x},qe.createElement=function(x,_,P){var ae,we={},Ae=null;if(_!=null)for(ae in _.key!==void 0&&(Ae=""+_.key),_)ne.call(_,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(we[ae]=_[ae]);var Ye=arguments.length-2;if(Ye===1)we.children=P;else if(1<Ye){for(var bt=Array(Ye),Oe=0;Oe<Ye;Oe++)bt[Oe]=arguments[Oe+2];we.children=bt}if(x&&x.defaultProps)for(ae in Ye=x.defaultProps,Ye)we[ae]===void 0&&(we[ae]=Ye[ae]);return U(x,Ae,we)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(x){return{$$typeof:D,render:x}},qe.isValidElement=he,qe.lazy=function(x){return{$$typeof:T,_payload:{_status:-1,_result:x},_init:$}},qe.memo=function(x,_){return{$$typeof:g,type:x,compare:_===void 0?null:_}},qe.startTransition=function(x){var _=W.T,P={};W.T=P;try{var ae=x(),we=W.S;we!==null&&we(P,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(I,ze)}catch(Ae){ze(Ae)}finally{_!==null&&P.types!==null&&(_.types=P.types),W.T=_}},qe.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},qe.use=function(x){return W.H.use(x)},qe.useActionState=function(x,_,P){return W.H.useActionState(x,_,P)},qe.useCallback=function(x,_){return W.H.useCallback(x,_)},qe.useContext=function(x){return W.H.useContext(x)},qe.useDebugValue=function(){},qe.useDeferredValue=function(x,_){return W.H.useDeferredValue(x,_)},qe.useEffect=function(x,_){return W.H.useEffect(x,_)},qe.useEffectEvent=function(x){return W.H.useEffectEvent(x)},qe.useId=function(){return W.H.useId()},qe.useImperativeHandle=function(x,_,P){return W.H.useImperativeHandle(x,_,P)},qe.useInsertionEffect=function(x,_){return W.H.useInsertionEffect(x,_)},qe.useLayoutEffect=function(x,_){return W.H.useLayoutEffect(x,_)},qe.useMemo=function(x,_){return W.H.useMemo(x,_)},qe.useOptimistic=function(x,_){return W.H.useOptimistic(x,_)},qe.useReducer=function(x,_,P){return W.H.useReducer(x,_,P)},qe.useRef=function(x){return W.H.useRef(x)},qe.useState=function(x){return W.H.useState(x)},qe.useSyncExternalStore=function(x,_,P){return W.H.useSyncExternalStore(x,_,P)},qe.useTransition=function(){return W.H.useTransition()},qe.version="19.2.4",qe}var lp;function su(){return lp||(lp=1,Jc.exports=ig()),Jc.exports}var v=su();const dt=ag(v),op=ng({__proto__:null,default:dt},[v]);function rg(i){if(i.sheet)return i.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===i)return document.styleSheets[s]}function sg(i){var s=document.createElement("style");return s.setAttribute("data-emotion",i.key),i.nonce!==void 0&&s.setAttribute("nonce",i.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var cg=(function(){function i(f){var d=this;this._insertTag=function(h){var m;d.tags.length===0?d.insertionPoint?m=d.insertionPoint.nextSibling:d.prepend?m=d.container.firstChild:m=d.before:m=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,m),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var s=i.prototype;return s.hydrate=function(d){d.forEach(this._insertTag)},s.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sg(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=rg(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},s.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},i})(),nn="-ms-",_r="-moz-",rt="-webkit-",Tp="comm",cu="rule",uu="decl",ug="@import",Rp="@keyframes",dg="@layer",fg=Math.abs,Hr=String.fromCharCode,hg=Object.assign;function pg(i,s){return en(i,0)^45?(((s<<2^en(i,0))<<2^en(i,1))<<2^en(i,2))<<2^en(i,3):0}function Lp(i){return i.trim()}function mg(i,s){return(i=s.exec(i))?i[0]:i}function st(i,s,f){return i.replace(s,f)}function ou(i,s){return i.indexOf(s)}function en(i,s){return i.charCodeAt(s)|0}function ri(i,s,f){return i.slice(s,f)}function Zn(i){return i.length}function du(i){return i.length}function Ar(i,s){return s.push(i),i}function gg(i,s){return i.map(s).join("")}var Br=1,lo=1,_p=0,hn=0,Vt=0,io="";function Ur(i,s,f,d,h,m,C){return{value:i,root:s,parent:f,type:d,props:h,children:m,line:Br,column:lo,length:C,return:""}}function ai(i,s){return hg(Ur("",null,null,"",null,null,0),i,{length:-i.length},s)}function yg(){return Vt}function bg(){return Vt=hn>0?en(io,--hn):0,lo--,Vt===10&&(lo=1,Br--),Vt}function wn(){return Vt=hn<_p?en(io,hn++):0,lo++,Vt===10&&(lo=1,Br++),Vt}function Jn(){return en(io,hn)}function Tr(){return hn}function ui(i,s){return ri(io,i,s)}function si(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Op(i){return Br=lo=1,_p=Zn(io=i),hn=0,[]}function Hp(i){return io="",i}function Rr(i){return Lp(ui(hn-1,iu(i===91?i+2:i===40?i+1:i)))}function vg(i){for(;(Vt=Jn())&&Vt<33;)wn();return si(i)>2||si(Vt)>3?"":" "}function xg(i,s){for(;--s&&wn()&&!(Vt<48||Vt>102||Vt>57&&Vt<65||Vt>70&&Vt<97););return ui(i,Tr()+(s<6&&Jn()==32&&wn()==32))}function iu(i){for(;wn();)switch(Vt){case i:return hn;case 34:case 39:i!==34&&i!==39&&iu(Vt);break;case 40:i===41&&iu(i);break;case 92:wn();break}return hn}function Sg(i,s){for(;wn()&&i+Vt!==57;)if(i+Vt===84&&Jn()===47)break;return"/*"+ui(s,hn-1)+"*"+Hr(i===47?i:wn())}function wg(i){for(;!si(Jn());)wn();return ui(i,hn)}function Cg(i){return Hp(Lr("",null,null,null,[""],i=Op(i),0,[0],i))}function Lr(i,s,f,d,h,m,C,D,w){for(var g=0,T=0,z=C,B=0,q=0,H=0,Y=1,re=1,K=1,ue=0,oe="",fe=h,X=m,I=d,W=oe;re;)switch(H=ue,ue=wn()){case 40:if(H!=108&&en(W,z-1)==58){ou(W+=st(Rr(ue),"&","&\f"),"&\f")!=-1&&(K=-1);break}case 34:case 39:case 91:W+=Rr(ue);break;case 9:case 10:case 13:case 32:W+=vg(H);break;case 92:W+=xg(Tr()-1,7);continue;case 47:switch(Jn()){case 42:case 47:Ar(kg(Sg(wn(),Tr()),s,f),w);break;default:W+="/"}break;case 123*Y:D[g++]=Zn(W)*K;case 125*Y:case 59:case 0:switch(ue){case 0:case 125:re=0;case 59+T:K==-1&&(W=st(W,/\f/g,"")),q>0&&Zn(W)-z&&Ar(q>32?rp(W+";",d,f,z-1):rp(st(W," ","")+";",d,f,z-2),w);break;case 59:W+=";";default:if(Ar(I=ip(W,s,f,g,T,h,D,oe,fe=[],X=[],z),m),ue===123)if(T===0)Lr(W,s,I,I,fe,m,z,D,X);else switch(B===99&&en(W,3)===110?100:B){case 100:case 108:case 109:case 115:Lr(i,I,I,d&&Ar(ip(i,I,I,0,0,h,D,oe,h,fe=[],z),X),h,X,z,D,d?fe:X);break;default:Lr(W,I,I,I,[""],X,0,D,X)}}g=T=q=0,Y=K=1,oe=W="",z=C;break;case 58:z=1+Zn(W),q=H;default:if(Y<1){if(ue==123)--Y;else if(ue==125&&Y++==0&&bg()==125)continue}switch(W+=Hr(ue),ue*Y){case 38:K=T>0?1:(W+="\f",-1);break;case 44:D[g++]=(Zn(W)-1)*K,K=1;break;case 64:Jn()===45&&(W+=Rr(wn())),B=Jn(),T=z=Zn(oe=W+=wg(Tr())),ue++;break;case 45:H===45&&Zn(W)==2&&(Y=0)}}return m}function ip(i,s,f,d,h,m,C,D,w,g,T){for(var z=h-1,B=h===0?m:[""],q=du(B),H=0,Y=0,re=0;H<d;++H)for(var K=0,ue=ri(i,z+1,z=fg(Y=C[H])),oe=i;K<q;++K)(oe=Lp(Y>0?B[K]+" "+ue:st(ue,/&\f/g,B[K])))&&(w[re++]=oe);return Ur(i,s,f,h===0?cu:D,w,g,T)}function kg(i,s,f){return Ur(i,s,f,Tp,Hr(yg()),ri(i,2,-2),0)}function rp(i,s,f,d){return Ur(i,s,f,uu,ri(i,0,d),ri(i,d+1,-1),d)}function no(i,s){for(var f="",d=du(i),h=0;h<d;h++)f+=s(i[h],h,i,s)||"";return f}function zg(i,s,f,d){switch(i.type){case dg:if(i.children.length)break;case ug:case uu:return i.return=i.return||i.value;case Tp:return"";case Rp:return i.return=i.value+"{"+no(i.children,d)+"}";case cu:i.value=i.props.join(",")}return Zn(f=no(i.children,d))?i.return=i.value+"{"+f+"}":""}function Mg(i){var s=du(i);return function(f,d,h,m){for(var C="",D=0;D<s;D++)C+=i[D](f,d,h,m)||"";return C}}function Dg(i){return function(s){s.root||(s=s.return)&&i(s)}}function Eg(i){var s=Object.create(null);return function(f){return s[f]===void 0&&(s[f]=i(f)),s[f]}}var Ag=function(s,f,d){for(var h=0,m=0;h=m,m=Jn(),h===38&&m===12&&(f[d]=1),!si(m);)wn();return ui(s,hn)},Tg=function(s,f){var d=-1,h=44;do switch(si(h)){case 0:h===38&&Jn()===12&&(f[d]=1),s[d]+=Ag(hn-1,f,d);break;case 2:s[d]+=Rr(h);break;case 4:if(h===44){s[++d]=Jn()===58?"&\f":"",f[d]=s[d].length;break}default:s[d]+=Hr(h)}while(h=wn());return s},Rg=function(s,f){return Hp(Tg(Op(s),f))},sp=new WeakMap,Lg=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var f=s.value,d=s.parent,h=s.column===d.column&&s.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(s.props.length===1&&f.charCodeAt(0)!==58&&!sp.get(d))&&!h){sp.set(s,!0);for(var m=[],C=Rg(f,m),D=d.props,w=0,g=0;w<C.length;w++)for(var T=0;T<D.length;T++,g++)s.props[g]=m[w]?C[w].replace(/&\f/g,D[T]):D[T]+" "+C[w]}}},_g=function(s){if(s.type==="decl"){var f=s.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(s.return="",s.value="")}};function Bp(i,s){switch(pg(i,s)){case 5103:return rt+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return rt+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return rt+i+_r+i+nn+i+i;case 6828:case 4268:return rt+i+nn+i+i;case 6165:return rt+i+nn+"flex-"+i+i;case 5187:return rt+i+st(i,/(\w+).+(:[^]+)/,rt+"box-$1$2"+nn+"flex-$1$2")+i;case 5443:return rt+i+nn+"flex-item-"+st(i,/flex-|-self/,"")+i;case 4675:return rt+i+nn+"flex-line-pack"+st(i,/align-content|flex-|-self/,"")+i;case 5548:return rt+i+nn+st(i,"shrink","negative")+i;case 5292:return rt+i+nn+st(i,"basis","preferred-size")+i;case 6060:return rt+"box-"+st(i,"-grow","")+rt+i+nn+st(i,"grow","positive")+i;case 4554:return rt+st(i,/([^-])(transform)/g,"$1"+rt+"$2")+i;case 6187:return st(st(st(i,/(zoom-|grab)/,rt+"$1"),/(image-set)/,rt+"$1"),i,"")+i;case 5495:case 3959:return st(i,/(image-set\([^]*)/,rt+"$1$`$1");case 4968:return st(st(i,/(.+:)(flex-)?(.*)/,rt+"box-pack:$3"+nn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+rt+i+i;case 4095:case 3583:case 4068:case 2532:return st(i,/(.+)-inline(.+)/,rt+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Zn(i)-1-s>6)switch(en(i,s+1)){case 109:if(en(i,s+4)!==45)break;case 102:return st(i,/(.+:)(.+)-([^]+)/,"$1"+rt+"$2-$3$1"+_r+(en(i,s+3)==108?"$3":"$2-$3"))+i;case 115:return~ou(i,"stretch")?Bp(st(i,"stretch","fill-available"),s)+i:i}break;case 4949:if(en(i,s+1)!==115)break;case 6444:switch(en(i,Zn(i)-3-(~ou(i,"!important")&&10))){case 107:return st(i,":",":"+rt)+i;case 101:return st(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+rt+(en(i,14)===45?"inline-":"")+"box$3$1"+rt+"$2$3$1"+nn+"$2box$3")+i}break;case 5936:switch(en(i,s+11)){case 114:return rt+i+nn+st(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return rt+i+nn+st(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return rt+i+nn+st(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return rt+i+nn+i+i}return i}var Og=function(s,f,d,h){if(s.length>-1&&!s.return)switch(s.type){case uu:s.return=Bp(s.value,s.length);break;case Rp:return no([ai(s,{value:st(s.value,"@","@"+rt)})],h);case cu:if(s.length)return gg(s.props,function(m){switch(mg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return no([ai(s,{props:[st(m,/:(read-\w+)/,":"+_r+"$1")]})],h);case"::placeholder":return no([ai(s,{props:[st(m,/:(plac\w+)/,":"+rt+"input-$1")]}),ai(s,{props:[st(m,/:(plac\w+)/,":"+_r+"$1")]}),ai(s,{props:[st(m,/:(plac\w+)/,nn+"input-$1")]})],h)}return""})}},Hg=[Og],Bg=function(s){var f=s.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(Y){var re=Y.getAttribute("data-emotion");re.indexOf(" ")!==-1&&(document.head.appendChild(Y),Y.setAttribute("data-s",""))})}var h=s.stylisPlugins||Hg,m={},C,D=[];C=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(Y){for(var re=Y.getAttribute("data-emotion").split(" "),K=1;K<re.length;K++)m[re[K]]=!0;D.push(Y)});var w,g=[Lg,_g];{var T,z=[zg,Dg(function(Y){T.insert(Y)})],B=Mg(g.concat(h,z)),q=function(re){return no(Cg(re),B)};w=function(re,K,ue,oe){T=ue,q(re?re+"{"+K.styles+"}":K.styles),oe&&(H.inserted[K.name]=!0)}}var H={key:f,sheet:new cg({key:f,container:C,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:m,registered:{},insert:w};return H.sheet.hydrate(D),H},$c={exports:{}},ut={};var cp;function Ug(){if(cp)return ut;cp=1;var i=typeof Symbol=="function"&&Symbol.for,s=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,d=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,m=i?Symbol.for("react.profiler"):60114,C=i?Symbol.for("react.provider"):60109,D=i?Symbol.for("react.context"):60110,w=i?Symbol.for("react.async_mode"):60111,g=i?Symbol.for("react.concurrent_mode"):60111,T=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,B=i?Symbol.for("react.suspense_list"):60120,q=i?Symbol.for("react.memo"):60115,H=i?Symbol.for("react.lazy"):60116,Y=i?Symbol.for("react.block"):60121,re=i?Symbol.for("react.fundamental"):60117,K=i?Symbol.for("react.responder"):60118,ue=i?Symbol.for("react.scope"):60119;function oe(X){if(typeof X=="object"&&X!==null){var I=X.$$typeof;switch(I){case s:switch(X=X.type,X){case w:case g:case d:case m:case h:case z:return X;default:switch(X=X&&X.$$typeof,X){case D:case T:case H:case q:case C:return X;default:return I}}case f:return I}}}function fe(X){return oe(X)===g}return ut.AsyncMode=w,ut.ConcurrentMode=g,ut.ContextConsumer=D,ut.ContextProvider=C,ut.Element=s,ut.ForwardRef=T,ut.Fragment=d,ut.Lazy=H,ut.Memo=q,ut.Portal=f,ut.Profiler=m,ut.StrictMode=h,ut.Suspense=z,ut.isAsyncMode=function(X){return fe(X)||oe(X)===w},ut.isConcurrentMode=fe,ut.isContextConsumer=function(X){return oe(X)===D},ut.isContextProvider=function(X){return oe(X)===C},ut.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===s},ut.isForwardRef=function(X){return oe(X)===T},ut.isFragment=function(X){return oe(X)===d},ut.isLazy=function(X){return oe(X)===H},ut.isMemo=function(X){return oe(X)===q},ut.isPortal=function(X){return oe(X)===f},ut.isProfiler=function(X){return oe(X)===m},ut.isStrictMode=function(X){return oe(X)===h},ut.isSuspense=function(X){return oe(X)===z},ut.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===d||X===g||X===m||X===h||X===z||X===B||typeof X=="object"&&X!==null&&(X.$$typeof===H||X.$$typeof===q||X.$$typeof===C||X.$$typeof===D||X.$$typeof===T||X.$$typeof===re||X.$$typeof===K||X.$$typeof===ue||X.$$typeof===Y)},ut.typeOf=oe,ut}var up;function Ng(){return up||(up=1,$c.exports=Ug()),$c.exports}var Ic,dp;function jg(){if(dp)return Ic;dp=1;var i=Ng(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[i.ForwardRef]=d,m[i.Memo]=h;function C(H){return i.isMemo(H)?h:m[H.$$typeof]||s}var D=Object.defineProperty,w=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,T=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,B=Object.prototype;function q(H,Y,re){if(typeof Y!="string"){if(B){var K=z(Y);K&&K!==B&&q(H,K,re)}var ue=w(Y);g&&(ue=ue.concat(g(Y)));for(var oe=C(H),fe=C(Y),X=0;X<ue.length;++X){var I=ue[X];if(!f[I]&&!(re&&re[I])&&!(fe&&fe[I])&&!(oe&&oe[I])){var W=T(Y,I);try{D(H,I,W)}catch{}}}}return H}return Ic=q,Ic}jg();var qg=!0;function Yg(i,s,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?s.push(i[h]+";"):h&&(d+=h+" ")}),d}var Up=function(s,f,d){var h=s.key+"-"+f.name;(d===!1||qg===!1)&&s.registered[h]===void 0&&(s.registered[h]=f.styles)},Gg=function(s,f,d){Up(s,f,d);var h=s.key+"-"+f.name;if(s.inserted[f.name]===void 0){var m=f;do s.insert(f===m?"."+h:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function Xg(i){for(var s=0,f,d=0,h=i.length;h>=4;++d,h-=4)f=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,s=(f&65535)*1540483477+((f>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(h){case 3:s^=(i.charCodeAt(d+2)&255)<<16;case 2:s^=(i.charCodeAt(d+1)&255)<<8;case 1:s^=i.charCodeAt(d)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var Vg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Qg=/[A-Z]|^ms/g,Kg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Np=function(s){return s.charCodeAt(1)===45},fp=function(s){return s!=null&&typeof s!="boolean"},Wc=Eg(function(i){return Np(i)?i:i.replace(Qg,"-$&").toLowerCase()}),hp=function(s,f){switch(s){case"animation":case"animationName":if(typeof f=="string")return f.replace(Kg,function(d,h,m){return Fn={name:h,styles:m,next:Fn},h})}return Vg[s]!==1&&!Np(s)&&typeof f=="number"&&f!==0?f+"px":f};function ci(i,s,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return Fn={name:h.name,styles:h.styles,next:Fn},h.name;var m=f;if(m.styles!==void 0){var C=m.next;if(C!==void 0)for(;C!==void 0;)Fn={name:C.name,styles:C.styles,next:Fn},C=C.next;var D=m.styles+";";return D}return Zg(i,s,f)}case"function":{if(i!==void 0){var w=Fn,g=f(i);return Fn=w,ci(i,s,g)}break}}var T=f;return T}function Zg(i,s,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=ci(i,s,f[h])+";";else for(var m in f){var C=f[m];if(typeof C!="object"){var D=C;fp(D)&&(d+=Wc(m)+":"+hp(m,D)+";")}else if(Array.isArray(C)&&typeof C[0]=="string"&&s==null)for(var w=0;w<C.length;w++)fp(C[w])&&(d+=Wc(m)+":"+hp(m,C[w])+";");else{var g=ci(i,s,C);switch(m){case"animation":case"animationName":{d+=Wc(m)+":"+g+";";break}default:d+=m+"{"+g+"}"}}}return d}var pp=/label:\s*([^\s;{]+)\s*(;|$)/g,Fn;function jp(i,s,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";Fn=void 0;var m=i[0];if(m==null||m.raw===void 0)d=!1,h+=ci(f,s,m);else{var C=m;h+=C[0]}for(var D=1;D<i.length;D++)if(h+=ci(f,s,i[D]),d){var w=m;h+=w[D]}pp.lastIndex=0;for(var g="",T;(T=pp.exec(h))!==null;)g+="-"+T[1];var z=Xg(h)+g;return{name:z,styles:h,next:Fn}}var Fg=function(s){return s()},Jg=op.useInsertionEffect?op.useInsertionEffect:!1,$g=Jg||Fg,qp=v.createContext(typeof HTMLElement<"u"?Bg({key:"css"}):null);qp.Provider;var Ig=function(s){return v.forwardRef(function(f,d){var h=v.useContext(qp);return s(f,h,d)})},Wg=v.createContext({}),di={}.hasOwnProperty,ru="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fu=function(s,f){var d={};for(var h in f)di.call(f,h)&&(d[h]=f[h]);return d[ru]=s,d},Pg=function(s){var f=s.cache,d=s.serialized,h=s.isStringTag;return Up(f,d,h),$g(function(){return Gg(f,d,h)}),null},e1=Ig(function(i,s,f){var d=i.css;typeof d=="string"&&s.registered[d]!==void 0&&(d=s.registered[d]);var h=i[ru],m=[d],C="";typeof i.className=="string"?C=Yg(s.registered,m,i.className):i.className!=null&&(C=i.className+" ");var D=jp(m,void 0,v.useContext(Wg));C+=s.key+"-"+D.name;var w={};for(var g in i)di.call(i,g)&&g!=="css"&&g!==ru&&(w[g]=i[g]);return w.className=C,f&&(w.ref=f),v.createElement(v.Fragment,null,v.createElement(Pg,{cache:s,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,w))}),hu=e1,nt=ii.Fragment,r=function(s,f,d){return di.call(f,"css")?ii.jsx(hu,fu(s,f),d):ii.jsx(s,f,d)},b=function(s,f,d){return di.call(f,"css")?ii.jsxs(hu,fu(s,f),d):ii.jsxs(s,f,d)},Pc={exports:{}},li={},eu={exports:{}},tu={};var mp;function t1(){return mp||(mp=1,(function(i){function s(E,F){var $=E.length;E.push(F);e:for(;0<$;){var ze=$-1>>>1,Ue=E[ze];if(0<h(Ue,F))E[ze]=F,E[$]=Ue,$=ze;else break e}}function f(E){return E.length===0?null:E[0]}function d(E){if(E.length===0)return null;var F=E[0],$=E.pop();if($!==F){E[0]=$;e:for(var ze=0,Ue=E.length,x=Ue>>>1;ze<x;){var _=2*(ze+1)-1,P=E[_],ae=_+1,we=E[ae];if(0>h(P,$))ae<Ue&&0>h(we,P)?(E[ze]=we,E[ae]=$,ze=ae):(E[ze]=P,E[_]=$,ze=_);else if(ae<Ue&&0>h(we,$))E[ze]=we,E[ae]=$,ze=ae;else break e}}return F}function h(E,F){var $=E.sortIndex-F.sortIndex;return $!==0?$:E.id-F.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var C=Date,D=C.now();i.unstable_now=function(){return C.now()-D}}var w=[],g=[],T=1,z=null,B=3,q=!1,H=!1,Y=!1,re=!1,K=typeof setTimeout=="function"?setTimeout:null,ue=typeof clearTimeout=="function"?clearTimeout:null,oe=typeof setImmediate<"u"?setImmediate:null;function fe(E){for(var F=f(g);F!==null;){if(F.callback===null)d(g);else if(F.startTime<=E)d(g),F.sortIndex=F.expirationTime,s(w,F);else break;F=f(g)}}function X(E){if(Y=!1,fe(E),!H)if(f(w)!==null)H=!0,I||(I=!0,me());else{var F=f(g);F!==null&&Ee(X,F.startTime-E)}}var I=!1,W=-1,ne=5,U=-1;function Q(){return re?!0:!(i.unstable_now()-U<ne)}function he(){if(re=!1,I){var E=i.unstable_now();U=E;var F=!0;try{e:{H=!1,Y&&(Y=!1,ue(W),W=-1),q=!0;var $=B;try{t:{for(fe(E),z=f(w);z!==null&&!(z.expirationTime>E&&Q());){var ze=z.callback;if(typeof ze=="function"){z.callback=null,B=z.priorityLevel;var Ue=ze(z.expirationTime<=E);if(E=i.unstable_now(),typeof Ue=="function"){z.callback=Ue,fe(E),F=!0;break t}z===f(w)&&d(w),fe(E)}else d(w);z=f(w)}if(z!==null)F=!0;else{var x=f(g);x!==null&&Ee(X,x.startTime-E),F=!1}}break e}finally{z=null,B=$,q=!1}F=void 0}}finally{F?me():I=!1}}}var me;if(typeof oe=="function")me=function(){oe(he)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,le=ge.port2;ge.port1.onmessage=he,me=function(){le.postMessage(null)}}else me=function(){K(he,0)};function Ee(E,F){W=K(function(){E(i.unstable_now())},F)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(E){E.callback=null},i.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<E?Math.floor(1e3/E):5},i.unstable_getCurrentPriorityLevel=function(){return B},i.unstable_next=function(E){switch(B){case 1:case 2:case 3:var F=3;break;default:F=B}var $=B;B=F;try{return E()}finally{B=$}},i.unstable_requestPaint=function(){re=!0},i.unstable_runWithPriority=function(E,F){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var $=B;B=E;try{return F()}finally{B=$}},i.unstable_scheduleCallback=function(E,F,$){var ze=i.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ze+$:ze):$=ze,E){case 1:var Ue=-1;break;case 2:Ue=250;break;case 5:Ue=1073741823;break;case 4:Ue=1e4;break;default:Ue=5e3}return Ue=$+Ue,E={id:T++,callback:F,priorityLevel:E,startTime:$,expirationTime:Ue,sortIndex:-1},$>ze?(E.sortIndex=$,s(g,E),f(w)===null&&E===f(g)&&(Y?(ue(W),W=-1):Y=!0,Ee(X,$-ze))):(E.sortIndex=Ue,s(w,E),H||q||(H=!0,I||(I=!0,me()))),E},i.unstable_shouldYield=Q,i.unstable_wrapCallback=function(E){var F=B;return function(){var $=B;B=F;try{return E.apply(this,arguments)}finally{B=$}}}})(tu)),tu}var gp;function n1(){return gp||(gp=1,eu.exports=t1()),eu.exports}var nu={exports:{}},tn={};var yp;function a1(){if(yp)return tn;yp=1;var i=su();function s(w){var g="https://react.dev/errors/"+w;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)g+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+w+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(w,g,T){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:w,containerInfo:g,implementation:T}}var C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(w,g){if(w==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,tn.createPortal=function(w,g){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(w,g,null,T)},tn.flushSync=function(w){var g=C.T,T=d.p;try{if(C.T=null,d.p=2,w)return w()}finally{C.T=g,d.p=T,d.d.f()}},tn.preconnect=function(w,g){typeof w=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(w,g))},tn.prefetchDNS=function(w){typeof w=="string"&&d.d.D(w)},tn.preinit=function(w,g){if(typeof w=="string"&&g&&typeof g.as=="string"){var T=g.as,z=D(T,g.crossOrigin),B=typeof g.integrity=="string"?g.integrity:void 0,q=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;T==="style"?d.d.S(w,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:z,integrity:B,fetchPriority:q}):T==="script"&&d.d.X(w,{crossOrigin:z,integrity:B,fetchPriority:q,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},tn.preinitModule=function(w,g){if(typeof w=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var T=D(g.as,g.crossOrigin);d.d.M(w,{crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(w)},tn.preload=function(w,g){if(typeof w=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var T=g.as,z=D(T,g.crossOrigin);d.d.L(w,T,{crossOrigin:z,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},tn.preloadModule=function(w,g){if(typeof w=="string")if(g){var T=D(g.as,g.crossOrigin);d.d.m(w,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(w)},tn.requestFormReset=function(w){d.d.r(w)},tn.unstable_batchedUpdates=function(w,g){return w(g)},tn.useFormState=function(w,g,T){return C.H.useFormState(w,g,T)},tn.useFormStatus=function(){return C.H.useHostTransitionStatus()},tn.version="19.2.4",tn}var bp;function l1(){if(bp)return nu.exports;bp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),nu.exports=a1(),nu.exports}var vp;function o1(){if(vp)return li;vp=1;var i=n1(),s=su(),f=l1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function C(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function w(e){if(m(e)!==e)throw Error(d(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return w(l),e;if(o===a)return w(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var u=!1,p=l.child;p;){if(p===n){u=!0,n=l,a=o;break}if(p===a){u=!0,a=l,n=o;break}p=p.sibling}if(!u){for(p=o.child;p;){if(p===n){u=!0,n=o,a=l;break}if(p===a){u=!0,a=o,n=l;break}p=p.sibling}if(!u)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,B=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),oe=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=he&&e[he]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case K:return"Profiler";case re:return"StrictMode";case X:return"Suspense";case I:return"SuspenseList";case U:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case oe:return e.displayName||"Context";case ue:return(e._context.displayName||"Context")+".Consumer";case fe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var Ee=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ze=[],Ue=-1;function x(e){return{current:e}}function _(e){0>Ue||(e.current=ze[Ue],ze[Ue]=null,Ue--)}function P(e,t){Ue++,ze[Ue]=e.current,e.current=t}var ae=x(null),we=x(null),Ae=x(null),Ye=x(null);function bt(e,t){switch(P(Ae,t),P(we,e),P(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(ae),P(ae,e)}function Oe(){_(ae),_(we),_(Ae)}function Kt(e){e.memoizedState!==null&&P(Ye,e);var t=ae.current,n=zh(t,e.type);t!==n&&(P(we,e),P(ae,n))}function $e(e){we.current===e&&(_(ae),_(we)),Ye.current===e&&(_(Ye),Wo._currentValue=$)}var ct,ft;function Ht(e){if(ct===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ct=t&&t[1]||"",ft=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ct+e+ft}var Bt=!1;function Zt(e,t){if(!e||Bt)return"";Bt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(O){var L=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){L=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){L=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&L&&typeof O.stack=="string")return[O.stack,L.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=a.DetermineComponentFrameRoot(),u=o[0],p=o[1];if(u&&p){var S=u.split(`
4
+ `),R=p.split(`
5
+ `);for(l=a=0;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===S.length||l===R.length)for(a=S.length-1,l=R.length-1;1<=a&&0<=l&&S[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(S[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||S[a]!==R[l]){var N=`
6
+ `+S[a].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),N}while(1<=a&&0<=l);break}}}finally{Bt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ht(n):""}function ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ht(e.type);case 16:return Ht("Lazy");case 13:return e.child!==t&&t!==null?Ht("Suspense Fallback"):Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return Zt(e.type,!1);case 11:return Zt(e.type.render,!1);case 1:return Zt(e.type,!0);case 31:return Ht("Activity");default:return""}}function Qe(e){try{var t="",n=null;do t+=ee(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Ze=Object.prototype.hasOwnProperty,Ke=i.unstable_scheduleCallback,Dt=i.unstable_cancelCallback,St=i.unstable_shouldYield,Re=i.unstable_requestPaint,Rt=i.unstable_now,Cn=i.unstable_getCurrentPriorityLevel,Yn=i.unstable_ImmediatePriority,Hn=i.unstable_UserBlockingPriority,kn=i.unstable_NormalPriority,Z=i.unstable_LowPriority,ce=i.unstable_IdlePriority,Ge=i.log,at=i.unstable_setDisableYieldValue,Ne=null,De=null;function kt(e){if(typeof Ge=="function"&&at(e),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(Ne,e)}catch{}}var vt=Math.clz32?Math.clz32:Nr,ml=Math.log,Qa=Math.LN2;function Nr(e){return e>>>=0,e===0?32:31-(ml(e)/Qa|0)|0}var gl=256,yl=262144,Ka=4194304;function $n(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function bl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~o,a!==0?l=$n(a):(u&=p,u!==0?l=$n(u):n||(n=p&~e,n!==0&&(l=$n(n))))):(p=a&~o,p!==0?l=$n(p):u!==0?l=$n(u):n||(n=a&~e,n!==0&&(l=$n(n)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:l}function Za(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hi(){var e=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),e}function so(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qr(e,t,n,a,l,o){var u=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(n=u&~n;0<n;){var N=31-vt(n),G=1<<N;p[N]=0,S[N]=-1;var L=R[N];if(L!==null)for(R[N]=null,N=0;N<L.length;N++){var O=L[N];O!==null&&(O.lane&=-536870913)}n&=~G}a!==0&&pi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(u&~t))}function pi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-vt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function mi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-vt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function co(e,t){var n=t&-t;return n=(n&42)!==0?1:In(n),(n&(e.suspendedLanes|t))!==0?0:n}function In(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function uo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gi(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Fh(e.type))}function Bn(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Gn=Math.random().toString(36).slice(2),Et="__reactFiber$"+Gn,Ut="__reactProps$"+Gn,pn="__reactContainer$"+Gn,vl="__reactEvents$"+Gn,ya="__reactListeners$"+Gn,ba="__reactHandles$"+Gn,fo="__reactResources$"+Gn,Ja="__reactMarker$"+Gn;function ho(e){delete e[Et],delete e[Ut],delete e[vl],delete e[ya],delete e[ba]}function Wn(e){var t=e[Et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lh(e);e!==null;){if(n=e[Et])return n;e=Lh(e)}return t}e=n,n=e.parentNode}return null}function pe(e){if(e=e[Et]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ie(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function be(e){var t=e[fo];return t||(t=e[fo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ve(e){e[Ja]=!0}var Le=new Set,He={};function et(e,t){tt(e,t),tt(e+"Capture",t)}function tt(e,t){for(He[e]=t,e=0;e<t.length;e++)Le.add(t[e])}var Be=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]*$"),an={},po={};function Fp(e){return Ze.call(po,e)?!0:Ze.call(an,e)?!1:Be.test(e)?po[e]=!0:(an[e]=!0,!1)}function yi(e,t,n){if(Fp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function bi(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Pn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jp(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){n=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yr(e){if(!e._valueTracker){var t=mu(e)?"checked":"value";e._valueTracker=Jp(e,t,""+e[t])}}function gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=mu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function vi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var $p=/[\n"\\]/g;function Mn(e){return e.replace($p,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gr(e,t,n,a,l,o,u,p){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zn(t)):e.value!==""+zn(t)&&(e.value=""+zn(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Xr(e,u,zn(t)):n!=null?Xr(e,u,zn(n)):a!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+zn(p):e.removeAttribute("name")}function yu(e,t,n,a,l,o,u,p){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Yr(e);return}n=n!=null?""+zn(n):"",t=t!=null?""+zn(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Yr(e)}function Xr(e,t,n){t==="number"&&vi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function xl(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function bu(e,t,n){if(t!=null&&(t=""+zn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zn(n):""}function vu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Ee(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=zn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Yr(e)}function Sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ip=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 xu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Ip.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Su(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&xu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&xu(e,o,t[o])}function Vr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Wp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pp=/^[\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 xi(e){return Pp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var Qr=null;function Kr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wl=null,Cl=null;function wu(e){var t=pe(e);if(t&&(e=t.stateNode)){var n=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Mn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Ut]||null;if(!l)throw Error(d(90));Gr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&gu(a)}break e;case"textarea":bu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&xl(e,!!n.multiple,t,!1)}}}var Zr=!1;function Cu(e,t,n){if(Zr)return e(t,n);Zr=!0;try{var a=e(t);return a}finally{if(Zr=!1,(wl!==null||Cl!==null)&&(rr(),wl&&(t=wl,e=Cl,Cl=wl=null,wu(t),e)))for(t=0;t<e.length;t++)wu(e[t])}}function mo(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Ut]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fr=!1;if(ta)try{var go={};Object.defineProperty(go,"passive",{get:function(){Fr=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Fr=!1}var va=null,Jr=null,Si=null;function ku(){if(Si)return Si;var e,t=Jr,n=t.length,a,l="value"in va?va.value:va.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(a=1;a<=u&&t[n-a]===l[o-a];a++);return Si=l.slice(e,1<a?1-a:void 0)}function wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ci(){return!0}function zu(){return!1}function rn(e){function t(n,a,l,o,u){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=u,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(o):o[p]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ci:zu,this.isPropagationStopped=zu,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ci)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ci)},persist:function(){},isPersistent:Ci}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=rn($a),yo=z({},$a,{view:0,detail:0}),e0=rn(yo),$r,Ir,bo,zi=z({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bo&&(bo&&e.type==="mousemove"?($r=e.screenX-bo.screenX,Ir=e.screenY-bo.screenY):Ir=$r=0,bo=e),$r)},movementY:function(e){return"movementY"in e?e.movementY:Ir}}),Mu=rn(zi),t0=z({},zi,{dataTransfer:0}),n0=rn(t0),a0=z({},yo,{relatedTarget:0}),Wr=rn(a0),l0=z({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),o0=rn(l0),i0=z({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),r0=rn(i0),s0=z({},$a,{data:0}),Du=rn(s0),c0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},u0={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"},d0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function f0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=d0[e])?!!t[e]:!1}function Pr(){return f0}var h0=z({},yo,{key:function(e){if(e.key){var t=c0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?u0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),p0=rn(h0),m0=z({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=rn(m0),g0=z({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),y0=rn(g0),b0=z({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),v0=rn(b0),x0=z({},zi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),S0=rn(x0),w0=z({},$a,{newState:0,oldState:0}),C0=rn(w0),k0=[9,13,27,32],es=ta&&"CompositionEvent"in window,vo=null;ta&&"documentMode"in document&&(vo=document.documentMode);var z0=ta&&"TextEvent"in window&&!vo,Au=ta&&(!es||vo&&8<vo&&11>=vo),Tu=" ",Ru=!1;function Lu(e,t){switch(e){case"keyup":return k0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kl=!1;function M0(e,t){switch(e){case"compositionend":return _u(t);case"keypress":return t.which!==32?null:(Ru=!0,Tu);case"textInput":return e=t.data,e===Tu&&Ru?null:e;default:return null}}function D0(e,t){if(kl)return e==="compositionend"||!es&&Lu(e,t)?(e=ku(),Si=Jr=va=null,kl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Au&&t.locale!=="ko"?null:t.data;default:return null}}var E0={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 Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!E0[e.type]:t==="textarea"}function Hu(e,t,n,a){wl?Cl?Cl.push(a):Cl=[a]:wl=a,t=pr(t,"onChange"),0<t.length&&(n=new ki("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var xo=null,So=null;function A0(e){bh(e,0)}function Mi(e){var t=ie(e);if(gu(t))return e}function Bu(e,t){if(e==="change")return t}var Uu=!1;if(ta){var ts;if(ta){var ns="oninput"in document;if(!ns){var Nu=document.createElement("div");Nu.setAttribute("oninput","return;"),ns=typeof Nu.oninput=="function"}ts=ns}else ts=!1;Uu=ts&&(!document.documentMode||9<document.documentMode)}function ju(){xo&&(xo.detachEvent("onpropertychange",qu),So=xo=null)}function qu(e){if(e.propertyName==="value"&&Mi(So)){var t=[];Hu(t,So,e,Kr(e)),Cu(A0,t)}}function T0(e,t,n){e==="focusin"?(ju(),xo=t,So=n,xo.attachEvent("onpropertychange",qu)):e==="focusout"&&ju()}function R0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mi(So)}function L0(e,t){if(e==="click")return Mi(t)}function _0(e,t){if(e==="input"||e==="change")return Mi(t)}function O0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:O0;function wo(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Ze.call(t,l)||!mn(e[l],t[l]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gu(e,t){var n=Yu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function Xu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vi(e.document)}return t}function as(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var H0=ta&&"documentMode"in document&&11>=document.documentMode,zl=null,ls=null,Co=null,os=!1;function Qu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||zl==null||zl!==vi(a)||(a=zl,"selectionStart"in a&&as(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Co&&wo(Co,a)||(Co=a,a=pr(ls,"onSelect"),0<a.length&&(t=new ki("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=zl)))}function Ia(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ml={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionrun:Ia("Transition","TransitionRun"),transitionstart:Ia("Transition","TransitionStart"),transitioncancel:Ia("Transition","TransitionCancel"),transitionend:Ia("Transition","TransitionEnd")},is={},Ku={};ta&&(Ku=document.createElement("div").style,"AnimationEvent"in window||(delete Ml.animationend.animation,delete Ml.animationiteration.animation,delete Ml.animationstart.animation),"TransitionEvent"in window||delete Ml.transitionend.transition);function Wa(e){if(is[e])return is[e];if(!Ml[e])return e;var t=Ml[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ku)return is[e]=t[n];return e}var Zu=Wa("animationend"),Fu=Wa("animationiteration"),Ju=Wa("animationstart"),B0=Wa("transitionrun"),U0=Wa("transitionstart"),N0=Wa("transitioncancel"),$u=Wa("transitionend"),Iu=new Map,rs="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(" ");rs.push("scrollEnd");function Un(e,t){Iu.set(e,t),et(t,[e])}var Di=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dn=[],Dl=0,ss=0;function Ei(){for(var e=Dl,t=ss=Dl=0;t<e;){var n=Dn[t];Dn[t++]=null;var a=Dn[t];Dn[t++]=null;var l=Dn[t];Dn[t++]=null;var o=Dn[t];if(Dn[t++]=null,a!==null&&l!==null){var u=a.pending;u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l}o!==0&&Wu(n,l,o)}}function Ai(e,t,n,a){Dn[Dl++]=e,Dn[Dl++]=t,Dn[Dl++]=n,Dn[Dl++]=a,ss|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cs(e,t,n,a){return Ai(e,t,n,a),Ti(e)}function Pa(e,t){return Ai(e,null,null,t),Ti(e)}function Wu(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(l=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,l&&t!==null&&(l=31-vt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Ti(e){if(50<Qo)throw Qo=0,bc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var El={};function j0(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,n,a){return new j0(e,t,n,a)}function us(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var n=e.alternate;return n===null?(n=gn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Pu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ri(e,t,n,a,l,o){var u=0;if(a=e,typeof e=="function")us(e)&&(u=1);else if(typeof e=="string")u=Vm(e,n,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case U:return e=gn(31,n,t,l),e.elementType=U,e.lanes=o,e;case Y:return el(n.children,l,o,t);case re:u=8,l|=24;break;case K:return e=gn(12,n,t,l|2),e.elementType=K,e.lanes=o,e;case X:return e=gn(13,n,t,l),e.elementType=X,e.lanes=o,e;case I:return e=gn(19,n,t,l),e.elementType=I,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oe:u=10;break e;case ue:u=9;break e;case fe:u=11;break e;case W:u=14;break e;case ne:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=gn(u,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function el(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function ds(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function ed(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function fs(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var td=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var n=td.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Qe(t)},td.set(e,t),t)}return{value:e,source:t,stack:Qe(t)}}var Al=[],Tl=0,Li=null,ko=0,An=[],Tn=0,xa=null,Xn=1,Vn="";function aa(e,t){Al[Tl++]=ko,Al[Tl++]=Li,Li=e,ko=t}function nd(e,t,n){An[Tn++]=Xn,An[Tn++]=Vn,An[Tn++]=xa,xa=e;var a=Xn;e=Vn;var l=32-vt(a)-1;a&=~(1<<l),n+=1;var o=32-vt(t)+l;if(30<o){var u=l-l%5;o=(a&(1<<u)-1).toString(32),a>>=u,l-=u,Xn=1<<32-vt(t)+l|n<<l|a,Vn=o+e}else Xn=1<<o|n<<l|a,Vn=e}function hs(e){e.return!==null&&(aa(e,1),nd(e,1,0))}function ps(e){for(;e===Li;)Li=Al[--Tl],Al[Tl]=null,ko=Al[--Tl],Al[Tl]=null;for(;e===xa;)xa=An[--Tn],An[Tn]=null,Vn=An[--Tn],An[Tn]=null,Xn=An[--Tn],An[Tn]=null}function ad(e,t){An[Tn++]=Xn,An[Tn++]=Vn,An[Tn++]=xa,Xn=t.id,Vn=t.overflow,xa=e}var Jt=null,zt=null,Pe=!1,Sa=null,Rn=!1,ms=Error(d(519));function wa(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zo(En(t,e)),ms}function ld(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Et]=e,t[Ut]=a,n){case"dialog":Je("cancel",t),Je("close",t);break;case"iframe":case"object":case"embed":Je("load",t);break;case"video":case"audio":for(n=0;n<Zo.length;n++)Je(Zo[n],t);break;case"source":Je("error",t);break;case"img":case"image":case"link":Je("error",t),Je("load",t);break;case"details":Je("toggle",t);break;case"input":Je("invalid",t),yu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Je("invalid",t);break;case"textarea":Je("invalid",t),vu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||wh(t.textContent,n)?(a.popover!=null&&(Je("beforetoggle",t),Je("toggle",t)),a.onScroll!=null&&Je("scroll",t),a.onScrollEnd!=null&&Je("scrollend",t),a.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||wa(e,!0)}function od(e){for(Jt=e.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Jt=Jt.return}}function Rl(e){if(e!==Jt)return!1;if(!Pe)return od(e),Pe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||_c(e.type,e.memoizedProps)),n=!n),n&&zt&&wa(e),od(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));zt=Rh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));zt=Rh(e)}else t===27?(t=zt,Ba(e.type)?(e=Nc,Nc=null,zt=e):zt=t):zt=Jt?_n(e.stateNode.nextSibling):null;return!0}function tl(){zt=Jt=null,Pe=!1}function gs(){var e=Sa;return e!==null&&(dn===null?dn=e:dn.push.apply(dn,e),Sa=null),e}function zo(e){Sa===null?Sa=[e]:Sa.push(e)}var ys=x(null),nl=null,la=null;function Ca(e,t,n){P(ys,t._currentValue),t._currentValue=n}function oa(e){e._currentValue=ys.current,_(ys)}function bs(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function vs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var u=l.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=l;for(var S=0;S<t.length;S++)if(p.context===t[S]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),bs(o.return,n,e),a||(u=null);break e}o=p.next}}else if(l.tag===18){if(u=l.return,u===null)throw Error(d(341));u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),bs(u,n,e),u=null}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===e){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}}function Ll(e,t,n,a){e=null;for(var l=t,o=!1;l!==null;){if(!o){if((l.flags&524288)!==0)o=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var u=l.alternate;if(u===null)throw Error(d(387));if(u=u.memoizedProps,u!==null){var p=l.type;mn(l.pendingProps.value,u.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ye.current){if(u=l.alternate,u===null)throw Error(d(387));u.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Wo):e=[Wo])}l=l.return}e!==null&&vs(t,e,n,a),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!mn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function al(e){nl=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $t(e){return id(nl,e)}function Oi(e,t){return nl===null&&al(e),id(e,t)}function id(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(d(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var q0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Y0=i.unstable_scheduleCallback,G0=i.unstable_NormalPriority,qt={$$typeof:oe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xs(){return{controller:new q0,data:new Map,refCount:0}}function Mo(e){e.refCount--,e.refCount===0&&Y0(G0,function(){e.controller.abort()})}var Do=null,Ss=0,_l=0,Ol=null;function X0(e,t){if(Do===null){var n=Do=[];Ss=0,_l=kc(),Ol={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Ss++,t.then(rd,rd),t}function rd(){if(--Ss===0&&Do!==null){Ol!==null&&(Ol.status="fulfilled");var e=Do;Do=null,_l=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function V0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var sd=E.S;E.S=function(e,t){Kf=Rt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&X0(e,t),sd!==null&&sd(e,t)};var ll=x(null);function ws(){var e=ll.current;return e!==null?e:xt.pooledCache}function Hi(e,t){t===null?P(ll,ll.current):P(ll,t.pool)}function cd(){var e=ws();return e===null?null:{parent:qt._currentValue,pool:e}}var Hl=Error(d(460)),Cs=Error(d(474)),Bi=Error(d(542)),Ui={then:function(){}};function ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ea,ea),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=xt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e}throw il=t,Hl}}function ol(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(il=n,Hl):n}}var il=null;function fd(){if(il===null)throw Error(d(459));var e=il;return il=null,e}function hd(e){if(e===Hl||e===Bi)throw Error(d(483))}var Bl=null,Eo=0;function Ni(e){var t=Eo;return Eo+=1,Bl===null&&(Bl=[]),dd(Bl,e,t)}function Ao(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ji(e,t){throw t.$$typeof===B?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pd(e){function t(M,k){if(e){var A=M.deletions;A===null?(M.deletions=[k],M.flags|=16):A.push(k)}}function n(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function a(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function l(M,k){return M=na(M,k),M.index=0,M.sibling=null,M}function o(M,k,A){return M.index=A,e?(A=M.alternate,A!==null?(A=A.index,A<k?(M.flags|=67108866,k):A):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function u(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,k,A,j){return k===null||k.tag!==6?(k=ds(A,M.mode,j),k.return=M,k):(k=l(k,A),k.return=M,k)}function S(M,k,A,j){var Me=A.type;return Me===Y?N(M,k,A.props.children,j,A.key):k!==null&&(k.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===ne&&ol(Me)===k.type)?(k=l(k,A.props),Ao(k,A),k.return=M,k):(k=Ri(A.type,A.key,A.props,null,M.mode,j),Ao(k,A),k.return=M,k)}function R(M,k,A,j){return k===null||k.tag!==4||k.stateNode.containerInfo!==A.containerInfo||k.stateNode.implementation!==A.implementation?(k=fs(A,M.mode,j),k.return=M,k):(k=l(k,A.children||[]),k.return=M,k)}function N(M,k,A,j,Me){return k===null||k.tag!==7?(k=el(A,M.mode,j,Me),k.return=M,k):(k=l(k,A),k.return=M,k)}function G(M,k,A){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ds(""+k,M.mode,A),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case q:return A=Ri(k.type,k.key,k.props,null,M.mode,A),Ao(A,k),A.return=M,A;case H:return k=fs(k,M.mode,A),k.return=M,k;case ne:return k=ol(k),G(M,k,A)}if(Ee(k)||me(k))return k=el(k,M.mode,A,null),k.return=M,k;if(typeof k.then=="function")return G(M,Ni(k),A);if(k.$$typeof===oe)return G(M,Oi(M,k),A);ji(M,k)}return null}function L(M,k,A,j){var Me=k!==null?k.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return Me!==null?null:p(M,k,""+A,j);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case q:return A.key===Me?S(M,k,A,j):null;case H:return A.key===Me?R(M,k,A,j):null;case ne:return A=ol(A),L(M,k,A,j)}if(Ee(A)||me(A))return Me!==null?null:N(M,k,A,j,null);if(typeof A.then=="function")return L(M,k,Ni(A),j);if(A.$$typeof===oe)return L(M,k,Oi(M,A),j);ji(M,A)}return null}function O(M,k,A,j,Me){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return M=M.get(A)||null,p(k,M,""+j,Me);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return M=M.get(j.key===null?A:j.key)||null,S(k,M,j,Me);case H:return M=M.get(j.key===null?A:j.key)||null,R(k,M,j,Me);case ne:return j=ol(j),O(M,k,A,j,Me)}if(Ee(j)||me(j))return M=M.get(A)||null,N(k,M,j,Me,null);if(typeof j.then=="function")return O(M,k,A,Ni(j),Me);if(j.$$typeof===oe)return O(M,k,A,Oi(k,j),Me);ji(k,j)}return null}function ye(M,k,A,j){for(var Me=null,lt=null,Ce=k,Ve=k=0,We=null;Ce!==null&&Ve<A.length;Ve++){Ce.index>Ve?(We=Ce,Ce=null):We=Ce.sibling;var ot=L(M,Ce,A[Ve],j);if(ot===null){Ce===null&&(Ce=We);break}e&&Ce&&ot.alternate===null&&t(M,Ce),k=o(ot,k,Ve),lt===null?Me=ot:lt.sibling=ot,lt=ot,Ce=We}if(Ve===A.length)return n(M,Ce),Pe&&aa(M,Ve),Me;if(Ce===null){for(;Ve<A.length;Ve++)Ce=G(M,A[Ve],j),Ce!==null&&(k=o(Ce,k,Ve),lt===null?Me=Ce:lt.sibling=Ce,lt=Ce);return Pe&&aa(M,Ve),Me}for(Ce=a(Ce);Ve<A.length;Ve++)We=O(Ce,M,Ve,A[Ve],j),We!==null&&(e&&We.alternate!==null&&Ce.delete(We.key===null?Ve:We.key),k=o(We,k,Ve),lt===null?Me=We:lt.sibling=We,lt=We);return e&&Ce.forEach(function(Ya){return t(M,Ya)}),Pe&&aa(M,Ve),Me}function Te(M,k,A,j){if(A==null)throw Error(d(151));for(var Me=null,lt=null,Ce=k,Ve=k=0,We=null,ot=A.next();Ce!==null&&!ot.done;Ve++,ot=A.next()){Ce.index>Ve?(We=Ce,Ce=null):We=Ce.sibling;var Ya=L(M,Ce,ot.value,j);if(Ya===null){Ce===null&&(Ce=We);break}e&&Ce&&Ya.alternate===null&&t(M,Ce),k=o(Ya,k,Ve),lt===null?Me=Ya:lt.sibling=Ya,lt=Ya,Ce=We}if(ot.done)return n(M,Ce),Pe&&aa(M,Ve),Me;if(Ce===null){for(;!ot.done;Ve++,ot=A.next())ot=G(M,ot.value,j),ot!==null&&(k=o(ot,k,Ve),lt===null?Me=ot:lt.sibling=ot,lt=ot);return Pe&&aa(M,Ve),Me}for(Ce=a(Ce);!ot.done;Ve++,ot=A.next())ot=O(Ce,M,Ve,ot.value,j),ot!==null&&(e&&ot.alternate!==null&&Ce.delete(ot.key===null?Ve:ot.key),k=o(ot,k,Ve),lt===null?Me=ot:lt.sibling=ot,lt=ot);return e&&Ce.forEach(function(tg){return t(M,tg)}),Pe&&aa(M,Ve),Me}function yt(M,k,A,j){if(typeof A=="object"&&A!==null&&A.type===Y&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case q:e:{for(var Me=A.key;k!==null;){if(k.key===Me){if(Me=A.type,Me===Y){if(k.tag===7){n(M,k.sibling),j=l(k,A.props.children),j.return=M,M=j;break e}}else if(k.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===ne&&ol(Me)===k.type){n(M,k.sibling),j=l(k,A.props),Ao(j,A),j.return=M,M=j;break e}n(M,k);break}else t(M,k);k=k.sibling}A.type===Y?(j=el(A.props.children,M.mode,j,A.key),j.return=M,M=j):(j=Ri(A.type,A.key,A.props,null,M.mode,j),Ao(j,A),j.return=M,M=j)}return u(M);case H:e:{for(Me=A.key;k!==null;){if(k.key===Me)if(k.tag===4&&k.stateNode.containerInfo===A.containerInfo&&k.stateNode.implementation===A.implementation){n(M,k.sibling),j=l(k,A.children||[]),j.return=M,M=j;break e}else{n(M,k);break}else t(M,k);k=k.sibling}j=fs(A,M.mode,j),j.return=M,M=j}return u(M);case ne:return A=ol(A),yt(M,k,A,j)}if(Ee(A))return ye(M,k,A,j);if(me(A)){if(Me=me(A),typeof Me!="function")throw Error(d(150));return A=Me.call(A),Te(M,k,A,j)}if(typeof A.then=="function")return yt(M,k,Ni(A),j);if(A.$$typeof===oe)return yt(M,k,Oi(M,A),j);ji(M,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,k!==null&&k.tag===6?(n(M,k.sibling),j=l(k,A),j.return=M,M=j):(n(M,k),j=ds(A,M.mode,j),j.return=M,M=j),u(M)):n(M,k)}return function(M,k,A,j){try{Eo=0;var Me=yt(M,k,A,j);return Bl=null,Me}catch(Ce){if(Ce===Hl||Ce===Bi)throw Ce;var lt=gn(29,Ce,null,M.mode);return lt.lanes=j,lt.return=M,lt}}}var rl=pd(!0),md=pd(!1),ka=!1;function ks(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(it&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Ti(e),Wu(e,null,n),t}return Ai(e,a,t,n),Ti(e)}function To(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mi(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var u={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=u:o=o.next=u,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ds=!1;function Ro(){if(Ds){var e=Ol;if(e!==null)throw e}}function Lo(e,t,n,a){Ds=!1;var l=e.updateQueue;ka=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var S=p,R=S.next;S.next=null,u===null?o=R:u.next=R,u=S;var N=e.alternate;N!==null&&(N=N.updateQueue,p=N.lastBaseUpdate,p!==u&&(p===null?N.firstBaseUpdate=R:p.next=R,N.lastBaseUpdate=S))}if(o!==null){var G=l.baseState;u=0,N=R=S=null,p=o;do{var L=p.lane&-536870913,O=L!==p.lane;if(O?(Ie&L)===L:(a&L)===L){L!==0&&L===_l&&(Ds=!0),N!==null&&(N=N.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ye=e,Te=p;L=t;var yt=n;switch(Te.tag){case 1:if(ye=Te.payload,typeof ye=="function"){G=ye.call(yt,G,L);break e}G=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Te.payload,L=typeof ye=="function"?ye.call(yt,G,L):ye,L==null)break e;G=z({},G,L);break e;case 2:ka=!0}}L=p.callback,L!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[L]:O.push(L))}else O={lane:L,tag:p.tag,payload:p.payload,callback:p.callback,next:null},N===null?(R=N=O,S=G):N=N.next=O,u|=L;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;O=p,p=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);N===null&&(S=G),l.baseState=S,l.firstBaseUpdate=R,l.lastBaseUpdate=N,o===null&&(l.shared.lanes=0),Ra|=u,e.lanes=u,e.memoizedState=G}}function gd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function yd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gd(n[e],t)}var Ul=x(null),qi=x(0);function bd(e,t){e=pa,P(qi,e),P(Ul,t),pa=e|t.baseLanes}function Es(){P(qi,pa),P(Ul,Ul.current)}function As(){pa=qi.current,_(Ul),_(qi)}var yn=x(null),Ln=null;function Da(e){var t=e.alternate;P(Nt,Nt.current&1),P(yn,e),Ln===null&&(t===null||Ul.current!==null||t.memoizedState!==null)&&(Ln=e)}function Ts(e){P(Nt,Nt.current),P(yn,e),Ln===null&&(Ln=e)}function vd(e){e.tag===22?(P(Nt,Nt.current),P(yn,e),Ln===null&&(Ln=e)):Ea()}function Ea(){P(Nt,Nt.current),P(yn,yn.current)}function bn(e){_(yn),Ln===e&&(Ln=null),_(Nt)}var Nt=x(0);function Yi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bc(n)||Uc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ia=0,Xe=null,mt=null,Yt=null,Gi=!1,Nl=!1,sl=!1,Xi=0,_o=0,jl=null,Q0=0;function Lt(){throw Error(d(321))}function Rs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function Ls(e,t,n,a,l,o){return ia=o,Xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?nf:Zs,sl=!1,o=n(a,l),sl=!1,Nl&&(o=Sd(t,n,a,l)),xd(e),o}function xd(e){E.H=Bo;var t=mt!==null&&mt.next!==null;if(ia=0,Yt=mt=Xe=null,Gi=!1,_o=0,jl=null,t)throw Error(d(300));e===null||Gt||(e=e.dependencies,e!==null&&_i(e)&&(Gt=!0))}function Sd(e,t,n,a){Xe=e;var l=0;do{if(Nl&&(jl=null),_o=0,Nl=!1,25<=l)throw Error(d(301));if(l+=1,Yt=mt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}E.H=af,o=t(n,a)}while(Nl);return o}function K0(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?Oo(t):t,e=e.useState()[0],(mt!==null?mt.memoizedState:null)!==e&&(Xe.flags|=1024),t}function _s(){var e=Xi!==0;return Xi=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hs(e){if(Gi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gi=!1}ia=0,Yt=mt=Xe=null,Nl=!1,_o=Xi=0,jl=null}function ln(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?Xe.memoizedState=Yt=e:Yt=Yt.next=e,Yt}function jt(){if(mt===null){var e=Xe.alternate;e=e!==null?e.memoizedState:null}else e=mt.next;var t=Yt===null?Xe.memoizedState:Yt.next;if(t!==null)Yt=t,mt=e;else{if(e===null)throw Xe.alternate===null?Error(d(467)):Error(d(310));mt=e,e={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Yt===null?Xe.memoizedState=Yt=e:Yt=Yt.next=e}return Yt}function Vi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=_o;return _o+=1,jl===null&&(jl=[]),e=dd(jl,e,t),t=Xe,(Yt===null?t.memoizedState:Yt.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?nf:Zs),e}function Qi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Oo(e);if(e.$$typeof===oe)return $t(e)}throw Error(d(438,String(e)))}function Bs(e){var t=null,n=Xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Vi(),Xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Q;return t.index++,n}function ra(e,t){return typeof t=="function"?t(e):t}function Ki(e){var t=jt();return Us(t,mt,e)}function Us(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,o=a.pending;if(o!==null){if(l!==null){var u=l.next;l.next=o.next,o.next=u}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var p=u=null,S=null,R=t,N=!1;do{var G=R.lane&-536870913;if(G!==R.lane?(Ie&G)===G:(ia&G)===G){var L=R.revertLane;if(L===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),G===_l&&(N=!0);else if((ia&L)===L){R=R.next,L===_l&&(N=!0);continue}else G={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=G,u=o):S=S.next=G,Xe.lanes|=L,Ra|=L;G=R.action,sl&&n(o,G),o=R.hasEagerState?R.eagerState:n(o,G)}else L={lane:G,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=L,u=o):S=S.next=L,Xe.lanes|=G,Ra|=G;R=R.next}while(R!==null&&R!==t);if(S===null?u=o:S.next=p,!mn(o,e.memoizedState)&&(Gt=!0,N&&(n=Ol,n!==null)))throw n;e.memoizedState=o,e.baseState=u,e.baseQueue=S,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ns(e){var t=jt(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var u=l=l.next;do o=e(o,u.action),u=u.next;while(u!==l);mn(o,t.memoizedState)||(Gt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function wd(e,t,n){var a=Xe,l=jt(),o=Pe;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!mn((mt||l).memoizedState,n);if(u&&(l.memoizedState=n,Gt=!0),l=l.queue,Ys(zd.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||Yt!==null&&Yt.memoizedState.tag&1){if(a.flags|=2048,ql(9,{destroy:void 0},kd.bind(null,a,l,n,t),null),xt===null)throw Error(d(349));o||(ia&127)!==0||Cd(a,t,n)}return n}function Cd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xe.updateQueue,t===null?(t=Vi(),Xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&Dd(e)}function zd(e,t,n){return n(function(){Md(t)&&Dd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function Dd(e){var t=Pa(e,2);t!==null&&fn(t,e,2)}function js(e){var t=ln();if(typeof e=="function"){var n=e;if(e=n(),sl){kt(!0);try{n()}finally{kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,Us(e,mt,typeof a=="function"?a:ra)}function Z0(e,t,n,a,l){if(Ji(e))throw Error(d(485));if(e=t.action,e!==null){var o={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){o.listeners.push(u)}};E.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Ad(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ad(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=E.T,u={};E.T=u;try{var p=n(l,a),S=E.S;S!==null&&S(u,p),Td(e,t,p)}catch(R){qs(e,t,R)}finally{o!==null&&u.types!==null&&(o.types=u.types),E.T=o}}else try{o=n(l,a),Td(e,t,o)}catch(R){qs(e,t,R)}}function Td(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Rd(e,t,a)},function(a){return qs(e,t,a)}):Rd(e,t,n)}function Rd(e,t,n){t.status="fulfilled",t.value=n,Ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ad(e,n)))}function qs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ld(t),t=t.next;while(t!==a)}e.action=null}function Ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _d(e,t){return t}function Od(e,t){if(Pe){var n=xt.formState;if(n!==null){e:{var a=Xe;if(Pe){if(zt){t:{for(var l=zt,o=Rn;l.nodeType!==8;){if(!o){l=null;break t}if(l=_n(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){zt=_n(l.nextSibling),a=l.data==="F!";break e}}wa(a)}a=!1}a&&(t=n[0])}}return n=ln(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_d,lastRenderedState:t},n.queue=a,n=Pd.bind(null,Xe,a),a.dispatch=n,a=js(!1),o=Ks.bind(null,Xe,!1,a.queue),a=ln(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=Z0.bind(null,Xe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hd(e){var t=jt();return Bd(t,mt,e)}function Bd(e,t,n){if(t=Us(e,t,_d)[0],e=Ki(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Oo(t)}catch(u){throw u===Hl?Bi:u}else a=t;t=jt();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Xe.flags|=2048,ql(9,{destroy:void 0},F0.bind(null,l,n),null)),[a,o,e]}function F0(e,t){e.action=t}function Ud(e){var t=jt(),n=mt;if(n!==null)return Bd(t,n,e);jt(),t=t.memoizedState,n=jt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function ql(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Xe.updateQueue,t===null&&(t=Vi(),Xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Nd(){return jt().memoizedState}function Zi(e,t,n,a){var l=ln();Xe.flags|=e,l.memoizedState=ql(1|t,{destroy:void 0},n,a===void 0?null:a)}function Fi(e,t,n,a){var l=jt();a=a===void 0?null:a;var o=l.memoizedState.inst;mt!==null&&a!==null&&Rs(a,mt.memoizedState.deps)?l.memoizedState=ql(t,o,n,a):(Xe.flags|=e,l.memoizedState=ql(1|t,o,n,a))}function jd(e,t){Zi(8390656,8,e,t)}function Ys(e,t){Fi(2048,8,e,t)}function J0(e){Xe.flags|=4;var t=Xe.updateQueue;if(t===null)t=Vi(),Xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qd(e){var t=jt().memoizedState;return J0({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Yd(e,t){return Fi(4,2,e,t)}function Gd(e,t){return Fi(4,4,e,t)}function Xd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vd(e,t,n){n=n!=null?n.concat([e]):null,Fi(4,4,Xd.bind(null,t,e),n)}function Gs(){}function Qd(e,t){var n=jt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Rs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Kd(e,t){var n=jt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Rs(t,a[1]))return a[0];if(a=e(),sl){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a}function Xs(e,t,n){return n===void 0||(ia&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ff(),Xe.lanes|=e,Ra|=e,n)}function Zd(e,t,n,a){return mn(n,t)?n:Ul.current!==null?(e=Xs(e,n,a),mn(e,t)||(Gt=!0),e):(ia&42)===0||(ia&1073741824)!==0&&(Ie&261930)===0?(Gt=!0,e.memoizedState=n):(e=Ff(),Xe.lanes|=e,Ra|=e,t)}function Fd(e,t,n,a,l){var o=F.p;F.p=o!==0&&8>o?o:8;var u=E.T,p={};E.T=p,Ks(e,!1,t,n);try{var S=l(),R=E.S;if(R!==null&&R(p,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var N=V0(S,a);Ho(e,t,N,Sn(e))}else Ho(e,t,a,Sn(e))}catch(G){Ho(e,t,{then:function(){},status:"rejected",reason:G},Sn())}finally{F.p=o,u!==null&&p.types!==null&&(u.types=p.types),E.T=u}}function $0(){}function Vs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Jd(e).queue;Fd(e,l,t,$,n===null?$0:function(){return $d(e),n(a)})}function Jd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:$},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $d(e){var t=Jd(e);t.next===null&&(t=e.alternate.memoizedState),Ho(e,t.next.queue,{},Sn())}function Qs(){return $t(Wo)}function Id(){return jt().memoizedState}function Wd(){return jt().memoizedState}function I0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sn();e=za(n);var a=Ma(t,e,n);a!==null&&(fn(a,t,n),To(a,t,n)),t={cache:xs()},e.payload=t;return}t=t.return}}function W0(e,t,n){var a=Sn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ji(e)?ef(t,n):(n=cs(e,t,n,a),n!==null&&(fn(n,e,a),tf(n,t,a)))}function Pd(e,t,n){var a=Sn();Ho(e,t,n,a)}function Ho(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ji(e))ef(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var u=t.lastRenderedState,p=o(u,n);if(l.hasEagerState=!0,l.eagerState=p,mn(p,u))return Ai(e,t,l,0),xt===null&&Ei(),!1}catch{}if(n=cs(e,t,l,a),n!==null)return fn(n,e,a),tf(n,t,a),!0}return!1}function Ks(e,t,n,a){if(a={lane:2,revertLane:kc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ji(e)){if(t)throw Error(d(479))}else t=cs(e,n,a,2),t!==null&&fn(t,e,2)}function Ji(e){var t=e.alternate;return e===Xe||t!==null&&t===Xe}function ef(e,t){Nl=Gi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mi(e,n)}}var Bo={readContext:$t,use:Qi,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt,useHostTransitionStatus:Lt,useFormState:Lt,useActionState:Lt,useOptimistic:Lt,useMemoCache:Lt,useCacheRefresh:Lt};Bo.useEffectEvent=Lt;var nf={readContext:$t,use:Qi,useCallback:function(e,t){return ln().memoizedState=[e,t===void 0?null:t],e},useContext:$t,useEffect:jd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Zi(4194308,4,Xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){Zi(4,2,e,t)},useMemo:function(e,t){var n=ln();t=t===void 0?null:t;var a=e();if(sl){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=ln();if(n!==void 0){var l=n(t);if(sl){kt(!0);try{n(t)}finally{kt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=W0.bind(null,Xe,e),[a.memoizedState,e]},useRef:function(e){var t=ln();return e={current:e},t.memoizedState=e},useState:function(e){e=js(e);var t=e.queue,n=Pd.bind(null,Xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){var n=ln();return Xs(n,e,t)},useTransition:function(){var e=js(!1);return e=Fd.bind(null,Xe,e.queue,!0,!1),ln().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Xe,l=ln();if(Pe){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),xt===null)throw Error(d(349));(Ie&127)!==0||Cd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,jd(zd.bind(null,a,o,e),[e]),a.flags|=2048,ql(9,{destroy:void 0},kd.bind(null,a,o,n,t),null),n},useId:function(){var e=ln(),t=xt.identifierPrefix;if(Pe){var n=Vn,a=Xn;n=(a&~(1<<32-vt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Xi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Q0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qs,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=ln();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ks.bind(null,Xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bs,useCacheRefresh:function(){return ln().memoizedState=I0.bind(null,Xe)},useEffectEvent:function(e){var t=ln(),n={impl:e};return t.memoizedState=n,function(){if((it&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Zs={readContext:$t,use:Qi,useCallback:Qd,useContext:$t,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ki,useRef:Nd,useState:function(){return Ki(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=jt();return Zd(n,mt.memoizedState,e,t)},useTransition:function(){var e=Ki(ra)[0],t=jt().memoizedState;return[typeof e=="boolean"?e:Oo(e),t]},useSyncExternalStore:wd,useId:Id,useHostTransitionStatus:Qs,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=jt();return Ed(n,mt,e,t)},useMemoCache:Bs,useCacheRefresh:Wd};Zs.useEffectEvent=qd;var af={readContext:$t,use:Qi,useCallback:Qd,useContext:$t,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ns,useRef:Nd,useState:function(){return Ns(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=jt();return mt===null?Xs(n,e,t):Zd(n,mt.memoizedState,e,t)},useTransition:function(){var e=Ns(ra)[0],t=jt().memoizedState;return[typeof e=="boolean"?e:Oo(e),t]},useSyncExternalStore:wd,useId:Id,useHostTransitionStatus:Qs,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=jt();return mt!==null?Ed(n,mt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Bs,useCacheRefresh:Wd};af.useEffectEvent=qd;function Fs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=za(a);l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(fn(t,e,a),To(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=za(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(fn(t,e,a),To(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),a=za(n);a.tag=2,t!=null&&(a.callback=t),t=Ma(e,a,n),t!==null&&(fn(t,e,n),To(t,e,n))}};function lf(e,t,n,a,l,o,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,u):t.prototype&&t.prototype.isPureReactComponent?!wo(n,a)||!wo(l,o):!0}function of(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function cl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function rf(e){Di(e)}function sf(e){console.error(e)}function cf(e){Di(e)}function $i(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function uf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function $s(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){$i(e,t)},n}function df(e){return e=za(e),e.tag=3,e}function ff(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var o=a.value;e.payload=function(){return l(o)},e.callback=function(){uf(t,n,a)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){uf(t,n,a),typeof l!="function"&&(La===null?La=new Set([this]):La.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function P0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ll(t,n,l,!0),n=yn.current,n!==null){switch(n.tag){case 31:case 13:return Ln===null?sr():n.alternate===null&&_t===0&&(_t=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Ui?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Sc(e,a,l)),!1;case 22:return n.flags|=65536,a===Ui?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Sc(e,a,l)),!1}throw Error(d(435,n.tag))}return Sc(e,a,l),sr(),!1}if(Pe)return t=yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ms&&(e=Error(d(422),{cause:a}),zo(En(e,n)))):(a!==ms&&(t=Error(d(423),{cause:a}),zo(En(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=En(a,n),l=$s(e.stateNode,a,l),Ms(e,l),_t!==4&&(_t=2)),!1;var o=Error(d(520),{cause:a});if(o=En(o,n),Vo===null?Vo=[o]:Vo.push(o),_t!==4&&(_t=2),t===null)return!0;a=En(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=$s(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(La===null||!La.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=df(l),ff(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var Is=Error(d(461)),Gt=!1;function It(e,t,n,a){t.child=e===null?md(t,null,n,a):rl(t,e.child,n,a)}function hf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var u={};for(var p in a)p!=="ref"&&(u[p]=a[p])}else u=a;return al(t),a=Ls(e,t,n,u,o,l),p=_s(),e!==null&&!Gt?(Os(e,t,l),sa(e,t,l)):(Pe&&p&&hs(t),t.flags|=1,It(e,t,a,l),t.child)}function pf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!us(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,mf(e,t,o,a,l)):(e=Ri(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!oc(e,l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:wo,n(u,a)&&e.ref===t.ref)return sa(e,t,l)}return t.flags|=1,e=na(o,a),e.ref=t.ref,e.return=t,t.child=e}function mf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(wo(o,a)&&e.ref===t.ref)if(Gt=!1,t.pendingProps=a=o,oc(e,l))(e.flags&131072)!==0&&(Gt=!0);else return t.lanes=e.lanes,sa(e,t,l)}return Ws(e,t,n,a,l)}function gf(e,t,n,a){var l=a.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~o}else a=0,t.child=null;return yf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hi(t,o!==null?o.cachePool:null),o!==null?bd(t,o):Es(),vd(t);else return a=t.lanes=536870912,yf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Hi(t,o.cachePool),bd(t,o),Ea(),t.memoizedState=null):(e!==null&&Hi(t,null),Es(),Ea());return It(e,t,l,n),t.child}function Uo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yf(e,t,n,a,l){var o=ws();return o=o===null?null:{parent:qt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Hi(t,null),Es(),vd(t),e!==null&&Ll(e,t,a,!0),t.childLanes=l,null}function Ii(e,t){return t=Pi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bf(e,t,n){return rl(t,e.child,null,n),e=Ii(t,t.pendingProps),e.flags|=2,bn(t),t.memoizedState=null,e}function em(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(a.mode==="hidden")return e=Ii(t,a),t.lanes=536870912,Uo(null,e);if(Ts(t),(e=zt)?(e=Th(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Jt=t,zt=null)):e=null,e===null)throw wa(t);return t.lanes=536870912,null}return Ii(t,a)}var o=e.memoizedState;if(o!==null){var u=o.dehydrated;if(Ts(t),l)if(t.flags&256)t.flags&=-257,t=bf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Gt||Ll(e,t,n,!1),l=(n&e.childLanes)!==0,Gt||l){if(a=xt,a!==null&&(u=co(a,n),u!==0&&u!==o.retryLane))throw o.retryLane=u,Pa(e,u),fn(a,e,u),Is;sr(),t=bf(e,t,n)}else e=o.treeContext,zt=_n(u.nextSibling),Jt=t,Pe=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=Ii(t,a),t.flags|=4096;return t}return e=na(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ws(e,t,n,a,l){return al(t),n=Ls(e,t,n,a,void 0,l),a=_s(),e!==null&&!Gt?(Os(e,t,l),sa(e,t,l)):(Pe&&a&&hs(t),t.flags|=1,It(e,t,n,l),t.child)}function vf(e,t,n,a,l,o){return al(t),t.updateQueue=null,n=Sd(t,a,n,l),xd(e),a=_s(),e!==null&&!Gt?(Os(e,t,o),sa(e,t,o)):(Pe&&a&&hs(t),t.flags|=1,It(e,t,n,o),t.child)}function xf(e,t,n,a,l){if(al(t),t.stateNode===null){var o=El,u=n.contextType;typeof u=="object"&&u!==null&&(o=$t(u)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Js,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},ks(t),u=n.contextType,o.context=typeof u=="object"&&u!==null?$t(u):El,o.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Fs(t,n,u,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(u=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),u!==o.state&&Js.enqueueReplaceState(o,o.state,null),Lo(t,a,o,l),Ro(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,S=cl(n,p);o.props=S;var R=o.context,N=n.contextType;u=El,typeof N=="object"&&N!==null&&(u=$t(N));var G=n.getDerivedStateFromProps;N=typeof G=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,N||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||R!==u)&&of(t,o,a,u),ka=!1;var L=t.memoizedState;o.state=L,Lo(t,a,o,l),Ro(),R=t.memoizedState,p||L!==R||ka?(typeof G=="function"&&(Fs(t,n,G,a),R=t.memoizedState),(S=ka||lf(t,n,S,a,L,R,u))?(N||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),o.props=a,o.state=R,o.context=u,a=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,zs(e,t),u=t.memoizedProps,N=cl(n,u),o.props=N,G=t.pendingProps,L=o.context,R=n.contextType,S=El,typeof R=="object"&&R!==null&&(S=$t(R)),p=n.getDerivedStateFromProps,(R=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==G||L!==S)&&of(t,o,a,S),ka=!1,L=t.memoizedState,o.state=L,Lo(t,a,o,l),Ro();var O=t.memoizedState;u!==G||L!==O||ka||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof p=="function"&&(Fs(t,n,p,a),O=t.memoizedState),(N=ka||lf(t,n,N,a,L,O,S)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,O,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,O,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),o.props=a,o.state=O,o.context=S,a=N):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,Wi(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=rl(t,e.child,null,l),t.child=rl(t,null,n,l)):It(e,t,n,l),t.memoizedState=o.state,e=t.child):e=sa(e,t,l),e}function Sf(e,t,n,a){return tl(),t.flags|=256,It(e,t,n,a),t.child}var Ps={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:cd()}}function tc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=xn),e}function wf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(Nt.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(l?Da(t):Ea(),(e=zt)?(e=Th(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Jt=t,zt=null)):e=null,e===null)throw wa(t);return Uc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Ea(),l=t.mode,p=Pi({mode:"hidden",children:p},l),a=el(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,u,n),t.memoizedState=Ps,Uo(null,a)):(Da(t),nc(t,p))}var S=e.memoizedState;if(S!==null&&(p=S.dehydrated,p!==null)){if(o)t.flags&256?(Da(t),t.flags&=-257,t=ac(e,t,n)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),p=a.fallback,l=t.mode,a=Pi({mode:"visible",children:a.children},l),p=el(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,rl(t,e.child,null,n),a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,u,n),t.memoizedState=Ps,t=Uo(null,a));else if(Da(t),Uc(p)){if(u=p.nextSibling&&p.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(d(419)),a.stack="",a.digest=u,zo({value:a,source:null,stack:null}),t=ac(e,t,n)}else if(Gt||Ll(e,t,n,!1),u=(n&e.childLanes)!==0,Gt||u){if(u=xt,u!==null&&(a=co(u,n),a!==0&&a!==S.retryLane))throw S.retryLane=a,Pa(e,a),fn(u,e,a),Is;Bc(p)||sr(),t=ac(e,t,n)}else Bc(p)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,zt=_n(p.nextSibling),Jt=t,Pe=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=nc(t,a.children),t.flags|=4096);return t}return l?(Ea(),p=a.fallback,l=t.mode,S=e.child,R=S.sibling,a=na(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&65011712,R!==null?p=na(R,p):(p=el(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Uo(null,a),a=t.child,p=e.child.memoizedState,p===null?p=ec(n):(l=p.cachePool,l!==null?(S=qt._currentValue,l=l.parent!==S?{parent:S,pool:S}:l):l=cd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=tc(e,u,n),t.memoizedState=Ps,Uo(e.child,a)):(Da(t),n=e.child,e=n.sibling,n=na(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=n,t.memoizedState=null,n)}function nc(e,t){return t=Pi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pi(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function ac(e,t,n){return rl(t,e.child,null,n),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bs(e.return,t,n)}function lc(e,t,n,a,l,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=n,u.tailMode=l,u.treeForkCount=o)}function kf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var u=Nt.current,p=(u&2)!==0;if(p?(u=u&1|2,t.flags|=128):u&=1,P(Nt,u),It(e,t,a,n),a=Pe?ko:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cf(e,n,t);else if(e.tag===19)Cf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Yi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lc(t,!1,l,n,o,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Yi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lc(t,!0,n,null,o,a);break;case"together":lc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function sa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ll(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=na(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=na(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function tm(e,t,n){switch(t.tag){case 3:bt(t,t.stateNode.containerInfo),Ca(t,qt,e.memoizedState.cache),tl();break;case 27:case 5:Kt(t);break;case 4:bt(t,t.stateNode.containerInfo);break;case 10:Ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ts(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?wf(e,t,n):(Da(t),e=sa(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ll(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return kf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),P(Nt,Nt.current),a)break;return null;case 22:return t.lanes=0,gf(e,t,n,t.pendingProps);case 24:Ca(t,qt,e.memoizedState.cache)}return sa(e,t,n)}function zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Gt=!0;else{if(!oc(e,n)&&(t.flags&128)===0)return Gt=!1,tm(e,t,n);Gt=(e.flags&131072)!==0}else Gt=!1,Pe&&(t.flags&1048576)!==0&&nd(t,ko,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ol(t.elementType),t.type=e,typeof e=="function")us(e)?(a=cl(e,a),t.tag=1,t=xf(null,t,e,a,n)):(t.tag=0,t=Ws(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===fe){t.tag=11,t=hf(null,t,e,a,n);break e}else if(l===W){t.tag=14,t=pf(null,t,e,a,n);break e}}throw t=le(e)||e,Error(d(306,t,""))}}return t;case 0:return Ws(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=cl(a,t.pendingProps),xf(e,t,a,l,n);case 3:e:{if(bt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,zs(e,t),Lo(t,a,null,n);var u=t.memoizedState;if(a=u.cache,Ca(t,qt,a),a!==o.cache&&vs(t,[qt],n,!0),Ro(),a=u.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sf(e,t,a,n);break e}else if(a!==l){l=En(Error(d(424)),t),zo(l),t=Sf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,zt=_n(e.firstChild),Jt=t,Pe=!0,Sa=null,Rn=!0,n=md(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tl(),a===l){t=sa(e,t,n);break e}It(e,t,a,n)}t=t.child}return t;case 26:return Wi(e,t),e===null?(n=Bh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pe||(n=t.type,e=t.pendingProps,a=mr(Ae.current).createElement(n),a[Et]=t,a[Ut]=e,Wt(a,n,e),ve(a),t.stateNode=a):t.memoizedState=Bh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kt(t),e===null&&Pe&&(a=t.stateNode=_h(t.type,t.pendingProps,Ae.current),Jt=t,Rn=!0,l=zt,Ba(t.type)?(Nc=l,zt=_n(a.firstChild)):zt=l),It(e,t,t.pendingProps.children,n),Wi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((l=a=zt)&&(a=Rm(a,t.type,t.pendingProps,Rn),a!==null?(t.stateNode=a,Jt=t,zt=_n(a.firstChild),Rn=!1,l=!0):l=!1),l||wa(t)),Kt(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,_c(l,o)?a=null:u!==null&&_c(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=Ls(e,t,K0,null,null,n),Wo._currentValue=l),Wi(e,t),It(e,t,a,n),t.child;case 6:return e===null&&Pe&&((e=n=zt)&&(n=Lm(n,t.pendingProps,Rn),n!==null?(t.stateNode=n,Jt=t,zt=null,e=!0):e=!1),e||wa(t)),null;case 13:return wf(e,t,n);case 4:return bt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=rl(t,null,a,n):It(e,t,a,n),t.child;case 11:return hf(e,t,t.type,t.pendingProps,n);case 7:return It(e,t,t.pendingProps,n),t.child;case 8:return It(e,t,t.pendingProps.children,n),t.child;case 12:return It(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ca(t,t.type,a.value),It(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,al(t),l=$t(l),a=a(l),t.flags|=1,It(e,t,a,n),t.child;case 14:return pf(e,t,t.type,t.pendingProps,n);case 15:return mf(e,t,t.type,t.pendingProps,n);case 19:return kf(e,t,n);case 31:return em(e,t,n);case 22:return gf(e,t,n,t.pendingProps);case 24:return al(t),a=$t(qt),e===null?(l=ws(),l===null&&(l=xt,o=xs(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},ks(t),Ca(t,qt,l)):((e.lanes&n)!==0&&(zs(e,t),Lo(t,null,null,n),Ro()),l=e.memoizedState,o=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ca(t,qt,a)):(a=o.cache,Ca(t,qt,a),a!==l.cache&&vs(t,[qt],n,!0))),It(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function ca(e){e.flags|=4}function ic(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Wf())e.flags|=8192;else throw il=Ui,Cs}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Yh(t))if(Wf())e.flags|=8192;else throw il=Ui,Cs}function er(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hi():536870912,e.lanes|=t,Vl|=t)}function No(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function nm(e,t,n){var a=t.pendingProps;switch(ps(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(t),null;case 1:return Mt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),oa(qt),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gs())),Mt(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(ca(t),o!==null?(Mt(t),Mf(t,o)):(Mt(t),ic(t,l,null,a,n))):o?o!==e.memoizedState?(ca(t),Mt(t),Mf(t,o)):(Mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ca(t),Mt(t),ic(t,l,e,a,n)),null;case 27:if($e(t),n=Ae.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Mt(t),null}e=ae.current,Rl(t)?ld(t):(e=_h(l,a,n),t.stateNode=e,ca(t))}return Mt(t),null;case 5:if($e(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Mt(t),null}if(o=ae.current,Rl(t))ld(t);else{var u=mr(Ae.current);switch(o){case 1:o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=u.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?u.createElement(l,{is:a.is}):u.createElement(l)}}o[Et]=t,o[Ut]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)o.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=o;e:switch(Wt(o,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ca(t)}}return Mt(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Ae.current,Rl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Jt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||wh(e.nodeValue,n)),e||wa(t,!0)}else e=mr(e).createTextNode(a),e[Et]=t,t.stateNode=e}return Mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Rl(t),n!==null){if(e===null){if(!a)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[Et]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Mt(t),e=!1}else n=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(bn(t),t):(bn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Mt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Rl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(317));l[Et]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Mt(t),l=!1}else l=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(bn(t),t):(bn(t),null)}return bn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),er(t,t.updateQueue),Mt(t),null);case 4:return Oe(),e===null&&Ec(t.stateNode.containerInfo),Mt(t),null;case 10:return oa(t.type),Mt(t),null;case 19:if(_(Nt),a=t.memoizedState,a===null)return Mt(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)No(a,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Yi(e),o!==null){for(t.flags|=128,No(a,!1),e=o.updateQueue,t.updateQueue=e,er(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pu(n,e),n=n.sibling;return P(Nt,Nt.current&1|2),Pe&&aa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Rt()>or&&(t.flags|=128,l=!0,No(a,!1),t.lanes=4194304)}else{if(!l)if(e=Yi(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,er(t,e),No(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pe)return Mt(t),null}else 2*Rt()-a.renderingStartTime>or&&n!==536870912&&(t.flags|=128,l=!0,No(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Rt(),e.sibling=null,n=Nt.current,P(Nt,l?n&1|2:n&1),Pe&&aa(t,a.treeForkCount),e):(Mt(t),null);case 22:case 23:return bn(t),As(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Mt(t),t.subtreeFlags&6&&(t.flags|=8192)):Mt(t),n=t.updateQueue,n!==null&&er(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&_(ll),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(qt),Mt(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function am(e,t){switch(ps(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(qt),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $e(t),null;case 31:if(t.memoizedState!==null){if(bn(t),t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(bn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(Nt),null;case 4:return Oe(),null;case 10:return oa(t.type),null;case 22:case 23:return bn(t),As(),e!==null&&_(ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(qt),null;case 25:return null;default:return null}}function Df(e,t){switch(ps(t),t.tag){case 3:oa(qt),Oe();break;case 26:case 27:case 5:$e(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&bn(t);break;case 13:bn(t);break;case 19:_(Nt);break;case 10:oa(t.type);break;case 22:case 23:bn(t),As(),e!==null&&_(ll);break;case 24:oa(qt)}}function jo(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var o=n.create,u=n.inst;a=o(),u.destroy=a}n=n.next}while(n!==l)}}catch(p){pt(t,t.return,p)}}function Aa(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){var u=a.inst,p=u.destroy;if(p!==void 0){u.destroy=void 0,l=t;var S=n,R=p;try{R()}catch(N){pt(l,S,N)}}}a=a.next}while(a!==o)}}catch(N){pt(t,t.return,N)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yd(t,n)}catch(a){pt(e,e.return,a)}}}function Af(e,t,n){n.props=cl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){pt(e,t,a)}}function qo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){pt(e,t,l)}}function Qn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){pt(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){pt(e,t,l)}else n.current=null}function Tf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){pt(e,e.return,l)}}function rc(e,t,n){try{var a=e.stateNode;zm(a,e.type,n,t),a[Ut]=t}catch(l){pt(e,e.return,l)}}function Rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ba(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ba(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ea));else if(a!==4&&(a===27&&Ba(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}function tr(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Ba(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tr(e,t,n),e=e.sibling;e!==null;)tr(e,t,n),e=e.sibling}function Lf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Wt(t,a,n),t[Et]=e,t[Ut]=n}catch(o){pt(e,e.return,o)}}var ua=!1,Xt=!1,uc=!1,_f=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function lm(e,t){if(e=e.containerInfo,Rc=wr,e=Vu(e),as(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var u=0,p=-1,S=-1,R=0,N=0,G=e,L=null;t:for(;;){for(var O;G!==n||l!==0&&G.nodeType!==3||(p=u+l),G!==o||a!==0&&G.nodeType!==3||(S=u+a),G.nodeType===3&&(u+=G.nodeValue.length),(O=G.firstChild)!==null;)L=G,G=O;for(;;){if(G===e)break t;if(L===n&&++R===l&&(p=u),L===o&&++N===a&&(S=u),(O=G.nextSibling)!==null)break;G=L,L=G.parentNode}G=O}n=p===-1||S===-1?null:{start:p,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lc={focusedElem:e,selectionRange:n},wr=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var ye=cl(n.type,l);e=a.getSnapshotBeforeUpdate(ye,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Te){pt(n,n.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Hc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Ft=e;break}Ft=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:fa(e,n),a&4&&jo(5,n);break;case 1:if(fa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){pt(n,n.return,u)}else{var l=cl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){pt(n,n.return,u)}}a&64&&Ef(n),a&512&&qo(n,n.return);break;case 3:if(fa(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yd(e,t)}catch(u){pt(n,n.return,u)}}break;case 27:t===null&&a&4&&Lf(n);case 26:case 5:fa(e,n),t===null&&a&4&&Tf(n),a&512&&qo(n,n.return);break;case 12:fa(e,n);break;case 31:fa(e,n),a&4&&Uf(e,n);break;case 13:fa(e,n),a&4&&Nf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=hm.bind(null,n),_m(e,n))));break;case 22:if(a=n.memoizedState!==null||ua,!a){t=t!==null&&t.memoizedState!==null||Xt,l=ua;var o=Xt;ua=a,(Xt=t)&&!o?ha(e,n,(n.subtreeFlags&8772)!==0):fa(e,n),ua=l,Xt=o}break;case 30:break;default:fa(e,n)}}function Hf(e){var t=e.alternate;t!==null&&(e.alternate=null,Hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ho(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var At=null,sn=!1;function da(e,t,n){for(n=n.child;n!==null;)Bf(e,t,n),n=n.sibling}function Bf(e,t,n){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:Xt||Qn(n,t),da(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xt||Qn(n,t);var a=At,l=sn;Ba(n.type)&&(At=n.stateNode,sn=!1),da(e,t,n),Jo(n.stateNode),At=a,sn=l;break;case 5:Xt||Qn(n,t);case 6:if(a=At,l=sn,At=null,da(e,t,n),At=a,sn=l,At!==null)if(sn)try{(At.nodeType===9?At.body:At.nodeName==="HTML"?At.ownerDocument.body:At).removeChild(n.stateNode)}catch(o){pt(n,t,o)}else try{At.removeChild(n.stateNode)}catch(o){pt(n,t,o)}break;case 18:At!==null&&(sn?(e=At,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Wl(e)):Eh(At,n.stateNode));break;case 4:a=At,l=sn,At=n.stateNode.containerInfo,sn=!0,da(e,t,n),At=a,sn=l;break;case 0:case 11:case 14:case 15:Aa(2,n,t),Xt||Aa(4,n,t),da(e,t,n);break;case 1:Xt||(Qn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Af(n,t,a)),da(e,t,n);break;case 21:da(e,t,n);break;case 22:Xt=(a=Xt)||n.memoizedState!==null,da(e,t,n),Xt=a;break;default:da(e,t,n)}}function Uf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wl(e)}catch(n){pt(t,t.return,n)}}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wl(e)}catch(n){pt(t,t.return,n)}}function om(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _f),t;default:throw Error(d(435,e.tag))}}function nr(e,t){var n=om(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=pm.bind(null,e,a);a.then(l,l)}})}function cn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,u=t,p=u;e:for(;p!==null;){switch(p.tag){case 27:if(Ba(p.type)){At=p.stateNode,sn=!1;break e}break;case 5:At=p.stateNode,sn=!1;break e;case 3:case 4:At=p.stateNode.containerInfo,sn=!0;break e}p=p.return}if(At===null)throw Error(d(160));Bf(o,u,l),At=null,sn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jf(t,e),t=t.sibling}var Nn=null;function jf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cn(t,e),un(e),a&4&&(Aa(3,e,e.return),jo(3,e),Aa(5,e,e.return));break;case 1:cn(t,e),un(e),a&512&&(Xt||n===null||Qn(n,n.return)),a&64&&ua&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=Nn;if(cn(t,e),un(e),a&512&&(Xt||n===null||Qn(n,n.return)),a&4){var o=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":o=l.getElementsByTagName("title")[0],(!o||o[Ja]||o[Et]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),Wt(o,a,n),o[Et]=e,ve(o),a=o;break e;case"link":var u=jh("link","href",l).get(a+(n.href||""));if(u){for(var p=0;p<u.length;p++)if(o=u[p],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){u.splice(p,1);break t}}o=l.createElement(a),Wt(o,a,n),l.head.appendChild(o);break;case"meta":if(u=jh("meta","content",l).get(a+(n.content||""))){for(p=0;p<u.length;p++)if(o=u[p],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){u.splice(p,1);break t}}o=l.createElement(a),Wt(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[Et]=e,ve(o),a=o}e.stateNode=a}else qh(l,e.type,e.stateNode);else e.stateNode=Nh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?qh(l,e.type,e.stateNode):Nh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rc(e,e.memoizedProps,n.memoizedProps)}break;case 27:cn(t,e),un(e),a&512&&(Xt||n===null||Qn(n,n.return)),n!==null&&a&4&&rc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(cn(t,e),un(e),a&512&&(Xt||n===null||Qn(n,n.return)),e.flags&32){l=e.stateNode;try{Sl(l,"")}catch(ye){pt(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,rc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(uc=!0);break;case 6:if(cn(t,e),un(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ye){pt(e,e.return,ye)}}break;case 3:if(br=null,l=Nn,Nn=gr(t.containerInfo),cn(t,e),Nn=l,un(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Wl(t.containerInfo)}catch(ye){pt(e,e.return,ye)}uc&&(uc=!1,qf(e));break;case 4:a=Nn,Nn=gr(e.stateNode.containerInfo),cn(t,e),un(e),Nn=a;break;case 12:cn(t,e),un(e);break;case 31:cn(t,e),un(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 13:cn(t,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lr=Rt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 22:l=e.memoizedState!==null;var S=n!==null&&n.memoizedState!==null,R=ua,N=Xt;if(ua=R||l,Xt=N||S,cn(t,e),Xt=N,ua=R,un(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||S||ua||Xt||ul(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){S=n=t;try{if(o=S.stateNode,l)u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{p=S.stateNode;var G=S.memoizedProps.style,L=G!=null&&G.hasOwnProperty("display")?G.display:null;p.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ye){pt(S,S.return,ye)}}}else if(t.tag===6){if(n===null){S=t;try{S.stateNode.nodeValue=l?"":S.memoizedProps}catch(ye){pt(S,S.return,ye)}}}else if(t.tag===18){if(n===null){S=t;try{var O=S.stateNode;l?Ah(O,!0):Ah(S.stateNode,!1)}catch(ye){pt(S,S.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,nr(e,n))));break;case 19:cn(t,e),un(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 30:break;case 21:break;default:cn(t,e),un(e)}}function un(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Rf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=sc(e);tr(e,o,l);break;case 5:var u=n.stateNode;n.flags&32&&(Sl(u,""),n.flags&=-33);var p=sc(e);tr(e,p,u);break;case 3:case 4:var S=n.stateNode.containerInfo,R=sc(e);cc(e,R,S);break;default:throw Error(d(161))}}catch(N){pt(e,e.return,N)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Aa(4,t,t.return),ul(t);break;case 1:Qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Af(t,t.return,n),ul(t);break;case 27:Jo(t.stateNode);case 26:case 5:Qn(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function ha(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,u=o.flags;switch(o.tag){case 0:case 11:case 15:ha(l,o,n),jo(4,o);break;case 1:if(ha(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){pt(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var p=a.stateNode;try{var S=l.shared.hiddenCallbacks;if(S!==null)for(l.shared.hiddenCallbacks=null,l=0;l<S.length;l++)gd(S[l],p)}catch(R){pt(a,a.return,R)}}n&&u&64&&Ef(o),qo(o,o.return);break;case 27:Lf(o);case 26:case 5:ha(l,o,n),n&&a===null&&u&4&&Tf(o),qo(o,o.return);break;case 12:ha(l,o,n);break;case 31:ha(l,o,n),n&&u&4&&Uf(l,o);break;case 13:ha(l,o,n),n&&u&4&&Nf(l,o);break;case 22:o.memoizedState===null&&ha(l,o,n),qo(o,o.return);break;case 30:break;default:ha(l,o,n)}t=t.sibling}}function dc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Mo(n))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mo(e))}function jn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yf(e,t,n,a),t=t.sibling}function Yf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,n,a),l&2048&&jo(9,t);break;case 1:jn(e,t,n,a);break;case 3:jn(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mo(e)));break;case 12:if(l&2048){jn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,u=o.id,p=o.onPostCommit;typeof p=="function"&&p(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){pt(t,t.return,S)}}else jn(e,t,n,a);break;case 31:jn(e,t,n,a);break;case 13:jn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,u=t.alternate,t.memoizedState!==null?o._visibility&2?jn(e,t,n,a):Yo(e,t):o._visibility&2?jn(e,t,n,a):(o._visibility|=2,Yl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&dc(u,t);break;case 24:jn(e,t,n,a),l&2048&&fc(t.alternate,t);break;default:jn(e,t,n,a)}}function Yl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,u=t,p=n,S=a,R=u.flags;switch(u.tag){case 0:case 11:case 15:Yl(o,u,p,S,l),jo(8,u);break;case 23:break;case 22:var N=u.stateNode;u.memoizedState!==null?N._visibility&2?Yl(o,u,p,S,l):Yo(o,u):(N._visibility|=2,Yl(o,u,p,S,l)),l&&R&2048&&dc(u.alternate,u);break;case 24:Yl(o,u,p,S,l),l&&R&2048&&fc(u.alternate,u);break;default:Yl(o,u,p,S,l)}t=t.sibling}}function Yo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Yo(n,a),l&2048&&dc(a.alternate,a);break;case 24:Yo(n,a),l&2048&&fc(a.alternate,a);break;default:Yo(n,a)}t=t.sibling}}var Go=8192;function Gl(e,t,n){if(e.subtreeFlags&Go)for(e=e.child;e!==null;)Gf(e,t,n),e=e.sibling}function Gf(e,t,n){switch(e.tag){case 26:Gl(e,t,n),e.flags&Go&&e.memoizedState!==null&&Qm(n,Nn,e.memoizedState,e.memoizedProps);break;case 5:Gl(e,t,n);break;case 3:case 4:var a=Nn;Nn=gr(e.stateNode.containerInfo),Gl(e,t,n),Nn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Go,Go=16777216,Gl(e,t,n),Go=a):Gl(e,t,n));break;default:Gl(e,t,n)}}function Xf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Ft=a,Qf(a,e)}Xf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vf(e),e=e.sibling}function Vf(e){switch(e.tag){case 0:case 11:case 15:Xo(e),e.flags&2048&&Aa(9,e,e.return);break;case 3:Xo(e);break;case 12:Xo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ar(e)):Xo(e);break;default:Xo(e)}}function ar(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Ft=a,Qf(a,e)}Xf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Aa(8,t,t.return),ar(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ar(t));break;default:ar(t)}e=e.sibling}}function Qf(e,t){for(;Ft!==null;){var n=Ft;switch(n.tag){case 0:case 11:case 15:Aa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Mo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Ft=a;else e:for(n=e;Ft!==null;){a=Ft;var l=a.sibling,o=a.return;if(Hf(a),a===n){Ft=null;break e}if(l!==null){l.return=o,Ft=l;break e}Ft=o}}}var im={getCacheForType:function(e){var t=$t(qt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $t(qt).controller.signal}},rm=typeof WeakMap=="function"?WeakMap:Map,it=0,xt=null,Fe=null,Ie=0,ht=0,vn=null,Ta=!1,Xl=!1,hc=!1,pa=0,_t=0,Ra=0,dl=0,pc=0,xn=0,Vl=0,Vo=null,dn=null,mc=!1,lr=0,Kf=0,or=1/0,ir=null,La=null,Qt=0,_a=null,Ql=null,ma=0,gc=0,yc=null,Zf=null,Qo=0,bc=null;function Sn(){return(it&2)!==0&&Ie!==0?Ie&-Ie:E.T!==null?kc():gi()}function Ff(){if(xn===0)if((Ie&536870912)===0||Pe){var e=yl;yl<<=1,(yl&3932160)===0&&(yl=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function fn(e,t,n){(e===xt&&(ht===2||ht===9)||e.cancelPendingCommit!==null)&&(Kl(e,0),Oa(e,Ie,xn,!1)),Fa(e,n),((it&2)===0||e!==xt)&&(e===xt&&((it&2)===0&&(dl|=n),_t===4&&Oa(e,Ie,xn,!1)),Kn(e))}function Jf(e,t,n){if((it&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Za(e,t),l=a?um(e,t):xc(e,t,!0),o=a;do{if(l===0){Xl&&!a&&Oa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!sm(n)){l=xc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var p=e;l=Vo;var S=p.current.memoizedState.isDehydrated;if(S&&(Kl(p,u).flags|=256),u=xc(p,u,!1),u!==2){if(hc&&!S){p.errorRecoveryDisabledLanes|=o,dl|=o,l=4;break e}o=dn,dn=l,o!==null&&(dn===null?dn=o:dn.push.apply(dn,o))}l=u}if(o=!1,l!==2)continue}}if(l===1){Kl(e,0),Oa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Oa(a,t,xn,!Ta);break e;case 2:dn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=lr+300-Rt(),10<l)){if(Oa(a,t,xn,!Ta),bl(a,0,!0)!==0)break e;ma=t,a.timeoutHandle=Mh($f.bind(null,a,n,dn,ir,mc,t,xn,dl,Vl,Ta,o,"Throttled",-0,0),l);break e}$f(a,n,dn,ir,mc,t,xn,dl,Vl,Ta,o,null,-0,0)}}break}while(!0);Kn(e)}function $f(e,t,n,a,l,o,u,p,S,R,N,G,L,O){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},Gf(t,o,G);var ye=(o&62914560)===o?lr-Rt():(o&4194048)===o?Kf-Rt():0;if(ye=Km(G,ye),ye!==null){ma=o,e.cancelPendingCommit=ye(lh.bind(null,e,t,o,n,a,l,u,p,S,N,G,null,L,O)),Oa(e,o,u,!R);return}}lh(e,t,o,n,a,l,u,p,S)}function sm(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],o=l.getSnapshot;l=l.value;try{if(!mn(o(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oa(e,t,n,a){t&=~pc,t&=~dl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-vt(l),u=1<<o;a[o]=-1,l&=~u}n!==0&&pi(e,n,t)}function rr(){return(it&6)===0?(Ko(0),!1):!0}function vc(){if(Fe!==null){if(ht===0)var e=Fe.return;else e=Fe,la=nl=null,Hs(e),Bl=null,Eo=0,e=Fe;for(;e!==null;)Df(e.alternate,e),e=e.return;Fe=null}}function Kl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Em(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ma=0,vc(),xt=e,Fe=n=na(e.current,null),Ie=t,ht=0,vn=null,Ta=!1,Xl=Za(e,t),hc=!1,Vl=xn=pc=dl=Ra=_t=0,dn=Vo=null,mc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-vt(a),o=1<<l;t|=e[l],a&=~o}return pa=t,Ei(),n}function If(e,t){Xe=null,E.H=Bo,t===Hl||t===Bi?(t=fd(),ht=3):t===Cs?(t=fd(),ht=4):ht=t===Is?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vn=t,Fe===null&&(_t=1,$i(e,En(t,e.current)))}function Wf(){var e=yn.current;return e===null?!0:(Ie&4194048)===Ie?Ln===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===Ln:!1}function Pf(){var e=E.H;return E.H=Bo,e===null?Bo:e}function eh(){var e=E.A;return E.A=im,e}function sr(){_t=4,Ta||(Ie&4194048)!==Ie&&yn.current!==null||(Xl=!0),(Ra&134217727)===0&&(dl&134217727)===0||xt===null||Oa(xt,Ie,xn,!1)}function xc(e,t,n){var a=it;it|=2;var l=Pf(),o=eh();(xt!==e||Ie!==t)&&(ir=null,Kl(e,t)),t=!1;var u=_t;e:do try{if(ht!==0&&Fe!==null){var p=Fe,S=vn;switch(ht){case 8:vc(),u=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(t=!0);var R=ht;if(ht=0,vn=null,Zl(e,p,S,R),n&&Xl){u=0;break e}break;default:R=ht,ht=0,vn=null,Zl(e,p,S,R)}}cm(),u=_t;break}catch(N){If(e,N)}while(!0);return t&&e.shellSuspendCounter++,la=nl=null,it=a,E.H=l,E.A=o,Fe===null&&(xt=null,Ie=0,Ei()),u}function cm(){for(;Fe!==null;)th(Fe)}function um(e,t){var n=it;it|=2;var a=Pf(),l=eh();xt!==e||Ie!==t?(ir=null,or=Rt()+500,Kl(e,t)):Xl=Za(e,t);e:do try{if(ht!==0&&Fe!==null){t=Fe;var o=vn;t:switch(ht){case 1:ht=0,vn=null,Zl(e,t,o,1);break;case 2:case 9:if(ud(o)){ht=0,vn=null,nh(t);break}t=function(){ht!==2&&ht!==9||xt!==e||(ht=7),Kn(e)},o.then(t,t);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:ud(o)?(ht=0,vn=null,nh(t)):(ht=0,vn=null,Zl(e,t,o,7));break;case 5:var u=null;switch(Fe.tag){case 26:u=Fe.memoizedState;case 5:case 27:var p=Fe;if(u?Yh(u):p.stateNode.complete){ht=0,vn=null;var S=p.sibling;if(S!==null)Fe=S;else{var R=p.return;R!==null?(Fe=R,cr(R)):Fe=null}break t}}ht=0,vn=null,Zl(e,t,o,5);break;case 6:ht=0,vn=null,Zl(e,t,o,6);break;case 8:vc(),_t=6;break e;default:throw Error(d(462))}}dm();break}catch(N){If(e,N)}while(!0);return la=nl=null,E.H=a,E.A=l,it=n,Fe!==null?0:(xt=null,Ie=0,Ei(),_t)}function dm(){for(;Fe!==null&&!St();)th(Fe)}function th(e){var t=zf(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?cr(e):Fe=t}function nh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vf(n,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=vf(n,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:Hs(t);default:Df(n,t),t=Fe=Pu(t,pa),t=zf(n,t,pa)}e.memoizedProps=e.pendingProps,t===null?cr(e):Fe=t}function Zl(e,t,n,a){la=nl=null,Hs(t),Bl=null,Eo=0;var l=t.return;try{if(P0(e,l,t,n,Ie)){_t=1,$i(e,En(n,e.current)),Fe=null;return}}catch(o){if(l!==null)throw Fe=l,o;_t=1,$i(e,En(n,e.current)),Fe=null;return}t.flags&32768?(Pe||a===1?e=!0:Xl||(Ie&536870912)!==0?e=!1:(Ta=e=!0,(a===2||a===9||a===3||a===6)&&(a=yn.current,a!==null&&a.tag===13&&(a.flags|=16384))),ah(t,e)):cr(t)}function cr(e){var t=e;do{if((t.flags&32768)!==0){ah(t,Ta);return}e=t.return;var n=nm(t.alternate,t,pa);if(n!==null){Fe=n;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);_t===0&&(_t=5)}function ah(e,t){do{var n=am(e.alternate,e);if(n!==null){n.flags&=32767,Fe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Fe=e;return}Fe=e=n}while(e!==null);_t=6,Fe=null}function lh(e,t,n,a,l,o,u,p,S){e.cancelPendingCommit=null;do ur();while(Qt!==0);if((it&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=ss,qr(e,n,o,u,p,S),e===xt&&(Fe=xt=null,Ie=0),Ql=t,_a=e,ma=n,gc=o,yc=l,Zf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mm(kn,function(){return ch(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null,l=F.p,F.p=2,u=it,it|=4;try{lm(e,t,n)}finally{it=u,F.p=l,E.T=a}}Qt=1,oh(),ih(),rh()}}function oh(){if(Qt===1){Qt=0;var e=_a,t=Ql,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var a=F.p;F.p=2;var l=it;it|=4;try{jf(t,e);var o=Lc,u=Vu(e.containerInfo),p=o.focusedElem,S=o.selectionRange;if(u!==p&&p&&p.ownerDocument&&Xu(p.ownerDocument.documentElement,p)){if(S!==null&&as(p)){var R=S.start,N=S.end;if(N===void 0&&(N=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(N,p.value.length);else{var G=p.ownerDocument||document,L=G&&G.defaultView||window;if(L.getSelection){var O=L.getSelection(),ye=p.textContent.length,Te=Math.min(S.start,ye),yt=S.end===void 0?Te:Math.min(S.end,ye);!O.extend&&Te>yt&&(u=yt,yt=Te,Te=u);var M=Gu(p,Te),k=Gu(p,yt);if(M&&k&&(O.rangeCount!==1||O.anchorNode!==M.node||O.anchorOffset!==M.offset||O.focusNode!==k.node||O.focusOffset!==k.offset)){var A=G.createRange();A.setStart(M.node,M.offset),O.removeAllRanges(),Te>yt?(O.addRange(A),O.extend(k.node,k.offset)):(A.setEnd(k.node,k.offset),O.addRange(A))}}}}for(G=[],O=p;O=O.parentNode;)O.nodeType===1&&G.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<G.length;p++){var j=G[p];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}wr=!!Rc,Lc=Rc=null}finally{it=l,F.p=a,E.T=n}}e.current=t,Qt=2}}function ih(){if(Qt===2){Qt=0;var e=_a,t=Ql,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var a=F.p;F.p=2;var l=it;it|=4;try{Of(e,t.alternate,t)}finally{it=l,F.p=a,E.T=n}}Qt=3}}function rh(){if(Qt===4||Qt===3){Qt=0,Re();var e=_a,t=Ql,n=ma,a=Zf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Qt=5:(Qt=0,Ql=_a=null,sh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(La=null),uo(n),t=t.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=E.T,l=F.p,F.p=2,E.T=null;try{for(var o=e.onRecoverableError,u=0;u<a.length;u++){var p=a[u];o(p.value,{componentStack:p.stack})}}finally{E.T=t,F.p=l}}(ma&3)!==0&&ur(),Kn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===bc?Qo++:(Qo=0,bc=e):Qo=0,Ko(0)}}function sh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Mo(t)))}function ur(){return oh(),ih(),rh(),ch()}function ch(){if(Qt!==5)return!1;var e=_a,t=gc;gc=0;var n=uo(ma),a=E.T,l=F.p;try{F.p=32>n?32:n,E.T=null,n=yc,yc=null;var o=_a,u=ma;if(Qt=0,Ql=_a=null,ma=0,(it&6)!==0)throw Error(d(331));var p=it;if(it|=4,Vf(o.current),Yf(o,o.current,u,n),it=p,Ko(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{F.p=l,E.T=a,sh(e,t)}}function uh(e,t,n){t=En(n,t),t=$s(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Fa(e,2),Kn(e))}function pt(e,t,n){if(e.tag===3)uh(e,e,n);else for(;t!==null;){if(t.tag===3){uh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(La===null||!La.has(a))){e=En(n,e),n=df(2),a=Ma(t,n,2),a!==null&&(ff(n,a,t,e),Fa(a,2),Kn(a));break}}t=t.return}}function Sc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new rm;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(hc=!0,l.add(n),e=fm.bind(null,e,t,n),t.then(e,e))}function fm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,xt===e&&(Ie&n)===n&&(_t===4||_t===3&&(Ie&62914560)===Ie&&300>Rt()-lr?(it&2)===0&&Kl(e,0):pc|=n,Vl===Ie&&(Vl=0)),Kn(e)}function dh(e,t){t===0&&(t=hi()),e=Pa(e,t),e!==null&&(Fa(e,t),Kn(e))}function hm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dh(e,n)}function pm(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),dh(e,n)}function mm(e,t){return Ke(e,t)}var dr=null,Fl=null,wc=!1,fr=!1,Cc=!1,Ha=0;function Kn(e){e!==Fl&&e.next===null&&(Fl===null?dr=Fl=e:Fl=Fl.next=e),fr=!0,wc||(wc=!0,ym())}function Ko(e,t){if(!Cc&&fr){Cc=!0;do for(var n=!1,a=dr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var u=a.suspendedLanes,p=a.pingedLanes;o=(1<<31-vt(42|e)+1)-1,o&=l&~(u&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,mh(a,o))}else o=Ie,o=bl(a,a===xt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||Za(a,o)||(n=!0,mh(a,o));a=a.next}while(n);Cc=!1}}function gm(){fh()}function fh(){fr=wc=!1;var e=0;Ha!==0&&Dm()&&(e=Ha);for(var t=Rt(),n=null,a=dr;a!==null;){var l=a.next,o=hh(a,t);o===0?(a.next=null,n===null?dr=l:n.next=l,l===null&&(Fl=n)):(n=a,(e!==0||(o&3)!==0)&&(fr=!0)),a=l}Qt!==0&&Qt!==5||Ko(e),Ha!==0&&(Ha=0)}function hh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var u=31-vt(o),p=1<<u,S=l[u];S===-1?((p&n)===0||(p&a)!==0)&&(l[u]=jr(p,t)):S<=t&&(e.expiredLanes|=p),o&=~p}if(t=xt,n=Ie,n=bl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(ht===2||ht===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Dt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Za(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Dt(a),uo(n)){case 2:case 8:n=Hn;break;case 32:n=kn;break;case 268435456:n=ce;break;default:n=kn}return a=ph.bind(null,e),n=Ke(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Dt(a),e.callbackPriority=2,e.callbackNode=null,2}function ph(e,t){if(Qt!==0&&Qt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ur()&&e.callbackNode!==n)return null;var a=Ie;return a=bl(e,e===xt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Jf(e,a,t),hh(e,Rt()),e.callbackNode!=null&&e.callbackNode===n?ph.bind(null,e):null)}function mh(e,t){if(ur())return null;Jf(e,t,!0)}function ym(){Am(function(){(it&6)!==0?Ke(Yn,gm):fh()})}function kc(){if(Ha===0){var e=_l;e===0&&(e=gl,gl<<=1,(gl&261888)===0&&(gl=256)),Ha=e}return Ha}function gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xi(""+e)}function yh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function bm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=gh((l[Ut]||null).action),u=a.submitter;u&&(t=(t=u[Ut]||null)?gh(t.formAction):u.getAttribute("formAction"),t!==null&&(o=t,u=null));var p=new ki("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ha!==0){var S=u?yh(l,u):new FormData(l);Vs(n,{pending:!0,data:S,method:l.method,action:o},null,S)}}else typeof o=="function"&&(p.preventDefault(),S=u?yh(l,u):new FormData(l),Vs(n,{pending:!0,data:S,method:l.method,action:o},o,S))},currentTarget:l}]})}}for(var zc=0;zc<rs.length;zc++){var Mc=rs[zc],vm=Mc.toLowerCase(),xm=Mc[0].toUpperCase()+Mc.slice(1);Un(vm,"on"+xm)}Un(Zu,"onAnimationEnd"),Un(Fu,"onAnimationIteration"),Un(Ju,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(B0,"onTransitionRun"),Un(U0,"onTransitionStart"),Un(N0,"onTransitionCancel"),Un($u,"onTransitionEnd"),tt("onMouseEnter",["mouseout","mouseover"]),tt("onMouseLeave",["mouseout","mouseover"]),tt("onPointerEnter",["pointerout","pointerover"]),tt("onPointerLeave",["pointerout","pointerover"]),et("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),et("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),et("onBeforeInput",["compositionend","keypress","textInput","paste"]),et("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zo="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(" "),Sm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zo));function bh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var o=void 0;if(t)for(var u=a.length-1;0<=u;u--){var p=a[u],S=p.instance,R=p.currentTarget;if(p=p.listener,S!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(N){Di(N)}l.currentTarget=null,o=S}else for(u=0;u<a.length;u++){if(p=a[u],S=p.instance,R=p.currentTarget,p=p.listener,S!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(N){Di(N)}l.currentTarget=null,o=S}}}}function Je(e,t){var n=t[vl];n===void 0&&(n=t[vl]=new Set);var a=e+"__bubble";n.has(a)||(vh(t,e,2,!1),n.add(a))}function Dc(e,t,n){var a=0;t&&(a|=4),vh(n,e,a,t)}var hr="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[hr]){e[hr]=!0,Le.forEach(function(n){n!=="selectionchange"&&(Sm.has(n)||Dc(n,!1,e),Dc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hr]||(t[hr]=!0,Dc("selectionchange",!1,t))}}function vh(e,t,n,a){switch(Fh(t)){case 2:var l=Jm;break;case 8:l=$m;break;default:l=Xc}n=l.bind(null,t,n,e),l=void 0,!Fr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ac(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var p=a.stateNode.containerInfo;if(p===l)break;if(u===4)for(u=a.return;u!==null;){var S=u.tag;if((S===3||S===4)&&u.stateNode.containerInfo===l)return;u=u.return}for(;p!==null;){if(u=Wn(p),u===null)return;if(S=u.tag,S===5||S===6||S===26||S===27){a=o=u;continue e}p=p.parentNode}}a=a.return}Cu(function(){var R=o,N=Kr(n),G=[];e:{var L=Iu.get(e);if(L!==void 0){var O=ki,ye=e;switch(e){case"keypress":if(wi(n)===0)break e;case"keydown":case"keyup":O=p0;break;case"focusin":ye="focus",O=Wr;break;case"focusout":ye="blur",O=Wr;break;case"beforeblur":case"afterblur":O=Wr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=n0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=y0;break;case Zu:case Fu:case Ju:O=o0;break;case $u:O=v0;break;case"scroll":case"scrollend":O=e0;break;case"wheel":O=S0;break;case"copy":case"cut":case"paste":O=r0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Eu;break;case"toggle":case"beforetoggle":O=C0}var Te=(t&4)!==0,yt=!Te&&(e==="scroll"||e==="scrollend"),M=Te?L!==null?L+"Capture":null:L;Te=[];for(var k=R,A;k!==null;){var j=k;if(A=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||A===null||M===null||(j=mo(k,M),j!=null&&Te.push(Fo(k,j,A))),yt)break;k=k.return}0<Te.length&&(L=new O(L,ye,null,n,N),G.push({event:L,listeners:Te}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",L&&n!==Qr&&(ye=n.relatedTarget||n.fromElement)&&(Wn(ye)||ye[pn]))break e;if((O||L)&&(L=N.window===N?N:(L=N.ownerDocument)?L.defaultView||L.parentWindow:window,O?(ye=n.relatedTarget||n.toElement,O=R,ye=ye?Wn(ye):null,ye!==null&&(yt=m(ye),Te=ye.tag,ye!==yt||Te!==5&&Te!==27&&Te!==6)&&(ye=null)):(O=null,ye=R),O!==ye)){if(Te=Mu,j="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Te=Eu,j="onPointerLeave",M="onPointerEnter",k="pointer"),yt=O==null?L:ie(O),A=ye==null?L:ie(ye),L=new Te(j,k+"leave",O,n,N),L.target=yt,L.relatedTarget=A,j=null,Wn(N)===R&&(Te=new Te(M,k+"enter",ye,n,N),Te.target=A,Te.relatedTarget=yt,j=Te),yt=j,O&&ye)t:{for(Te=wm,M=O,k=ye,A=0,j=M;j;j=Te(j))A++;j=0;for(var Me=k;Me;Me=Te(Me))j++;for(;0<A-j;)M=Te(M),A--;for(;0<j-A;)k=Te(k),j--;for(;A--;){if(M===k||k!==null&&M===k.alternate){Te=M;break t}M=Te(M),k=Te(k)}Te=null}else Te=null;O!==null&&xh(G,L,O,Te,!1),ye!==null&&yt!==null&&xh(G,yt,ye,Te,!0)}}e:{if(L=R?ie(R):window,O=L.nodeName&&L.nodeName.toLowerCase(),O==="select"||O==="input"&&L.type==="file")var lt=Bu;else if(Ou(L))if(Uu)lt=_0;else{lt=R0;var Ce=T0}else O=L.nodeName,!O||O.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&Vr(R.elementType)&&(lt=Bu):lt=L0;if(lt&&(lt=lt(e,R))){Hu(G,lt,n,N);break e}Ce&&Ce(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&Xr(L,"number",L.value)}switch(Ce=R?ie(R):window,e){case"focusin":(Ou(Ce)||Ce.contentEditable==="true")&&(zl=Ce,ls=R,Co=null);break;case"focusout":Co=ls=zl=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,Qu(G,n,N);break;case"selectionchange":if(H0)break;case"keydown":case"keyup":Qu(G,n,N)}var Ve;if(es)e:{switch(e){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else kl?Lu(e,n)&&(We="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(We="onCompositionStart");We&&(Au&&n.locale!=="ko"&&(kl||We!=="onCompositionStart"?We==="onCompositionEnd"&&kl&&(Ve=ku()):(va=N,Jr="value"in va?va.value:va.textContent,kl=!0)),Ce=pr(R,We),0<Ce.length&&(We=new Du(We,e,null,n,N),G.push({event:We,listeners:Ce}),Ve?We.data=Ve:(Ve=_u(n),Ve!==null&&(We.data=Ve)))),(Ve=z0?M0(e,n):D0(e,n))&&(We=pr(R,"onBeforeInput"),0<We.length&&(Ce=new Du("onBeforeInput","beforeinput",null,n,N),G.push({event:Ce,listeners:We}),Ce.data=Ve)),bm(G,e,R,n,N)}bh(G,t)})}function Fo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,o=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||o===null||(l=mo(e,n),l!=null&&a.unshift(Fo(e,l,o)),l=mo(e,t),l!=null&&a.push(Fo(e,l,o))),e.tag===3)return a;e=e.return}return[]}function wm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xh(e,t,n,a,l){for(var o=t._reactName,u=[];n!==null&&n!==a;){var p=n,S=p.alternate,R=p.stateNode;if(p=p.tag,S!==null&&S===a)break;p!==5&&p!==26&&p!==27||R===null||(S=R,l?(R=mo(n,o),R!=null&&u.unshift(Fo(n,R,S))):l||(R=mo(n,o),R!=null&&u.push(Fo(n,R,S)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var Cm=/\r\n?/g,km=/\u0000|\uFFFD/g;function Sh(e){return(typeof e=="string"?e:""+e).replace(Cm,`
9
+ `).replace(km,"")}function wh(e,t){return t=Sh(t),Sh(e)===t}function gt(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Sl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Sl(e,""+a);break;case"className":bi(e,"class",a);break;case"tabIndex":bi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":bi(e,n,a);break;case"style":Su(e,a,o);break;case"data":if(t!=="object"){bi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=xi(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&gt(e,t,"name",l.name,l,null),gt(e,t,"formEncType",l.formEncType,l,null),gt(e,t,"formMethod",l.formMethod,l,null),gt(e,t,"formTarget",l.formTarget,l,null)):(gt(e,t,"encType",l.encType,l,null),gt(e,t,"method",l.method,l,null),gt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=xi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ea);break;case"onScroll":a!=null&&Je("scroll",e);break;case"onScrollEnd":a!=null&&Je("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=xi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Je("beforetoggle",e),Je("toggle",e),yi(e,"popover",a);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":yi(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Wp.get(n)||n,yi(e,n,a))}}function Tc(e,t,n,a,l,o){switch(n){case"style":Su(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Sl(e,a):(typeof a=="number"||typeof a=="bigint")&&Sl(e,""+a);break;case"onScroll":a!=null&&Je("scroll",e);break;case"onScrollEnd":a!=null&&Je("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!He.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),o=e[Ut]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,l),typeof a=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):yi(e,n,a)}}}function Wt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",e),Je("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var u=n[o];if(u!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:gt(e,t,o,u,n,null)}}l&&gt(e,t,"srcSet",n.srcSet,n,null),a&&gt(e,t,"src",n.src,n,null);return;case"input":Je("invalid",e);var p=o=u=l=null,S=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var N=n[a];if(N!=null)switch(a){case"name":l=N;break;case"type":u=N;break;case"checked":S=N;break;case"defaultChecked":R=N;break;case"value":o=N;break;case"defaultValue":p=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(d(137,t));break;default:gt(e,t,a,N,n,null)}}yu(e,o,p,S,R,u,l,!1);return;case"select":Je("invalid",e),a=u=o=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":o=p;break;case"defaultValue":u=p;break;case"multiple":a=p;default:gt(e,t,l,p,n,null)}t=o,n=u,e.multiple=!!a,t!=null?xl(e,!!a,t,!1):n!=null&&xl(e,!!a,n,!0);return;case"textarea":Je("invalid",e),o=l=a=null;for(u in n)if(n.hasOwnProperty(u)&&(p=n[u],p!=null))switch(u){case"value":a=p;break;case"defaultValue":l=p;break;case"children":o=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(91));break;default:gt(e,t,u,p,n,null)}vu(e,a,l,o);return;case"option":for(S in n)n.hasOwnProperty(S)&&(a=n[S],a!=null)&&(S==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":gt(e,t,S,a,n,null));return;case"dialog":Je("beforetoggle",e),Je("toggle",e),Je("cancel",e),Je("close",e);break;case"iframe":case"object":Je("load",e);break;case"video":case"audio":for(a=0;a<Zo.length;a++)Je(Zo[a],e);break;case"image":Je("error",e),Je("load",e);break;case"details":Je("toggle",e);break;case"embed":case"source":case"link":Je("error",e),Je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:gt(e,t,R,a,n,null)}return;default:if(Vr(t)){for(N in n)n.hasOwnProperty(N)&&(a=n[N],a!==void 0&&Tc(e,t,N,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&gt(e,t,p,a,n,null))}function zm(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,o=null,u=null,p=null,S=null,R=null,N=null;for(O in n){var G=n[O];if(n.hasOwnProperty(O)&&G!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=G;default:a.hasOwnProperty(O)||gt(e,t,O,null,a,G)}}for(var L in a){var O=a[L];if(G=n[L],a.hasOwnProperty(L)&&(O!=null||G!=null))switch(L){case"type":o=O;break;case"name":l=O;break;case"checked":R=O;break;case"defaultChecked":N=O;break;case"value":u=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:O!==G&&gt(e,t,L,O,a,G)}}Gr(e,u,p,S,R,N,o,l);return;case"select":O=u=p=L=null;for(o in n)if(S=n[o],n.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":O=S;default:a.hasOwnProperty(o)||gt(e,t,o,null,a,S)}for(l in a)if(o=a[l],S=n[l],a.hasOwnProperty(l)&&(o!=null||S!=null))switch(l){case"value":L=o;break;case"defaultValue":p=o;break;case"multiple":u=o;default:o!==S&&gt(e,t,l,o,a,S)}t=p,n=u,a=O,L!=null?xl(e,!!n,L,!1):!!a!=!!n&&(t!=null?xl(e,!!n,t,!0):xl(e,!!n,n?[]:"",!1));return;case"textarea":O=L=null;for(p in n)if(l=n[p],n.hasOwnProperty(p)&&l!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:gt(e,t,p,null,a,l)}for(u in a)if(l=a[u],o=n[u],a.hasOwnProperty(u)&&(l!=null||o!=null))switch(u){case"value":L=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&gt(e,t,u,l,a,o)}bu(e,L,O);return;case"option":for(var ye in n)L=n[ye],n.hasOwnProperty(ye)&&L!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:gt(e,t,ye,null,a,L));for(S in a)L=a[S],O=n[S],a.hasOwnProperty(S)&&L!==O&&(L!=null||O!=null)&&(S==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":gt(e,t,S,L,a,O));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 Te in n)L=n[Te],n.hasOwnProperty(Te)&&L!=null&&!a.hasOwnProperty(Te)&&gt(e,t,Te,null,a,L);for(R in a)if(L=a[R],O=n[R],a.hasOwnProperty(R)&&L!==O&&(L!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(d(137,t));break;default:gt(e,t,R,L,a,O)}return;default:if(Vr(t)){for(var yt in n)L=n[yt],n.hasOwnProperty(yt)&&L!==void 0&&!a.hasOwnProperty(yt)&&Tc(e,t,yt,void 0,a,L);for(N in a)L=a[N],O=n[N],!a.hasOwnProperty(N)||L===O||L===void 0&&O===void 0||Tc(e,t,N,L,a,O);return}}for(var M in n)L=n[M],n.hasOwnProperty(M)&&L!=null&&!a.hasOwnProperty(M)&&gt(e,t,M,null,a,L);for(G in a)L=a[G],O=n[G],!a.hasOwnProperty(G)||L===O||L==null&&O==null||gt(e,t,G,L,a,O)}function Ch(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Mm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],o=l.transferSize,u=l.initiatorType,p=l.duration;if(o&&p&&Ch(u)){for(u=0,p=l.responseEnd,a+=1;a<n.length;a++){var S=n[a],R=S.startTime;if(R>p)break;var N=S.transferSize,G=S.initiatorType;N&&Ch(G)&&(S=S.responseEnd,u+=N*(S<p?1:(p-R)/(S-R)))}if(--a,t+=8*(o+u)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Rc=null,Lc=null;function mr(e){return e.nodeType===9?e:e.ownerDocument}function kh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function _c(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Oc=null;function Dm(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var Mh=typeof setTimeout=="function"?setTimeout:void 0,Em=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Am=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Tm)}:Mh;function Tm(e){setTimeout(function(){throw e})}function Ba(e){return e==="head"}function Eh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),Wl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Jo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Jo(n);for(var o=n.firstChild;o;){var u=o.nextSibling,p=o.nodeName;o[Ja]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=u}}else n==="body"&&Jo(e.ownerDocument.body);n=l}while(n);Wl(t)}function Ah(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Hc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Hc(n),ho(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Rm(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ja])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function Lm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_n(e.nextSibling),e===null))return null;return e}function Th(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function Bc(e){return e.data==="$?"||e.data==="$~"}function Uc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _m(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Nc=null;function Rh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return _n(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function _h(e,t,n){switch(t=mr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function Jo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ho(e)}var On=new Map,Oh=new Set;function gr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=F.d;F.d={f:Om,r:Hm,D:Bm,C:Um,L:Nm,m:jm,X:Ym,S:qm,M:Gm};function Om(){var e=ga.f(),t=rr();return e||t}function Hm(e){var t=pe(e);t!==null&&t.tag===5&&t.type==="form"?$d(t):ga.r(e)}var Jl=typeof document>"u"?null:document;function Hh(e,t,n){var a=Jl;if(a&&typeof t=="string"&&t){var l=Mn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Oh.has(l)||(Oh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Wt(t,"link",e),ve(t),a.head.appendChild(t)))}}function Bm(e){ga.D(e),Hh("dns-prefetch",e,null)}function Um(e,t){ga.C(e,t),Hh("preconnect",e,t)}function Nm(e,t,n){ga.L(e,t,n);var a=Jl;if(a&&e&&t){var l='link[rel="preload"][as="'+Mn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Mn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Mn(n.imageSizes)+'"]')):l+='[href="'+Mn(e)+'"]';var o=l;switch(t){case"style":o=$l(e);break;case"script":o=Il(e)}On.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector($o(o))||t==="script"&&a.querySelector(Io(o))||(t=a.createElement("link"),Wt(t,"link",e),ve(t),a.head.appendChild(t)))}}function jm(e,t){ga.m(e,t);var n=Jl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Mn(a)+'"][href="'+Mn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Il(e)}if(!On.has(o)&&(e=z({rel:"modulepreload",href:e},t),On.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Io(o)))return}a=n.createElement("link"),Wt(a,"link",e),ve(a),n.head.appendChild(a)}}}function qm(e,t,n){ga.S(e,t,n);var a=Jl;if(a&&e){var l=be(a).hoistableStyles,o=$l(e);t=t||"default";var u=l.get(o);if(!u){var p={loading:0,preload:null};if(u=a.querySelector($o(o)))p.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(o))&&jc(e,n);var S=u=a.createElement("link");ve(S),Wt(S,"link",e),S._p=new Promise(function(R,N){S.onload=R,S.onerror=N}),S.addEventListener("load",function(){p.loading|=1}),S.addEventListener("error",function(){p.loading|=2}),p.loading|=4,yr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:p},l.set(o,u)}}}function Ym(e,t){ga.X(e,t);var n=Jl;if(n&&e){var a=be(n).hoistableScripts,l=Il(e),o=a.get(l);o||(o=n.querySelector(Io(l)),o||(e=z({src:e,async:!0},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),ve(o),Wt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Gm(e,t){ga.M(e,t);var n=Jl;if(n&&e){var a=be(n).hoistableScripts,l=Il(e),o=a.get(l);o||(o=n.querySelector(Io(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),ve(o),Wt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Bh(e,t,n,a){var l=(l=Ae.current)?gr(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=$l(n.href),n=be(l).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=$l(n.href);var o=be(l).hoistableStyles,u=o.get(e);if(u||(l=l.ownerDocument||l,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,u),(o=l.querySelector($o(e)))&&!o._p&&(u.instance=o,u.state.loading=5),On.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},On.set(e,n),o||Xm(l,e,n,u.state))),t&&a===null)throw Error(d(528,""));return u}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Il(n),n=be(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function $l(e){return'href="'+Mn(e)+'"'}function $o(e){return'link[rel="stylesheet"]['+e+"]"}function Uh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Xm(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Wt(t,"link",n),ve(t),e.head.appendChild(t))}function Il(e){return'[src="'+Mn(e)+'"]'}function Io(e){return"script[async]"+e}function Nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Mn(n.href)+'"]');if(a)return t.instance=a,ve(a),a;var l=z({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ve(a),Wt(a,"style",l),yr(a,n.precedence,e),t.instance=a;case"stylesheet":l=$l(n.href);var o=e.querySelector($o(l));if(o)return t.state.loading|=4,t.instance=o,ve(o),o;a=Uh(n),(l=On.get(l))&&jc(a,l),o=(e.ownerDocument||e).createElement("link"),ve(o);var u=o;return u._p=new Promise(function(p,S){u.onload=p,u.onerror=S}),Wt(o,"link",a),t.state.loading|=4,yr(o,n.precedence,e),t.instance=o;case"script":return o=Il(n.src),(l=e.querySelector(Io(o)))?(t.instance=l,ve(l),l):(a=n,(l=On.get(o))&&(a=z({},n),qc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ve(l),Wt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,yr(a,n.precedence,e));return t.instance}function yr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,o=l,u=0;u<a.length;u++){var p=a[u];if(p.dataset.precedence===t)o=p;else if(o!==l)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var br=null;function jh(e,t,n){if(br===null){var a=new Map,l=br=new Map;l.set(n,a)}else l=br,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var o=n[l];if(!(o[Ja]||o[Et]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var u=o.getAttribute(t)||"";u=e+u;var p=a.get(u);p?p.push(o):a.set(u,[o])}}return a}function qh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Vm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Qm(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=$l(a.href),o=t.querySelector($o(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,ve(o);return}o=t.ownerDocument||t,a=Uh(a),(l=On.get(l))&&jc(a,l),o=o.createElement("link"),ve(o);var u=o;u._p=new Promise(function(p,S){u.onload=p,u.onerror=S}),Wt(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=vr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yc=0;function Km(e,t){return e.stylesheets&&e.count===0&&Sr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Sr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Yc===0&&(Yc=62500*Mm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Yc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xr=null;function Sr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xr=new Map,t.forEach(Zm,e),xr=null,vr.call(e))}function Zm(e,t){if(!(t.state.loading&4)){var n=xr.get(e);if(n)var a=n.get(null);else{n=new Map,xr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var u=l[o];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(n.set(u.dataset.precedence,u),a=u)}a&&n.set(null,a)}l=t.instance,u=l.getAttribute("data-precedence"),o=n.get(u)||a,o===a&&n.set(null,l),n.set(u,l),this.count++,a=vr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),o?o.parentNode.insertBefore(l,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Wo={$$typeof:oe,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Fm(e,t,n,a,l,o,u,p,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Gh(e,t,n,a,l,o,u,p,S,R,N,G){return e=new Fm(e,t,n,u,S,R,N,G,p),t=1,o===!0&&(t|=24),o=gn(3,null,null,t),e.current=o,o.stateNode=e,t=xs(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},ks(o),e}function Xh(e){return e?(e=El,e):El}function Vh(e,t,n,a,l,o){l=Xh(l),a.context===null?a.context=l:a.pendingContext=l,a=za(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ma(e,a,t),n!==null&&(fn(n,e,t),To(n,e,t))}function Qh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gc(e,t){Qh(e,t),(e=e.alternate)&&Qh(e,t)}function Kh(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&fn(t,e,67108864),Gc(e,67108864)}}function Zh(e){if(e.tag===13||e.tag===31){var t=Sn();t=In(t);var n=Pa(e,t);n!==null&&fn(n,e,t),Gc(e,t)}}var wr=!0;function Jm(e,t,n,a){var l=E.T;E.T=null;var o=F.p;try{F.p=2,Xc(e,t,n,a)}finally{F.p=o,E.T=l}}function $m(e,t,n,a){var l=E.T;E.T=null;var o=F.p;try{F.p=8,Xc(e,t,n,a)}finally{F.p=o,E.T=l}}function Xc(e,t,n,a){if(wr){var l=Vc(a);if(l===null)Ac(e,t,a,Cr,n),Jh(e,a);else if(Wm(l,e,t,n,a))a.stopPropagation();else if(Jh(e,a),t&4&&-1<Im.indexOf(e)){for(;l!==null;){var o=pe(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var u=$n(o.pendingLanes);if(u!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;u;){var S=1<<31-vt(u);p.entanglements[1]|=S,u&=~S}Kn(o),(it&6)===0&&(or=Rt()+500,Ko(0))}}break;case 31:case 13:p=Pa(o,2),p!==null&&fn(p,o,2),rr(),Gc(o,2)}if(o=Vc(a),o===null&&Ac(e,t,a,Cr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Ac(e,t,a,null,n)}}function Vc(e){return e=Kr(e),Qc(e)}var Cr=null;function Qc(e){if(Cr=null,e=Wn(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=C(t),e!==null)return e;e=null}else if(n===31){if(e=D(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cr=e,null}function Fh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Cn()){case Yn:return 2;case Hn:return 8;case kn:case Z:return 32;case ce:return 268435456;default:return 32}default:return 32}}var Kc=!1,Ua=null,Na=null,ja=null,Po=new Map,ei=new Map,qa=[],Im="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 Jh(e,t){switch(e){case"focusin":case"focusout":Ua=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":Po.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ei.delete(t.pointerId)}}function ti(e,t,n,a,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[l]},t!==null&&(t=pe(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Wm(e,t,n,a,l){switch(t){case"focusin":return Ua=ti(Ua,e,t,n,a,l),!0;case"dragenter":return Na=ti(Na,e,t,n,a,l),!0;case"mouseover":return ja=ti(ja,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return Po.set(o,ti(Po.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,ei.set(o,ti(ei.get(o)||null,e,t,n,a,l)),!0}return!1}function $h(e){var t=Wn(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=C(n),t!==null){e.blockedOn=t,Bn(e.priority,function(){Zh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Bn(e.priority,function(){Zh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qr=a,n.target.dispatchEvent(a),Qr=null}else return t=pe(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Ih(e,t,n){kr(e)&&n.delete(t)}function Pm(){Kc=!1,Ua!==null&&kr(Ua)&&(Ua=null),Na!==null&&kr(Na)&&(Na=null),ja!==null&&kr(ja)&&(ja=null),Po.forEach(Ih),ei.forEach(Ih)}function zr(e,t){e.blockedOn===t&&(e.blockedOn=null,Kc||(Kc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Pm)))}var Mr=null;function Wh(e){Mr!==e&&(Mr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Mr===e&&(Mr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Qc(a||n)===null)continue;break}var o=pe(n);o!==null&&(e.splice(t,3),t-=3,Vs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Wl(e){function t(S){return zr(S,e)}Ua!==null&&zr(Ua,e),Na!==null&&zr(Na,e),ja!==null&&zr(ja,e),Po.forEach(t),ei.forEach(t);for(var n=0;n<qa.length;n++){var a=qa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<qa.length&&(n=qa[0],n.blockedOn===null);)$h(n),n.blockedOn===null&&qa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],o=n[a+1],u=l[Ut]||null;if(typeof o=="function")u||Wh(n);else if(u){var p=null;if(o&&o.hasAttribute("formAction")){if(l=o,u=o[Ut]||null)p=u.formAction;else if(Qc(l)!==null)continue}else p=u.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Wh(n)}}}function Ph(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(u){return l=u})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Zc(e){this._internalRoot=e}Dr.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Sn();Vh(n,a,e,t,null,null)},Dr.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vh(e.current,2,null,e,null,null),rr(),t[pn]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var t=gi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qa.length&&t!==0&&t<qa[n].priority;n++);qa.splice(n,0,e),n===0&&$h(e)}};var ep=s.version;if(ep!=="19.2.4")throw Error(d(527,ep,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var eg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Er.isDisabled&&Er.supportsFiber)try{Ne=Er.inject(eg),De=Er}catch{}}return li.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=rf,o=sf,u=cf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Gh(e,1,!1,null,null,n,a,null,l,o,u,Ph),e[pn]=t.current,Ec(e),new Zc(t)},li.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=rf,u=sf,p=cf,S=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(S=n.formState)),t=Gh(e,1,!0,t,n??null,a,l,S,o,u,p,Ph),t.context=Xh(null),n=t.current,a=Sn(),a=In(a),l=za(a),l.callback=null,Ma(n,l,a),n=a,t.current.lanes=n,Fa(t,n),Kn(t),e[pn]=t.current,Ec(e),new Dr(t)},li.version="19.2.4",li}var xp;function i1(){if(xp)return Pc.exports;xp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),Pc.exports=o1(),Pc.exports}var r1=i1(),Sp=function(s,f){var d=arguments;if(f==null||!di.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=hu,m[1]=fu(s,f);for(var C=2;C<h;C++)m[C]=d[C];return v.createElement.apply(null,m)};(function(i){var s;s||(s=i.JSX||(i.JSX={}))})(Sp||(Sp={}));function y(){for(var i=arguments.length,s=new Array(i),f=0;f<i;f++)s[f]=arguments[f];return jp(s)}function on(){var i=y.apply(void 0,arguments),s="animation-"+i.name;return{name:s,styles:"@keyframes "+s+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const s1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0},c1={isOpen:!1,openStudio:()=>{},closeStudio:()=>{},toggleStudio:()=>{},currentPath:"public",setCurrentPath:()=>{},navigateUp:()=>{},selectedItems:new Set,toggleSelection:()=>{},selectRange:()=>{},selectAll:()=>{},clearSelection:()=>{},lastSelectedPath:null,viewMode:"grid",setViewMode:()=>{},focusedItem:null,setFocusedItem:()=>{},meta:null,setMeta:()=>{},isLoading:!1,setIsLoading:()=>{},refreshKey:0,triggerRefresh:()=>{},editedImageKey:null,setEditedImageKey:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:s1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Yp=v.createContext(c1);function oo(){return v.useContext(Yp)}const fi="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",c={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},V={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ro=y("font-family:",fi,";font-size:",V.base,";line-height:1.5;color:",c.text,";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;*,*::before,*::after{box-sizing:border-box;}button,input,select,textarea{font-family:inherit;font-size:inherit;}",""),u1=on`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,d1=on`
13
+ from {
14
+ opacity: 0;
15
+ transform: translateY(-8px) scale(0.98);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateY(0) scale(1);
20
+ }
21
+ `,f1=on`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,_e={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",u1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," background-color:",c.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:420px;width:90%;animation:",d1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",V.base,";color:",c.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover{background-color:",c.primaryHover,";border-color:",c.primaryHover,";}",""),btnDanger:y("background-color:",c.danger,";border:1px solid ",c.danger,";color:white;&:hover{background-color:",c.dangerHover,";border-color:",c.dangerHover,";}","")};function ao({title:i,message:s,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:C}){return r("div",{css:_e.overlay,onClick:C,children:b("div",{css:_e.modal,onClick:D=>D.stopPropagation(),children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),r("div",{css:_e.body,children:r("p",{css:_e.message,children:s})}),b("div",{css:_e.footer,children:[r("button",{css:[_e.btn,_e.btnCancel,"",""],onClick:C,children:d}),r("button",{css:[_e.btn,h==="danger"?_e.btnDanger:_e.btnConfirm,"",""],onClick:m,children:f})]})]})})}const h1={input:y("width:100%;padding:10px 12px;font-size:",V.base,";border:1px solid ",c.border,";border-radius:6px;background:",c.surface,";color:",c.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 2px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}","")};function hl({title:i,message:s,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:C="Cancel",isLoading:D=!1,loadingLabel:w="Processing...",onConfirm:g,onCancel:T}){const[z,B]=dt.useState(d),q=H=>{H.preventDefault(),z.trim()&&!D&&g(z.trim())};return r("div",{css:_e.overlay,onClick:D?void 0:T,children:r("div",{css:_e.modal,onClick:H=>H.stopPropagation(),children:b("form",{onSubmit:q,children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),b("div",{css:_e.body,children:[s&&r("p",{css:_e.message,children:s}),f&&r("label",{css:_e.message,children:f}),r("input",{css:h1.input,type:"text",value:z,onChange:H=>B(H.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:_e.footer,children:[r("button",{type:"button",css:[_e.btn,_e.btnCancel,"",""],onClick:T,disabled:D,children:C}),r("button",{type:"submit",css:[_e.btn,_e.btnConfirm,"",""],disabled:!z.trim()||D,children:D?b(nt,{children:[r("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",f1," 0.75s linear infinite;margin-right:6px;","")}),w]}):m})]})]})})})}function pu({title:i,message:s,buttonLabel:f="OK",onClose:d}){return r("div",{css:_e.overlay,onClick:d,children:b("div",{css:_e.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),r("div",{css:_e.body,children:r("p",{css:_e.message,children:s})}),r("div",{css:_e.footer,children:r("button",{css:[_e.btn,_e.btnConfirm,"",""],onClick:d,children:f})})]})})}const Ga={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",c.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",c.primary,", ",c.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",V.sm,";color:",c.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",V.xs,";color:",c.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:y("font-size:",V.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function pl({title:i,progress:s,onClose:f,onDeleteOrphans:d,onStop:h}){const m=s.status==="complete",C=s.status==="error",D=s.status==="stopped",w=s.status==="stopping",g=m||C||D,T=!g||w;return r("div",{css:_e.overlay,children:b("div",{css:_e.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),r("div",{css:_e.body,children:C?r("p",{css:_e.message,children:s.message||"An error occurred"}):D?b("p",{css:_e.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):m?b(nt,{children:[b("p",{css:_e.message,children:[s.message?s.message:s.isDelete?b(nt,{children:["Deleted ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(nt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isMove?b(nt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(nt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?b(nt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(nt,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?b(nt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?b(nt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(nt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(nt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?b(nt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&b("div",{css:Ga.errorList,children:[s.errorMessages.slice(0,10).map((z,B)=>r("p",{css:Ga.errorItem,children:z},B)),s.errorMessages.length>10&&b("p",{css:Ga.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):b(nt,{children:[r("p",{css:_e.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),b("div",{css:Ga.progressContainer,children:[r("div",{css:Ga.progressBar,children:r("div",{css:Ga.progressFill,style:{width:`${s.percent}%`}})}),b("div",{css:Ga.progressText,children:[b("span",{children:[s.current," of ",s.total]}),b("span",{children:[s.percent,"%"]})]}),s.currentFile&&r("p",{css:Ga.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),b("div",{css:_e.footer,children:[T&&h&&r("button",{css:[_e.btn,_e.btnDanger,"",""],onClick:h,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),g&&s.orphanedFiles&&s.orphanedFiles.length>0&&d&&b("button",{css:[_e.btn,_e.btnDanger,"",""],onClick:d,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),g&&r("button",{css:[_e.btn,_e.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function Gp(i){const{setShowProgress:s,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,m=v.useRef(null),C=v.useRef(!1),D=v.useRef(!1),w=v.useRef(null),g=v.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:B,body:q,title:H,operationType:Y,onComplete:re,onError:K}=z;if(C.current){console.warn("Streaming operation already in progress");return}C.current=!0,D.current=!1;const oe=`${B.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;w.current=oe;const fe=new AbortController;m.current=fe;const X=async()=>{D.current=!0,d(I=>({...I,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:oe})})}catch{}};fe.signal.addEventListener("abort",X),f(H),s(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const I=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...q,operationId:oe})});if(!I.ok){const Q=await I.json().catch(()=>({}));throw new Error(Q.error||`Request failed: ${I.status}`)}if(!I.body)throw new Error("No response body");const W=I.body.getReader(),ne=new TextDecoder;let U="";try{for(;;){const{done:Q,value:he}=await W.read();if(Q)break;U+=ne.decode(he,{stream:!0});const me=U.split(`
25
+
26
+ `);U=me.pop()||"";for(const ge of me)if(ge.startsWith("data: "))try{const le=JSON.parse(ge.slice(6));if(le.type==="start")d(Ee=>({...Ee,total:le.total||Ee.total}));else if(le.type==="progress")d({current:le.current||0,total:le.total||0,percent:le.percent||Math.round((le.current||0)/(le.total||1)*100),status:"processing",currentFile:le.currentFile,message:le.message});else if(le.type==="cleanup")d(Ee=>({...Ee,status:"cleanup",message:le.message}));else if(le.type==="complete"){const Ee=le.cancelled===!0,E=le.processed??le.moved??le.renamed??le.pushed??le.downloaded??le.added??le.imported??le.deleted??le.current??0;d({current:E,total:E,percent:100,status:Ee?"stopped":le.errors&&le.errors>0?"error":"complete",message:le.message,processed:E,errors:le.errors,orphanedFiles:le.orphanedFiles,isDelete:Y==="delete",isMove:Y==="move",isScan:Y==="scan"}),h(),re?.(le)}else le.type==="error"&&(d(Ee=>({...Ee,status:"error",message:le.message})),K?.(le.message||"Unknown error"))}catch{}}}catch(Q){if(!D.current)throw Q}finally{fe.signal.removeEventListener("abort",X)}}catch(I){if(!D.current){const W=I instanceof Error?I.message:"Operation failed";console.error(`${H} error:`,I),d({current:0,total:0,percent:0,status:"error",message:W}),K?.(W)}}finally{C.current=!1,m.current=null,w.current=null}},[s,f,d,h]),stop:g,get isRunning(){return C.current}}}const p1=on`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,m1=on`
30
+ from {
31
+ opacity: 0;
32
+ transform: translateY(-8px) scale(0.98);
33
+ }
34
+ to {
35
+ opacity: 1;
36
+ transform: translateY(0) scale(1);
37
+ }
38
+ `,Ot={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",p1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," background-color:",c.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column;animation:",m1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:y("font-size:",V.base,";color:",c.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:y("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",c.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:y("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",c.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",c.textSecondary,";}",""),folderItemSelected:y("background-color:",c.primaryLight,";border-color:",c.primary,";&:hover{background-color:",c.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:y("font-size:",V.base,";color:",c.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",c.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",c.border,";border-top-color:",c.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Xp({selectedItems:i,currentPath:s,onMove:f,onCancel:d}){const[h,m]=v.useState([]),[C,D]=v.useState(!0),[w,g]=v.useState(null);v.useEffect(()=>{async function H(){try{const Y=await fetch("/api/studio/list-folders");if(Y.ok){const re=await Y.json();console.log("Loaded folders:",re),m(re.folders||[])}else console.error("Failed to load folders:",Y.status,await Y.text())}catch(Y){console.error("Failed to load folders:",Y)}finally{D(!1)}}H()},[]);const T=Array.from(i),z=h.filter(H=>!T.some(Y=>H.path===Y||H.path.startsWith(Y+"/"))),B=H=>H===s,q=()=>{w&&f(w)};return r("div",{css:Ot.overlay,onClick:d,children:b("div",{css:Ot.modal,onClick:H=>H.stopPropagation(),children:[r("div",{css:Ot.header,children:r("h3",{css:Ot.title,children:"Move Items"})}),b("div",{css:Ot.body,children:[b("p",{css:Ot.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),C?r("div",{css:Ot.loading,children:r("div",{css:Ot.spinner})}):z.length===0?r("div",{css:Ot.loading,children:"No available folders to move to."}):r("div",{css:Ot.folderList,children:z.map(H=>{const Y=B(H.path);return b("div",{css:[Ot.folderItem,w===H.path&&Ot.folderItemSelected,Y&&Ot.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!Y&&g(H.path),children:[H.depth>0&&r("div",{css:Ot.treeIndent,children:Array.from({length:H.depth}).map((re,K)=>r("div",{css:Ot.treeLine},K))}),r("svg",{css:Ot.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),b("span",{css:Ot.folderName,children:[H.name,Y&&" (current)"]})]},H.path)})})]}),b("div",{css:Ot.footer,children:[r("button",{css:[Ot.btn,Ot.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[Ot.btn,Ot.btnConfirm,"",""],onClick:q,disabled:!w,children:"Move Here"})]})]})})}const g1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
39
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
40
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
41
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
42
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
43
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,xe={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:y("background:",c.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:y("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",c.border,";",""),icon:y("width:32px;height:32px;color:",c.primary,";flex-shrink:0;",""),title:y("font-size:",V.xl,";font-weight:600;color:",c.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",c.textMuted,";border-radius:4px;&:hover{color:",c.text,";background:",c.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",V.base,";color:",c.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:y("width:28px;height:28px;border-radius:50%;background:",c.primaryLight,";color:",c.primary,";font-size:",V.sm,";font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;",""),stepContent:{name:"pkc2k3",styles:"flex:1;padding-top:3px"},stepTitle:y("font-size:",V.base,";font-weight:500;color:",c.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",V.sm,";color:",c.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",c.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",c.background,";border:1px solid ",c.border,";border-radius:8px;padding:16px;padding-right:48px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;font-size:13px;line-height:1.8;color:",c.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",c.primary,";",""),envValue:y("color:",c.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;color:",c.textMuted,";transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";color:",c.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:y("padding:16px 24px;border-top:1px solid ",c.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",V.base,";font-weight:500;border:1px solid ",c.border,";background:",c.surface,";color:",c.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",V.base,";font-weight:500;border:none;background:",c.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",c.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Vp({isOpen:i,onClose:s}){const[f,d]=v.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(g1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return i?r("div",{css:xe.overlay,onClick:s,children:b("div",{css:xe.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:xe.header,children:[r("svg",{css:xe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("h2",{css:xe.title,children:"Set Up CDN Storage"}),r("button",{css:xe.closeBtn,onClick:s,children:r("svg",{css:xe.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:xe.content,children:[r("p",{css:xe.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:xe.steps,children:[b("li",{css:xe.step,children:[r("span",{css:xe.stepNumber,children:"1"}),b("div",{css:xe.stepContent,children:[r("h4",{css:xe.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:xe.stepDesc,children:["Sign up at"," ",r("a",{css:xe.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),b("li",{css:xe.step,children:[r("span",{css:xe.stepNumber,children:"2"}),b("div",{css:xe.stepContent,children:[r("h4",{css:xe.stepTitle,children:"Create an R2 bucket"}),b("p",{css:xe.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),b("li",{css:xe.step,children:[r("span",{css:xe.stepNumber,children:"3"}),b("div",{css:xe.stepContent,children:[r("h4",{css:xe.stepTitle,children:"Enable public access"}),b("p",{css:xe.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:xe.step,children:[r("span",{css:xe.stepNumber,children:"4"}),b("div",{css:xe.stepContent,children:[r("h4",{css:xe.stepTitle,children:"Create API token"}),r("p",{css:xe.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:xe.step,children:[r("span",{css:xe.stepNumber,children:"5"}),b("div",{css:xe.stepContent,children:[r("h4",{css:xe.stepTitle,children:"Add environment variables"}),b("p",{css:xe.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:xe.envVarsWrapper,children:[b("div",{css:xe.envVars,children:[b("span",{css:xe.envVar,children:[r("span",{css:xe.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:xe.envValue,children:"your_account_id"})]}),b("span",{css:xe.envVar,children:[r("span",{css:xe.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:xe.envValue,children:"your_access_key"})]}),b("span",{css:xe.envVar,children:[r("span",{css:xe.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:xe.envValue,children:"your_secret_key"})]}),b("span",{css:xe.envVar,children:[r("span",{css:xe.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:xe.envValue,children:"your_bucket_name"})]}),b("span",{css:xe.envVar,children:[r("span",{css:xe.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:xe.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:xe.envVar,children:[r("span",{css:xe.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:xe.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:xe.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&r("span",{css:xe.copiedTooltip,children:"Copied!"}),r("svg",{css:xe.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),b("div",{css:xe.footer,children:[b("a",{css:xe.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:xe.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),r("button",{css:xe.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const y1=on`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,b1=on`
47
+ from {
48
+ opacity: 0;
49
+ transform: translateY(-8px) scale(0.98);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateY(0) scale(1);
54
+ }
55
+ `,wt={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",y1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," background-color:",c.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:520px;width:90%;animation:",b1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",c.border,";",""),tab:y("padding:12px 20px;font-size:",V.base,";font-weight:500;color:",c.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",c.text,";}",""),tabActive:y("color:",c.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",c.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",c.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",c.primary,";background-color:",c.primaryLight,";}",""),dropzoneActive:y("border-color:",c.primary,";background-color:",c.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",c.textMuted,";",""),dropzoneText:y("font-size:",V.base,";color:",c.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",V.sm,";color:",c.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",V.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",c.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 3px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}",""),textareaLabel:y("font-size:",V.sm,";color:",c.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",c.background,";border-radius:6px;font-size:",V.sm,";color:",c.text,";","")};function v1({currentPath:i,onClose:s,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:C}){const[D,w]=v.useState("upload"),[g,T]=v.useState([]),[z,B]=v.useState(""),[q,H]=v.useState(!1),[Y,re]=v.useState(!1),[K,ue]=v.useState(!1),oe=v.useRef(null),fe=v.useCallback(U=>{U&&T(Array.from(U))},[]),X=v.useCallback(U=>{U.preventDefault(),H(!1),fe(U.dataTransfer.files)},[fe]),I=v.useRef(!1),W=v.useCallback(async()=>{if(g.length!==0){if(h&&m&&C){s(),I.current=!1,m("Uploading Files"),h(!0),C({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let U=0;const Q=[];for(let he=0;he<g.length;he++){if(I.current){C(le=>({...le,status:"stopped",message:`Stopped. Uploaded ${U} file${U!==1?"s":""}.`})),f();return}const me=g[he],ge=new FormData;ge.append("file",me),ge.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:ge})).ok?U++:Q.push(me.name)}catch{Q.push(me.name)}C({current:he+1,total:g.length,percent:Math.round((he+1)/g.length*100),status:"processing",currentFile:me.name})}C({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${U} file${U!==1?"s":""}.${Q.length>0?` ${Q.length} failed.`:""}`}),f();return}re(!0);try{for(const U of g){const Q=new FormData;Q.append("file",U),Q.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:Q})}f(),s()}catch(U){console.error("Upload failed:",U)}finally{re(!1)}}},[g,i,f,s,h,m,C]),ne=v.useCallback(async()=>{const U=z.split(`
56
+ `).map(Q=>Q.trim()).filter(Q=>Q.length>0);if(U.length!==0){if(d){s(),await d.execute({endpoint:"/api/studio/import",body:{urls:U},title:"Importing URLs",onComplete:()=>{f()}});return}ue(!0);try{const he=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:U})})).body?.getReader();if(!he)throw new Error("No reader");const me=new TextDecoder;for(;;){const{done:ge,value:le}=await he.read();if(ge)break;const E=me.decode(le).split(`
57
+
58
+ `).filter(F=>F.startsWith("data: "));for(const F of E)JSON.parse(F.replace("data: ","")).type==="complete"&&(f(),s())}}catch(Q){console.error("Import failed:",Q)}finally{ue(!1)}}},[z,f,s,d]);return r("div",{css:wt.overlay,onClick:s,children:b("div",{css:wt.modal,onClick:U=>U.stopPropagation(),children:[b("div",{css:wt.header,children:[r("h3",{css:wt.title,children:"Add New"}),b("div",{css:wt.tabs,children:[r("button",{css:[wt.tab,D==="upload"&&wt.tabActive,"",""],onClick:()=>w("upload"),children:"Upload Files"}),r("button",{css:[wt.tab,D==="import"&&wt.tabActive,"",""],onClick:()=>w("import"),children:"Import URLs"})]})]}),r("div",{css:wt.body,children:D==="upload"?b(nt,{children:[b("div",{css:[wt.dropzone,q&&wt.dropzoneActive,"",""],onClick:()=>oe.current?.click(),onDragOver:U=>{U.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:X,children:[r("svg",{css:wt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r("p",{css:wt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:wt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:oe,type:"file",multiple:!0,css:wt.fileInput,onChange:U=>fe(U.target.files)}),g.length>0&&b("div",{css:wt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(nt,{children:[r("p",{css:wt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:wt.textarea,value:z,onChange:U=>B(U.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:wt.footer,children:[r("button",{css:[wt.btn,wt.btnCancel,"",""],onClick:s,children:"Cancel"}),D==="upload"?r("button",{css:[wt.btn,wt.btnConfirm,"",""],onClick:W,disabled:g.length===0||Y,children:Y?"Uploading...":"Upload"}):r("button",{css:[wt.btn,wt.btnConfirm,"",""],onClick:ne,disabled:!z.trim()||K,children:K?"Importing...":"Import"})]})]})})}const x1="36px",je={btn:y("height:",x1,";padding:0 12px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),icon:y("width:16px;height:16px;color:",c.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:y(ro," position:relative;background-color:",c.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:y("font-size:",V.xl,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",V.base,";font-weight:600;color:",c.text,";margin:0 0 12px 0;",""),description:y("font-size:",V.sm,";color:",c.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",c.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",V.xs,";color:",c.textSecondary,";border:1px solid ",c.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",c.surface,";border:1px solid ",c.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:y("width:14px;height:14px;color:",c.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",c.border,";border-radius:6px;font-size:",V.base,";color:",c.text,";background:",c.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 3px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",V.xs,";font-weight:500;color:",c.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",c.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;color:",c.text,";background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;color:white;background-color:",c.primary,";border:1px solid ",c.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:y("flex:1;padding:8px 12px;border:1px solid ",c.border,";border-radius:6px;font-size:",V.sm,";color:",c.text,";background:",c.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 3px ",c.primaryLight,";}",""),cdnIndex:y("font-size:",V.xs,";color:",c.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",c.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",c.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",V.sm,";font-weight:500;color:",c.primary,";background:",c.primaryLight,";border:1px dashed ",c.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;&:hover{background:",c.surface,";}",""),warning:y("font-size:",V.xs,";color:",c.danger,";margin-top:8px;padding:8px 12px;background:",c.dangerLight,";border-radius:6px;","")};function S1(){const[i,s]=v.useState(!1);return b(nt,{children:[r("button",{css:je.btn,onClick:()=>s(!0),"aria-label":"Settings",children:b("svg",{css:je.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),i&&r(C1,{onClose:()=>s(!1)})]})}const w1=`# Dev site link (opens from Studio header)
60
+ STUDIO_DEV_SITE_URL=http://localhost:3000
61
+
62
+ # Cloudflare R2 Storage
63
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
64
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
65
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
66
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
67
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function C1({onClose:i}){const{triggerRefresh:s}=oo(),[f,d]=v.useState(!1),[h,m]=v.useState([]),[C,D]=v.useState(!0),[w,g]=v.useState(!1),[T,z]=v.useState(!1);v.useEffect(()=>{async function K(){try{const oe=await(await fetch("/api/studio/cdns")).json();m(oe.cdns||[])}catch(ue){console.error("Failed to load CDN URLs:",ue)}finally{D(!1)}}K()},[]);const B=()=>{navigator.clipboard.writeText(w1),d(!0),setTimeout(()=>d(!1),2e3)},q=v.useCallback((K,ue)=>{m(oe=>{const fe=[...oe];return fe[K]=ue,fe}),z(!0)},[]),H=v.useCallback(()=>{m(K=>[...K,""]),z(!0)},[]),Y=v.useCallback(K=>{m(ue=>ue.filter((oe,fe)=>fe!==K)),z(!0)},[]),re=v.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),s(),i())}catch(K){console.error("Failed to save CDN URLs:",K)}finally{g(!1)}},[h,s,i]);return r("div",{css:je.overlay,onClick:i,children:b("div",{css:je.panel,onClick:K=>K.stopPropagation(),children:[b("div",{css:je.header,children:[r("h2",{css:je.title,children:"Settings"}),r("button",{css:je.closeBtn,onClick:i,children:r("svg",{css:je.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:je.sections,children:[b("section",{children:[r("h3",{css:je.sectionTitle,children:"CDN URLs"}),r("p",{css:je.description,children:"Manage CDN base URLs used by your images:"}),C?r("p",{css:je.description,children:"Loading..."}):b(nt,{children:[r("div",{css:je.cdnList,children:h.map((K,ue)=>b("div",{css:je.cdnRow,children:[r("span",{css:je.cdnIndex,children:ue}),r("input",{css:je.cdnInput,type:"text",value:K,onChange:oe=>q(ue,oe.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:je.cdnDeleteBtn,onClick:()=>Y(ue),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},ue))}),b("button",{css:je.cdnAddBtn,onClick:H,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:je.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:je.sectionTitle,children:"Environment Variables"}),b("p",{css:je.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:je.codeWrapper,children:[b("button",{css:je.copyBtn,onClick:B,title:"Copy to clipboard",children:[f&&r("span",{css:je.tooltip,children:"Copied!"}),r("svg",{css:je.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:je.code,children:[r("p",{css:je.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:je.codeLine,children:" "}),r("p",{css:je.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:je.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:je.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:je.grid,children:[b("div",{children:[r("label",{css:je.label,children:"Small"}),r("input",{css:je.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:je.label,children:"Medium"}),r("input",{css:je.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:je.label,children:"Large"}),r("input",{css:je.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:je.footer,children:[r("button",{css:je.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:je.saveBtn,onClick:re,disabled:w||!T,children:w?"Saving...":"Save Changes"})]})]})})}const au="36px",k1=on`
68
+ to { transform: rotate(360deg); }
69
+ `,ke={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",c.surface,";border-bottom:1px solid ",c.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",au,";padding:0 14px;border-radius:6px;font-size:",V.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";cursor:pointer;transition:all 0.15s ease;color:",c.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",c.primary,";border-color:",c.primary,";color:white;&:hover:not(:disabled){background:",c.primaryHover,";border-color:",c.primaryHover,";}",""),btnDanger:y("color:",c.danger,";&:hover:not(:disabled){background-color:",c.dangerLight,";border-color:",c.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:y("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",c.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",V.sm,";color:",c.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",c.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",c.text,";}",""),cloudDropdownItemDanger:y("color:",c.danger,";svg{color:",c.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",c.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",k1," 1s linear infinite;",""),selectionCount:y("font-size:",V.base,";color:",c.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",c.primary,";background:none;border:none;cursor:pointer;font-size:",V.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",c.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",au,";background-color:",c.surface,";border:1px solid ",c.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",au,";padding:0 32px 0 12px;border:1px solid ",c.border,";border-radius:6px;font-size:",V.base,";background:",c.surface,";color:",c.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 2px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",c.primary,";border:none;padding:0 6px;cursor:pointer;color:white;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.15s ease;&:hover{background:",c.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",c.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",c.text,";background-color:",c.surfaceHover,";}",""),viewBtnActive:y("background-color:",c.primaryLight,";color:",c.primary,";&:hover{background-color:",c.primaryLight,";color:",c.primary,";}","")};function z1(){const{selectedItems:i,viewMode:s,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:C,scanRequested:D,clearScanRequest:w,fileItems:g,requestProcess:T,setProcessMode:z,actionState:B,cancelAction:q}=oo(),H=v.useRef(null),Y=v.useRef(null),[re,K]=v.useState(!1),[ue,oe]=v.useState(!1),[fe,X]=v.useState(!1),[I,W]=v.useState(!1),[ne,U]=v.useState(!1),[Q,he]=v.useState(0),[me,ge]=v.useState(!1),[le,Ee]=v.useState(0),[E,F]=v.useState(!1),[$,ze]=v.useState(!1),[Ue,x]=v.useState(!1),[_,P]=v.useState(0),[ae,we]=v.useState(!1),[Ae,Ye]=v.useState("Processing Images"),[bt,Oe]=v.useState({current:0,total:0,percent:0,status:"processing"}),[Kt,$e]=v.useState(null),[ct,ft]=v.useState(!1),[Ht,Bt]=v.useState(!1),[Zt,ee]=v.useState(!1),[Qe,Ze]=v.useState(!1),[Ke,Dt]=v.useState(!1),[St,Re]=v.useState(!1),[Rt,Cn]=v.useState(!1),[Yn,Hn]=v.useState(!1),kn=v.useRef(null),Z=v.useRef(null),ce=Gp({setShowProgress:we,setProgressTitle:Ye,setProgressState:Oe,triggerRefresh:m}),Ge=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{H.current?.click()},[]);const at=v.useCallback(()=>{W(!0),m(),setTimeout(()=>W(!1),600)},[m]),Ne=v.useCallback(async()=>{X(!0),Ye("Scanning Files"),we(!0),Oe({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const ie=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!ie)throw new Error("No reader");const be=new TextDecoder;let ve="";for(;;){const{done:Le,value:He}=await ie.read();if(Le)break;ve+=be.decode(He,{stream:!0});const et=ve.split(`
70
+
71
+ `);ve=et.pop()||"";for(const tt of et){if(!tt.startsWith("data: "))continue;const Be=JSON.parse(tt.slice(6));if(Be.type==="start")Oe({current:0,total:Be.total,percent:0,status:"processing",message:`Scanning ${Be.total} files...`});else if(Be.type==="progress")Oe({current:Be.current,total:Be.total,percent:Be.percent,status:"processing",currentFile:Be.currentFile});else if(Be.type==="cleanup")Oe(an=>({...an,message:Be.message}));else if(Be.type==="complete"){let an=Be.renamed>0?`${Be.renamed} file(s) renamed due to conflicts. `:"";Be.orphanedFiles&&Be.orphanedFiles.length>0&&(an+=`Found ${Be.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Oe({current:Be.total||0,total:Be.total||0,percent:100,status:"complete",processed:Be.added,alreadyProcessed:Be.existingCount,errors:Be.errors,orphanedFiles:Be.orphanedFiles,pendingUpdates:Be.pendingUpdates,orphanedEntries:Be.orphanedEntries,message:an||void 0,isScan:!0}),m()}else Be.type==="error"&&Oe({current:0,total:0,percent:0,status:"error",message:Be.message||"Scan failed"})}}}catch(pe){console.error("Scan error:",pe),Oe({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{X(!1)}},[m]);v.useEffect(()=>{const pe=ie=>{kn.current&&!kn.current.contains(ie.target)&&Cn(!1),Z.current&&!Z.current.contains(ie.target)&&Hn(!1)};return document.addEventListener("mousedown",pe),()=>document.removeEventListener("mousedown",pe)},[]),v.useEffect(()=>{D&&!fe&&(w(),Ne())},[D,fe,w,Ne]);const De=v.useCallback(async pe=>{const ie=pe.target.files;if(!ie||ie.length===0)return;const be=Array.from(ie);be.length>1?(Oe({current:0,total:be.length,percent:0,status:"processing",message:"Uploading files..."}),we(!0)):oe(!0);let ve=0,Le=0;try{for(let He=0;He<be.length;He++){const et=be[He],tt=new FormData;tt.append("file",et),tt.append("path",h);try{const Be=await fetch("/api/studio/upload",{method:"POST",body:tt});if(Be.ok)ve++;else{const an=await Be.json();Le++,be.length===1&&(Be.status>=500?(console.error("Upload error:",an),$e({title:"Upload Failed",message:`Failed to upload ${et.name}: ${an.error||"Unknown error"}`})):$e({title:"Cannot Upload Here",message:an.error||"Upload not allowed in this location."}))}}catch{Le++}be.length>1&&Oe({current:He+1,total:be.length,percent:Math.round((He+1)/be.length*100),status:"processing",currentFile:et.name})}be.length>1&&Oe({current:be.length,total:be.length,percent:100,status:"complete",processed:ve,errors:Le}),m()}catch(He){console.error("Upload error:",He),be.length>1?Oe({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):$e({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{oe(!1),H.current&&(H.current.value="")}},[h,m]),kt=v.useCallback(async pe=>{if(i.size>0){const be=Array.from(i),ve=be.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),Le=be.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));if(Le.length>0)try{const et=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(Le.join(","))}`)).json();if(et.images)for(const tt of et.images){const Be=`public/${tt}`;ve.includes(Be)||ve.push(Be)}}catch(He){console.error("Failed to get folder files:",He)}if(ve.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}z(pe),T(ve)}else try{const ve=await(await fetch("/api/studio/count-images")).json();if(!ve.images||ve.images.length===0){$e({title:"No Images Found",message:"No images found in the public folder to process."});return}const Le=ve.images.map(He=>`public/${He}`);z(pe),T(Le)}catch(be){console.error("Failed to get images:",be),$e({title:"Error",message:"Failed to get images."})}},[i,T,z]),vt=v.useCallback(()=>{ce.stop(),Y.current&&(Oe(pe=>({...pe,status:"stopping"})),Y.current.abort())},[ce]),ml=v.useCallback(async()=>{const pe=bt.orphanedFiles;if(!(!pe||pe.length===0))try{const ie=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:pe})}),be=await ie.json();ie.ok?(Oe(ve=>({...ve,orphanedFiles:void 0,orphansRemoved:be.deleted,message:`Deleted ${be.deleted} orphaned thumbnail${be.deleted!==1?"s":""}.`})),m()):$e({title:"Delete Failed",message:be.error||"Failed to delete orphaned files."})}catch(ie){console.error("Delete orphans error:",ie),$e({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[bt.orphanedFiles,m]),Qa=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),ie=pe.filter(Le=>(Le.split("/").pop()||"").includes(".")&&!Le.endsWith("/")),be=pe.filter(Le=>!(Le.split("/").pop()||"").includes(".")||Le.endsWith("/"));let ve=ie.length;if(be.length>0)try{const He=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();He.images&&(ve+=He.images.length)}catch(Le){console.error("Failed to get folder files:",Le)}he(ve),U(!0)},[i]),Nr=v.useCallback(async()=>{U(!1);const pe=Array.from(i);pe.length!==0&&await ce.execute({endpoint:"/api/studio/delete-stream",body:{paths:pe},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,ce]),gl=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),ie=pe.filter(tt=>(tt.split("/").pop()||"").includes(".")&&!tt.endsWith("/")),be=pe.filter(tt=>!(tt.split("/").pop()||"").includes(".")||tt.endsWith("/")),ve=be.length>0;if(ve)try{const Be=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(Be.images)for(const an of Be.images){const po=`public/${an}`;ie.includes(po)||ie.push(po)}}catch(tt){console.error("Failed to get folder files:",tt)}if(ie.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let Le=!1,He=!1,et=0;for(const tt of ie){const Be=g.find(an=>an.path===tt);Be?Be.isRemote?Le=!0:Be.cdnPushed?et++:He=!0:ve&&(He=!0)}if(!ve&&et===ie.length){$e({title:"Already Pushed",message:`All ${ie.length} file${ie.length!==1?"s are":" is"} already on the CDN.`});return}Ee(ie.length),F(Le),ze(He),ge(!0)},[i,g]),yl=v.useCallback(async()=>{ge(!1);const pe=Array.from(i),ie=pe.filter(Le=>(Le.split("/").pop()||"").includes(".")&&!Le.endsWith("/")),be=pe.filter(Le=>!(Le.split("/").pop()||"").includes(".")||Le.endsWith("/"));if(be.length>0)try{const He=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(He.images)for(const et of He.images){const tt=`public/${et}`;ie.includes(tt)||ie.push(tt)}}catch(Le){console.error("Failed to get folder files:",Le)}const ve=ie.map(Le=>"/"+Le.replace(/^public\//,""));ve.length!==0&&await ce.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:ve},title:"Pushing to CDN",onComplete:()=>{d()},onError:Le=>{(Le.includes("R2 not configured")||Le.includes("CLOUDFLARE_R2"))&&(we(!1),Dt(!0))}})},[i,d,ce]),[Ka,$n]=v.useState([]),[bl,Za]=v.useState(0),jr=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),ie=pe.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),be=pe.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/")),ve=be.length>0;if(ve)try{const et=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(et.images)for(const tt of et.images){const Be=`public/${tt}`;ie.includes(Be)||ie.push(Be)}}catch(He){console.error("Failed to get folder files:",He)}if(ie.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let Le;if(ve)Le=ie;else if(Le=ie.filter(He=>{const et=g.find(tt=>tt.path===He);return et&&et.cdnPushed&&!et.isRemote}),Le.length===0){$e({title:"No CDN Files",message:`None of the ${ie.length} selected file${ie.length!==1?"s are":" is"} on the CDN.`});return}$n(Le),Za(ie.length),P(Le.length),x(!0)},[i,g]),hi=v.useCallback(async()=>{x(!1),B.showDownloadConfirm&&q();const ie=(B.showDownloadConfirm?B.actionPaths:Ka).map(be=>"/"+be.replace(/^public\//,""));await ce.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ie},title:"Downloading from CDN",onComplete:()=>d()})},[Ka,d,B.showDownloadConfirm,B.actionPaths,q,ce]),so=v.useCallback(async()=>{if(i.size===0)return;const ie=Array.from(i).filter(be=>{const ve=g.find(Le=>Le.path===be);return ve&&(ve.hasUpdate||ve.type==="folder"&&ve.updateCount&&ve.updateCount>0)});if(ie.length===0){$e({title:"No Updates",message:"No files with pending updates in selection."});return}await ce.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ie},title:"Pushing Updates",onComplete:()=>d()})},[i,g,d,ce]),Fa=v.useCallback(async()=>{if(i.size===0)return;const ie=Array.from(i).filter(be=>{const ve=g.find(Le=>Le.path===be);return ve&&(ve.hasUpdate||ve.type==="folder"&&ve.updateCount&&ve.updateCount>0)});if(ie.length!==0)try{const be=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ie})});if(be.ok)d(),m();else{const ve=await be.json();$e({title:"Cancel Failed",message:ve.error||"Unknown error"})}}catch(be){console.error("Cancel updates error:",be),$e({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,g,d,m]),qr=v.useCallback(async pe=>{ft(!1);try{const ie=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:pe})});if(ie.ok)m();else{const be=await ie.json();$e({title:"Create Folder Failed",message:be.error||"Unknown error"})}}catch(ie){console.error("Create folder error:",ie),$e({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),pi=v.useCallback(()=>{i.size!==0&&Ze(!0)},[i]),mi=v.useCallback(async pe=>{const ie=Array.from(i);await ce.execute({endpoint:"/api/studio/move",body:{paths:ie,destination:pe},title:"Moving Files",onComplete:()=>d()})},[i,d,ce]),{searchQuery:co,setSearchQuery:In}=oo(),uo=v.useCallback(pe=>{In(pe.target.value)},[In]),gi=v.useCallback(pe=>{pe.key==="Escape"&&(pe.stopPropagation(),In(""),pe.target.blur())},[In]),Bn=i.size>0;Bn&&Array.from(i).some(pe=>{const ie=g.find(be=>be.path===pe);return ie&&ie.cdnPushed&&!ie.isRemote}),Bn&&Array.from(i).every(pe=>{const ie=g.find(be=>be.path===pe);return ie&&ie.type==="file"&&ie.cdnPushed&&!ie.isRemote});const Gn=Bn&&Array.from(i).some(pe=>{const ie=g.find(be=>be.path===pe);return ie&&(ie.hasUpdate||ie.type==="folder"&&ie.updateCount&&ie.updateCount>0)}),Et=Array.from(i),Ut=Et.length===1&&!Et[0].includes("."),pn=Ut?Et[0]:null,vl=pn&&pn.split("/").pop()||"",ya=Et.length===1&&Et[0].includes("."),ba=ya?Et[0]:null,fo=ba&&ba.split("/").pop()||"",Ja=v.useCallback(async pe=>{pn&&(Bt(!1),await ce.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:pn,newName:pe},title:"Renaming Folder",onComplete:()=>d()}))},[pn,d,ce]),ho=v.useCallback(async pe=>{ba&&(ee(!1),await ce.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ba,newName:pe},title:"Renaming File",onComplete:()=>d()}))},[ba,d,ce]),Wn=b(nt,{children:[(Ue||B.showDownloadConfirm)&&r(ao,{title:"Download from CDN",message:(()=>{const pe=B.showDownloadConfirm?B.downloadImageCount:_,ie=B.showDownloadConfirm?B.downloadTotalSelected:bl;return ie>pe?`Download ${pe} of ${ie} selected file${ie!==1?"s":""} from Cloudflare R2? (${ie-pe} not on CDN)`:`Download ${pe} image${pe!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:hi,onCancel:()=>{x(!1),B.showDownloadConfirm&&q()}}),ae&&r(pl,{title:Ae,progress:bt,onStop:vt,onDeleteOrphans:ml,onClose:()=>{we(!1),Oe({current:0,total:0,percent:0,status:"processing"}),m()}})]});return C?Wn:b(nt,{children:[Wn,ne&&r(ao,{title:"Delete Items",message:`Are you sure you want to delete ${Q} file${Q!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Nr,onCancel:()=>U(!1)}),me&&r(ao,{title:"Push to CDN",message:`Push ${le} image${le!==1?"s":""} to Cloudflare R2?${E?" Remote images will be downloaded first.":""}${$?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:yl,onCancel:()=>ge(!1)}),ct&&r(hl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:qr,onCancel:()=>ft(!1)}),Qe&&r(Xp,{selectedItems:i,currentPath:h,onMove:pe=>{Ze(!1),mi(pe)},onCancel:()=>Ze(!1)}),Ht&&pn&&r(hl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:vl,defaultValue:vl,confirmLabel:"Rename",onConfirm:Ja,onCancel:()=>Bt(!1)}),Zt&&ba&&r(hl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:fo,defaultValue:fo,confirmLabel:"Rename",onConfirm:ho,onCancel:()=>ee(!1)}),Kt&&r(pu,{title:Kt.title,message:Kt.message,onClose:()=>{$e(null),m()}}),r(Vp,{isOpen:Ke,onClose:()=>Dt(!1)}),re&&r(v1,{currentPath:h,onClose:()=>K(!1),onUploadComplete:()=>{K(!1),m()},streamingOperation:ce,setShowProgress:we,setProgressTitle:Ye,setProgressState:Oe}),b("div",{css:ke.toolbar,children:[r("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:De,style:{display:"none"}}),b("div",{css:ke.left,children:[b("button",{css:[ke.btn,ke.btnPrimary,"",""],onClick:()=>K(!0),disabled:ue||Ge,children:[r(M1,{}),"Add New"]}),b("button",{css:ke.btn,onClick:()=>{ya?ee(!0):Ut?Bt(!0):ft(!0)},disabled:Ge&&!Ut&&!ya,title:Ge&&!Ut&&!ya?"Cannot create folders in protected images folder":void 0,children:[ya||Ut?r(R1,{}):r(T1,{}),ya?"Rename File":Ut?"Rename Folder":"New Folder"]}),r("div",{css:ke.divider}),b("div",{css:ke.cloudDropdownWrapper,ref:Z,children:[b("button",{css:ke.btn,onClick:()=>Hn(!Yn),disabled:B.showProgress||Ge,title:Ge?"Cannot process images folder":void 0,children:[r(N1,{}),"Thumbnails",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Yn&&b("div",{css:ke.cloudDropdown,children:[b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDefault,"",""],onClick:()=>{Hn(!1),kt("generate")},children:[r(j1,{}),"Generate Thumbnails"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{Hn(!1),kt("remove")},children:[r(q1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[ke.btn,ke.btnDanger,"",""],onClick:Qa,disabled:!Bn,children:[r(A1,{}),"Delete"]}),b("button",{css:ke.btn,onClick:pi,disabled:!Bn,children:[r(L1,{}),"Move"]}),b("div",{css:ke.cloudDropdownWrapper,ref:kn,children:[b("button",{css:[ke.btn,ke.btnCloud,"",""],onClick:()=>Cn(!Rt),disabled:!Bn,children:[r(wp,{}),"Cloud",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Rt&&Bn&&b("div",{css:ke.cloudDropdown,children:[Gn&&b(nt,{children:[b("button",{css:ke.cloudDropdownItem,onClick:()=>{Cn(!1),so()},children:[r(_1,{}),"Push Update"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{Cn(!1),Fa()},children:[r(O1,{}),"Cancel Update"]}),r("div",{css:ke.cloudDropdownDivider})]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{Cn(!1),gl()},children:[r(wp,{}),"Push CDN"]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{Cn(!1),jr()},children:[r(H1,{}),"Download"]})]})]}),b("div",{css:ke.searchWrapper,children:[r("input",{css:ke.searchInput,type:"text",placeholder:"Search images...",value:co,onChange:uo,onKeyDown:gi}),co&&r("button",{css:ke.searchClearBtn,onClick:()=>In(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:ke.right,children:[Bn&&b("span",{css:ke.selectionCount,children:[i.size," selected",r("button",{css:ke.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:ke.btn,onClick:Ne,disabled:fe,children:[r(D1,{spinning:fe}),"Scan"]}),r("button",{css:ke.btn,onClick:at,title:"Refresh view",disabled:I,children:r(E1,{spinning:I})}),b("div",{css:ke.viewToggle,children:[r("button",{css:[ke.viewBtn,s==="grid"&&ke.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(B1,{})}),r("button",{css:[ke.viewBtn,s==="list"&&ke.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(U1,{})})]}),r(S1,{})]})]})]})}function M1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function D1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function E1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function A1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function T1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function R1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function L1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function wp(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function _1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function O1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function H1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}function B1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function U1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function N1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function j1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function q1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class Y1{async get(s){const f=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(s,f){const d=await fetch(s,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,f="public"){const d=new FormData;d.append("file",s),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,f){return this.post("/api/studio/create-folder",{parentPath:s,name:f})}async rename(s,f){return this.post("/api/studio/rename",{oldPath:s,newName:f})}async move(s,f){return this.post("/api/studio/move",{paths:s,destination:f})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const oi=new Y1;function Qp(){const{currentPath:i,setCurrentPath:s,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:C,selectAll:D,clearSelection:w,refreshKey:g,setFocusedItem:T,triggerRefresh:z,triggerScan:B,searchQuery:q,showError:H,setFileItems:Y,editedImageKey:re}=oo(),[K,ue]=v.useState([]),[oe,fe]=v.useState(!0),[X,I]=v.useState(!1),[W,ne]=v.useState(null),U=v.useRef(!0),Q=v.useRef(i);v.useEffect(()=>{async function x(){const _=Q.current!==i;(U.current||_)&&fe(!0),Q.current=i;try{const P=q&&q.length>=2?await oi.search(q,i):await oi.list(i),ae=P.items||[];ue(ae),Y(ae),I(P.isEmpty===!0)}catch(P){const ae=P instanceof Error?P.message:"Failed to load items";H("Load Error",ae),ue([]),Y([]),I(!1)}fe(!1),U.current=!1}x()},[i,g,q,H,Y]),v.useEffect(()=>{async function x(){if(i!=="public"){ne(null);return}try{const _=await oi.checkFeaturedImage();ne(_)}catch{ne(null)}}x()},[i,g]);const he=i==="public",me=q&&q.length>=2,ge=[...K].sort((x,_)=>x.type==="folder"&&_.type!=="folder"?-1:x.type!=="folder"&&_.type==="folder"?1:x.name.localeCompare(_.name)),le=ge.length>0&&ge.every(x=>d.has(x.path)),Ee=ge.some(x=>d.has(x.path)),E=v.useCallback((x,_)=>{_.shiftKey&&C?m(C,x.path,ge):h(x.path)},[C,m,ge,h]),F=v.useCallback(x=>{x.type==="folder"?s(x.path):T(x)},[s,T]),$=v.useCallback(async x=>{try{const _="/"+x.path.replace(/^public\//,"");await oi.reprocess([_]),z()}catch(_){const P=_ instanceof Error?_.message:"Failed to generate thumbnail";H("Processing Error",P)}},[z,H]),ze=v.useCallback(()=>{le?w():D(ge)},[le,w,D,ge]),Ue=W&&!W.exists?W:null;return{items:K,loading:oe,sortedItems:ge,metaEmpty:X,missingFeaturedImage:Ue,isAtRoot:he,isSearching:me,allItemsSelected:le,someItemsSelected:Ee,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:re,handleItemClick:E,handleOpen:F,handleGenerateThumbnail:$,handleSelectAll:ze,triggerScan:B,triggerRefresh:z}}const G1=on`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,X1=on`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,V1=on`
78
+ to { transform: rotate(360deg); }
79
+ `,Pt={overlay:y("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",G1," 0.15s ease;",""),modal:y("background:",c.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",X1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",c.border,";",""),title:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0;",""),subtitle:y("font-size:",V.sm,";color:",c.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:y("width:24px;height:24px;border-radius:50%;border:2px solid ",c.border,";border-top-color:",c.primary,";animation:",V1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",c.background,";border:1px solid ",c.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",c.surfaceHover,";border-color:",c.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",V.xs,";font-weight:600;color:",c.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",V.base,";font-weight:500;color:",c.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",c.textSecondary,";font-size:",V.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",c.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",V.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover{background:",c.surfaceHover,";border-color:",c.borderHover,";}","")};function Kp({isOpen:i,onClose:s,onSelect:f}){const[d,h]=v.useState(!0),[m,C]=v.useState(null),[D,w]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function T(){h(!0);try{const z=await oi.getFeaturedImageOptions();C(z.devUrl),w(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}T()},[i]),!i)return null;const g=m||D;return r("div",{css:Pt.overlay,onClick:s,children:b("div",{css:Pt.modal,onClick:T=>T.stopPropagation(),children:[b("div",{css:Pt.header,children:[r("h2",{css:Pt.title,children:"Generate Screenshot"}),r("p",{css:Pt.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:Pt.body,children:d?r("div",{css:Pt.loading,children:r("div",{css:Pt.spinner})}):g?b(nt,{children:[m&&b("button",{css:Pt.urlButton,onClick:()=>f(m),children:[r("span",{css:Pt.urlLabel,children:"Development"}),r("span",{css:Pt.urlValue,children:m})]}),D&&b("button",{css:Pt.urlButton,onClick:()=>f(D),children:[r("span",{css:Pt.urlLabel,children:"Production"}),r("span",{css:Pt.urlValue,children:D})]})]}):b("div",{css:Pt.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:Pt.footer,children:r("button",{css:Pt.cancelBtn,onClick:s,children:"Cancel"})})]})})}const Q1=on`
80
+ to { transform: rotate(360deg); }
81
+ `,se={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",c.border,";border-top-color:",c.primary,";animation:",Q1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",c.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",V.base,";margin:0 0 4px 0;&:last-child{color:",c.textMuted,";font-size:",V.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",c.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",c.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",c.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",c.primary,";box-shadow:0 0 0 1px ",c.primary,";&:hover{border-color:",c.primary,";box-shadow:0 0 0 1px ",c.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",c.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",c.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",c.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",c.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",c.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",c.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",c.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",c.surface,";border-top:1px solid ",c.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:y("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",c.textMuted,";background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",c.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",V.xs,";",""),folderStatLocal:y("color:",c.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",c.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("color:#f59e0b;font-size:",V.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:y("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",c.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",V.sm,";font-weight:500;color:",c.primary,";background:",c.surface,";border:1px solid ",c.border,";padding:0 8px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);&:hover{background-color:",c.primaryLight,";border-color:",c.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",c.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",c.background,";&:hover{border-color:",c.success,";background-color:",c.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:y("width:40px;height:40px;color:",c.success,";",""),featuredText:y("font-size:",V.sm,";color:",c.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",c.surface,";border-top:1px solid ",c.borderLight,";",""),name:y("font-size:",V.sm,";font-weight:500;color:",c.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",V.xs,";color:",c.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",c.surface,";border-radius:8px;border:1px solid ",c.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",V.base,";font-weight:500;color:",c.textSecondary,";cursor:pointer;&:hover{color:",c.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",c.primary,";","")};function K1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:C,someItemsSelected:D,selectedItems:w,navigateUp:g,handleItemClick:T,handleOpen:z,handleGenerateThumbnail:B,handleSelectAll:q,triggerScan:H,triggerRefresh:Y,editedImageKey:re}=Qp(),[K,ue]=v.useState(!1),[oe,fe]=v.useState(!1),[X,I]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),W=()=>{ue(!0)},ne=async U=>{ue(!1),fe(!0),I({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const Q=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:U})});if(!Q.ok){const ge=await Q.json();I({current:0,total:4,percent:0,status:"error",message:ge.error||"Failed to generate screenshot"});return}const he=Q.body?.getReader(),me=new TextDecoder;if(he){let ge="";for(;;){const{done:le,value:Ee}=await he.read();if(le)break;ge+=me.decode(Ee,{stream:!0});const E=ge.split(`
82
+ `);ge=E.pop()||"";for(const F of E)if(F.startsWith("data: "))try{const $=JSON.parse(F.slice(6));$.type==="start"?I(ze=>({...ze,total:$.total,message:`Screenshotting ${$.url}...`})):$.type==="progress"?I({current:$.current,total:$.total,percent:$.percent,status:"processing",message:$.message}):$.type==="complete"?(I({current:$.processed,total:$.processed,percent:100,status:$.errors>0?"error":"complete",message:$.message}),Y()):$.type==="error"&&I(ze=>({...ze,status:"error",message:$.message}))}catch{}}}}catch(Q){console.error("Featured image generation error:",Q),I({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(nt,{children:[oe&&r(pl,{title:"Generating Screenshot",progress:X,onClose:()=>fe(!1)}),r("div",{css:se.loading,children:r("div",{css:se.spinner})})]}):f&&h?b("div",{css:se.empty,children:[r("svg",{css:se.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:se.emptyText,children:"No files tracked yet"}),r("p",{css:se.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:se.scanButton,onClick:H,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:se.empty,children:[r("svg",{css:se.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("p",{css:se.emptyText,children:"No files in this folder"}),r("p",{css:se.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(nt,{children:[r(Kp,{isOpen:K,onClose:()=>ue(!1),onSelect:ne}),oe&&r(pl,{title:"Generating Screenshot",progress:X,onClose:()=>fe(!1)}),b("div",{children:[s.length>0&&r("div",{css:se.selectAllRow,children:b("label",{css:se.selectAllLabel,children:[r("input",{type:"checkbox",css:se.selectAllCheckbox,checked:C,ref:U=>{U&&(U.indeterminate=D&&!C)},onChange:q}),"Select all (",s.length,")"]})}),b("div",{css:se.grid,children:[!h&&!m&&b("div",{css:[se.item,se.parentItem,"",""],onClick:g,children:[r("div",{css:se.content,children:r("svg",{css:se.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:se.label,children:[r("p",{css:se.name,children:".."}),r("p",{css:se.size,children:"Parent folder"})]})]}),s.map(U=>r(F1,{item:U,isSelected:w.has(U.path),onClick:Q=>T(U,Q),onOpen:()=>z(U),onGenerateThumbnail:()=>B(U),editedImageKey:re},U.path)),h&&d&&!m&&b("div",{css:se.featuredPlaceholder,onClick:W,title:`Generate ${d.filename}`,children:[b("div",{css:se.featuredContent,children:[r("svg",{css:se.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("span",{css:se.featuredText,children:"Generate Screenshot"})]}),b("div",{css:se.featuredLabel,children:[r("p",{css:se.name,children:d.filename}),r("p",{css:se.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function Z1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function F1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[C,D]=v.useState(!1),w=i.type==="folder",g=!w&&i.thumbnail!==void 0,T=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||w&&i.name==="images"&&i.path==="public/images",B=Z1(i.path),q=!w&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||B),H=re=>{re.stopPropagation();const K="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(K),D(!0),setTimeout(()=>D(!1),1500)},Y=re=>{if(z){re.stopPropagation(),d();return}f(re)};return b("div",{css:[se.item,s&&!z&&se.itemSelected,"",""],onClick:Y,children:[!z&&r("div",{css:se.checkboxWrapper,onClick:re=>re.stopPropagation(),children:r("input",{type:"checkbox",css:se.checkbox,checked:s,onChange:()=>f({})})}),b("div",{css:[se.content,i.isCloud&&se.contentCloud,i.isRemote&&se.contentRemote,"",""],children:[b("button",{css:se.copyBtn,onClick:H,title:"Copy file path",children:[C&&r("span",{css:se.tooltip,children:"Copied!"}),r("svg",{css:se.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:se.openBtn,onClick:re=>{re.stopPropagation(),d()},children:"Open"}),w?z?b("div",{css:se.imagesFolderWrapper,children:[r("svg",{css:se.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:se.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("svg",{css:se.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):g&&T?r("img",{css:se.image,src:T,alt:i.name,loading:"lazy"}):r("svg",{css:se.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),r("div",{css:se.label,children:r("div",{css:se.labelRow,children:b("div",{css:se.labelText,children:[r("p",{css:se.name,title:i.name,children:i.name}),w?b("div",{css:se.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[se.folderStat,se.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:se.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[se.folderStat,se.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:se.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[se.folderStat,se.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:se.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[se.folderStat,se.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:se.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{css:se.size,children:[i.fileCount," files"]})]}):b("div",{css:se.statusRow,children:[r("div",{css:se.statusLeft,children:i.hasUpdate?b(nt,{children:[r("svg",{css:se.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:se.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),r("span",{css:se.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?se.storedIconRemote:se.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):i.size!==void 0?r("span",{css:se.size,children:J1(i.size)}):null}),q&&r("span",{css:se.thumbChips,children:B?r("span",{css:se.thumbChip,children:B}):b(nt,{children:[i.hasSm&&r("span",{css:se.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:se.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:se.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:se.thumbChip,children:"FULL"})]})})]})]})})})]})}function J1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const $1=on`
83
+ to { transform: rotate(360deg); }
84
+ `,J={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",c.border,";border-top-color:",c.primary,";animation:",$1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",c.textSecondary,";",""),emptyHint:y("font-size:",V.sm,";color:",c.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",c.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",c.surface,";border-radius:8px;border:1px solid ",c.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",c.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",c.background,";border-bottom:1px solid ",c.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:y("",""),row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",c.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",c.borderLight,";}",""),rowSelected:y("background-color:",c.primaryLight,";&:hover{background-color:",c.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",c.border,";&:hover{background-color:",c.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:y("width:18px;height:18px;accent-color:",c.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:y("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",V.xs,";color:",c.textSecondary,";background:",c.surface,";border:1px solid ",c.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",c.surfaceHover,";border-color:",c.borderHover,";color:",c.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",V.xs,";",""),folderStatLocal:y("color:",c.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",c.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",V.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:y("",""),thumbnailRemote:y("",""),folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIcon:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},imagesFolderWrapper:{name:"iqqile",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;align-items:center"},imagesFolderIcon:y("width:24px;height:24px;color:",c.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",c.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",c.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",c.textMuted,";flex-shrink:0;",""),thumbnail:y("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",c.borderLight,";",""),name:y("font-size:",V.base,";font-weight:500;color:",c.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",V.sm,";color:",c.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",V.xs,";font-weight:500;color:",c.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",V.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",V.sm,";color:",c.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",c.success,";&:hover{background-color:",c.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",c.success,";",""),featuredText:y("color:",c.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",V.sm,";font-weight:500;color:",c.primary,";background:",c.surface,";border:1px solid ",c.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",c.primaryLight,";border-color:",c.primary,";}","")};function I1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:C,someItemsSelected:D,selectedItems:w,navigateUp:g,handleItemClick:T,handleOpen:z,handleGenerateThumbnail:B,handleSelectAll:q,triggerScan:H,triggerRefresh:Y,editedImageKey:re}=Qp(),[K,ue]=v.useState(!1),[oe,fe]=v.useState(!1),[X,I]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),W=()=>{ue(!0)},ne=async U=>{ue(!1),fe(!0),I({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const Q=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:U})});if(!Q.ok){const ge=await Q.json();I({current:0,total:4,percent:0,status:"error",message:ge.error||"Failed to generate screenshot"});return}const he=Q.body?.getReader(),me=new TextDecoder;if(he){let ge="";for(;;){const{done:le,value:Ee}=await he.read();if(le)break;ge+=me.decode(Ee,{stream:!0});const E=ge.split(`
85
+ `);ge=E.pop()||"";for(const F of E)if(F.startsWith("data: "))try{const $=JSON.parse(F.slice(6));$.type==="start"?I(ze=>({...ze,total:$.total,message:`Screenshotting ${$.url}...`})):$.type==="progress"?I({current:$.current,total:$.total,percent:$.percent,status:"processing",message:$.message}):$.type==="complete"?(I({current:$.processed,total:$.processed,percent:100,status:$.errors>0?"error":"complete",message:$.message}),Y()):$.type==="error"&&I(ze=>({...ze,status:"error",message:$.message}))}catch{}}}}catch(Q){console.error("Featured image generation error:",Q),I({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:J.loading,children:r("div",{css:J.spinner})}):f&&h?b("div",{css:J.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:J.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:J.scanButton,onClick:H,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:J.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:J.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(nt,{children:[r(Kp,{isOpen:K,onClose:()=>ue(!1),onSelect:ne}),oe&&r(pl,{title:"Generating Screenshot",progress:X,onClose:()=>fe(!1)}),r("div",{css:J.tableWrapper,children:b("table",{css:J.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[J.th,J.thCheckbox,"",""],children:s.length>0&&r("input",{type:"checkbox",css:J.checkbox,checked:C,ref:U=>{U&&(U.indeterminate=D&&!C)},onChange:q})}),r("th",{css:J.th,children:"Name"}),r("th",{css:[J.th,J.thSize,"",""],children:"Size"}),r("th",{css:[J.th,J.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[J.th,J.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:J.tbody,children:[!h&&!m&&b("tr",{css:J.parentRow,onClick:g,children:[r("td",{css:J.td}),r("td",{css:J.td,children:b("div",{css:J.nameCell,children:[r("svg",{css:J.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:J.name,children:".."})]})}),r("td",{css:[J.td,J.meta,"",""],children:"--"}),r("td",{css:[J.td,J.meta,"",""],children:"Parent folder"}),r("td",{css:J.td,children:"--"})]}),s.map(U=>r(W1,{item:U,isSelected:w.has(U.path),onClick:Q=>T(U,Q),onOpen:()=>z(U),onGenerateThumbnail:()=>B(U),editedImageKey:re},U.path)),h&&d&&!m&&b("tr",{css:J.featuredRow,onClick:W,title:`Generate ${d.filename}`,children:[r("td",{css:J.td}),r("td",{css:J.td,children:b("div",{css:J.nameCell,children:[r("div",{css:J.folderIconWrapper,children:r("svg",{css:J.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),r("span",{css:[J.name,J.featuredText,"",""],children:d.filename})]})}),r("td",{css:[J.td,J.meta,J.featuredText,"",""],children:"--"}),r("td",{css:[J.td,J.meta,J.featuredText,"",""],children:"Click to generate"}),r("td",{css:[J.td,J.featuredText,"",""],children:"--"})]})]})]})})]})}function W1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[C,D]=v.useState(!1),w=i.type==="folder",g=!w&&i.thumbnail!==void 0,T=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||w&&i.name==="images"&&i.path==="public/images",B=H=>{H.stopPropagation();const Y="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(Y),D(!0),setTimeout(()=>D(!1),1500)},q=H=>{if(z){H.stopPropagation(),d();return}f(H)};return b("tr",{css:[J.row,s&&!z&&J.rowSelected,"",""],onClick:q,children:[r("td",{css:[J.td,J.checkboxCell,"",""],onClick:H=>H.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:J.checkbox,checked:s,onChange:()=>f({})})}),r("td",{css:J.td,children:b("div",{css:J.nameCell,children:[w?z?b("div",{css:J.imagesFolderWrapper,children:[r("svg",{css:J.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:J.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("div",{css:J.folderIconWrapper,children:r("svg",{css:J.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):g&&T?r("div",{css:[J.thumbnailWrapper,i.isCloud&&J.thumbnailCloud,i.isRemote&&J.thumbnailRemote,"",""],children:r("img",{css:J.thumbnail,src:T,alt:i.name,loading:"lazy"})}):r("div",{css:[J.thumbnailWrapper,i.isCloud&&J.thumbnailCloud,i.isRemote&&J.thumbnailRemote,"",""],children:r("svg",{css:J.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:J.name,title:i.name,children:P1(i.name)}),b("div",{css:J.actionsCell,children:[b("button",{css:J.copyBtn,onClick:B,title:"Copy file path",children:[C&&r("span",{css:J.tooltip,children:"Copied!"}),r("svg",{css:J.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:J.openBtn,onClick:H=>{H.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[J.td,J.meta,"",""],children:w?b("div",{css:J.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[J.folderStat,J.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:J.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[J.folderStat,J.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:J.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[J.folderStat,J.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:J.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[J.folderStat,J.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:J.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?b("span",{css:J.updateLabel,children:[r("svg",{css:J.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:J.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):i.cdnPushed?r("span",{css:J.storedLabel,children:r("svg",{css:i.isRemote?J.storedIconRemote:J.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):i.size!==void 0?Cp(i.size):"--"}),r("td",{css:[J.td,J.meta,"",""],children:w?i.totalSize!==void 0?Cp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:J.td,children:i.cdnPushed?i.isRemote?r("span",{css:J.cdnBadgeRemote,children:"Remote"}):b("span",{css:J.cdnBadge,children:[r("svg",{css:J.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):r("span",{css:J.cdnEmpty,children:"--"})})]})}function Cp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function P1(i,s=32){if(i.length<=s)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,m=s-d.length-3;if(m<6)return i.substring(0,s-3)+"...";const C=Math.ceil(m/2),D=Math.floor(m/2);return h.substring(0,C)+"..."+h.substring(h.length-D)+d}var e2=Object.defineProperty,t2=(i,s,f)=>s in i?e2(i,s,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[s]=f,Tt=(i,s,f)=>t2(i,typeof s!="symbol"?s+"":s,f);const Or={x:0,y:0,width:0,height:0,unit:"px"},Pl=(i,s,f)=>Math.min(Math.max(i,s),f),n2=(...i)=>i.filter(s=>s&&typeof s=="string").join(" "),kp=(i,s)=>i===s||i.width===s.width&&i.height===s.height&&i.x===s.x&&i.y===s.y&&i.unit===s.unit;function eo(i,s,f){return i.unit==="%"?{...Or,...i,unit:"%"}:{unit:"%",x:i.x?i.x/s*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/s*100:0,height:i.height?i.height/f*100:0}}function Xa(i,s,f){return i.unit?i.unit==="px"?{...Or,...i,unit:"px"}:{unit:"px",x:i.x?i.x*s/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*s/100:0,height:i.height?i.height*f/100:0}:{...Or,...i,unit:"px"}}function zp(i,s,f,d,h,m=0,C=0,D=d,w=h){const g={...i};let T=Math.min(m,d),z=Math.min(C,h),B=Math.min(D,d),q=Math.min(w,h);s&&(s>1?(T=C?C*s:T,z=T/s,B=D*s):(z=m?m/s:z,T=z*s,q=w/s)),g.y<0&&(g.height=Math.max(g.height+g.y,z),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,T),g.x=0);const H=d-(g.x+g.width);H<0&&(g.x=Math.min(g.x,d-T),g.width+=H);const Y=h-(g.y+g.height);if(Y<0&&(g.y=Math.min(g.y,h-z),g.height+=Y),g.width<T&&((f==="sw"||f=="nw")&&(g.x-=T-g.width),g.width=T),g.height<z&&((f==="nw"||f=="ne")&&(g.y-=z-g.height),g.height=z),g.width>B&&((f==="sw"||f=="nw")&&(g.x-=B-g.width),g.width=B),g.height>q&&((f==="nw"||f=="ne")&&(g.y-=q-g.height),g.height=q),s){const re=g.width/g.height;if(re<s){const K=Math.max(g.width/s,z);(f==="nw"||f=="ne")&&(g.y-=K-g.height),g.height=K}else if(re>s){const K=Math.max(g.height*s,T);(f==="sw"||f=="nw")&&(g.x-=K-g.width),g.width=K}}return g}function a2(i,s,f,d){const h={...i};return s==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),s==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const to={capture:!0,passive:!1};let l2=0;const Va=class qn extends v.PureComponent{constructor(){super(...arguments),Tt(this,"docMoveBound",!1),Tt(this,"mouseDownOnCrop",!1),Tt(this,"dragStarted",!1),Tt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Tt(this,"componentRef",v.createRef()),Tt(this,"mediaRef",v.createRef()),Tt(this,"resizeObserver"),Tt(this,"initChangeCalled",!1),Tt(this,"instanceId",`rc-${l2++}`),Tt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Tt(this,"onCropPointerDown",s=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=Xa(f,h.width,h.height);if(d)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=s.target.dataset.ord,D=!!C;let w=s.clientX,g=s.clientY,T=m.x,z=m.y;if(C){const B=s.clientX-h.x,q=s.clientY-h.y;let H=0,Y=0;C==="ne"||C=="e"?(H=B-(m.x+m.width),Y=q-m.y,T=m.x,z=m.y+m.height):C==="se"||C==="s"?(H=B-(m.x+m.width),Y=q-(m.y+m.height),T=m.x,z=m.y):C==="sw"||C=="w"?(H=B-m.x,Y=q-(m.y+m.height),T=m.x+m.width,z=m.y):(C==="nw"||C=="n")&&(H=B-m.x,Y=q-m.y,T=m.x+m.width,z=m.y+m.height),w=T+h.x+H,g=z+h.y+Y}this.evData={startClientX:w,startClientY:g,startCropX:T,startCropY:z,clientX:s.clientX,clientY:s.clientY,isResize:D,ord:C},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Tt(this,"onComponentPointerDown",s=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:C}=this.props,D=this.getBox();if(d||h||m&&f)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const w=s.clientX-D.x,g=s.clientY-D.y,T={unit:"px",x:w,y:g,width:0,height:0};this.evData={startClientX:s.clientX,startClientY:s.clientY,startCropX:w,startCropY:g,clientX:s.clientX,clientY:s.clientY,isResize:!0},this.mouseDownOnCrop=!0,C(Xa(T,D.width,D.height),eo(T,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Tt(this,"onDocPointerMove",s=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,C=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;s.cancelable&&s.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(s));const{evData:D}=this;D.clientX=s.clientX,D.clientY=s.clientY;let w;D.isResize?w=this.resizeCrop():w=this.dragCrop(),kp(f,w)||h(Xa(w,C.width,C.height),eo(w,C.width,C.height))}),Tt(this,"onComponentKeyDown",s=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const C=s.key;let D=!1;if(!f)return;const w=this.getBox(),g=this.makePixelCrop(w),T=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep;if(C==="ArrowLeft"?(g.x-=T,D=!0):C==="ArrowRight"?(g.x+=T,D=!0):C==="ArrowUp"?(g.y-=T,D=!0):C==="ArrowDown"&&(g.y+=T,D=!0),D){s.cancelable&&s.preventDefault(),g.x=Pl(g.x,0,w.width-g.width),g.y=Pl(g.y,0,w.height-g.height);const z=Xa(g,w.width,w.height),B=eo(g,w.width,w.height);h(z,B),m&&m(z,B)}}),Tt(this,"onHandlerKeyDown",(s,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:C=0,minHeight:D=0,maxWidth:w,maxHeight:g,onChange:T,onComplete:z}=this.props,B=this.getBox();if(m||!h)return;if(s.key==="ArrowUp"||s.key==="ArrowDown"||s.key==="ArrowLeft"||s.key==="ArrowRight")s.stopPropagation(),s.preventDefault();else return;const q=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep,H=Xa(h,B.width,B.height),Y=a2(H,s.key,q,f),re=zp(Y,d,f,B.width,B.height,C,D,w,g);if(!kp(h,re)){const K=eo(re,B.width,B.height);T(re,K),z&&z(re,K)}}),Tt(this,"onDocPointerDone",s=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,C=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(s),h&&h(Xa(f,C.width,C.height),eo(f,C.width,C.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Tt(this,"onDragFocus",()=>{var s;(s=this.componentRef.current)==null||s.scrollTo(0,0)})}get document(){return document}getBox(){const s=this.mediaRef.current;if(!s)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=s.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(s){const{crop:f,onComplete:d}=this.props;if(d&&!s.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(Xa(f,h,m),eo(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,to),this.document.addEventListener("pointerup",this.onDocPointerDone,to),this.document.addEventListener("pointercancel",this.onDocPointerDone,to),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,to),this.document.removeEventListener("pointerup",this.onDocPointerDone,to),this.document.removeEventListener("pointercancel",this.onDocPointerDone,to),this.docMoveBound=!1)}getCropStyle(){const{crop:s}=this.props;if(s)return{top:`${s.y}${s.unit}`,left:`${s.x}${s.unit}`,width:`${s.width}${s.unit}`,height:`${s.height}${s.unit}`}}dragCrop(){const{evData:s}=this,f=this.getBox(),d=this.makePixelCrop(f),h=s.clientX-s.startClientX,m=s.clientY-s.startClientY;return d.x=Pl(s.startCropX+h,0,f.width-d.width),d.y=Pl(s.startCropY+m,0,f.height-d.height),d}getPointRegion(s,f,d,h){const{evData:m}=this,C=m.clientX-s.x,D=m.clientY-s.y;let w;h&&f?w=f==="nw"||f==="n"||f==="ne":w=D<m.startCropY;let g;return d&&f?g=f==="nw"||f==="w"||f==="sw":g=C<m.startCropX,g?w?"nw":"sw":w?"ne":"se"}resolveMinDimensions(s,f,d=0,h=0){const m=Math.min(d,s.width),C=Math.min(h,s.height);return!f||!m&&!C?[m,C]:f>1?m?[m,m/f]:[C*f,C]:C?[C*f,C]:[m,m/f]}resizeCrop(){const{evData:s}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[C,D]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let w=this.makePixelCrop(m);const g=this.getPointRegion(m,s.ord,C,D),T=s.ord||g;let z=s.clientX-s.startClientX,B=s.clientY-s.startClientY;(C&&T==="nw"||T==="w"||T==="sw")&&(z=Math.min(z,-C)),(D&&T==="nw"||T==="n"||T==="ne")&&(B=Math.min(B,-D));const q={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(q.x=s.startCropX,q.width=z,f?(q.height=q.width/f,q.y=s.startCropY-q.height):(q.height=Math.abs(B),q.y=s.startCropY-q.height)):g==="se"?(q.x=s.startCropX,q.y=s.startCropY,q.width=z,f?q.height=q.width/f:q.height=B):g==="sw"?(q.x=s.startCropX+z,q.y=s.startCropY,q.width=Math.abs(z),f?q.height=q.width/f:q.height=B):g==="nw"&&(q.x=s.startCropX+z,q.width=Math.abs(z),f?(q.height=q.width/f,q.y=s.startCropY-q.height):(q.height=Math.abs(B),q.y=s.startCropY+B));const H=zp(q,f,g,m.width,m.height,C,D,d,h);return f||qn.xyOrds.indexOf(T)>-1?w=H:qn.xOrds.indexOf(T)>-1?(w.x=H.x,w.width=H.width):qn.yOrds.indexOf(T)>-1&&(w.y=H.y,w.height=H.height),w.x=Pl(w.x,0,m.width-w.width),w.y=Pl(w.y,0,m.height-w.height),w}renderCropSelection(){const{ariaLabels:s=qn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:C}=this.props,D=this.getCropStyle();if(C)return dt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":s.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&dt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},dt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),dt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),dt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),dt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":s.nwDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"nw"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":s.nDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"n"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":s.neDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"ne"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":s.eDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"e"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":s.seDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"se"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":s.sDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"s"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":s.swDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"sw"),role:"button"}),dt.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":s.wDragHandle,onKeyDown:w=>this.onHandlerKeyDown(w,"w"),role:"button"})),h&&dt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:w=>w.stopPropagation()},h(this.state)),m&&dt.createElement(dt.Fragment,null,dt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),dt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(s){const f={...Or,...this.props.crop||{}};return Xa(f,s.width,s.height)}render(){const{aspect:s,children:f,circularCrop:d,className:h,crop:m,disabled:C,locked:D,style:w,ruleOfThirds:g}=this.props,{cropIsActive:T,newCropIsBeingDrawn:z}=this.state,B=m?this.renderCropSelection():null,q=n2("ReactCrop",h,T&&"ReactCrop--active",C&&"ReactCrop--disabled",D&&"ReactCrop--locked",z&&"ReactCrop--new-crop",m&&s&&"ReactCrop--fixed-aspect",m&&d&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return dt.createElement("div",{ref:this.componentRef,className:q,style:w},dt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?dt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},dt.createElement("defs",null,dt.createElement("mask",{id:`hole-${this.instanceId}`},dt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?dt.createElement("ellipse",{cx:`${m.x+m.width/2}${m.unit}`,cy:`${m.y+m.height/2}${m.unit}`,rx:`${m.width/2}${m.unit}`,ry:`${m.height/2}${m.unit}`,fill:"black"}):dt.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),dt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,B)}};Tt(Va,"xOrds",["e","w"]),Tt(Va,"yOrds",["n","s"]),Tt(Va,"xyOrds",["nw","ne","se","sw"]),Tt(Va,"nudgeStep",1),Tt(Va,"nudgeStepMedium",10),Tt(Va,"nudgeStepLarge",100),Tt(Va,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let o2=Va;const i2=on`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,Se={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",i2," 0.15s ease-out;font-family:",fi,";",""),container:y(ro," display:flex;flex:1;margin:24px;background:",c.surface,";border:1px solid ",c.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",c.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",c.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",c.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:y("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",V.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:y("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",V.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",c.surface,";border-left:1px solid ",c.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",c.border,";",""),sidebarTitle:y("font-size:",V.base,";font-weight:600;color:",c.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:y("font-size:",V.sm,";font-weight:600;color:",c.text,";",""),subSectionLabel:y("font-size:",V.xs,";font-weight:500;color:",c.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:y("padding:6px 10px;font-size:",V.sm,";border:1px solid ",c.border,";background:",c.surface,";color:",c.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:y("background-color:",c.primary,";border-color:",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primary,";border-color:",c.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:y("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",V.sm,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:y("width:80px;height:80px;border:1px solid ",c.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",c.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",V.sm,";border:1px solid ",c.border,";border-radius:6px;background:",c.surface,";color:",c.text,";text-align:center;&:focus{outline:none;border-color:",c.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",c.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",V.sm,";color:",c.textMuted,";",""),qualitySlider:y("width:100%;height:6px;border-radius:3px;background:",c.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",c.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",c.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:y("min-width:40px;font-size:",V.sm,";color:",c.text,";text-align:right;",""),fileSize:y("font-size:",V.sm,";color:",c.textMuted,";padding:8px 0;",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",c.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",V.base,";font-weight:500;background:",c.primary,";border:1px solid ",c.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",V.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:y("font-size:",V.xs,";color:",c.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",V.xs,";color:",c.textSecondary,";background:transparent;border:1px solid ",c.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";color:",c.text,";}","")},r2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function s2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function c2({imagePath:i,imageSrc:s,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:C}){const D=v.useRef(null),[w,g]=v.useState(),[T,z]=v.useState(),[B,q]=v.useState(void 0),[H,Y]=v.useState(f.width),[re,K]=v.useState(f.height),[ue,oe]=v.useState(!1),[fe,X]=v.useState(!1),[I,W]=v.useState({width:f.width,height:f.height}),[ne,U]=v.useState(1),[Q,he]=v.useState(!1),[me,ge]=v.useState(0),[le,Ee]=v.useState(!1),E=H!==I.width||re!==I.height,[F,$]=v.useState(0),[ze,Ue]=v.useState(0),[x,_]=v.useState(!1),[P,ae]=v.useState(0),[we,Ae]=v.useState(null),[Ye,bt]=v.useState(d),[Oe,Kt]=v.useState(95),[$e,ct]=v.useState(0),ft=$e!==0,Ht=Z=>{const ce=Z.currentTarget,{naturalWidth:Ge,naturalHeight:at,width:Ne,height:De}=ce;W({width:Ge,height:at}),U(Ge/Ne),X(!0),Y(Ge),K(at)},Bt=()=>{if(!fe||!D.current||Q||E||ft)return;const Z=D.current.width,ce=D.current.height;if(he(!0),B){const Ge=Z/ce;let at,Ne;B>Ge?(at=100,Ne=Ge/B*100):(Ne=100,at=B/Ge*100);const De={unit:"%",x:(100-at)/2,y:(100-Ne)/2,width:at,height:Ne};g(De);const kt={unit:"px",x:Math.round(De.x/100*Z),y:Math.round(De.y/100*ce),width:Math.round(De.width/100*Z),height:Math.round(De.height/100*ce)};z(kt)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:Z,height:ce})},Zt=()=>{he(!1),g(void 0),z(void 0)};v.useEffect(()=>{if(T&&fe&&ne>0){const Z=Math.round(T.width*ne),ce=Math.round(T.height*ne);$(Z),Ue(ce)}else Q||($(0),Ue(0))},[T,fe,ne,Q]);const ee=()=>{ct(Z=>(Z+90)%360)},Qe=()=>{ct(Z=>(Z-90+360)%360)},Ze=()=>{ct(0)},Ke=()=>{le&&m({name:i.split("/").pop()||"",path:i,type:"file",dimensions:I}),h()},Dt=Z=>{if(q(Z),!fe||!D.current)return;const ce=D.current.width,Ge=D.current.height;if(Z){const at=ce/Ge;let Ne,De;Z>at?(Ne=100,De=at/Z*100):(De=100,Ne=Z/at*100);const kt={unit:"%",x:(100-Ne)/2,y:(100-De)/2,width:Ne,height:De};g(kt);const vt={unit:"px",x:Math.round(kt.x/100*ce),y:Math.round(kt.y/100*Ge),width:Math.round(kt.width/100*ce),height:Math.round(kt.height/100*Ge)};z(vt)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:ce,height:Ge})},St=I.width/I.height,Re=Z=>{if(Q)return;const ce=parseInt(Z.target.value)||0;Y(ce),ce>0&&K(Math.round(ce/St))},Rt=Z=>{if(Q)return;const ce=parseInt(Z.target.value)||0;K(ce),ce>0&&Y(Math.round(ce*St))},Cn=()=>{Y(I.width),K(I.height)},Yn=Z=>{if(!T||!D.current)return;const ce=parseInt(Z.target.value)||0;if(ce<=0)return;let Ge=ze;B&&(Ge=Math.round(ce/B));const at=ce/ne,Ne=Ge/ne,De={unit:"px",x:T.x,y:T.y,width:at,height:Ne},kt=D.current.width-De.x,vt=D.current.height-De.y;De.width=Math.min(at,kt),De.height=Math.min(Ne,vt),z(De),g({unit:"px",x:De.x,y:De.y,width:De.width,height:De.height})},Hn=Z=>{if(!T||!D.current)return;const ce=parseInt(Z.target.value)||0;if(ce<=0)return;let Ge=F;B&&(Ge=Math.round(ce*B));const at=Ge/ne,Ne=ce/ne,De={unit:"px",x:T.x,y:T.y,width:at,height:Ne},kt=D.current.width-De.x,vt=D.current.height-De.y;De.width=Math.min(at,kt),De.height=Math.min(Ne,vt),z(De),g({unit:"px",x:De.x,y:De.y,width:De.width,height:De.height})},kn=async()=>{if(fe){oe(!0);try{const Z=T?{x:Math.round(T.x*ne),y:Math.round(T.y*ne),width:Math.round(T.width*ne),height:Math.round(T.height*ne)}:{x:0,y:0,width:I.width,height:I.height};let ce=Q?F:E?H:I.width,Ge=Q?ze:E?re:I.height;if($e===90||$e===270){const De=ce;ce=Ge,Ge=De}const Ne=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:Z,rotation:$e,resize:{width:ce,height:Ge},quality:Oe})})).json();Ne.success?(C(),m(Ne.updatedItem),W({width:Ne.dimensions.width,height:Ne.dimensions.height}),Y(Ne.dimensions.width),K(Ne.dimensions.height),Ne.updatedItem?.size&&bt(Ne.updatedItem.size),he(!1),g(void 0),z(void 0),ct(0),Ee(!0),ge(Date.now()),ae(De=>De+1),_(!0),setTimeout(()=>_(!1),3e3)):(console.error("Edit failed:",Ne.error),Ae(Ne.error||"Failed to save image"))}catch(Z){console.error("Edit error:",Z),Ae("An error occurred while saving the image")}finally{oe(!1)}}};return b("div",{css:Se.overlay,children:[b("div",{css:Se.container,children:[b("div",{css:Se.main,children:[r("div",{css:Se.headerButtons,children:r("button",{css:Se.closeBtn,onClick:Ke,children:r("svg",{css:Se.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:Se.rotationWrapper,onClick:Bt,children:[r(o2,{crop:Q?w:void 0,onChange:Z=>g(Z),onComplete:Z=>z(Z),aspect:B,css:Se.cropWrapper,disabled:!Q,children:r("img",{ref:D,src:me?`${s}?v=${me}`:s,alt:"Edit",onLoad:Ht,style:{cursor:Q?"crosshair":"pointer"}})}),!Q&&fe&&r("div",{css:Se.cropHint,children:ft?"Save rotation first to enable crop":E?"Save resize first to enable crop":"Click to enable crop selection"}),x&&r("div",{css:Se.successBanner,children:"Image updated"},P)]})]}),b("div",{css:Se.sidebar,children:[r("div",{css:Se.sidebarHeader,children:r("h2",{css:Se.sidebarTitle,children:"Edit Image"})}),b("div",{css:Se.sidebarContent,children:[b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Crop Selection"}),r("span",{css:Se.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:Se.aspectButtons,children:r2.map(Z=>r("button",{css:[Se.aspectBtn,B===Z.value&&Se.aspectBtnActive,"",""],onClick:()=>Dt(Z.value),disabled:E||ft,children:Z.label},Z.label))}),Q&&b(nt,{children:[r("span",{css:Se.subSectionLabel,children:"Selection Size"}),b("div",{css:Se.resizeRow,children:[r("input",{type:"number",css:Se.resizeInput,value:F,onChange:Yn,min:1}),r("span",{css:Se.resizeX,children:"×"}),r("input",{type:"number",css:Se.resizeInput,value:ze,onChange:Hn,min:1}),r("span",{css:Se.resizeX,children:"px"})]})]}),r("p",{css:Se.hint,children:ft?"Save rotation first to enable crop":E?"Save resize first to enable crop":Q?"Drag corners to resize crop area":"Click image to enable crop"}),Q&&r("button",{css:Se.clearBtn,onClick:Zt,children:"Clear Selection"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Rotation"}),r("div",{css:Se.rotatePreview,children:r("img",{src:me?`${s}?v=${me}`:s,alt:"Rotation preview",style:{transform:`rotate(${$e}deg)`}})}),b("div",{css:Se.rotateButtons,children:[b("button",{css:Se.rotateBtn,onClick:Qe,disabled:ue||Q||E,children:[r("svg",{css:Se.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:Se.rotateBtn,onClick:ee,disabled:ue||Q||E,children:[r("svg",{css:Se.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),ft&&r("button",{css:Se.clearBtn,onClick:Ze,children:"Reset Rotation"}),r("p",{css:Se.hint,children:Q||E?"Save other changes first to rotate":ft?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Resize Image"}),b("div",{css:Se.resizeRow,children:[r("input",{type:"number",css:Se.resizeInput,value:H,onChange:Re,min:1,disabled:Q||ft}),r("span",{css:Se.resizeX,children:"×"}),r("input",{type:"number",css:Se.resizeInput,value:re,onChange:Rt,min:1,disabled:Q||ft}),r("span",{css:Se.resizeX,children:"px"})]}),E&&!Q&&!ft&&r("button",{css:Se.clearBtn,onClick:Cn,children:"Reset to Original"}),ft?r("p",{css:Se.hint,children:"Save rotation first to resize"}):Q?r("p",{css:Se.hint,children:"Clear crop selection to resize"}):E?r("p",{css:Se.hint,children:"Save to apply resize, then crop"}):r("p",{css:Se.hint,children:"Maintains aspect ratio"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Quality"}),b("div",{css:Se.qualityRow,children:[r("input",{type:"range",css:Se.qualitySlider,min:1,max:100,value:Oe,onChange:Z=>Kt(parseInt(Z.target.value))}),b("span",{css:Se.qualityValue,children:[Oe,"%"]})]}),r("p",{css:Se.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"File Size"}),r("p",{css:Se.fileSize,children:s2(Ye)})]})]}),b("div",{css:Se.sidebarFooter,children:[r("button",{css:Se.actionBtn,onClick:kn,disabled:ue||!fe,children:ue?b(nt,{children:[r("span",{css:Se.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:Se.cancelBtn,onClick:Ke,disabled:ue,children:"Close"})]})]})]}),we&&r(pu,{title:"Error",message:we,onClose:()=>Ae(null)})]})}const u2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],d2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function f2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return u2.includes(s)}function h2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return d2.includes(s)}const de={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:y("display:flex;flex:1;margin:24px;background:",c.surface,";border:1px solid ",c.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",c.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:y("position:relative;padding:8px;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",c.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:y("padding:8px;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",c.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",c.surface,";border-radius:12px;border:1px solid ",c.border,";",""),fileIcon:y("width:80px;height:80px;color:",c.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0;",""),sidebar:y("width:280px;background:",c.surface,";border-left:1px solid ",c.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",c.border,";",""),sidebarTitle:y("font-size:",V.base,";font-weight:600;color:",c.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:y("display:flex;justify-content:space-between;font-size:",V.sm,";",""),infoLabel:y("color:",c.textSecondary,";",""),infoValue:y("color:",c.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",c.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",c.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:y("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",c.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:y("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",V.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";text-align:left;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",c.danger,";&:hover:not(:disabled){background-color:",c.dangerLight,";border-color:",c.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function p2(){const{focusedItem:i,setFocusedItem:s,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:C,requestSync:D,requestDownload:w,requestProcess:g,setProcessMode:T,actionState:z}=oo(),[B,q]=v.useState(!1),[H,Y]=v.useState(!1),[re,K]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ue,oe]=v.useState(!1),[fe,X]=v.useState(null),[I,W]=v.useState(!1),[ne,U]=v.useState(!1),[Q,he]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[me,ge]=v.useState(!1),[le,Ee]=v.useState(0),E=z.showProgress,F=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,$=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),ze=ct=>{s(ct),Ee(Date.now()),h(ct.path)};if(!i)return null;const Ue=f2(i.name),x=h2(i.name),_="/"+i.path.replace(/^public\//,""),P=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${_}`:_,ae=le?`${P}?v=${le}`:P,we=typeof window<"u"?window.location.origin:"",Ae=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${_}`:`${we}${_}`,Ye=()=>{s(null)},bt=()=>{navigator.clipboard.writeText(Ae),W(!0),setTimeout(()=>W(!1),1500)},Oe=async ct=>{if(ct&&ct!==i.name){q(!1),Y(!0),K({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const ft=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:ct})});if(!ft.body)throw new Error("No response body");const Ht=ft.body.getReader(),Bt=new TextDecoder;let Zt="",ee="";for(;;){const{done:Qe,value:Ze}=await Ht.read();if(Qe)break;Zt+=Bt.decode(Ze,{stream:!0});const Ke=Zt.split(`
89
+ `);Zt=Ke.pop()||"";for(const Dt of Ke){if(!Dt.startsWith("data: "))continue;const St=JSON.parse(Dt.slice(6));St.type==="start"?K({current:0,total:St.total,percent:0,status:"processing",message:St.message}):St.type==="progress"?K({current:St.current,total:St.total,percent:Math.round(St.current/St.total*100),status:"processing",message:St.message}):St.type==="complete"?(ee=St.newPath,K({current:St.renamed,total:St.renamed,percent:100,status:"complete",message:"Renamed successfully"})):St.type==="error"&&(K(Re=>({...Re,status:"error",message:St.message})),X({title:"Rename Failed",message:St.message}))}}ee&&(s({...i,path:ee,name:ee.split("/").pop()||ct}),f())}catch(ft){console.error("Rename error:",ft),K(Ht=>({...Ht,status:"error",message:"Failed to rename"})),X({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Kt=async()=>{if(i){U(!0),he({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ct=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!ct.ok){const Bt=await ct.json();he({current:0,total:3,percent:0,status:"error",message:Bt.error||"Failed to generate favicons"});return}const ft=ct.body?.getReader(),Ht=new TextDecoder;if(ft){let Bt="";for(;;){const{done:Zt,value:ee}=await ft.read();if(Zt)break;Bt+=Ht.decode(ee,{stream:!0});const Qe=Bt.split(`
90
+ `);Bt=Qe.pop()||"";for(const Ze of Qe)if(Ze.startsWith("data: "))try{const Ke=JSON.parse(Ze.slice(6));Ke.type==="start"?he(Dt=>({...Dt,total:Ke.total})):Ke.type==="progress"?he({current:Ke.current,total:Ke.total,percent:Ke.percent,status:"processing",message:Ke.message}):Ke.type==="complete"?he({current:Ke.processed,total:Ke.processed,percent:100,status:Ke.errors>0?"error":"complete",message:Ke.message}):Ke.type==="error"&&he(Dt=>({...Dt,status:"error",message:Ke.message}))}catch{}}}}catch(ct){console.error("Favicon generation error:",ct),he({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},$e=()=>Ue?r("img",{css:de.image,src:ae,alt:i.name}):x?r("video",{css:de.video,src:ae,controls:!0}):b("div",{css:de.filePlaceholder,children:[r("svg",{css:de.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("p",{css:de.fileName,children:i.name})]});return b(nt,{children:[fe&&r(pu,{title:fe.title,message:fe.message,onClose:()=>X(null)}),r(Vp,{isOpen:ue,onClose:()=>oe(!1)}),B&&r(hl,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Oe,onCancel:()=>q(!1)}),H&&r(pl,{title:"Renaming",progress:re,onClose:()=>{Y(!1),f()}}),ne&&r(pl,{title:"Generating Favicons",progress:Q,onClose:()=>U(!1)}),r("div",{css:de.overlay,onClick:Ye,children:b("div",{css:de.container,onClick:ct=>ct.stopPropagation(),children:[b("div",{css:de.main,children:[b("div",{css:de.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:de.statusIcon,title:"Pushed to CDN",children:r("svg",{css:de.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),i.isRemote&&r("span",{css:de.statusIcon,title:"Remote image",children:r("svg",{css:de.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:de.copyBtn,onClick:bt,title:"Copy file path",children:[I&&r("span",{css:de.tooltip,children:"Copied!"}),r("svg",{css:de.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:de.mainCloseBtn,onClick:Ye,"aria-label":"Close",children:r("svg",{css:de.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:de.mediaWrapper,children:$e()})]}),b("div",{css:de.sidebar,children:[r("div",{css:de.sidebarHeader,children:r("h3",{css:de.sidebarTitle,children:"Details"})}),b("div",{css:de.sidebarContent,children:[b("div",{css:de.info,children:[b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"Name"}),r("span",{css:de.infoValueWrap,children:i.name})]}),b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"Path"}),r("span",{css:de.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"Size"}),r("span",{css:de.infoValue,children:m2(i.size)})]}),i.dimensions&&b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"Dimensions"}),b("span",{css:de.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"Thumbnails"}),r("span",{css:de.infoValue,children:b("span",{css:de.thumbChips,children:[i.hasSm&&r("span",{css:de.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:de.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:de.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:de.thumbChip,children:"FULL"})]})})]}),b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"CDN Status"}),r("span",{css:de.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:de.infoRow,children:[r("span",{css:de.infoLabel,children:"URL"}),r("a",{href:Ae,target:"_blank",rel:"noopener noreferrer",css:de.infoLink,title:Ae,children:Ae})]})]}),b("div",{css:de.actions,children:[b("button",{css:de.actionBtn,onClick:()=>q(!0),disabled:i.isProtected,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),Ue&&b("button",{css:de.actionBtn,onClick:()=>ge(!0),disabled:E||!$,title:$?void 0:"Download image first to edit",children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),$?"Edit Image":"Download to Edit"]}),b("button",{css:de.actionBtn,onClick:()=>C([i.path]),disabled:E||i.isProtected,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[de.actionBtn,de.actionBtnCloud,"",""],onClick:()=>D([i.path],d),disabled:E||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[de.actionBtn,de.actionBtnCloud,"",""],onClick:()=>w([i.path],d),disabled:E||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:de.actionBtn,onClick:()=>{T("generate"),g([i.path])},disabled:E||i.isProtected,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("button",{css:de.actionBtn,onClick:()=>{T("remove"),g([i.path])},disabled:E||i.isProtected,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),F&&b("button",{css:de.actionBtn,onClick:Kt,disabled:ne||i.isProtected,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[de.actionBtn,de.actionBtnDanger,"",""],onClick:()=>m([i.path]),disabled:E||i.isProtected,children:[r("svg",{css:de.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),me&&i.dimensions&&r(c2,{imagePath:i.path,imageSrc:ae,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>ge(!1),onSaveComplete:ze,triggerRefresh:f})]})}function m2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const fl={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:y("background:",c.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:y("width:24px;height:24px;color:",c.danger,";flex-shrink:0;",""),title:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0;",""),message:y("font-size:",V.base,";color:",c.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",V.base,";font-weight:500;border:none;background:",c.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",c.primaryHover,";}","")};function g2(){const{error:i,clearError:s}=oo();return i?r("div",{css:fl.overlay,onClick:s,children:b("div",{css:fl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:fl.header,children:[r("svg",{css:fl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),r("h3",{css:fl.title,children:i.title})]}),r("p",{css:fl.message,children:i.message}),r("button",{css:fl.button,onClick:s,children:"OK"})]})}):null}const Mp={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function y2({triggerRefresh:i,clearSelection:s,setFocusedItem:f,showError:d}){const[h,m]=v.useState(Mp),C=v.useCallback(ne=>{m(U=>({...U,progressState:typeof ne=="function"?ne(U.progressState):{...U.progressState,...ne}}))},[]),D=v.useCallback(ne=>{m(U=>({...U,showProgress:ne}))},[]),w=v.useCallback(ne=>{m(U=>({...U,progressTitle:ne}))},[]),g=Gp({setShowProgress:D,setProgressTitle:w,setProgressState:C,triggerRefresh:i}),T=v.useCallback(ne=>{m(U=>({...U,actionPaths:ne,showDeleteConfirm:!0}))},[]),z=v.useCallback(ne=>{m(U=>({...U,actionPaths:ne,showMoveModal:!0}))},[]),B=v.useCallback((ne,U)=>{const Q=ne.map(ge=>"/"+ge.replace(/^public\//,""));let he=!1,me=!1;for(const ge of ne){const le=U.find(Ee=>Ee.path===ge);le&&(le.isRemote?he=!0:le.cdnPushed||(me=!0))}m(ge=>({...ge,actionPaths:ne,syncImageCount:Q.length,syncHasRemote:he,syncHasLocal:me,showSyncConfirm:!0}))},[]),q=v.useCallback((ne,U)=>{const Q=[];for(const he of ne){const me=U.find(ge=>ge.path===he);me&&me.cdnPushed&&!me.isRemote&&Q.push(he)}m(he=>({...he,actionPaths:Q,downloadImageCount:Q.length,downloadTotalSelected:ne.length,showDownloadConfirm:!0}))},[]),H=v.useCallback(ne=>{m(U=>({...U,actionPaths:ne,showProcessConfirm:!0}))},[]),Y=v.useCallback(ne=>{m(U=>({...U,processMode:ne}))},[]),re=v.useCallback(()=>{m(ne=>({...ne,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),K=v.useCallback(()=>{m(Mp)},[]),ue=v.useCallback(()=>{g.stop()},[g]),oe=v.useCallback(async()=>{const ne=h.actionPaths;m(U=>({...U,showDeleteConfirm:!1}));try{const U=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ne})});if(U.ok)s(),f(null),i();else{const Q=await U.json();d("Delete Failed",Q.error||"Unknown error")}}catch(U){console.error("Delete error:",U),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,s,f,i,d]),fe=v.useCallback(async ne=>{const U=h.actionPaths;m(Q=>({...Q,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:U,destination:ne},title:"Moving Files",onComplete:Q=>{Q.errors&&Q.errors>0&&Q.errorMessages?.length&&d("Move Failed",Q.errorMessages.join(`
91
+ `)),s(),f(null)}})},[h.actionPaths,s,f,d,g]),X=v.useCallback(async()=>{const U=h.actionPaths.map(me=>"/"+me.replace(/^public\//,""));m(me=>({...me,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:U.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let Q=0;const he=[];for(let me=0;me<U.length;me++){const ge=U[me];try{const le=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ge]})});if(le.ok)Q++;else{const Ee=await le.json();he.push(`${ge}: ${Ee.error||"Unknown error"}`)}}catch(le){he.push(`${ge}: ${le instanceof Error?le.message:"Unknown error"}`)}C({current:me+1,total:U.length,percent:Math.round((me+1)/U.length*100),status:"processing",message:`Pushed ${ge}`})}C({current:U.length,total:U.length,percent:100,status:he.length>0?"error":"complete",message:`Pushed ${Q} file${Q!==1?"s":""}${he.length>0?`, ${he.length} error${he.length!==1?"s":""}`:""}`}),he.length>0&&d("Push Errors",he.join(`
92
+ `)),s(),i()},[h.actionPaths,s,i,d,C]),I=v.useCallback(async()=>{const ne=h.actionPaths,U=h.processMode,Q=ne.map(le=>{const Ee=le.replace(/^public\//,"");return Ee.startsWith("/")?Ee:`/${Ee}`}),he=U==="remove",me=he?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",ge=he?"Removing Thumbnails":"Generating Thumbnails";m(le=>({...le,showProcessConfirm:!1})),await g.execute({endpoint:me,body:{imageKeys:Q},title:ge})},[h.actionPaths,h.processMode,g]),W=v.useCallback(async()=>{const ne=h.progressState.orphanedFiles;if(!(!ne||ne.length===0))try{const U=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ne})});if(U.ok)C(Q=>({...Q,orphanedFiles:void 0,message:Q.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const Q=await U.json();d("Delete Failed",Q.error||"Failed to delete orphaned files")}}catch(U){console.error("Delete orphans error:",U),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,C]);return{actionState:h,setActionState:m,requestDelete:T,requestMove:z,requestSync:B,requestDownload:q,requestProcess:H,setProcessMode:Y,cancelAction:re,closeProgress:K,stopProcessing:ue,confirmDelete:oe,confirmMove:fe,confirmSync:X,confirmProcess:I,deleteOrphans:W}}const Dp="36px",Ep=on`
93
+ to { transform: rotate(360deg); }
94
+ `,te={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",c.surface,";border-bottom:1px solid ",c.border,";@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Dp,";padding:0 14px;border-radius:6px;font-size:",V.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",c.primary,";border-color:",c.primary,";color:white;&:hover:not(:disabled){background:",c.primaryHover,";border-color:",c.primaryHover,";}",""),btnDanger:y("color:",c.danger,";&:hover:not(:disabled){background-color:",c.dangerLight,";border-color:",c.danger,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1tznmxd",styles:"flex:1;overflow:auto;padding:20px 24px"},loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",c.border,";border-top-color:",c.primary,";animation:",Ep," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",c.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",V.base,";margin:0 0 4px 0;&:last-child{color:",c.textMuted,";font-size:",V.sm,";}",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",c.surface,";border-radius:8px;border:1px solid ",c.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",V.base,";font-weight:500;color:",c.textSecondary,";cursor:pointer;&:hover{color:",c.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",c.primary,";",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",c.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",c.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",c.primary,";box-shadow:0 0 0 1px ",c.primary,";",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",c.primary,";cursor:pointer;",""),itemContent:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",c.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:y("width:56px;height:56px;color:",c.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",c.textMuted,";",""),openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",V.sm,";font-weight:500;color:",c.primary,";background:",c.surface,";border:1px solid ",c.border,";padding:0 8px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);&:hover{background-color:",c.primaryLight,";border-color:",c.primary,";}",""),label:y("padding:10px 12px;background-color:",c.surface,";border-top:1px solid ",c.borderLight,";",""),labelName:y("font-size:",V.sm,";font-weight:500;color:",c.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:y("font-size:",V.xs,";color:",c.textMuted,";margin:2px 0 0 0;",""),dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",c.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",c.primary,";font-size:",V.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",c.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",c.primaryHover,";}",""),viewToggle:y("display:flex;align-items:center;height:",Dp,";background-color:",c.surface,";border:1px solid ",c.border,";border-radius:6px;overflow:hidden;",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",c.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",c.text,";background-color:",c.surfaceHover,";}",""),viewBtnActive:y("background-color:",c.primaryLight,";color:",c.primary,";&:hover{background-color:",c.primaryLight,";color:",c.primary,";}",""),iconSpin:y("animation:",Ep," 1s linear infinite;",""),tableWrapper:y("background:",c.surface,";border-radius:8px;border:1px solid ",c.border,";overflow-x:auto;",""),table:{name:"1ceqwkv",styles:"width:100%;min-width:400px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",c.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",c.background,";border-bottom:1px solid ",c.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",c.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",c.borderLight,";}",""),rowSelected:y("background-color:",c.primaryLight,";&:hover{background-color:",c.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",c.border,";&:hover{background-color:",c.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIconSmall:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},fileIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},fileIconSmall:y("width:20px;height:20px;color:",c.textMuted,";",""),parentIconSmall:y("width:20px;height:20px;color:",c.textMuted,";flex-shrink:0;",""),name:y("font-size:",V.base,";font-weight:500;color:",c.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",V.sm,";color:",c.textSecondary,";",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},listOpenBtn:y("height:32px;font-size:",V.sm,";font-weight:500;color:",c.primary,";background:",c.surface,";border:1px solid ",c.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",c.primaryLight,";border-color:",c.primary,";}","")};function Ap(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function b2({currentPath:i,setCurrentPath:s,refreshKey:f,triggerRefresh:d}){const[h,m]=v.useState([]),[C,D]=v.useState(!0),[w,g]=v.useState(new Set),[T,z]=v.useState(!1),[B,q]=v.useState(!1),[H,Y]=v.useState(!1),[re,K]=v.useState(!1),[ue,oe]=v.useState(!1),[fe,X]=v.useState(!1),[I,W]=v.useState("grid"),[ne,U]=v.useState(!1),Q=v.useCallback(async()=>{try{D(!0);const ee=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(ee.ok){const Qe=await ee.json();m(Qe.items||[]),z(Qe.canCreate===!0)}}catch(ee){console.error("Failed to fetch fonts:",ee),m([])}finally{D(!1)}},[i]);v.useEffect(()=>{Q(),g(new Set)},[Q,f]);const he=i==="_fonts";i==="src"||i.startsWith("src/");const me=v.useCallback((ee,Qe)=>{Qe.stopPropagation(),g(Ze=>{const Ke=new Set(Ze);return Ke.has(ee.path)?Ke.delete(ee.path):Ke.add(ee.path),Ke})},[]),ge=v.useCallback(ee=>{ee.type==="folder"&&(s(ee.path),g(new Set))},[s]),le=v.useCallback(()=>{const ee=i.split("/");ee.pop();const Qe=ee.join("/")||"_fonts";s(Qe),g(new Set)},[i,s]),Ee=h.length>0&&w.size===h.length,E=w.size>0,F=v.useCallback(()=>{g(Ee?new Set:new Set(h.map(ee=>ee.path)))},[Ee,h]),$=v.useCallback(async()=>{U(!0),await Q(),U(!1)},[Q]),ze=Array.from(w),Ue=ze.length===1&&h.find(ee=>ee.path===ze[0])?.type==="folder",x=Ue?ze[0]:null,_=x&&x.split("/").pop()||"",P=ze.length===1&&h.find(ee=>ee.path===ze[0])?.type==="file",ae=P?ze[0]:null,we=ae&&ae.split("/").pop()||"",Ae=v.useCallback(async ee=>{if(x){Y(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:x,newName:ee})})).ok&&(g(new Set),d())}catch(Qe){console.error("Rename failed:",Qe)}}},[x,d]),Ye=v.useCallback(async ee=>{if(ae){K(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:ae,newName:ee})})).ok&&(g(new Set),d())}catch(Qe){console.error("Rename file failed:",Qe)}}},[ae,d]),bt=v.useCallback(()=>{w.size!==0&&X(!0)},[w.size]),Oe=v.useCallback(async()=>{X(!1);try{(await fetch("/api/studio/fonts/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(w)})})).ok&&(g(new Set),d())}catch(ee){console.error("Delete failed:",ee)}},[w,d]),Kt=v.useCallback(()=>{oe(!0)},[]),$e=v.useCallback(async ee=>{oe(!1);try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:ee})})).ok&&d()}catch(Qe){console.error("Create folder failed:",Qe)}},[i,d]),ct=v.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),i.startsWith("_fonts")&&q(!0)},[i]),ft=v.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),q(!1)},[]),Ht=v.useCallback(async ee=>{if(ee.preventDefault(),ee.stopPropagation(),q(!1),!i.startsWith("_fonts"))return;const Qe=Array.from(ee.dataTransfer.files).filter(Ze=>Ze.name.toLowerCase().endsWith(".ttf"));if(Qe.length!==0){for(const Ze of Qe){const Ke=new FormData;Ke.append("file",Ze),Ke.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Ke})}catch(Dt){console.error("Upload failed:",Dt)}}d()}},[i,d]),Bt=v.useCallback(ee=>{ee&&ee.addEventListener("change",async Qe=>{const Ze=Qe.target.files;if(!(!Ze||Ze.length===0)){for(const Ke of Array.from(Ze)){if(!Ke.name.toLowerCase().endsWith(".ttf"))continue;const Dt=new FormData;Dt.append("file",Ke),Dt.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Dt})}catch(St){console.error("Upload failed:",St)}}d(),ee.value=""}})},[i,d]);if(C)return b("div",{css:te.container,children:[r("div",{css:te.toolbar}),r("div",{css:te.loading,children:r("div",{css:te.spinner})})]});const Zt=i.startsWith("_fonts");return b("div",{css:te.container,children:[b("div",{css:te.toolbar,children:[b("div",{css:te.toolbarLeft,children:[Zt&&b(nt,{children:[b("button",{css:[te.btn,te.btnPrimary,"",""],onClick:()=>document.getElementById("font-file-input")?.click(),children:[r(v2,{}),"Add New"]}),r("input",{id:"font-file-input",type:"file",accept:".ttf",multiple:!0,style:{display:"none"},ref:Bt})]}),b("button",{css:te.btn,onClick:()=>{P?K(!0):Ue?Y(!0):Kt()},children:[P||Ue?r(w2,{}):r(x2,{}),P?"Rename File":Ue?"Rename Folder":"New Folder"]}),b("button",{css:[te.btn,te.btnDanger,"",""],onClick:bt,disabled:w.size===0,children:[r(S2,{}),"Delete"]})]}),b("div",{css:te.toolbarRight,children:[r("button",{css:te.btn,onClick:$,title:"Refresh view",disabled:ne,children:r(M2,{spinning:ne})}),b("div",{css:te.viewToggle,children:[r("button",{css:[te.viewBtn,I==="grid"&&te.viewBtnActive,"",""],onClick:()=>W("grid"),"aria-label":"Grid view",children:r(D2,{})}),r("button",{css:[te.viewBtn,I==="list"&&te.viewBtnActive,"",""],onClick:()=>W("list"),"aria-label":"List view",children:r(E2,{})})]})]})]}),b("div",{css:te.content,onDragOver:ct,onDragLeave:ft,onDrop:Ht,style:{position:"relative"},children:[B&&r("div",{css:te.dropOverlay,children:b("div",{css:te.dropMessage,children:[r(C2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!T?b("div",{css:te.empty,children:[r(lu,{css:te.emptyIcon}),r("p",{css:te.emptyText,children:"No files yet"}),r("p",{css:te.emptyText,children:Zt?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&T?b("div",{css:te.empty,children:[r(lu,{css:te.emptyIcon}),r("p",{css:te.emptyText,children:"Folder doesn't exist"}),r("button",{css:te.createBtn,onClick:Kt,children:"Create Folder"})]}):I==="grid"?b(nt,{children:[h.length>0&&r("div",{css:te.selectAllRow,children:b("label",{css:te.selectAllLabel,children:[r("input",{type:"checkbox",css:te.selectAllCheckbox,checked:Ee,ref:ee=>{ee&&(ee.indeterminate=E&&!Ee)},onChange:F}),"Select all (",h.length,")"]})}),b("div",{css:te.grid,children:[!he&&b("div",{css:te.item,onClick:le,onDoubleClick:le,children:[r("div",{css:te.itemContent,children:r(k2,{})}),b("div",{css:te.label,children:[r("p",{css:te.labelName,children:".."}),r("p",{css:te.labelMeta,children:"Parent folder"})]})]}),h.map(ee=>{const Qe=w.has(ee.path);return b("div",{css:[te.item,Qe&&te.itemSelected,"",""],onClick:Ze=>me(ee,Ze),onDoubleClick:()=>ge(ee),children:[r("div",{css:te.checkboxWrapper,onClick:Ze=>{Ze.stopPropagation(),me(ee,Ze)},children:r("input",{type:"checkbox",css:te.checkbox,checked:Qe,onChange:()=>{}})}),b("div",{css:te.itemContent,children:[r("button",{css:te.openBtn,onClick:Ze=>{Ze.stopPropagation(),ge(ee)},children:"Open"}),ee.type==="folder"?r(lu,{}):r(z2,{})]}),b("div",{css:te.label,children:[r("p",{css:te.labelName,children:ee.name}),r("p",{css:te.labelMeta,children:ee.type==="folder"?`${ee.fileCount||0} files`:ee.size?Ap(ee.size):""})]})]},ee.path)})]})]}):r("div",{css:te.tableWrapper,children:b("table",{css:te.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[te.th,te.thCheckbox,"",""],children:h.length>0&&r("input",{type:"checkbox",css:te.checkbox,checked:Ee,ref:ee=>{ee&&(ee.indeterminate=E&&!Ee)},onChange:F})}),r("th",{css:te.th,children:"Name"}),r("th",{css:[te.th,te.thSize,"",""],children:"Size"})]})}),b("tbody",{children:[!he&&b("tr",{css:te.parentRow,onClick:le,children:[r("td",{css:te.td}),r("td",{css:te.td,children:b("div",{css:te.nameCell,children:[r("svg",{css:te.parentIconSmall,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:te.name,children:".."})]})}),r("td",{css:[te.td,te.meta,"",""],children:"Parent folder"})]}),h.map(ee=>{const Qe=w.has(ee.path);return b("tr",{css:[te.row,Qe&&te.rowSelected,"",""],onClick:Ze=>me(ee,Ze),children:[r("td",{css:[te.td,te.checkboxCell,"",""],onClick:Ze=>Ze.stopPropagation(),children:r("input",{type:"checkbox",css:te.checkbox,checked:Qe,onChange:()=>me(ee,{})})}),r("td",{css:te.td,children:b("div",{css:te.nameCell,children:[ee.type==="folder"?r("div",{css:te.folderIconWrapper,children:r("svg",{css:te.folderIconSmall,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):r("div",{css:te.fileIconWrapper,children:r("svg",{css:te.fileIconSmall,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:te.name,title:ee.name,children:ee.name}),r("div",{css:te.actionsCell,children:r("button",{css:te.listOpenBtn,onClick:Ze=>{Ze.stopPropagation(),ge(ee)},children:"Open"})})]})}),r("td",{css:[te.td,te.meta,"",""],children:ee.type==="folder"?`${ee.fileCount||0} files`:ee.size?Ap(ee.size):"--"})]},ee.path)})]})]})})]}),ue&&r(hl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:$e,onCancel:()=>oe(!1)}),H&&x&&r(hl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:_,defaultValue:_,confirmLabel:"Rename",onConfirm:Ae,onCancel:()=>Y(!1)}),re&&ae&&r(hl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:we,defaultValue:we,confirmLabel:"Rename",onConfirm:Ye,onCancel:()=>K(!1)}),fe&&r(ao,{title:"Delete Items",message:`Are you sure you want to delete ${w.size} item${w.size!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Oe,onCancel:()=>X(!1)})]})}function v2(){return r("svg",{css:te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function x2(){return r("svg",{css:te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function S2(){return r("svg",{css:te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function w2(){return r("svg",{css:te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function C2(){return r("svg",{css:te.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function lu(){return r("svg",{css:te.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}function k2(){return r("svg",{css:te.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}function z2(){return r("svg",{css:te.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}function M2({spinning:i}){return r("svg",{css:[te.btnIcon,i&&te.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function D2(){return r("svg",{css:te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function E2(){return r("svg",{css:te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}const A2="36px",Ct={container:y(ro," display:flex;flex-direction:column;height:100%;background:",c.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",c.surface,";border-bottom:1px solid ",c.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:y("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",c.text,";background:transparent;border:none;padding:4px 8px;margin:-4px -8px;border-radius:6px;cursor:pointer;letter-spacing:-0.02em;transition:background 0.15s ease;&:hover{background:",c.surfaceHover,";}",""),titleChevron:y("width:18px;height:18px;color:",c.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:y("position:absolute;top:calc(100% + 8px);left:0;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);padding:4px;z-index:100;",""),dropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;white-space:nowrap;position:relative;top:1px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",c.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",c.surfaceHover,";}",""),dropdownItemActive:y("&::after{content:'';display:inline-block;width:8px;height:8px;background:",c.primary,";border-radius:50%;position:relative;top:1px;}",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:y("display:flex;align-items:center;gap:6px;font-size:",V.base,";color:",c.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",c.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",c.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",c.primary,";}",""),breadcrumbCurrent:y("color:",c.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:y("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",c.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",c.text,";background:",c.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",A2,";padding:0 12px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",c.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",c.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",c.primary,";font-size:",V.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function T2({onClose:i,isVisible:s=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=i||(()=>{}),[C,D]=v.useState("public"),[w,g]=v.useState(new Set),[T,z]=v.useState(null),[B,q]=v.useState("grid"),[H,Y]=v.useState(null),[re,K]=v.useState(null),[ue,oe]=v.useState(!1),[fe,X]=v.useState(0),[I,W]=v.useState(!1),[ne,U]=v.useState(""),[Q,he]=v.useState(null),[me,ge]=v.useState([]),[le,Ee]=v.useState(!1),[E,F]=v.useState(()=>{if(typeof window<"u"){const Z=window.location.hash.slice(1);if(Z==="fonts")return"fonts";if(Z==="media")return"media"}return"media"}),[$,ze]=v.useState(!1),Ue=v.useRef(null);v.useEffect(()=>{const Z=()=>{const ce=window.location.hash.slice(1);ce==="fonts"?F("fonts"):ce==="media"&&F("media")};return window.addEventListener("hashchange",Z),()=>window.removeEventListener("hashchange",Z)},[]);const[x,_]=v.useState("_fonts"),[P,ae]=v.useState(0),we=v.useCallback(()=>{X(Z=>Z+1)},[]),[Ae,Ye]=v.useState(null),bt=v.useCallback(Z=>{Ye({path:Z,key:Date.now()})},[]);v.useEffect(()=>{if(H&&me.length>0){const Z=me.find(ce=>ce.path===H.path);Z&&JSON.stringify(Z)!==JSON.stringify(H)&&Y(Z)}},[me,H]);const Oe=v.useCallback(()=>{W(!0)},[]),Kt=v.useCallback(()=>{W(!1)},[]),$e=v.useCallback((Z,ce)=>{he({title:Z,message:ce})},[]),ct=v.useCallback(()=>{he(null)},[]),ft=v.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),Ee(!0)},[]),Ht=v.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),Ee(!1)},[]),Bt=v.useCallback(async Z=>{Z.preventDefault(),Z.stopPropagation(),Ee(!1);const ce=Array.from(Z.dataTransfer.files);if(ce.length!==0&&!(C==="public/images"||C.startsWith("public/images/"))){for(const Ge of ce){const at=new FormData;at.append("file",Ge),at.append("path",C);try{await fetch("/api/studio/upload",{method:"POST",body:at})}catch(Ne){console.error("Upload error:",Ne)}}we()}},[C,we]),Zt=v.useCallback(()=>{if(C==="public")return;const Z=C.split("/");Z.pop(),D(Z.join("/")||"public"),g(new Set)},[C]),ee=v.useCallback(Z=>{D(Z),g(new Set),Y(null)},[]),Qe=v.useCallback(Z=>{g(ce=>{const Ge=new Set(ce);return Ge.has(Z)?Ge.delete(Z):Ge.add(Z),Ge}),z(Z)},[]),Ze=v.useCallback((Z,ce,Ge)=>{const at=Ge.findIndex(vt=>vt.path===Z),Ne=Ge.findIndex(vt=>vt.path===ce);if(at===-1||Ne===-1)return;const De=Math.min(at,Ne),kt=Math.max(at,Ne);g(vt=>{const ml=new Set(vt);for(let Qa=De;Qa<=kt;Qa++)ml.add(Ge[Qa].path);return ml}),z(ce)},[]),Ke=v.useCallback(Z=>{g(new Set(Z.map(ce=>ce.path)))},[]),Dt=v.useCallback(()=>{g(new Set)},[]),St=v.useCallback(Z=>{Y(Z)},[]),Re=y2({triggerRefresh:we,clearSelection:Dt,setFocusedItem:St,showError:$e}),Rt=v.useCallback(Z=>{if(Z.key==="Escape"){const ce=Z.target;if(ce.tagName==="INPUT"||ce.tagName==="TEXTAREA")return;H?Y(null):f||m()}},[m,H,f]);v.useEffect(()=>(s&&(document.addEventListener("keydown",Rt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Rt),document.body.style.overflow=""}),[Rt,s]),v.useEffect(()=>{const Z=ce=>{Ue.current&&!Ue.current.contains(ce.target)&&ze(!1)};return $&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[$]);const Cn=v.useCallback(()=>{ze(Z=>!Z)},[]),Yn=v.useCallback(Z=>{F(Z),ze(!1),window.location.hash=Z},[]),Hn=v.useCallback(()=>{ae(Z=>Z+1)},[]),kn={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:C,setCurrentPath:ee,navigateUp:Zt,selectedItems:w,toggleSelection:Qe,selectRange:Ze,selectAll:Ke,clearSelection:Dt,lastSelectedPath:T,viewMode:B,setViewMode:q,focusedItem:H,setFocusedItem:Y,meta:re,setMeta:K,isLoading:ue,setIsLoading:oe,refreshKey:fe,triggerRefresh:we,editedImageKey:Ae,setEditedImageKey:bt,scanRequested:I,triggerScan:Oe,clearScanRequest:Kt,searchQuery:ne,setSearchQuery:U,error:Q,showError:$e,clearError:ct,fileItems:me,setFileItems:ge,actionState:Re.actionState,requestDelete:Re.requestDelete,requestMove:Re.requestMove,requestSync:Re.requestSync,requestDownload:Re.requestDownload,requestProcess:Re.requestProcess,setProcessMode:Re.setProcessMode,confirmDelete:Re.confirmDelete,confirmMove:Re.confirmMove,confirmSync:Re.confirmSync,confirmProcess:Re.confirmProcess,cancelAction:Re.cancelAction,closeProgress:Re.closeProgress,stopProcessing:Re.stopProcessing,deleteOrphans:Re.deleteOrphans};return r(Yp.Provider,{value:kn,children:b("div",{css:Ct.container,children:[b("div",{css:Ct.header,children:[r("div",{css:Ct.headerLeft,children:b("div",{css:Ct.titleDropdown,ref:Ue,children:[b("button",{css:Ct.titleButton,onClick:Cn,children:[r("span",{children:"gallop.studio"}),r(U2,{isOpen:$})]}),$&&b("div",{css:Ct.dropdownMenu,children:[r("button",{css:[Ct.dropdownItem,E==="media"&&Ct.dropdownItemActive,"",""],onClick:()=>Yn("media"),children:"media & files"}),r("button",{css:[Ct.dropdownItem,E==="fonts"&&Ct.dropdownItemActive,"",""],onClick:()=>Yn("fonts"),children:"fonts"})]})]})}),r("div",{css:Ct.headerCenter,children:r(O2,{currentPath:C,onNavigate:ee,projectName:d?d.split("/").pop():void 0})}),b("div",{css:Ct.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Ct.headerIconBtn,title:`Open ${h}`,children:r(H2,{})}),!f&&r("button",{css:Ct.headerBtn,onClick:m,"aria-label":"Close Studio",children:r(B2,{})})]})]}),E==="media"?b(nt,{children:[r(z1,{}),b("div",{css:Ct.content,onDragOver:ft,onDragLeave:Ht,onDrop:Bt,children:[le&&r("div",{css:Ct.dropOverlay,children:b("div",{css:Ct.dropMessage,children:[r("svg",{css:Ct.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:Ct.fileBrowser,children:B==="grid"?r(K1,{}):r(I1,{})})]}),H&&r(p2,{}),r(g2,{}),Re.actionState.showDeleteConfirm&&r(ao,{title:"Delete Files",message:`Are you sure you want to delete ${Re.actionState.actionPaths.length} item${Re.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Re.confirmDelete,onCancel:Re.cancelAction}),Re.actionState.showSyncConfirm&&r(ao,{title:"Push to CDN",message:`Push ${Re.actionState.syncImageCount} image${Re.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Re.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Re.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Re.confirmSync,onCancel:Re.cancelAction}),Re.actionState.showProcessConfirm&&r(_2,{imageCount:Re.actionState.actionPaths.length,mode:Re.actionState.processMode,onConfirm:Re.confirmProcess,onCancel:Re.cancelAction}),Re.actionState.showMoveModal&&r(Xp,{selectedItems:new Set(Re.actionState.actionPaths),currentPath:C,onMove:Z=>Re.confirmMove(Z),onCancel:Re.cancelAction}),Re.actionState.showProgress&&r(pl,{title:Re.actionState.progressTitle,progress:Re.actionState.progressState,onStop:Re.stopProcessing,onDeleteOrphans:Re.deleteOrphans,onClose:Re.closeProgress})]}):r(b2,{currentPath:x,setCurrentPath:_,refreshKey:P,triggerRefresh:Hn})]})})}var R2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},L2={name:"1ca3l8d",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:10000"};function _2({imageCount:i,mode:s,onConfirm:f,onCancel:d}){const h={overlay:L2,container:y("background:",c.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:y("font-size:",V.lg,";font-weight:600;color:",c.text,";margin:0 0 16px;",""),message:y("font-size:",V.base,";color:",c.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:R2,cancelBtn:y("padding:10px 20px;border:1px solid ",c.border,";border-radius:8px;background:",c.background,";color:",c.text,";font-size:",V.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";border-color:",c.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",c.primary,";color:white;font-size:",V.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",c.primaryHover,";}",""),confirmBtnDanger:y("background:",c.danger,";&:hover{background:#dc2626;}","")},m=s==="remove",C=m?"Remove Thumbnails":"Generate Thumbnails",D=m?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,w=m?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[r("h2",{css:h.title,children:C}),r("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:w})]})]})})}function O2({currentPath:i,onNavigate:s,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((m,C)=>({name:C===0&&m==="public"&&f?f:m,path:d.slice(0,C+1).join("/")}));return r("div",{css:Ct.breadcrumbs,children:h.map((m,C)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[C>0&&r("span",{css:Ct.breadcrumbSeparator,children:"/"}),C===h.length-1?r("span",{css:Ct.breadcrumbCurrent,children:m.name}):r("span",{css:Ct.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.path))})}function H2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function B2(){return b("svg",{css:Ct.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function U2({isOpen:i}){return r("svg",{css:[Ct.titleChevron,i&&Ct.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r("polyline",{points:"6 9 12 15 18 9"})})}const Zp=document.getElementById("root");if(!Zp)throw new Error("Root element not found");const N2=window.__STUDIO_WORKSPACE__||"Unknown",j2=window.__STUDIO_SITE_URL__||"";r1.createRoot(Zp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(T2,{isVisible:!0,standaloneMode:!0,workspacePath:N2,siteUrl:j2})})}));