@gallop.software/studio 2.3.90 → 2.3.92

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,181 @@
1
+ function sg(i,u){for(var r=0;r<u.length;r++){const s=u[r];if(typeof s!="string"&&!Array.isArray(s)){for(const h in s)if(h!=="default"&&!(h in i)){const m=Object.getOwnPropertyDescriptor(s,h);m&&Object.defineProperty(i,h,m.get?m:{enumerable:!0,get:()=>s[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))s(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&s(y)}).observe(document,{childList:!0,subtree:!0});function r(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 s(h){if(h.ep)return;h.ep=!0;const m=r(h);fetch(h.href,m)}})();function Op(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vc={exports:{}},Xo={};var ep;function cg(){if(ep)return Xo;ep=1;var i=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function r(s,h,m){var y=null;if(m!==void 0&&(y=""+m),h.key!==void 0&&(y=""+h.key),"key"in h){m={};for(var z in h)z!=="key"&&(m[z]=h[z])}else m=h;return h=m.ref,{$$typeof:i,type:s,key:y,ref:h!==void 0?h:null,props:m}}return Xo.Fragment=u,Xo.jsx=r,Xo.jsxs=r,Xo}var tp;function ug(){return tp||(tp=1,Vc.exports=cg()),Vc.exports}var Wo=ug(),Xc={exports:{}},_e={};var np;function dg(){if(np)return _e;np=1;var i=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),y=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),B=Symbol.iterator;function I(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,$={};function J(S,N,ee){this.props=S,this.context=N,this.refs=$,this.updater=ee||U}J.prototype.isReactComponent={},J.prototype.setState=function(S,N){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,N,"setState")},J.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function P(){}P.prototype=J.prototype;function Z(S,N,ee){this.props=S,this.context=N,this.refs=$,this.updater=ee||U}var de=Z.prototype=new P;de.constructor=Z,V(de,J.prototype),de.isPureReactComponent=!0;var L=Array.isArray;function re(){}var W={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function j(S,N,ee){var ce=ee.ref;return{$$typeof:i,type:S,key:N,ref:ce!==void 0?ce:null,props:ee}}function te(S,N){return j(S.type,N,S.props)}function ve(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function ae(S){var N={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ee){return N[ee]})}var X=/\/+/g;function ue(S,N){return typeof S=="object"&&S!==null&&S.key!=null?ae(""+S.key):N.toString(36)}function Le(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(re,re):(S.status="pending",S.then(function(N){S.status==="pending"&&(S.status="fulfilled",S.value=N)},function(N){S.status==="pending"&&(S.status="rejected",S.reason=N)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function k(S,N,ee,ce,Ce){var ke=typeof S;(ke==="undefined"||ke==="boolean")&&(S=null);var Be=!1;if(S===null)Be=!0;else switch(ke){case"bigint":case"string":case"number":Be=!0;break;case"object":switch(S.$$typeof){case i:case u:Be=!0;break;case _:return Be=S._init,k(Be(S._payload),N,ee,ce,Ce)}}if(Be)return Ce=Ce(S),Be=ce===""?"."+ue(S,0):ce,L(Ce)?(ee="",Be!=null&&(ee=Be.replace(X,"$&/")+"/"),k(Ce,N,ee,"",function(_t){return _t})):Ce!=null&&(ve(Ce)&&(Ce=te(Ce,ee+(Ce.key==null||S&&S.key===Ce.key?"":(""+Ce.key).replace(X,"$&/")+"/")+Be)),N.push(Ce)),1;Be=0;var Ye=ce===""?".":ce+":";if(L(S))for(var Me=0;Me<S.length;Me++)ce=S[Me],ke=Ye+ue(ce,Me),Be+=k(ce,N,ee,ke,Ce);else if(Me=I(S),typeof Me=="function")for(S=Me.call(S),Me=0;!(ce=S.next()).done;)ce=ce.value,ke=Ye+ue(ce,Me++),Be+=k(ce,N,ee,ke,Ce);else if(ke==="object"){if(typeof S.then=="function")return k(Le(S),N,ee,ce,Ce);throw N=String(S),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return Be}function q(S,N,ee){if(S==null)return S;var ce=[],Ce=0;return k(S,ce,"","",function(ke){return N.call(ee,ke,Ce++)}),ce}function fe(S){if(S._status===-1){var N=S._result;N=N(),N.then(function(ee){(S._status===0||S._status===-1)&&(S._status=1,S._result=ee)},function(ee){(S._status===0||S._status===-1)&&(S._status=2,S._result=ee)}),S._status===-1&&(S._status=0,S._result=N)}if(S._status===1)return S._result.default;throw S._result}var Ne=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},xe={map:q,forEach:function(S,N,ee){q(S,function(){N.apply(this,arguments)},ee)},count:function(S){var N=0;return q(S,function(){N++}),N},toArray:function(S){return q(S,function(N){return N})||[]},only:function(S){if(!ve(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return _e.Activity=D,_e.Children=xe,_e.Component=J,_e.Fragment=r,_e.Profiler=h,_e.PureComponent=Z,_e.StrictMode=s,_e.Suspense=M,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,_e.__COMPILER_RUNTIME={__proto__:null,c:function(S){return W.H.useMemoCache(S)}},_e.cache=function(S){return function(){return S.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(S,N,ee){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var ce=V({},S.props),Ce=S.key;if(N!=null)for(ke in N.key!==void 0&&(Ce=""+N.key),N)!K.call(N,ke)||ke==="key"||ke==="__self"||ke==="__source"||ke==="ref"&&N.ref===void 0||(ce[ke]=N[ke]);var ke=arguments.length-2;if(ke===1)ce.children=ee;else if(1<ke){for(var Be=Array(ke),Ye=0;Ye<ke;Ye++)Be[Ye]=arguments[Ye+2];ce.children=Be}return j(S.type,Ce,ce)},_e.createContext=function(S){return S={$$typeof:y,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:m,_context:S},S},_e.createElement=function(S,N,ee){var ce,Ce={},ke=null;if(N!=null)for(ce in N.key!==void 0&&(ke=""+N.key),N)K.call(N,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(Ce[ce]=N[ce]);var Be=arguments.length-2;if(Be===1)Ce.children=ee;else if(1<Be){for(var Ye=Array(Be),Me=0;Me<Be;Me++)Ye[Me]=arguments[Me+2];Ce.children=Ye}if(S&&S.defaultProps)for(ce in Be=S.defaultProps,Be)Ce[ce]===void 0&&(Ce[ce]=Be[ce]);return j(S,ke,Ce)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(S){return{$$typeof:z,render:S}},_e.isValidElement=ve,_e.lazy=function(S){return{$$typeof:_,_payload:{_status:-1,_result:S},_init:fe}},_e.memo=function(S,N){return{$$typeof:g,type:S,compare:N===void 0?null:N}},_e.startTransition=function(S){var N=W.T,ee={};W.T=ee;try{var ce=S(),Ce=W.S;Ce!==null&&Ce(ee,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(re,Ne)}catch(ke){Ne(ke)}finally{N!==null&&ee.types!==null&&(N.types=ee.types),W.T=N}},_e.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},_e.use=function(S){return W.H.use(S)},_e.useActionState=function(S,N,ee){return W.H.useActionState(S,N,ee)},_e.useCallback=function(S,N){return W.H.useCallback(S,N)},_e.useContext=function(S){return W.H.useContext(S)},_e.useDebugValue=function(){},_e.useDeferredValue=function(S,N){return W.H.useDeferredValue(S,N)},_e.useEffect=function(S,N){return W.H.useEffect(S,N)},_e.useEffectEvent=function(S){return W.H.useEffectEvent(S)},_e.useId=function(){return W.H.useId()},_e.useImperativeHandle=function(S,N,ee){return W.H.useImperativeHandle(S,N,ee)},_e.useInsertionEffect=function(S,N){return W.H.useInsertionEffect(S,N)},_e.useLayoutEffect=function(S,N){return W.H.useLayoutEffect(S,N)},_e.useMemo=function(S,N){return W.H.useMemo(S,N)},_e.useOptimistic=function(S,N){return W.H.useOptimistic(S,N)},_e.useReducer=function(S,N,ee){return W.H.useReducer(S,N,ee)},_e.useRef=function(S){return W.H.useRef(S)},_e.useState=function(S){return W.H.useState(S)},_e.useSyncExternalStore=function(S,N,ee){return W.H.useSyncExternalStore(S,N,ee)},_e.useTransition=function(){return W.H.useTransition()},_e.version="19.2.4",_e}var ap;function su(){return ap||(ap=1,Xc.exports=dg()),Xc.exports}var C=su();const Lp=Op(C),lp=sg({__proto__:null,default:Lp},[C]);function fg(i){if(i.sheet)return i.sheet;for(var u=0;u<document.styleSheets.length;u++)if(document.styleSheets[u].ownerNode===i)return document.styleSheets[u]}function hg(i){var u=document.createElement("style");return u.setAttribute("data-emotion",i.key),i.nonce!==void 0&&u.setAttribute("nonce",i.nonce),u.appendChild(document.createTextNode("")),u.setAttribute("data-s",""),u}var pg=(function(){function i(r){var s=this;this._insertTag=function(h){var m;s.tags.length===0?s.insertionPoint?m=s.insertionPoint.nextSibling:s.prepend?m=s.container.firstChild:m=s.before:m=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(h,m),s.tags.push(h)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var u=i.prototype;return u.hydrate=function(s){s.forEach(this._insertTag)},u.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(hg(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=fg(h);try{m.insertRule(s,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(s));this.ctr++},u.flush=function(){this.tags.forEach(function(s){var h;return(h=s.parentNode)==null?void 0:h.removeChild(s)}),this.tags=[],this.ctr=0},i})(),qt="-ms-",Mr="-moz-",$e="-webkit-",Up="comm",cu="rule",uu="decl",mg="@import",Np="@keyframes",gg="@layer",vg=Math.abs,Er=String.fromCharCode,yg=Object.assign;function bg(i,u){return Ht(i,0)^45?(((u<<2^Ht(i,0))<<2^Ht(i,1))<<2^Ht(i,2))<<2^Ht(i,3):0}function Hp(i){return i.trim()}function xg(i,u){return(i=u.exec(i))?i[0]:i}function Ie(i,u,r){return i.replace(u,r)}function lu(i,u){return i.indexOf(u)}function Ht(i,u){return i.charCodeAt(u)|0}function $o(i,u,r){return i.slice(u,r)}function On(i){return i.length}function du(i){return i.length}function br(i,u){return u.push(i),i}function Sg(i,u){return i.map(u).join("")}var Ar=1,Gl=1,Bp=0,en=0,Et=0,Zl="";function Rr(i,u,r,s,h,m,y){return{value:i,root:u,parent:r,type:s,props:h,children:m,line:Ar,column:Gl,length:y,return:""}}function Zo(i,u){return yg(Rr("",null,null,"",null,null,0),i,{length:-i.length},u)}function Cg(){return Et}function wg(){return Et=en>0?Ht(Zl,--en):0,Gl--,Et===10&&(Gl=1,Ar--),Et}function un(){return Et=en<Bp?Ht(Zl,en++):0,Gl++,Et===10&&(Gl=1,Ar++),Et}function Un(){return Ht(Zl,en)}function Sr(){return en}function ei(i,u){return $o(Zl,i,u)}function Io(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 jp(i){return Ar=Gl=1,Bp=On(Zl=i),en=0,[]}function qp(i){return Zl="",i}function Cr(i){return Hp(ei(en-1,ou(i===91?i+2:i===40?i+1:i)))}function zg(i){for(;(Et=Un())&&Et<33;)un();return Io(i)>2||Io(Et)>3?"":" "}function Mg(i,u){for(;--u&&un()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return ei(i,Sr()+(u<6&&Un()==32&&un()==32))}function ou(i){for(;un();)switch(Et){case i:return en;case 34:case 39:i!==34&&i!==39&&ou(Et);break;case 40:i===41&&ou(i);break;case 92:un();break}return en}function Eg(i,u){for(;un()&&i+Et!==57;)if(i+Et===84&&Un()===47)break;return"/*"+ei(u,en-1)+"*"+Er(i===47?i:un())}function Ag(i){for(;!Io(Un());)un();return ei(i,en)}function Rg(i){return qp(wr("",null,null,null,[""],i=jp(i),0,[0],i))}function wr(i,u,r,s,h,m,y,z,M){for(var g=0,_=0,D=y,B=0,I=0,U=0,V=1,$=1,J=1,P=0,Z="",de=h,L=m,re=s,W=Z;$;)switch(U=P,P=un()){case 40:if(U!=108&&Ht(W,D-1)==58){lu(W+=Ie(Cr(P),"&","&\f"),"&\f")!=-1&&(J=-1);break}case 34:case 39:case 91:W+=Cr(P);break;case 9:case 10:case 13:case 32:W+=zg(U);break;case 92:W+=Mg(Sr()-1,7);continue;case 47:switch(Un()){case 42:case 47:br(Tg(Eg(un(),Sr()),u,r),M);break;default:W+="/"}break;case 123*V:z[g++]=On(W)*J;case 125*V:case 59:case 0:switch(P){case 0:case 125:$=0;case 59+_:J==-1&&(W=Ie(W,/\f/g,"")),I>0&&On(W)-D&&br(I>32?ip(W+";",s,r,D-1):ip(Ie(W," ","")+";",s,r,D-2),M);break;case 59:W+=";";default:if(br(re=op(W,u,r,g,_,h,z,Z,de=[],L=[],D),m),P===123)if(_===0)wr(W,u,re,re,de,m,D,z,L);else switch(B===99&&Ht(W,3)===110?100:B){case 100:case 108:case 109:case 115:wr(i,re,re,s&&br(op(i,re,re,0,0,h,z,Z,h,de=[],D),L),h,L,D,z,s?de:L);break;default:wr(W,re,re,re,[""],L,0,z,L)}}g=_=I=0,V=J=1,Z=W="",D=y;break;case 58:D=1+On(W),I=U;default:if(V<1){if(P==123)--V;else if(P==125&&V++==0&&wg()==125)continue}switch(W+=Er(P),P*V){case 38:J=_>0?1:(W+="\f",-1);break;case 44:z[g++]=(On(W)-1)*J,J=1;break;case 64:Un()===45&&(W+=Cr(un())),B=Un(),_=D=On(Z=W+=Ag(Sr())),P++;break;case 45:U===45&&On(W)==2&&(V=0)}}return m}function op(i,u,r,s,h,m,y,z,M,g,_){for(var D=h-1,B=h===0?m:[""],I=du(B),U=0,V=0,$=0;U<s;++U)for(var J=0,P=$o(i,D+1,D=vg(V=y[U])),Z=i;J<I;++J)(Z=Hp(V>0?B[J]+" "+P:Ie(P,/&\f/g,B[J])))&&(M[$++]=Z);return Rr(i,u,r,h===0?cu:z,M,g,_)}function Tg(i,u,r){return Rr(i,u,r,Up,Er(Cg()),$o(i,2,-2),0)}function ip(i,u,r,s){return Rr(i,u,r,uu,$o(i,0,s),$o(i,s+1,-1),s)}function Yl(i,u){for(var r="",s=du(i),h=0;h<s;h++)r+=u(i[h],h,i,u)||"";return r}function Dg(i,u,r,s){switch(i.type){case gg:if(i.children.length)break;case mg:case uu:return i.return=i.return||i.value;case Up:return"";case Np:return i.return=i.value+"{"+Yl(i.children,s)+"}";case cu:i.value=i.props.join(",")}return On(r=Yl(i.children,s))?i.return=i.value+"{"+r+"}":""}function _g(i){var u=du(i);return function(r,s,h,m){for(var y="",z=0;z<u;z++)y+=i[z](r,s,h,m)||"";return y}}function kg(i){return function(u){u.root||(u=u.return)&&i(u)}}function Og(i){var u=Object.create(null);return function(r){return u[r]===void 0&&(u[r]=i(r)),u[r]}}var Lg=function(u,r,s){for(var h=0,m=0;h=m,m=Un(),h===38&&m===12&&(r[s]=1),!Io(m);)un();return ei(u,en)},Ug=function(u,r){var s=-1,h=44;do switch(Io(h)){case 0:h===38&&Un()===12&&(r[s]=1),u[s]+=Lg(en-1,r,s);break;case 2:u[s]+=Cr(h);break;case 4:if(h===44){u[++s]=Un()===58?"&\f":"",r[s]=u[s].length;break}default:u[s]+=Er(h)}while(h=un());return u},Ng=function(u,r){return qp(Ug(jp(u),r))},rp=new WeakMap,Hg=function(u){if(!(u.type!=="rule"||!u.parent||u.length<1)){for(var r=u.value,s=u.parent,h=u.column===s.column&&u.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(u.props.length===1&&r.charCodeAt(0)!==58&&!rp.get(s))&&!h){rp.set(u,!0);for(var m=[],y=Ng(r,m),z=s.props,M=0,g=0;M<y.length;M++)for(var _=0;_<z.length;_++,g++)u.props[g]=m[M]?y[M].replace(/&\f/g,z[_]):z[_]+" "+y[M]}}},Bg=function(u){if(u.type==="decl"){var r=u.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(u.return="",u.value="")}};function Yp(i,u){switch(bg(i,u)){case 5103:return $e+"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 $e+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return $e+i+Mr+i+qt+i+i;case 6828:case 4268:return $e+i+qt+i+i;case 6165:return $e+i+qt+"flex-"+i+i;case 5187:return $e+i+Ie(i,/(\w+).+(:[^]+)/,$e+"box-$1$2"+qt+"flex-$1$2")+i;case 5443:return $e+i+qt+"flex-item-"+Ie(i,/flex-|-self/,"")+i;case 4675:return $e+i+qt+"flex-line-pack"+Ie(i,/align-content|flex-|-self/,"")+i;case 5548:return $e+i+qt+Ie(i,"shrink","negative")+i;case 5292:return $e+i+qt+Ie(i,"basis","preferred-size")+i;case 6060:return $e+"box-"+Ie(i,"-grow","")+$e+i+qt+Ie(i,"grow","positive")+i;case 4554:return $e+Ie(i,/([^-])(transform)/g,"$1"+$e+"$2")+i;case 6187:return Ie(Ie(Ie(i,/(zoom-|grab)/,$e+"$1"),/(image-set)/,$e+"$1"),i,"")+i;case 5495:case 3959:return Ie(i,/(image-set\([^]*)/,$e+"$1$`$1");case 4968:return Ie(Ie(i,/(.+:)(flex-)?(.*)/,$e+"box-pack:$3"+qt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$e+i+i;case 4095:case 3583:case 4068:case 2532:return Ie(i,/(.+)-inline(.+)/,$e+"$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(On(i)-1-u>6)switch(Ht(i,u+1)){case 109:if(Ht(i,u+4)!==45)break;case 102:return Ie(i,/(.+:)(.+)-([^]+)/,"$1"+$e+"$2-$3$1"+Mr+(Ht(i,u+3)==108?"$3":"$2-$3"))+i;case 115:return~lu(i,"stretch")?Yp(Ie(i,"stretch","fill-available"),u)+i:i}break;case 4949:if(Ht(i,u+1)!==115)break;case 6444:switch(Ht(i,On(i)-3-(~lu(i,"!important")&&10))){case 107:return Ie(i,":",":"+$e)+i;case 101:return Ie(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$e+(Ht(i,14)===45?"inline-":"")+"box$3$1"+$e+"$2$3$1"+qt+"$2box$3")+i}break;case 5936:switch(Ht(i,u+11)){case 114:return $e+i+qt+Ie(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return $e+i+qt+Ie(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return $e+i+qt+Ie(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return $e+i+qt+i+i}return i}var jg=function(u,r,s,h){if(u.length>-1&&!u.return)switch(u.type){case uu:u.return=Yp(u.value,u.length);break;case Np:return Yl([Zo(u,{value:Ie(u.value,"@","@"+$e)})],h);case cu:if(u.length)return Sg(u.props,function(m){switch(xg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Yl([Zo(u,{props:[Ie(m,/:(read-\w+)/,":"+Mr+"$1")]})],h);case"::placeholder":return Yl([Zo(u,{props:[Ie(m,/:(plac\w+)/,":"+$e+"input-$1")]}),Zo(u,{props:[Ie(m,/:(plac\w+)/,":"+Mr+"$1")]}),Zo(u,{props:[Ie(m,/:(plac\w+)/,qt+"input-$1")]})],h)}return""})}},qg=[jg],Yg=function(u){var r=u.key;if(r==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(V){var $=V.getAttribute("data-emotion");$.indexOf(" ")!==-1&&(document.head.appendChild(V),V.setAttribute("data-s",""))})}var h=u.stylisPlugins||qg,m={},y,z=[];y=u.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(V){for(var $=V.getAttribute("data-emotion").split(" "),J=1;J<$.length;J++)m[$[J]]=!0;z.push(V)});var M,g=[Hg,Bg];{var _,D=[Dg,kg(function(V){_.insert(V)})],B=_g(g.concat(h,D)),I=function($){return Yl(Rg($),B)};M=function($,J,P,Z){_=P,I($?$+"{"+J.styles+"}":J.styles),Z&&(U.inserted[J.name]=!0)}}var U={key:r,sheet:new pg({key:r,container:y,nonce:u.nonce,speedy:u.speedy,prepend:u.prepend,insertionPoint:u.insertionPoint}),nonce:u.nonce,inserted:m,registered:{},insert:M};return U.sheet.hydrate(z),U},Zc={exports:{}},Pe={};var sp;function Gg(){if(sp)return Pe;sp=1;var i=typeof Symbol=="function"&&Symbol.for,u=i?Symbol.for("react.element"):60103,r=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,m=i?Symbol.for("react.profiler"):60114,y=i?Symbol.for("react.provider"):60109,z=i?Symbol.for("react.context"):60110,M=i?Symbol.for("react.async_mode"):60111,g=i?Symbol.for("react.concurrent_mode"):60111,_=i?Symbol.for("react.forward_ref"):60112,D=i?Symbol.for("react.suspense"):60113,B=i?Symbol.for("react.suspense_list"):60120,I=i?Symbol.for("react.memo"):60115,U=i?Symbol.for("react.lazy"):60116,V=i?Symbol.for("react.block"):60121,$=i?Symbol.for("react.fundamental"):60117,J=i?Symbol.for("react.responder"):60118,P=i?Symbol.for("react.scope"):60119;function Z(L){if(typeof L=="object"&&L!==null){var re=L.$$typeof;switch(re){case u:switch(L=L.type,L){case M:case g:case s:case m:case h:case D:return L;default:switch(L=L&&L.$$typeof,L){case z:case _:case U:case I:case y:return L;default:return re}}case r:return re}}}function de(L){return Z(L)===g}return Pe.AsyncMode=M,Pe.ConcurrentMode=g,Pe.ContextConsumer=z,Pe.ContextProvider=y,Pe.Element=u,Pe.ForwardRef=_,Pe.Fragment=s,Pe.Lazy=U,Pe.Memo=I,Pe.Portal=r,Pe.Profiler=m,Pe.StrictMode=h,Pe.Suspense=D,Pe.isAsyncMode=function(L){return de(L)||Z(L)===M},Pe.isConcurrentMode=de,Pe.isContextConsumer=function(L){return Z(L)===z},Pe.isContextProvider=function(L){return Z(L)===y},Pe.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===u},Pe.isForwardRef=function(L){return Z(L)===_},Pe.isFragment=function(L){return Z(L)===s},Pe.isLazy=function(L){return Z(L)===U},Pe.isMemo=function(L){return Z(L)===I},Pe.isPortal=function(L){return Z(L)===r},Pe.isProfiler=function(L){return Z(L)===m},Pe.isStrictMode=function(L){return Z(L)===h},Pe.isSuspense=function(L){return Z(L)===D},Pe.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===s||L===g||L===m||L===h||L===D||L===B||typeof L=="object"&&L!==null&&(L.$$typeof===U||L.$$typeof===I||L.$$typeof===y||L.$$typeof===z||L.$$typeof===_||L.$$typeof===$||L.$$typeof===J||L.$$typeof===P||L.$$typeof===V)},Pe.typeOf=Z,Pe}var cp;function Vg(){return cp||(cp=1,Zc.exports=Gg()),Zc.exports}var Qc,up;function Xg(){if(up)return Qc;up=1;var i=Vg(),u={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$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]=s,m[i.Memo]=h;function y(U){return i.isMemo(U)?h:m[U.$$typeof]||u}var z=Object.defineProperty,M=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,_=Object.getOwnPropertyDescriptor,D=Object.getPrototypeOf,B=Object.prototype;function I(U,V,$){if(typeof V!="string"){if(B){var J=D(V);J&&J!==B&&I(U,J,$)}var P=M(V);g&&(P=P.concat(g(V)));for(var Z=y(U),de=y(V),L=0;L<P.length;++L){var re=P[L];if(!r[re]&&!($&&$[re])&&!(de&&de[re])&&!(Z&&Z[re])){var W=_(V,re);try{z(U,re,W)}catch{}}}}return U}return Qc=I,Qc}Xg();var Zg=!0;function Qg(i,u,r){var s="";return r.split(" ").forEach(function(h){i[h]!==void 0?u.push(i[h]+";"):h&&(s+=h+" ")}),s}var Gp=function(u,r,s){var h=u.key+"-"+r.name;(s===!1||Zg===!1)&&u.registered[h]===void 0&&(u.registered[h]=r.styles)},Kg=function(u,r,s){Gp(u,r,s);var h=u.key+"-"+r.name;if(u.inserted[r.name]===void 0){var m=r;do u.insert(r===m?"."+h:"",m,u.sheet,!0),m=m.next;while(m!==void 0)}};function Fg(i){for(var u=0,r,s=0,h=i.length;h>=4;++s,h-=4)r=i.charCodeAt(s)&255|(i.charCodeAt(++s)&255)<<8|(i.charCodeAt(++s)&255)<<16|(i.charCodeAt(++s)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,u=(r&65535)*1540483477+((r>>>16)*59797<<16)^(u&65535)*1540483477+((u>>>16)*59797<<16);switch(h){case 3:u^=(i.charCodeAt(s+2)&255)<<16;case 2:u^=(i.charCodeAt(s+1)&255)<<8;case 1:u^=i.charCodeAt(s)&255,u=(u&65535)*1540483477+((u>>>16)*59797<<16)}return u^=u>>>13,u=(u&65535)*1540483477+((u>>>16)*59797<<16),((u^u>>>15)>>>0).toString(36)}var Jg={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},Wg=/[A-Z]|^ms/g,$g=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vp=function(u){return u.charCodeAt(1)===45},dp=function(u){return u!=null&&typeof u!="boolean"},Kc=Og(function(i){return Vp(i)?i:i.replace(Wg,"-$&").toLowerCase()}),fp=function(u,r){switch(u){case"animation":case"animationName":if(typeof r=="string")return r.replace($g,function(s,h,m){return Ln={name:h,styles:m,next:Ln},h})}return Jg[u]!==1&&!Vp(u)&&typeof r=="number"&&r!==0?r+"px":r};function Po(i,u,r){if(r==null)return"";var s=r;if(s.__emotion_styles!==void 0)return s;switch(typeof r){case"boolean":return"";case"object":{var h=r;if(h.anim===1)return Ln={name:h.name,styles:h.styles,next:Ln},h.name;var m=r;if(m.styles!==void 0){var y=m.next;if(y!==void 0)for(;y!==void 0;)Ln={name:y.name,styles:y.styles,next:Ln},y=y.next;var z=m.styles+";";return z}return Ig(i,u,r)}case"function":{if(i!==void 0){var M=Ln,g=r(i);return Ln=M,Po(i,u,g)}break}}var _=r;return _}function Ig(i,u,r){var s="";if(Array.isArray(r))for(var h=0;h<r.length;h++)s+=Po(i,u,r[h])+";";else for(var m in r){var y=r[m];if(typeof y!="object"){var z=y;dp(z)&&(s+=Kc(m)+":"+fp(m,z)+";")}else if(Array.isArray(y)&&typeof y[0]=="string"&&u==null)for(var M=0;M<y.length;M++)dp(y[M])&&(s+=Kc(m)+":"+fp(m,y[M])+";");else{var g=Po(i,u,y);switch(m){case"animation":case"animationName":{s+=Kc(m)+":"+g+";";break}default:s+=m+"{"+g+"}"}}}return s}var hp=/label:\s*([^\s;{]+)\s*(;|$)/g,Ln;function Xp(i,u,r){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var s=!0,h="";Ln=void 0;var m=i[0];if(m==null||m.raw===void 0)s=!1,h+=Po(r,u,m);else{var y=m;h+=y[0]}for(var z=1;z<i.length;z++)if(h+=Po(r,u,i[z]),s){var M=m;h+=M[z]}hp.lastIndex=0;for(var g="",_;(_=hp.exec(h))!==null;)g+="-"+_[1];var D=Fg(h)+g;return{name:D,styles:h,next:Ln}}var Pg=function(u){return u()},e1=lp.useInsertionEffect?lp.useInsertionEffect:!1,t1=e1||Pg,Zp=C.createContext(typeof HTMLElement<"u"?Yg({key:"css"}):null);Zp.Provider;var n1=function(u){return C.forwardRef(function(r,s){var h=C.useContext(Zp);return u(r,h,s)})},a1=C.createContext({}),ti={}.hasOwnProperty,iu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fu=function(u,r){var s={};for(var h in r)ti.call(r,h)&&(s[h]=r[h]);return s[iu]=u,s},l1=function(u){var r=u.cache,s=u.serialized,h=u.isStringTag;return Gp(r,s,h),t1(function(){return Kg(r,s,h)}),null},o1=n1(function(i,u,r){var s=i.css;typeof s=="string"&&u.registered[s]!==void 0&&(s=u.registered[s]);var h=i[iu],m=[s],y="";typeof i.className=="string"?y=Qg(u.registered,m,i.className):i.className!=null&&(y=i.className+" ");var z=Xp(m,void 0,C.useContext(a1));y+=u.key+"-"+z.name;var M={};for(var g in i)ti.call(i,g)&&g!=="css"&&g!==iu&&(M[g]=i[g]);return M.className=y,r&&(M.ref=r),C.createElement(C.Fragment,null,C.createElement(l1,{cache:u,serialized:z,isStringTag:typeof h=="string"}),C.createElement(h,M))}),hu=o1,ct=Wo.Fragment,c=function(u,r,s){return ti.call(r,"css")?Wo.jsx(hu,fu(u,r),s):Wo.jsx(u,r,s)},b=function(u,r,s){return ti.call(r,"css")?Wo.jsxs(hu,fu(u,r),s):Wo.jsxs(u,r,s)},Fc={exports:{}},Qo={},Jc={exports:{}},Wc={};var pp;function i1(){return pp||(pp=1,(function(i){function u(k,q){var fe=k.length;k.push(q);e:for(;0<fe;){var Ne=fe-1>>>1,xe=k[Ne];if(0<h(xe,q))k[Ne]=q,k[fe]=xe,fe=Ne;else break e}}function r(k){return k.length===0?null:k[0]}function s(k){if(k.length===0)return null;var q=k[0],fe=k.pop();if(fe!==q){k[0]=fe;e:for(var Ne=0,xe=k.length,S=xe>>>1;Ne<S;){var N=2*(Ne+1)-1,ee=k[N],ce=N+1,Ce=k[ce];if(0>h(ee,fe))ce<xe&&0>h(Ce,ee)?(k[Ne]=Ce,k[ce]=fe,Ne=ce):(k[Ne]=ee,k[N]=fe,Ne=N);else if(ce<xe&&0>h(Ce,fe))k[Ne]=Ce,k[ce]=fe,Ne=ce;else break e}}return q}function h(k,q){var fe=k.sortIndex-q.sortIndex;return fe!==0?fe:k.id-q.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 y=Date,z=y.now();i.unstable_now=function(){return y.now()-z}}var M=[],g=[],_=1,D=null,B=3,I=!1,U=!1,V=!1,$=!1,J=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function de(k){for(var q=r(g);q!==null;){if(q.callback===null)s(g);else if(q.startTime<=k)s(g),q.sortIndex=q.expirationTime,u(M,q);else break;q=r(g)}}function L(k){if(V=!1,de(k),!U)if(r(M)!==null)U=!0,re||(re=!0,ae());else{var q=r(g);q!==null&&Le(L,q.startTime-k)}}var re=!1,W=-1,K=5,j=-1;function te(){return $?!0:!(i.unstable_now()-j<K)}function ve(){if($=!1,re){var k=i.unstable_now();j=k;var q=!0;try{e:{U=!1,V&&(V=!1,P(W),W=-1),I=!0;var fe=B;try{t:{for(de(k),D=r(M);D!==null&&!(D.expirationTime>k&&te());){var Ne=D.callback;if(typeof Ne=="function"){D.callback=null,B=D.priorityLevel;var xe=Ne(D.expirationTime<=k);if(k=i.unstable_now(),typeof xe=="function"){D.callback=xe,de(k),q=!0;break t}D===r(M)&&s(M),de(k)}else s(M);D=r(M)}if(D!==null)q=!0;else{var S=r(g);S!==null&&Le(L,S.startTime-k),q=!1}}break e}finally{D=null,B=fe,I=!1}q=void 0}}finally{q?ae():re=!1}}}var ae;if(typeof Z=="function")ae=function(){Z(ve)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ue=X.port2;X.port1.onmessage=ve,ae=function(){ue.postMessage(null)}}else ae=function(){J(ve,0)};function Le(k,q){W=J(function(){k(i.unstable_now())},q)}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(k){k.callback=null},i.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<k?Math.floor(1e3/k):5},i.unstable_getCurrentPriorityLevel=function(){return B},i.unstable_next=function(k){switch(B){case 1:case 2:case 3:var q=3;break;default:q=B}var fe=B;B=q;try{return k()}finally{B=fe}},i.unstable_requestPaint=function(){$=!0},i.unstable_runWithPriority=function(k,q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var fe=B;B=k;try{return q()}finally{B=fe}},i.unstable_scheduleCallback=function(k,q,fe){var Ne=i.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?Ne+fe:Ne):fe=Ne,k){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=fe+xe,k={id:_++,callback:q,priorityLevel:k,startTime:fe,expirationTime:xe,sortIndex:-1},fe>Ne?(k.sortIndex=fe,u(g,k),r(M)===null&&k===r(g)&&(V?(P(W),W=-1):V=!0,Le(L,fe-Ne))):(k.sortIndex=xe,u(M,k),U||I||(U=!0,re||(re=!0,ae()))),k},i.unstable_shouldYield=te,i.unstable_wrapCallback=function(k){var q=B;return function(){var fe=B;B=q;try{return k.apply(this,arguments)}finally{B=fe}}}})(Wc)),Wc}var mp;function r1(){return mp||(mp=1,Jc.exports=i1()),Jc.exports}var $c={exports:{}},jt={};var gp;function s1(){if(gp)return jt;gp=1;var i=su();function u(M){var g="https://react.dev/errors/"+M;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)g+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+M+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(u(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(M,g,_){var D=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:D==null?null:""+D,children:M,containerInfo:g,implementation:_}}var y=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function z(M,g){if(M==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,jt.createPortal=function(M,g){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(u(299));return m(M,g,null,_)},jt.flushSync=function(M){var g=y.T,_=s.p;try{if(y.T=null,s.p=2,M)return M()}finally{y.T=g,s.p=_,s.d.f()}},jt.preconnect=function(M,g){typeof M=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,s.d.C(M,g))},jt.prefetchDNS=function(M){typeof M=="string"&&s.d.D(M)},jt.preinit=function(M,g){if(typeof M=="string"&&g&&typeof g.as=="string"){var _=g.as,D=z(_,g.crossOrigin),B=typeof g.integrity=="string"?g.integrity:void 0,I=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;_==="style"?s.d.S(M,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:D,integrity:B,fetchPriority:I}):_==="script"&&s.d.X(M,{crossOrigin:D,integrity:B,fetchPriority:I,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},jt.preinitModule=function(M,g){if(typeof M=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var _=z(g.as,g.crossOrigin);s.d.M(M,{crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&s.d.M(M)},jt.preload=function(M,g){if(typeof M=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var _=g.as,D=z(_,g.crossOrigin);s.d.L(M,_,{crossOrigin:D,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})}},jt.preloadModule=function(M,g){if(typeof M=="string")if(g){var _=z(g.as,g.crossOrigin);s.d.m(M,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else s.d.m(M)},jt.requestFormReset=function(M){s.d.r(M)},jt.unstable_batchedUpdates=function(M,g){return M(g)},jt.useFormState=function(M,g,_){return y.H.useFormState(M,g,_)},jt.useFormStatus=function(){return y.H.useHostTransitionStatus()},jt.version="19.2.4",jt}var vp;function c1(){if(vp)return $c.exports;vp=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(u){console.error(u)}}return i(),$c.exports=s1(),$c.exports}var yp;function u1(){if(yp)return Qo;yp=1;var i=r1(),u=su(),r=c1();function s(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 y(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 z(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 M(e){if(m(e)!==e)throw Error(s(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(s(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 M(l),e;if(o===a)return M(l),t;o=o.sibling}throw Error(s(188))}if(n.return!==a.return)n=l,a=o;else{for(var d=!1,p=l.child;p;){if(p===n){d=!0,n=l,a=o;break}if(p===a){d=!0,a=l,n=o;break}p=p.sibling}if(!d){for(p=o.child;p;){if(p===n){d=!0,n=o,a=l;break}if(p===a){d=!0,a=o,n=l;break}p=p.sibling}if(!d)throw Error(s(189))}}if(n.alternate!==a)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var D=Object.assign,B=Symbol.for("react.element"),I=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),ve=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ve&&e[ve]||e["@@iterator"],typeof e=="function"?e:null)}var X=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===X?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case J:return"Profiler";case $:return"StrictMode";case L:return"Suspense";case re:return"SuspenseList";case j:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case Z:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case de: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:ue(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var Le=Array.isArray,k=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},Ne=[],xe=-1;function S(e){return{current:e}}function N(e){0>xe||(e.current=Ne[xe],Ne[xe]=null,xe--)}function ee(e,t){xe++,Ne[xe]=e.current,e.current=t}var ce=S(null),Ce=S(null),ke=S(null),Be=S(null);function Ye(e,t){switch(ee(ke,t),ee(Ce,e),ee(ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(ce),ee(ce,e)}function Me(){N(ce),N(Ce),N(ke)}function _t(e){e.memoizedState!==null&&ee(Be,e);var t=ce.current,n=zh(t,e.type);t!==n&&(ee(Ce,e),ee(ce,n))}function oe(e){Ce.current===e&&(N(ce),N(Ce)),Be.current===e&&(N(Be),qo._currentValue=fe)}var Yt,Gt;function we(e){if(Yt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yt=t&&t[1]||"",Gt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Yt+e+Gt}var et=!1;function Ze(e,t){if(!e||et)return"";et=!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 T=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){T=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){T=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&T&&typeof O.stack=="string")return[O.stack,T.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(),d=o[0],p=o[1];if(d&&p){var x=d.split(`
4
+ `),R=p.split(`
5
+ `);for(l=a=0;a<x.length&&!x[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===x.length||l===R.length)for(a=x.length-1,l=R.length-1;1<=a&&0<=l&&x[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(x[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||x[a]!==R[l]){var H=`
6
+ `+x[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=l);break}}}finally{et=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?we(n):""}function xt(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ze(e.type,!1);case 11:return Ze(e.type.render,!1);case 1:return Ze(e.type,!0);case 31:return we("Activity");default:return""}}function it(e){try{var t="",n=null;do t+=xt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Cn=Object.prototype.hasOwnProperty,ka=i.unstable_scheduleCallback,dn=i.unstable_cancelCallback,Kl=i.unstable_shouldYield,al=i.unstable_requestPaint,Bt=i.unstable_now,la=i.unstable_getCurrentPriorityLevel,Fl=i.unstable_ImmediatePriority,Oa=i.unstable_UserBlockingPriority,oa=i.unstable_NormalPriority,Jl=i.unstable_LowPriority,St=i.unstable_IdlePriority,La=i.log,Dr=i.unstable_setDisableYieldValue,Nn=null,Vt=null;function wn(e){if(typeof La=="function"&&Dr(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(Nn,e)}catch{}}var Xt=Math.clz32?Math.clz32:Or,_r=Math.log,kr=Math.LN2;function Or(e){return e>>>=0,e===0?32:31-(_r(e)/kr|0)|0}var ll=256,ol=262144,Ua=4194304;function Hn(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 il(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~o,a!==0?l=Hn(a):(d&=p,d!==0?l=Hn(d):n||(n=p&~e,n!==0&&(l=Hn(n))))):(p=a&~o,p!==0?l=Hn(p):d!==0?l=Hn(d):n||(n=a&~e,n!==0&&(l=Hn(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 Na(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lr(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 ai(){var e=Ua;return Ua<<=1,(Ua&62914560)===0&&(Ua=4194304),e}function Wl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ha(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ur(e,t,n,a,l,o){var d=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,x=e.expirationTimes,R=e.hiddenUpdates;for(n=d&~n;0<n;){var H=31-Xt(n),G=1<<H;p[H]=0,x[H]=-1;var T=R[H];if(T!==null)for(R[H]=null,H=0;H<T.length;H++){var O=T[H];O!==null&&(O.lane&=-536870913)}n&=~G}a!==0&&li(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(d&~t))}function li(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function oi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Xt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function $l(e,t){var n=t&-t;return n=(n&42)!==0?1:Bn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Bn(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 Il(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ii(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:Kh(e.type))}function zn(e,t){var n=q.p;try{return q.p=e,t()}finally{q.p=n}}var Rn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Rn,vt="__reactProps$"+Rn,tn="__reactContainer$"+Rn,rl="__reactEvents$"+Rn,ia="__reactListeners$"+Rn,ra="__reactHandles$"+Rn,Pl="__reactResources$"+Rn,Ba="__reactMarker$"+Rn;function eo(e){delete e[ft],delete e[vt],delete e[rl],delete e[ia],delete e[ra]}function jn(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tn]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_h(e);e!==null;){if(n=e[ft])return n;e=_h(e)}return t}e=n,n=e.parentNode}return null}function se(e){if(e=e[ft]||e[tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ne(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function pe(e){var t=e[Pl];return t||(t=e[Pl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function me(e){e[Ba]=!0}var Ee=new Set,Re={};function Qe(e,t){Ke(e,t),Ke(e+"Capture",t)}function Ke(e,t){for(Re[e]=t,e=0;e<t.length;e++)Ee.add(t[e])}var Te=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]*$"),Zt={},to={};function e0(e){return Cn.call(to,e)?!0:Cn.call(Zt,e)?!1:Te.test(e)?to[e]=!0:(Zt[e]=!0,!1)}function ri(e,t,n){if(e0(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 si(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 qn(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 fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function t0(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(d){n=""+d,o.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nr(e){if(!e._valueTracker){var t=pu(e)?"checked":"value";e._valueTracker=t0(e,t,""+e[t])}}function mu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=pu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ci(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 n0=/[\n"\\]/g;function hn(e){return e.replace(n0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hr(e,t,n,a,l,o,d,p){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Br(e,d,fn(t)):n!=null?Br(e,d,fn(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=""+fn(p):e.removeAttribute("name")}function gu(e,t,n,a,l,o,d,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)){Nr(e);return}n=n!=null?""+fn(n):"",t=t!=null?""+fn(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,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Nr(e)}function Br(e,t,n){t==="number"&&ci(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function sl(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=""+fn(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 vu(e,t,n){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+fn(n):""}function yu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(s(92));if(Le(a)){if(1<a.length)throw Error(s(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=fn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Nr(e)}function cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var a0=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 bu(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||a0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function xu(e,t,n){if(t!=null&&typeof t!="object")throw Error(s(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&&bu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&bu(e,o,t[o])}function jr(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 l0=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"]]),o0=/^[\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 ui(e){return o0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yn(){}var qr=null;function Yr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ul=null,dl=null;function Su(e){var t=se(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hr(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="'+hn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[vt]||null;if(!l)throw Error(s(90));Hr(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&&mu(a)}break e;case"textarea":vu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&sl(e,!!n.multiple,t,!1)}}}var Gr=!1;function Cu(e,t,n){if(Gr)return e(t,n);Gr=!0;try{var a=e(t);return a}finally{if(Gr=!1,(ul!==null||dl!==null)&&($i(),ul&&(t=ul,e=dl,dl=ul=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function no(e,t){var n=e.stateNode;if(n===null)return null;var a=n[vt]||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(s(231,t,typeof n));return n}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vr=!1;if(Gn)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){Vr=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{Vr=!1}var sa=null,Xr=null,di=null;function wu(){if(di)return di;var e,t=Xr,n=t.length,a,l="value"in sa?sa.value:sa.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var d=n-e;for(a=1;a<=d&&t[n-a]===l[o-a];a++);return di=l.slice(e,1<a?1-a:void 0)}function fi(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 hi(){return!0}function zu(){return!1}function Ft(e){function t(n,a,l,o,d){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=d,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)?hi:zu,this.isPropagationStopped=zu,this}return D(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=hi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hi)},persist:function(){},isPersistent:hi}),t}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pi=Ft(ja),lo=D({},ja,{view:0,detail:0}),i0=Ft(lo),Zr,Qr,oo,mi=D({},lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fr,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!==oo&&(oo&&e.type==="mousemove"?(Zr=e.screenX-oo.screenX,Qr=e.screenY-oo.screenY):Qr=Zr=0,oo=e),Zr)},movementY:function(e){return"movementY"in e?e.movementY:Qr}}),Mu=Ft(mi),r0=D({},mi,{dataTransfer:0}),s0=Ft(r0),c0=D({},lo,{relatedTarget:0}),Kr=Ft(c0),u0=D({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),d0=Ft(u0),f0=D({},ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h0=Ft(f0),p0=D({},ja,{data:0}),Eu=Ft(p0),m0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g0={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"},v0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function y0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=v0[e])?!!t[e]:!1}function Fr(){return y0}var b0=D({},lo,{key:function(e){if(e.key){var t=m0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fr,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),x0=Ft(b0),S0=D({},mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Au=Ft(S0),C0=D({},lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fr}),w0=Ft(C0),z0=D({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),M0=Ft(z0),E0=D({},mi,{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}),A0=Ft(E0),R0=D({},ja,{newState:0,oldState:0}),T0=Ft(R0),D0=[9,13,27,32],Jr=Gn&&"CompositionEvent"in window,io=null;Gn&&"documentMode"in document&&(io=document.documentMode);var _0=Gn&&"TextEvent"in window&&!io,Ru=Gn&&(!Jr||io&&8<io&&11>=io),Tu=" ",Du=!1;function _u(e,t){switch(e){case"keyup":return D0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ku(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fl=!1;function k0(e,t){switch(e){case"compositionend":return ku(t);case"keypress":return t.which!==32?null:(Du=!0,Tu);case"textInput":return e=t.data,e===Tu&&Du?null:e;default:return null}}function O0(e,t){if(fl)return e==="compositionend"||!Jr&&_u(e,t)?(e=wu(),di=Xr=sa=null,fl=!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 Ru&&t.locale!=="ko"?null:t.data;default:return null}}var L0={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"?!!L0[e.type]:t==="textarea"}function Lu(e,t,n,a){ul?dl?dl.push(a):dl=[a]:ul=a,t=lr(t,"onChange"),0<t.length&&(n=new pi("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var ro=null,so=null;function U0(e){vh(e,0)}function gi(e){var t=ne(e);if(mu(t))return e}function Uu(e,t){if(e==="change")return t}var Nu=!1;if(Gn){var Wr;if(Gn){var $r="oninput"in document;if(!$r){var Hu=document.createElement("div");Hu.setAttribute("oninput","return;"),$r=typeof Hu.oninput=="function"}Wr=$r}else Wr=!1;Nu=Wr&&(!document.documentMode||9<document.documentMode)}function Bu(){ro&&(ro.detachEvent("onpropertychange",ju),so=ro=null)}function ju(e){if(e.propertyName==="value"&&gi(so)){var t=[];Lu(t,so,e,Yr(e)),Cu(U0,t)}}function N0(e,t,n){e==="focusin"?(Bu(),ro=t,so=n,ro.attachEvent("onpropertychange",ju)):e==="focusout"&&Bu()}function H0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(so)}function B0(e,t){if(e==="click")return gi(t)}function j0(e,t){if(e==="input"||e==="change")return gi(t)}function q0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:q0;function co(e,t){if(nn(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(!Cn.call(t,l)||!nn(e[l],t[l]))return!1}return!0}function qu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yu(e,t){var n=qu(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=qu(n)}}function Gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gu(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=ci(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=ci(e.document)}return t}function Ir(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 Y0=Gn&&"documentMode"in document&&11>=document.documentMode,hl=null,Pr=null,uo=null,es=!1;function Xu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;es||hl==null||hl!==ci(a)||(a=hl,"selectionStart"in a&&Ir(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}),uo&&co(uo,a)||(uo=a,a=lr(Pr,"onSelect"),0<a.length&&(t=new pi("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=hl)))}function qa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pl={animationend:qa("Animation","AnimationEnd"),animationiteration:qa("Animation","AnimationIteration"),animationstart:qa("Animation","AnimationStart"),transitionrun:qa("Transition","TransitionRun"),transitionstart:qa("Transition","TransitionStart"),transitioncancel:qa("Transition","TransitionCancel"),transitionend:qa("Transition","TransitionEnd")},ts={},Zu={};Gn&&(Zu=document.createElement("div").style,"AnimationEvent"in window||(delete pl.animationend.animation,delete pl.animationiteration.animation,delete pl.animationstart.animation),"TransitionEvent"in window||delete pl.transitionend.transition);function Ya(e){if(ts[e])return ts[e];if(!pl[e])return e;var t=pl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zu)return ts[e]=t[n];return e}var Qu=Ya("animationend"),Ku=Ya("animationiteration"),Fu=Ya("animationstart"),G0=Ya("transitionrun"),V0=Ya("transitionstart"),X0=Ya("transitioncancel"),Ju=Ya("transitionend"),Wu=new Map,ns="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(" ");ns.push("scrollEnd");function Mn(e,t){Wu.set(e,t),Qe(t,[e])}var vi=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)},pn=[],ml=0,as=0;function yi(){for(var e=ml,t=as=ml=0;t<e;){var n=pn[t];pn[t++]=null;var a=pn[t];pn[t++]=null;var l=pn[t];pn[t++]=null;var o=pn[t];if(pn[t++]=null,a!==null&&l!==null){var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}o!==0&&$u(n,l,o)}}function bi(e,t,n,a){pn[ml++]=e,pn[ml++]=t,pn[ml++]=n,pn[ml++]=a,as|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ls(e,t,n,a){return bi(e,t,n,a),xi(e)}function Ga(e,t){return bi(e,null,null,t),xi(e)}function $u(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-Xt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function xi(e){if(50<Oo)throw Oo=0,hc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gl={};function Z0(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 an(e,t,n,a){return new Z0(e,t,n,a)}function os(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vn(e,t){var n=e.alternate;return n===null?(n=an(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 Iu(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 Si(e,t,n,a,l,o){var d=0;if(a=e,typeof e=="function")os(e)&&(d=1);else if(typeof e=="string")d=Wm(e,n,ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case j:return e=an(31,n,t,l),e.elementType=j,e.lanes=o,e;case V:return Va(n.children,l,o,t);case $:d=8,l|=24;break;case J:return e=an(12,n,t,l|2),e.elementType=J,e.lanes=o,e;case L:return e=an(13,n,t,l),e.elementType=L,e.lanes=o,e;case re:return e=an(19,n,t,l),e.elementType=re,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:d=10;break e;case P:d=9;break e;case de:d=11;break e;case W:d=14;break e;case K:d=16,a=null;break e}d=29,n=Error(s(130,e===null?"null":typeof e,"")),a=null}return t=an(d,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function Va(e,t,n,a){return e=an(7,e,a,t),e.lanes=n,e}function is(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function Pu(e){var t=an(18,null,null,0);return t.stateNode=e,t}function rs(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ed=new WeakMap;function mn(e,t){if(typeof e=="object"&&e!==null){var n=ed.get(e);return n!==void 0?n:(t={value:e,source:t,stack:it(t)},ed.set(e,t),t)}return{value:e,source:t,stack:it(t)}}var vl=[],yl=0,Ci=null,fo=0,gn=[],vn=0,ca=null,Tn=1,Dn="";function Xn(e,t){vl[yl++]=fo,vl[yl++]=Ci,Ci=e,fo=t}function td(e,t,n){gn[vn++]=Tn,gn[vn++]=Dn,gn[vn++]=ca,ca=e;var a=Tn;e=Dn;var l=32-Xt(a)-1;a&=~(1<<l),n+=1;var o=32-Xt(t)+l;if(30<o){var d=l-l%5;o=(a&(1<<d)-1).toString(32),a>>=d,l-=d,Tn=1<<32-Xt(t)+l|n<<l|a,Dn=o+e}else Tn=1<<o|n<<l|a,Dn=e}function ss(e){e.return!==null&&(Xn(e,1),td(e,1,0))}function cs(e){for(;e===Ci;)Ci=vl[--yl],vl[yl]=null,fo=vl[--yl],vl[yl]=null;for(;e===ca;)ca=gn[--vn],gn[vn]=null,Dn=gn[--vn],gn[vn]=null,Tn=gn[--vn],gn[vn]=null}function nd(e,t){gn[vn++]=Tn,gn[vn++]=Dn,gn[vn++]=ca,Tn=t.id,Dn=t.overflow,ca=e}var kt=null,ut=null,Xe=!1,ua=null,yn=!1,us=Error(s(519));function da(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ho(mn(t,e)),us}function ad(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[ft]=e,t[vt]=a,n){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(n=0;n<Uo.length;n++)qe(Uo[n],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),gu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),yu(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||Sh(t.textContent,n)?(a.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),a.onScroll!=null&&qe("scroll",t),a.onScrollEnd!=null&&qe("scrollend",t),a.onClick!=null&&(t.onclick=Yn),t=!0):t=!1,t||da(e,!0)}function ld(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:kt=kt.return}}function bl(e){if(e!==kt)return!1;if(!Xe)return ld(e),Xe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Rc(e.type,e.memoizedProps)),n=!n),n&&ut&&da(e),ld(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ut=Dh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ut=Dh(e)}else t===27?(t=ut,Ma(e.type)?(e=Oc,Oc=null,ut=e):ut=t):ut=kt?xn(e.stateNode.nextSibling):null;return!0}function Xa(){ut=kt=null,Xe=!1}function ds(){var e=ua;return e!==null&&(It===null?It=e:It.push.apply(It,e),ua=null),e}function ho(e){ua===null?ua=[e]:ua.push(e)}var fs=S(null),Za=null,Zn=null;function fa(e,t,n){ee(fs,t._currentValue),t._currentValue=n}function Qn(e){e._currentValue=fs.current,N(fs)}function hs(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 ps(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var d=l.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=l;for(var x=0;x<t.length;x++)if(p.context===t[x]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),hs(o.return,n,e),a||(d=null);break e}o=p.next}}else if(l.tag===18){if(d=l.return,d===null)throw Error(s(341));d.lanes|=n,o=d.alternate,o!==null&&(o.lanes|=n),hs(d,n,e),d=null}else d=l.child;if(d!==null)d.return=l;else for(d=l;d!==null;){if(d===e){d=null;break}if(l=d.sibling,l!==null){l.return=d.return,d=l;break}d=d.return}l=d}}function xl(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 d=l.alternate;if(d===null)throw Error(s(387));if(d=d.memoizedProps,d!==null){var p=l.type;nn(l.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(l===Be.current){if(d=l.alternate,d===null)throw Error(s(387));d.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(qo):e=[qo])}l=l.return}e!==null&&ps(t,e,n,a),t.flags|=262144}function wi(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qa(e){Za=e,Zn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return od(Za,e)}function zi(e,t){return Za===null&&Qa(e),od(e,t)}function od(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zn===null){if(e===null)throw Error(s(308));Zn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zn=Zn.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()})}},K0=i.unstable_scheduleCallback,F0=i.unstable_NormalPriority,Ct={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ms(){return{controller:new Q0,data:new Map,refCount:0}}function po(e){e.refCount--,e.refCount===0&&K0(F0,function(){e.controller.abort()})}var mo=null,gs=0,Sl=0,Cl=null;function J0(e,t){if(mo===null){var n=mo=[];gs=0,Sl=bc(),Cl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return gs++,t.then(id,id),t}function id(){if(--gs===0&&mo!==null){Cl!==null&&(Cl.status="fulfilled");var e=mo;mo=null,Sl=0,Cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function W0(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 rd=k.S;k.S=function(e,t){Zf=Bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&J0(e,t),rd!==null&&rd(e,t)};var Ka=S(null);function vs(){var e=Ka.current;return e!==null?e:rt.pooledCache}function Mi(e,t){t===null?ee(Ka,Ka.current):ee(Ka,t.pool)}function sd(){var e=vs();return e===null?null:{parent:Ct._currentValue,pool:e}}var wl=Error(s(460)),ys=Error(s(474)),Ei=Error(s(542)),Ai={then:function(){}};function cd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ud(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yn,Yn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fd(e),e;default:if(typeof t.status=="string")t.then(Yn,Yn);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(s(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,fd(e),e}throw Ja=t,wl}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ja=n,wl):n}}var Ja=null;function dd(){if(Ja===null)throw Error(s(459));var e=Ja;return Ja=null,e}function fd(e){if(e===wl||e===Ei)throw Error(s(483))}var zl=null,go=0;function Ri(e){var t=go;return go+=1,zl===null&&(zl=[]),ud(zl,e,t)}function vo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ti(e,t){throw t.$$typeof===B?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hd(e){function t(E,w){if(e){var A=E.deletions;A===null?(E.deletions=[w],E.flags|=16):A.push(w)}}function n(E,w){if(!e)return null;for(;w!==null;)t(E,w),w=w.sibling;return null}function a(E){for(var w=new Map;E!==null;)E.key!==null?w.set(E.key,E):w.set(E.index,E),E=E.sibling;return w}function l(E,w){return E=Vn(E,w),E.index=0,E.sibling=null,E}function o(E,w,A){return E.index=A,e?(A=E.alternate,A!==null?(A=A.index,A<w?(E.flags|=67108866,w):A):(E.flags|=67108866,w)):(E.flags|=1048576,w)}function d(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function p(E,w,A,Y){return w===null||w.tag!==6?(w=is(A,E.mode,Y),w.return=E,w):(w=l(w,A),w.return=E,w)}function x(E,w,A,Y){var Se=A.type;return Se===V?H(E,w,A.props.children,Y,A.key):w!==null&&(w.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===K&&Fa(Se)===w.type)?(w=l(w,A.props),vo(w,A),w.return=E,w):(w=Si(A.type,A.key,A.props,null,E.mode,Y),vo(w,A),w.return=E,w)}function R(E,w,A,Y){return w===null||w.tag!==4||w.stateNode.containerInfo!==A.containerInfo||w.stateNode.implementation!==A.implementation?(w=rs(A,E.mode,Y),w.return=E,w):(w=l(w,A.children||[]),w.return=E,w)}function H(E,w,A,Y,Se){return w===null||w.tag!==7?(w=Va(A,E.mode,Y,Se),w.return=E,w):(w=l(w,A),w.return=E,w)}function G(E,w,A){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=is(""+w,E.mode,A),w.return=E,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case I:return A=Si(w.type,w.key,w.props,null,E.mode,A),vo(A,w),A.return=E,A;case U:return w=rs(w,E.mode,A),w.return=E,w;case K:return w=Fa(w),G(E,w,A)}if(Le(w)||ae(w))return w=Va(w,E.mode,A,null),w.return=E,w;if(typeof w.then=="function")return G(E,Ri(w),A);if(w.$$typeof===Z)return G(E,zi(E,w),A);Ti(E,w)}return null}function T(E,w,A,Y){var Se=w!==null?w.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return Se!==null?null:p(E,w,""+A,Y);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case I:return A.key===Se?x(E,w,A,Y):null;case U:return A.key===Se?R(E,w,A,Y):null;case K:return A=Fa(A),T(E,w,A,Y)}if(Le(A)||ae(A))return Se!==null?null:H(E,w,A,Y,null);if(typeof A.then=="function")return T(E,w,Ri(A),Y);if(A.$$typeof===Z)return T(E,w,zi(E,A),Y);Ti(E,A)}return null}function O(E,w,A,Y,Se){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return E=E.get(A)||null,p(w,E,""+Y,Se);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case I:return E=E.get(Y.key===null?A:Y.key)||null,x(w,E,Y,Se);case U:return E=E.get(Y.key===null?A:Y.key)||null,R(w,E,Y,Se);case K:return Y=Fa(Y),O(E,w,A,Y,Se)}if(Le(Y)||ae(Y))return E=E.get(A)||null,H(w,E,Y,Se,null);if(typeof Y.then=="function")return O(E,w,A,Ri(Y),Se);if(Y.$$typeof===Z)return O(E,w,A,zi(w,Y),Se);Ti(w,Y)}return null}function he(E,w,A,Y){for(var Se=null,Fe=null,ye=w,Ue=w=0,Ve=null;ye!==null&&Ue<A.length;Ue++){ye.index>Ue?(Ve=ye,ye=null):Ve=ye.sibling;var Je=T(E,ye,A[Ue],Y);if(Je===null){ye===null&&(ye=Ve);break}e&&ye&&Je.alternate===null&&t(E,ye),w=o(Je,w,Ue),Fe===null?Se=Je:Fe.sibling=Je,Fe=Je,ye=Ve}if(Ue===A.length)return n(E,ye),Xe&&Xn(E,Ue),Se;if(ye===null){for(;Ue<A.length;Ue++)ye=G(E,A[Ue],Y),ye!==null&&(w=o(ye,w,Ue),Fe===null?Se=ye:Fe.sibling=ye,Fe=ye);return Xe&&Xn(E,Ue),Se}for(ye=a(ye);Ue<A.length;Ue++)Ve=O(ye,E,Ue,A[Ue],Y),Ve!==null&&(e&&Ve.alternate!==null&&ye.delete(Ve.key===null?Ue:Ve.key),w=o(Ve,w,Ue),Fe===null?Se=Ve:Fe.sibling=Ve,Fe=Ve);return e&&ye.forEach(function(Da){return t(E,Da)}),Xe&&Xn(E,Ue),Se}function ze(E,w,A,Y){if(A==null)throw Error(s(151));for(var Se=null,Fe=null,ye=w,Ue=w=0,Ve=null,Je=A.next();ye!==null&&!Je.done;Ue++,Je=A.next()){ye.index>Ue?(Ve=ye,ye=null):Ve=ye.sibling;var Da=T(E,ye,Je.value,Y);if(Da===null){ye===null&&(ye=Ve);break}e&&ye&&Da.alternate===null&&t(E,ye),w=o(Da,w,Ue),Fe===null?Se=Da:Fe.sibling=Da,Fe=Da,ye=Ve}if(Je.done)return n(E,ye),Xe&&Xn(E,Ue),Se;if(ye===null){for(;!Je.done;Ue++,Je=A.next())Je=G(E,Je.value,Y),Je!==null&&(w=o(Je,w,Ue),Fe===null?Se=Je:Fe.sibling=Je,Fe=Je);return Xe&&Xn(E,Ue),Se}for(ye=a(ye);!Je.done;Ue++,Je=A.next())Je=O(ye,E,Ue,Je.value,Y),Je!==null&&(e&&Je.alternate!==null&&ye.delete(Je.key===null?Ue:Je.key),w=o(Je,w,Ue),Fe===null?Se=Je:Fe.sibling=Je,Fe=Je);return e&&ye.forEach(function(rg){return t(E,rg)}),Xe&&Xn(E,Ue),Se}function ot(E,w,A,Y){if(typeof A=="object"&&A!==null&&A.type===V&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case I:e:{for(var Se=A.key;w!==null;){if(w.key===Se){if(Se=A.type,Se===V){if(w.tag===7){n(E,w.sibling),Y=l(w,A.props.children),Y.return=E,E=Y;break e}}else if(w.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===K&&Fa(Se)===w.type){n(E,w.sibling),Y=l(w,A.props),vo(Y,A),Y.return=E,E=Y;break e}n(E,w);break}else t(E,w);w=w.sibling}A.type===V?(Y=Va(A.props.children,E.mode,Y,A.key),Y.return=E,E=Y):(Y=Si(A.type,A.key,A.props,null,E.mode,Y),vo(Y,A),Y.return=E,E=Y)}return d(E);case U:e:{for(Se=A.key;w!==null;){if(w.key===Se)if(w.tag===4&&w.stateNode.containerInfo===A.containerInfo&&w.stateNode.implementation===A.implementation){n(E,w.sibling),Y=l(w,A.children||[]),Y.return=E,E=Y;break e}else{n(E,w);break}else t(E,w);w=w.sibling}Y=rs(A,E.mode,Y),Y.return=E,E=Y}return d(E);case K:return A=Fa(A),ot(E,w,A,Y)}if(Le(A))return he(E,w,A,Y);if(ae(A)){if(Se=ae(A),typeof Se!="function")throw Error(s(150));return A=Se.call(A),ze(E,w,A,Y)}if(typeof A.then=="function")return ot(E,w,Ri(A),Y);if(A.$$typeof===Z)return ot(E,w,zi(E,A),Y);Ti(E,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,w!==null&&w.tag===6?(n(E,w.sibling),Y=l(w,A),Y.return=E,E=Y):(n(E,w),Y=is(A,E.mode,Y),Y.return=E,E=Y),d(E)):n(E,w)}return function(E,w,A,Y){try{go=0;var Se=ot(E,w,A,Y);return zl=null,Se}catch(ye){if(ye===wl||ye===Ei)throw ye;var Fe=an(29,ye,null,E.mode);return Fe.lanes=Y,Fe.return=E,Fe}}}var Wa=hd(!0),pd=hd(!1),ha=!1;function bs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xs(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 pa(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,(We&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=xi(e),$u(e,null,n),t}return bi(e,a,t,n),xi(e)}function yo(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,oi(e,n)}}function Ss(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 d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=d:o=o.next=d,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 Cs=!1;function bo(){if(Cs){var e=Cl;if(e!==null)throw e}}function xo(e,t,n,a){Cs=!1;var l=e.updateQueue;ha=!1;var o=l.firstBaseUpdate,d=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var x=p,R=x.next;x.next=null,d===null?o=R:d.next=R,d=x;var H=e.alternate;H!==null&&(H=H.updateQueue,p=H.lastBaseUpdate,p!==d&&(p===null?H.firstBaseUpdate=R:p.next=R,H.lastBaseUpdate=x))}if(o!==null){var G=l.baseState;d=0,H=R=x=null,p=o;do{var T=p.lane&-536870913,O=T!==p.lane;if(O?(Ge&T)===T:(a&T)===T){T!==0&&T===Sl&&(Cs=!0),H!==null&&(H=H.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var he=e,ze=p;T=t;var ot=n;switch(ze.tag){case 1:if(he=ze.payload,typeof he=="function"){G=he.call(ot,G,T);break e}G=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ze.payload,T=typeof he=="function"?he.call(ot,G,T):he,T==null)break e;G=D({},G,T);break e;case 2:ha=!0}}T=p.callback,T!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[T]:O.push(T))}else O={lane:T,tag:p.tag,payload:p.payload,callback:p.callback,next:null},H===null?(R=H=O,x=G):H=H.next=O,d|=T;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);H===null&&(x=G),l.baseState=x,l.firstBaseUpdate=R,l.lastBaseUpdate=H,o===null&&(l.shared.lanes=0),xa|=d,e.lanes=d,e.memoizedState=G}}function md(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function gd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)md(n[e],t)}var Ml=S(null),Di=S(0);function vd(e,t){e=ta,ee(Di,e),ee(Ml,t),ta=e|t.baseLanes}function ws(){ee(Di,ta),ee(Ml,Ml.current)}function zs(){ta=Di.current,N(Ml),N(Di)}var ln=S(null),bn=null;function ga(e){var t=e.alternate;ee(yt,yt.current&1),ee(ln,e),bn===null&&(t===null||Ml.current!==null||t.memoizedState!==null)&&(bn=e)}function Ms(e){ee(yt,yt.current),ee(ln,e),bn===null&&(bn=e)}function yd(e){e.tag===22?(ee(yt,yt.current),ee(ln,e),bn===null&&(bn=e)):va()}function va(){ee(yt,yt.current),ee(ln,ln.current)}function on(e){N(ln),bn===e&&(bn=null),N(yt)}var yt=S(0);function _i(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_c(n)||kc(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 Kn=0,Oe=null,at=null,wt=null,ki=!1,El=!1,$a=!1,Oi=0,So=0,Al=null,$0=0;function pt(){throw Error(s(321))}function Es(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nn(e[n],t[n]))return!1;return!0}function As(e,t,n,a,l,o){return Kn=o,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?tf:Gs,$a=!1,o=n(a,l),$a=!1,El&&(o=xd(t,n,a,l)),bd(e),o}function bd(e){k.H=zo;var t=at!==null&&at.next!==null;if(Kn=0,wt=at=Oe=null,ki=!1,So=0,Al=null,t)throw Error(s(300));e===null||zt||(e=e.dependencies,e!==null&&wi(e)&&(zt=!0))}function xd(e,t,n,a){Oe=e;var l=0;do{if(El&&(Al=null),So=0,El=!1,25<=l)throw Error(s(301));if(l+=1,wt=at=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=nf,o=t(n,a)}while(El);return o}function I0(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Co(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Oe.flags|=1024),t}function Rs(){var e=Oi!==0;return Oi=0,e}function Ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ds(e){if(ki){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ki=!1}Kn=0,wt=at=Oe=null,El=!1,So=Oi=0,Al=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Oe.memoizedState=wt=e:wt=wt.next=e,wt}function bt(){if(at===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=wt===null?Oe.memoizedState:wt.next;if(t!==null)wt=t,at=e;else{if(e===null)throw Oe.alternate===null?Error(s(467)):Error(s(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},wt===null?Oe.memoizedState=wt=e:wt=wt.next=e}return wt}function Li(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Co(e){var t=So;return So+=1,Al===null&&(Al=[]),e=ud(Al,e,t),t=Oe,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?tf:Gs),e}function Ui(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Co(e);if(e.$$typeof===Z)return Ot(e)}throw Error(s(438,String(e)))}function _s(e){var t=null,n=Oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Oe.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=Li(),Oe.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]=te;return t.index++,n}function Fn(e,t){return typeof t=="function"?t(e):t}function Ni(e){var t=bt();return ks(t,at,e)}function ks(e,t,n){var a=e.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var l=e.baseQueue,o=a.pending;if(o!==null){if(l!==null){var d=l.next;l.next=o.next,o.next=d}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var p=d=null,x=null,R=t,H=!1;do{var G=R.lane&-536870913;if(G!==R.lane?(Ge&G)===G:(Kn&G)===G){var T=R.revertLane;if(T===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),G===Sl&&(H=!0);else if((Kn&T)===T){R=R.next,T===Sl&&(H=!0);continue}else G={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(p=x=G,d=o):x=x.next=G,Oe.lanes|=T,xa|=T;G=R.action,$a&&n(o,G),o=R.hasEagerState?R.eagerState:n(o,G)}else T={lane:G,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(p=x=T,d=o):x=x.next=T,Oe.lanes|=G,xa|=G;R=R.next}while(R!==null&&R!==t);if(x===null?d=o:x.next=p,!nn(o,e.memoizedState)&&(zt=!0,H&&(n=Cl,n!==null)))throw n;e.memoizedState=o,e.baseState=d,e.baseQueue=x,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Os(e){var t=bt(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var d=l=l.next;do o=e(o,d.action),d=d.next;while(d!==l);nn(o,t.memoizedState)||(zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function Sd(e,t,n){var a=Oe,l=bt(),o=Xe;if(o){if(n===void 0)throw Error(s(407));n=n()}else n=t();var d=!nn((at||l).memoizedState,n);if(d&&(l.memoizedState=n,zt=!0),l=l.queue,Ns(zd.bind(null,a,l,e),[e]),l.getSnapshot!==t||d||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,Rl(9,{destroy:void 0},wd.bind(null,a,l,n,t),null),rt===null)throw Error(s(349));o||(Kn&127)!==0||Cd(a,t,n)}return n}function Cd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t=Li(),Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&Ed(e)}function zd(e,t,n){return n(function(){Md(t)&&Ed(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nn(e,n)}catch{return!0}}function Ed(e){var t=Ga(e,2);t!==null&&Pt(t,e,2)}function Ls(e){var t=Qt();if(typeof e=="function"){var n=e;if(e=n(),$a){wn(!0);try{n()}finally{wn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:e},t}function Ad(e,t,n,a){return e.baseState=n,ks(e,at,typeof a=="function"?a:Fn)}function P0(e,t,n,a,l){if(ji(e))throw Error(s(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(d){o.listeners.push(d)}};k.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Rd(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Rd(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=k.T,d={};k.T=d;try{var p=n(l,a),x=k.S;x!==null&&x(d,p),Td(e,t,p)}catch(R){Us(e,t,R)}finally{o!==null&&d.types!==null&&(o.types=d.types),k.T=o}}else try{o=n(l,a),Td(e,t,o)}catch(R){Us(e,t,R)}}function Td(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Dd(e,t,a)},function(a){return Us(e,t,a)}):Dd(e,t,n)}function Dd(e,t,n){t.status="fulfilled",t.value=n,_d(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Rd(e,n)))}function Us(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,_d(t),t=t.next;while(t!==a)}e.action=null}function _d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kd(e,t){return t}function Od(e,t){if(Xe){var n=rt.formState;if(n!==null){e:{var a=Oe;if(Xe){if(ut){t:{for(var l=ut,o=yn;l.nodeType!==8;){if(!o){l=null;break t}if(l=xn(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){ut=xn(l.nextSibling),a=l.data==="F!";break e}}da(a)}a=!1}a&&(t=n[0])}}return n=Qt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kd,lastRenderedState:t},n.queue=a,n=Id.bind(null,Oe,a),a.dispatch=n,a=Ls(!1),o=Ys.bind(null,Oe,!1,a.queue),a=Qt(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=P0.bind(null,Oe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ld(e){var t=bt();return Ud(t,at,e)}function Ud(e,t,n){if(t=ks(e,t,kd)[0],e=Ni(Fn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Co(t)}catch(d){throw d===wl?Ei:d}else a=t;t=bt();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Oe.flags|=2048,Rl(9,{destroy:void 0},em.bind(null,l,n),null)),[a,o,e]}function em(e,t){e.action=t}function Nd(e){var t=bt(),n=at;if(n!==null)return Ud(t,n,e);bt(),t=t.memoizedState,n=bt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Rl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=Li(),Oe.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 Hd(){return bt().memoizedState}function Hi(e,t,n,a){var l=Qt();Oe.flags|=e,l.memoizedState=Rl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Bi(e,t,n,a){var l=bt();a=a===void 0?null:a;var o=l.memoizedState.inst;at!==null&&a!==null&&Es(a,at.memoizedState.deps)?l.memoizedState=Rl(t,o,n,a):(Oe.flags|=e,l.memoizedState=Rl(1|t,o,n,a))}function Bd(e,t){Hi(8390656,8,e,t)}function Ns(e,t){Bi(2048,8,e,t)}function tm(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=Li(),Oe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function jd(e){var t=bt().memoizedState;return tm({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function qd(e,t){return Bi(4,2,e,t)}function Yd(e,t){return Bi(4,4,e,t)}function Gd(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,Bi(4,4,Gd.bind(null,t,e),n)}function Hs(){}function Xd(e,t){var n=bt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Es(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Zd(e,t){var n=bt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Es(t,a[1]))return a[0];if(a=e(),$a){wn(!0);try{e()}finally{wn(!1)}}return n.memoizedState=[a,t],a}function Bs(e,t,n){return n===void 0||(Kn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Kf(),Oe.lanes|=e,xa|=e,n)}function Qd(e,t,n,a){return nn(n,t)?n:Ml.current!==null?(e=Bs(e,n,a),nn(e,t)||(zt=!0),e):(Kn&42)===0||(Kn&1073741824)!==0&&(Ge&261930)===0?(zt=!0,e.memoizedState=n):(e=Kf(),Oe.lanes|=e,xa|=e,t)}function Kd(e,t,n,a,l){var o=q.p;q.p=o!==0&&8>o?o:8;var d=k.T,p={};k.T=p,Ys(e,!1,t,n);try{var x=l(),R=k.S;if(R!==null&&R(p,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var H=W0(x,a);wo(e,t,H,cn(e))}else wo(e,t,a,cn(e))}catch(G){wo(e,t,{then:function(){},status:"rejected",reason:G},cn())}finally{q.p=o,d!==null&&p.types!==null&&(d.types=p.types),k.T=d}}function nm(){}function js(e,t,n,a){if(e.tag!==5)throw Error(s(476));var l=Fd(e).queue;Kd(e,l,t,fe,n===null?nm:function(){return Jd(e),n(a)})}function Fd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jd(e){var t=Fd(e);t.next===null&&(t=e.alternate.memoizedState),wo(e,t.next.queue,{},cn())}function qs(){return Ot(qo)}function Wd(){return bt().memoizedState}function $d(){return bt().memoizedState}function am(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=cn();e=pa(n);var a=ma(t,e,n);a!==null&&(Pt(a,t,n),yo(a,t,n)),t={cache:ms()},e.payload=t;return}t=t.return}}function lm(e,t,n){var a=cn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ji(e)?Pd(t,n):(n=ls(e,t,n,a),n!==null&&(Pt(n,e,a),ef(n,t,a)))}function Id(e,t,n){var a=cn();wo(e,t,n,a)}function wo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ji(e))Pd(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var d=t.lastRenderedState,p=o(d,n);if(l.hasEagerState=!0,l.eagerState=p,nn(p,d))return bi(e,t,l,0),rt===null&&yi(),!1}catch{}if(n=ls(e,t,l,a),n!==null)return Pt(n,e,a),ef(n,t,a),!0}return!1}function Ys(e,t,n,a){if(a={lane:2,revertLane:bc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ji(e)){if(t)throw Error(s(479))}else t=ls(e,n,a,2),t!==null&&Pt(t,e,2)}function ji(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Pd(e,t){El=ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ef(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,oi(e,n)}}var zo={readContext:Ot,use:Ui,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};zo.useEffectEvent=pt;var tf={readContext:Ot,use:Ui,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Bd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hi(4194308,4,Gd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){Hi(4,2,e,t)},useMemo:function(e,t){var n=Qt();t=t===void 0?null:t;var a=e();if($a){wn(!0);try{e()}finally{wn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Qt();if(n!==void 0){var l=n(t);if($a){wn(!0);try{n(t)}finally{wn(!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=lm.bind(null,Oe,e),[a.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ls(e);var t=e.queue,n=Id.bind(null,Oe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Hs,useDeferredValue:function(e,t){var n=Qt();return Bs(n,e,t)},useTransition:function(){var e=Ls(!1);return e=Kd.bind(null,Oe,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Oe,l=Qt();if(Xe){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),rt===null)throw Error(s(349));(Ge&127)!==0||Cd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Bd(zd.bind(null,a,o,e),[e]),a.flags|=2048,Rl(9,{destroy:void 0},wd.bind(null,a,o,n,t),null),n},useId:function(){var e=Qt(),t=rt.identifierPrefix;if(Xe){var n=Dn,a=Tn;n=(a&~(1<<32-Xt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Oi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=$0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qs,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ys.bind(null,Oe,!0,n),n.dispatch=t,[e,t]},useMemoCache:_s,useCacheRefresh:function(){return Qt().memoizedState=am.bind(null,Oe)},useEffectEvent:function(e){var t=Qt(),n={impl:e};return t.memoizedState=n,function(){if((We&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:Ot,use:Ui,useCallback:Xd,useContext:Ot,useEffect:Ns,useImperativeHandle:Vd,useInsertionEffect:qd,useLayoutEffect:Yd,useMemo:Zd,useReducer:Ni,useRef:Hd,useState:function(){return Ni(Fn)},useDebugValue:Hs,useDeferredValue:function(e,t){var n=bt();return Qd(n,at.memoizedState,e,t)},useTransition:function(){var e=Ni(Fn)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Co(e),t]},useSyncExternalStore:Sd,useId:Wd,useHostTransitionStatus:qs,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,t){var n=bt();return Ad(n,at,e,t)},useMemoCache:_s,useCacheRefresh:$d};Gs.useEffectEvent=jd;var nf={readContext:Ot,use:Ui,useCallback:Xd,useContext:Ot,useEffect:Ns,useImperativeHandle:Vd,useInsertionEffect:qd,useLayoutEffect:Yd,useMemo:Zd,useReducer:Os,useRef:Hd,useState:function(){return Os(Fn)},useDebugValue:Hs,useDeferredValue:function(e,t){var n=bt();return at===null?Bs(n,e,t):Qd(n,at.memoizedState,e,t)},useTransition:function(){var e=Os(Fn)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Co(e),t]},useSyncExternalStore:Sd,useId:Wd,useHostTransitionStatus:qs,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var n=bt();return at!==null?Ad(n,at,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:_s,useCacheRefresh:$d};nf.useEffectEvent=jd;function Vs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=cn(),l=pa(a);l.payload=t,n!=null&&(l.callback=n),t=ma(e,l,a),t!==null&&(Pt(t,e,a),yo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=cn(),l=pa(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=ma(e,l,a),t!==null&&(Pt(t,e,a),yo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=cn(),a=pa(n);a.tag=2,t!=null&&(a.callback=t),t=ma(e,a,n),t!==null&&(Pt(t,e,n),yo(t,e,n))}};function af(e,t,n,a,l,o,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,d):t.prototype&&t.prototype.isPureReactComponent?!co(n,a)||!co(l,o):!0}function lf(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&&Xs.enqueueReplaceState(t,t.state,null)}function Ia(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=D({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function of(e){vi(e)}function rf(e){console.error(e)}function sf(e){vi(e)}function qi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function cf(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 Zs(e,t,n){return n=pa(n),n.tag=3,n.payload={element:null},n.callback=function(){qi(e,t)},n}function uf(e){return e=pa(e),e.tag=3,e}function df(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(){cf(t,n,a)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){cf(t,n,a),typeof l!="function"&&(Sa===null?Sa=new Set([this]):Sa.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function om(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&xl(t,n,l,!0),n=ln.current,n!==null){switch(n.tag){case 31:case 13:return bn===null?Ii():n.alternate===null&&mt===0&&(mt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Ai?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),gc(e,a,l)),!1;case 22:return n.flags|=65536,a===Ai?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)),gc(e,a,l)),!1}throw Error(s(435,n.tag))}return gc(e,a,l),Ii(),!1}if(Xe)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==us&&(e=Error(s(422),{cause:a}),ho(mn(e,n)))):(a!==us&&(t=Error(s(423),{cause:a}),ho(mn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=mn(a,n),l=Zs(e.stateNode,a,l),Ss(e,l),mt!==4&&(mt=2)),!1;var o=Error(s(520),{cause:a});if(o=mn(o,n),ko===null?ko=[o]:ko.push(o),mt!==4&&(mt=2),t===null)return!0;a=mn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Zs(n.stateNode,a,e),Ss(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"&&(Sa===null||!Sa.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=uf(l),df(l,e,n,a),Ss(n,l),!1}n=n.return}while(n!==null);return!1}var Qs=Error(s(461)),zt=!1;function Lt(e,t,n,a){t.child=e===null?pd(t,null,n,a):Wa(t,e.child,n,a)}function ff(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var d={};for(var p in a)p!=="ref"&&(d[p]=a[p])}else d=a;return Qa(t),a=As(e,t,n,d,o,l),p=Rs(),e!==null&&!zt?(Ts(e,t,l),Jn(e,t,l)):(Xe&&p&&ss(t),t.flags|=1,Lt(e,t,a,l),t.child)}function hf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!os(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,pf(e,t,o,a,l)):(e=Si(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!ec(e,l)){var d=o.memoizedProps;if(n=n.compare,n=n!==null?n:co,n(d,a)&&e.ref===t.ref)return Jn(e,t,l)}return t.flags|=1,e=Vn(o,a),e.ref=t.ref,e.return=t,t.child=e}function pf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(co(o,a)&&e.ref===t.ref)if(zt=!1,t.pendingProps=a=o,ec(e,l))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,Jn(e,t,l)}return Ks(e,t,n,a,l)}function mf(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 gf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Mi(t,o!==null?o.cachePool:null),o!==null?vd(t,o):ws(),yd(t);else return a=t.lanes=536870912,gf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Mi(t,o.cachePool),vd(t,o),va(),t.memoizedState=null):(e!==null&&Mi(t,null),ws(),va());return Lt(e,t,l,n),t.child}function Mo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gf(e,t,n,a,l){var o=vs();return o=o===null?null:{parent:Ct._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Mi(t,null),ws(),yd(t),e!==null&&xl(e,t,a,!0),t.childLanes=l,null}function Yi(e,t){return t=Vi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vf(e,t,n){return Wa(t,e.child,null,n),e=Yi(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function im(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(a.mode==="hidden")return e=Yi(t,a),t.lanes=536870912,Mo(null,e);if(Ms(t),(e=ut)?(e=Th(e,yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ca!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},n=Pu(e),n.return=t,t.child=n,kt=t,ut=null)):e=null,e===null)throw da(t);return t.lanes=536870912,null}return Yi(t,a)}var o=e.memoizedState;if(o!==null){var d=o.dehydrated;if(Ms(t),l)if(t.flags&256)t.flags&=-257,t=vf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(zt||xl(e,t,n,!1),l=(n&e.childLanes)!==0,zt||l){if(a=rt,a!==null&&(d=$l(a,n),d!==0&&d!==o.retryLane))throw o.retryLane=d,Ga(e,d),Pt(a,e,d),Qs;Ii(),t=vf(e,t,n)}else e=o.treeContext,ut=xn(d.nextSibling),kt=t,Xe=!0,ua=null,yn=!1,e!==null&&nd(t,e),t=Yi(t,a),t.flags|=4096;return t}return e=Vn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gi(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(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ks(e,t,n,a,l){return Qa(t),n=As(e,t,n,a,void 0,l),a=Rs(),e!==null&&!zt?(Ts(e,t,l),Jn(e,t,l)):(Xe&&a&&ss(t),t.flags|=1,Lt(e,t,n,l),t.child)}function yf(e,t,n,a,l,o){return Qa(t),t.updateQueue=null,n=xd(t,a,n,l),bd(e),a=Rs(),e!==null&&!zt?(Ts(e,t,o),Jn(e,t,o)):(Xe&&a&&ss(t),t.flags|=1,Lt(e,t,n,o),t.child)}function bf(e,t,n,a,l){if(Qa(t),t.stateNode===null){var o=gl,d=n.contextType;typeof d=="object"&&d!==null&&(o=Ot(d)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Xs,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},bs(t),d=n.contextType,o.context=typeof d=="object"&&d!==null?Ot(d):gl,o.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Vs(t,n,d,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(d=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),d!==o.state&&Xs.enqueueReplaceState(o,o.state,null),xo(t,a,o,l),bo(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,x=Ia(n,p);o.props=x;var R=o.context,H=n.contextType;d=gl,typeof H=="object"&&H!==null&&(d=Ot(H));var G=n.getDerivedStateFromProps;H=typeof G=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,H||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||R!==d)&&lf(t,o,a,d),ha=!1;var T=t.memoizedState;o.state=T,xo(t,a,o,l),bo(),R=t.memoizedState,p||T!==R||ha?(typeof G=="function"&&(Vs(t,n,G,a),R=t.memoizedState),(x=ha||af(t,n,x,a,T,R,d))?(H||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=d,a=x):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,xs(e,t),d=t.memoizedProps,H=Ia(n,d),o.props=H,G=t.pendingProps,T=o.context,R=n.contextType,x=gl,typeof R=="object"&&R!==null&&(x=Ot(R)),p=n.getDerivedStateFromProps,(R=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(d!==G||T!==x)&&lf(t,o,a,x),ha=!1,T=t.memoizedState,o.state=T,xo(t,a,o,l),bo();var O=t.memoizedState;d!==G||T!==O||ha||e!==null&&e.dependencies!==null&&wi(e.dependencies)?(typeof p=="function"&&(Vs(t,n,p,a),O=t.memoizedState),(H=ha||af(t,n,H,a,T,O,x)||e!==null&&e.dependencies!==null&&wi(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,O,x),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,O,x)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),o.props=a,o.state=O,o.context=x,a=H):(typeof o.componentDidUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,Gi(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=Wa(t,e.child,null,l),t.child=Wa(t,null,n,l)):Lt(e,t,n,l),t.memoizedState=o.state,e=t.child):e=Jn(e,t,l),e}function xf(e,t,n,a){return Xa(),t.flags|=256,Lt(e,t,n,a),t.child}var Fs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Js(e){return{baseLanes:e,cachePool:sd()}}function Ws(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=sn),e}function Sf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,d;if((d=o)||(d=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),d&&(l=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(l?ga(t):va(),(e=ut)?(e=Th(e,yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ca!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},n=Pu(e),n.return=t,t.child=n,kt=t,ut=null)):e=null,e===null)throw da(t);return kc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(va(),l=t.mode,p=Vi({mode:"hidden",children:p},l),a=Va(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=Js(n),a.childLanes=Ws(e,d,n),t.memoizedState=Fs,Mo(null,a)):(ga(t),$s(t,p))}var x=e.memoizedState;if(x!==null&&(p=x.dehydrated,p!==null)){if(o)t.flags&256?(ga(t),t.flags&=-257,t=Is(e,t,n)):t.memoizedState!==null?(va(),t.child=e.child,t.flags|=128,t=null):(va(),p=a.fallback,l=t.mode,a=Vi({mode:"visible",children:a.children},l),p=Va(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,Wa(t,e.child,null,n),a=t.child,a.memoizedState=Js(n),a.childLanes=Ws(e,d,n),t.memoizedState=Fs,t=Mo(null,a));else if(ga(t),kc(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var R=d.dgst;d=R,a=Error(s(419)),a.stack="",a.digest=d,ho({value:a,source:null,stack:null}),t=Is(e,t,n)}else if(zt||xl(e,t,n,!1),d=(n&e.childLanes)!==0,zt||d){if(d=rt,d!==null&&(a=$l(d,n),a!==0&&a!==x.retryLane))throw x.retryLane=a,Ga(e,a),Pt(d,e,a),Qs;_c(p)||Ii(),t=Is(e,t,n)}else _c(p)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,ut=xn(p.nextSibling),kt=t,Xe=!0,ua=null,yn=!1,e!==null&&nd(t,e),t=$s(t,a.children),t.flags|=4096);return t}return l?(va(),p=a.fallback,l=t.mode,x=e.child,R=x.sibling,a=Vn(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&65011712,R!==null?p=Vn(R,p):(p=Va(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Mo(null,a),a=t.child,p=e.child.memoizedState,p===null?p=Js(n):(l=p.cachePool,l!==null?(x=Ct._currentValue,l=l.parent!==x?{parent:x,pool:x}:l):l=sd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=Ws(e,d,n),t.memoizedState=Fs,Mo(e.child,a)):(ga(t),n=e.child,e=n.sibling,n=Vn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function $s(e,t){return t=Vi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vi(e,t){return e=an(22,e,null,t),e.lanes=0,e}function Is(e,t,n){return Wa(t,e.child,null,n),e=$s(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),hs(e.return,t,n)}function Ps(e,t,n,a,l,o){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=n,d.tailMode=l,d.treeForkCount=o)}function wf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var d=yt.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,ee(yt,d),Lt(e,t,a,n),a=Xe?fo: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&&_i(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Ps(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&&_i(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Ps(t,!0,n,null,o,a);break;case"together":Ps(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(xl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=Vn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ec(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&wi(e)))}function rm(e,t,n){switch(t.tag){case 3:Ye(t,t.stateNode.containerInfo),fa(t,Ct,e.memoizedState.cache),Xa();break;case 27:case 5:_t(t);break;case 4:Ye(t,t.stateNode.containerInfo);break;case 10:fa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ms(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ga(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Sf(e,t,n):(ga(t),e=Jn(e,t,n),e!==null?e.sibling:null);ga(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(xl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return wf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ee(yt,yt.current),a)break;return null;case 22:return t.lanes=0,mf(e,t,n,t.pendingProps);case 24:fa(t,Ct,e.memoizedState.cache)}return Jn(e,t,n)}function zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!ec(e,n)&&(t.flags&128)===0)return zt=!1,rm(e,t,n);zt=(e.flags&131072)!==0}else zt=!1,Xe&&(t.flags&1048576)!==0&&td(t,fo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e=="function")os(e)?(a=Ia(e,a),t.tag=1,t=bf(null,t,e,a,n)):(t.tag=0,t=Ks(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===de){t.tag=11,t=ff(null,t,e,a,n);break e}else if(l===W){t.tag=14,t=hf(null,t,e,a,n);break e}}throw t=ue(e)||e,Error(s(306,t,""))}}return t;case 0:return Ks(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Ia(a,t.pendingProps),bf(e,t,a,l,n);case 3:e:{if(Ye(t,t.stateNode.containerInfo),e===null)throw Error(s(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,xs(e,t),xo(t,a,null,n);var d=t.memoizedState;if(a=d.cache,fa(t,Ct,a),a!==o.cache&&ps(t,[Ct],n,!0),bo(),a=d.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=xf(e,t,a,n);break e}else if(a!==l){l=mn(Error(s(424)),t),ho(l),t=xf(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,ut=xn(e.firstChild),kt=t,Xe=!0,ua=null,yn=!0,n=pd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xa(),a===l){t=Jn(e,t,n);break e}Lt(e,t,a,n)}t=t.child}return t;case 26:return Gi(e,t),e===null?(n=Uh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Xe||(n=t.type,e=t.pendingProps,a=or(ke.current).createElement(n),a[ft]=t,a[vt]=e,Ut(a,n,e),me(a),t.stateNode=a):t.memoizedState=Uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _t(t),e===null&&Xe&&(a=t.stateNode=kh(t.type,t.pendingProps,ke.current),kt=t,yn=!0,l=ut,Ma(t.type)?(Oc=l,ut=xn(a.firstChild)):ut=l),Lt(e,t,t.pendingProps.children,n),Gi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((l=a=ut)&&(a=Hm(a,t.type,t.pendingProps,yn),a!==null?(t.stateNode=a,kt=t,ut=xn(a.firstChild),yn=!1,l=!0):l=!1),l||da(t)),_t(t),l=t.type,o=t.pendingProps,d=e!==null?e.memoizedProps:null,a=o.children,Rc(l,o)?a=null:d!==null&&Rc(l,d)&&(t.flags|=32),t.memoizedState!==null&&(l=As(e,t,I0,null,null,n),qo._currentValue=l),Gi(e,t),Lt(e,t,a,n),t.child;case 6:return e===null&&Xe&&((e=n=ut)&&(n=Bm(n,t.pendingProps,yn),n!==null?(t.stateNode=n,kt=t,ut=null,e=!0):e=!1),e||da(t)),null;case 13:return Sf(e,t,n);case 4:return Ye(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Wa(t,null,a,n):Lt(e,t,a,n),t.child;case 11:return ff(e,t,t.type,t.pendingProps,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,fa(t,t.type,a.value),Lt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,Qa(t),l=Ot(l),a=a(l),t.flags|=1,Lt(e,t,a,n),t.child;case 14:return hf(e,t,t.type,t.pendingProps,n);case 15:return pf(e,t,t.type,t.pendingProps,n);case 19:return wf(e,t,n);case 31:return im(e,t,n);case 22:return mf(e,t,n,t.pendingProps);case 24:return Qa(t),a=Ot(Ct),e===null?(l=vs(),l===null&&(l=rt,o=ms(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},bs(t),fa(t,Ct,l)):((e.lanes&n)!==0&&(xs(e,t),xo(t,null,null,n),bo()),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),fa(t,Ct,a)):(a=o.cache,fa(t,Ct,a),a!==l.cache&&ps(t,[Ct],n,!0))),Lt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Wn(e){e.flags|=4}function tc(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($f())e.flags|=8192;else throw Ja=Ai,ys}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,!qh(t))if($f())e.flags|=8192;else throw Ja=Ai,ys}function Xi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ai():536870912,e.lanes|=t,kl|=t)}function Eo(e,t){if(!Xe)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 dt(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 sm(e,t,n){var a=t.pendingProps;switch(cs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qn(Ct),Me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(bl(t)?Wn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ds())),dt(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(Wn(t),o!==null?(dt(t),Mf(t,o)):(dt(t),tc(t,l,null,a,n))):o?o!==e.memoizedState?(Wn(t),dt(t),Mf(t,o)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Wn(t),dt(t),tc(t,l,e,a,n)),null;case 27:if(oe(t),n=ke.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Wn(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return dt(t),null}e=ce.current,bl(t)?ad(t):(e=kh(l,a,n),t.stateNode=e,Wn(t))}return dt(t),null;case 5:if(oe(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Wn(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return dt(t),null}if(o=ce.current,bl(t))ad(t);else{var d=or(ke.current);switch(o){case 1:o=d.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=d.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=d.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?d.createElement(l,{is:a.is}):d.createElement(l)}}o[ft]=t,o[vt]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=o;e:switch(Ut(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&&Wn(t)}}return dt(t),tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Wn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(s(166));if(e=ke.current,bl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=kt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Sh(e.nodeValue,n)),e||da(t,!0)}else e=or(e).createTextNode(a),e[ft]=t,t.stateNode=e}return dt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=bl(t),n!==null){if(e===null){if(!a)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[ft]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else n=ds(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(s(558))}return dt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=bl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(s(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));l[ft]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),l=!1}else l=ds(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(on(t),t):(on(t),null)}return on(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),Xi(t,t.updateQueue),dt(t),null);case 4:return Me(),e===null&&wc(t.stateNode.containerInfo),dt(t),null;case 10:return Qn(t.type),dt(t),null;case 19:if(N(yt),a=t.memoizedState,a===null)return dt(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)Eo(a,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=_i(e),o!==null){for(t.flags|=128,Eo(a,!1),e=o.updateQueue,t.updateQueue=e,Xi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Iu(n,e),n=n.sibling;return ee(yt,yt.current&1|2),Xe&&Xn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Bt()>Ji&&(t.flags|=128,l=!0,Eo(a,!1),t.lanes=4194304)}else{if(!l)if(e=_i(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Xi(t,e),Eo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Xe)return dt(t),null}else 2*Bt()-a.renderingStartTime>Ji&&n!==536870912&&(t.flags|=128,l=!0,Eo(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=Bt(),e.sibling=null,n=yt.current,ee(yt,l?n&1|2:n&1),Xe&&Xn(t,a.treeForkCount),e):(dt(t),null);case 22:case 23:return on(t),zs(),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&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),n=t.updateQueue,n!==null&&Xi(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&&N(Ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qn(Ct),dt(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function cm(e,t){switch(cs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(Ct),Me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oe(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(s(340));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(yt),null;case 4:return Me(),null;case 10:return Qn(t.type),null;case 22:case 23:return on(t),zs(),e!==null&&N(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qn(Ct),null;case 25:return null;default:return null}}function Ef(e,t){switch(cs(t),t.tag){case 3:Qn(Ct),Me();break;case 26:case 27:case 5:oe(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:N(yt);break;case 10:Qn(t.type);break;case 22:case 23:on(t),zs(),e!==null&&N(Ka);break;case 24:Qn(Ct)}}function Ao(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,d=n.inst;a=o(),d.destroy=a}n=n.next}while(n!==l)}}catch(p){nt(t,t.return,p)}}function ya(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 d=a.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,l=t;var x=n,R=p;try{R()}catch(H){nt(l,x,H)}}}a=a.next}while(a!==o)}}catch(H){nt(t,t.return,H)}}function Af(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{gd(t,n)}catch(a){nt(e,e.return,a)}}}function Rf(e,t,n){n.props=Ia(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){nt(e,t,a)}}function Ro(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){nt(e,t,l)}}function _n(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){nt(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){nt(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){nt(e,e.return,l)}}function nc(e,t,n){try{var a=e.stateNode;_m(a,e.type,n,t),a[vt]=t}catch(l){nt(e,e.return,l)}}function Df(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ma(e.type)||e.tag===4}function ac(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Df(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&&Ma(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 lc(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=Yn));else if(a!==4&&(a===27&&Ma(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(lc(e,t,n),e=e.sibling;e!==null;)lc(e,t,n),e=e.sibling}function Zi(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&&Ma(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zi(e,t,n),e=e.sibling;e!==null;)Zi(e,t,n),e=e.sibling}function _f(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Ut(t,a,n),t[ft]=e,t[vt]=n}catch(o){nt(e,e.return,o)}}var $n=!1,Mt=!1,oc=!1,kf=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function um(e,t){if(e=e.containerInfo,Ec=fr,e=Vu(e),Ir(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 d=0,p=-1,x=-1,R=0,H=0,G=e,T=null;t:for(;;){for(var O;G!==n||l!==0&&G.nodeType!==3||(p=d+l),G!==o||a!==0&&G.nodeType!==3||(x=d+a),G.nodeType===3&&(d+=G.nodeValue.length),(O=G.firstChild)!==null;)T=G,G=O;for(;;){if(G===e)break t;if(T===n&&++R===l&&(p=d),T===o&&++H===a&&(x=d),(O=G.nextSibling)!==null)break;G=T,T=G.parentNode}G=O}n=p===-1||x===-1?null:{start:p,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ac={focusedElem:e,selectionRange:n},fr=!1,Rt=t;Rt!==null;)if(t=Rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Rt=e;else for(;Rt!==null;){switch(t=Rt,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 he=Ia(n.type,l);e=a.getSnapshotBeforeUpdate(he,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(ze){nt(n,n.return,ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Dc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dc(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Rt=e;break}Rt=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Pn(e,n),a&4&&Ao(5,n);break;case 1:if(Pn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){nt(n,n.return,d)}else{var l=Ia(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){nt(n,n.return,d)}}a&64&&Af(n),a&512&&Ro(n,n.return);break;case 3:if(Pn(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{gd(e,t)}catch(d){nt(n,n.return,d)}}break;case 27:t===null&&a&4&&_f(n);case 26:case 5:Pn(e,n),t===null&&a&4&&Tf(n),a&512&&Ro(n,n.return);break;case 12:Pn(e,n);break;case 31:Pn(e,n),a&4&&Nf(e,n);break;case 13:Pn(e,n),a&4&&Hf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bm.bind(null,n),jm(e,n))));break;case 22:if(a=n.memoizedState!==null||$n,!a){t=t!==null&&t.memoizedState!==null||Mt,l=$n;var o=Mt;$n=a,(Mt=t)&&!o?ea(e,n,(n.subtreeFlags&8772)!==0):Pn(e,n),$n=l,Mt=o}break;case 30:break;default:Pn(e,n)}}function Lf(e){var t=e.alternate;t!==null&&(e.alternate=null,Lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&eo(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 ht=null,Jt=!1;function In(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Nn,n)}catch{}switch(n.tag){case 26:Mt||_n(n,t),In(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Mt||_n(n,t);var a=ht,l=Jt;Ma(n.type)&&(ht=n.stateNode,Jt=!1),In(e,t,n),Ho(n.stateNode),ht=a,Jt=l;break;case 5:Mt||_n(n,t);case 6:if(a=ht,l=Jt,ht=null,In(e,t,n),ht=a,Jt=l,ht!==null)if(Jt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(n.stateNode)}catch(o){nt(n,t,o)}else try{ht.removeChild(n.stateNode)}catch(o){nt(n,t,o)}break;case 18:ht!==null&&(Jt?(e=ht,Ah(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ql(e)):Ah(ht,n.stateNode));break;case 4:a=ht,l=Jt,ht=n.stateNode.containerInfo,Jt=!0,In(e,t,n),ht=a,Jt=l;break;case 0:case 11:case 14:case 15:ya(2,n,t),Mt||ya(4,n,t),In(e,t,n);break;case 1:Mt||(_n(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Rf(n,t,a)),In(e,t,n);break;case 21:In(e,t,n);break;case 22:Mt=(a=Mt)||n.memoizedState!==null,In(e,t,n),Mt=a;break;default:In(e,t,n)}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ql(e)}catch(n){nt(t,t.return,n)}}}function Hf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ql(e)}catch(n){nt(t,t.return,n)}}function dm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new kf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new kf),t;default:throw Error(s(435,e.tag))}}function Qi(e,t){var n=dm(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=xm.bind(null,e,a);a.then(l,l)}})}function Wt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(Ma(p.type)){ht=p.stateNode,Jt=!1;break e}break;case 5:ht=p.stateNode,Jt=!1;break e;case 3:case 4:ht=p.stateNode.containerInfo,Jt=!0;break e}p=p.return}if(ht===null)throw Error(s(160));Uf(o,d,l),ht=null,Jt=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bf(t,e),t=t.sibling}var En=null;function Bf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wt(t,e),$t(e),a&4&&(ya(3,e,e.return),Ao(3,e),ya(5,e,e.return));break;case 1:Wt(t,e),$t(e),a&512&&(Mt||n===null||_n(n,n.return)),a&64&&$n&&(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=En;if(Wt(t,e),$t(e),a&512&&(Mt||n===null||_n(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[Ba]||o[ft]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),Ut(o,a,n),o[ft]=e,me(o),a=o;break e;case"link":var d=Bh("link","href",l).get(a+(n.href||""));if(d){for(var p=0;p<d.length;p++)if(o=d[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)){d.splice(p,1);break t}}o=l.createElement(a),Ut(o,a,n),l.head.appendChild(o);break;case"meta":if(d=Bh("meta","content",l).get(a+(n.content||""))){for(p=0;p<d.length;p++)if(o=d[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)){d.splice(p,1);break t}}o=l.createElement(a),Ut(o,a,n),l.head.appendChild(o);break;default:throw Error(s(468,a))}o[ft]=e,me(o),a=o}e.stateNode=a}else jh(l,e.type,e.stateNode);else e.stateNode=Hh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?jh(l,e.type,e.stateNode):Hh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&nc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Wt(t,e),$t(e),a&512&&(Mt||n===null||_n(n,n.return)),n!==null&&a&4&&nc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Wt(t,e),$t(e),a&512&&(Mt||n===null||_n(n,n.return)),e.flags&32){l=e.stateNode;try{cl(l,"")}catch(he){nt(e,e.return,he)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,nc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(oc=!0);break;case 6:if(Wt(t,e),$t(e),a&4){if(e.stateNode===null)throw Error(s(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(he){nt(e,e.return,he)}}break;case 3:if(sr=null,l=En,En=ir(t.containerInfo),Wt(t,e),En=l,$t(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ql(t.containerInfo)}catch(he){nt(e,e.return,he)}oc&&(oc=!1,jf(e));break;case 4:a=En,En=ir(e.stateNode.containerInfo),Wt(t,e),$t(e),En=a;break;case 12:Wt(t,e),$t(e);break;case 31:Wt(t,e),$t(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qi(e,a)));break;case 13:Wt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Fi=Bt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qi(e,a)));break;case 22:l=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,R=$n,H=Mt;if($n=R||l,Mt=H||x,Wt(t,e),Mt=H,$n=R,$t(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||x||$n||Mt||Pa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(o=x.stateNode,l)d=o.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=x.stateNode;var G=x.memoizedProps.style,T=G!=null&&G.hasOwnProperty("display")?G.display:null;p.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(he){nt(x,x.return,he)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch(he){nt(x,x.return,he)}}}else if(t.tag===18){if(n===null){x=t;try{var O=x.stateNode;l?Rh(O,!0):Rh(x.stateNode,!1)}catch(he){nt(x,x.return,he)}}}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,Qi(e,n))));break;case 19:Wt(t,e),$t(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qi(e,a)));break;case 30:break;case 21:break;default:Wt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Df(a)){n=a;break}a=a.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var l=n.stateNode,o=ac(e);Zi(e,o,l);break;case 5:var d=n.stateNode;n.flags&32&&(cl(d,""),n.flags&=-33);var p=ac(e);Zi(e,p,d);break;case 3:case 4:var x=n.stateNode.containerInfo,R=ac(e);lc(e,R,x);break;default:throw Error(s(161))}}catch(H){nt(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function Pa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ya(4,t,t.return),Pa(t);break;case 1:_n(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Rf(t,t.return,n),Pa(t);break;case 27:Ho(t.stateNode);case 26:case 5:_n(t,t.return),Pa(t);break;case 22:t.memoizedState===null&&Pa(t);break;case 30:Pa(t);break;default:Pa(t)}e=e.sibling}}function ea(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,d=o.flags;switch(o.tag){case 0:case 11:case 15:ea(l,o,n),Ao(4,o);break;case 1:if(ea(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){nt(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var p=a.stateNode;try{var x=l.shared.hiddenCallbacks;if(x!==null)for(l.shared.hiddenCallbacks=null,l=0;l<x.length;l++)md(x[l],p)}catch(R){nt(a,a.return,R)}}n&&d&64&&Af(o),Ro(o,o.return);break;case 27:_f(o);case 26:case 5:ea(l,o,n),n&&a===null&&d&4&&Tf(o),Ro(o,o.return);break;case 12:ea(l,o,n);break;case 31:ea(l,o,n),n&&d&4&&Nf(l,o);break;case 13:ea(l,o,n),n&&d&4&&Hf(l,o);break;case 22:o.memoizedState===null&&ea(l,o,n),Ro(o,o.return);break;case 30:break;default:ea(l,o,n)}t=t.sibling}}function ic(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&&po(n))}function rc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&po(e))}function An(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qf(e,t,n,a),t=t.sibling}function qf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,n,a),l&2048&&Ao(9,t);break;case 1:An(e,t,n,a);break;case 3:An(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&&po(e)));break;case 12:if(l&2048){An(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,d=o.id,p=o.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){nt(t,t.return,x)}}else An(e,t,n,a);break;case 31:An(e,t,n,a);break;case 13:An(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,d=t.alternate,t.memoizedState!==null?o._visibility&2?An(e,t,n,a):To(e,t):o._visibility&2?An(e,t,n,a):(o._visibility|=2,Tl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&ic(d,t);break;case 24:An(e,t,n,a),l&2048&&rc(t.alternate,t);break;default:An(e,t,n,a)}}function Tl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,d=t,p=n,x=a,R=d.flags;switch(d.tag){case 0:case 11:case 15:Tl(o,d,p,x,l),Ao(8,d);break;case 23:break;case 22:var H=d.stateNode;d.memoizedState!==null?H._visibility&2?Tl(o,d,p,x,l):To(o,d):(H._visibility|=2,Tl(o,d,p,x,l)),l&&R&2048&&ic(d.alternate,d);break;case 24:Tl(o,d,p,x,l),l&&R&2048&&rc(d.alternate,d);break;default:Tl(o,d,p,x,l)}t=t.sibling}}function To(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:To(n,a),l&2048&&ic(a.alternate,a);break;case 24:To(n,a),l&2048&&rc(a.alternate,a);break;default:To(n,a)}t=t.sibling}}var Do=8192;function Dl(e,t,n){if(e.subtreeFlags&Do)for(e=e.child;e!==null;)Yf(e,t,n),e=e.sibling}function Yf(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&Do&&e.memoizedState!==null&&$m(n,En,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var a=En;En=ir(e.stateNode.containerInfo),Dl(e,t,n),En=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Do,Do=16777216,Dl(e,t,n),Do=a):Dl(e,t,n));break;default:Dl(e,t,n)}}function Gf(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 _o(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];Rt=a,Xf(a,e)}Gf(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:_o(e),e.flags&2048&&ya(9,e,e.return);break;case 3:_o(e);break;case 12:_o(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ki(e)):_o(e);break;default:_o(e)}}function Ki(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];Rt=a,Xf(a,e)}Gf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ya(8,t,t.return),Ki(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ki(t));break;default:Ki(t)}e=e.sibling}}function Xf(e,t){for(;Rt!==null;){var n=Rt;switch(n.tag){case 0:case 11:case 15:ya(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:po(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Rt=a;else e:for(n=e;Rt!==null;){a=Rt;var l=a.sibling,o=a.return;if(Lf(a),a===n){Rt=null;break e}if(l!==null){l.return=o,Rt=l;break e}Rt=o}}}var fm={getCacheForType:function(e){var t=Ot(Ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ot(Ct).controller.signal}},hm=typeof WeakMap=="function"?WeakMap:Map,We=0,rt=null,je=null,Ge=0,tt=0,rn=null,ba=!1,_l=!1,sc=!1,ta=0,mt=0,xa=0,el=0,cc=0,sn=0,kl=0,ko=null,It=null,uc=!1,Fi=0,Zf=0,Ji=1/0,Wi=null,Sa=null,At=0,Ca=null,Ol=null,na=0,dc=0,fc=null,Qf=null,Oo=0,hc=null;function cn(){return(We&2)!==0&&Ge!==0?Ge&-Ge:k.T!==null?bc():ii()}function Kf(){if(sn===0)if((Ge&536870912)===0||Xe){var e=ol;ol<<=1,(ol&3932160)===0&&(ol=262144),sn=e}else sn=536870912;return e=ln.current,e!==null&&(e.flags|=32),sn}function Pt(e,t,n){(e===rt&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Ll(e,0),wa(e,Ge,sn,!1)),Ha(e,n),((We&2)===0||e!==rt)&&(e===rt&&((We&2)===0&&(el|=n),mt===4&&wa(e,Ge,sn,!1)),kn(e))}function Ff(e,t,n){if((We&6)!==0)throw Error(s(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Na(e,t),l=a?gm(e,t):mc(e,t,!0),o=a;do{if(l===0){_l&&!a&&wa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!pm(n)){l=mc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var p=e;l=ko;var x=p.current.memoizedState.isDehydrated;if(x&&(Ll(p,d).flags|=256),d=mc(p,d,!1),d!==2){if(sc&&!x){p.errorRecoveryDisabledLanes|=o,el|=o,l=4;break e}o=It,It=l,o!==null&&(It===null?It=o:It.push.apply(It,o))}l=d}if(o=!1,l!==2)continue}}if(l===1){Ll(e,0),wa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:wa(a,t,sn,!ba);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(l=Fi+300-Bt(),10<l)){if(wa(a,t,sn,!ba),il(a,0,!0)!==0)break e;na=t,a.timeoutHandle=Mh(Jf.bind(null,a,n,It,Wi,uc,t,sn,el,kl,ba,o,"Throttled",-0,0),l);break e}Jf(a,n,It,Wi,uc,t,sn,el,kl,ba,o,null,-0,0)}}break}while(!0);kn(e)}function Jf(e,t,n,a,l,o,d,p,x,R,H,G,T,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:Yn},Yf(t,o,G);var he=(o&62914560)===o?Fi-Bt():(o&4194048)===o?Zf-Bt():0;if(he=Im(G,he),he!==null){na=o,e.cancelPendingCommit=he(ah.bind(null,e,t,o,n,a,l,d,p,x,H,G,null,T,O)),wa(e,o,d,!R);return}}ah(e,t,o,n,a,l,d,p,x)}function pm(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(!nn(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 wa(e,t,n,a){t&=~cc,t&=~el,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-Xt(l),d=1<<o;a[o]=-1,l&=~d}n!==0&&li(e,n,t)}function $i(){return(We&6)===0?(Lo(0),!1):!0}function pc(){if(je!==null){if(tt===0)var e=je.return;else e=je,Zn=Za=null,Ds(e),zl=null,go=0,e=je;for(;e!==null;)Ef(e.alternate,e),e=e.return;je=null}}function Ll(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Lm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),na=0,pc(),rt=e,je=n=Vn(e.current,null),Ge=t,tt=0,rn=null,ba=!1,_l=Na(e,t),sc=!1,kl=sn=cc=el=xa=mt=0,It=ko=null,uc=!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-Xt(a),o=1<<l;t|=e[l],a&=~o}return ta=t,yi(),n}function Wf(e,t){Oe=null,k.H=zo,t===wl||t===Ei?(t=dd(),tt=3):t===ys?(t=dd(),tt=4):tt=t===Qs?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,je===null&&(mt=1,qi(e,mn(t,e.current)))}function $f(){var e=ln.current;return e===null?!0:(Ge&4194048)===Ge?bn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===bn:!1}function If(){var e=k.H;return k.H=zo,e===null?zo:e}function Pf(){var e=k.A;return k.A=fm,e}function Ii(){mt=4,ba||(Ge&4194048)!==Ge&&ln.current!==null||(_l=!0),(xa&134217727)===0&&(el&134217727)===0||rt===null||wa(rt,Ge,sn,!1)}function mc(e,t,n){var a=We;We|=2;var l=If(),o=Pf();(rt!==e||Ge!==t)&&(Wi=null,Ll(e,t)),t=!1;var d=mt;e:do try{if(tt!==0&&je!==null){var p=je,x=rn;switch(tt){case 8:pc(),d=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var R=tt;if(tt=0,rn=null,Ul(e,p,x,R),n&&_l){d=0;break e}break;default:R=tt,tt=0,rn=null,Ul(e,p,x,R)}}mm(),d=mt;break}catch(H){Wf(e,H)}while(!0);return t&&e.shellSuspendCounter++,Zn=Za=null,We=a,k.H=l,k.A=o,je===null&&(rt=null,Ge=0,yi()),d}function mm(){for(;je!==null;)eh(je)}function gm(e,t){var n=We;We|=2;var a=If(),l=Pf();rt!==e||Ge!==t?(Wi=null,Ji=Bt()+500,Ll(e,t)):_l=Na(e,t);e:do try{if(tt!==0&&je!==null){t=je;var o=rn;t:switch(tt){case 1:tt=0,rn=null,Ul(e,t,o,1);break;case 2:case 9:if(cd(o)){tt=0,rn=null,th(t);break}t=function(){tt!==2&&tt!==9||rt!==e||(tt=7),kn(e)},o.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:cd(o)?(tt=0,rn=null,th(t)):(tt=0,rn=null,Ul(e,t,o,7));break;case 5:var d=null;switch(je.tag){case 26:d=je.memoizedState;case 5:case 27:var p=je;if(d?qh(d):p.stateNode.complete){tt=0,rn=null;var x=p.sibling;if(x!==null)je=x;else{var R=p.return;R!==null?(je=R,Pi(R)):je=null}break t}}tt=0,rn=null,Ul(e,t,o,5);break;case 6:tt=0,rn=null,Ul(e,t,o,6);break;case 8:pc(),mt=6;break e;default:throw Error(s(462))}}vm();break}catch(H){Wf(e,H)}while(!0);return Zn=Za=null,k.H=a,k.A=l,We=n,je!==null?0:(rt=null,Ge=0,yi(),mt)}function vm(){for(;je!==null&&!Kl();)eh(je)}function eh(e){var t=zf(e.alternate,e,ta);e.memoizedProps=e.pendingProps,t===null?Pi(e):je=t}function th(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yf(n,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=yf(n,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Ds(t);default:Ef(n,t),t=je=Iu(t,ta),t=zf(n,t,ta)}e.memoizedProps=e.pendingProps,t===null?Pi(e):je=t}function Ul(e,t,n,a){Zn=Za=null,Ds(t),zl=null,go=0;var l=t.return;try{if(om(e,l,t,n,Ge)){mt=1,qi(e,mn(n,e.current)),je=null;return}}catch(o){if(l!==null)throw je=l,o;mt=1,qi(e,mn(n,e.current)),je=null;return}t.flags&32768?(Xe||a===1?e=!0:_l||(Ge&536870912)!==0?e=!1:(ba=e=!0,(a===2||a===9||a===3||a===6)&&(a=ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),nh(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){nh(t,ba);return}e=t.return;var n=sm(t.alternate,t,ta);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);mt===0&&(mt=5)}function nh(e,t){do{var n=cm(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);mt=6,je=null}function ah(e,t,n,a,l,o,d,p,x){e.cancelPendingCommit=null;do er();while(At!==0);if((We&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(o=t.lanes|t.childLanes,o|=as,Ur(e,n,o,d,p,x),e===rt&&(je=rt=null,Ge=0),Ol=t,Ca=e,na=n,dc=o,fc=l,Qf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sm(oa,function(){return sh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,l=q.p,q.p=2,d=We,We|=4;try{um(e,t,n)}finally{We=d,q.p=l,k.T=a}}At=1,lh(),oh(),ih()}}function lh(){if(At===1){At=0;var e=Ca,t=Ol,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null;var a=q.p;q.p=2;var l=We;We|=4;try{Bf(t,e);var o=Ac,d=Vu(e.containerInfo),p=o.focusedElem,x=o.selectionRange;if(d!==p&&p&&p.ownerDocument&&Gu(p.ownerDocument.documentElement,p)){if(x!==null&&Ir(p)){var R=x.start,H=x.end;if(H===void 0&&(H=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(H,p.value.length);else{var G=p.ownerDocument||document,T=G&&G.defaultView||window;if(T.getSelection){var O=T.getSelection(),he=p.textContent.length,ze=Math.min(x.start,he),ot=x.end===void 0?ze:Math.min(x.end,he);!O.extend&&ze>ot&&(d=ot,ot=ze,ze=d);var E=Yu(p,ze),w=Yu(p,ot);if(E&&w&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==w.node||O.focusOffset!==w.offset)){var A=G.createRange();A.setStart(E.node,E.offset),O.removeAllRanges(),ze>ot?(O.addRange(A),O.extend(w.node,w.offset)):(A.setEnd(w.node,w.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 Y=G[p];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}fr=!!Ec,Ac=Ec=null}finally{We=l,q.p=a,k.T=n}}e.current=t,At=2}}function oh(){if(At===2){At=0;var e=Ca,t=Ol,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=k.T,k.T=null;var a=q.p;q.p=2;var l=We;We|=4;try{Of(e,t.alternate,t)}finally{We=l,q.p=a,k.T=n}}At=3}}function ih(){if(At===4||At===3){At=0,al();var e=Ca,t=Ol,n=na,a=Qf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,Ol=Ca=null,rh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Sa=null),Il(n),t=t.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(Nn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,l=q.p,q.p=2,k.T=null;try{for(var o=e.onRecoverableError,d=0;d<a.length;d++){var p=a[d];o(p.value,{componentStack:p.stack})}}finally{k.T=t,q.p=l}}(na&3)!==0&&er(),kn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===hc?Oo++:(Oo=0,hc=e):Oo=0,Lo(0)}}function rh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,po(t)))}function er(){return lh(),oh(),ih(),sh()}function sh(){if(At!==5)return!1;var e=Ca,t=dc;dc=0;var n=Il(na),a=k.T,l=q.p;try{q.p=32>n?32:n,k.T=null,n=fc,fc=null;var o=Ca,d=na;if(At=0,Ol=Ca=null,na=0,(We&6)!==0)throw Error(s(331));var p=We;if(We|=4,Vf(o.current),qf(o,o.current,d,n),We=p,Lo(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(Nn,o)}catch{}return!0}finally{q.p=l,k.T=a,rh(e,t)}}function ch(e,t,n){t=mn(n,t),t=Zs(e.stateNode,t,2),e=ma(e,t,2),e!==null&&(Ha(e,2),kn(e))}function nt(e,t,n){if(e.tag===3)ch(e,e,n);else for(;t!==null;){if(t.tag===3){ch(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Sa===null||!Sa.has(a))){e=mn(n,e),n=uf(2),a=ma(t,n,2),a!==null&&(df(n,a,t,e),Ha(a,2),kn(a));break}}t=t.return}}function gc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new hm;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)||(sc=!0,l.add(n),e=ym.bind(null,e,t,n),t.then(e,e))}function ym(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rt===e&&(Ge&n)===n&&(mt===4||mt===3&&(Ge&62914560)===Ge&&300>Bt()-Fi?(We&2)===0&&Ll(e,0):cc|=n,kl===Ge&&(kl=0)),kn(e)}function uh(e,t){t===0&&(t=ai()),e=Ga(e,t),e!==null&&(Ha(e,t),kn(e))}function bm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uh(e,n)}function xm(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(s(314))}a!==null&&a.delete(t),uh(e,n)}function Sm(e,t){return ka(e,t)}var tr=null,Nl=null,vc=!1,nr=!1,yc=!1,za=0;function kn(e){e!==Nl&&e.next===null&&(Nl===null?tr=Nl=e:Nl=Nl.next=e),nr=!0,vc||(vc=!0,wm())}function Lo(e,t){if(!yc&&nr){yc=!0;do for(var n=!1,a=tr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var d=a.suspendedLanes,p=a.pingedLanes;o=(1<<31-Xt(42|e)+1)-1,o&=l&~(d&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,ph(a,o))}else o=Ge,o=il(a,a===rt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||Na(a,o)||(n=!0,ph(a,o));a=a.next}while(n);yc=!1}}function Cm(){dh()}function dh(){nr=vc=!1;var e=0;za!==0&&Om()&&(e=za);for(var t=Bt(),n=null,a=tr;a!==null;){var l=a.next,o=fh(a,t);o===0?(a.next=null,n===null?tr=l:n.next=l,l===null&&(Nl=n)):(n=a,(e!==0||(o&3)!==0)&&(nr=!0)),a=l}At!==0&&At!==5||Lo(e),za!==0&&(za=0)}function fh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var d=31-Xt(o),p=1<<d,x=l[d];x===-1?((p&n)===0||(p&a)!==0)&&(l[d]=Lr(p,t)):x<=t&&(e.expiredLanes|=p),o&=~p}if(t=rt,n=Ge,n=il(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&dn(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Na(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&dn(a),Il(n)){case 2:case 8:n=Oa;break;case 32:n=oa;break;case 268435456:n=St;break;default:n=oa}return a=hh.bind(null,e),n=ka(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&dn(a),e.callbackPriority=2,e.callbackNode=null,2}function hh(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(er()&&e.callbackNode!==n)return null;var a=Ge;return a=il(e,e===rt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Ff(e,a,t),fh(e,Bt()),e.callbackNode!=null&&e.callbackNode===n?hh.bind(null,e):null)}function ph(e,t){if(er())return null;Ff(e,t,!0)}function wm(){Um(function(){(We&6)!==0?ka(Fl,Cm):dh()})}function bc(){if(za===0){var e=Sl;e===0&&(e=ll,ll<<=1,(ll&261888)===0&&(ll=256)),za=e}return za}function mh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ui(""+e)}function gh(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 zm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=mh((l[vt]||null).action),d=a.submitter;d&&(t=(t=d[vt]||null)?mh(t.formAction):d.getAttribute("formAction"),t!==null&&(o=t,d=null));var p=new pi("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(za!==0){var x=d?gh(l,d):new FormData(l);js(n,{pending:!0,data:x,method:l.method,action:o},null,x)}}else typeof o=="function"&&(p.preventDefault(),x=d?gh(l,d):new FormData(l),js(n,{pending:!0,data:x,method:l.method,action:o},o,x))},currentTarget:l}]})}}for(var xc=0;xc<ns.length;xc++){var Sc=ns[xc],Mm=Sc.toLowerCase(),Em=Sc[0].toUpperCase()+Sc.slice(1);Mn(Mm,"on"+Em)}Mn(Qu,"onAnimationEnd"),Mn(Ku,"onAnimationIteration"),Mn(Fu,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(G0,"onTransitionRun"),Mn(V0,"onTransitionStart"),Mn(X0,"onTransitionCancel"),Mn(Ju,"onTransitionEnd"),Ke("onMouseEnter",["mouseout","mouseover"]),Ke("onMouseLeave",["mouseout","mouseover"]),Ke("onPointerEnter",["pointerout","pointerover"]),Ke("onPointerLeave",["pointerout","pointerover"]),Qe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qe("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),Am=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uo));function vh(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 d=a.length-1;0<=d;d--){var p=a[d],x=p.instance,R=p.currentTarget;if(p=p.listener,x!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(H){vi(H)}l.currentTarget=null,o=x}else for(d=0;d<a.length;d++){if(p=a[d],x=p.instance,R=p.currentTarget,p=p.listener,x!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(H){vi(H)}l.currentTarget=null,o=x}}}}function qe(e,t){var n=t[rl];n===void 0&&(n=t[rl]=new Set);var a=e+"__bubble";n.has(a)||(yh(t,e,2,!1),n.add(a))}function Cc(e,t,n){var a=0;t&&(a|=4),yh(n,e,a,t)}var ar="_reactListening"+Math.random().toString(36).slice(2);function wc(e){if(!e[ar]){e[ar]=!0,Ee.forEach(function(n){n!=="selectionchange"&&(Am.has(n)||Cc(n,!1,e),Cc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ar]||(t[ar]=!0,Cc("selectionchange",!1,t))}}function yh(e,t,n,a){switch(Kh(t)){case 2:var l=tg;break;case 8:l=ng;break;default:l=Bc}n=l.bind(null,t,n,e),l=void 0,!Vr||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 zc(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var p=a.stateNode.containerInfo;if(p===l)break;if(d===4)for(d=a.return;d!==null;){var x=d.tag;if((x===3||x===4)&&d.stateNode.containerInfo===l)return;d=d.return}for(;p!==null;){if(d=jn(p),d===null)return;if(x=d.tag,x===5||x===6||x===26||x===27){a=o=d;continue e}p=p.parentNode}}a=a.return}Cu(function(){var R=o,H=Yr(n),G=[];e:{var T=Wu.get(e);if(T!==void 0){var O=pi,he=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":O=x0;break;case"focusin":he="focus",O=Kr;break;case"focusout":he="blur",O=Kr;break;case"beforeblur":case"afterblur":O=Kr;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=s0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=w0;break;case Qu:case Ku:case Fu:O=d0;break;case Ju:O=M0;break;case"scroll":case"scrollend":O=i0;break;case"wheel":O=A0;break;case"copy":case"cut":case"paste":O=h0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Au;break;case"toggle":case"beforetoggle":O=T0}var ze=(t&4)!==0,ot=!ze&&(e==="scroll"||e==="scrollend"),E=ze?T!==null?T+"Capture":null:T;ze=[];for(var w=R,A;w!==null;){var Y=w;if(A=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||A===null||E===null||(Y=no(w,E),Y!=null&&ze.push(No(w,Y,A))),ot)break;w=w.return}0<ze.length&&(T=new O(T,he,null,n,H),G.push({event:T,listeners:ze}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",T&&n!==qr&&(he=n.relatedTarget||n.fromElement)&&(jn(he)||he[tn]))break e;if((O||T)&&(T=H.window===H?H:(T=H.ownerDocument)?T.defaultView||T.parentWindow:window,O?(he=n.relatedTarget||n.toElement,O=R,he=he?jn(he):null,he!==null&&(ot=m(he),ze=he.tag,he!==ot||ze!==5&&ze!==27&&ze!==6)&&(he=null)):(O=null,he=R),O!==he)){if(ze=Mu,Y="onMouseLeave",E="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(ze=Au,Y="onPointerLeave",E="onPointerEnter",w="pointer"),ot=O==null?T:ne(O),A=he==null?T:ne(he),T=new ze(Y,w+"leave",O,n,H),T.target=ot,T.relatedTarget=A,Y=null,jn(H)===R&&(ze=new ze(E,w+"enter",he,n,H),ze.target=A,ze.relatedTarget=ot,Y=ze),ot=Y,O&&he)t:{for(ze=Rm,E=O,w=he,A=0,Y=E;Y;Y=ze(Y))A++;Y=0;for(var Se=w;Se;Se=ze(Se))Y++;for(;0<A-Y;)E=ze(E),A--;for(;0<Y-A;)w=ze(w),Y--;for(;A--;){if(E===w||w!==null&&E===w.alternate){ze=E;break t}E=ze(E),w=ze(w)}ze=null}else ze=null;O!==null&&bh(G,T,O,ze,!1),he!==null&&ot!==null&&bh(G,ot,he,ze,!0)}}e:{if(T=R?ne(R):window,O=T.nodeName&&T.nodeName.toLowerCase(),O==="select"||O==="input"&&T.type==="file")var Fe=Uu;else if(Ou(T))if(Nu)Fe=j0;else{Fe=H0;var ye=N0}else O=T.nodeName,!O||O.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?R&&jr(R.elementType)&&(Fe=Uu):Fe=B0;if(Fe&&(Fe=Fe(e,R))){Lu(G,Fe,n,H);break e}ye&&ye(e,T,R),e==="focusout"&&R&&T.type==="number"&&R.memoizedProps.value!=null&&Br(T,"number",T.value)}switch(ye=R?ne(R):window,e){case"focusin":(Ou(ye)||ye.contentEditable==="true")&&(hl=ye,Pr=R,uo=null);break;case"focusout":uo=Pr=hl=null;break;case"mousedown":es=!0;break;case"contextmenu":case"mouseup":case"dragend":es=!1,Xu(G,n,H);break;case"selectionchange":if(Y0)break;case"keydown":case"keyup":Xu(G,n,H)}var Ue;if(Jr)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else fl?_u(e,n)&&(Ve="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ve="onCompositionStart");Ve&&(Ru&&n.locale!=="ko"&&(fl||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&fl&&(Ue=wu()):(sa=H,Xr="value"in sa?sa.value:sa.textContent,fl=!0)),ye=lr(R,Ve),0<ye.length&&(Ve=new Eu(Ve,e,null,n,H),G.push({event:Ve,listeners:ye}),Ue?Ve.data=Ue:(Ue=ku(n),Ue!==null&&(Ve.data=Ue)))),(Ue=_0?k0(e,n):O0(e,n))&&(Ve=lr(R,"onBeforeInput"),0<Ve.length&&(ye=new Eu("onBeforeInput","beforeinput",null,n,H),G.push({event:ye,listeners:Ve}),ye.data=Ue)),zm(G,e,R,n,H)}vh(G,t)})}function No(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lr(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=no(e,n),l!=null&&a.unshift(No(e,l,o)),l=no(e,t),l!=null&&a.push(No(e,l,o))),e.tag===3)return a;e=e.return}return[]}function Rm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bh(e,t,n,a,l){for(var o=t._reactName,d=[];n!==null&&n!==a;){var p=n,x=p.alternate,R=p.stateNode;if(p=p.tag,x!==null&&x===a)break;p!==5&&p!==26&&p!==27||R===null||(x=R,l?(R=no(n,o),R!=null&&d.unshift(No(n,R,x))):l||(R=no(n,o),R!=null&&d.push(No(n,R,x)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Tm=/\r\n?/g,Dm=/\u0000|\uFFFD/g;function xh(e){return(typeof e=="string"?e:""+e).replace(Tm,`
9
+ `).replace(Dm,"")}function Sh(e,t){return t=xh(t),xh(e)===t}function lt(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||cl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&cl(e,""+a);break;case"className":si(e,"class",a);break;case"tabIndex":si(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":si(e,n,a);break;case"style":xu(e,a,o);break;case"data":if(t!=="object"){si(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=ui(""+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"&&lt(e,t,"name",l.name,l,null),lt(e,t,"formEncType",l.formEncType,l,null),lt(e,t,"formMethod",l.formMethod,l,null),lt(e,t,"formTarget",l.formTarget,l,null)):(lt(e,t,"encType",l.encType,l,null),lt(e,t,"method",l.method,l,null),lt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ui(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Yn);break;case"onScroll":a!=null&&qe("scroll",e);break;case"onScrollEnd":a!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(s(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=ui(""+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":qe("beforetoggle",e),qe("toggle",e),ri(e,"popover",a);break;case"xlinkActuate":qn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":qn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":qn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":qn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":qn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":qn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":qn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":qn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":qn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ri(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=l0.get(n)||n,ri(e,n,a))}}function Mc(e,t,n,a,l,o){switch(n){case"style":xu(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"children":typeof a=="string"?cl(e,a):(typeof a=="number"||typeof a=="bigint")&&cl(e,""+a);break;case"onScroll":a!=null&&qe("scroll",e);break;case"onScrollEnd":a!=null&&qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Re.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[vt]||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,""):ri(e,n,a)}}}function Ut(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var d=n[o];if(d!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:lt(e,t,o,d,n,null)}}l&&lt(e,t,"srcSet",n.srcSet,n,null),a&&lt(e,t,"src",n.src,n,null);return;case"input":qe("invalid",e);var p=o=d=l=null,x=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var H=n[a];if(H!=null)switch(a){case"name":l=H;break;case"type":d=H;break;case"checked":x=H;break;case"defaultChecked":R=H;break;case"value":o=H;break;case"defaultValue":p=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,t));break;default:lt(e,t,a,H,n,null)}}gu(e,o,p,x,R,d,l,!1);return;case"select":qe("invalid",e),a=d=o=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":o=p;break;case"defaultValue":d=p;break;case"multiple":a=p;default:lt(e,t,l,p,n,null)}t=o,n=d,e.multiple=!!a,t!=null?sl(e,!!a,t,!1):n!=null&&sl(e,!!a,n,!0);return;case"textarea":qe("invalid",e),o=l=a=null;for(d in n)if(n.hasOwnProperty(d)&&(p=n[d],p!=null))switch(d){case"value":a=p;break;case"defaultValue":l=p;break;case"children":o=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:lt(e,t,d,p,n,null)}yu(e,a,l,o);return;case"option":for(x in n)n.hasOwnProperty(x)&&(a=n[x],a!=null)&&(x==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":lt(e,t,x,a,n,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(a=0;a<Uo.length;a++)qe(Uo[a],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("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(s(137,t));default:lt(e,t,R,a,n,null)}return;default:if(jr(t)){for(H in n)n.hasOwnProperty(H)&&(a=n[H],a!==void 0&&Mc(e,t,H,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&lt(e,t,p,a,n,null))}function _m(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,d=null,p=null,x=null,R=null,H=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":x=G;default:a.hasOwnProperty(O)||lt(e,t,O,null,a,G)}}for(var T in a){var O=a[T];if(G=n[T],a.hasOwnProperty(T)&&(O!=null||G!=null))switch(T){case"type":o=O;break;case"name":l=O;break;case"checked":R=O;break;case"defaultChecked":H=O;break;case"value":d=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(s(137,t));break;default:O!==G&&lt(e,t,T,O,a,G)}}Hr(e,d,p,x,R,H,o,l);return;case"select":O=d=p=T=null;for(o in n)if(x=n[o],n.hasOwnProperty(o)&&x!=null)switch(o){case"value":break;case"multiple":O=x;default:a.hasOwnProperty(o)||lt(e,t,o,null,a,x)}for(l in a)if(o=a[l],x=n[l],a.hasOwnProperty(l)&&(o!=null||x!=null))switch(l){case"value":T=o;break;case"defaultValue":p=o;break;case"multiple":d=o;default:o!==x&&lt(e,t,l,o,a,x)}t=p,n=d,a=O,T!=null?sl(e,!!n,T,!1):!!a!=!!n&&(t!=null?sl(e,!!n,t,!0):sl(e,!!n,n?[]:"",!1));return;case"textarea":O=T=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:lt(e,t,p,null,a,l)}for(d in a)if(l=a[d],o=n[d],a.hasOwnProperty(d)&&(l!=null||o!=null))switch(d){case"value":T=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(s(91));break;default:l!==o&&lt(e,t,d,l,a,o)}vu(e,T,O);return;case"option":for(var he in n)T=n[he],n.hasOwnProperty(he)&&T!=null&&!a.hasOwnProperty(he)&&(he==="selected"?e.selected=!1:lt(e,t,he,null,a,T));for(x in a)T=a[x],O=n[x],a.hasOwnProperty(x)&&T!==O&&(T!=null||O!=null)&&(x==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":lt(e,t,x,T,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 ze in n)T=n[ze],n.hasOwnProperty(ze)&&T!=null&&!a.hasOwnProperty(ze)&&lt(e,t,ze,null,a,T);for(R in a)if(T=a[R],O=n[R],a.hasOwnProperty(R)&&T!==O&&(T!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(s(137,t));break;default:lt(e,t,R,T,a,O)}return;default:if(jr(t)){for(var ot in n)T=n[ot],n.hasOwnProperty(ot)&&T!==void 0&&!a.hasOwnProperty(ot)&&Mc(e,t,ot,void 0,a,T);for(H in a)T=a[H],O=n[H],!a.hasOwnProperty(H)||T===O||T===void 0&&O===void 0||Mc(e,t,H,T,a,O);return}}for(var E in n)T=n[E],n.hasOwnProperty(E)&&T!=null&&!a.hasOwnProperty(E)&&lt(e,t,E,null,a,T);for(G in a)T=a[G],O=n[G],!a.hasOwnProperty(G)||T===O||T==null&&O==null||lt(e,t,G,T,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 km(){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,d=l.initiatorType,p=l.duration;if(o&&p&&Ch(d)){for(d=0,p=l.responseEnd,a+=1;a<n.length;a++){var x=n[a],R=x.startTime;if(R>p)break;var H=x.transferSize,G=x.initiatorType;H&&Ch(G)&&(x=x.responseEnd,d+=H*(x<p?1:(p-R)/(x-R)))}if(--a,t+=8*(o+d)/(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 Ec=null,Ac=null;function or(e){return e.nodeType===9?e:e.ownerDocument}function wh(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 Rc(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 Tc=null;function Om(){var e=window.event;return e&&e.type==="popstate"?e===Tc?!1:(Tc=e,!0):(Tc=null,!1)}var Mh=typeof setTimeout=="function"?setTimeout:void 0,Lm=typeof clearTimeout=="function"?clearTimeout:void 0,Eh=typeof Promise=="function"?Promise:void 0,Um=typeof queueMicrotask=="function"?queueMicrotask:typeof Eh<"u"?function(e){return Eh.resolve(null).then(e).catch(Nm)}:Mh;function Nm(e){setTimeout(function(){throw e})}function Ma(e){return e==="head"}function Ah(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),ql(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Ho(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ho(n);for(var o=n.firstChild;o;){var d=o.nextSibling,p=o.nodeName;o[Ba]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=d}}else n==="body"&&Ho(e.ownerDocument.body);n=l}while(n);ql(t)}function Rh(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 Dc(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":Dc(n),eo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Hm(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[Ba])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=xn(e.nextSibling),e===null)break}return null}function Bm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=xn(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=xn(e.nextSibling),e===null))return null;return e}function _c(e){return e.data==="$?"||e.data==="$~"}function kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jm(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 xn(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 Oc=null;function Dh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return xn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _h(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 kh(e,t,n){switch(t=or(n),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Ho(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eo(e)}var Sn=new Map,Oh=new Set;function ir(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var aa=q.d;q.d={f:qm,r:Ym,D:Gm,C:Vm,L:Xm,m:Zm,X:Km,S:Qm,M:Fm};function qm(){var e=aa.f(),t=$i();return e||t}function Ym(e){var t=se(e);t!==null&&t.tag===5&&t.type==="form"?Jd(t):aa.r(e)}var Hl=typeof document>"u"?null:document;function Lh(e,t,n){var a=Hl;if(a&&typeof t=="string"&&t){var l=hn(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"),Ut(t,"link",e),me(t),a.head.appendChild(t)))}}function Gm(e){aa.D(e),Lh("dns-prefetch",e,null)}function Vm(e,t){aa.C(e,t),Lh("preconnect",e,t)}function Xm(e,t,n){aa.L(e,t,n);var a=Hl;if(a&&e&&t){var l='link[rel="preload"][as="'+hn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+hn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+hn(n.imageSizes)+'"]')):l+='[href="'+hn(e)+'"]';var o=l;switch(t){case"style":o=Bl(e);break;case"script":o=jl(e)}Sn.has(o)||(e=D({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Sn.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Bo(o))||t==="script"&&a.querySelector(jo(o))||(t=a.createElement("link"),Ut(t,"link",e),me(t),a.head.appendChild(t)))}}function Zm(e,t){aa.m(e,t);var n=Hl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+hn(a)+'"][href="'+hn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=jl(e)}if(!Sn.has(o)&&(e=D({rel:"modulepreload",href:e},t),Sn.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(jo(o)))return}a=n.createElement("link"),Ut(a,"link",e),me(a),n.head.appendChild(a)}}}function Qm(e,t,n){aa.S(e,t,n);var a=Hl;if(a&&e){var l=pe(a).hoistableStyles,o=Bl(e);t=t||"default";var d=l.get(o);if(!d){var p={loading:0,preload:null};if(d=a.querySelector(Bo(o)))p.loading=5;else{e=D({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Sn.get(o))&&Lc(e,n);var x=d=a.createElement("link");me(x),Ut(x,"link",e),x._p=new Promise(function(R,H){x.onload=R,x.onerror=H}),x.addEventListener("load",function(){p.loading|=1}),x.addEventListener("error",function(){p.loading|=2}),p.loading|=4,rr(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:p},l.set(o,d)}}}function Km(e,t){aa.X(e,t);var n=Hl;if(n&&e){var a=pe(n).hoistableScripts,l=jl(e),o=a.get(l);o||(o=n.querySelector(jo(l)),o||(e=D({src:e,async:!0},t),(t=Sn.get(l))&&Uc(e,t),o=n.createElement("script"),me(o),Ut(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Fm(e,t){aa.M(e,t);var n=Hl;if(n&&e){var a=pe(n).hoistableScripts,l=jl(e),o=a.get(l);o||(o=n.querySelector(jo(l)),o||(e=D({src:e,async:!0,type:"module"},t),(t=Sn.get(l))&&Uc(e,t),o=n.createElement("script"),me(o),Ut(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Uh(e,t,n,a){var l=(l=ke.current)?ir(l):null;if(!l)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Bl(n.href),n=pe(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=Bl(n.href);var o=pe(l).hoistableStyles,d=o.get(e);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,d),(o=l.querySelector(Bo(e)))&&!o._p&&(d.instance=o,d.state.loading=5),Sn.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},Sn.set(e,n),o||Jm(l,e,n,d.state))),t&&a===null)throw Error(s(528,""));return d}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=jl(n),n=pe(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(s(444,e))}}function Bl(e){return'href="'+hn(e)+'"'}function Bo(e){return'link[rel="stylesheet"]['+e+"]"}function Nh(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Jm(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}),Ut(t,"link",n),me(t),e.head.appendChild(t))}function jl(e){return'[src="'+hn(e)+'"]'}function jo(e){return"script[async]"+e}function Hh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+hn(n.href)+'"]');if(a)return t.instance=a,me(a),a;var l=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),me(a),Ut(a,"style",l),rr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Bl(n.href);var o=e.querySelector(Bo(l));if(o)return t.state.loading|=4,t.instance=o,me(o),o;a=Nh(n),(l=Sn.get(l))&&Lc(a,l),o=(e.ownerDocument||e).createElement("link"),me(o);var d=o;return d._p=new Promise(function(p,x){d.onload=p,d.onerror=x}),Ut(o,"link",a),t.state.loading|=4,rr(o,n.precedence,e),t.instance=o;case"script":return o=jl(n.src),(l=e.querySelector(jo(o)))?(t.instance=l,me(l),l):(a=n,(l=Sn.get(o))&&(a=D({},n),Uc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),me(l),Ut(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,rr(a,n.precedence,e));return t.instance}function rr(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,d=0;d<a.length;d++){var p=a[d];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 Lc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var sr=null;function Bh(e,t,n){if(sr===null){var a=new Map,l=sr=new Map;l.set(n,a)}else l=sr,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[Ba]||o[ft]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var d=o.getAttribute(t)||"";d=e+d;var p=a.get(d);p?p.push(o):a.set(d,[o])}}return a}function jh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Wm(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 qh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $m(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=Bl(a.href),o=t.querySelector(Bo(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,me(o);return}o=t.ownerDocument||t,a=Nh(a),(l=Sn.get(l))&&Lc(a,l),o=o.createElement("link"),me(o);var d=o;d._p=new Promise(function(p,x){d.onload=p,d.onerror=x}),Ut(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=cr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Nc=0;function Im(e,t){return e.stylesheets&&e.count===0&&dr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&dr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Nc===0&&(Nc=62500*km());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Nc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function cr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ur=null;function dr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ur=new Map,t.forEach(Pm,e),ur=null,cr.call(e))}function Pm(e,t){if(!(t.state.loading&4)){var n=ur.get(e);if(n)var a=n.get(null);else{n=new Map,ur.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var d=l[o];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),a=d)}a&&n.set(null,a)}l=t.instance,d=l.getAttribute("data-precedence"),o=n.get(d)||a,o===a&&n.set(null,l),n.set(d,l),this.count++,a=cr.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 qo={$$typeof:Z,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function eg(e,t,n,a,l,o,d,p,x){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=Wl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wl(0),this.hiddenUpdates=Wl(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Yh(e,t,n,a,l,o,d,p,x,R,H,G){return e=new eg(e,t,n,d,x,R,H,G,p),t=1,o===!0&&(t|=24),o=an(3,null,null,t),e.current=o,o.stateNode=e,t=ms(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},bs(o),e}function Gh(e){return e?(e=gl,e):gl}function Vh(e,t,n,a,l,o){l=Gh(l),a.context===null?a.context=l:a.pendingContext=l,a=pa(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=ma(e,a,t),n!==null&&(Pt(n,e,t),yo(n,e,t))}function Xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hc(e,t){Xh(e,t),(e=e.alternate)&&Xh(e,t)}function Zh(e){if(e.tag===13||e.tag===31){var t=Ga(e,67108864);t!==null&&Pt(t,e,67108864),Hc(e,67108864)}}function Qh(e){if(e.tag===13||e.tag===31){var t=cn();t=Bn(t);var n=Ga(e,t);n!==null&&Pt(n,e,t),Hc(e,t)}}var fr=!0;function tg(e,t,n,a){var l=k.T;k.T=null;var o=q.p;try{q.p=2,Bc(e,t,n,a)}finally{q.p=o,k.T=l}}function ng(e,t,n,a){var l=k.T;k.T=null;var o=q.p;try{q.p=8,Bc(e,t,n,a)}finally{q.p=o,k.T=l}}function Bc(e,t,n,a){if(fr){var l=jc(a);if(l===null)zc(e,t,a,hr,n),Fh(e,a);else if(lg(l,e,t,n,a))a.stopPropagation();else if(Fh(e,a),t&4&&-1<ag.indexOf(e)){for(;l!==null;){var o=se(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var d=Hn(o.pendingLanes);if(d!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var x=1<<31-Xt(d);p.entanglements[1]|=x,d&=~x}kn(o),(We&6)===0&&(Ji=Bt()+500,Lo(0))}}break;case 31:case 13:p=Ga(o,2),p!==null&&Pt(p,o,2),$i(),Hc(o,2)}if(o=jc(a),o===null&&zc(e,t,a,hr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else zc(e,t,a,null,n)}}function jc(e){return e=Yr(e),qc(e)}var hr=null;function qc(e){if(hr=null,e=jn(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=y(t),e!==null)return e;e=null}else if(n===31){if(e=z(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 hr=e,null}function Kh(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(la()){case Fl:return 2;case Oa:return 8;case oa:case Jl:return 32;case St:return 268435456;default:return 32}default:return 32}}var Yc=!1,Ea=null,Aa=null,Ra=null,Yo=new Map,Go=new Map,Ta=[],ag="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 Fh(e,t){switch(e){case"focusin":case"focusout":Ea=null;break;case"dragenter":case"dragleave":Aa=null;break;case"mouseover":case"mouseout":Ra=null;break;case"pointerover":case"pointerout":Yo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(t.pointerId)}}function Vo(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=se(t),t!==null&&Zh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function lg(e,t,n,a,l){switch(t){case"focusin":return Ea=Vo(Ea,e,t,n,a,l),!0;case"dragenter":return Aa=Vo(Aa,e,t,n,a,l),!0;case"mouseover":return Ra=Vo(Ra,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return Yo.set(o,Vo(Yo.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,Go.set(o,Vo(Go.get(o)||null,e,t,n,a,l)),!0}return!1}function Jh(e){var t=jn(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=y(n),t!==null){e.blockedOn=t,zn(e.priority,function(){Qh(n)});return}}else if(t===31){if(t=z(n),t!==null){e.blockedOn=t,zn(e.priority,function(){Qh(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 pr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jc(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=se(n),t!==null&&Zh(t),e.blockedOn=n,!1;t.shift()}return!0}function Wh(e,t,n){pr(e)&&n.delete(t)}function og(){Yc=!1,Ea!==null&&pr(Ea)&&(Ea=null),Aa!==null&&pr(Aa)&&(Aa=null),Ra!==null&&pr(Ra)&&(Ra=null),Yo.forEach(Wh),Go.forEach(Wh)}function mr(e,t){e.blockedOn===t&&(e.blockedOn=null,Yc||(Yc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,og)))}var gr=null;function $h(e){gr!==e&&(gr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){gr===e&&(gr=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=se(n);o!==null&&(e.splice(t,3),t-=3,js(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function ql(e){function t(x){return mr(x,e)}Ea!==null&&mr(Ea,e),Aa!==null&&mr(Aa,e),Ra!==null&&mr(Ra,e),Yo.forEach(t),Go.forEach(t);for(var n=0;n<Ta.length;n++){var a=Ta[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ta.length&&(n=Ta[0],n.blockedOn===null);)Jh(n),n.blockedOn===null&&Ta.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],d=l[vt]||null;if(typeof o=="function")d||$h(n);else if(d){var p=null;if(o&&o.hasAttribute("formAction")){if(l=o,d=o[vt]||null)p=d.formAction;else if(qc(l)!==null)continue}else p=d.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),$h(n)}}}function Ih(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(d){return l=d})},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 Gc(e){this._internalRoot=e}vr.prototype.render=Gc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current,a=cn();Vh(n,a,e,t,null,null)},vr.prototype.unmount=Gc.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),$i(),t[tn]=null}};function vr(e){this._internalRoot=e}vr.prototype.unstable_scheduleHydration=function(e){if(e){var t=ii();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ta.length&&t!==0&&t<Ta[n].priority;n++);Ta.splice(n,0,e),n===0&&Jh(e)}};var Ph=u.version;if(Ph!=="19.2.4")throw Error(s(527,Ph,"19.2.4"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=g(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var ig={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{Nn=yr.inject(ig),Vt=yr}catch{}}return Qo.createRoot=function(e,t){if(!h(e))throw Error(s(299));var n=!1,a="",l=of,o=rf,d=sf;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&&(d=t.onRecoverableError)),t=Yh(e,1,!1,null,null,n,a,null,l,o,d,Ih),e[tn]=t.current,wc(e),new Gc(t)},Qo.hydrateRoot=function(e,t,n){if(!h(e))throw Error(s(299));var a=!1,l="",o=of,d=rf,p=sf,x=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&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Yh(e,1,!0,t,n??null,a,l,x,o,d,p,Ih),t.context=Gh(null),n=t.current,a=cn(),a=Bn(a),l=pa(a),l.callback=null,ma(n,l,a),n=a,t.current.lanes=n,Ha(t,n),kn(t),e[tn]=t.current,wc(e),new vr(t)},Qo.version="19.2.4",Qo}var bp;function d1(){if(bp)return Fc.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(u){console.error(u)}}return i(),Fc.exports=u1(),Fc.exports}var f1=d1(),xp=function(u,r){var s=arguments;if(r==null||!ti.call(r,"css"))return C.createElement.apply(void 0,s);var h=s.length,m=new Array(h);m[0]=hu,m[1]=fu(u,r);for(var y=2;y<h;y++)m[y]=s[y];return C.createElement.apply(null,m)};(function(i){var u;u||(u=i.JSX||(i.JSX={}))})(xp||(xp={}));function v(){for(var i=arguments.length,u=new Array(i),r=0;r<i;r++)u[r]=arguments[r];return Xp(u)}function Kt(){var i=v.apply(void 0,arguments),u="animation-"+i.name;return{name:u,styles:"@keyframes "+u+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const h1={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},p1={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:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:h1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Qp=C.createContext(p1);function Vl(){return C.useContext(Qp)}const ni="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",f={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"},F={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Ql=v("font-family:",ni,";font-size:",F.base,";line-height:1.5;color:",f.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;}",""),m1=Kt`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,g1=Kt`
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
+ `,v1=Kt`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Ae={overlay:v("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:",m1," 0.15s ease-out;font-family:",ni,";",""),modal:v(Ql," background-color:",f.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:",g1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:v("font-size:",F.base,";color:",f.textSecondary,";margin:0;line-height:1.6;",""),footer:v("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:v("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:v("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:v("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:v("background-color:",f.danger,";border:1px solid ",f.danger,";color:white;&:hover{background-color:",f.dangerHover,";border-color:",f.dangerHover,";}","")};function Jo({title:i,message:u,confirmLabel:r="Confirm",cancelLabel:s="Cancel",variant:h="default",onConfirm:m,onCancel:y}){return c("div",{css:Ae.overlay,onClick:y,children:b("div",{css:Ae.modal,onClick:z=>z.stopPropagation(),children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:i})}),c("div",{css:Ae.body,children:c("p",{css:Ae.message,children:u})}),b("div",{css:Ae.footer,children:[c("button",{css:[Ae.btn,Ae.btnCancel,"",""],onClick:y,children:s}),c("button",{css:[Ae.btn,h==="danger"?Ae.btnDanger:Ae.btnConfirm,"",""],onClick:m,children:r})]})]})})}const y1={input:v("width:100%;padding:10px 12px;font-size:",F.base,";border:1px solid ",f.border,";border-radius:6px;background:",f.surface,";color:",f.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}","")};function zr({title:i,message:u,inputLabel:r,defaultValue:s="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:y="Cancel",isLoading:z=!1,loadingLabel:M="Processing...",onConfirm:g,onCancel:_}){const[D,B]=Lp.useState(s),I=U=>{U.preventDefault(),D.trim()&&!z&&g(D.trim())};return c("div",{css:Ae.overlay,onClick:z?void 0:_,children:c("div",{css:Ae.modal,onClick:U=>U.stopPropagation(),children:b("form",{onSubmit:I,children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:i})}),b("div",{css:Ae.body,children:[u&&c("p",{css:Ae.message,children:u}),r&&c("label",{css:Ae.message,children:r}),c("input",{css:y1.input,type:"text",value:D,onChange:U=>B(U.target.value),placeholder:h,autoFocus:!0,disabled:z})]}),b("div",{css:Ae.footer,children:[c("button",{type:"button",css:[Ae.btn,Ae.btnCancel,"",""],onClick:_,disabled:z,children:y}),c("button",{type:"submit",css:[Ae.btn,Ae.btnConfirm,"",""],disabled:!D.trim()||z,children:z?b(ct,{children:[c("span",{css:v("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",v1," 0.75s linear infinite;margin-right:6px;","")}),M]}):m})]})]})})})}function Kp({title:i,message:u,buttonLabel:r="OK",onClose:s}){return c("div",{css:Ae.overlay,onClick:s,children:b("div",{css:Ae.modal,onClick:h=>h.stopPropagation(),children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:i})}),c("div",{css:Ae.body,children:c("p",{css:Ae.message,children:u})}),c("div",{css:Ae.footer,children:c("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:s,children:r})})]})})}const _a={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:v("width:100%;height:8px;background-color:",f.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:v("height:100%;background:linear-gradient(90deg, ",f.primary,", ",f.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:v("font-size:",F.sm,";color:",f.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:v("font-size:",F.xs,";color:",f.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:v("font-size:",F.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function nl({title:i,progress:u,onClose:r,onDeleteOrphans:s,onStop:h}){const m=u.status==="complete",y=u.status==="error",z=u.status==="stopped",M=u.status==="stopping",g=m||y||z,_=!g||M;return c("div",{css:Ae.overlay,children:b("div",{css:Ae.modal,onClick:D=>D.stopPropagation(),children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:i})}),c("div",{css:Ae.body,children:y?c("p",{css:Ae.message,children:u.message||"An error occurred"}):z?b("p",{css:Ae.message,children:["Processing stopped. Processed ",u.processed??u.current," image",(u.processed??u.current)!==1?"s":""," before stopping."]}):m?b(ct,{children:[b("p",{css:Ae.message,children:[u.message?u.message:u.isMove?b(ct,{children:["Moved ",u.processed," file",u.processed!==1?"s":"",".",u.errors!==void 0&&u.errors>0?b(ct,{children:[" ",u.errors," error",u.errors!==1?"s":""," occurred."]}):null]}):u.isScan?b(ct,{children:[u.alreadyProcessed!==void 0&&u.alreadyProcessed>0?b(ct,{children:[u.alreadyProcessed," image",u.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",u.processed," new image",u.processed!==1?"s":"",".",u.orphanedEntries!==void 0&&u.orphanedEntries>0?b(ct,{children:[" Removed ",u.orphanedEntries," orphaned entr",u.orphanedEntries!==1?"ies":"y","."]}):null,u.pendingUpdates!==void 0&&u.pendingUpdates>0?b(ct,{children:[" ",u.pendingUpdates," file",u.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(ct,{children:["Processed ",u.processed," new image",u.processed!==1?"s":"",".",u.alreadyProcessed!==void 0&&u.alreadyProcessed>0?b(ct,{children:[" ",u.alreadyProcessed," already processed."]}):null]}),u.orphansRemoved!==void 0&&u.orphansRemoved>0?b(ct,{children:[" Removed ",u.orphansRemoved," orphaned thumbnail",u.orphansRemoved!==1?"s":"","."]}):null]}),u.errorMessages&&u.errorMessages.length>0&&b("div",{css:_a.errorList,children:[u.errorMessages.slice(0,10).map((D,B)=>c("p",{css:_a.errorItem,children:D},B)),u.errorMessages.length>10&&b("p",{css:_a.errorItem,children:["...and ",u.errorMessages.length-10," more"]})]})]}):b(ct,{children:[c("p",{css:Ae.message,children:u.status==="cleanup"?u.message||"Cleaning up...":u.message||"Processing..."}),b("div",{css:_a.progressContainer,children:[c("div",{css:_a.progressBar,children:c("div",{css:_a.progressFill,style:{width:`${u.percent}%`}})}),b("div",{css:_a.progressText,children:[b("span",{children:[u.current," of ",u.total]}),b("span",{children:[u.percent,"%"]})]}),u.currentFile&&c("p",{css:_a.currentFile,title:u.currentFile,children:u.currentFile})]})]})}),b("div",{css:Ae.footer,children:[_&&h&&c("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:h,disabled:u.status==="stopping",children:u.status==="stopping"?"Stopping...":"Stop"}),g&&u.orphanedFiles&&u.orphanedFiles.length>0&&s&&b("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:s,children:["Delete ",u.orphanedFiles.length," Orphan",u.orphanedFiles.length!==1?"s":""]}),g&&c("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:r,children:"Done"})]})]})})}function Fp(i){const{setShowProgress:u,setProgressTitle:r,setProgressState:s,triggerRefresh:h}=i,m=C.useRef(null),y=C.useRef(!1),z=C.useRef(!1),M=C.useRef(null),g=C.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:C.useCallback(async D=>{const{endpoint:B,body:I,title:U,onComplete:V,onError:$}=D;if(y.current){console.warn("Streaming operation already in progress");return}y.current=!0,z.current=!1;const P=`${B.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;M.current=P;const Z=new AbortController;m.current=Z;const de=async()=>{z.current=!0,s(L=>({...L,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:P})})}catch{}};Z.signal.addEventListener("abort",de),r(U),u(!0),s({current:0,total:0,percent:0,status:"processing",message:`Starting ${U.toLowerCase()}...`});try{const L=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...I,operationId:P})});if(!L.ok){const j=await L.json().catch(()=>({}));throw new Error(j.error||`Request failed: ${L.status}`)}if(!L.body)throw new Error("No response body");const re=L.body.getReader(),W=new TextDecoder;let K="";try{for(;;){const{done:j,value:te}=await re.read();if(j)break;K+=W.decode(te,{stream:!0});const ve=K.split(`
25
+
26
+ `);K=ve.pop()||"";for(const ae of ve)if(ae.startsWith("data: "))try{const X=JSON.parse(ae.slice(6));if(X.type==="start")s(ue=>({...ue,total:X.total||ue.total}));else if(X.type==="progress")s({current:X.current||0,total:X.total||0,percent:X.percent||Math.round((X.current||0)/(X.total||1)*100),status:"processing",currentFile:X.currentFile,message:X.message});else if(X.type==="cleanup")s(ue=>({...ue,status:"cleanup",message:X.message}));else if(X.type==="complete"){const ue=X.cancelled===!0,Le=X.processed??X.moved??X.renamed??X.pushed??X.downloaded??X.added??X.imported??X.deleted??X.current??0;s({current:Le,total:Le,percent:100,status:ue?"stopped":X.errors&&X.errors>0?"error":"complete",message:X.message,processed:Le,errors:X.errors,orphanedFiles:X.orphanedFiles}),h(),V?.(X)}else X.type==="error"&&(s(ue=>({...ue,status:"error",message:X.message})),$?.(X.message||"Unknown error"))}catch{}}}catch(j){if(!z.current)throw j}finally{Z.signal.removeEventListener("abort",de)}}catch(L){if(!z.current){const re=L instanceof Error?L.message:"Operation failed";console.error(`${U} error:`,L),s({current:0,total:0,percent:0,status:"error",message:re}),$?.(re)}}finally{y.current=!1,m.current=null,M.current=null}},[u,r,s,h]),stop:g,get isRunning(){return y.current}}}const b1=Kt`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,x1=Kt`
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
+ `,gt={overlay:v("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:",b1," 0.15s ease-out;font-family:",ni,";",""),modal:v(Ql," background-color:",f.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:",x1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:v("font-size:",F.lg,";font-weight:600;color:",f.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:v("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:v("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:",f.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:v("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 ",f.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",f.textSecondary,";}",""),folderItemSelected:v("background-color:",f.primaryLight,";border-color:",f.primary,";&:hover{background-color:",f.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:v("font-size:",F.base,";color:",f.text,";flex:1;",""),footer:v("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:v("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:v("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:v("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:v("display:flex;align-items:center;justify-content:center;padding:40px;color:",f.textSecondary,";",""),spinner:v("width:24px;height:24px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Jp({selectedItems:i,currentPath:u,onMove:r,onCancel:s}){const[h,m]=C.useState([]),[y,z]=C.useState(!0),[M,g]=C.useState(null);C.useEffect(()=>{async function U(){try{const V=await fetch("/api/studio/list-folders");if(V.ok){const $=await V.json();console.log("Loaded folders:",$),m($.folders||[])}else console.error("Failed to load folders:",V.status,await V.text())}catch(V){console.error("Failed to load folders:",V)}finally{z(!1)}}U()},[]);const _=Array.from(i),D=h.filter(U=>!_.some(V=>U.path===V||U.path.startsWith(V+"/"))),B=U=>U===u,I=()=>{M&&r(M)};return c("div",{css:gt.overlay,onClick:s,children:b("div",{css:gt.modal,onClick:U=>U.stopPropagation(),children:[c("div",{css:gt.header,children:c("h3",{css:gt.title,children:"Move Items"})}),b("div",{css:gt.body,children:[b("p",{css:gt.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),y?c("div",{css:gt.loading,children:c("div",{css:gt.spinner})}):D.length===0?c("div",{css:gt.loading,children:"No available folders to move to."}):c("div",{css:gt.folderList,children:D.map(U=>{const V=B(U.path);return b("div",{css:[gt.folderItem,M===U.path&&gt.folderItemSelected,V&&gt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!V&&g(U.path),children:[U.depth>0&&c("div",{css:gt.treeIndent,children:Array.from({length:U.depth}).map(($,J)=>c("div",{css:gt.treeLine},J))}),c("svg",{css:gt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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:gt.folderName,children:[U.name,V&&" (current)"]})]},U.path)})})]}),b("div",{css:gt.footer,children:[c("button",{css:[gt.btn,gt.btnCancel,"",""],onClick:s,children:"Cancel"}),c("button",{css:[gt.btn,gt.btnConfirm,"",""],onClick:I,disabled:!M,children:"Move Here"})]})]})})}const S1=`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`,ge={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:v("background:",f.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:v("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",f.border,";",""),icon:v("width:32px;height:32px;color:",f.primary,";flex-shrink:0;",""),title:v("font-size:",F.xl,";font-weight:600;color:",f.text,";margin:0;",""),closeBtn:v("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",f.textMuted,";border-radius:4px;&:hover{color:",f.text,";background:",f.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:v("font-size:",F.base,";color:",f.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:v("width:28px;height:28px;border-radius:50%;background:",f.primaryLight,";color:",f.primary,";font-size:",F.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:v("font-size:",F.base,";font-weight:500;color:",f.text,";margin:0 0 4px 0;",""),stepDesc:v("font-size:",F.sm,";color:",f.textSecondary,";margin:0;line-height:1.5;",""),link:v("color:",f.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:v("background:",f.background,";border:1px solid ",f.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:",f.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:v("color:",f.primary,";",""),envValue:v("color:",f.textSecondary,";",""),copyBtn:v("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;color:",f.textMuted,";transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";color:",f.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:v("padding:16px 24px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:v("padding:10px 16px;border-radius:6px;font-size:",F.base,";font-weight:500;border:1px solid ",f.border,";background:",f.surface,";color:",f.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:v("padding:10px 20px;border-radius:6px;font-size:",F.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Wp({isOpen:i,onClose:u}){const[r,s]=C.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(S1),s(!0),setTimeout(()=>s(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return i?c("div",{css:ge.overlay,onClick:u,children:b("div",{css:ge.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:ge.header,children:[c("svg",{css:ge.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("h2",{css:ge.title,children:"Set Up CDN Storage"}),c("button",{css:ge.closeBtn,onClick:u,children:c("svg",{css:ge.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:ge.content,children:[c("p",{css:ge.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:ge.steps,children:[b("li",{css:ge.step,children:[c("span",{css:ge.stepNumber,children:"1"}),b("div",{css:ge.stepContent,children:[c("h4",{css:ge.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:ge.stepDesc,children:["Sign up at"," ",c("a",{css:ge.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:ge.step,children:[c("span",{css:ge.stepNumber,children:"2"}),b("div",{css:ge.stepContent,children:[c("h4",{css:ge.stepTitle,children:"Create an R2 bucket"}),b("p",{css:ge.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",c("code",{children:"my-images"}),"."]})]})]}),b("li",{css:ge.step,children:[c("span",{css:ge.stepNumber,children:"3"}),b("div",{css:ge.stepContent,children:[c("h4",{css:ge.stepTitle,children:"Enable public access"}),b("p",{css:ge.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',c("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:ge.step,children:[c("span",{css:ge.stepNumber,children:"4"}),b("div",{css:ge.stepContent,children:[c("h4",{css:ge.stepTitle,children:"Create API token"}),c("p",{css:ge.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:ge.step,children:[c("span",{css:ge.stepNumber,children:"5"}),b("div",{css:ge.stepContent,children:[c("h4",{css:ge.stepTitle,children:"Add environment variables"}),b("p",{css:ge.stepDesc,children:["Add these to your ",c("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:ge.envVarsWrapper,children:[b("div",{css:ge.envVars,children:[b("span",{css:ge.envVar,children:[c("span",{css:ge.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",c("span",{css:ge.envValue,children:"your_account_id"})]}),b("span",{css:ge.envVar,children:[c("span",{css:ge.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",c("span",{css:ge.envValue,children:"your_access_key"})]}),b("span",{css:ge.envVar,children:[c("span",{css:ge.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",c("span",{css:ge.envValue,children:"your_secret_key"})]}),b("span",{css:ge.envVar,children:[c("span",{css:ge.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",c("span",{css:ge.envValue,children:"your_bucket_name"})]}),b("span",{css:ge.envVar,children:[c("span",{css:ge.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:ge.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:ge.envVar,children:[c("span",{css:ge.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:ge.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:ge.copyBtn,onClick:h,title:"Copy to clipboard",children:[r&&c("span",{css:ge.copiedTooltip,children:"Copied!"}),c("svg",{css:ge.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:ge.footer,children:[b("a",{css:ge.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",c("svg",{css:ge.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:ge.doneBtn,onClick:u,children:"Got it"})]})]})}):null}const C1=Kt`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,w1=Kt`
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
+ `,st={overlay:v("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:",C1," 0.15s ease-out;font-family:",ni,";",""),modal:v(Ql," background-color:",f.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:",w1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),tabs:v("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",f.border,";",""),tab:v("padding:12px 20px;font-size:",F.base,";font-weight:500;color:",f.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",f.text,";}",""),tabActive:v("color:",f.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",f.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:v("border:2px dashed ",f.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",f.primary,";background-color:",f.primaryLight,";}",""),dropzoneActive:v("border-color:",f.primary,";background-color:",f.primaryLight,";",""),dropzoneIcon:v("width:48px;height:48px;margin:0 auto 16px;color:",f.textMuted,";",""),dropzoneText:v("font-size:",F.base,";color:",f.text,";margin:0 0 4px;",""),dropzoneHint:v("font-size:",F.sm,";color:",f.textSecondary,";margin:0;",""),textarea:v("width:100%;min-height:150px;padding:12px;font-size:",F.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",f.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),textareaLabel:v("font-size:",F.sm,";color:",f.textSecondary,";margin:0 0 8px;",""),footer:v("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:v("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:v("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:v("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:v("margin-top:16px;padding:12px;background-color:",f.background,";border-radius:6px;font-size:",F.sm,";color:",f.text,";","")};function z1({currentPath:i,onClose:u,onUploadComplete:r,streamingOperation:s,setShowProgress:h,setProgressTitle:m,setProgressState:y}){const[z,M]=C.useState("upload"),[g,_]=C.useState([]),[D,B]=C.useState(""),[I,U]=C.useState(!1),[V,$]=C.useState(!1),[J,P]=C.useState(!1),Z=C.useRef(null),de=C.useCallback(j=>{j&&_(Array.from(j))},[]),L=C.useCallback(j=>{j.preventDefault(),U(!1),de(j.dataTransfer.files)},[de]),re=C.useRef(!1),W=C.useCallback(async()=>{if(g.length!==0){if(h&&m&&y){u(),re.current=!1,m("Uploading Files"),h(!0),y({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let j=0;const te=[];for(let ve=0;ve<g.length;ve++){if(re.current){y(ue=>({...ue,status:"stopped",message:`Stopped. Uploaded ${j} file${j!==1?"s":""}.`})),r();return}const ae=g[ve],X=new FormData;X.append("file",ae),X.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:X})).ok?j++:te.push(ae.name)}catch{te.push(ae.name)}y({current:ve+1,total:g.length,percent:Math.round((ve+1)/g.length*100),status:"processing",currentFile:ae.name})}y({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${j} file${j!==1?"s":""}.${te.length>0?` ${te.length} failed.`:""}`}),r();return}$(!0);try{for(const j of g){const te=new FormData;te.append("file",j),te.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:te})}r(),u()}catch(j){console.error("Upload failed:",j)}finally{$(!1)}}},[g,i,r,u,h,m,y]),K=C.useCallback(async()=>{const j=D.split(`
56
+ `).map(te=>te.trim()).filter(te=>te.length>0);if(j.length!==0){if(s){u(),await s.execute({endpoint:"/api/studio/import",body:{urls:j},title:"Importing URLs",onComplete:()=>{r()}});return}P(!0);try{const ve=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:j})})).body?.getReader();if(!ve)throw new Error("No reader");const ae=new TextDecoder;for(;;){const{done:X,value:ue}=await ve.read();if(X)break;const k=ae.decode(ue).split(`
57
+
58
+ `).filter(q=>q.startsWith("data: "));for(const q of k)JSON.parse(q.replace("data: ","")).type==="complete"&&(r(),u())}}catch(te){console.error("Import failed:",te)}finally{P(!1)}}},[D,r,u,s]);return c("div",{css:st.overlay,onClick:u,children:b("div",{css:st.modal,onClick:j=>j.stopPropagation(),children:[b("div",{css:st.header,children:[c("h3",{css:st.title,children:"Add New"}),b("div",{css:st.tabs,children:[c("button",{css:[st.tab,z==="upload"&&st.tabActive,"",""],onClick:()=>M("upload"),children:"Upload Files"}),c("button",{css:[st.tab,z==="import"&&st.tabActive,"",""],onClick:()=>M("import"),children:"Import URLs"})]})]}),c("div",{css:st.body,children:z==="upload"?b(ct,{children:[b("div",{css:[st.dropzone,I&&st.dropzoneActive,"",""],onClick:()=>Z.current?.click(),onDragOver:j=>{j.preventDefault(),U(!0)},onDragLeave:()=>U(!1),onDrop:L,children:[c("svg",{css:st.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("p",{css:st.dropzoneText,children:"Drop files here or click to browse"}),c("p",{css:st.dropzoneHint,children:"Supports images and other media files"})]}),c("input",{ref:Z,type:"file",multiple:!0,css:st.fileInput,onChange:j=>de(j.target.files)}),g.length>0&&b("div",{css:st.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(ct,{children:[c("p",{css:st.textareaLabel,children:"Paste image URLs (one per line)"}),c("textarea",{css:st.textarea,value:D,onChange:j=>B(j.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:st.footer,children:[c("button",{css:[st.btn,st.btnCancel,"",""],onClick:u,children:"Cancel"}),z==="upload"?c("button",{css:[st.btn,st.btnConfirm,"",""],onClick:W,disabled:g.length===0||V,children:V?"Uploading...":"Upload"}):c("button",{css:[st.btn,st.btnConfirm,"",""],onClick:K,disabled:!D.trim()||J,children:J?"Importing...":"Import"})]})]})})}const M1="36px",De={btn:v("height:",M1,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),icon:v("width:16px;height:16px;color:",f.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:v(Ql," position:relative;background-color:",f.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:v("font-size:",F.xl,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:v("padding:6px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:v("font-size:",F.base,";font-weight:600;color:",f.text,";margin:0 0 12px 0;",""),description:v("font-size:",F.sm,";color:",f.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:v("background-color:",f.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",F.xs,";color:",f.textSecondary,";border:1px solid ",f.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:v("position:absolute;top:8px;right:8px;padding:4px;background:",f.surface,";border:1px solid ",f.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.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:v("width:14px;height:14px;color:",f.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:v("width:100%;padding:10px 14px;border:1px solid ",f.border,";border-radius:6px;font-size:",F.base,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:v("font-size:",F.xs,";font-weight:500;color:",f.textSecondary,";display:block;margin-bottom:6px;",""),footer:v("margin-top:24px;padding-top:20px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:v("padding:10px 18px;font-size:",F.base,";font-weight:500;color:",f.text,";background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),saveBtn:v("padding:10px 18px;font-size:",F.base,";font-weight:500;color:white;background-color:",f.primary,";border:1px solid ",f.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.primaryHover,";border-color:",f.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:v("flex:1;padding:8px 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",F.sm,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}",""),cdnIndex:v("font-size:",F.xs,";color:",f.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:v("padding:6px;background:none;border:none;cursor:pointer;color:",f.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",f.danger,";}",""),cdnAddBtn:v("padding:8px 12px;font-size:",F.sm,";font-weight:500;color:",f.primary,";background:",f.primaryLight,";border:1px dashed ",f.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:",f.surface,";}",""),warning:v("font-size:",F.xs,";color:",f.danger,";margin-top:8px;padding:8px 12px;background:",f.dangerLight,";border-radius:6px;","")};function E1(){const[i,u]=C.useState(!1);return b(ct,{children:[c("button",{css:De.btn,onClick:()=>u(!0),"aria-label":"Settings",children:b("svg",{css:De.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"3"}),c("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&&c(R1,{onClose:()=>u(!1)})]})}const A1=`# 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 R1({onClose:i}){const{triggerRefresh:u}=Vl(),[r,s]=C.useState(!1),[h,m]=C.useState([]),[y,z]=C.useState(!0),[M,g]=C.useState(!1),[_,D]=C.useState(!1);C.useEffect(()=>{async function J(){try{const Z=await(await fetch("/api/studio/cdns")).json();m(Z.cdns||[])}catch(P){console.error("Failed to load CDN URLs:",P)}finally{z(!1)}}J()},[]);const B=()=>{navigator.clipboard.writeText(A1),s(!0),setTimeout(()=>s(!1),2e3)},I=C.useCallback((J,P)=>{m(Z=>{const de=[...Z];return de[J]=P,de}),D(!0)},[]),U=C.useCallback(()=>{m(J=>[...J,""]),D(!0)},[]),V=C.useCallback(J=>{m(P=>P.filter((Z,de)=>de!==J)),D(!0)},[]),$=C.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(D(!1),u(),i())}catch(J){console.error("Failed to save CDN URLs:",J)}finally{g(!1)}},[h,u,i]);return c("div",{css:De.overlay,onClick:i,children:b("div",{css:De.panel,onClick:J=>J.stopPropagation(),children:[b("div",{css:De.header,children:[c("h2",{css:De.title,children:"Settings"}),c("button",{css:De.closeBtn,onClick:i,children:c("svg",{css:De.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:De.sections,children:[b("section",{children:[c("h3",{css:De.sectionTitle,children:"CDN URLs"}),c("p",{css:De.description,children:"Manage CDN base URLs used by your images:"}),y?c("p",{css:De.description,children:"Loading..."}):b(ct,{children:[c("div",{css:De.cdnList,children:h.map((J,P)=>b("div",{css:De.cdnRow,children:[c("span",{css:De.cdnIndex,children:P}),c("input",{css:De.cdnInput,type:"text",value:J,onChange:Z=>I(P,Z.target.value),placeholder:"https://cdn.example.com"}),c("button",{css:De.cdnDeleteBtn,onClick:()=>V(P),title:"Delete CDN URL",children:c("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})})]},P))}),b("button",{css:De.cdnAddBtn,onClick:U,children:[c("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&c("p",{css:De.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[c("h3",{css:De.sectionTitle,children:"Environment Variables"}),b("p",{css:De.description,children:["Configure in ",c("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:De.codeWrapper,children:[b("button",{css:De.copyBtn,onClick:B,title:"Copy to clipboard",children:[r&&c("span",{css:De.tooltip,children:"Copied!"}),c("svg",{css:De.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:De.code,children:[c("p",{css:De.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),c("p",{css:De.codeLine,children:" "}),c("p",{css:De.codeLine,children:"# Cloudflare R2 Storage"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),c("p",{css:De.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[c("h3",{css:De.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:De.grid,children:[b("div",{children:[c("label",{css:De.label,children:"Small"}),c("input",{css:De.input,type:"number",defaultValue:300})]}),b("div",{children:[c("label",{css:De.label,children:"Medium"}),c("input",{css:De.input,type:"number",defaultValue:700})]}),b("div",{children:[c("label",{css:De.label,children:"Large"}),c("input",{css:De.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:De.footer,children:[c("button",{css:De.cancelBtn,onClick:i,children:"Cancel"}),c("button",{css:De.saveBtn,onClick:$,disabled:M||!_,children:M?"Saving...":"Save Changes"})]})]})})}const Ic="36px",T1=Kt`
68
+ to { transform: rotate(360deg); }
69
+ `,be={toolbar:v("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",f.surface,";border-bottom:1px solid ",f.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:v("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Ic,";padding:0 14px;border-radius:6px;font-size:",F.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";cursor:pointer;transition:all 0.15s ease;color:",f.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:v("background:",f.primary,";border-color:",f.primary,";color:white;&:hover:not(:disabled){background:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:v("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.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:v("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",f.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:v("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",F.sm,";color:",f.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",f.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:v("svg{color:",f.text,";}",""),cloudDropdownItemDanger:v("color:",f.danger,";svg{color:",f.danger,";}",""),cloudDropdownDivider:v("height:1px;background-color:",f.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:v("animation:",T1," 1s linear infinite;",""),selectionCount:v("font-size:",F.base,";color:",f.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:v("color:",f.primary,";background:none;border:none;cursor:pointer;font-size:",F.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:v("width:1px;height:24px;background:",f.border,";margin:0 4px;",""),viewToggle:v("display:flex;align-items:center;height:",Ic,";background-color:",f.surface,";border:1px solid ",f.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:v("height:",Ic,";padding:0 32px 0 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",F.base,";background:",f.surface,";color:",f.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),searchClearBtn:v("position:absolute;right:5px;top:5px;bottom:5px;background:",f.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:",f.primaryHover,";}",""),viewBtn:v("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",f.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",f.text,";background-color:",f.surfaceHover,";}",""),viewBtnActive:v("background-color:",f.primaryLight,";color:",f.primary,";&:hover{background-color:",f.primaryLight,";color:",f.primary,";}","")};function D1(){const{selectedItems:i,viewMode:u,setViewMode:r,clearSelection:s,currentPath:h,triggerRefresh:m,focusedItem:y,scanRequested:z,clearScanRequest:M,fileItems:g,requestProcess:_,setProcessMode:D,actionState:B,cancelAction:I}=Vl(),U=C.useRef(null),V=C.useRef(null),[$,J]=C.useState(!1),[P,Z]=C.useState(!1),[de,L]=C.useState(!1),[re,W]=C.useState(!1),[K,j]=C.useState(!1),[te,ve]=C.useState(0),[ae,X]=C.useState(!1),[ue,Le]=C.useState(0),[k,q]=C.useState(!1),[fe,Ne]=C.useState(!1),[xe,S]=C.useState(!1),[N,ee]=C.useState(0),[ce,Ce]=C.useState(!1),[ke,Be]=C.useState("Processing Images"),[Ye,Me]=C.useState({current:0,total:0,percent:0,status:"processing"}),[_t,oe]=C.useState(null),[Yt,Gt]=C.useState(!1),[we,et]=C.useState(!1),[Ze,xt]=C.useState(!1),[it,Cn]=C.useState(!1),[ka,dn]=C.useState(!1),[Kl,al]=C.useState(!1),[Bt,la]=C.useState(!1),[Fl,Oa]=C.useState(!1),oa=C.useRef(null),Jl=C.useRef(null),St=Fp({setShowProgress:Ce,setProgressTitle:Be,setProgressState:Me,triggerRefresh:m}),La=h==="public/images"||h.startsWith("public/images/");C.useCallback(()=>{U.current?.click()},[]);const Dr=C.useCallback(()=>{W(!0),m(),setTimeout(()=>W(!1),600)},[m]),Nn=C.useCallback(async()=>{L(!0),Be("Scanning Files"),Ce(!0),Me({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const ne=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!ne)throw new Error("No reader");const pe=new TextDecoder;let me="";for(;;){const{done:Ee,value:Re}=await ne.read();if(Ee)break;me+=pe.decode(Re,{stream:!0});const Qe=me.split(`
70
+
71
+ `);me=Qe.pop()||"";for(const Ke of Qe){if(!Ke.startsWith("data: "))continue;const Te=JSON.parse(Ke.slice(6));if(Te.type==="start")Me({current:0,total:Te.total,percent:0,status:"processing",message:`Scanning ${Te.total} files...`});else if(Te.type==="progress")Me({current:Te.current,total:Te.total,percent:Te.percent,status:"processing",currentFile:Te.currentFile});else if(Te.type==="cleanup")Me(Zt=>({...Zt,message:Te.message}));else if(Te.type==="complete"){let Zt=Te.renamed>0?`${Te.renamed} file(s) renamed due to conflicts. `:"";Te.orphanedFiles&&Te.orphanedFiles.length>0&&(Zt+=`Found ${Te.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Me({current:Te.total||0,total:Te.total||0,percent:100,status:"complete",processed:Te.added,alreadyProcessed:Te.existingCount,errors:Te.errors,orphanedFiles:Te.orphanedFiles,pendingUpdates:Te.pendingUpdates,orphanedEntries:Te.orphanedEntries,message:Zt||void 0,isScan:!0}),m()}else Te.type==="error"&&Me({current:0,total:0,percent:0,status:"error",message:Te.message||"Scan failed"})}}}catch(se){console.error("Scan error:",se),Me({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{L(!1)}},[m]);C.useEffect(()=>{const se=ne=>{oa.current&&!oa.current.contains(ne.target)&&la(!1),Jl.current&&!Jl.current.contains(ne.target)&&Oa(!1)};return document.addEventListener("mousedown",se),()=>document.removeEventListener("mousedown",se)},[]),C.useEffect(()=>{z&&!de&&(M(),Nn())},[z,de,M,Nn]);const Vt=C.useCallback(async se=>{const ne=se.target.files;if(!ne||ne.length===0)return;const pe=Array.from(ne);pe.length>1?(Me({current:0,total:pe.length,percent:0,status:"processing",message:"Uploading files..."}),Ce(!0)):Z(!0);let me=0,Ee=0;try{for(let Re=0;Re<pe.length;Re++){const Qe=pe[Re],Ke=new FormData;Ke.append("file",Qe),Ke.append("path",h);try{const Te=await fetch("/api/studio/upload",{method:"POST",body:Ke});if(Te.ok)me++;else{const Zt=await Te.json();Ee++,pe.length===1&&(Te.status>=500?(console.error("Upload error:",Zt),oe({title:"Upload Failed",message:`Failed to upload ${Qe.name}: ${Zt.error||"Unknown error"}`})):oe({title:"Cannot Upload Here",message:Zt.error||"Upload not allowed in this location."}))}}catch{Ee++}pe.length>1&&Me({current:Re+1,total:pe.length,percent:Math.round((Re+1)/pe.length*100),status:"processing",currentFile:Qe.name})}pe.length>1&&Me({current:pe.length,total:pe.length,percent:100,status:"complete",processed:me,errors:Ee}),m()}catch(Re){console.error("Upload error:",Re),pe.length>1?Me({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):oe({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{Z(!1),U.current&&(U.current.value="")}},[h,m]),wn=C.useCallback(async se=>{if(i.size>0){const pe=Array.from(i),me=pe.filter(Re=>(Re.split("/").pop()||"").includes(".")&&!Re.endsWith("/")),Ee=pe.filter(Re=>!(Re.split("/").pop()||"").includes(".")||Re.endsWith("/"));if(Ee.length>0)try{const Qe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(Ee.join(","))}`)).json();if(Qe.images)for(const Ke of Qe.images){const Te=`public/${Ke}`;me.includes(Te)||me.push(Te)}}catch(Re){console.error("Failed to get folder files:",Re)}if(me.length===0){oe({title:"No Files Found",message:"No files found in the selected items."});return}D(se),_(me)}else try{const me=await(await fetch("/api/studio/count-images")).json();if(!me.images||me.images.length===0){oe({title:"No Images Found",message:"No images found in the public folder to process."});return}const Ee=me.images.map(Re=>`public/${Re}`);D(se),_(Ee)}catch(pe){console.error("Failed to get images:",pe),oe({title:"Error",message:"Failed to get images."})}},[i,_,D]),Xt=C.useCallback(()=>{St.stop(),V.current&&(Me(se=>({...se,status:"stopping"})),V.current.abort())},[St]),_r=C.useCallback(async()=>{const se=Ye.orphanedFiles;if(!(!se||se.length===0))try{const ne=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:se})}),pe=await ne.json();ne.ok?(Me(me=>({...me,orphanedFiles:void 0,orphansRemoved:pe.deleted,message:`Deleted ${pe.deleted} orphaned thumbnail${pe.deleted!==1?"s":""}.`})),m()):oe({title:"Delete Failed",message:pe.error||"Failed to delete orphaned files."})}catch(ne){console.error("Delete orphans error:",ne),oe({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[Ye.orphanedFiles,m]),kr=C.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i),ne=se.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),pe=se.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/"));let me=ne.length;if(pe.length>0)try{const Re=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();Re.images&&(me+=Re.images.length)}catch(Ee){console.error("Failed to get folder files:",Ee)}ve(me),j(!0)},[i]),Or=C.useCallback(async()=>{j(!1);const se=Array.from(i);se.length!==0&&await St.execute({endpoint:"/api/studio/delete-stream",body:{paths:se},title:"Deleting Files",onComplete:()=>{s()}})},[i,s,St]),ll=C.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i),ne=se.filter(Ke=>(Ke.split("/").pop()||"").includes(".")&&!Ke.endsWith("/")),pe=se.filter(Ke=>!(Ke.split("/").pop()||"").includes(".")||Ke.endsWith("/")),me=pe.length>0;if(me)try{const Te=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();if(Te.images)for(const Zt of Te.images){const to=`public/${Zt}`;ne.includes(to)||ne.push(to)}}catch(Ke){console.error("Failed to get folder files:",Ke)}if(ne.length===0){oe({title:"No Files Found",message:"No files found in the selected items."});return}let Ee=!1,Re=!1,Qe=0;for(const Ke of ne){const Te=g.find(Zt=>Zt.path===Ke);Te?Te.isRemote?Ee=!0:Te.cdnPushed?Qe++:Re=!0:me&&(Re=!0)}if(!me&&Qe===ne.length){oe({title:"Already Pushed",message:`All ${ne.length} file${ne.length!==1?"s are":" is"} already on the CDN.`});return}Le(ne.length),q(Ee),Ne(Re),X(!0)},[i,g]),ol=C.useCallback(async()=>{X(!1);const se=Array.from(i),ne=se.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),pe=se.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/"));if(pe.length>0)try{const Re=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();if(Re.images)for(const Qe of Re.images){const Ke=`public/${Qe}`;ne.includes(Ke)||ne.push(Ke)}}catch(Ee){console.error("Failed to get folder files:",Ee)}const me=ne.map(Ee=>"/"+Ee.replace(/^public\//,""));me.length!==0&&await St.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:me},title:"Pushing to CDN",onComplete:()=>{s()},onError:Ee=>{(Ee.includes("R2 not configured")||Ee.includes("CLOUDFLARE_R2"))&&(Ce(!1),dn(!0))}})},[i,s,St]),[Ua,Hn]=C.useState([]),[il,Na]=C.useState(0),Lr=C.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i),ne=se.filter(Re=>(Re.split("/").pop()||"").includes(".")&&!Re.endsWith("/")),pe=se.filter(Re=>!(Re.split("/").pop()||"").includes(".")||Re.endsWith("/")),me=pe.length>0;if(me)try{const Qe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();if(Qe.images)for(const Ke of Qe.images){const Te=`public/${Ke}`;ne.includes(Te)||ne.push(Te)}}catch(Re){console.error("Failed to get folder files:",Re)}if(ne.length===0){oe({title:"No Files Found",message:"No files found in the selected items."});return}let Ee;if(me)Ee=ne;else if(Ee=ne.filter(Re=>{const Qe=g.find(Ke=>Ke.path===Re);return Qe&&Qe.cdnPushed&&!Qe.isRemote}),Ee.length===0){oe({title:"No CDN Files",message:`None of the ${ne.length} selected file${ne.length!==1?"s are":" is"} on the CDN.`});return}Hn(Ee),Na(ne.length),ee(Ee.length),S(!0)},[i,g]),ai=C.useCallback(async()=>{S(!1),B.showDownloadConfirm&&I();const ne=(B.showDownloadConfirm?B.actionPaths:Ua).map(pe=>"/"+pe.replace(/^public\//,""));await St.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ne},title:"Downloading from CDN",onComplete:()=>s()})},[Ua,s,B.showDownloadConfirm,B.actionPaths,I,St]),Wl=C.useCallback(async()=>{if(i.size===0)return;const ne=Array.from(i).filter(pe=>{const me=g.find(Ee=>Ee.path===pe);return me&&(me.hasUpdate||me.type==="folder"&&me.updateCount&&me.updateCount>0)});if(ne.length===0){oe({title:"No Updates",message:"No files with pending updates in selection."});return}await St.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ne},title:"Pushing Updates",onComplete:()=>s()})},[i,g,s,St]),Ha=C.useCallback(async()=>{if(i.size===0)return;const ne=Array.from(i).filter(pe=>{const me=g.find(Ee=>Ee.path===pe);return me&&(me.hasUpdate||me.type==="folder"&&me.updateCount&&me.updateCount>0)});if(ne.length!==0)try{const pe=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ne})});if(pe.ok)s(),m();else{const me=await pe.json();oe({title:"Cancel Failed",message:me.error||"Unknown error"})}}catch(pe){console.error("Cancel updates error:",pe),oe({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,g,s,m]),Ur=C.useCallback(async se=>{Gt(!1);try{const ne=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:se})});if(ne.ok)m();else{const pe=await ne.json();oe({title:"Create Folder Failed",message:pe.error||"Unknown error"})}}catch(ne){console.error("Create folder error:",ne),oe({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),li=C.useCallback(()=>{i.size!==0&&Cn(!0)},[i]),oi=C.useCallback(async se=>{const ne=Array.from(i);await St.execute({endpoint:"/api/studio/move",body:{paths:ne,destination:se},title:"Moving Files",onComplete:()=>s()})},[i,s,St]),{searchQuery:$l,setSearchQuery:Bn}=Vl(),Il=C.useCallback(se=>{Bn(se.target.value)},[Bn]),ii=C.useCallback(se=>{se.key==="Escape"&&(se.stopPropagation(),Bn(""),se.target.blur())},[Bn]),zn=i.size>0;zn&&Array.from(i).some(se=>{const ne=g.find(pe=>pe.path===se);return ne&&ne.cdnPushed&&!ne.isRemote}),zn&&Array.from(i).every(se=>{const ne=g.find(pe=>pe.path===se);return ne&&ne.type==="file"&&ne.cdnPushed&&!ne.isRemote});const Rn=zn&&Array.from(i).some(se=>{const ne=g.find(pe=>pe.path===se);return ne&&(ne.hasUpdate||ne.type==="folder"&&ne.updateCount&&ne.updateCount>0)}),ft=Array.from(i),vt=ft.length===1&&!ft[0].includes("."),tn=vt?ft[0]:null,rl=tn&&tn.split("/").pop()||"",ia=ft.length===1&&ft[0].includes("."),ra=ia?ft[0]:null,Pl=ra&&ra.split("/").pop()||"",Ba=C.useCallback(async se=>{tn&&(et(!1),await St.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:tn,newName:se},title:"Renaming Folder",onComplete:()=>s()}))},[tn,s,St]),eo=C.useCallback(async se=>{ra&&(xt(!1),await St.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ra,newName:se},title:"Renaming File",onComplete:()=>s()}))},[ra,s,St]),jn=b(ct,{children:[(xe||B.showDownloadConfirm)&&c(Jo,{title:"Download from CDN",message:(()=>{const se=B.showDownloadConfirm?B.downloadImageCount:N,ne=B.showDownloadConfirm?B.downloadTotalSelected:il;return ne>se?`Download ${se} of ${ne} selected file${ne!==1?"s":""} from Cloudflare R2? (${ne-se} not on CDN)`:`Download ${se} image${se!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ai,onCancel:()=>{S(!1),B.showDownloadConfirm&&I()}}),ce&&c(nl,{title:ke,progress:Ye,onStop:Xt,onDeleteOrphans:_r,onClose:()=>{Ce(!1),Me({current:0,total:0,percent:0,status:"processing"}),m()}})]});return y?jn:b(ct,{children:[jn,K&&c(Jo,{title:"Delete Items",message:`Are you sure you want to delete ${te} file${te!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Or,onCancel:()=>j(!1)}),ae&&c(Jo,{title:"Push to CDN",message:`Push ${ue} image${ue!==1?"s":""} to Cloudflare R2?${k?" Remote images will be downloaded first.":""}${fe?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:ol,onCancel:()=>X(!1)}),Yt&&c(zr,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Ur,onCancel:()=>Gt(!1)}),it&&c(Jp,{selectedItems:i,currentPath:h,onMove:se=>{Cn(!1),oi(se)},onCancel:()=>Cn(!1)}),we&&tn&&c(zr,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:rl,defaultValue:rl,confirmLabel:"Rename",onConfirm:Ba,onCancel:()=>et(!1)}),Ze&&ra&&c(zr,{title:"Rename File",message:"Enter a new name for the file:",placeholder:Pl,defaultValue:Pl,confirmLabel:"Rename",onConfirm:eo,onCancel:()=>xt(!1)}),_t&&c(Kp,{title:_t.title,message:_t.message,onClose:()=>{oe(null),m()}}),c(Wp,{isOpen:ka,onClose:()=>dn(!1)}),$&&c(z1,{currentPath:h,onClose:()=>J(!1),onUploadComplete:()=>{J(!1),m()},streamingOperation:St,setShowProgress:Ce,setProgressTitle:Be,setProgressState:Me}),b("div",{css:be.toolbar,children:[c("input",{ref:U,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Vt,style:{display:"none"}}),b("div",{css:be.left,children:[b("button",{css:[be.btn,be.btnPrimary,"",""],onClick:()=>J(!0),disabled:P||La,children:[c(_1,{}),"Add New"]}),b("button",{css:be.btn,onClick:()=>{ia?xt(!0):vt?et(!0):Gt(!0)},disabled:La&&!vt&&!ia,title:La&&!vt&&!ia?"Cannot create folders in protected images folder":void 0,children:[ia||vt?c(N1,{}):c(U1,{}),ia?"Rename File":vt?"Rename Folder":"New Folder"]}),c("div",{css:be.divider}),b("div",{css:be.cloudDropdownWrapper,ref:Jl,children:[b("button",{css:be.btn,onClick:()=>Oa(!Fl),disabled:B.showProgress||La,title:La?"Cannot process images folder":void 0,children:[c(V1,{}),"Thumbnails",c("svg",{css:be.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Fl&&b("div",{css:be.cloudDropdown,children:[b("button",{css:[be.cloudDropdownItem,be.cloudDropdownItemDefault,"",""],onClick:()=>{Oa(!1),wn("generate")},children:[c(X1,{}),"Generate Thumbnails"]}),b("button",{css:[be.cloudDropdownItem,be.cloudDropdownItemDanger,"",""],onClick:()=>{Oa(!1),wn("remove")},children:[c(Z1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[be.btn,be.btnDanger,"",""],onClick:kr,disabled:!zn,children:[c(L1,{}),"Delete"]}),b("button",{css:be.btn,onClick:li,disabled:!zn,children:[c(H1,{}),"Move"]}),b("div",{css:be.cloudDropdownWrapper,ref:oa,children:[b("button",{css:[be.btn,be.btnCloud,"",""],onClick:()=>la(!Bt),disabled:!zn,children:[c(Sp,{}),"Cloud",c("svg",{css:be.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Bt&&zn&&b("div",{css:be.cloudDropdown,children:[Rn&&b(ct,{children:[b("button",{css:be.cloudDropdownItem,onClick:()=>{la(!1),Wl()},children:[c(B1,{}),"Push Update"]}),b("button",{css:[be.cloudDropdownItem,be.cloudDropdownItemDanger,"",""],onClick:()=>{la(!1),Ha()},children:[c(j1,{}),"Cancel Update"]}),c("div",{css:be.cloudDropdownDivider})]}),b("button",{css:be.cloudDropdownItem,onClick:()=>{la(!1),ll()},children:[c(Sp,{}),"Push CDN"]}),b("button",{css:be.cloudDropdownItem,onClick:()=>{la(!1),Lr()},children:[c(q1,{}),"Download"]})]})]}),b("div",{css:be.searchWrapper,children:[c("input",{css:be.searchInput,type:"text",placeholder:"Search images...",value:$l,onChange:Il,onKeyDown:ii}),$l&&c("button",{css:be.searchClearBtn,onClick:()=>Bn(""),title:"Clear search",children:c("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:be.right,children:[zn&&b("span",{css:be.selectionCount,children:[i.size," selected",c("button",{css:be.clearBtn,onClick:s,children:"Clear"})]}),b("button",{css:be.btn,onClick:Nn,disabled:de,children:[c(k1,{spinning:de}),"Scan"]}),c("button",{css:be.btn,onClick:Dr,title:"Refresh view",disabled:re,children:c(O1,{spinning:re})}),b("div",{css:be.viewToggle,children:[c("button",{css:[be.viewBtn,u==="grid"&&be.viewBtnActive,"",""],onClick:()=>r("grid"),"aria-label":"Grid view",children:c(Y1,{})}),c("button",{css:[be.viewBtn,u==="list"&&be.viewBtnActive,"",""],onClick:()=>r("list"),"aria-label":"List view",children:c(G1,{})})]}),c(E1,{})]})]})]})}function _1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 k1({spinning:i}){return c("svg",{css:[be.icon,i&&be.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function O1({spinning:i}){return c("svg",{css:[be.icon,i&&be.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 L1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 U1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 N1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 H1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function Sp(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 B1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 j1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function q1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 Y1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 G1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function V1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 X1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 Z1(){return c("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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 Q1{async get(u){const r=await fetch(u,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error||`Request failed: ${r.status}`)}return r.json()}async post(u,r){const s=await fetch(u,{method:"POST",headers:r?{"Content-Type":"application/json"}:void 0,body:r?JSON.stringify(r):void 0});if(!s.ok){const h=await s.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${s.status}`)}return s.json()}async list(u="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(u)}`)}async search(u,r="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(u)}&path=${encodeURIComponent(r)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(u){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(u.join(","))}`)}async upload(u,r="public"){const s=new FormData;s.append("file",u),s.append("path",r);const h=await fetch("/api/studio/upload",{method:"POST",body:s});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(u){return this.post("/api/studio/delete",{paths:u})}async createFolder(u,r){return this.post("/api/studio/create-folder",{parentPath:u,name:r})}async rename(u,r){return this.post("/api/studio/rename",{oldPath:u,newName:r})}async move(u,r){return this.post("/api/studio/move",{paths:u,destination:r})}async push(u){return this.post("/api/studio/sync",{imageKeys:u})}async reprocess(u){return this.post("/api/studio/reprocess",{imageKeys:u})}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 Fo=new Q1;function $p(){const{currentPath:i,setCurrentPath:u,navigateUp:r,selectedItems:s,toggleSelection:h,selectRange:m,lastSelectedPath:y,selectAll:z,clearSelection:M,refreshKey:g,setFocusedItem:_,triggerRefresh:D,triggerScan:B,searchQuery:I,showError:U,setFileItems:V}=Vl(),[$,J]=C.useState([]),[P,Z]=C.useState(!0),[de,L]=C.useState(!1),[re,W]=C.useState(null),K=C.useRef(!0),j=C.useRef(i);C.useEffect(()=>{async function xe(){const S=j.current!==i;(K.current||S)&&Z(!0),j.current=i;try{const N=I&&I.length>=2?await Fo.search(I,i):await Fo.list(i),ee=N.items||[];J(ee),V(ee),L(N.isEmpty===!0)}catch(N){const ee=N instanceof Error?N.message:"Failed to load items";U("Load Error",ee),J([]),V([]),L(!1)}Z(!1),K.current=!1}xe()},[i,g,I,U,V]),C.useEffect(()=>{async function xe(){if(i!=="public"){W(null);return}try{const S=await Fo.checkFeaturedImage();W(S)}catch{W(null)}}xe()},[i,g]);const te=i==="public",ve=I&&I.length>=2,ae=[...$].sort((xe,S)=>xe.type==="folder"&&S.type!=="folder"?-1:xe.type!=="folder"&&S.type==="folder"?1:xe.name.localeCompare(S.name)),X=ae.length>0&&ae.every(xe=>s.has(xe.path)),ue=ae.some(xe=>s.has(xe.path)),Le=C.useCallback((xe,S)=>{S.shiftKey&&y?m(y,xe.path,ae):h(xe.path)},[y,m,ae,h]),k=C.useCallback(xe=>{xe.type==="folder"?u(xe.path):_(xe)},[u,_]),q=C.useCallback(async xe=>{try{const S="/"+xe.path.replace(/^public\//,"");await Fo.reprocess([S]),D()}catch(S){const N=S instanceof Error?S.message:"Failed to generate thumbnail";U("Processing Error",N)}},[D,U]),fe=C.useCallback(()=>{X?M():z(ae)},[X,M,z,ae]),Ne=re&&!re.exists?re:null;return{items:$,loading:P,sortedItems:ae,metaEmpty:de,missingFeaturedImage:Ne,isAtRoot:te,isSearching:ve,allItemsSelected:X,someItemsSelected:ue,currentPath:i,selectedItems:s,navigateUp:r,handleItemClick:Le,handleOpen:k,handleGenerateThumbnail:q,handleSelectAll:fe,triggerScan:B,triggerRefresh:D}}const K1=Kt`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,F1=Kt`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,J1=Kt`
78
+ to { transform: rotate(360deg); }
79
+ `,Nt={overlay:v("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",K1," 0.15s ease;",""),modal:v("background:",f.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",F1," 0.2s ease;overflow:hidden;",""),header:v("padding:20px 24px;border-bottom:1px solid ",f.border,";",""),title:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),subtitle:v("font-size:",F.sm,";color:",f.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:v("width:24px;height:24px;border-radius:50%;border:2px solid ",f.border,";border-top-color:",f.primary,";animation:",J1," 0.8s linear infinite;",""),urlButton:v("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",f.background,";border:1px solid ",f.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",f.surfaceHover,";border-color:",f.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:v("font-size:",F.xs,";font-weight:600;color:",f.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:v("font-size:",F.base,";font-weight:500;color:",f.text,";word-break:break-all;",""),noOptions:v("padding:20px;text-align:center;color:",f.textSecondary,";font-size:",F.sm,";",""),footer:v("padding:16px 24px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;",""),cancelBtn:v("padding:10px 20px;font-size:",F.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",f.text,";&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";}","")};function Ip({isOpen:i,onClose:u,onSelect:r}){const[s,h]=C.useState(!0),[m,y]=C.useState(null),[z,M]=C.useState(null);if(C.useEffect(()=>{if(!i)return;async function _(){h(!0);try{const D=await Fo.getFeaturedImageOptions();y(D.devUrl),M(D.productionUrl)}catch(D){console.error("Failed to load featured image options:",D)}h(!1)}_()},[i]),!i)return null;const g=m||z;return c("div",{css:Nt.overlay,onClick:u,children:b("div",{css:Nt.modal,onClick:_=>_.stopPropagation(),children:[b("div",{css:Nt.header,children:[c("h2",{css:Nt.title,children:"Generate Screenshot"}),c("p",{css:Nt.subtitle,children:"Choose which URL to screenshot"})]}),c("div",{css:Nt.body,children:s?c("div",{css:Nt.loading,children:c("div",{css:Nt.spinner})}):g?b(ct,{children:[m&&b("button",{css:Nt.urlButton,onClick:()=>r(m),children:[c("span",{css:Nt.urlLabel,children:"Development"}),c("span",{css:Nt.urlValue,children:m})]}),z&&b("button",{css:Nt.urlButton,onClick:()=>r(z),children:[c("span",{css:Nt.urlLabel,children:"Production"}),c("span",{css:Nt.urlValue,children:z})]})]}):b("div",{css:Nt.noOptions,children:["No URLs configured. Set ",c("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),c("div",{css:Nt.footer,children:c("button",{css:Nt.cancelBtn,onClick:u,children:"Cancel"})})]})})}const W1=Kt`
80
+ to { transform: rotate(360deg); }
81
+ `,le={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:v("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",W1," 0.8s linear infinite;",""),empty:v("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:v("font-size:",F.base,";margin:0 0 4px 0;&:last-child{color:",f.textMuted,";font-size:",F.sm,";}",""),scanButton:v("margin-top:16px;padding:10px 24px;font-size:",F.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.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:v("position:relative;border-radius:8px;border:1px solid ",f.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",f.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:v("border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";&:hover{border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";}",""),parentItem:v("cursor:pointer;&:hover{border-color:",f.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:v("width:18px;height:18px;accent-color:",f.primary,";cursor:pointer;",""),content:v("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",f.background,";",""),contentCloud:v("",""),contentRemote:v("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:v("width:56px;height:56px;color:",f.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:v("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",f.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:v("width:56px;height:56px;color:",f.textMuted,";",""),fileIcon:v("width:40px;height:40px;color:",f.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:v("padding:10px 12px;background-color:",f.surface,";border-top:1px solid ",f.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:v("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",f.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:",f.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:v("display:flex;align-items:center;gap:3px;font-size:",F.xs,";",""),folderStatLocal:v("color:",f.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:v("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:v("color:#f59e0b;font-size:",F.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:v("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:",f.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:v("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",F.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.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:",f.primaryLight,";border-color:",f.primary,";}",""),featuredPlaceholder:v("position:relative;border-radius:8px;border:2px dashed ",f.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",f.background,";&:hover{border-color:",f.success,";background-color:",f.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:v("width:40px;height:40px;color:",f.success,";",""),featuredText:v("font-size:",F.sm,";color:",f.success,";text-align:center;font-weight:500;",""),featuredLabel:v("padding:10px 12px;background-color:",f.surface,";border-top:1px solid ",f.borderLight,";",""),name:v("font-size:",F.sm,";font-weight:500;color:",f.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:v("font-size:",F.xs,";color:",f.textMuted,";margin:2px 0 0 0;",""),selectAllRow:v("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";",""),selectAllLabel:v("display:flex;align-items:center;gap:10px;font-size:",F.base,";font-weight:500;color:",f.textSecondary,";cursor:pointer;&:hover{color:",f.text,";}",""),selectAllCheckbox:v("width:16px;height:16px;accent-color:",f.primary,";","")};function $1(){const{loading:i,sortedItems:u,metaEmpty:r,missingFeaturedImage:s,isAtRoot:h,isSearching:m,allItemsSelected:y,someItemsSelected:z,selectedItems:M,navigateUp:g,handleItemClick:_,handleOpen:D,handleGenerateThumbnail:B,handleSelectAll:I,triggerScan:U,triggerRefresh:V}=$p(),[$,J]=C.useState(!1),[P,Z]=C.useState(!1),[de,L]=C.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),re=()=>{J(!0)},W=async K=>{J(!1),Z(!0),L({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const j=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:K})});if(!j.ok){const ae=await j.json();L({current:0,total:4,percent:0,status:"error",message:ae.error||"Failed to generate screenshot"});return}const te=j.body?.getReader(),ve=new TextDecoder;if(te){let ae="";for(;;){const{done:X,value:ue}=await te.read();if(X)break;ae+=ve.decode(ue,{stream:!0});const Le=ae.split(`
82
+ `);ae=Le.pop()||"";for(const k of Le)if(k.startsWith("data: "))try{const q=JSON.parse(k.slice(6));q.type==="start"?L(fe=>({...fe,total:q.total,message:`Screenshotting ${q.url}...`})):q.type==="progress"?L({current:q.current,total:q.total,percent:q.percent,status:"processing",message:q.message}):q.type==="complete"?(L({current:q.processed,total:q.processed,percent:100,status:q.errors>0?"error":"complete",message:q.message}),V()):q.type==="error"&&L(fe=>({...fe,status:"error",message:q.message}))}catch{}}}}catch(j){console.error("Featured image generation error:",j),L({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(ct,{children:[P&&c(nl,{title:"Generating Screenshot",progress:de,onClose:()=>Z(!1)}),c("div",{css:le.loading,children:c("div",{css:le.spinner})})]}):r&&h?b("div",{css:le.empty,children:[c("svg",{css:le.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),c("p",{css:le.emptyText,children:"No files tracked yet"}),c("p",{css:le.emptyText,children:"Click Scan to discover files in your public folder"}),c("button",{css:le.scanButton,onClick:U,children:"Scan for Files"})]}):u.length===0&&h?b("div",{css:le.empty,children:[c("svg",{css:le.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("p",{css:le.emptyText,children:"No files in this folder"}),c("p",{css:le.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(ct,{children:[c(Ip,{isOpen:$,onClose:()=>J(!1),onSelect:W}),P&&c(nl,{title:"Generating Screenshot",progress:de,onClose:()=>Z(!1)}),b("div",{children:[u.length>0&&c("div",{css:le.selectAllRow,children:b("label",{css:le.selectAllLabel,children:[c("input",{type:"checkbox",css:le.selectAllCheckbox,checked:y,ref:K=>{K&&(K.indeterminate=z&&!y)},onChange:I}),"Select all (",u.length,")"]})}),b("div",{css:le.grid,children:[!h&&!m&&b("div",{css:[le.item,le.parentItem,"",""],onClick:g,children:[c("div",{css:le.content,children:c("svg",{css:le.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:le.label,children:[c("p",{css:le.name,children:".."}),c("p",{css:le.size,children:"Parent folder"})]})]}),u.map(K=>c(P1,{item:K,isSelected:M.has(K.path),onClick:j=>_(K,j),onOpen:()=>D(K),onGenerateThumbnail:()=>B(K)},K.path)),h&&s&&!m&&b("div",{css:le.featuredPlaceholder,onClick:re,title:`Generate ${s.filename}`,children:[b("div",{css:le.featuredContent,children:[c("svg",{css:le.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("span",{css:le.featuredText,children:"Generate Screenshot"})]}),b("div",{css:le.featuredLabel,children:[c("p",{css:le.name,children:s.filename}),c("p",{css:le.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function I1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function P1({item:i,isSelected:u,onClick:r,onOpen:s,onGenerateThumbnail:h}){const[m,y]=C.useState(!1),z=i.type==="folder",M=!z&&i.thumbnail!==void 0,g=i.isProtected||z&&i.name==="images"&&i.path==="public/images",_=I1(i.path),D=!z&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||_),B=U=>{U.stopPropagation();const V="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(V),y(!0),setTimeout(()=>y(!1),1500)},I=U=>{if(g){U.stopPropagation(),s();return}r(U)};return b("div",{css:[le.item,u&&!g&&le.itemSelected,"",""],onClick:I,children:[!g&&c("div",{css:le.checkboxWrapper,onClick:U=>U.stopPropagation(),children:c("input",{type:"checkbox",css:le.checkbox,checked:u,onChange:()=>r({})})}),b("div",{css:[le.content,i.isCloud&&le.contentCloud,i.isRemote&&le.contentRemote,"",""],children:[b("button",{css:le.copyBtn,onClick:B,title:"Copy file path",children:[m&&c("span",{css:le.tooltip,children:"Copied!"}),c("svg",{css:le.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:le.openBtn,onClick:U=>{U.stopPropagation(),s()},children:"Open"}),z?g?b("div",{css:le.imagesFolderWrapper,children:[c("svg",{css:le.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:le.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("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"})})]}):c("svg",{css:le.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})}):M&&i.thumbnail?c("img",{css:le.image,src:i.thumbnail,alt:i.name,loading:"lazy"}):c("svg",{css:le.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("div",{css:le.label,children:c("div",{css:le.labelRow,children:b("div",{css:le.labelText,children:[c("p",{css:le.name,title:i.name,children:i.name}),z?b("div",{css:le.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[le.folderStat,le.folderStatLocal,"",""],title:`${i.localCount} local`,children:[c("svg",{css:le.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[le.folderStat,le.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[c("svg",{css:le.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[le.folderStat,le.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[c("svg",{css:le.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[le.folderStat,le.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[c("svg",{css:le.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:le.size,children:[i.fileCount," files"]})]}):b("div",{css:le.statusRow,children:[c("div",{css:le.statusLeft,children:i.hasUpdate?b(ct,{children:[c("svg",{css:le.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:le.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("span",{css:le.updateLabel,children:"update"})]}):i.cdnPushed?c("svg",{css:i.isRemote?le.storedIconRemote:le.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?c("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"}):c("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?c("span",{css:le.size,children:e2(i.size)}):null}),D&&c("span",{css:le.thumbChips,children:_?c("span",{css:le.thumbChip,children:_}):b(ct,{children:[i.hasSm&&c("span",{css:le.thumbChip,children:"SM"}),i.hasMd&&c("span",{css:le.thumbChip,children:"MD"}),i.hasLg&&c("span",{css:le.thumbChip,children:"LG"}),i.hasFull&&c("span",{css:le.thumbChip,children:"FULL"})]})})]})]})})})]})}function e2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const t2=Kt`
83
+ to { transform: rotate(360deg); }
84
+ `,Q={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:v("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",t2," 0.8s linear infinite;",""),empty:v("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyHint:v("font-size:",F.sm,";color:",f.textMuted,";margin-top:4px;",""),scanButton:v("margin-top:16px;padding:10px 24px;font-size:",F.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:v("background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:v("text-align:left;font-size:11px;color:",f.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",f.background,";border-bottom:1px solid ",f.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:v("",""),row:v("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",f.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",f.borderLight,";}",""),rowSelected:v("background-color:",f.primaryLight,";&:hover{background-color:",f.primaryLight,";}",""),parentRow:v("cursor:pointer;border-bottom:1px solid ",f.border,";&:hover{background-color:",f.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:v("width:18px;height:18px;accent-color:",f.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:v("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",F.xs,";color:",f.textSecondary,";background:",f.surface,";border:1px solid ",f.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";color:",f.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:v("display:flex;align-items:center;gap:3px;font-size:",F.xs,";",""),folderStatLocal:v("color:",f.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:v("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:v("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",F.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:v("",""),thumbnailRemote:v("",""),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:v("width:24px;height:24px;color:",f.imagesFolder,";",""),lockIcon:v("width:10px;height:10px;color:",f.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:v("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),fileIcon:v("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),thumbnail:v("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",f.borderLight,";",""),name:v("font-size:",F.base,";font-weight:500;color:",f.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:v("font-size:",F.sm,";color:",f.textSecondary,";",""),cdnBadge:v("display:inline-flex;align-items:center;gap:4px;font-size:",F.xs,";font-weight:500;color:",f.success,";",""),cdnBadgeRemote:v("display:inline-flex;align-items:center;font-size:",F.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:v("font-size:",F.sm,";color:",f.textMuted,";",""),featuredRow:v("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",f.success,";&:hover{background-color:",f.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:v("width:24px;height:24px;color:",f.success,";",""),featuredText:v("color:",f.success,";font-weight:500;",""),openBtn:v("height:32px;font-size:",F.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",f.primaryLight,";border-color:",f.primary,";}","")};function n2(){const{loading:i,sortedItems:u,metaEmpty:r,missingFeaturedImage:s,isAtRoot:h,isSearching:m,allItemsSelected:y,someItemsSelected:z,selectedItems:M,navigateUp:g,handleItemClick:_,handleOpen:D,handleGenerateThumbnail:B,handleSelectAll:I,triggerScan:U,triggerRefresh:V}=$p(),[$,J]=C.useState(!1),[P,Z]=C.useState(!1),[de,L]=C.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),re=()=>{J(!0)},W=async K=>{J(!1),Z(!0),L({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const j=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:K})});if(!j.ok){const ae=await j.json();L({current:0,total:4,percent:0,status:"error",message:ae.error||"Failed to generate screenshot"});return}const te=j.body?.getReader(),ve=new TextDecoder;if(te){let ae="";for(;;){const{done:X,value:ue}=await te.read();if(X)break;ae+=ve.decode(ue,{stream:!0});const Le=ae.split(`
85
+ `);ae=Le.pop()||"";for(const k of Le)if(k.startsWith("data: "))try{const q=JSON.parse(k.slice(6));q.type==="start"?L(fe=>({...fe,total:q.total,message:`Screenshotting ${q.url}...`})):q.type==="progress"?L({current:q.current,total:q.total,percent:q.percent,status:"processing",message:q.message}):q.type==="complete"?(L({current:q.processed,total:q.processed,percent:100,status:q.errors>0?"error":"complete",message:q.message}),V()):q.type==="error"&&L(fe=>({...fe,status:"error",message:q.message}))}catch{}}}}catch(j){console.error("Featured image generation error:",j),L({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?c("div",{css:Q.loading,children:c("div",{css:Q.spinner})}):r&&h?b("div",{css:Q.empty,children:[c("p",{children:"No files tracked yet"}),c("p",{css:Q.emptyHint,children:"Click Scan to discover files in your public folder"}),c("button",{css:Q.scanButton,onClick:U,children:"Scan for Files"})]}):u.length===0&&h?b("div",{css:Q.empty,children:[c("p",{children:"No files in this folder"}),c("p",{css:Q.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(ct,{children:[c(Ip,{isOpen:$,onClose:()=>J(!1),onSelect:W}),P&&c(nl,{title:"Generating Screenshot",progress:de,onClose:()=>Z(!1)}),c("div",{css:Q.tableWrapper,children:b("table",{css:Q.table,children:[c("thead",{children:b("tr",{children:[c("th",{css:[Q.th,Q.thCheckbox,"",""],children:u.length>0&&c("input",{type:"checkbox",css:Q.checkbox,checked:y,ref:K=>{K&&(K.indeterminate=z&&!y)},onChange:I})}),c("th",{css:Q.th,children:"Name"}),c("th",{css:[Q.th,Q.thSize,"",""],children:"Size"}),c("th",{css:[Q.th,Q.thDimensions,"",""],children:"Dimensions"}),c("th",{css:[Q.th,Q.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:Q.tbody,children:[!h&&!m&&b("tr",{css:Q.parentRow,onClick:g,children:[c("td",{css:Q.td}),c("td",{css:Q.td,children:b("div",{css:Q.nameCell,children:[c("svg",{css:Q.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),c("span",{css:Q.name,children:".."})]})}),c("td",{css:[Q.td,Q.meta,"",""],children:"--"}),c("td",{css:[Q.td,Q.meta,"",""],children:"Parent folder"}),c("td",{css:Q.td,children:"--"})]}),u.map(K=>c(a2,{item:K,isSelected:M.has(K.path),onClick:j=>_(K,j),onOpen:()=>D(K),onGenerateThumbnail:()=>B(K)},K.path)),h&&s&&!m&&b("tr",{css:Q.featuredRow,onClick:re,title:`Generate ${s.filename}`,children:[c("td",{css:Q.td}),c("td",{css:Q.td,children:b("div",{css:Q.nameCell,children:[c("div",{css:Q.folderIconWrapper,children:c("svg",{css:Q.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})}),c("span",{css:[Q.name,Q.featuredText,"",""],children:s.filename})]})}),c("td",{css:[Q.td,Q.meta,Q.featuredText,"",""],children:"--"}),c("td",{css:[Q.td,Q.meta,Q.featuredText,"",""],children:"Click to generate"}),c("td",{css:[Q.td,Q.featuredText,"",""],children:"--"})]})]})]})})]})}function a2({item:i,isSelected:u,onClick:r,onOpen:s,onGenerateThumbnail:h}){const[m,y]=C.useState(!1),z=i.type==="folder",M=!z&&i.thumbnail!==void 0,g=i.isProtected||z&&i.name==="images"&&i.path==="public/images",_=B=>{B.stopPropagation();const I="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(I),y(!0),setTimeout(()=>y(!1),1500)},D=B=>{if(g){B.stopPropagation(),s();return}r(B)};return b("tr",{css:[Q.row,u&&!g&&Q.rowSelected,"",""],onClick:D,children:[c("td",{css:[Q.td,Q.checkboxCell,"",""],onClick:B=>B.stopPropagation(),children:!g&&c("input",{type:"checkbox",css:Q.checkbox,checked:u,onChange:()=>r({})})}),c("td",{css:Q.td,children:b("div",{css:Q.nameCell,children:[z?g?b("div",{css:Q.imagesFolderWrapper,children:[c("svg",{css:Q.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:Q.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("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"})})]}):c("div",{css:Q.folderIconWrapper,children:c("svg",{css:Q.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("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"})})}):M&&i.thumbnail?c("div",{css:[Q.thumbnailWrapper,i.isCloud&&Q.thumbnailCloud,i.isRemote&&Q.thumbnailRemote,"",""],children:c("img",{css:Q.thumbnail,src:i.thumbnail,alt:i.name,loading:"lazy"})}):c("div",{css:[Q.thumbnailWrapper,i.isCloud&&Q.thumbnailCloud,i.isRemote&&Q.thumbnailRemote,"",""],children:c("svg",{css:Q.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})}),c("span",{css:Q.name,title:i.name,children:l2(i.name)}),b("div",{css:Q.actionsCell,children:[b("button",{css:Q.copyBtn,onClick:_,title:"Copy file path",children:[m&&c("span",{css:Q.tooltip,children:"Copied!"}),c("svg",{css:Q.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:Q.openBtn,onClick:B=>{B.stopPropagation(),s()},children:"Open"})]})]})}),c("td",{css:[Q.td,Q.meta,"",""],children:z?b("div",{css:Q.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[Q.folderStat,Q.folderStatLocal,"",""],title:`${i.localCount} local`,children:[c("svg",{css:Q.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[Q.folderStat,Q.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[c("svg",{css:Q.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[Q.folderStat,Q.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[c("svg",{css:Q.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[Q.folderStat,Q.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[c("svg",{css:Q.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:Q.updateLabel,children:[c("svg",{css:Q.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("svg",{css:Q.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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?c("span",{css:Q.storedLabel,children:c("svg",{css:i.isRemote?Q.storedIconRemote:Q.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?c("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"}):c("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):"--"}),c("td",{css:[Q.td,Q.meta,"",""],children:z?i.totalSize!==void 0?Cp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),c("td",{css:Q.td,children:i.cdnPushed?i.isRemote?c("span",{css:Q.cdnBadgeRemote,children:"Remote"}):b("span",{css:Q.cdnBadge,children:[c("svg",{css:Q.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("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"]}):c("span",{css:Q.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 l2(i,u=32){if(i.length<=u)return i;const r=i.lastIndexOf("."),s=r>0?i.substring(r):"",h=r>0?i.substring(0,r):i,m=u-s.length-3;if(m<6)return i.substring(0,u-3)+"...";const y=Math.ceil(m/2),z=Math.floor(m/2);return h.substring(0,y)+"..."+h.substring(h.length-z)+s}var ru=function(i,u){return ru=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(r[h]=s[h])},ru(i,u)};function o2(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");ru(i,u);function r(){this.constructor=i}i.prototype=u===null?Object.create(u):(r.prototype=u.prototype,new r)}var Tt=function(){return Tt=Object.assign||function(u){for(var r,s=1,h=arguments.length;s<h;s++){r=arguments[s];for(var m in r)Object.prototype.hasOwnProperty.call(r,m)&&(u[m]=r[m])}return u},Tt.apply(this,arguments)};var Pc,wp;function i2(){if(wp)return Pc;wp=1;var i=!1,u,r,s,h,m,y,z,M,g,_,D,B,I,U,V;function $(){if(!i){i=!0;var P=navigator.userAgent,Z=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(P),de=/(Mac OS X)|(Windows)|(Linux)/.exec(P);if(B=/\b(iPhone|iP[ao]d)/.exec(P),I=/\b(iP[ao]d)/.exec(P),_=/Android/i.exec(P),U=/FBAN\/\w+;/i.exec(P),V=/Mobile/i.exec(P),D=!!/Win64/.exec(P),Z){u=Z[1]?parseFloat(Z[1]):Z[5]?parseFloat(Z[5]):NaN,u&&document&&document.documentMode&&(u=document.documentMode);var L=/(?:Trident\/(\d+.\d+))/.exec(P);y=L?parseFloat(L[1])+4:u,r=Z[2]?parseFloat(Z[2]):NaN,s=Z[3]?parseFloat(Z[3]):NaN,h=Z[4]?parseFloat(Z[4]):NaN,h?(Z=/(?:Chrome\/(\d+\.\d+))/.exec(P),m=Z&&Z[1]?parseFloat(Z[1]):NaN):m=NaN}else u=r=s=m=h=NaN;if(de){if(de[1]){var re=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(P);z=re?parseFloat(re[1].replace("_",".")):!0}else z=!1;M=!!de[2],g=!!de[3]}else z=M=g=!1}}var J={ie:function(){return $()||u},ieCompatibilityMode:function(){return $()||y>u},ie64:function(){return J.ie()&&D},firefox:function(){return $()||r},opera:function(){return $()||s},webkit:function(){return $()||h},safari:function(){return J.webkit()},chrome:function(){return $()||m},windows:function(){return $()||M},osx:function(){return $()||z},linux:function(){return $()||g},iphone:function(){return $()||B},mobile:function(){return $()||B||I||_||V},nativeApp:function(){return $()||U},android:function(){return $()||_},ipad:function(){return $()||I}};return Pc=J,Pc}var eu,zp;function r2(){if(zp)return eu;zp=1;var i=!!(typeof window<"u"&&window.document&&window.document.createElement),u={canUseDOM:i,canUseWorkers:typeof Worker<"u",canUseEventListeners:i&&!!(window.addEventListener||window.attachEvent),canUseViewport:i&&!!window.screen,isInWorker:!i};return eu=u,eu}var tu,Mp;function s2(){if(Mp)return tu;Mp=1;var i=r2(),u;i.canUseDOM&&(u=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function r(s,h){if(!i.canUseDOM||h&&!("addEventListener"in document))return!1;var m="on"+s,y=m in document;if(!y){var z=document.createElement("div");z.setAttribute(m,"return;"),y=typeof z[m]=="function"}return!y&&u&&s==="wheel"&&(y=document.implementation.hasFeature("Events.wheel","3.0")),y}return tu=r,tu}var nu,Ep;function c2(){if(Ep)return nu;Ep=1;var i=i2(),u=s2(),r=10,s=40,h=800;function m(y){var z=0,M=0,g=0,_=0;return"detail"in y&&(M=y.detail),"wheelDelta"in y&&(M=-y.wheelDelta/120),"wheelDeltaY"in y&&(M=-y.wheelDeltaY/120),"wheelDeltaX"in y&&(z=-y.wheelDeltaX/120),"axis"in y&&y.axis===y.HORIZONTAL_AXIS&&(z=M,M=0),g=z*r,_=M*r,"deltaY"in y&&(_=y.deltaY),"deltaX"in y&&(g=y.deltaX),(g||_)&&y.deltaMode&&(y.deltaMode==1?(g*=s,_*=s):(g*=h,_*=h)),g&&!z&&(z=g<1?-1:1),_&&!M&&(M=_<1?-1:1),{spinX:z,spinY:M,pixelX:g,pixelY:_}}return m.getEventType=function(){return i.firefox()?"DOMMouseScroll":u("wheel")?"wheel":"mousewheel"},nu=m,nu}var au,Ap;function u2(){return Ap||(Ap=1,au=c2()),au}var d2=u2();const f2=Op(d2);function h2(i,u,r,s,h,m){m===void 0&&(m=0);var y=Xl(i,u,m),z=y.width,M=y.height,g=Math.min(z,r),_=Math.min(M,s);return g>_*h?{width:_*h,height:_}:{width:g,height:g/h}}function p2(i){return i.width>i.height?i.width/i.naturalWidth:i.height/i.naturalHeight}function Ko(i,u,r,s,h){h===void 0&&(h=0);var m=Xl(u.width,u.height,h),y=m.width,z=m.height;return{x:Rp(i.x,y,r.width,s),y:Rp(i.y,z,r.height,s)}}function Rp(i,u,r,s){var h=u*s/2-r/2;return Tr(i,-h,h)}function Tp(i,u){return Math.sqrt(Math.pow(i.y-u.y,2)+Math.pow(i.x-u.x,2))}function Dp(i,u){return Math.atan2(u.y-i.y,u.x-i.x)*180/Math.PI}function m2(i,u,r,s,h,m,y){m===void 0&&(m=0),y===void 0&&(y=!0);var z=y?g2:v2,M=Xl(u.width,u.height,m),g=Xl(u.naturalWidth,u.naturalHeight,m),_={x:z(100,((M.width-r.width/h)/2-i.x/h)/M.width*100),y:z(100,((M.height-r.height/h)/2-i.y/h)/M.height*100),width:z(100,r.width/M.width*100/h),height:z(100,r.height/M.height*100/h)},D=Math.round(z(g.width,_.width*g.width/100)),B=Math.round(z(g.height,_.height*g.height/100)),I=g.width>=g.height*s,U=I?{width:Math.round(B*s),height:B}:{width:D,height:Math.round(D/s)},V=Tt(Tt({},U),{x:Math.round(z(g.width-U.width,_.x*g.width/100)),y:Math.round(z(g.height-U.height,_.y*g.height/100))});return{croppedAreaPercentages:_,croppedAreaPixels:V}}function g2(i,u){return Math.min(i,Math.max(0,u))}function v2(i,u){return u}function y2(i,u,r,s,h,m){var y=Xl(u.width,u.height,r),z=Tr(s.width/y.width*(100/i.width),h,m),M={x:z*y.width/2-s.width/2-y.width*z*(i.x/100),y:z*y.height/2-s.height/2-y.height*z*(i.y/100)};return{crop:M,zoom:z}}function b2(i,u,r){var s=p2(u);return r.height>r.width?r.height/(i.height*s):r.width/(i.width*s)}function x2(i,u,r,s,h,m){r===void 0&&(r=0);var y=Xl(u.naturalWidth,u.naturalHeight,r),z=Tr(b2(i,u,s),h,m),M=s.height>s.width?s.height/i.height:s.width/i.width,g={x:((y.width-i.width)/2-i.x)*M,y:((y.height-i.height)/2-i.y)*M};return{crop:g,zoom:z}}function _p(i,u){return{x:(u.x+i.x)/2,y:(u.y+i.y)/2}}function S2(i){return i*Math.PI/180}function Xl(i,u,r){var s=S2(r);return{width:Math.abs(Math.cos(s)*i)+Math.abs(Math.sin(s)*u),height:Math.abs(Math.sin(s)*i)+Math.abs(Math.cos(s)*u)}}function Tr(i,u,r){return Math.min(Math.max(i,u),r)}function xr(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return i.filter(function(r){return typeof r=="string"&&r.length>0}).join(" ").trim()}var C2=`.reactEasyCrop_Container {
86
+ position: absolute;
87
+ top: 0;
88
+ left: 0;
89
+ right: 0;
90
+ bottom: 0;
91
+ overflow: hidden;
92
+ user-select: none;
93
+ touch-action: none;
94
+ cursor: move;
95
+ display: flex;
96
+ justify-content: center;
97
+ align-items: center;
98
+ }
99
+
100
+ .reactEasyCrop_Image,
101
+ .reactEasyCrop_Video {
102
+ will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
103
+ }
104
+
105
+ .reactEasyCrop_Contain {
106
+ max-width: 100%;
107
+ max-height: 100%;
108
+ margin: auto;
109
+ position: absolute;
110
+ top: 0;
111
+ bottom: 0;
112
+ left: 0;
113
+ right: 0;
114
+ }
115
+ .reactEasyCrop_Cover_Horizontal {
116
+ width: 100%;
117
+ height: auto;
118
+ }
119
+ .reactEasyCrop_Cover_Vertical {
120
+ width: auto;
121
+ height: 100%;
122
+ }
123
+
124
+ .reactEasyCrop_CropArea {
125
+ position: absolute;
126
+ left: 50%;
127
+ top: 50%;
128
+ transform: translate(-50%, -50%);
129
+ border: 1px solid rgba(255, 255, 255, 0.5);
130
+ box-sizing: border-box;
131
+ box-shadow: 0 0 0 9999em;
132
+ color: rgba(0, 0, 0, 0.5);
133
+ overflow: hidden;
134
+ }
135
+
136
+ .reactEasyCrop_CropAreaRound {
137
+ border-radius: 50%;
138
+ }
139
+
140
+ .reactEasyCrop_CropAreaGrid::before {
141
+ content: ' ';
142
+ box-sizing: border-box;
143
+ position: absolute;
144
+ border: 1px solid rgba(255, 255, 255, 0.5);
145
+ top: 0;
146
+ bottom: 0;
147
+ left: 33.33%;
148
+ right: 33.33%;
149
+ border-top: 0;
150
+ border-bottom: 0;
151
+ }
152
+
153
+ .reactEasyCrop_CropAreaGrid::after {
154
+ content: ' ';
155
+ box-sizing: border-box;
156
+ position: absolute;
157
+ border: 1px solid rgba(255, 255, 255, 0.5);
158
+ top: 33.33%;
159
+ bottom: 33.33%;
160
+ left: 0;
161
+ right: 0;
162
+ border-left: 0;
163
+ border-right: 0;
164
+ }
165
+ `,w2=1,z2=3,M2=1,E2=(function(i){o2(u,i);function u(){var r=i!==null&&i.apply(this,arguments)||this;return r.cropperRef=C.createRef(),r.imageRef=C.createRef(),r.videoRef=C.createRef(),r.containerPosition={x:0,y:0},r.containerRef=null,r.styleRef=null,r.containerRect=null,r.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},r.dragStartPosition={x:0,y:0},r.dragStartCrop={x:0,y:0},r.gestureZoomStart=0,r.gestureRotationStart=0,r.isTouching=!1,r.lastPinchDistance=0,r.lastPinchRotation=0,r.rafDragTimeout=null,r.rafPinchTimeout=null,r.wheelTimer=null,r.currentDoc=typeof document<"u"?document:null,r.currentWindow=typeof window<"u"?window:null,r.resizeObserver=null,r.previousCropSize=null,r.isInitialized=!1,r.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},r.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!r.containerRef)){var s=!0;r.resizeObserver=new window.ResizeObserver(function(h){if(s){s=!1;return}r.computeSizes()}),r.resizeObserver.observe(r.containerRef)}},r.preventZoomSafari=function(s){return s.preventDefault()},r.cleanEvents=function(){r.currentDoc&&(r.currentDoc.removeEventListener("mousemove",r.onMouseMove),r.currentDoc.removeEventListener("mouseup",r.onDragStopped),r.currentDoc.removeEventListener("touchmove",r.onTouchMove),r.currentDoc.removeEventListener("touchend",r.onDragStopped),r.currentDoc.removeEventListener("gesturechange",r.onGestureChange),r.currentDoc.removeEventListener("gestureend",r.onGestureEnd),r.currentDoc.removeEventListener("scroll",r.onScroll))},r.clearScrollEvent=function(){r.containerRef&&r.containerRef.removeEventListener("wheel",r.onWheel),r.wheelTimer&&clearTimeout(r.wheelTimer)},r.onMediaLoad=function(){var s=r.computeSizes();s&&(r.previousCropSize=s,r.emitCropData(),r.setInitialCrop(s),r.isInitialized=!0),r.props.onMediaLoaded&&r.props.onMediaLoaded(r.mediaSize)},r.setInitialCrop=function(s){if(r.props.initialCroppedAreaPercentages){var h=y2(r.props.initialCroppedAreaPercentages,r.mediaSize,r.props.rotation,s,r.props.minZoom,r.props.maxZoom),m=h.crop,y=h.zoom;r.props.onCropChange(m),r.props.onZoomChange&&r.props.onZoomChange(y)}else if(r.props.initialCroppedAreaPixels){var z=x2(r.props.initialCroppedAreaPixels,r.mediaSize,r.props.rotation,s,r.props.minZoom,r.props.maxZoom),m=z.crop,y=z.zoom;r.props.onCropChange(m),r.props.onZoomChange&&r.props.onZoomChange(y)}},r.computeSizes=function(){var s,h,m,y,z,M,g=r.imageRef.current||r.videoRef.current;if(g&&r.containerRef){r.containerRect=r.containerRef.getBoundingClientRect(),r.saveContainerPosition();var _=r.containerRect.width/r.containerRect.height,D=((s=r.imageRef.current)===null||s===void 0?void 0:s.naturalWidth)||((h=r.videoRef.current)===null||h===void 0?void 0:h.videoWidth)||0,B=((m=r.imageRef.current)===null||m===void 0?void 0:m.naturalHeight)||((y=r.videoRef.current)===null||y===void 0?void 0:y.videoHeight)||0,I=g.offsetWidth<D||g.offsetHeight<B,U=D/B,V=void 0;if(I)switch(r.state.mediaObjectFit){default:case"contain":V=_>U?{width:r.containerRect.height*U,height:r.containerRect.height}:{width:r.containerRect.width,height:r.containerRect.width/U};break;case"horizontal-cover":V={width:r.containerRect.width,height:r.containerRect.width/U};break;case"vertical-cover":V={width:r.containerRect.height*U,height:r.containerRect.height};break}else V={width:g.offsetWidth,height:g.offsetHeight};r.mediaSize=Tt(Tt({},V),{naturalWidth:D,naturalHeight:B}),r.props.setMediaSize&&r.props.setMediaSize(r.mediaSize);var $=r.props.cropSize?r.props.cropSize:h2(r.mediaSize.width,r.mediaSize.height,r.containerRect.width,r.containerRect.height,r.props.aspect,r.props.rotation);return(((z=r.state.cropSize)===null||z===void 0?void 0:z.height)!==$.height||((M=r.state.cropSize)===null||M===void 0?void 0:M.width)!==$.width)&&r.props.onCropSizeChange&&r.props.onCropSizeChange($),r.setState({cropSize:$},r.recomputeCropPosition),r.props.setCropSize&&r.props.setCropSize($),$}},r.saveContainerPosition=function(){if(r.containerRef){var s=r.containerRef.getBoundingClientRect();r.containerPosition={x:s.left,y:s.top}}},r.onMouseDown=function(s){r.currentDoc&&(s.preventDefault(),r.currentDoc.addEventListener("mousemove",r.onMouseMove),r.currentDoc.addEventListener("mouseup",r.onDragStopped),r.saveContainerPosition(),r.onDragStart(u.getMousePoint(s)))},r.onMouseMove=function(s){return r.onDrag(u.getMousePoint(s))},r.onScroll=function(s){r.currentDoc&&(s.preventDefault(),r.saveContainerPosition())},r.onTouchStart=function(s){r.currentDoc&&(r.isTouching=!0,!(r.props.onTouchRequest&&!r.props.onTouchRequest(s))&&(r.currentDoc.addEventListener("touchmove",r.onTouchMove,{passive:!1}),r.currentDoc.addEventListener("touchend",r.onDragStopped),r.saveContainerPosition(),s.touches.length===2?r.onPinchStart(s):s.touches.length===1&&r.onDragStart(u.getTouchPoint(s.touches[0]))))},r.onTouchMove=function(s){s.preventDefault(),s.touches.length===2?r.onPinchMove(s):s.touches.length===1&&r.onDrag(u.getTouchPoint(s.touches[0]))},r.onGestureStart=function(s){r.currentDoc&&(s.preventDefault(),r.currentDoc.addEventListener("gesturechange",r.onGestureChange),r.currentDoc.addEventListener("gestureend",r.onGestureEnd),r.gestureZoomStart=r.props.zoom,r.gestureRotationStart=r.props.rotation)},r.onGestureChange=function(s){if(s.preventDefault(),!r.isTouching){var h=u.getMousePoint(s),m=r.gestureZoomStart-1+s.scale;if(r.setNewZoom(m,h,{shouldUpdatePosition:!0}),r.props.onRotationChange){var y=r.gestureRotationStart+s.rotation;r.props.onRotationChange(y)}}},r.onGestureEnd=function(s){r.cleanEvents()},r.onDragStart=function(s){var h,m,y=s.x,z=s.y;r.dragStartPosition={x:y,y:z},r.dragStartCrop=Tt({},r.props.crop),(m=(h=r.props).onInteractionStart)===null||m===void 0||m.call(h)},r.onDrag=function(s){var h=s.x,m=s.y;r.currentWindow&&(r.rafDragTimeout&&r.currentWindow.cancelAnimationFrame(r.rafDragTimeout),r.rafDragTimeout=r.currentWindow.requestAnimationFrame(function(){if(r.state.cropSize&&!(h===void 0||m===void 0)){var y=h-r.dragStartPosition.x,z=m-r.dragStartPosition.y,M={x:r.dragStartCrop.x+y,y:r.dragStartCrop.y+z},g=r.props.restrictPosition?Ko(M,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):M;r.props.onCropChange(g)}}))},r.onDragStopped=function(){var s,h;r.isTouching=!1,r.cleanEvents(),r.emitCropData(),(h=(s=r.props).onInteractionEnd)===null||h===void 0||h.call(s)},r.onWheel=function(s){if(r.currentWindow&&!(r.props.onWheelRequest&&!r.props.onWheelRequest(s))){s.preventDefault();var h=u.getMousePoint(s),m=f2(s).pixelY,y=r.props.zoom-m*r.props.zoomSpeed/200;r.setNewZoom(y,h,{shouldUpdatePosition:!0}),r.state.hasWheelJustStarted||r.setState({hasWheelJustStarted:!0},function(){var z,M;return(M=(z=r.props).onInteractionStart)===null||M===void 0?void 0:M.call(z)}),r.wheelTimer&&clearTimeout(r.wheelTimer),r.wheelTimer=r.currentWindow.setTimeout(function(){return r.setState({hasWheelJustStarted:!1},function(){var z,M;return(M=(z=r.props).onInteractionEnd)===null||M===void 0?void 0:M.call(z)})},250)}},r.getPointOnContainer=function(s,h){var m=s.x,y=s.y;if(!r.containerRect)throw new Error("The Cropper is not mounted");return{x:r.containerRect.width/2-(m-h.x),y:r.containerRect.height/2-(y-h.y)}},r.getPointOnMedia=function(s){var h=s.x,m=s.y,y=r.props,z=y.crop,M=y.zoom;return{x:(h+z.x)/M,y:(m+z.y)/M}},r.setNewZoom=function(s,h,m){var y=m===void 0?{}:m,z=y.shouldUpdatePosition,M=z===void 0?!0:z;if(!(!r.state.cropSize||!r.props.onZoomChange)){var g=Tr(s,r.props.minZoom,r.props.maxZoom);if(M){var _=r.getPointOnContainer(h,r.containerPosition),D=r.getPointOnMedia(_),B={x:D.x*g-_.x,y:D.y*g-_.y},I=r.props.restrictPosition?Ko(B,r.mediaSize,r.state.cropSize,g,r.props.rotation):B;r.props.onCropChange(I)}r.props.onZoomChange(g)}},r.getCropData=function(){if(!r.state.cropSize)return null;var s=r.props.restrictPosition?Ko(r.props.crop,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):r.props.crop;return m2(s,r.mediaSize,r.state.cropSize,r.getAspect(),r.props.zoom,r.props.rotation,r.props.restrictPosition)},r.emitCropData=function(){var s=r.getCropData();if(s){var h=s.croppedAreaPercentages,m=s.croppedAreaPixels;r.props.onCropComplete&&r.props.onCropComplete(h,m),r.props.onCropAreaChange&&r.props.onCropAreaChange(h,m)}},r.emitCropAreaChange=function(){var s=r.getCropData();if(s){var h=s.croppedAreaPercentages,m=s.croppedAreaPixels;r.props.onCropAreaChange&&r.props.onCropAreaChange(h,m)}},r.recomputeCropPosition=function(){var s,h;if(r.state.cropSize){var m=r.props.crop;if(r.isInitialized&&(!((s=r.previousCropSize)===null||s===void 0)&&s.width)&&(!((h=r.previousCropSize)===null||h===void 0)&&h.height)){var y=Math.abs(r.previousCropSize.width-r.state.cropSize.width)>1e-6||Math.abs(r.previousCropSize.height-r.state.cropSize.height)>1e-6;if(y){var z=r.state.cropSize.width/r.previousCropSize.width,M=r.state.cropSize.height/r.previousCropSize.height;m={x:r.props.crop.x*z,y:r.props.crop.y*M}}}var g=r.props.restrictPosition?Ko(m,r.mediaSize,r.state.cropSize,r.props.zoom,r.props.rotation):m;r.previousCropSize=r.state.cropSize,r.props.onCropChange(g),r.emitCropData()}},r.onKeyDown=function(s){var h,m,y=r.props,z=y.crop,M=y.onCropChange,g=y.keyboardStep,_=y.zoom,D=y.rotation,B=g;if(r.state.cropSize){s.shiftKey&&(B*=.2);var I=Tt({},z);switch(s.key){case"ArrowUp":I.y-=B,s.preventDefault();break;case"ArrowDown":I.y+=B,s.preventDefault();break;case"ArrowLeft":I.x-=B,s.preventDefault();break;case"ArrowRight":I.x+=B,s.preventDefault();break;default:return}r.props.restrictPosition&&(I=Ko(I,r.mediaSize,r.state.cropSize,_,D)),s.repeat||(m=(h=r.props).onInteractionStart)===null||m===void 0||m.call(h),M(I)}},r.onKeyUp=function(s){var h,m;switch(s.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":s.preventDefault();break;default:return}r.emitCropData(),(m=(h=r.props).onInteractionEnd)===null||m===void 0||m.call(h)},r}return u.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=C2,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},u.prototype.componentWillUnmount=function(){var r,s;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(r=this.resizeObserver)===null||r===void 0||r.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((s=this.styleRef.parentNode)===null||s===void 0||s.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},u.prototype.componentDidUpdate=function(r){var s,h,m,y,z,M,g,_,D;r.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):r.aspect!==this.props.aspect?this.computeSizes():r.objectFit!==this.props.objectFit?this.computeSizes():r.zoom!==this.props.zoom?this.recomputeCropPosition():((s=r.cropSize)===null||s===void 0?void 0:s.height)!==((h=this.props.cropSize)===null||h===void 0?void 0:h.height)||((m=r.cropSize)===null||m===void 0?void 0:m.width)!==((y=this.props.cropSize)===null||y===void 0?void 0:y.width)?this.computeSizes():(((z=r.crop)===null||z===void 0?void 0:z.x)!==((M=this.props.crop)===null||M===void 0?void 0:M.x)||((g=r.crop)===null||g===void 0?void 0:g.y)!==((_=this.props.crop)===null||_===void 0?void 0:_.y))&&this.emitCropAreaChange(),r.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),r.video!==this.props.video&&((D=this.videoRef.current)===null||D===void 0||D.load());var B=this.getObjectFit();B!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:B},this.computeSizes)},u.prototype.getAspect=function(){var r=this.props,s=r.cropSize,h=r.aspect;return s?s.width/s.height:h},u.prototype.getObjectFit=function(){var r,s,h,m;if(this.props.objectFit==="cover"){var y=this.imageRef.current||this.videoRef.current;if(y&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var z=this.containerRect.width/this.containerRect.height,M=((r=this.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((s=this.videoRef.current)===null||s===void 0?void 0:s.videoWidth)||0,g=((h=this.imageRef.current)===null||h===void 0?void 0:h.naturalHeight)||((m=this.videoRef.current)===null||m===void 0?void 0:m.videoHeight)||0,_=M/g;return _<z?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},u.prototype.onPinchStart=function(r){var s=u.getTouchPoint(r.touches[0]),h=u.getTouchPoint(r.touches[1]);this.lastPinchDistance=Tp(s,h),this.lastPinchRotation=Dp(s,h),this.onDragStart(_p(s,h))},u.prototype.onPinchMove=function(r){var s=this;if(!(!this.currentDoc||!this.currentWindow)){var h=u.getTouchPoint(r.touches[0]),m=u.getTouchPoint(r.touches[1]),y=_p(h,m);this.onDrag(y),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var z=Tp(h,m),M=s.props.zoom*(z/s.lastPinchDistance);s.setNewZoom(M,y,{shouldUpdatePosition:!1}),s.lastPinchDistance=z;var g=Dp(h,m),_=s.props.rotation+(g-s.lastPinchRotation);s.props.onRotationChange&&s.props.onRotationChange(_),s.lastPinchRotation=g})}},u.prototype.render=function(){var r=this,s,h=this.props,m=h.image,y=h.video,z=h.mediaProps,M=h.cropperProps,g=h.transform,_=h.crop,D=_.x,B=_.y,I=h.rotation,U=h.zoom,V=h.cropShape,$=h.showGrid,J=h.roundCropAreaPixels,P=h.style,Z=P.containerStyle,de=P.cropAreaStyle,L=P.mediaStyle,re=h.classes,W=re.containerClassName,K=re.cropAreaClassName,j=re.mediaClassName,te=(s=this.state.mediaObjectFit)!==null&&s!==void 0?s:this.getObjectFit();return C.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(ae){return r.containerRef=ae},"data-testid":"container",style:Z,className:xr("reactEasyCrop_Container",W)},m?C.createElement("img",Tt({alt:"",className:xr("reactEasyCrop_Image",te==="contain"&&"reactEasyCrop_Contain",te==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",te==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",j)},z,{src:m,ref:this.imageRef,style:Tt(Tt({},L),{transform:g||"translate(".concat(D,"px, ").concat(B,"px) rotate(").concat(I,"deg) scale(").concat(U,")")}),onLoad:this.onMediaLoad})):y&&C.createElement("video",Tt({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:xr("reactEasyCrop_Video",te==="contain"&&"reactEasyCrop_Contain",te==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",te==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",j)},z,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Tt(Tt({},L),{transform:g||"translate(".concat(D,"px, ").concat(B,"px) rotate(").concat(I,"deg) scale(").concat(U,")")}),controls:!1}),(Array.isArray(y)?y:[{src:y}]).map(function(ve){return C.createElement("source",Tt({key:ve.src},ve))})),this.state.cropSize&&C.createElement("div",Tt({ref:this.cropperRef,style:Tt(Tt({},de),{width:J?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:J?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:xr("reactEasyCrop_CropArea",V==="round"&&"reactEasyCrop_CropAreaRound",$&&"reactEasyCrop_CropAreaGrid",K)},M)))},u.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:z2,minZoom:w2,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:M2},u.getMousePoint=function(r){return{x:Number(r.clientX),y:Number(r.clientY)}},u.getTouchPoint=function(r){return{x:Number(r.clientX),y:Number(r.clientY)}},u})(C.Component);const A2=Kt`
166
+ from { opacity: 0; }
167
+ to { opacity: 1; }
168
+ `,R2=Kt`
169
+ from {
170
+ opacity: 0;
171
+ transform: translateY(-8px) scale(0.98);
172
+ }
173
+ to {
174
+ opacity: 1;
175
+ transform: translateY(0) scale(1);
176
+ }
177
+ `,He={overlay:v("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.5);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10001;animation:",A2," 0.15s ease-out;font-family:",ni,";",""),modal:v(Ql," background-color:",f.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:800px;width:95%;max-height:90vh;display:flex;flex-direction:column;animation:",R2," 0.2s ease-out;overflow:hidden;",""),header:v("display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid ",f.border,";",""),title:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),closeBtn:v("background:none;border:none;padding:4px;cursor:pointer;color:",f.textMuted,";border-radius:4px;display:flex;align-items:center;justify-content:center;&:hover{color:",f.text,";background-color:",f.background,";}",""),body:{name:"187r2bh",styles:"flex:1;overflow-y:auto;padding:20px"},cropperContainer:v("position:relative;width:100%;height:400px;background-color:",f.background,";border-radius:8px;overflow:hidden;",""),controls:{name:"18pl1k9",styles:"margin-top:20px;display:flex;flex-direction:column;gap:16px"},controlRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},controlLabel:v("font-size:",F.sm,";font-weight:500;color:",f.text,";min-width:100px;",""),aspectButtons:{name:"17wrs20",styles:"display:flex;gap:8px;flex-wrap:wrap"},aspectBtn:v("padding:6px 12px;font-size:",F.sm,";border:1px solid ",f.border,";background:",f.surface,";color:",f.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.background,";border-color:",f.borderHover,";}",""),aspectBtnActive:v("background-color:",f.primary,";border-color:",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:v("padding:8px 12px;font-size:",F.sm,";border:1px solid ",f.border,";background:",f.surface,";color:",f.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;gap:6px;&:hover{background-color:",f.background,";border-color:",f.borderHover,";}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotationDisplay:v("font-size:",F.sm,";color:",f.textSecondary,";margin-left:12px;",""),resizeInputs:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:v("width:80px;padding:6px 10px;font-size:",F.sm,";border:1px solid ",f.border,";border-radius:6px;background:",f.surface,";color:",f.text,";&:focus{outline:none;border-color:",f.primary,";}",""),resizeX:v("font-size:",F.sm,";color:",f.textMuted,";",""),zoomSlider:v("flex:1;max-width:200px;height:4px;-webkit-appearance:none;appearance:none;background:",f.border,";border-radius:2px;outline:none;&::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:",f.primary,";border-radius:50%;cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;background:",f.primary,";border-radius:50%;cursor:pointer;border:none;}",""),zoomValue:v("font-size:",F.sm,";color:",f.textSecondary,";min-width:45px;text-align:right;",""),hint:v("font-size:",F.xs,";color:",f.textMuted,";margin-top:8px;font-style:italic;",""),footer:v("display:flex;justify-content:flex-end;gap:12px;padding:16px 20px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:v("padding:10px 18px;font-size:",F.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;",""),btnCancel:v("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnSave:v("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),saving:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},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);}}"}},T2=[{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 D2({imagePath:i,imageSrc:u,dimensions:r,onClose:s,onSaveComplete:h,triggerRefresh:m}){const[y,z]=C.useState({x:0,y:0}),[M,g]=C.useState(1),[_,D]=C.useState(0),[B,I]=C.useState(null),[U,V]=C.useState(void 0),[$,J]=C.useState(r.width),[P,Z]=C.useState(r.height),[de,L]=C.useState(!1),re=C.useCallback((X,ue)=>{I(ue),J(Math.round(ue.width)),Z(Math.round(ue.height))},[]),W=()=>{D(X=>(X+90)%360)},K=()=>{D(X=>(X-90+360)%360)},j=X=>{V(X)},te=X=>{const ue=parseInt(X.target.value)||0;J(ue),U&&ue>0&&Z(Math.round(ue/U))},ve=X=>{const ue=parseInt(X.target.value)||0;Z(ue),U&&ue>0&&J(Math.round(ue*U))},ae=async()=>{if(B){L(!0);try{const ue=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:{x:Math.round(B.x),y:Math.round(B.y),width:Math.round(B.width),height:Math.round(B.height)},rotation:_,resize:{width:$,height:P}})})).json();ue.success?(m(),h(ue.updatedItem),s()):(console.error("Edit failed:",ue.error),alert(ue.error||"Failed to save image"))}catch(X){console.error("Edit error:",X),alert("An error occurred while saving the image")}finally{L(!1)}}};return c("div",{css:He.overlay,onClick:s,children:b("div",{css:He.modal,onClick:X=>X.stopPropagation(),children:[b("div",{css:He.header,children:[c("h2",{css:He.title,children:"Edit Image"}),c("button",{css:He.closeBtn,onClick:s,children:c("svg",{width:"20",height:"20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:He.body,children:[c("div",{css:He.cropperContainer,children:c(E2,{image:u,crop:y,zoom:M,rotation:_,aspect:U,onCropChange:z,onZoomChange:g,onCropComplete:re})}),b("div",{css:He.controls,children:[b("div",{css:He.controlRow,children:[c("span",{css:He.controlLabel,children:"Aspect Ratio"}),c("div",{css:He.aspectButtons,children:T2.map(X=>c("button",{css:[He.aspectBtn,U===X.value&&He.aspectBtnActive,"",""],onClick:()=>j(X.value),children:X.label},X.label))})]}),c("p",{css:He.hint,children:"Zoom in and drag to select crop area"}),b("div",{css:He.controlRow,children:[c("span",{css:He.controlLabel,children:"Zoom"}),c("input",{type:"range",css:He.zoomSlider,min:1,max:3,step:.1,value:M,onChange:X=>g(parseFloat(X.target.value))}),b("span",{css:He.zoomValue,children:[Math.round(M*100),"%"]})]}),b("div",{css:He.controlRow,children:[c("span",{css:He.controlLabel,children:"Rotation"}),b("div",{css:He.rotateButtons,children:[b("button",{css:He.rotateBtn,onClick:K,children:[c("svg",{css:He.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:He.rotateBtn,onClick:W,children:[c("svg",{css:He.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),b("span",{css:He.rotationDisplay,children:[_,"°"]})]}),b("div",{css:He.controlRow,children:[c("span",{css:He.controlLabel,children:"Output Size"}),b("div",{css:He.resizeInputs,children:[c("input",{type:"number",css:He.resizeInput,value:$,onChange:te,min:1}),c("span",{css:He.resizeX,children:"×"}),c("input",{type:"number",css:He.resizeInput,value:P,onChange:ve,min:1}),c("span",{css:He.resizeX,children:"px"})]})]})]})]}),b("div",{css:He.footer,children:[c("button",{css:[He.btn,He.btnCancel,"",""],onClick:s,disabled:de,children:"Cancel"}),c("button",{css:[He.btn,He.btnSave,"",""],onClick:ae,disabled:de,children:de?b("span",{css:He.saving,children:[c("span",{css:He.spinner}),"Saving..."]}):"Save Changes"})]})]})})}const _2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],k2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function O2(i){const u=i.toLowerCase().substring(i.lastIndexOf("."));return _2.includes(u)}function L2(i){const u=i.toLowerCase().substring(i.lastIndexOf("."));return k2.includes(u)}const ie={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:v("display:flex;flex:1;margin:24px;background:",f.surface,";border:1px solid ",f.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:v("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",f.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:v("position:relative;padding:8px;background:",f.surface,";border:1px solid ",f.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:",f.surfaceHover,";border-color:",f.borderHover,";}",""),copyIcon:v("width:20px;height:20px;color:",f.textSecondary,";",""),statusIcon:v("display:flex;align-items:center;justify-content:center;padding:8px;background:",f.surface,";border:1px solid ",f.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:v("padding:8px;background:",f.surface,";border:1px solid ",f.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:",f.surfaceHover,";border-color:",f.borderHover,";}",""),mainCloseIcon:v("width:20px;height:20px;color:",f.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:v("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",f.surface,";border-radius:12px;border:1px solid ",f.border,";",""),fileIcon:v("width:80px;height:80px;color:",f.textMuted,";margin-bottom:16px;",""),fileName:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),sidebar:v("width:280px;background:",f.surface,";border-left:1px solid ",f.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:v("padding:16px 20px;border-bottom:1px solid ",f.border,";",""),sidebarTitle:v("font-size:",F.base,";font-weight:600;color:",f.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:v("display:flex;justify-content:space-between;font-size:",F.sm,";",""),infoLabel:v("color:",f.textSecondary,";",""),infoValue:v("color:",f.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:v("color:",f.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:v("color:",f.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:v("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",f.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:v("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",F.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",f.text,";text-align:left;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:v("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.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 U2(){const{focusedItem:i,setFocusedItem:u,triggerRefresh:r,fileItems:s,requestDelete:h,requestMove:m,requestSync:y,requestDownload:z,requestProcess:M,setProcessMode:g,actionState:_}=Vl(),[D,B]=C.useState(!1),[I,U]=C.useState(!1),[V,$]=C.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[J,P]=C.useState(!1),[Z,de]=C.useState(null),[L,re]=C.useState(!1),[W,K]=C.useState(!1),[j,te]=C.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[ve,ae]=C.useState(!1),X=_.showProgress,ue=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,Le=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.cdnPushed||i.hasUpdate||!i.isRemote),k=Ye=>{u(Ye)};if(!i)return null;const q=O2(i.name),fe=L2(i.name),Ne="/"+i.path.replace(/^public\//,""),xe=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${Ne}`:Ne,S=typeof window<"u"?window.location.origin:"",N=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${Ne}`:`${S}${Ne}`,ee=()=>{u(null)},ce=()=>{navigator.clipboard.writeText(N),re(!0),setTimeout(()=>re(!1),1500)},Ce=async Ye=>{if(Ye&&Ye!==i.name){B(!1),U(!0),$({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const Me=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:Ye})});if(!Me.body)throw new Error("No response body");const _t=Me.body.getReader(),oe=new TextDecoder;let Yt="",Gt="";for(;;){const{done:we,value:et}=await _t.read();if(we)break;Yt+=oe.decode(et,{stream:!0});const Ze=Yt.split(`
178
+ `);Yt=Ze.pop()||"";for(const xt of Ze){if(!xt.startsWith("data: "))continue;const it=JSON.parse(xt.slice(6));it.type==="start"?$({current:0,total:it.total,percent:0,status:"processing",message:it.message}):it.type==="progress"?$({current:it.current,total:it.total,percent:Math.round(it.current/it.total*100),status:"processing",message:it.message}):it.type==="complete"?(Gt=it.newPath,$({current:it.renamed,total:it.renamed,percent:100,status:"complete",message:"Renamed successfully"})):it.type==="error"&&($(Cn=>({...Cn,status:"error",message:it.message})),de({title:"Rename Failed",message:it.message}))}}Gt&&(u({...i,path:Gt,name:Gt.split("/").pop()||Ye}),r())}catch(Me){console.error("Rename error:",Me),$(_t=>({..._t,status:"error",message:"Failed to rename"})),de({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},ke=async()=>{if(i){K(!0),te({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const Ye=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!Ye.ok){const oe=await Ye.json();te({current:0,total:3,percent:0,status:"error",message:oe.error||"Failed to generate favicons"});return}const Me=Ye.body?.getReader(),_t=new TextDecoder;if(Me){let oe="";for(;;){const{done:Yt,value:Gt}=await Me.read();if(Yt)break;oe+=_t.decode(Gt,{stream:!0});const we=oe.split(`
179
+ `);oe=we.pop()||"";for(const et of we)if(et.startsWith("data: "))try{const Ze=JSON.parse(et.slice(6));Ze.type==="start"?te(xt=>({...xt,total:Ze.total})):Ze.type==="progress"?te({current:Ze.current,total:Ze.total,percent:Ze.percent,status:"processing",message:Ze.message}):Ze.type==="complete"?te({current:Ze.processed,total:Ze.processed,percent:100,status:Ze.errors>0?"error":"complete",message:Ze.message}):Ze.type==="error"&&te(xt=>({...xt,status:"error",message:Ze.message}))}catch{}}}}catch(Ye){console.error("Favicon generation error:",Ye),te({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Be=()=>q?c("img",{css:ie.image,src:xe,alt:i.name}):fe?c("video",{css:ie.video,src:xe,controls:!0}):b("div",{css:ie.filePlaceholder,children:[c("svg",{css:ie.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("p",{css:ie.fileName,children:i.name})]});return b(ct,{children:[Z&&c(Kp,{title:Z.title,message:Z.message,onClose:()=>de(null)}),c(Wp,{isOpen:J,onClose:()=>P(!1)}),D&&c(zr,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Ce,onCancel:()=>B(!1)}),I&&c(nl,{title:"Renaming",progress:V,onClose:()=>{U(!1),r()}}),W&&c(nl,{title:"Generating Favicons",progress:j,onClose:()=>K(!1)}),c("div",{css:ie.overlay,onClick:ee,children:b("div",{css:ie.container,onClick:Ye=>Ye.stopPropagation(),children:[b("div",{css:ie.main,children:[b("div",{css:ie.headerButtons,children:[i.cdnPushed&&!i.isRemote&&c("span",{css:ie.statusIcon,title:"Pushed to CDN",children:c("svg",{css:ie.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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&&c("span",{css:ie.statusIcon,title:"Remote image",children:c("svg",{css:ie.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:ie.copyBtn,onClick:ce,title:"Copy file path",children:[L&&c("span",{css:ie.tooltip,children:"Copied!"}),c("svg",{css:ie.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})})]}),c("button",{css:ie.mainCloseBtn,onClick:ee,"aria-label":"Close",children:c("svg",{css:ie.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),c("div",{css:ie.mediaWrapper,children:Be()})]}),b("div",{css:ie.sidebar,children:[c("div",{css:ie.sidebarHeader,children:c("h3",{css:ie.sidebarTitle,children:"Details"})}),b("div",{css:ie.sidebarContent,children:[b("div",{css:ie.info,children:[b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"Name"}),c("span",{css:ie.infoValueWrap,children:i.name})]}),b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"Path"}),c("span",{css:ie.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"Size"}),c("span",{css:ie.infoValue,children:N2(i.size)})]}),i.dimensions&&b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"Dimensions"}),b("span",{css:ie.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"Thumbnails"}),c("span",{css:ie.infoValue,children:b("span",{css:ie.thumbChips,children:[i.hasSm&&c("span",{css:ie.thumbChip,children:"SM"}),i.hasMd&&c("span",{css:ie.thumbChip,children:"MD"}),i.hasLg&&c("span",{css:ie.thumbChip,children:"LG"}),i.hasFull&&c("span",{css:ie.thumbChip,children:"FULL"})]})})]}),b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"CDN Status"}),c("span",{css:ie.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:ie.infoRow,children:[c("span",{css:ie.infoLabel,children:"URL"}),c("a",{href:N,target:"_blank",rel:"noopener noreferrer",css:ie.infoLink,title:N,children:N})]})]}),b("div",{css:ie.actions,children:[b("button",{css:ie.actionBtn,onClick:()=>B(!0),disabled:i.isProtected,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),q&&b("button",{css:ie.actionBtn,onClick:()=>ae(!0),disabled:X||!Le,title:Le?void 0:"Download image first to edit",children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),b("button",{css:ie.actionBtn,onClick:()=>m([i.path]),disabled:X||i.isProtected,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[ie.actionBtn,ie.actionBtnCloud,"",""],onClick:()=>y([i.path],s),disabled:X||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[ie.actionBtn,ie.actionBtnCloud,"",""],onClick:()=>z([i.path],s),disabled:X||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:ie.actionBtn,onClick:()=>{g("generate"),M([i.path])},disabled:X||i.isProtected,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:ie.actionBtn,onClick:()=>{g("remove"),M([i.path])},disabled:X||i.isProtected,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]}),ue&&b("button",{css:ie.actionBtn,onClick:ke,disabled:W||i.isProtected,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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:[ie.actionBtn,ie.actionBtnDanger,"",""],onClick:()=>h([i.path]),disabled:X||i.isProtected,children:[c("svg",{css:ie.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"]})]})]})]})]})}),ve&&i.dimensions&&c(D2,{imagePath:i.path,imageSrc:xe,dimensions:i.dimensions,onClose:()=>ae(!1),onSaveComplete:k,triggerRefresh:r})]})}function N2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const tl={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:v("background:",f.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:v("width:24px;height:24px;color:",f.danger,";flex-shrink:0;",""),title:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),message:v("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:v("width:100%;padding:10px 16px;border-radius:6px;font-size:",F.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}","")};function H2(){const{error:i,clearError:u}=Vl();return i?c("div",{css:tl.overlay,onClick:u,children:b("div",{css:tl.modal,onClick:r=>r.stopPropagation(),children:[b("div",{css:tl.header,children:[c("svg",{css:tl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("h3",{css:tl.title,children:i.title})]}),c("p",{css:tl.message,children:i.message}),c("button",{css:tl.button,onClick:u,children:"OK"})]})}):null}const kp={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 B2({triggerRefresh:i,clearSelection:u,setFocusedItem:r,showError:s}){const[h,m]=C.useState(kp),y=C.useCallback(K=>{m(j=>({...j,progressState:typeof K=="function"?K(j.progressState):{...j.progressState,...K}}))},[]),z=C.useCallback(K=>{m(j=>({...j,showProgress:K}))},[]),M=C.useCallback(K=>{m(j=>({...j,progressTitle:K}))},[]),g=Fp({setShowProgress:z,setProgressTitle:M,setProgressState:y,triggerRefresh:i}),_=C.useCallback(K=>{m(j=>({...j,actionPaths:K,showDeleteConfirm:!0}))},[]),D=C.useCallback(K=>{m(j=>({...j,actionPaths:K,showMoveModal:!0}))},[]),B=C.useCallback((K,j)=>{const te=K.map(X=>"/"+X.replace(/^public\//,""));let ve=!1,ae=!1;for(const X of K){const ue=j.find(Le=>Le.path===X);ue&&(ue.isRemote?ve=!0:ue.cdnPushed||(ae=!0))}m(X=>({...X,actionPaths:K,syncImageCount:te.length,syncHasRemote:ve,syncHasLocal:ae,showSyncConfirm:!0}))},[]),I=C.useCallback((K,j)=>{const te=[];for(const ve of K){const ae=j.find(X=>X.path===ve);ae&&ae.cdnPushed&&!ae.isRemote&&te.push(ve)}m(ve=>({...ve,actionPaths:te,downloadImageCount:te.length,downloadTotalSelected:K.length,showDownloadConfirm:!0}))},[]),U=C.useCallback(K=>{m(j=>({...j,actionPaths:K,showProcessConfirm:!0}))},[]),V=C.useCallback(K=>{m(j=>({...j,processMode:K}))},[]),$=C.useCallback(()=>{m(K=>({...K,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),J=C.useCallback(()=>{m(kp)},[]),P=C.useCallback(()=>{g.stop()},[g]),Z=C.useCallback(async()=>{const K=h.actionPaths;m(j=>({...j,showDeleteConfirm:!1}));try{const j=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:K})});if(j.ok)u(),r(null),i();else{const te=await j.json();s("Delete Failed",te.error||"Unknown error")}}catch(j){console.error("Delete error:",j),s("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,u,r,i,s]),de=C.useCallback(async K=>{const j=h.actionPaths;m(te=>({...te,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:j,destination:K},title:"Moving Files",onComplete:te=>{te.errors&&te.errors>0&&te.errorMessages?.length&&s("Move Failed",te.errorMessages.join(`
180
+ `)),u(),r(null)}})},[h.actionPaths,u,r,s,g]),L=C.useCallback(async()=>{const j=h.actionPaths.map(ae=>"/"+ae.replace(/^public\//,""));m(ae=>({...ae,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:j.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let te=0;const ve=[];for(let ae=0;ae<j.length;ae++){const X=j[ae];try{const ue=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[X]})});if(ue.ok)te++;else{const Le=await ue.json();ve.push(`${X}: ${Le.error||"Unknown error"}`)}}catch(ue){ve.push(`${X}: ${ue instanceof Error?ue.message:"Unknown error"}`)}y({current:ae+1,total:j.length,percent:Math.round((ae+1)/j.length*100),status:"processing",message:`Pushed ${X}`})}y({current:j.length,total:j.length,percent:100,status:ve.length>0?"error":"complete",message:`Pushed ${te} file${te!==1?"s":""}${ve.length>0?`, ${ve.length} error${ve.length!==1?"s":""}`:""}`}),ve.length>0&&s("Push Errors",ve.join(`
181
+ `)),u(),i()},[h.actionPaths,u,i,s,y]),re=C.useCallback(async()=>{const K=h.actionPaths,j=h.processMode,te=K.map(ue=>{const Le=ue.replace(/^public\//,"");return Le.startsWith("/")?Le:`/${Le}`}),ve=j==="remove",ae=ve?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",X=ve?"Removing Thumbnails":"Generating Thumbnails";m(ue=>({...ue,showProcessConfirm:!1})),await g.execute({endpoint:ae,body:{imageKeys:te},title:X})},[h.actionPaths,h.processMode,g]),W=C.useCallback(async()=>{const K=h.progressState.orphanedFiles;if(!(!K||K.length===0))try{const j=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:K})});if(j.ok)y(te=>({...te,orphanedFiles:void 0,message:te.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const te=await j.json();s("Delete Failed",te.error||"Failed to delete orphaned files")}}catch(j){console.error("Delete orphans error:",j),s("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,s,y]);return{actionState:h,setActionState:m,requestDelete:_,requestMove:D,requestSync:B,requestDownload:I,requestProcess:U,setProcessMode:V,cancelAction:$,closeProgress:J,stopProcessing:P,confirmDelete:Z,confirmMove:de,confirmSync:L,confirmProcess:re,deleteOrphans:W}}const j2="36px",Dt={container:v(Ql," display:flex;flex-direction:column;height:100%;background:",f.background,";",""),header:v("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",f.surface,";border-bottom:1px solid ",f.border,";position:relative;",""),title:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;flex-shrink:0;",""),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:v("display:flex;align-items:center;gap:6px;font-size:",F.base,";color:",f.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:v("color:",f.border,";flex-shrink:0;",""),breadcrumbItem:v("color:",f.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",f.primary,";}",""),breadcrumbCurrent:v("color:",f.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:v("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",f.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",f.text,";background:",f.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:v("height:",j2,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),headerIcon:v("width:16px;height:16px;color:",f.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:v("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",f.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:v("display:flex;flex-direction:column;align-items:center;gap:12px;color:",f.primary,";font-size:",F.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function q2({onClose:i,isVisible:u=!0,standaloneMode:r=!1,workspacePath:s,siteUrl:h}){const m=i||(()=>{}),[y,z]=C.useState("public"),[M,g]=C.useState(new Set),[_,D]=C.useState(null),[B,I]=C.useState("grid"),[U,V]=C.useState(null),[$,J]=C.useState(null),[P,Z]=C.useState(!1),[de,L]=C.useState(0),[re,W]=C.useState(!1),[K,j]=C.useState(""),[te,ve]=C.useState(null),[ae,X]=C.useState([]),[ue,Le]=C.useState(!1),k=C.useCallback(()=>{L(we=>we+1)},[]);C.useEffect(()=>{if(U&&ae.length>0){const we=ae.find(et=>et.path===U.path);we&&JSON.stringify(we)!==JSON.stringify(U)&&V(we)}},[ae,U]);const q=C.useCallback(()=>{W(!0)},[]),fe=C.useCallback(()=>{W(!1)},[]),Ne=C.useCallback((we,et)=>{ve({title:we,message:et})},[]),xe=C.useCallback(()=>{ve(null)},[]),S=C.useCallback(we=>{we.preventDefault(),we.stopPropagation(),Le(!0)},[]),N=C.useCallback(we=>{we.preventDefault(),we.stopPropagation(),Le(!1)},[]),ee=C.useCallback(async we=>{we.preventDefault(),we.stopPropagation(),Le(!1);const et=Array.from(we.dataTransfer.files);if(et.length!==0&&!(y==="public/images"||y.startsWith("public/images/"))){for(const Ze of et){const xt=new FormData;xt.append("file",Ze),xt.append("path",y);try{await fetch("/api/studio/upload",{method:"POST",body:xt})}catch(it){console.error("Upload error:",it)}}k()}},[y,k]),ce=C.useCallback(()=>{if(y==="public")return;const we=y.split("/");we.pop(),z(we.join("/")||"public"),g(new Set)},[y]),Ce=C.useCallback(we=>{z(we),g(new Set),V(null)},[]),ke=C.useCallback(we=>{g(et=>{const Ze=new Set(et);return Ze.has(we)?Ze.delete(we):Ze.add(we),Ze}),D(we)},[]),Be=C.useCallback((we,et,Ze)=>{const xt=Ze.findIndex(dn=>dn.path===we),it=Ze.findIndex(dn=>dn.path===et);if(xt===-1||it===-1)return;const Cn=Math.min(xt,it),ka=Math.max(xt,it);g(dn=>{const Kl=new Set(dn);for(let al=Cn;al<=ka;al++)Kl.add(Ze[al].path);return Kl}),D(et)},[]),Ye=C.useCallback(we=>{g(new Set(we.map(et=>et.path)))},[]),Me=C.useCallback(()=>{g(new Set)},[]),_t=C.useCallback(we=>{V(we)},[]),oe=B2({triggerRefresh:k,clearSelection:Me,setFocusedItem:_t,showError:Ne}),Yt=C.useCallback(we=>{if(we.key==="Escape"){const et=we.target;if(et.tagName==="INPUT"||et.tagName==="TEXTAREA")return;U?V(null):r||m()}},[m,U,r]);C.useEffect(()=>(u&&(document.addEventListener("keydown",Yt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Yt),document.body.style.overflow=""}),[Yt,u]);const Gt={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:y,setCurrentPath:Ce,navigateUp:ce,selectedItems:M,toggleSelection:ke,selectRange:Be,selectAll:Ye,clearSelection:Me,lastSelectedPath:_,viewMode:B,setViewMode:I,focusedItem:U,setFocusedItem:V,meta:$,setMeta:J,isLoading:P,setIsLoading:Z,refreshKey:de,triggerRefresh:k,scanRequested:re,triggerScan:q,clearScanRequest:fe,searchQuery:K,setSearchQuery:j,error:te,showError:Ne,clearError:xe,fileItems:ae,setFileItems:X,actionState:oe.actionState,requestDelete:oe.requestDelete,requestMove:oe.requestMove,requestSync:oe.requestSync,requestDownload:oe.requestDownload,requestProcess:oe.requestProcess,setProcessMode:oe.setProcessMode,confirmDelete:oe.confirmDelete,confirmMove:oe.confirmMove,confirmSync:oe.confirmSync,confirmProcess:oe.confirmProcess,cancelAction:oe.cancelAction,closeProgress:oe.closeProgress,stopProcessing:oe.stopProcessing,deleteOrphans:oe.deleteOrphans};return c(Qp.Provider,{value:Gt,children:b("div",{css:Dt.container,children:[b("div",{css:Dt.header,children:[c("div",{css:Dt.headerLeft,children:c("h1",{css:Dt.title,children:"gallop.studio"})}),c("div",{css:Dt.headerCenter,children:c(X2,{currentPath:y,onNavigate:Ce,projectName:s?s.split("/").pop():void 0})}),b("div",{css:Dt.headerActions,children:[h&&c("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Dt.headerIconBtn,title:`Open ${h}`,children:c(Z2,{})}),!r&&c("button",{css:Dt.headerBtn,onClick:m,"aria-label":"Close Studio",children:c(Q2,{})})]})]}),c(D1,{}),b("div",{css:Dt.content,onDragOver:S,onDragLeave:N,onDrop:ee,children:[ue&&c("div",{css:Dt.dropOverlay,children:b("div",{css:Dt.dropMessage,children:[c("svg",{css:Dt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("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"})}),c("span",{children:"Drop files to upload"})]})}),c("div",{css:Dt.fileBrowser,children:B==="grid"?c($1,{}):c(n2,{})})]}),U&&c(U2,{}),c(H2,{}),oe.actionState.showDeleteConfirm&&c(Jo,{title:"Delete Files",message:`Are you sure you want to delete ${oe.actionState.actionPaths.length} item${oe.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:oe.confirmDelete,onCancel:oe.cancelAction}),oe.actionState.showSyncConfirm&&c(Jo,{title:"Push to CDN",message:`Push ${oe.actionState.syncImageCount} image${oe.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${oe.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${oe.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:oe.confirmSync,onCancel:oe.cancelAction}),oe.actionState.showProcessConfirm&&c(V2,{imageCount:oe.actionState.actionPaths.length,mode:oe.actionState.processMode,onConfirm:oe.confirmProcess,onCancel:oe.cancelAction}),oe.actionState.showMoveModal&&c(Jp,{selectedItems:new Set(oe.actionState.actionPaths),currentPath:y,onMove:we=>oe.confirmMove(we),onCancel:oe.cancelAction}),oe.actionState.showProgress&&c(nl,{title:oe.actionState.progressTitle,progress:oe.actionState.progressState,onStop:oe.stopProcessing,onDeleteOrphans:oe.deleteOrphans,onClose:oe.closeProgress})]})})}var Y2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},G2={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 V2({imageCount:i,mode:u,onConfirm:r,onCancel:s}){const h={overlay:G2,container:v("background:",f.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:v("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0 0 16px;",""),message:v("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:Y2,cancelBtn:v("padding:10px 20px;border:1px solid ",f.border,";border-radius:8px;background:",f.background,";color:",f.text,";font-size:",F.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";}",""),confirmBtn:v("padding:10px 20px;border:none;border-radius:8px;background:",f.primary,";color:white;font-size:",F.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.primaryHover,";}",""),confirmBtnDanger:v("background:",f.danger,";&:hover{background:#dc2626;}","")},m=u==="remove",y=m?"Remove Thumbnails":"Generate Thumbnails",z=m?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,M=m?"Remove":"Generate";return c("div",{css:h.overlay,onClick:s,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[c("h2",{css:h.title,children:y}),c("p",{css:h.message,children:z}),b("div",{css:h.actions,children:[c("button",{css:h.cancelBtn,onClick:s,children:"Cancel"}),c("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:r,children:M})]})]})})}function X2({currentPath:i,onNavigate:u,projectName:r}){const s=i.split("/").filter(Boolean),h=s.map((m,y)=>({name:y===0&&m==="public"&&r?r:m,path:s.slice(0,y+1).join("/")}));return c("div",{css:Dt.breadcrumbs,children:h.map((m,y)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[y>0&&c("span",{css:Dt.breadcrumbSeparator,children:"/"}),y===h.length-1?c("span",{css:Dt.breadcrumbCurrent,children:m.name}):c("span",{css:Dt.breadcrumbItem,onClick:()=>u(m.path),children:m.name})]},m.path))})}function Z2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"10"}),c("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),c("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 Q2(){return b("svg",{css:Dt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Pp=document.getElementById("root");if(!Pp)throw new Error("Root element not found");const K2=window.__STUDIO_WORKSPACE__||"Unknown",F2=window.__STUDIO_SITE_URL__||"";f1.createRoot(Pp).render(c(C.StrictMode,{children:c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:c(q2,{isVisible:!0,standaloneMode:!0,workspacePath:K2,siteUrl:F2})})}));