@gallop.software/studio 2.3.26 → 2.3.28

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,79 @@
1
+ function Nm(o,s){for(var h=0;h<s.length;h++){const u=s[h];if(typeof u!="string"&&!Array.isArray(u)){for(const p in u)if(p!=="default"&&!(p in o)){const g=Object.getOwnPropertyDescriptor(u,p);g&&Object.defineProperty(o,p,g.get?g:{enumerable:!0,get:()=>u[p]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const g of p)if(g.type==="childList")for(const k of g.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&u(k)}).observe(document,{childList:!0,subtree:!0});function h(p){const g={};return p.integrity&&(g.integrity=p.integrity),p.referrerPolicy&&(g.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?g.credentials="include":p.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function u(p){if(p.ep)return;p.ep=!0;const g=h(p);fetch(p.href,g)}})();function Bm(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ks={exports:{}},Oi={};var q0;function jm(){if(q0)return Oi;q0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(u,p,g){var k=null;if(g!==void 0&&(k=""+g),p.key!==void 0&&(k=""+p.key),"key"in p){g={};for(var R in p)R!=="key"&&(g[R]=p[R])}else g=p;return p=g.ref,{$$typeof:o,type:u,key:k,ref:p!==void 0?p:null,props:g}}return Oi.Fragment=s,Oi.jsx=h,Oi.jsxs=h,Oi}var Y0;function qm(){return Y0||(Y0=1,ks.exports=jm()),ks.exports}var Hi=qm(),_s={exports:{}},ke={};var G0;function Ym(){if(G0)return ke;G0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),K=Symbol.iterator;function le(y){return y===null||typeof y!="object"?null:(y=K&&y[K]||y["@@iterator"],typeof y=="function"?y:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,ge={};function I(y,_,Q){this.props=y,this.context=_,this.refs=ge,this.updater=Q||U}I.prototype.isReactComponent={},I.prototype.setState=function(y,_){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,_,"setState")},I.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function de(){}de.prototype=I.prototype;function te(y,_,Q){this.props=y,this.context=_,this.refs=ge,this.updater=Q||U}var ne=te.prototype=new de;ne.constructor=te,X(ne,I.prototype),ne.isPureReactComponent=!0;var D=Array.isArray;function V(){}var Y={H:null,A:null,T:null,S:null},xe=Object.prototype.hasOwnProperty;function Le(y,_,Q){var q=Q.ref;return{$$typeof:o,type:y,key:_,ref:q!==void 0?q:null,props:Q}}function Oe(y,_){return Le(y.type,_,y.props)}function Be(y){return typeof y=="object"&&y!==null&&y.$$typeof===o}function Ne(y){var _={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(Q){return _[Q]})}var Fe=/\/+/g;function We(y,_){return typeof y=="object"&&y!==null&&y.key!=null?Ne(""+y.key):_.toString(36)}function _e(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(V,V):(y.status="pending",y.then(function(_){y.status==="pending"&&(y.status="fulfilled",y.value=_)},function(_){y.status==="pending"&&(y.status="rejected",y.reason=_)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function A(y,_,Q,q,ve){var oe=typeof y;(oe==="undefined"||oe==="boolean")&&(y=null);var Ce=!1;if(y===null)Ce=!0;else switch(oe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(y.$$typeof){case o:case s:Ce=!0;break;case G:return Ce=y._init,A(Ce(y._payload),_,Q,q,ve)}}if(Ce)return ve=ve(y),Ce=q===""?"."+We(y,0):q,D(ve)?(Q="",Ce!=null&&(Q=Ce.replace(Fe,"$&/")+"/"),A(ve,_,Q,"",function(Sn){return Sn})):ve!=null&&(Be(ve)&&(ve=Oe(ve,Q+(ve.key==null||y&&y.key===ve.key?"":(""+ve.key).replace(Fe,"$&/")+"/")+Ce)),_.push(ve)),1;Ce=0;var ot=q===""?".":q+":";if(D(y))for(var at=0;at<y.length;at++)q=y[at],oe=ot+We(q,at),Ce+=A(q,_,Q,oe,ve);else if(at=le(y),typeof at=="function")for(y=at.call(y),at=0;!(q=y.next()).done;)q=q.value,oe=ot+We(q,at++),Ce+=A(q,_,Q,oe,ve);else if(oe==="object"){if(typeof y.then=="function")return A(_e(y),_,Q,q,ve);throw _=String(y),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function j(y,_,Q){if(y==null)return y;var q=[],ve=0;return A(y,q,"","",function(oe){return _.call(Q,oe,ve++)}),q}function P(y){if(y._status===-1){var _=y._result;_=_(),_.then(function(Q){(y._status===0||y._status===-1)&&(y._status=1,y._result=Q)},function(Q){(y._status===0||y._status===-1)&&(y._status=2,y._result=Q)}),y._status===-1&&(y._status=0,y._result=_)}if(y._status===1)return y._result.default;throw y._result}var ie=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},ye={map:j,forEach:function(y,_,Q){j(y,function(){_.apply(this,arguments)},Q)},count:function(y){var _=0;return j(y,function(){_++}),_},toArray:function(y){return j(y,function(_){return _})||[]},only:function(y){if(!Be(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return ke.Activity=B,ke.Children=ye,ke.Component=I,ke.Fragment=h,ke.Profiler=p,ke.PureComponent=te,ke.StrictMode=u,ke.Suspense=L,ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,ke.__COMPILER_RUNTIME={__proto__:null,c:function(y){return Y.H.useMemoCache(y)}},ke.cache=function(y){return function(){return y.apply(null,arguments)}},ke.cacheSignal=function(){return null},ke.cloneElement=function(y,_,Q){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var q=X({},y.props),ve=y.key;if(_!=null)for(oe in _.key!==void 0&&(ve=""+_.key),_)!xe.call(_,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&_.ref===void 0||(q[oe]=_[oe]);var oe=arguments.length-2;if(oe===1)q.children=Q;else if(1<oe){for(var Ce=Array(oe),ot=0;ot<oe;ot++)Ce[ot]=arguments[ot+2];q.children=Ce}return Le(y.type,ve,q)},ke.createContext=function(y){return y={$$typeof:k,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:g,_context:y},y},ke.createElement=function(y,_,Q){var q,ve={},oe=null;if(_!=null)for(q in _.key!==void 0&&(oe=""+_.key),_)xe.call(_,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(ve[q]=_[q]);var Ce=arguments.length-2;if(Ce===1)ve.children=Q;else if(1<Ce){for(var ot=Array(Ce),at=0;at<Ce;at++)ot[at]=arguments[at+2];ve.children=ot}if(y&&y.defaultProps)for(q in Ce=y.defaultProps,Ce)ve[q]===void 0&&(ve[q]=Ce[q]);return Le(y,oe,ve)},ke.createRef=function(){return{current:null}},ke.forwardRef=function(y){return{$$typeof:R,render:y}},ke.isValidElement=Be,ke.lazy=function(y){return{$$typeof:G,_payload:{_status:-1,_result:y},_init:P}},ke.memo=function(y,_){return{$$typeof:S,type:y,compare:_===void 0?null:_}},ke.startTransition=function(y){var _=Y.T,Q={};Y.T=Q;try{var q=y(),ve=Y.S;ve!==null&&ve(Q,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(V,ie)}catch(oe){ie(oe)}finally{_!==null&&Q.types!==null&&(_.types=Q.types),Y.T=_}},ke.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},ke.use=function(y){return Y.H.use(y)},ke.useActionState=function(y,_,Q){return Y.H.useActionState(y,_,Q)},ke.useCallback=function(y,_){return Y.H.useCallback(y,_)},ke.useContext=function(y){return Y.H.useContext(y)},ke.useDebugValue=function(){},ke.useDeferredValue=function(y,_){return Y.H.useDeferredValue(y,_)},ke.useEffect=function(y,_){return Y.H.useEffect(y,_)},ke.useEffectEvent=function(y){return Y.H.useEffectEvent(y)},ke.useId=function(){return Y.H.useId()},ke.useImperativeHandle=function(y,_,Q){return Y.H.useImperativeHandle(y,_,Q)},ke.useInsertionEffect=function(y,_){return Y.H.useInsertionEffect(y,_)},ke.useLayoutEffect=function(y,_){return Y.H.useLayoutEffect(y,_)},ke.useMemo=function(y,_){return Y.H.useMemo(y,_)},ke.useOptimistic=function(y,_){return Y.H.useOptimistic(y,_)},ke.useReducer=function(y,_,Q){return Y.H.useReducer(y,_,Q)},ke.useRef=function(y){return Y.H.useRef(y)},ke.useState=function(y){return Y.H.useState(y)},ke.useSyncExternalStore=function(y,_,Q){return Y.H.useSyncExternalStore(y,_,Q)},ke.useTransition=function(){return Y.H.useTransition()},ke.version="19.2.4",ke}var V0;function Qs(){return V0||(V0=1,_s.exports=Ym()),_s.exports}var M=Qs();const uh=Bm(M),X0=Nm({__proto__:null,default:uh},[M]);function Gm(o){if(o.sheet)return o.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===o)return document.styleSheets[s]}function Vm(o){var s=document.createElement("style");return s.setAttribute("data-emotion",o.key),o.nonce!==void 0&&s.setAttribute("nonce",o.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var Xm=(function(){function o(h){var u=this;this._insertTag=function(p){var g;u.tags.length===0?u.insertionPoint?g=u.insertionPoint.nextSibling:u.prepend?g=u.container.firstChild:g=u.before:g=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(p,g),u.tags.push(p)},this.isSpeedy=h.speedy===void 0?!0:h.speedy,this.tags=[],this.ctr=0,this.nonce=h.nonce,this.key=h.key,this.container=h.container,this.prepend=h.prepend,this.insertionPoint=h.insertionPoint,this.before=null}var s=o.prototype;return s.hydrate=function(u){u.forEach(this._insertTag)},s.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Vm(this));var p=this.tags[this.tags.length-1];if(this.isSpeedy){var g=Gm(p);try{g.insertRule(u,g.cssRules.length)}catch{}}else p.appendChild(document.createTextNode(u));this.ctr++},s.flush=function(){this.tags.forEach(function(u){var p;return(p=u.parentNode)==null?void 0:p.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Nt="-ms-",fr="-moz-",Ke="-webkit-",fh="comm",Zs="rule",Ks="decl",Qm="@import",dh="@keyframes",Zm="@layer",Km=Math.abs,dr=String.fromCharCode,Jm=Object.assign;function Fm(o,s){return Lt(o,0)^45?(((s<<2^Lt(o,0))<<2^Lt(o,1))<<2^Lt(o,2))<<2^Lt(o,3):0}function hh(o){return o.trim()}function $m(o,s){return(o=s.exec(o))?o[0]:o}function Je(o,s,h){return o.replace(s,h)}function Ys(o,s){return o.indexOf(s)}function Lt(o,s){return o.charCodeAt(s)|0}function Ni(o,s,h){return o.slice(s,h)}function On(o){return o.length}function Js(o){return o.length}function rr(o,s){return s.push(o),o}function Wm(o,s){return o.map(s).join("")}var hr=1,ja=1,ph=0,Wt=0,wt=0,Ya="";function pr(o,s,h,u,p,g,k){return{value:o,root:s,parent:h,type:u,props:p,children:g,line:hr,column:ja,length:k,return:""}}function Ri(o,s){return Jm(pr("",null,null,"",null,null,0),o,{length:-o.length},s)}function Im(){return wt}function Pm(){return wt=Wt>0?Lt(Ya,--Wt):0,ja--,wt===10&&(ja=1,hr--),wt}function cn(){return wt=Wt<ph?Lt(Ya,Wt++):0,ja++,wt===10&&(ja=1,hr++),wt}function Ln(){return Lt(Ya,Wt)}function cr(){return Wt}function qi(o,s){return Ni(Ya,o,s)}function Bi(o){switch(o){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 mh(o){return hr=ja=1,ph=On(Ya=o),Wt=0,[]}function gh(o){return Ya="",o}function sr(o){return hh(qi(Wt-1,Gs(o===91?o+2:o===40?o+1:o)))}function e1(o){for(;(wt=Ln())&&wt<33;)cn();return Bi(o)>2||Bi(wt)>3?"":" "}function t1(o,s){for(;--s&&cn()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return qi(o,cr()+(s<6&&Ln()==32&&cn()==32))}function Gs(o){for(;cn();)switch(wt){case o:return Wt;case 34:case 39:o!==34&&o!==39&&Gs(wt);break;case 40:o===41&&Gs(o);break;case 92:cn();break}return Wt}function n1(o,s){for(;cn()&&o+wt!==57;)if(o+wt===84&&Ln()===47)break;return"/*"+qi(s,Wt-1)+"*"+dr(o===47?o:cn())}function l1(o){for(;!Bi(Ln());)cn();return qi(o,Wt)}function a1(o){return gh(ur("",null,null,null,[""],o=mh(o),0,[0],o))}function ur(o,s,h,u,p,g,k,R,L){for(var S=0,G=0,B=k,K=0,le=0,U=0,X=1,ge=1,I=1,de=0,te="",ne=p,D=g,V=u,Y=te;ge;)switch(U=de,de=cn()){case 40:if(U!=108&&Lt(Y,B-1)==58){Ys(Y+=Je(sr(de),"&","&\f"),"&\f")!=-1&&(I=-1);break}case 34:case 39:case 91:Y+=sr(de);break;case 9:case 10:case 13:case 32:Y+=e1(U);break;case 92:Y+=t1(cr()-1,7);continue;case 47:switch(Ln()){case 42:case 47:rr(i1(n1(cn(),cr()),s,h),L);break;default:Y+="/"}break;case 123*X:R[S++]=On(Y)*I;case 125*X:case 59:case 0:switch(de){case 0:case 125:ge=0;case 59+G:I==-1&&(Y=Je(Y,/\f/g,"")),le>0&&On(Y)-B&&rr(le>32?Z0(Y+";",u,h,B-1):Z0(Je(Y," ","")+";",u,h,B-2),L);break;case 59:Y+=";";default:if(rr(V=Q0(Y,s,h,S,G,p,R,te,ne=[],D=[],B),g),de===123)if(G===0)ur(Y,s,V,V,ne,g,B,R,D);else switch(K===99&&Lt(Y,3)===110?100:K){case 100:case 108:case 109:case 115:ur(o,V,V,u&&rr(Q0(o,V,V,0,0,p,R,te,p,ne=[],B),D),p,D,B,R,u?ne:D);break;default:ur(Y,V,V,V,[""],D,0,R,D)}}S=G=le=0,X=I=1,te=Y="",B=k;break;case 58:B=1+On(Y),le=U;default:if(X<1){if(de==123)--X;else if(de==125&&X++==0&&Pm()==125)continue}switch(Y+=dr(de),de*X){case 38:I=G>0?1:(Y+="\f",-1);break;case 44:R[S++]=(On(Y)-1)*I,I=1;break;case 64:Ln()===45&&(Y+=sr(cn())),K=Ln(),G=B=On(te=Y+=l1(cr())),de++;break;case 45:U===45&&On(Y)==2&&(X=0)}}return g}function Q0(o,s,h,u,p,g,k,R,L,S,G){for(var B=p-1,K=p===0?g:[""],le=Js(K),U=0,X=0,ge=0;U<u;++U)for(var I=0,de=Ni(o,B+1,B=Km(X=k[U])),te=o;I<le;++I)(te=hh(X>0?K[I]+" "+de:Je(de,/&\f/g,K[I])))&&(L[ge++]=te);return pr(o,s,h,p===0?Zs:R,L,S,G)}function i1(o,s,h){return pr(o,s,h,fh,dr(Im()),Ni(o,2,-2),0)}function Z0(o,s,h,u){return pr(o,s,h,Ks,Ni(o,0,u),Ni(o,u+1,-1),u)}function Ba(o,s){for(var h="",u=Js(o),p=0;p<u;p++)h+=s(o[p],p,o,s)||"";return h}function o1(o,s,h,u){switch(o.type){case Zm:if(o.children.length)break;case Qm:case Ks:return o.return=o.return||o.value;case fh:return"";case dh:return o.return=o.value+"{"+Ba(o.children,u)+"}";case Zs:o.value=o.props.join(",")}return On(h=Ba(o.children,u))?o.return=o.value+"{"+h+"}":""}function r1(o){var s=Js(o);return function(h,u,p,g){for(var k="",R=0;R<s;R++)k+=o[R](h,u,p,g)||"";return k}}function c1(o){return function(s){s.root||(s=s.return)&&o(s)}}function s1(o){var s=Object.create(null);return function(h){return s[h]===void 0&&(s[h]=o(h)),s[h]}}var u1=function(s,h,u){for(var p=0,g=0;p=g,g=Ln(),p===38&&g===12&&(h[u]=1),!Bi(g);)cn();return qi(s,Wt)},f1=function(s,h){var u=-1,p=44;do switch(Bi(p)){case 0:p===38&&Ln()===12&&(h[u]=1),s[u]+=u1(Wt-1,h,u);break;case 2:s[u]+=sr(p);break;case 4:if(p===44){s[++u]=Ln()===58?"&\f":"",h[u]=s[u].length;break}default:s[u]+=dr(p)}while(p=cn());return s},d1=function(s,h){return gh(f1(mh(s),h))},K0=new WeakMap,h1=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var h=s.value,u=s.parent,p=s.column===u.column&&s.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(s.props.length===1&&h.charCodeAt(0)!==58&&!K0.get(u))&&!p){K0.set(s,!0);for(var g=[],k=d1(h,g),R=u.props,L=0,S=0;L<k.length;L++)for(var G=0;G<R.length;G++,S++)s.props[S]=g[L]?k[L].replace(/&\f/g,R[G]):R[G]+" "+k[L]}}},p1=function(s){if(s.type==="decl"){var h=s.value;h.charCodeAt(0)===108&&h.charCodeAt(2)===98&&(s.return="",s.value="")}};function yh(o,s){switch(Fm(o,s)){case 5103:return Ke+"print-"+o+o;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 Ke+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return Ke+o+fr+o+Nt+o+o;case 6828:case 4268:return Ke+o+Nt+o+o;case 6165:return Ke+o+Nt+"flex-"+o+o;case 5187:return Ke+o+Je(o,/(\w+).+(:[^]+)/,Ke+"box-$1$2"+Nt+"flex-$1$2")+o;case 5443:return Ke+o+Nt+"flex-item-"+Je(o,/flex-|-self/,"")+o;case 4675:return Ke+o+Nt+"flex-line-pack"+Je(o,/align-content|flex-|-self/,"")+o;case 5548:return Ke+o+Nt+Je(o,"shrink","negative")+o;case 5292:return Ke+o+Nt+Je(o,"basis","preferred-size")+o;case 6060:return Ke+"box-"+Je(o,"-grow","")+Ke+o+Nt+Je(o,"grow","positive")+o;case 4554:return Ke+Je(o,/([^-])(transform)/g,"$1"+Ke+"$2")+o;case 6187:return Je(Je(Je(o,/(zoom-|grab)/,Ke+"$1"),/(image-set)/,Ke+"$1"),o,"")+o;case 5495:case 3959:return Je(o,/(image-set\([^]*)/,Ke+"$1$`$1");case 4968:return Je(Je(o,/(.+:)(flex-)?(.*)/,Ke+"box-pack:$3"+Nt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ke+o+o;case 4095:case 3583:case 4068:case 2532:return Je(o,/(.+)-inline(.+)/,Ke+"$1$2")+o;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(o)-1-s>6)switch(Lt(o,s+1)){case 109:if(Lt(o,s+4)!==45)break;case 102:return Je(o,/(.+:)(.+)-([^]+)/,"$1"+Ke+"$2-$3$1"+fr+(Lt(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~Ys(o,"stretch")?yh(Je(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(Lt(o,s+1)!==115)break;case 6444:switch(Lt(o,On(o)-3-(~Ys(o,"!important")&&10))){case 107:return Je(o,":",":"+Ke)+o;case 101:return Je(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ke+(Lt(o,14)===45?"inline-":"")+"box$3$1"+Ke+"$2$3$1"+Nt+"$2box$3")+o}break;case 5936:switch(Lt(o,s+11)){case 114:return Ke+o+Nt+Je(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return Ke+o+Nt+Je(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return Ke+o+Nt+Je(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return Ke+o+Nt+o+o}return o}var m1=function(s,h,u,p){if(s.length>-1&&!s.return)switch(s.type){case Ks:s.return=yh(s.value,s.length);break;case dh:return Ba([Ri(s,{value:Je(s.value,"@","@"+Ke)})],p);case Zs:if(s.length)return Wm(s.props,function(g){switch($m(g,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ba([Ri(s,{props:[Je(g,/:(read-\w+)/,":"+fr+"$1")]})],p);case"::placeholder":return Ba([Ri(s,{props:[Je(g,/:(plac\w+)/,":"+Ke+"input-$1")]}),Ri(s,{props:[Je(g,/:(plac\w+)/,":"+fr+"$1")]}),Ri(s,{props:[Je(g,/:(plac\w+)/,Nt+"input-$1")]})],p)}return""})}},g1=[m1],y1=function(s){var h=s.key;if(h==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(X){var ge=X.getAttribute("data-emotion");ge.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var p=s.stylisPlugins||g1,g={},k,R=[];k=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+h+' "]'),function(X){for(var ge=X.getAttribute("data-emotion").split(" "),I=1;I<ge.length;I++)g[ge[I]]=!0;R.push(X)});var L,S=[h1,p1];{var G,B=[o1,c1(function(X){G.insert(X)})],K=r1(S.concat(p,B)),le=function(ge){return Ba(a1(ge),K)};L=function(ge,I,de,te){G=de,le(ge?ge+"{"+I.styles+"}":I.styles),te&&(U.inserted[I.name]=!0)}}var U={key:h,sheet:new Xm({key:h,container:k,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:g,registered:{},insert:L};return U.sheet.hydrate(R),U},Os={exports:{}},$e={};var J0;function v1(){if(J0)return $e;J0=1;var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,p=o?Symbol.for("react.strict_mode"):60108,g=o?Symbol.for("react.profiler"):60114,k=o?Symbol.for("react.provider"):60109,R=o?Symbol.for("react.context"):60110,L=o?Symbol.for("react.async_mode"):60111,S=o?Symbol.for("react.concurrent_mode"):60111,G=o?Symbol.for("react.forward_ref"):60112,B=o?Symbol.for("react.suspense"):60113,K=o?Symbol.for("react.suspense_list"):60120,le=o?Symbol.for("react.memo"):60115,U=o?Symbol.for("react.lazy"):60116,X=o?Symbol.for("react.block"):60121,ge=o?Symbol.for("react.fundamental"):60117,I=o?Symbol.for("react.responder"):60118,de=o?Symbol.for("react.scope"):60119;function te(D){if(typeof D=="object"&&D!==null){var V=D.$$typeof;switch(V){case s:switch(D=D.type,D){case L:case S:case u:case g:case p:case B:return D;default:switch(D=D&&D.$$typeof,D){case R:case G:case U:case le:case k:return D;default:return V}}case h:return V}}}function ne(D){return te(D)===S}return $e.AsyncMode=L,$e.ConcurrentMode=S,$e.ContextConsumer=R,$e.ContextProvider=k,$e.Element=s,$e.ForwardRef=G,$e.Fragment=u,$e.Lazy=U,$e.Memo=le,$e.Portal=h,$e.Profiler=g,$e.StrictMode=p,$e.Suspense=B,$e.isAsyncMode=function(D){return ne(D)||te(D)===L},$e.isConcurrentMode=ne,$e.isContextConsumer=function(D){return te(D)===R},$e.isContextProvider=function(D){return te(D)===k},$e.isElement=function(D){return typeof D=="object"&&D!==null&&D.$$typeof===s},$e.isForwardRef=function(D){return te(D)===G},$e.isFragment=function(D){return te(D)===u},$e.isLazy=function(D){return te(D)===U},$e.isMemo=function(D){return te(D)===le},$e.isPortal=function(D){return te(D)===h},$e.isProfiler=function(D){return te(D)===g},$e.isStrictMode=function(D){return te(D)===p},$e.isSuspense=function(D){return te(D)===B},$e.isValidElementType=function(D){return typeof D=="string"||typeof D=="function"||D===u||D===S||D===g||D===p||D===B||D===K||typeof D=="object"&&D!==null&&(D.$$typeof===U||D.$$typeof===le||D.$$typeof===k||D.$$typeof===R||D.$$typeof===G||D.$$typeof===ge||D.$$typeof===I||D.$$typeof===de||D.$$typeof===X)},$e.typeOf=te,$e}var F0;function b1(){return F0||(F0=1,Os.exports=v1()),Os.exports}var Rs,$0;function x1(){if($0)return Rs;$0=1;var o=b1(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},h={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},g={};g[o.ForwardRef]=u,g[o.Memo]=p;function k(U){return o.isMemo(U)?p:g[U.$$typeof]||s}var R=Object.defineProperty,L=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,B=Object.getPrototypeOf,K=Object.prototype;function le(U,X,ge){if(typeof X!="string"){if(K){var I=B(X);I&&I!==K&&le(U,I,ge)}var de=L(X);S&&(de=de.concat(S(X)));for(var te=k(U),ne=k(X),D=0;D<de.length;++D){var V=de[D];if(!h[V]&&!(ge&&ge[V])&&!(ne&&ne[V])&&!(te&&te[V])){var Y=G(X,V);try{R(U,V,Y)}catch{}}}}return U}return Rs=le,Rs}x1();var S1=!0;function C1(o,s,h){var u="";return h.split(" ").forEach(function(p){o[p]!==void 0?s.push(o[p]+";"):p&&(u+=p+" ")}),u}var vh=function(s,h,u){var p=s.key+"-"+h.name;(u===!1||S1===!1)&&s.registered[p]===void 0&&(s.registered[p]=h.styles)},w1=function(s,h,u){vh(s,h,u);var p=s.key+"-"+h.name;if(s.inserted[h.name]===void 0){var g=h;do s.insert(h===g?"."+p:"",g,s.sheet,!0),g=g.next;while(g!==void 0)}};function z1(o){for(var s=0,h,u=0,p=o.length;p>=4;++u,p-=4)h=o.charCodeAt(u)&255|(o.charCodeAt(++u)&255)<<8|(o.charCodeAt(++u)&255)<<16|(o.charCodeAt(++u)&255)<<24,h=(h&65535)*1540483477+((h>>>16)*59797<<16),h^=h>>>24,s=(h&65535)*1540483477+((h>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(p){case 3:s^=(o.charCodeAt(u+2)&255)<<16;case 2:s^=(o.charCodeAt(u+1)&255)<<8;case 1:s^=o.charCodeAt(u)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var M1={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},T1=/[A-Z]|^ms/g,A1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bh=function(s){return s.charCodeAt(1)===45},W0=function(s){return s!=null&&typeof s!="boolean"},Ls=s1(function(o){return bh(o)?o:o.replace(T1,"-$&").toLowerCase()}),I0=function(s,h){switch(s){case"animation":case"animationName":if(typeof h=="string")return h.replace(A1,function(u,p,g){return Rn={name:p,styles:g,next:Rn},p})}return M1[s]!==1&&!bh(s)&&typeof h=="number"&&h!==0?h+"px":h};function ji(o,s,h){if(h==null)return"";var u=h;if(u.__emotion_styles!==void 0)return u;switch(typeof h){case"boolean":return"";case"object":{var p=h;if(p.anim===1)return Rn={name:p.name,styles:p.styles,next:Rn},p.name;var g=h;if(g.styles!==void 0){var k=g.next;if(k!==void 0)for(;k!==void 0;)Rn={name:k.name,styles:k.styles,next:Rn},k=k.next;var R=g.styles+";";return R}return E1(o,s,h)}case"function":{if(o!==void 0){var L=Rn,S=h(o);return Rn=L,ji(o,s,S)}break}}var G=h;return G}function E1(o,s,h){var u="";if(Array.isArray(h))for(var p=0;p<h.length;p++)u+=ji(o,s,h[p])+";";else for(var g in h){var k=h[g];if(typeof k!="object"){var R=k;W0(R)&&(u+=Ls(g)+":"+I0(g,R)+";")}else if(Array.isArray(k)&&typeof k[0]=="string"&&s==null)for(var L=0;L<k.length;L++)W0(k[L])&&(u+=Ls(g)+":"+I0(g,k[L])+";");else{var S=ji(o,s,k);switch(g){case"animation":case"animationName":{u+=Ls(g)+":"+S+";";break}default:u+=g+"{"+S+"}"}}}return u}var P0=/label:\s*([^\s;{]+)\s*(;|$)/g,Rn;function xh(o,s,h){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var u=!0,p="";Rn=void 0;var g=o[0];if(g==null||g.raw===void 0)u=!1,p+=ji(h,s,g);else{var k=g;p+=k[0]}for(var R=1;R<o.length;R++)if(p+=ji(h,s,o[R]),u){var L=g;p+=L[R]}P0.lastIndex=0;for(var S="",G;(G=P0.exec(p))!==null;)S+="-"+G[1];var B=z1(p)+S;return{name:B,styles:p,next:Rn}}var D1=function(s){return s()},k1=X0.useInsertionEffect?X0.useInsertionEffect:!1,_1=k1||D1,Sh=M.createContext(typeof HTMLElement<"u"?y1({key:"css"}):null);Sh.Provider;var O1=function(s){return M.forwardRef(function(h,u){var p=M.useContext(Sh);return s(h,p,u)})},R1=M.createContext({}),Yi={}.hasOwnProperty,Vs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Fs=function(s,h){var u={};for(var p in h)Yi.call(h,p)&&(u[p]=h[p]);return u[Vs]=s,u},L1=function(s){var h=s.cache,u=s.serialized,p=s.isStringTag;return vh(h,u,p),_1(function(){return w1(h,u,p)}),null},U1=O1(function(o,s,h){var u=o.css;typeof u=="string"&&s.registered[u]!==void 0&&(u=s.registered[u]);var p=o[Vs],g=[u],k="";typeof o.className=="string"?k=C1(s.registered,g,o.className):o.className!=null&&(k=o.className+" ");var R=xh(g,void 0,M.useContext(R1));k+=s.key+"-"+R.name;var L={};for(var S in o)Yi.call(o,S)&&S!=="css"&&S!==Vs&&(L[S]=o[S]);return L.className=k,h&&(L.ref=h),M.createElement(M.Fragment,null,M.createElement(L1,{cache:s,serialized:R,isStringTag:typeof p=="string"}),M.createElement(p,L))}),$s=U1,Ct=Hi.Fragment,c=function(s,h,u){return Yi.call(h,"css")?Hi.jsx($s,Fs(s,h),u):Hi.jsx(s,h,u)},x=function(s,h,u){return Yi.call(h,"css")?Hi.jsxs($s,Fs(s,h),u):Hi.jsxs(s,h,u)},Us={exports:{}},Li={},Hs={exports:{}},Ns={};var eh;function H1(){return eh||(eh=1,(function(o){function s(A,j){var P=A.length;A.push(j);e:for(;0<P;){var ie=P-1>>>1,ye=A[ie];if(0<p(ye,j))A[ie]=j,A[P]=ye,P=ie;else break e}}function h(A){return A.length===0?null:A[0]}function u(A){if(A.length===0)return null;var j=A[0],P=A.pop();if(P!==j){A[0]=P;e:for(var ie=0,ye=A.length,y=ye>>>1;ie<y;){var _=2*(ie+1)-1,Q=A[_],q=_+1,ve=A[q];if(0>p(Q,P))q<ye&&0>p(ve,Q)?(A[ie]=ve,A[q]=P,ie=q):(A[ie]=Q,A[_]=P,ie=_);else if(q<ye&&0>p(ve,P))A[ie]=ve,A[q]=P,ie=q;else break e}}return j}function p(A,j){var P=A.sortIndex-j.sortIndex;return P!==0?P:A.id-j.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;o.unstable_now=function(){return g.now()}}else{var k=Date,R=k.now();o.unstable_now=function(){return k.now()-R}}var L=[],S=[],G=1,B=null,K=3,le=!1,U=!1,X=!1,ge=!1,I=typeof setTimeout=="function"?setTimeout:null,de=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function ne(A){for(var j=h(S);j!==null;){if(j.callback===null)u(S);else if(j.startTime<=A)u(S),j.sortIndex=j.expirationTime,s(L,j);else break;j=h(S)}}function D(A){if(X=!1,ne(A),!U)if(h(L)!==null)U=!0,V||(V=!0,Ne());else{var j=h(S);j!==null&&_e(D,j.startTime-A)}}var V=!1,Y=-1,xe=5,Le=-1;function Oe(){return ge?!0:!(o.unstable_now()-Le<xe)}function Be(){if(ge=!1,V){var A=o.unstable_now();Le=A;var j=!0;try{e:{U=!1,X&&(X=!1,de(Y),Y=-1),le=!0;var P=K;try{t:{for(ne(A),B=h(L);B!==null&&!(B.expirationTime>A&&Oe());){var ie=B.callback;if(typeof ie=="function"){B.callback=null,K=B.priorityLevel;var ye=ie(B.expirationTime<=A);if(A=o.unstable_now(),typeof ye=="function"){B.callback=ye,ne(A),j=!0;break t}B===h(L)&&u(L),ne(A)}else u(L);B=h(L)}if(B!==null)j=!0;else{var y=h(S);y!==null&&_e(D,y.startTime-A),j=!1}}break e}finally{B=null,K=P,le=!1}j=void 0}}finally{j?Ne():V=!1}}}var Ne;if(typeof te=="function")Ne=function(){te(Be)};else if(typeof MessageChannel<"u"){var Fe=new MessageChannel,We=Fe.port2;Fe.port1.onmessage=Be,Ne=function(){We.postMessage(null)}}else Ne=function(){I(Be,0)};function _e(A,j){Y=I(function(){A(o.unstable_now())},j)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(A){A.callback=null},o.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<A?Math.floor(1e3/A):5},o.unstable_getCurrentPriorityLevel=function(){return K},o.unstable_next=function(A){switch(K){case 1:case 2:case 3:var j=3;break;default:j=K}var P=K;K=j;try{return A()}finally{K=P}},o.unstable_requestPaint=function(){ge=!0},o.unstable_runWithPriority=function(A,j){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var P=K;K=A;try{return j()}finally{K=P}},o.unstable_scheduleCallback=function(A,j,P){var ie=o.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ie+P:ie):P=ie,A){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=P+ye,A={id:G++,callback:j,priorityLevel:A,startTime:P,expirationTime:ye,sortIndex:-1},P>ie?(A.sortIndex=P,s(S,A),h(L)===null&&A===h(S)&&(X?(de(Y),Y=-1):X=!0,_e(D,P-ie))):(A.sortIndex=ye,s(L,A),U||le||(U=!0,V||(V=!0,Ne()))),A},o.unstable_shouldYield=Oe,o.unstable_wrapCallback=function(A){var j=K;return function(){var P=K;K=j;try{return A.apply(this,arguments)}finally{K=P}}}})(Ns)),Ns}var th;function N1(){return th||(th=1,Hs.exports=H1()),Hs.exports}var Bs={exports:{}},Ht={};var nh;function B1(){if(nh)return Ht;nh=1;var o=Qs();function s(L){var S="https://react.dev/errors/"+L;if(1<arguments.length){S+="?args[]="+encodeURIComponent(arguments[1]);for(var G=2;G<arguments.length;G++)S+="&args[]="+encodeURIComponent(arguments[G])}return"Minified React error #"+L+"; visit "+S+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var u={d:{f:h,r:function(){throw Error(s(522))},D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},p=Symbol.for("react.portal");function g(L,S,G){var B=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:B==null?null:""+B,children:L,containerInfo:S,implementation:G}}var k=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function R(L,S){if(L==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ht.createPortal=function(L,S){var G=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S||S.nodeType!==1&&S.nodeType!==9&&S.nodeType!==11)throw Error(s(299));return g(L,S,null,G)},Ht.flushSync=function(L){var S=k.T,G=u.p;try{if(k.T=null,u.p=2,L)return L()}finally{k.T=S,u.p=G,u.d.f()}},Ht.preconnect=function(L,S){typeof L=="string"&&(S?(S=S.crossOrigin,S=typeof S=="string"?S==="use-credentials"?S:"":void 0):S=null,u.d.C(L,S))},Ht.prefetchDNS=function(L){typeof L=="string"&&u.d.D(L)},Ht.preinit=function(L,S){if(typeof L=="string"&&S&&typeof S.as=="string"){var G=S.as,B=R(G,S.crossOrigin),K=typeof S.integrity=="string"?S.integrity:void 0,le=typeof S.fetchPriority=="string"?S.fetchPriority:void 0;G==="style"?u.d.S(L,typeof S.precedence=="string"?S.precedence:void 0,{crossOrigin:B,integrity:K,fetchPriority:le}):G==="script"&&u.d.X(L,{crossOrigin:B,integrity:K,fetchPriority:le,nonce:typeof S.nonce=="string"?S.nonce:void 0})}},Ht.preinitModule=function(L,S){if(typeof L=="string")if(typeof S=="object"&&S!==null){if(S.as==null||S.as==="script"){var G=R(S.as,S.crossOrigin);u.d.M(L,{crossOrigin:G,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0})}}else S==null&&u.d.M(L)},Ht.preload=function(L,S){if(typeof L=="string"&&typeof S=="object"&&S!==null&&typeof S.as=="string"){var G=S.as,B=R(G,S.crossOrigin);u.d.L(L,G,{crossOrigin:B,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0,type:typeof S.type=="string"?S.type:void 0,fetchPriority:typeof S.fetchPriority=="string"?S.fetchPriority:void 0,referrerPolicy:typeof S.referrerPolicy=="string"?S.referrerPolicy:void 0,imageSrcSet:typeof S.imageSrcSet=="string"?S.imageSrcSet:void 0,imageSizes:typeof S.imageSizes=="string"?S.imageSizes:void 0,media:typeof S.media=="string"?S.media:void 0})}},Ht.preloadModule=function(L,S){if(typeof L=="string")if(S){var G=R(S.as,S.crossOrigin);u.d.m(L,{as:typeof S.as=="string"&&S.as!=="script"?S.as:void 0,crossOrigin:G,integrity:typeof S.integrity=="string"?S.integrity:void 0})}else u.d.m(L)},Ht.requestFormReset=function(L){u.d.r(L)},Ht.unstable_batchedUpdates=function(L,S){return L(S)},Ht.useFormState=function(L,S,G){return k.H.useFormState(L,S,G)},Ht.useFormStatus=function(){return k.H.useHostTransitionStatus()},Ht.version="19.2.4",Ht}var lh;function j1(){if(lh)return Bs.exports;lh=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),Bs.exports=B1(),Bs.exports}var ah;function q1(){if(ah)return Li;ah=1;var o=N1(),s=Qs(),h=j1();function u(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 p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(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 k(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 R(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function L(e){if(g(e)!==e)throw Error(u(188))}function S(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return L(a),e;if(i===l)return L(a),t;i=i.sibling}throw Error(u(188))}if(n.return!==l.return)n=a,l=i;else{for(var r=!1,d=a.child;d;){if(d===n){r=!0,n=a,l=i;break}if(d===l){r=!0,l=a,n=i;break}d=d.sibling}if(!r){for(d=i.child;d;){if(d===n){r=!0,n=i,l=a;break}if(d===l){r=!0,l=i,n=a;break}d=d.sibling}if(!r)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function G(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=G(e),t!==null)return t;e=e.sibling}return null}var B=Object.assign,K=Symbol.for("react.element"),le=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),de=Symbol.for("react.consumer"),te=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),Le=Symbol.for("react.activity"),Oe=Symbol.for("react.memo_cache_sentinel"),Be=Symbol.iterator;function Ne(e){return e===null||typeof e!="object"?null:(e=Be&&e[Be]||e["@@iterator"],typeof e=="function"?e:null)}var Fe=Symbol.for("react.client.reference");function We(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case I:return"Profiler";case ge:return"StrictMode";case D:return"Suspense";case V:return"SuspenseList";case Le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case te:return e.displayName||"Context";case de:return(e._context.displayName||"Context")+".Consumer";case ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:We(e.type)||"Memo";case xe:t=e._payload,e=e._init;try{return We(e(t))}catch{}}return null}var _e=Array.isArray,A=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},ie=[],ye=-1;function y(e){return{current:e}}function _(e){0>ye||(e.current=ie[ye],ie[ye]=null,ye--)}function Q(e,t){ye++,ie[ye]=e.current,e.current=t}var q=y(null),ve=y(null),oe=y(null),Ce=y(null);function ot(e,t){switch(Q(oe,t),Q(ve,e),Q(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?s0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=s0(t),e=u0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(q),Q(q,e)}function at(){_(q),_(ve),_(oe)}function Sn(e){e.memoizedState!==null&&Q(Ce,e);var t=q.current,n=u0(t,e.type);t!==n&&(Q(ve,e),Q(q,n))}function we(e){ve.current===e&&(_(q),_(ve)),Ce.current===e&&(_(Ce),Ei._currentValue=P)}var Cn,$l;function Te(e){if(Cn===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Cn=t&&t[1]||"",$l=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Cn+e+$l}var zt=!1;function Bt(e,t){if(!e||zt)return"";zt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(E){var T=E}Reflect.construct(e,[],N)}else{try{N.call()}catch(E){T=E}e.call(N.prototype)}}else{try{throw Error()}catch(E){T=E}(N=e())&&typeof N.catch=="function"&&N.catch(function(){})}}catch(E){if(E&&T&&typeof E.stack=="string")return[E.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),r=i[0],d=i[1];if(r&&d){var m=r.split(`
4
+ `),z=d.split(`
5
+ `);for(a=l=0;l<m.length&&!m[l].includes("DetermineComponentFrameRoot");)l++;for(;a<z.length&&!z[a].includes("DetermineComponentFrameRoot");)a++;if(l===m.length||a===z.length)for(l=m.length-1,a=z.length-1;1<=l&&0<=a&&m[l]!==z[a];)a--;for(;1<=l&&0<=a;l--,a--)if(m[l]!==z[a]){if(l!==1||a!==1)do if(l--,a--,0>a||m[l]!==z[a]){var O=`
6
+ `+m[l].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=l&&0<=a);break}}}finally{zt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Te(n):""}function sn(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Bt(e.type,!1);case 11:return Bt(e.type.render,!1);case 1:return Bt(e.type,!0);case 31:return Te("Activity");default:return""}}function jt(e){try{var t="",n=null;do t+=sn(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var ll=Object.prototype.hasOwnProperty,An=o.unstable_scheduleCallback,It=o.unstable_cancelCallback,al=o.unstable_shouldYield,wn=o.unstable_requestPaint,Dt=o.unstable_now,gr=o.unstable_getCurrentPriorityLevel,Ga=o.unstable_ImmediatePriority,Vi=o.unstable_UserBlockingPriority,Wl=o.unstable_NormalPriority,yr=o.unstable_LowPriority,Xi=o.unstable_IdlePriority,vr=o.log,br=o.unstable_setDisableYieldValue,il=null,qt=null;function Ut(e){if(typeof vr=="function"&&br(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(il,e)}catch{}}var Yt=Math.clz32?Math.clz32:Sr,xr=Math.log,Qi=Math.LN2;function Sr(e){return e>>>=0,e===0?32:31-(xr(e)/Qi|0)|0}var Il=256,Pl=262144,ea=4194304;function Un(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 ta(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~i,l!==0?a=Un(l):(r&=d,r!==0?a=Un(r):n||(n=d&~e,n!==0&&(a=Un(n))))):(d=l&~i,d!==0?a=Un(d):r!==0?a=Un(r):n||(n=l&~e,n!==0&&(a=Un(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _l(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 Zi(){var e=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),e}function Va(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cr(e,t,n,l,a,i){var r=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 d=e.entanglements,m=e.expirationTimes,z=e.hiddenUpdates;for(n=r&~n;0<n;){var O=31-Yt(n),N=1<<O;d[O]=0,m[O]=-1;var T=z[O];if(T!==null)for(z[O]=null,O=0;O<T.length;O++){var E=T[O];E!==null&&(E.lane&=-536870913)}n&=~N}l!==0&&na(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function na(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Yt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Hn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Yt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Nn(e,t){var n=t&-t;return n=(n&42)!==0?1:la(n),(n&(e.suspendedLanes|t))!==0?0:n}function la(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 Xa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function re(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:R0(e.type))}function J(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var W=Math.random().toString(36).slice(2),$="__reactFiber$"+W,be="__reactProps$"+W,ue="__reactContainer$"+W,Ue="__reactEvents$"+W,Ee="__reactListeners$"+W,fe="__reactHandles$"+W,De="__reactResources$"+W,ze="__reactMarker$"+W;function mt(e){delete e[$],delete e[be],delete e[Ue],delete e[Ee],delete e[fe]}function Tt(e){var t=e[$];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ue]||n[$]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=y0(e);e!==null;){if(n=e[$])return n;e=y0(e)}return t}e=n,n=e.parentNode}return null}function st(e){if(e=e[$]||e[ue]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Pt(e){var t=e[De];return t||(t=e[De]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[ze]=!0}var un=new Set,Ki={};function Ol(e,t){aa(e,t),aa(e+"Capture",t)}function aa(e,t){for(Ki[e]=t,e=0;e<t.length;e++)un.add(t[e])}var Eh=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]*$"),Is={},Ps={};function Dh(e){return ll.call(Ps,e)?!0:ll.call(Is,e)?!1:Eh.test(e)?Ps[e]=!0:(Is[e]=!0,!1)}function Ji(e,t,n){if(Dh(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Fi(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 Bn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}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 eu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kh(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(r){n=""+r,i.call(this,r)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wr(e){if(!e._valueTracker){var t=eu(e)?"checked":"value";e._valueTracker=kh(e,t,""+e[t])}}function tu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=eu(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function $i(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 _h=/[\n"\\]/g;function dn(e){return e.replace(_h,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zr(e,t,n,l,a,i,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Mr(e,r,fn(t)):n!=null?Mr(e,r,fn(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+fn(d):e.removeAttribute("name")}function nu(e,t,n,l,a,i,r,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){wr(e);return}n=n!=null?""+fn(n):"",t=t!=null?""+fn(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),wr(e)}function Mr(e,t,n){t==="number"&&$i(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ia(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+fn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function lu(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 au(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(_e(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=fn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),wr(e)}function oa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oh=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 iu(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Oh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ou(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&iu(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&iu(e,i,t[i])}function Tr(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 Rh=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"]]),Lh=/^[\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 Wi(e){return Lh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function jn(){}var Ar=null;function Er(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,ca=null;function ru(e){var t=st(e);if(t&&(e=t.stateNode)){var n=e[be]||null;e:switch(e=t.stateNode,t.type){case"input":if(zr(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="'+dn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[be]||null;if(!a)throw Error(u(90));zr(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&tu(l)}break e;case"textarea":lu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ia(e,!!n.multiple,t,!1)}}}var Dr=!1;function cu(e,t,n){if(Dr)return e(t,n);Dr=!0;try{var l=e(t);return l}finally{if(Dr=!1,(ra!==null||ca!==null)&&(jo(),ra&&(t=ra,e=ca,ca=ra=null,ru(t),e)))for(t=0;t<e.length;t++)ru(e[t])}}function Qa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[be]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kr=!1;if(qn)try{var Za={};Object.defineProperty(Za,"passive",{get:function(){kr=!0}}),window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{kr=!1}var rl=null,_r=null,Ii=null;function su(){if(Ii)return Ii;var e,t=_r,n=t.length,l,a="value"in rl?rl.value:rl.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var r=n-e;for(l=1;l<=r&&t[n-l]===a[i-l];l++);return Ii=a.slice(e,1<l?1-l:void 0)}function Pi(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 eo(){return!0}function uu(){return!1}function Qt(e){function t(n,l,a,i,r){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?eo:uu,this.isPropagationStopped=uu,this}return B(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=eo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=eo)},persist:function(){},isPersistent:eo}),t}var Rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},to=Qt(Rl),Ka=B({},Rl,{view:0,detail:0}),Uh=Qt(Ka),Or,Rr,Ja,no=B({},Ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ur,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!==Ja&&(Ja&&e.type==="mousemove"?(Or=e.screenX-Ja.screenX,Rr=e.screenY-Ja.screenY):Rr=Or=0,Ja=e),Or)},movementY:function(e){return"movementY"in e?e.movementY:Rr}}),fu=Qt(no),Hh=B({},no,{dataTransfer:0}),Nh=Qt(Hh),Bh=B({},Ka,{relatedTarget:0}),Lr=Qt(Bh),jh=B({},Rl,{animationName:0,elapsedTime:0,pseudoElement:0}),qh=Qt(jh),Yh=B({},Rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gh=Qt(Yh),Vh=B({},Rl,{data:0}),du=Qt(Vh),Xh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qh={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"},Zh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zh[e])?!!t[e]:!1}function Ur(){return Kh}var Jh=B({},Ka,{key:function(e){if(e.key){var t=Xh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ur,charCode:function(e){return e.type==="keypress"?Pi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fh=Qt(Jh),$h=B({},no,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hu=Qt($h),Wh=B({},Ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ur}),Ih=Qt(Wh),Ph=B({},Rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ep=Qt(Ph),tp=B({},no,{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}),np=Qt(tp),lp=B({},Rl,{newState:0,oldState:0}),ap=Qt(lp),ip=[9,13,27,32],Hr=qn&&"CompositionEvent"in window,Fa=null;qn&&"documentMode"in document&&(Fa=document.documentMode);var op=qn&&"TextEvent"in window&&!Fa,pu=qn&&(!Hr||Fa&&8<Fa&&11>=Fa),mu=" ",gu=!1;function yu(e,t){switch(e){case"keyup":return ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function rp(e,t){switch(e){case"compositionend":return vu(t);case"keypress":return t.which!==32?null:(gu=!0,mu);case"textInput":return e=t.data,e===mu&&gu?null:e;default:return null}}function cp(e,t){if(sa)return e==="compositionend"||!Hr&&yu(e,t)?(e=su(),Ii=_r=rl=null,sa=!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 pu&&t.locale!=="ko"?null:t.data;default:return null}}var sp={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 bu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sp[e.type]:t==="textarea"}function xu(e,t,n,l){ra?ca?ca.push(l):ca=[l]:ra=l,t=Zo(t,"onChange"),0<t.length&&(n=new to("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var $a=null,Wa=null;function up(e){l0(e,0)}function lo(e){var t=Xt(e);if(tu(t))return e}function Su(e,t){if(e==="change")return t}var Cu=!1;if(qn){var Nr;if(qn){var Br="oninput"in document;if(!Br){var wu=document.createElement("div");wu.setAttribute("oninput","return;"),Br=typeof wu.oninput=="function"}Nr=Br}else Nr=!1;Cu=Nr&&(!document.documentMode||9<document.documentMode)}function zu(){$a&&($a.detachEvent("onpropertychange",Mu),Wa=$a=null)}function Mu(e){if(e.propertyName==="value"&&lo(Wa)){var t=[];xu(t,Wa,e,Er(e)),cu(up,t)}}function fp(e,t,n){e==="focusin"?(zu(),$a=t,Wa=n,$a.attachEvent("onpropertychange",Mu)):e==="focusout"&&zu()}function dp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lo(Wa)}function hp(e,t){if(e==="click")return lo(t)}function pp(e,t){if(e==="input"||e==="change")return lo(t)}function mp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:mp;function Ia(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!ll.call(t,a)||!en(e[a],t[a]))return!1}return!0}function Tu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Au(e,t){var n=Tu(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Tu(n)}}function Eu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Du(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$i(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=$i(e.document)}return t}function jr(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 gp=qn&&"documentMode"in document&&11>=document.documentMode,ua=null,qr=null,Pa=null,Yr=!1;function ku(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||ua==null||ua!==$i(l)||(l=ua,"selectionStart"in l&&jr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Pa&&Ia(Pa,l)||(Pa=l,l=Zo(qr,"onSelect"),0<l.length&&(t=new to("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=ua)))}function Ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fa={animationend:Ll("Animation","AnimationEnd"),animationiteration:Ll("Animation","AnimationIteration"),animationstart:Ll("Animation","AnimationStart"),transitionrun:Ll("Transition","TransitionRun"),transitionstart:Ll("Transition","TransitionStart"),transitioncancel:Ll("Transition","TransitionCancel"),transitionend:Ll("Transition","TransitionEnd")},Gr={},_u={};qn&&(_u=document.createElement("div").style,"AnimationEvent"in window||(delete fa.animationend.animation,delete fa.animationiteration.animation,delete fa.animationstart.animation),"TransitionEvent"in window||delete fa.transitionend.transition);function Ul(e){if(Gr[e])return Gr[e];if(!fa[e])return e;var t=fa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _u)return Gr[e]=t[n];return e}var Ou=Ul("animationend"),Ru=Ul("animationiteration"),Lu=Ul("animationstart"),yp=Ul("transitionrun"),vp=Ul("transitionstart"),bp=Ul("transitioncancel"),Uu=Ul("transitionend"),Hu=new Map,Vr="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(" ");Vr.push("scrollEnd");function zn(e,t){Hu.set(e,t),Ol(t,[e])}var ao=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)},hn=[],da=0,Xr=0;function io(){for(var e=da,t=Xr=da=0;t<e;){var n=hn[t];hn[t++]=null;var l=hn[t];hn[t++]=null;var a=hn[t];hn[t++]=null;var i=hn[t];if(hn[t++]=null,l!==null&&a!==null){var r=l.pending;r===null?a.next=a:(a.next=r.next,r.next=a),l.pending=a}i!==0&&Nu(n,a,i)}}function oo(e,t,n,l){hn[da++]=e,hn[da++]=t,hn[da++]=n,hn[da++]=l,Xr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Qr(e,t,n,l){return oo(e,t,n,l),ro(e)}function Hl(e,t){return oo(e,null,null,t),ro(e)}function Nu(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Yt(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function ro(e){if(50<Si)throw Si=0,es=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ha={};function xp(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,n,l){return new xp(e,t,n,l)}function Zr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var n=e.alternate;return n===null?(n=tn(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 Bu(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 co(e,t,n,l,a,i){var r=0;if(l=e,typeof e=="function")Zr(e)&&(r=1);else if(typeof e=="string")r=Mm(e,n,q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Le:return e=tn(31,n,t,a),e.elementType=Le,e.lanes=i,e;case X:return Nl(n.children,a,i,t);case ge:r=8,a|=24;break;case I:return e=tn(12,n,t,a|2),e.elementType=I,e.lanes=i,e;case D:return e=tn(13,n,t,a),e.elementType=D,e.lanes=i,e;case V:return e=tn(19,n,t,a),e.elementType=V,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:r=10;break e;case de:r=9;break e;case ne:r=11;break e;case Y:r=14;break e;case xe:r=16,l=null;break e}r=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=tn(r,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function Nl(e,t,n,l){return e=tn(7,e,l,t),e.lanes=n,e}function Kr(e,t,n){return e=tn(6,e,null,t),e.lanes=n,e}function ju(e){var t=tn(18,null,null,0);return t.stateNode=e,t}function Jr(e,t,n){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qu=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var n=qu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:jt(t)},qu.set(e,t),t)}return{value:e,source:t,stack:jt(t)}}var pa=[],ma=0,so=null,ei=0,mn=[],gn=0,cl=null,En=1,Dn="";function Gn(e,t){pa[ma++]=ei,pa[ma++]=so,so=e,ei=t}function Yu(e,t,n){mn[gn++]=En,mn[gn++]=Dn,mn[gn++]=cl,cl=e;var l=En;e=Dn;var a=32-Yt(l)-1;l&=~(1<<a),n+=1;var i=32-Yt(t)+a;if(30<i){var r=a-a%5;i=(l&(1<<r)-1).toString(32),l>>=r,a-=r,En=1<<32-Yt(t)+a|n<<a|l,Dn=i+e}else En=1<<i|n<<a|l,Dn=e}function Fr(e){e.return!==null&&(Gn(e,1),Yu(e,1,0))}function $r(e){for(;e===so;)so=pa[--ma],pa[ma]=null,ei=pa[--ma],pa[ma]=null;for(;e===cl;)cl=mn[--gn],mn[gn]=null,Dn=mn[--gn],mn[gn]=null,En=mn[--gn],mn[gn]=null}function Gu(e,t){mn[gn++]=En,mn[gn++]=Dn,mn[gn++]=cl,En=t.id,Dn=t.overflow,cl=e}var kt=null,rt=null,Ve=!1,sl=null,yn=!1,Wr=Error(u(519));function ul(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(pn(t,e)),Wr}function Vu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[$]=e,t[be]=l,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<wi.length;n++)qe(wi[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),nu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),au(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||r0(t.textContent,n)?(l.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),l.onScroll!=null&&qe("scroll",t),l.onScrollEnd!=null&&qe("scrollend",t),l.onClick!=null&&(t.onclick=jn),t=!0):t=!1,t||ul(e,!0)}function Xu(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 ga(e){if(e!==kt)return!1;if(!Ve)return Xu(e),Ve=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ms(e.type,e.memoizedProps)),n=!n),n&&rt&&ul(e),Xu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));rt=g0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));rt=g0(e)}else t===27?(t=rt,zl(e.type)?(e=xs,xs=null,rt=e):rt=t):rt=kt?bn(e.stateNode.nextSibling):null;return!0}function Bl(){rt=kt=null,Ve=!1}function Ir(){var e=sl;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),sl=null),e}function ti(e){sl===null?sl=[e]:sl.push(e)}var Pr=y(null),jl=null,Vn=null;function fl(e,t,n){Q(Pr,t._currentValue),t._currentValue=n}function Xn(e){e._currentValue=Pr.current,_(Pr)}function ec(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function tc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var r=a.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=a;for(var m=0;m<t.length;m++)if(d.context===t[m]){i.lanes|=n,d=i.alternate,d!==null&&(d.lanes|=n),ec(i.return,n,e),l||(r=null);break e}i=d.next}}else if(a.tag===18){if(r=a.return,r===null)throw Error(u(341));r.lanes|=n,i=r.alternate,i!==null&&(i.lanes|=n),ec(r,n,e),r=null}else r=a.child;if(r!==null)r.return=a;else for(r=a;r!==null;){if(r===e){r=null;break}if(a=r.sibling,a!==null){a.return=r.return,r=a;break}r=r.return}a=r}}function ya(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var r=a.alternate;if(r===null)throw Error(u(387));if(r=r.memoizedProps,r!==null){var d=a.type;en(a.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(a===Ce.current){if(r=a.alternate,r===null)throw Error(u(387));r.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ei):e=[Ei])}a=a.return}e!==null&&tc(t,e,n,l),t.flags|=262144}function uo(e){for(e=e.firstContext;e!==null;){if(!en(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ql(e){jl=e,Vn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Qu(jl,e)}function fo(e,t){return jl===null&&ql(e),Qu(e,t)}function Qu(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vn===null){if(e===null)throw Error(u(308));Vn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vn=Vn.next=t;return n}var Sp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Cp=o.unstable_scheduleCallback,wp=o.unstable_NormalPriority,vt={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nc(){return{controller:new Sp,data:new Map,refCount:0}}function ni(e){e.refCount--,e.refCount===0&&Cp(wp,function(){e.controller.abort()})}var li=null,lc=0,va=0,ba=null;function zp(e,t){if(li===null){var n=li=[];lc=0,va=os(),ba={status:"pending",value:void 0,then:function(l){n.push(l)}}}return lc++,t.then(Zu,Zu),t}function Zu(){if(--lc===0&&li!==null){ba!==null&&(ba.status="fulfilled");var e=li;li=null,va=0,ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mp(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Ku=A.S;A.S=function(e,t){_d=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zp(e,t),Ku!==null&&Ku(e,t)};var Yl=y(null);function ac(){var e=Yl.current;return e!==null?e:lt.pooledCache}function ho(e,t){t===null?Q(Yl,Yl.current):Q(Yl,t.pool)}function Ju(){var e=ac();return e===null?null:{parent:vt._currentValue,pool:e}}var xa=Error(u(460)),ic=Error(u(474)),po=Error(u(542)),mo={then:function(){}};function Fu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $u(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(jn,jn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Iu(e),e;default:if(typeof t.status=="string")t.then(jn,jn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Iu(e),e}throw Vl=t,xa}}function Gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Vl=n,xa):n}}var Vl=null;function Wu(){if(Vl===null)throw Error(u(459));var e=Vl;return Vl=null,e}function Iu(e){if(e===xa||e===po)throw Error(u(483))}var Sa=null,ai=0;function go(e){var t=ai;return ai+=1,Sa===null&&(Sa=[]),$u(Sa,e,t)}function ii(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yo(e,t){throw t.$$typeof===K?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pu(e){function t(C,v){if(e){var w=C.deletions;w===null?(C.deletions=[v],C.flags|=16):w.push(v)}}function n(C,v){if(!e)return null;for(;v!==null;)t(C,v),v=v.sibling;return null}function l(C){for(var v=new Map;C!==null;)C.key!==null?v.set(C.key,C):v.set(C.index,C),C=C.sibling;return v}function a(C,v){return C=Yn(C,v),C.index=0,C.sibling=null,C}function i(C,v,w){return C.index=w,e?(w=C.alternate,w!==null?(w=w.index,w<v?(C.flags|=67108866,v):w):(C.flags|=67108866,v)):(C.flags|=1048576,v)}function r(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function d(C,v,w,H){return v===null||v.tag!==6?(v=Kr(w,C.mode,H),v.return=C,v):(v=a(v,w),v.return=C,v)}function m(C,v,w,H){var me=w.type;return me===X?O(C,v,w.props.children,H,w.key):v!==null&&(v.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===xe&&Gl(me)===v.type)?(v=a(v,w.props),ii(v,w),v.return=C,v):(v=co(w.type,w.key,w.props,null,C.mode,H),ii(v,w),v.return=C,v)}function z(C,v,w,H){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Jr(w,C.mode,H),v.return=C,v):(v=a(v,w.children||[]),v.return=C,v)}function O(C,v,w,H,me){return v===null||v.tag!==7?(v=Nl(w,C.mode,H,me),v.return=C,v):(v=a(v,w),v.return=C,v)}function N(C,v,w){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Kr(""+v,C.mode,w),v.return=C,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case le:return w=co(v.type,v.key,v.props,null,C.mode,w),ii(w,v),w.return=C,w;case U:return v=Jr(v,C.mode,w),v.return=C,v;case xe:return v=Gl(v),N(C,v,w)}if(_e(v)||Ne(v))return v=Nl(v,C.mode,w,null),v.return=C,v;if(typeof v.then=="function")return N(C,go(v),w);if(v.$$typeof===te)return N(C,fo(C,v),w);yo(C,v)}return null}function T(C,v,w,H){var me=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return me!==null?null:d(C,v,""+w,H);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case le:return w.key===me?m(C,v,w,H):null;case U:return w.key===me?z(C,v,w,H):null;case xe:return w=Gl(w),T(C,v,w,H)}if(_e(w)||Ne(w))return me!==null?null:O(C,v,w,H,null);if(typeof w.then=="function")return T(C,v,go(w),H);if(w.$$typeof===te)return T(C,v,fo(C,w),H);yo(C,w)}return null}function E(C,v,w,H,me){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return C=C.get(w)||null,d(v,C,""+H,me);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case le:return C=C.get(H.key===null?w:H.key)||null,m(v,C,H,me);case U:return C=C.get(H.key===null?w:H.key)||null,z(v,C,H,me);case xe:return H=Gl(H),E(C,v,w,H,me)}if(_e(H)||Ne(H))return C=C.get(w)||null,O(v,C,H,me,null);if(typeof H.then=="function")return E(C,v,w,go(H),me);if(H.$$typeof===te)return E(C,v,w,fo(v,H),me);yo(v,H)}return null}function ae(C,v,w,H){for(var me=null,Xe=null,se=v,He=v=0,Ge=null;se!==null&&He<w.length;He++){se.index>He?(Ge=se,se=null):Ge=se.sibling;var Qe=T(C,se,w[He],H);if(Qe===null){se===null&&(se=Ge);break}e&&se&&Qe.alternate===null&&t(C,se),v=i(Qe,v,He),Xe===null?me=Qe:Xe.sibling=Qe,Xe=Qe,se=Ge}if(He===w.length)return n(C,se),Ve&&Gn(C,He),me;if(se===null){for(;He<w.length;He++)se=N(C,w[He],H),se!==null&&(v=i(se,v,He),Xe===null?me=se:Xe.sibling=se,Xe=se);return Ve&&Gn(C,He),me}for(se=l(se);He<w.length;He++)Ge=E(se,C,He,w[He],H),Ge!==null&&(e&&Ge.alternate!==null&&se.delete(Ge.key===null?He:Ge.key),v=i(Ge,v,He),Xe===null?me=Ge:Xe.sibling=Ge,Xe=Ge);return e&&se.forEach(function(Dl){return t(C,Dl)}),Ve&&Gn(C,He),me}function Se(C,v,w,H){if(w==null)throw Error(u(151));for(var me=null,Xe=null,se=v,He=v=0,Ge=null,Qe=w.next();se!==null&&!Qe.done;He++,Qe=w.next()){se.index>He?(Ge=se,se=null):Ge=se.sibling;var Dl=T(C,se,Qe.value,H);if(Dl===null){se===null&&(se=Ge);break}e&&se&&Dl.alternate===null&&t(C,se),v=i(Dl,v,He),Xe===null?me=Dl:Xe.sibling=Dl,Xe=Dl,se=Ge}if(Qe.done)return n(C,se),Ve&&Gn(C,He),me;if(se===null){for(;!Qe.done;He++,Qe=w.next())Qe=N(C,Qe.value,H),Qe!==null&&(v=i(Qe,v,He),Xe===null?me=Qe:Xe.sibling=Qe,Xe=Qe);return Ve&&Gn(C,He),me}for(se=l(se);!Qe.done;He++,Qe=w.next())Qe=E(se,C,He,Qe.value,H),Qe!==null&&(e&&Qe.alternate!==null&&se.delete(Qe.key===null?He:Qe.key),v=i(Qe,v,He),Xe===null?me=Qe:Xe.sibling=Qe,Xe=Qe);return e&&se.forEach(function(Hm){return t(C,Hm)}),Ve&&Gn(C,He),me}function nt(C,v,w,H){if(typeof w=="object"&&w!==null&&w.type===X&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case le:e:{for(var me=w.key;v!==null;){if(v.key===me){if(me=w.type,me===X){if(v.tag===7){n(C,v.sibling),H=a(v,w.props.children),H.return=C,C=H;break e}}else if(v.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===xe&&Gl(me)===v.type){n(C,v.sibling),H=a(v,w.props),ii(H,w),H.return=C,C=H;break e}n(C,v);break}else t(C,v);v=v.sibling}w.type===X?(H=Nl(w.props.children,C.mode,H,w.key),H.return=C,C=H):(H=co(w.type,w.key,w.props,null,C.mode,H),ii(H,w),H.return=C,C=H)}return r(C);case U:e:{for(me=w.key;v!==null;){if(v.key===me)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(C,v.sibling),H=a(v,w.children||[]),H.return=C,C=H;break e}else{n(C,v);break}else t(C,v);v=v.sibling}H=Jr(w,C.mode,H),H.return=C,C=H}return r(C);case xe:return w=Gl(w),nt(C,v,w,H)}if(_e(w))return ae(C,v,w,H);if(Ne(w)){if(me=Ne(w),typeof me!="function")throw Error(u(150));return w=me.call(w),Se(C,v,w,H)}if(typeof w.then=="function")return nt(C,v,go(w),H);if(w.$$typeof===te)return nt(C,v,fo(C,w),H);yo(C,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,v!==null&&v.tag===6?(n(C,v.sibling),H=a(v,w),H.return=C,C=H):(n(C,v),H=Kr(w,C.mode,H),H.return=C,C=H),r(C)):n(C,v)}return function(C,v,w,H){try{ai=0;var me=nt(C,v,w,H);return Sa=null,me}catch(se){if(se===xa||se===po)throw se;var Xe=tn(29,se,null,C.mode);return Xe.lanes=H,Xe.return=C,Xe}}}var Xl=Pu(!0),ef=Pu(!1),dl=!1;function oc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rc(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 hl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function pl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=ro(e),Nu(e,null,n),t}return oo(e,l,t,n),ro(e)}function oi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Hn(e,n)}}function cc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=r:i=i.next=r,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var sc=!1;function ri(){if(sc){var e=ba;if(e!==null)throw e}}function ci(e,t,n,l){sc=!1;var a=e.updateQueue;dl=!1;var i=a.firstBaseUpdate,r=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var m=d,z=m.next;m.next=null,r===null?i=z:r.next=z,r=m;var O=e.alternate;O!==null&&(O=O.updateQueue,d=O.lastBaseUpdate,d!==r&&(d===null?O.firstBaseUpdate=z:d.next=z,O.lastBaseUpdate=m))}if(i!==null){var N=a.baseState;r=0,O=z=m=null,d=i;do{var T=d.lane&-536870913,E=T!==d.lane;if(E?(Ye&T)===T:(l&T)===T){T!==0&&T===va&&(sc=!0),O!==null&&(O=O.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var ae=e,Se=d;T=t;var nt=n;switch(Se.tag){case 1:if(ae=Se.payload,typeof ae=="function"){N=ae.call(nt,N,T);break e}N=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=Se.payload,T=typeof ae=="function"?ae.call(nt,N,T):ae,T==null)break e;N=B({},N,T);break e;case 2:dl=!0}}T=d.callback,T!==null&&(e.flags|=64,E&&(e.flags|=8192),E=a.callbacks,E===null?a.callbacks=[T]:E.push(T))}else E={lane:T,tag:d.tag,payload:d.payload,callback:d.callback,next:null},O===null?(z=O=E,m=N):O=O.next=E,r|=T;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;E=d,d=E.next,E.next=null,a.lastBaseUpdate=E,a.shared.pending=null}}while(!0);O===null&&(m=N),a.baseState=m,a.firstBaseUpdate=z,a.lastBaseUpdate=O,i===null&&(a.shared.lanes=0),bl|=r,e.lanes=r,e.memoizedState=N}}function tf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function nf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)tf(n[e],t)}var Ca=y(null),vo=y(0);function lf(e,t){e=Pn,Q(vo,e),Q(Ca,t),Pn=e|t.baseLanes}function uc(){Q(vo,Pn),Q(Ca,Ca.current)}function fc(){Pn=vo.current,_(Ca),_(vo)}var nn=y(null),vn=null;function ml(e){var t=e.alternate;Q(gt,gt.current&1),Q(nn,e),vn===null&&(t===null||Ca.current!==null||t.memoizedState!==null)&&(vn=e)}function dc(e){Q(gt,gt.current),Q(nn,e),vn===null&&(vn=e)}function af(e){e.tag===22?(Q(gt,gt.current),Q(nn,e),vn===null&&(vn=e)):gl()}function gl(){Q(gt,gt.current),Q(nn,nn.current)}function ln(e){_(nn),vn===e&&(vn=null),_(gt)}var gt=y(0);function bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vs(n)||bs(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 Qn=0,Re=null,et=null,bt=null,xo=!1,wa=!1,Ql=!1,So=0,si=0,za=null,Tp=0;function dt(){throw Error(u(321))}function hc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!en(e[n],t[n]))return!1;return!0}function pc(e,t,n,l,a,i){return Qn=i,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Gf:Dc,Ql=!1,i=n(l,a),Ql=!1,wa&&(i=rf(t,n,l,a)),of(e),i}function of(e){A.H=di;var t=et!==null&&et.next!==null;if(Qn=0,bt=et=Re=null,xo=!1,si=0,za=null,t)throw Error(u(300));e===null||xt||(e=e.dependencies,e!==null&&uo(e)&&(xt=!0))}function rf(e,t,n,l){Re=e;var a=0;do{if(wa&&(za=null),si=0,wa=!1,25<=a)throw Error(u(301));if(a+=1,bt=et=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}A.H=Vf,i=t(n,l)}while(wa);return i}function Ap(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?ui(t):t,e=e.useState()[0],(et!==null?et.memoizedState:null)!==e&&(Re.flags|=1024),t}function mc(){var e=So!==0;return So=0,e}function gc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yc(e){if(xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xo=!1}Qn=0,bt=et=Re=null,wa=!1,si=So=0,za=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Re.memoizedState=bt=e:bt=bt.next=e,bt}function yt(){if(et===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=bt===null?Re.memoizedState:bt.next;if(t!==null)bt=t,et=e;else{if(e===null)throw Re.alternate===null?Error(u(467)):Error(u(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},bt===null?Re.memoizedState=bt=e:bt=bt.next=e}return bt}function Co(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ui(e){var t=si;return si+=1,za===null&&(za=[]),e=$u(za,e,t),t=Re,(bt===null?t.memoizedState:bt.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Gf:Dc),e}function wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ui(e);if(e.$$typeof===te)return _t(e)}throw Error(u(438,String(e)))}function vc(e){var t=null,n=Re.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Co(),Re.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Oe;return t.index++,n}function Zn(e,t){return typeof t=="function"?t(e):t}function zo(e){var t=yt();return bc(t,et,e)}function bc(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var r=a.next;a.next=i.next,i.next=r}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var d=r=null,m=null,z=t,O=!1;do{var N=z.lane&-536870913;if(N!==z.lane?(Ye&N)===N:(Qn&N)===N){var T=z.revertLane;if(T===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),N===va&&(O=!0);else if((Qn&T)===T){z=z.next,T===va&&(O=!0);continue}else N={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},m===null?(d=m=N,r=i):m=m.next=N,Re.lanes|=T,bl|=T;N=z.action,Ql&&n(i,N),i=z.hasEagerState?z.eagerState:n(i,N)}else T={lane:N,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},m===null?(d=m=T,r=i):m=m.next=T,Re.lanes|=N,bl|=N;z=z.next}while(z!==null&&z!==t);if(m===null?r=i:m.next=d,!en(i,e.memoizedState)&&(xt=!0,O&&(n=ba,n!==null)))throw n;e.memoizedState=i,e.baseState=r,e.baseQueue=m,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function xc(e){var t=yt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var r=a=a.next;do i=e(i,r.action),r=r.next;while(r!==a);en(i,t.memoizedState)||(xt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function cf(e,t,n){var l=Re,a=yt(),i=Ve;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var r=!en((et||a).memoizedState,n);if(r&&(a.memoizedState=n,xt=!0),a=a.queue,wc(ff.bind(null,l,a,e),[e]),a.getSnapshot!==t||r||bt!==null&&bt.memoizedState.tag&1){if(l.flags|=2048,Ma(9,{destroy:void 0},uf.bind(null,l,a,n,t),null),lt===null)throw Error(u(349));i||(Qn&127)!==0||sf(l,t,n)}return n}function sf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t=Co(),Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uf(e,t,n,l){t.value=n,t.getSnapshot=l,df(t)&&hf(e)}function ff(e,t,n){return n(function(){df(t)&&hf(e)})}function df(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!en(e,n)}catch{return!0}}function hf(e){var t=Hl(e,2);t!==null&&$t(t,e,2)}function Sc(e){var t=Gt();if(typeof e=="function"){var n=e;if(e=n(),Ql){Ut(!0);try{n()}finally{Ut(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t}function pf(e,t,n,l){return e.baseState=n,bc(e,et,typeof l=="function"?l:Zn)}function Ep(e,t,n,l,a){if(Ao(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){i.listeners.push(r)}};A.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,mf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function mf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=A.T,r={};A.T=r;try{var d=n(a,l),m=A.S;m!==null&&m(r,d),gf(e,t,d)}catch(z){Cc(e,t,z)}finally{i!==null&&r.types!==null&&(i.types=r.types),A.T=i}}else try{i=n(a,l),gf(e,t,i)}catch(z){Cc(e,t,z)}}function gf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){yf(e,t,l)},function(l){return Cc(e,t,l)}):yf(e,t,n)}function yf(e,t,n){t.status="fulfilled",t.value=n,vf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,mf(e,n)))}function Cc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,vf(t),t=t.next;while(t!==l)}e.action=null}function vf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bf(e,t){return t}function xf(e,t){if(Ve){var n=lt.formState;if(n!==null){e:{var l=Re;if(Ve){if(rt){t:{for(var a=rt,i=yn;a.nodeType!==8;){if(!i){a=null;break t}if(a=bn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){rt=bn(a.nextSibling),l=a.data==="F!";break e}}ul(l)}l=!1}l&&(t=n[0])}}return n=Gt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bf,lastRenderedState:t},n.queue=l,n=jf.bind(null,Re,l),l.dispatch=n,l=Sc(!1),i=Ec.bind(null,Re,!1,l.queue),l=Gt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Ep.bind(null,Re,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Sf(e){var t=yt();return Cf(t,et,e)}function Cf(e,t,n){if(t=bc(e,t,bf)[0],e=zo(Zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ui(t)}catch(r){throw r===xa?po:r}else l=t;t=yt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Re.flags|=2048,Ma(9,{destroy:void 0},Dp.bind(null,a,n),null)),[l,i,e]}function Dp(e,t){e.action=t}function wf(e){var t=yt(),n=et;if(n!==null)return Cf(t,n,e);yt(),t=t.memoizedState,n=yt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ma(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Co(),Re.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function zf(){return yt().memoizedState}function Mo(e,t,n,l){var a=Gt();Re.flags|=e,a.memoizedState=Ma(1|t,{destroy:void 0},n,l===void 0?null:l)}function To(e,t,n,l){var a=yt();l=l===void 0?null:l;var i=a.memoizedState.inst;et!==null&&l!==null&&hc(l,et.memoizedState.deps)?a.memoizedState=Ma(t,i,n,l):(Re.flags|=e,a.memoizedState=Ma(1|t,i,n,l))}function Mf(e,t){Mo(8390656,8,e,t)}function wc(e,t){To(2048,8,e,t)}function kp(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Co(),Re.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Tf(e){var t=yt().memoizedState;return kp({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Af(e,t){return To(4,2,e,t)}function Ef(e,t){return To(4,4,e,t)}function Df(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 kf(e,t,n){n=n!=null?n.concat([e]):null,To(4,4,Df.bind(null,t,e),n)}function zc(){}function _f(e,t){var n=yt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&hc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Of(e,t){var n=yt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&hc(t,l[1]))return l[0];if(l=e(),Ql){Ut(!0);try{e()}finally{Ut(!1)}}return n.memoizedState=[l,t],l}function Mc(e,t,n){return n===void 0||(Qn&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Rd(),Re.lanes|=e,bl|=e,n)}function Rf(e,t,n,l){return en(n,t)?n:Ca.current!==null?(e=Mc(e,n,l),en(e,t)||(xt=!0),e):(Qn&42)===0||(Qn&1073741824)!==0&&(Ye&261930)===0?(xt=!0,e.memoizedState=n):(e=Rd(),Re.lanes|=e,bl|=e,t)}function Lf(e,t,n,l,a){var i=j.p;j.p=i!==0&&8>i?i:8;var r=A.T,d={};A.T=d,Ec(e,!1,t,n);try{var m=a(),z=A.S;if(z!==null&&z(d,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var O=Mp(m,l);fi(e,t,O,rn(e))}else fi(e,t,l,rn(e))}catch(N){fi(e,t,{then:function(){},status:"rejected",reason:N},rn())}finally{j.p=i,r!==null&&d.types!==null&&(r.types=d.types),A.T=r}}function _p(){}function Tc(e,t,n,l){if(e.tag!==5)throw Error(u(476));var a=Uf(e).queue;Lf(e,a,t,P,n===null?_p:function(){return Hf(e),n(l)})}function Uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hf(e){var t=Uf(e);t.next===null&&(t=e.alternate.memoizedState),fi(e,t.next.queue,{},rn())}function Ac(){return _t(Ei)}function Nf(){return yt().memoizedState}function Bf(){return yt().memoizedState}function Op(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=rn();e=hl(n);var l=pl(t,e,n);l!==null&&($t(l,t,n),oi(l,t,n)),t={cache:nc()},e.payload=t;return}t=t.return}}function Rp(e,t,n){var l=rn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ao(e)?qf(t,n):(n=Qr(e,t,n,l),n!==null&&($t(n,e,l),Yf(n,t,l)))}function jf(e,t,n){var l=rn();fi(e,t,n,l)}function fi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ao(e))qf(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,d=i(r,n);if(a.hasEagerState=!0,a.eagerState=d,en(d,r))return oo(e,t,a,0),lt===null&&io(),!1}catch{}if(n=Qr(e,t,a,l),n!==null)return $t(n,e,l),Yf(n,t,l),!0}return!1}function Ec(e,t,n,l){if(l={lane:2,revertLane:os(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ao(e)){if(t)throw Error(u(479))}else t=Qr(e,n,l,2),t!==null&&$t(t,e,2)}function Ao(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function qf(e,t){wa=xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Hn(e,n)}}var di={readContext:_t,use:wo,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};di.useEffectEvent=dt;var Gf={readContext:_t,use:wo,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Mf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Mo(4194308,4,Df.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mo(4194308,4,e,t)},useInsertionEffect:function(e,t){Mo(4,2,e,t)},useMemo:function(e,t){var n=Gt();t=t===void 0?null:t;var l=e();if(Ql){Ut(!0);try{e()}finally{Ut(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Gt();if(n!==void 0){var a=n(t);if(Ql){Ut(!0);try{n(t)}finally{Ut(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Rp.bind(null,Re,e),[l.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=Sc(e);var t=e.queue,n=jf.bind(null,Re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:zc,useDeferredValue:function(e,t){var n=Gt();return Mc(n,e,t)},useTransition:function(){var e=Sc(!1);return e=Lf.bind(null,Re,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Re,a=Gt();if(Ve){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),lt===null)throw Error(u(349));(Ye&127)!==0||sf(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Mf(ff.bind(null,l,i,e),[e]),l.flags|=2048,Ma(9,{destroy:void 0},uf.bind(null,l,i,n,t),null),n},useId:function(){var e=Gt(),t=lt.identifierPrefix;if(Ve){var n=Dn,l=En;n=(l&~(1<<32-Yt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=So++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Tp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ac,useFormState:xf,useActionState:xf,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ec.bind(null,Re,!0,n),n.dispatch=t,[e,t]},useMemoCache:vc,useCacheRefresh:function(){return Gt().memoizedState=Op.bind(null,Re)},useEffectEvent:function(e){var t=Gt(),n={impl:e};return t.memoizedState=n,function(){if((Ze&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Dc={readContext:_t,use:wo,useCallback:_f,useContext:_t,useEffect:wc,useImperativeHandle:kf,useInsertionEffect:Af,useLayoutEffect:Ef,useMemo:Of,useReducer:zo,useRef:zf,useState:function(){return zo(Zn)},useDebugValue:zc,useDeferredValue:function(e,t){var n=yt();return Rf(n,et.memoizedState,e,t)},useTransition:function(){var e=zo(Zn)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:cf,useId:Nf,useHostTransitionStatus:Ac,useFormState:Sf,useActionState:Sf,useOptimistic:function(e,t){var n=yt();return pf(n,et,e,t)},useMemoCache:vc,useCacheRefresh:Bf};Dc.useEffectEvent=Tf;var Vf={readContext:_t,use:wo,useCallback:_f,useContext:_t,useEffect:wc,useImperativeHandle:kf,useInsertionEffect:Af,useLayoutEffect:Ef,useMemo:Of,useReducer:xc,useRef:zf,useState:function(){return xc(Zn)},useDebugValue:zc,useDeferredValue:function(e,t){var n=yt();return et===null?Mc(n,e,t):Rf(n,et.memoizedState,e,t)},useTransition:function(){var e=xc(Zn)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:cf,useId:Nf,useHostTransitionStatus:Ac,useFormState:wf,useActionState:wf,useOptimistic:function(e,t){var n=yt();return et!==null?pf(n,et,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:vc,useCacheRefresh:Bf};Vf.useEffectEvent=Tf;function kc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:B({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=rn(),a=hl(l);a.payload=t,n!=null&&(a.callback=n),t=pl(e,a,l),t!==null&&($t(t,e,l),oi(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=rn(),a=hl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=pl(e,a,l),t!==null&&($t(t,e,l),oi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rn(),l=hl(n);l.tag=2,t!=null&&(l.callback=t),t=pl(e,l,n),t!==null&&($t(t,e,n),oi(t,e,n))}};function Xf(e,t,n,l,a,i,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,r):t.prototype&&t.prototype.isPureReactComponent?!Ia(n,l)||!Ia(a,i):!0}function Qf(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function Zl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=B({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Zf(e){ao(e)}function Kf(e){console.error(e)}function Jf(e){ao(e)}function Eo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ff(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Oc(e,t,n){return n=hl(n),n.tag=3,n.payload={element:null},n.callback=function(){Eo(e,t)},n}function $f(e){return e=hl(e),e.tag=3,e}function Wf(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){Ff(t,n,l)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Ff(t,n,l),typeof a!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Lp(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&ya(t,n,a,!0),n=nn.current,n!==null){switch(n.tag){case 31:case 13:return vn===null?qo():n.alternate===null&&ht===0&&(ht=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===mo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),ls(e,l,a)),!1;case 22:return n.flags|=65536,l===mo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),ls(e,l,a)),!1}throw Error(u(435,n.tag))}return ls(e,l,a),qo(),!1}if(Ve)return t=nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Wr&&(e=Error(u(422),{cause:l}),ti(pn(e,n)))):(l!==Wr&&(t=Error(u(423),{cause:l}),ti(pn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=pn(l,n),a=Oc(e.stateNode,l,a),cc(e,a),ht!==4&&(ht=2)),!1;var i=Error(u(520),{cause:l});if(i=pn(i,n),xi===null?xi=[i]:xi.push(i),ht!==4&&(ht=2),t===null)return!0;l=pn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,l,e),cc(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(xl===null||!xl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$f(a),Wf(a,e,n,l),cc(n,a),!1}n=n.return}while(n!==null);return!1}var Rc=Error(u(461)),xt=!1;function Ot(e,t,n,l){t.child=e===null?ef(t,null,n,l):Xl(t,e.child,n,l)}function If(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var r={};for(var d in l)d!=="ref"&&(r[d]=l[d])}else r=l;return ql(t),l=pc(e,t,n,r,i,a),d=mc(),e!==null&&!xt?(gc(e,t,a),Kn(e,t,a)):(Ve&&d&&Fr(t),t.flags|=1,Ot(e,t,l,a),t.child)}function Pf(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!Zr(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,ed(e,t,i,l,a)):(e=co(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Yc(e,a)){var r=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ia,n(r,l)&&e.ref===t.ref)return Kn(e,t,a)}return t.flags|=1,e=Yn(i,l),e.ref=t.ref,e.return=t,t.child=e}function ed(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(Ia(i,l)&&e.ref===t.ref)if(xt=!1,t.pendingProps=l=i,Yc(e,a))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,Kn(e,t,a)}return Lc(e,t,n,l,a)}function td(e,t,n,l){var a=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return nd(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ho(t,i!==null?i.cachePool:null),i!==null?lf(t,i):uc(),af(t);else return l=t.lanes=536870912,nd(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(ho(t,i.cachePool),lf(t,i),gl(),t.memoizedState=null):(e!==null&&ho(t,null),uc(),gl());return Ot(e,t,a,n),t.child}function hi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nd(e,t,n,l,a){var i=ac();return i=i===null?null:{parent:vt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&ho(t,null),uc(),af(t),e!==null&&ya(e,t,l,!0),t.childLanes=a,null}function Do(e,t){return t=_o({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ld(e,t,n){return Xl(t,e.child,null,n),e=Do(t,t.pendingProps),e.flags|=2,ln(t),t.memoizedState=null,e}function Up(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=Do(t,l),t.lanes=536870912,hi(null,e);if(dc(t),(e=rt)?(e=m0(e,yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cl!==null?{id:En,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},n=ju(e),n.return=t,t.child=n,kt=t,rt=null)):e=null,e===null)throw ul(t);return t.lanes=536870912,null}return Do(t,l)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(dc(t),a)if(t.flags&256)t.flags&=-257,t=ld(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(xt||ya(e,t,n,!1),a=(n&e.childLanes)!==0,xt||a){if(l=lt,l!==null&&(r=Nn(l,n),r!==0&&r!==i.retryLane))throw i.retryLane=r,Hl(e,r),$t(l,e,r),Rc;qo(),t=ld(e,t,n)}else e=i.treeContext,rt=bn(r.nextSibling),kt=t,Ve=!0,sl=null,yn=!1,e!==null&&Gu(t,e),t=Do(t,l),t.flags|=4096;return t}return e=Yn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ko(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(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Lc(e,t,n,l,a){return ql(t),n=pc(e,t,n,l,void 0,a),l=mc(),e!==null&&!xt?(gc(e,t,a),Kn(e,t,a)):(Ve&&l&&Fr(t),t.flags|=1,Ot(e,t,n,a),t.child)}function ad(e,t,n,l,a,i){return ql(t),t.updateQueue=null,n=rf(t,l,n,a),of(e),l=mc(),e!==null&&!xt?(gc(e,t,i),Kn(e,t,i)):(Ve&&l&&Fr(t),t.flags|=1,Ot(e,t,n,i),t.child)}function id(e,t,n,l,a){if(ql(t),t.stateNode===null){var i=ha,r=n.contextType;typeof r=="object"&&r!==null&&(i=_t(r)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=_c,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},oc(t),r=n.contextType,i.context=typeof r=="object"&&r!==null?_t(r):ha,i.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(kc(t,n,r,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&_c.enqueueReplaceState(i,i.state,null),ci(t,l,i,a),ri(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,m=Zl(n,d);i.props=m;var z=i.context,O=n.contextType;r=ha,typeof O=="object"&&O!==null&&(r=_t(O));var N=n.getDerivedStateFromProps;O=typeof N=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,O||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||z!==r)&&Qf(t,i,l,r),dl=!1;var T=t.memoizedState;i.state=T,ci(t,l,i,a),ri(),z=t.memoizedState,d||T!==z||dl?(typeof N=="function"&&(kc(t,n,N,l),z=t.memoizedState),(m=dl||Xf(t,n,m,l,T,z,r))?(O||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=r,l=m):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,rc(e,t),r=t.memoizedProps,O=Zl(n,r),i.props=O,N=t.pendingProps,T=i.context,z=n.contextType,m=ha,typeof z=="object"&&z!==null&&(m=_t(z)),d=n.getDerivedStateFromProps,(z=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==N||T!==m)&&Qf(t,i,l,m),dl=!1,T=t.memoizedState,i.state=T,ci(t,l,i,a),ri();var E=t.memoizedState;r!==N||T!==E||dl||e!==null&&e.dependencies!==null&&uo(e.dependencies)?(typeof d=="function"&&(kc(t,n,d,l),E=t.memoizedState),(O=dl||Xf(t,n,O,l,T,E,m)||e!==null&&e.dependencies!==null&&uo(e.dependencies))?(z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,E,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,E,m)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=E),i.props=l,i.state=E,i.context=m,l=O):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,ko(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Xl(t,e.child,null,a),t.child=Xl(t,null,n,a)):Ot(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Kn(e,t,a),e}function od(e,t,n,l){return Bl(),t.flags|=256,Ot(e,t,n,l),t.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hc(e){return{baseLanes:e,cachePool:Ju()}}function Nc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=on),e}function rd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,r;if((r=i)||(r=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),r&&(a=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(a?ml(t):gl(),(e=rt)?(e=m0(e,yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cl!==null?{id:En,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},n=ju(e),n.return=t,t.child=n,kt=t,rt=null)):e=null,e===null)throw ul(t);return bs(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(gl(),a=t.mode,d=_o({mode:"hidden",children:d},a),l=Nl(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Hc(n),l.childLanes=Nc(e,r,n),t.memoizedState=Uc,hi(null,l)):(ml(t),Bc(t,d))}var m=e.memoizedState;if(m!==null&&(d=m.dehydrated,d!==null)){if(i)t.flags&256?(ml(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState!==null?(gl(),t.child=e.child,t.flags|=128,t=null):(gl(),d=l.fallback,a=t.mode,l=_o({mode:"visible",children:l.children},a),d=Nl(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,Xl(t,e.child,null,n),l=t.child,l.memoizedState=Hc(n),l.childLanes=Nc(e,r,n),t.memoizedState=Uc,t=hi(null,l));else if(ml(t),bs(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var z=r.dgst;r=z,l=Error(u(419)),l.stack="",l.digest=r,ti({value:l,source:null,stack:null}),t=jc(e,t,n)}else if(xt||ya(e,t,n,!1),r=(n&e.childLanes)!==0,xt||r){if(r=lt,r!==null&&(l=Nn(r,n),l!==0&&l!==m.retryLane))throw m.retryLane=l,Hl(e,l),$t(r,e,l),Rc;vs(d)||qo(),t=jc(e,t,n)}else vs(d)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,rt=bn(d.nextSibling),kt=t,Ve=!0,sl=null,yn=!1,e!==null&&Gu(t,e),t=Bc(t,l.children),t.flags|=4096);return t}return a?(gl(),d=l.fallback,a=t.mode,m=e.child,z=m.sibling,l=Yn(m,{mode:"hidden",children:l.children}),l.subtreeFlags=m.subtreeFlags&65011712,z!==null?d=Yn(z,d):(d=Nl(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,hi(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Hc(n):(a=d.cachePool,a!==null?(m=vt._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=Ju(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=Nc(e,r,n),t.memoizedState=Uc,hi(e.child,l)):(ml(t),n=e.child,e=n.sibling,n=Yn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Bc(e,t){return t=_o({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _o(e,t){return e=tn(22,e,null,t),e.lanes=0,e}function jc(e,t,n){return Xl(t,e.child,null,n),e=Bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ec(e.return,t,n)}function qc(e,t,n,l,a,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=n,r.tailMode=a,r.treeForkCount=i)}function sd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var r=gt.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,Q(gt,r),Ot(e,t,l,n),l=Ve?ei:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cd(e,n,t);else if(e.tag===19)cd(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(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&bo(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),qc(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&bo(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}qc(t,!0,n,null,i,l);break;case"together":qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),bl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ya(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Yn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Yc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&uo(e)))}function Hp(e,t,n){switch(t.tag){case 3:ot(t,t.stateNode.containerInfo),fl(t,vt,e.memoizedState.cache),Bl();break;case 27:case 5:Sn(t);break;case 4:ot(t,t.stateNode.containerInfo);break;case 10:fl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,dc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ml(t),t.flags|=128,null):(n&t.child.childLanes)!==0?rd(e,t,n):(ml(t),e=Kn(e,t,n),e!==null?e.sibling:null);ml(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(ya(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return sd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Q(gt,gt.current),l)break;return null;case 22:return t.lanes=0,td(e,t,n,t.pendingProps);case 24:fl(t,vt,e.memoizedState.cache)}return Kn(e,t,n)}function ud(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!Yc(e,n)&&(t.flags&128)===0)return xt=!1,Hp(e,t,n);xt=(e.flags&131072)!==0}else xt=!1,Ve&&(t.flags&1048576)!==0&&Yu(t,ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Gl(t.elementType),t.type=e,typeof e=="function")Zr(e)?(l=Zl(e,l),t.tag=1,t=id(null,t,e,l,n)):(t.tag=0,t=Lc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=If(null,t,e,l,n);break e}else if(a===Y){t.tag=14,t=Pf(null,t,e,l,n);break e}}throw t=We(e)||e,Error(u(306,t,""))}}return t;case 0:return Lc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=Zl(l,t.pendingProps),id(e,t,l,a,n);case 3:e:{if(ot(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,rc(e,t),ci(t,l,null,n);var r=t.memoizedState;if(l=r.cache,fl(t,vt,l),l!==i.cache&&tc(t,[vt],n,!0),ri(),l=r.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=od(e,t,l,n);break e}else if(l!==a){a=pn(Error(u(424)),t),ti(a),t=od(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,rt=bn(e.firstChild),kt=t,Ve=!0,sl=null,yn=!0,n=ef(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Bl(),l===a){t=Kn(e,t,n);break e}Ot(e,t,l,n)}t=t.child}return t;case 26:return ko(e,t),e===null?(n=S0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ve||(n=t.type,e=t.pendingProps,l=Ko(oe.current).createElement(n),l[$]=t,l[be]=e,Rt(l,n,e),ft(l),t.stateNode=l):t.memoizedState=S0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Sn(t),e===null&&Ve&&(l=t.stateNode=v0(t.type,t.pendingProps,oe.current),kt=t,yn=!0,a=rt,zl(t.type)?(xs=a,rt=bn(l.firstChild)):rt=a),Ot(e,t,t.pendingProps.children,n),ko(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((a=l=rt)&&(l=dm(l,t.type,t.pendingProps,yn),l!==null?(t.stateNode=l,kt=t,rt=bn(l.firstChild),yn=!1,a=!0):a=!1),a||ul(t)),Sn(t),a=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,l=i.children,ms(a,i)?l=null:r!==null&&ms(a,r)&&(t.flags|=32),t.memoizedState!==null&&(a=pc(e,t,Ap,null,null,n),Ei._currentValue=a),ko(e,t),Ot(e,t,l,n),t.child;case 6:return e===null&&Ve&&((e=n=rt)&&(n=hm(n,t.pendingProps,yn),n!==null?(t.stateNode=n,kt=t,rt=null,e=!0):e=!1),e||ul(t)),null;case 13:return rd(e,t,n);case 4:return ot(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Xl(t,null,l,n):Ot(e,t,l,n),t.child;case 11:return If(e,t,t.type,t.pendingProps,n);case 7:return Ot(e,t,t.pendingProps,n),t.child;case 8:return Ot(e,t,t.pendingProps.children,n),t.child;case 12:return Ot(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,fl(t,t.type,l.value),Ot(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,ql(t),a=_t(a),l=l(a),t.flags|=1,Ot(e,t,l,n),t.child;case 14:return Pf(e,t,t.type,t.pendingProps,n);case 15:return ed(e,t,t.type,t.pendingProps,n);case 19:return sd(e,t,n);case 31:return Up(e,t,n);case 22:return td(e,t,n,t.pendingProps);case 24:return ql(t),l=_t(vt),e===null?(a=ac(),a===null&&(a=lt,i=nc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},oc(t),fl(t,vt,a)):((e.lanes&n)!==0&&(rc(e,t),ci(t,null,null,n),ri()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),fl(t,vt,l)):(l=i.cache,fl(t,vt,l),l!==a.cache&&tc(t,[vt],n,!0))),Ot(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Jn(e){e.flags|=4}function Gc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Nd())e.flags|=8192;else throw Vl=mo,ic}else e.flags&=-16777217}function fd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!T0(t))if(Nd())e.flags|=8192;else throw Vl=mo,ic}function Oo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Zi():536870912,e.lanes|=t,Da|=t)}function pi(e,t){if(!Ve)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 l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Np(e,t,n){var l=t.pendingProps;switch($r(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Xn(vt),at(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ga(t)?Jn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ir())),ct(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Jn(t),i!==null?(ct(t),fd(t,i)):(ct(t),Gc(t,a,null,l,n))):i?i!==e.memoizedState?(Jn(t),ct(t),fd(t,i)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Jn(t),ct(t),Gc(t,a,e,l,n)),null;case 27:if(we(t),n=oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Jn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return ct(t),null}e=q.current,ga(t)?Vu(t):(e=v0(a,l,n),t.stateNode=e,Jn(t))}return ct(t),null;case 5:if(we(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Jn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return ct(t),null}if(i=q.current,ga(t))Vu(t);else{var r=Ko(oe.current);switch(i){case 1:i=r.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=r.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=r.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?r.createElement(a,{is:l.is}):r.createElement(a)}}i[$]=t,i[be]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(Rt(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Jn(t)}}return ct(t),Gc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Jn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=oe.current,ga(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=kt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[$]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||r0(e.nodeValue,n)),e||ul(t,!0)}else e=Ko(e).createTextNode(l),e[$]=t,t.stateNode=e}return ct(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ga(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[$]=t}else Bl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else n=Ir(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ln(t),t):(ln(t),null);if((t.flags&128)!==0)throw Error(u(558))}return ct(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ga(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(u(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(u(317));a[$]=t}else Bl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),a=!1}else a=Ir(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ln(t),t):(ln(t),null)}return ln(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Oo(t,t.updateQueue),ct(t),null);case 4:return at(),e===null&&us(t.stateNode.containerInfo),ct(t),null;case 10:return Xn(t.type),ct(t),null;case 19:if(_(gt),l=t.memoizedState,l===null)return ct(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)pi(l,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=bo(e),i!==null){for(t.flags|=128,pi(l,!1),e=i.updateQueue,t.updateQueue=e,Oo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bu(n,e),n=n.sibling;return Q(gt,gt.current&1|2),Ve&&Gn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Dt()>No&&(t.flags|=128,a=!0,pi(l,!1),t.lanes=4194304)}else{if(!a)if(e=bo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Oo(t,e),pi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Ve)return ct(t),null}else 2*Dt()-l.renderingStartTime>No&&n!==536870912&&(t.flags|=128,a=!0,pi(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Dt(),e.sibling=null,n=gt.current,Q(gt,a?n&1|2:n&1),Ve&&Gn(t,l.treeForkCount),e):(ct(t),null);case 22:case 23:return ln(t),fc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),n=t.updateQueue,n!==null&&Oo(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&_(Yl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xn(vt),ct(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Bp(e,t){switch($r(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(vt),at(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(ln(t),t.alternate===null)throw Error(u(340));Bl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Bl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(gt),null;case 4:return at(),null;case 10:return Xn(t.type),null;case 22:case 23:return ln(t),fc(),e!==null&&_(Yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xn(vt),null;case 25:return null;default:return null}}function dd(e,t){switch($r(t),t.tag){case 3:Xn(vt),at();break;case 26:case 27:case 5:we(t);break;case 4:at();break;case 31:t.memoizedState!==null&&ln(t);break;case 13:ln(t);break;case 19:_(gt);break;case 10:Xn(t.type);break;case 22:case 23:ln(t),fc(),e!==null&&_(Yl);break;case 24:Xn(vt)}}function mi(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,r=n.inst;l=i(),r.destroy=l}n=n.next}while(n!==a)}}catch(d){Pe(t,t.return,d)}}function yl(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var r=l.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,a=t;var m=n,z=d;try{z()}catch(O){Pe(a,m,O)}}}l=l.next}while(l!==i)}}catch(O){Pe(t,t.return,O)}}function hd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{nf(t,n)}catch(l){Pe(e,e.return,l)}}}function pd(e,t,n){n.props=Zl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Pe(e,t,l)}}function gi(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Pe(e,t,a)}}function kn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Pe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Pe(e,t,a)}else n.current=null}function md(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Pe(e,e.return,a)}}function Vc(e,t,n){try{var l=e.stateNode;om(l,e.type,n,t),l[be]=t}catch(a){Pe(e,e.return,a)}}function gd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zl(e.type)||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gd(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&&zl(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 Qc(e,t,n){var l=e.tag;if(l===5||l===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=jn));else if(l!==4&&(l===27&&zl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function Ro(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&zl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ro(e,t,n),e=e.sibling;e!==null;)Ro(e,t,n),e=e.sibling}function yd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Rt(t,l,n),t[$]=e,t[be]=n}catch(i){Pe(e,e.return,i)}}var Fn=!1,St=!1,Zc=!1,vd=typeof WeakSet=="function"?WeakSet:Set,At=null;function jp(e,t){if(e=e.containerInfo,hs=er,e=Du(e),jr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var r=0,d=-1,m=-1,z=0,O=0,N=e,T=null;t:for(;;){for(var E;N!==n||a!==0&&N.nodeType!==3||(d=r+a),N!==i||l!==0&&N.nodeType!==3||(m=r+l),N.nodeType===3&&(r+=N.nodeValue.length),(E=N.firstChild)!==null;)T=N,N=E;for(;;){if(N===e)break t;if(T===n&&++z===a&&(d=r),T===i&&++O===l&&(m=r),(E=N.nextSibling)!==null)break;N=T,T=N.parentNode}N=E}n=d===-1||m===-1?null:{start:d,end:m}}else n=null}n=n||{start:0,end:0}}else n=null;for(ps={focusedElem:e,selectionRange:n},er=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,i=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++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var ae=Zl(n.type,a);e=l.getSnapshotBeforeUpdate(ae,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Pe(n,n.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ys(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ys(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,At=e;break}At=t.return}}function bd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n),l&4&&mi(5,n);break;case 1:if(Wn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){Pe(n,n.return,r)}else{var a=Zl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Pe(n,n.return,r)}}l&64&&hd(n),l&512&&gi(n,n.return);break;case 3:if(Wn(e,n),l&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{nf(e,t)}catch(r){Pe(n,n.return,r)}}break;case 27:t===null&&l&4&&yd(n);case 26:case 5:Wn(e,n),t===null&&l&4&&md(n),l&512&&gi(n,n.return);break;case 12:Wn(e,n);break;case 31:Wn(e,n),l&4&&Cd(e,n);break;case 13:Wn(e,n),l&4&&wd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Jp.bind(null,n),pm(e,n))));break;case 22:if(l=n.memoizedState!==null||Fn,!l){t=t!==null&&t.memoizedState!==null||St,a=Fn;var i=St;Fn=l,(St=t)&&!i?In(e,n,(n.subtreeFlags&8772)!==0):Wn(e,n),Fn=a,St=i}break;case 30:break;default:Wn(e,n)}}function xd(e){var t=e.alternate;t!==null&&(e.alternate=null,xd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 ut=null,Zt=!1;function $n(e,t,n){for(n=n.child;n!==null;)Sd(e,t,n),n=n.sibling}function Sd(e,t,n){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(il,n)}catch{}switch(n.tag){case 26:St||kn(n,t),$n(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:St||kn(n,t);var l=ut,a=Zt;zl(n.type)&&(ut=n.stateNode,Zt=!1),$n(e,t,n),Mi(n.stateNode),ut=l,Zt=a;break;case 5:St||kn(n,t);case 6:if(l=ut,a=Zt,ut=null,$n(e,t,n),ut=l,Zt=a,ut!==null)if(Zt)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(n.stateNode)}catch(i){Pe(n,t,i)}else try{ut.removeChild(n.stateNode)}catch(i){Pe(n,t,i)}break;case 18:ut!==null&&(Zt?(e=ut,h0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Na(e)):h0(ut,n.stateNode));break;case 4:l=ut,a=Zt,ut=n.stateNode.containerInfo,Zt=!0,$n(e,t,n),ut=l,Zt=a;break;case 0:case 11:case 14:case 15:yl(2,n,t),St||yl(4,n,t),$n(e,t,n);break;case 1:St||(kn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&pd(n,t,l)),$n(e,t,n);break;case 21:$n(e,t,n);break;case 22:St=(l=St)||n.memoizedState!==null,$n(e,t,n),St=l;break;default:$n(e,t,n)}}function Cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Na(e)}catch(n){Pe(t,t.return,n)}}}function wd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Na(e)}catch(n){Pe(t,t.return,n)}}function qp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vd),t;default:throw Error(u(435,e.tag))}}function Lo(e,t){var n=qp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Fp.bind(null,e,l);l.then(a,a)}})}function Kt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(zl(d.type)){ut=d.stateNode,Zt=!1;break e}break;case 5:ut=d.stateNode,Zt=!1;break e;case 3:case 4:ut=d.stateNode.containerInfo,Zt=!0;break e}d=d.return}if(ut===null)throw Error(u(160));Sd(i,r,a),ut=null,Zt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zd(t,e),t=t.sibling}var Mn=null;function zd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),Jt(e),l&4&&(yl(3,e,e.return),mi(3,e),yl(5,e,e.return));break;case 1:Kt(t,e),Jt(e),l&512&&(St||n===null||kn(n,n.return)),l&64&&Fn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Mn;if(Kt(t,e),Jt(e),l&512&&(St||n===null||kn(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ze]||i[$]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Rt(i,l,n),i[$]=e,ft(i),l=i;break e;case"link":var r=z0("link","href",a).get(l+(n.href||""));if(r){for(var d=0;d<r.length;d++)if(i=r[d],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(d,1);break t}}i=a.createElement(l),Rt(i,l,n),a.head.appendChild(i);break;case"meta":if(r=z0("meta","content",a).get(l+(n.content||""))){for(d=0;d<r.length;d++)if(i=r[d],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(d,1);break t}}i=a.createElement(l),Rt(i,l,n),a.head.appendChild(i);break;default:throw Error(u(468,l))}i[$]=e,ft(i),l=i}e.stateNode=l}else M0(a,e.type,e.stateNode);else e.stateNode=w0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?M0(a,e.type,e.stateNode):w0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Kt(t,e),Jt(e),l&512&&(St||n===null||kn(n,n.return)),n!==null&&l&4&&Vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Kt(t,e),Jt(e),l&512&&(St||n===null||kn(n,n.return)),e.flags&32){a=e.stateNode;try{oa(a,"")}catch(ae){Pe(e,e.return,ae)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Vc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Zc=!0);break;case 6:if(Kt(t,e),Jt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ae){Pe(e,e.return,ae)}}break;case 3:if($o=null,a=Mn,Mn=Jo(t.containerInfo),Kt(t,e),Mn=a,Jt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Na(t.containerInfo)}catch(ae){Pe(e,e.return,ae)}Zc&&(Zc=!1,Md(e));break;case 4:l=Mn,Mn=Jo(e.stateNode.containerInfo),Kt(t,e),Jt(e),Mn=l;break;case 12:Kt(t,e),Jt(e);break;case 31:Kt(t,e),Jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 13:Kt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ho=Dt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 22:a=e.memoizedState!==null;var m=n!==null&&n.memoizedState!==null,z=Fn,O=St;if(Fn=z||a,St=O||m,Kt(t,e),St=O,Fn=z,Jt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||m||Fn||St||Kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){m=n=t;try{if(i=m.stateNode,a)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=m.stateNode;var N=m.memoizedProps.style,T=N!=null&&N.hasOwnProperty("display")?N.display:null;d.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ae){Pe(m,m.return,ae)}}}else if(t.tag===6){if(n===null){m=t;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(ae){Pe(m,m.return,ae)}}}else if(t.tag===18){if(n===null){m=t;try{var E=m.stateNode;a?p0(E,!0):p0(m.stateNode,!1)}catch(ae){Pe(m,m.return,ae)}}}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}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Lo(e,n))));break;case 19:Kt(t,e),Jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 30:break;case 21:break;default:Kt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(gd(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var a=n.stateNode,i=Xc(e);Ro(e,i,a);break;case 5:var r=n.stateNode;n.flags&32&&(oa(r,""),n.flags&=-33);var d=Xc(e);Ro(e,d,r);break;case 3:case 4:var m=n.stateNode.containerInfo,z=Xc(e);Qc(e,z,m);break;default:throw Error(u(161))}}catch(O){Pe(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Md(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Md(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bd(e,t.alternate,t),t=t.sibling}function Kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:yl(4,t,t.return),Kl(t);break;case 1:kn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&pd(t,t.return,n),Kl(t);break;case 27:Mi(t.stateNode);case 26:case 5:kn(t,t.return),Kl(t);break;case 22:t.memoizedState===null&&Kl(t);break;case 30:Kl(t);break;default:Kl(t)}e=e.sibling}}function In(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,r=i.flags;switch(i.tag){case 0:case 11:case 15:In(a,i,n),mi(4,i);break;case 1:if(In(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(z){Pe(l,l.return,z)}if(l=i,a=l.updateQueue,a!==null){var d=l.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)tf(m[a],d)}catch(z){Pe(l,l.return,z)}}n&&r&64&&hd(i),gi(i,i.return);break;case 27:yd(i);case 26:case 5:In(a,i,n),n&&l===null&&r&4&&md(i),gi(i,i.return);break;case 12:In(a,i,n);break;case 31:In(a,i,n),n&&r&4&&Cd(a,i);break;case 13:In(a,i,n),n&&r&4&&wd(a,i);break;case 22:i.memoizedState===null&&In(a,i,n),gi(i,i.return);break;case 30:break;default:In(a,i,n)}t=t.sibling}}function Kc(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&&ni(n))}function Jc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e))}function Tn(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Td(e,t,n,l),t=t.sibling}function Td(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Tn(e,t,n,l),a&2048&&mi(9,t);break;case 1:Tn(e,t,n,l);break;case 3:Tn(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e)));break;case 12:if(a&2048){Tn(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,d=i.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){Pe(t,t.return,m)}}else Tn(e,t,n,l);break;case 31:Tn(e,t,n,l);break;case 13:Tn(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?Tn(e,t,n,l):yi(e,t):i._visibility&2?Tn(e,t,n,l):(i._visibility|=2,Ta(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Kc(r,t);break;case 24:Tn(e,t,n,l),a&2048&&Jc(t.alternate,t);break;default:Tn(e,t,n,l)}}function Ta(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,d=n,m=l,z=r.flags;switch(r.tag){case 0:case 11:case 15:Ta(i,r,d,m,a),mi(8,r);break;case 23:break;case 22:var O=r.stateNode;r.memoizedState!==null?O._visibility&2?Ta(i,r,d,m,a):yi(i,r):(O._visibility|=2,Ta(i,r,d,m,a)),a&&z&2048&&Kc(r.alternate,r);break;case 24:Ta(i,r,d,m,a),a&&z&2048&&Jc(r.alternate,r);break;default:Ta(i,r,d,m,a)}t=t.sibling}}function yi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:yi(n,l),a&2048&&Kc(l.alternate,l);break;case 24:yi(n,l),a&2048&&Jc(l.alternate,l);break;default:yi(n,l)}t=t.sibling}}var vi=8192;function Aa(e,t,n){if(e.subtreeFlags&vi)for(e=e.child;e!==null;)Ad(e,t,n),e=e.sibling}function Ad(e,t,n){switch(e.tag){case 26:Aa(e,t,n),e.flags&vi&&e.memoizedState!==null&&Tm(n,Mn,e.memoizedState,e.memoizedProps);break;case 5:Aa(e,t,n);break;case 3:case 4:var l=Mn;Mn=Jo(e.stateNode.containerInfo),Aa(e,t,n),Mn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=vi,vi=16777216,Aa(e,t,n),vi=l):Aa(e,t,n));break;default:Aa(e,t,n)}}function Ed(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 bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];At=l,kd(l,e)}Ed(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dd(e),e=e.sibling}function Dd(e){switch(e.tag){case 0:case 11:case 15:bi(e),e.flags&2048&&yl(9,e,e.return);break;case 3:bi(e);break;case 12:bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Uo(e)):bi(e);break;default:bi(e)}}function Uo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];At=l,kd(l,e)}Ed(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:yl(8,t,t.return),Uo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Uo(t));break;default:Uo(t)}e=e.sibling}}function kd(e,t){for(;At!==null;){var n=At;switch(n.tag){case 0:case 11:case 15:yl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ni(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,At=l;else e:for(n=e;At!==null;){l=At;var a=l.sibling,i=l.return;if(xd(l),l===n){At=null;break e}if(a!==null){a.return=i,At=a;break e}At=i}}}var Yp={getCacheForType:function(e){var t=_t(vt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _t(vt).controller.signal}},Gp=typeof WeakMap=="function"?WeakMap:Map,Ze=0,lt=null,je=null,Ye=0,Ie=0,an=null,vl=!1,Ea=!1,Fc=!1,Pn=0,ht=0,bl=0,Jl=0,$c=0,on=0,Da=0,xi=null,Ft=null,Wc=!1,Ho=0,_d=0,No=1/0,Bo=null,xl=null,Mt=0,Sl=null,ka=null,el=0,Ic=0,Pc=null,Od=null,Si=0,es=null;function rn(){return(Ze&2)!==0&&Ye!==0?Ye&-Ye:A.T!==null?os():re()}function Rd(){if(on===0)if((Ye&536870912)===0||Ve){var e=Pl;Pl<<=1,(Pl&3932160)===0&&(Pl=262144),on=e}else on=536870912;return e=nn.current,e!==null&&(e.flags|=32),on}function $t(e,t,n){(e===lt&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(_a(e,0),Cl(e,Ye,on,!1)),Vt(e,n),((Ze&2)===0||e!==lt)&&(e===lt&&((Ze&2)===0&&(Jl|=n),ht===4&&Cl(e,Ye,on,!1)),_n(e))}function Ld(e,t,n){if((Ze&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ol(e,t),a=l?Qp(e,t):ns(e,t,!0),i=l;do{if(a===0){Ea&&!l&&Cl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Vp(n)){a=ns(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;a=xi;var m=d.current.memoizedState.isDehydrated;if(m&&(_a(d,r).flags|=256),r=ns(d,r,!1),r!==2){if(Fc&&!m){d.errorRecoveryDisabledLanes|=i,Jl|=i,a=4;break e}i=Ft,Ft=a,i!==null&&(Ft===null?Ft=i:Ft.push.apply(Ft,i))}a=r}if(i=!1,a!==2)continue}}if(a===1){_a(e,0),Cl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Cl(l,t,on,!vl);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(a=Ho+300-Dt(),10<a)){if(Cl(l,t,on,!vl),ta(l,0,!0)!==0)break e;el=t,l.timeoutHandle=f0(Ud.bind(null,l,n,Ft,Bo,Wc,t,on,Jl,Da,vl,i,"Throttled",-0,0),a);break e}Ud(l,n,Ft,Bo,Wc,t,on,Jl,Da,vl,i,null,-0,0)}}break}while(!0);_n(e)}function Ud(e,t,n,l,a,i,r,d,m,z,O,N,T,E){if(e.timeoutHandle=-1,N=t.subtreeFlags,N&8192||(N&16785408)===16785408){N={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jn},Ad(t,i,N);var ae=(i&62914560)===i?Ho-Dt():(i&4194048)===i?_d-Dt():0;if(ae=Am(N,ae),ae!==null){el=i,e.cancelPendingCommit=ae(Vd.bind(null,e,t,i,n,l,a,r,d,m,O,N,null,T,E)),Cl(e,i,r,!z);return}}Vd(e,t,i,n,l,a,r,d,m)}function Vp(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 l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!en(i(),a))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 Cl(e,t,n,l){t&=~$c,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-Yt(a),r=1<<i;l[i]=-1,a&=~r}n!==0&&na(e,n,t)}function jo(){return(Ze&6)===0?(Ci(0),!1):!0}function ts(){if(je!==null){if(Ie===0)var e=je.return;else e=je,Vn=jl=null,yc(e),Sa=null,ai=0,e=je;for(;e!==null;)dd(e.alternate,e),e=e.return;je=null}}function _a(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),el=0,ts(),lt=e,je=n=Yn(e.current,null),Ye=t,Ie=0,an=null,vl=!1,Ea=ol(e,t),Fc=!1,Da=on=$c=Jl=bl=ht=0,Ft=xi=null,Wc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Yt(l),i=1<<a;t|=e[a],l&=~i}return Pn=t,io(),n}function Hd(e,t){Re=null,A.H=di,t===xa||t===po?(t=Wu(),Ie=3):t===ic?(t=Wu(),Ie=4):Ie=t===Rc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,je===null&&(ht=1,Eo(e,pn(t,e.current)))}function Nd(){var e=nn.current;return e===null?!0:(Ye&4194048)===Ye?vn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===vn:!1}function Bd(){var e=A.H;return A.H=di,e===null?di:e}function jd(){var e=A.A;return A.A=Yp,e}function qo(){ht=4,vl||(Ye&4194048)!==Ye&&nn.current!==null||(Ea=!0),(bl&134217727)===0&&(Jl&134217727)===0||lt===null||Cl(lt,Ye,on,!1)}function ns(e,t,n){var l=Ze;Ze|=2;var a=Bd(),i=jd();(lt!==e||Ye!==t)&&(Bo=null,_a(e,t)),t=!1;var r=ht;e:do try{if(Ie!==0&&je!==null){var d=je,m=an;switch(Ie){case 8:ts(),r=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(t=!0);var z=Ie;if(Ie=0,an=null,Oa(e,d,m,z),n&&Ea){r=0;break e}break;default:z=Ie,Ie=0,an=null,Oa(e,d,m,z)}}Xp(),r=ht;break}catch(O){Hd(e,O)}while(!0);return t&&e.shellSuspendCounter++,Vn=jl=null,Ze=l,A.H=a,A.A=i,je===null&&(lt=null,Ye=0,io()),r}function Xp(){for(;je!==null;)qd(je)}function Qp(e,t){var n=Ze;Ze|=2;var l=Bd(),a=jd();lt!==e||Ye!==t?(Bo=null,No=Dt()+500,_a(e,t)):Ea=ol(e,t);e:do try{if(Ie!==0&&je!==null){t=je;var i=an;t:switch(Ie){case 1:Ie=0,an=null,Oa(e,t,i,1);break;case 2:case 9:if(Fu(i)){Ie=0,an=null,Yd(t);break}t=function(){Ie!==2&&Ie!==9||lt!==e||(Ie=7),_n(e)},i.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Fu(i)?(Ie=0,an=null,Yd(t)):(Ie=0,an=null,Oa(e,t,i,7));break;case 5:var r=null;switch(je.tag){case 26:r=je.memoizedState;case 5:case 27:var d=je;if(r?T0(r):d.stateNode.complete){Ie=0,an=null;var m=d.sibling;if(m!==null)je=m;else{var z=d.return;z!==null?(je=z,Yo(z)):je=null}break t}}Ie=0,an=null,Oa(e,t,i,5);break;case 6:Ie=0,an=null,Oa(e,t,i,6);break;case 8:ts(),ht=6;break e;default:throw Error(u(462))}}Zp();break}catch(O){Hd(e,O)}while(!0);return Vn=jl=null,A.H=l,A.A=a,Ze=n,je!==null?0:(lt=null,Ye=0,io(),ht)}function Zp(){for(;je!==null&&!al();)qd(je)}function qd(e){var t=ud(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,t===null?Yo(e):je=t}function Yd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=ad(n,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=ad(n,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:yc(t);default:dd(n,t),t=je=Bu(t,Pn),t=ud(n,t,Pn)}e.memoizedProps=e.pendingProps,t===null?Yo(e):je=t}function Oa(e,t,n,l){Vn=jl=null,yc(t),Sa=null,ai=0;var a=t.return;try{if(Lp(e,a,t,n,Ye)){ht=1,Eo(e,pn(n,e.current)),je=null;return}}catch(i){if(a!==null)throw je=a,i;ht=1,Eo(e,pn(n,e.current)),je=null;return}t.flags&32768?(Ve||l===1?e=!0:Ea||(Ye&536870912)!==0?e=!1:(vl=e=!0,(l===2||l===9||l===3||l===6)&&(l=nn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Gd(t,e)):Yo(t)}function Yo(e){var t=e;do{if((t.flags&32768)!==0){Gd(t,vl);return}e=t.return;var n=Np(t.alternate,t,Pn);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);ht===0&&(ht=5)}function Gd(e,t){do{var n=Bp(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);ht=6,je=null}function Vd(e,t,n,l,a,i,r,d,m){e.cancelPendingCommit=null;do Go();while(Mt!==0);if((Ze&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Xr,Cr(e,n,i,r,d,m),e===lt&&(je=lt=null,Ye=0),ka=t,Sl=e,el=n,Ic=i,Pc=a,Od=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$p(Wl,function(){return Jd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=A.T,A.T=null,a=j.p,j.p=2,r=Ze,Ze|=4;try{jp(e,t,n)}finally{Ze=r,j.p=a,A.T=l}}Mt=1,Xd(),Qd(),Zd()}}function Xd(){if(Mt===1){Mt=0;var e=Sl,t=ka,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=A.T,A.T=null;var l=j.p;j.p=2;var a=Ze;Ze|=4;try{zd(t,e);var i=ps,r=Du(e.containerInfo),d=i.focusedElem,m=i.selectionRange;if(r!==d&&d&&d.ownerDocument&&Eu(d.ownerDocument.documentElement,d)){if(m!==null&&jr(d)){var z=m.start,O=m.end;if(O===void 0&&(O=z),"selectionStart"in d)d.selectionStart=z,d.selectionEnd=Math.min(O,d.value.length);else{var N=d.ownerDocument||document,T=N&&N.defaultView||window;if(T.getSelection){var E=T.getSelection(),ae=d.textContent.length,Se=Math.min(m.start,ae),nt=m.end===void 0?Se:Math.min(m.end,ae);!E.extend&&Se>nt&&(r=nt,nt=Se,Se=r);var C=Au(d,Se),v=Au(d,nt);if(C&&v&&(E.rangeCount!==1||E.anchorNode!==C.node||E.anchorOffset!==C.offset||E.focusNode!==v.node||E.focusOffset!==v.offset)){var w=N.createRange();w.setStart(C.node,C.offset),E.removeAllRanges(),Se>nt?(E.addRange(w),E.extend(v.node,v.offset)):(w.setEnd(v.node,v.offset),E.addRange(w))}}}}for(N=[],E=d;E=E.parentNode;)E.nodeType===1&&N.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<N.length;d++){var H=N[d];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}er=!!hs,ps=hs=null}finally{Ze=a,j.p=l,A.T=n}}e.current=t,Mt=2}}function Qd(){if(Mt===2){Mt=0;var e=Sl,t=ka,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=A.T,A.T=null;var l=j.p;j.p=2;var a=Ze;Ze|=4;try{bd(e,t.alternate,t)}finally{Ze=a,j.p=l,A.T=n}}Mt=3}}function Zd(){if(Mt===4||Mt===3){Mt=0,wn();var e=Sl,t=ka,n=el,l=Od;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,ka=Sl=null,Kd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(xl=null),Xa(n),t=t.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(il,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=A.T,a=j.p,j.p=2,A.T=null;try{for(var i=e.onRecoverableError,r=0;r<l.length;r++){var d=l[r];i(d.value,{componentStack:d.stack})}}finally{A.T=t,j.p=a}}(el&3)!==0&&Go(),_n(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===es?Si++:(Si=0,es=e):Si=0,Ci(0)}}function Kd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ni(t)))}function Go(){return Xd(),Qd(),Zd(),Jd()}function Jd(){if(Mt!==5)return!1;var e=Sl,t=Ic;Ic=0;var n=Xa(el),l=A.T,a=j.p;try{j.p=32>n?32:n,A.T=null,n=Pc,Pc=null;var i=Sl,r=el;if(Mt=0,ka=Sl=null,el=0,(Ze&6)!==0)throw Error(u(331));var d=Ze;if(Ze|=4,Dd(i.current),Td(i,i.current,r,n),Ze=d,Ci(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(il,i)}catch{}return!0}finally{j.p=a,A.T=l,Kd(e,t)}}function Fd(e,t,n){t=pn(n,t),t=Oc(e.stateNode,t,2),e=pl(e,t,2),e!==null&&(Vt(e,2),_n(e))}function Pe(e,t,n){if(e.tag===3)Fd(e,e,n);else for(;t!==null;){if(t.tag===3){Fd(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(xl===null||!xl.has(l))){e=pn(n,e),n=$f(2),l=pl(t,n,2),l!==null&&(Wf(n,l,t,e),Vt(l,2),_n(l));break}}t=t.return}}function ls(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Gp;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(Fc=!0,a.add(n),e=Kp.bind(null,e,t,n),t.then(e,e))}function Kp(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lt===e&&(Ye&n)===n&&(ht===4||ht===3&&(Ye&62914560)===Ye&&300>Dt()-Ho?(Ze&2)===0&&_a(e,0):$c|=n,Da===Ye&&(Da=0)),_n(e)}function $d(e,t){t===0&&(t=Zi()),e=Hl(e,t),e!==null&&(Vt(e,t),_n(e))}function Jp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$d(e,n)}function Fp(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),$d(e,n)}function $p(e,t){return An(e,t)}var Vo=null,Ra=null,as=!1,Xo=!1,is=!1,wl=0;function _n(e){e!==Ra&&e.next===null&&(Ra===null?Vo=Ra=e:Ra=Ra.next=e),Xo=!0,as||(as=!0,Ip())}function Ci(e,t){if(!is&&Xo){is=!0;do for(var n=!1,l=Vo;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var r=l.suspendedLanes,d=l.pingedLanes;i=(1<<31-Yt(42|e)+1)-1,i&=a&~(r&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,e0(l,i))}else i=Ye,i=ta(l,l===lt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||ol(l,i)||(n=!0,e0(l,i));l=l.next}while(n);is=!1}}function Wp(){Wd()}function Wd(){Xo=as=!1;var e=0;wl!==0&&cm()&&(e=wl);for(var t=Dt(),n=null,l=Vo;l!==null;){var a=l.next,i=Id(l,t);i===0?(l.next=null,n===null?Vo=a:n.next=a,a===null&&(Ra=n)):(n=l,(e!==0||(i&3)!==0)&&(Xo=!0)),l=a}Mt!==0&&Mt!==5||Ci(e),wl!==0&&(wl=0)}function Id(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var r=31-Yt(i),d=1<<r,m=a[r];m===-1?((d&n)===0||(d&l)!==0)&&(a[r]=_l(d,t)):m<=t&&(e.expiredLanes|=d),i&=~d}if(t=lt,n=Ye,n=ta(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&It(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||ol(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&It(l),Xa(n)){case 2:case 8:n=Vi;break;case 32:n=Wl;break;case 268435456:n=Xi;break;default:n=Wl}return l=Pd.bind(null,e),n=An(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&It(l),e.callbackPriority=2,e.callbackNode=null,2}function Pd(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Go()&&e.callbackNode!==n)return null;var l=Ye;return l=ta(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Ld(e,l,t),Id(e,Dt()),e.callbackNode!=null&&e.callbackNode===n?Pd.bind(null,e):null)}function e0(e,t){if(Go())return null;Ld(e,t,!0)}function Ip(){um(function(){(Ze&6)!==0?An(Ga,Wp):Wd()})}function os(){if(wl===0){var e=va;e===0&&(e=Il,Il<<=1,(Il&261888)===0&&(Il=256)),wl=e}return wl}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wi(""+e)}function n0(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 Pp(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=t0((a[be]||null).action),r=l.submitter;r&&(t=(t=r[be]||null)?t0(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var d=new to("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(wl!==0){var m=r?n0(a,r):new FormData(a);Tc(n,{pending:!0,data:m,method:a.method,action:i},null,m)}}else typeof i=="function"&&(d.preventDefault(),m=r?n0(a,r):new FormData(a),Tc(n,{pending:!0,data:m,method:a.method,action:i},i,m))},currentTarget:a}]})}}for(var rs=0;rs<Vr.length;rs++){var cs=Vr[rs],em=cs.toLowerCase(),tm=cs[0].toUpperCase()+cs.slice(1);zn(em,"on"+tm)}zn(Ou,"onAnimationEnd"),zn(Ru,"onAnimationIteration"),zn(Lu,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(yp,"onTransitionRun"),zn(vp,"onTransitionStart"),zn(bp,"onTransitionCancel"),zn(Uu,"onTransitionEnd"),aa("onMouseEnter",["mouseout","mouseover"]),aa("onMouseLeave",["mouseout","mouseover"]),aa("onPointerEnter",["pointerout","pointerover"]),aa("onPointerLeave",["pointerout","pointerover"]),Ol("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ol("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ol("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ol("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ol("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ol("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="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(" "),nm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wi));function l0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var r=l.length-1;0<=r;r--){var d=l[r],m=d.instance,z=d.currentTarget;if(d=d.listener,m!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=z;try{i(a)}catch(O){ao(O)}a.currentTarget=null,i=m}else for(r=0;r<l.length;r++){if(d=l[r],m=d.instance,z=d.currentTarget,d=d.listener,m!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=z;try{i(a)}catch(O){ao(O)}a.currentTarget=null,i=m}}}}function qe(e,t){var n=t[Ue];n===void 0&&(n=t[Ue]=new Set);var l=e+"__bubble";n.has(l)||(a0(t,e,2,!1),n.add(l))}function ss(e,t,n){var l=0;t&&(l|=4),a0(n,e,l,t)}var Qo="_reactListening"+Math.random().toString(36).slice(2);function us(e){if(!e[Qo]){e[Qo]=!0,un.forEach(function(n){n!=="selectionchange"&&(nm.has(n)||ss(n,!1,e),ss(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qo]||(t[Qo]=!0,ss("selectionchange",!1,t))}}function a0(e,t,n,l){switch(R0(t)){case 2:var a=km;break;case 8:a=_m;break;default:a=Ms}n=a.bind(null,t,n,e),a=void 0,!kr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function fs(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var d=l.stateNode.containerInfo;if(d===a)break;if(r===4)for(r=l.return;r!==null;){var m=r.tag;if((m===3||m===4)&&r.stateNode.containerInfo===a)return;r=r.return}for(;d!==null;){if(r=Tt(d),r===null)return;if(m=r.tag,m===5||m===6||m===26||m===27){l=i=r;continue e}d=d.parentNode}}l=l.return}cu(function(){var z=i,O=Er(n),N=[];e:{var T=Hu.get(e);if(T!==void 0){var E=to,ae=e;switch(e){case"keypress":if(Pi(n)===0)break e;case"keydown":case"keyup":E=Fh;break;case"focusin":ae="focus",E=Lr;break;case"focusout":ae="blur",E=Lr;break;case"beforeblur":case"afterblur":E=Lr;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":E=fu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Ih;break;case Ou:case Ru:case Lu:E=qh;break;case Uu:E=ep;break;case"scroll":case"scrollend":E=Uh;break;case"wheel":E=np;break;case"copy":case"cut":case"paste":E=Gh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=hu;break;case"toggle":case"beforetoggle":E=ap}var Se=(t&4)!==0,nt=!Se&&(e==="scroll"||e==="scrollend"),C=Se?T!==null?T+"Capture":null:T;Se=[];for(var v=z,w;v!==null;){var H=v;if(w=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||w===null||C===null||(H=Qa(v,C),H!=null&&Se.push(zi(v,H,w))),nt)break;v=v.return}0<Se.length&&(T=new E(T,ae,null,n,O),N.push({event:T,listeners:Se}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",E=e==="mouseout"||e==="pointerout",T&&n!==Ar&&(ae=n.relatedTarget||n.fromElement)&&(Tt(ae)||ae[ue]))break e;if((E||T)&&(T=O.window===O?O:(T=O.ownerDocument)?T.defaultView||T.parentWindow:window,E?(ae=n.relatedTarget||n.toElement,E=z,ae=ae?Tt(ae):null,ae!==null&&(nt=g(ae),Se=ae.tag,ae!==nt||Se!==5&&Se!==27&&Se!==6)&&(ae=null)):(E=null,ae=z),E!==ae)){if(Se=fu,H="onMouseLeave",C="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(Se=hu,H="onPointerLeave",C="onPointerEnter",v="pointer"),nt=E==null?T:Xt(E),w=ae==null?T:Xt(ae),T=new Se(H,v+"leave",E,n,O),T.target=nt,T.relatedTarget=w,H=null,Tt(O)===z&&(Se=new Se(C,v+"enter",ae,n,O),Se.target=w,Se.relatedTarget=nt,H=Se),nt=H,E&&ae)t:{for(Se=lm,C=E,v=ae,w=0,H=C;H;H=Se(H))w++;H=0;for(var me=v;me;me=Se(me))H++;for(;0<w-H;)C=Se(C),w--;for(;0<H-w;)v=Se(v),H--;for(;w--;){if(C===v||v!==null&&C===v.alternate){Se=C;break t}C=Se(C),v=Se(v)}Se=null}else Se=null;E!==null&&i0(N,T,E,Se,!1),ae!==null&&nt!==null&&i0(N,nt,ae,Se,!0)}}e:{if(T=z?Xt(z):window,E=T.nodeName&&T.nodeName.toLowerCase(),E==="select"||E==="input"&&T.type==="file")var Xe=Su;else if(bu(T))if(Cu)Xe=pp;else{Xe=dp;var se=fp}else E=T.nodeName,!E||E.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?z&&Tr(z.elementType)&&(Xe=Su):Xe=hp;if(Xe&&(Xe=Xe(e,z))){xu(N,Xe,n,O);break e}se&&se(e,T,z),e==="focusout"&&z&&T.type==="number"&&z.memoizedProps.value!=null&&Mr(T,"number",T.value)}switch(se=z?Xt(z):window,e){case"focusin":(bu(se)||se.contentEditable==="true")&&(ua=se,qr=z,Pa=null);break;case"focusout":Pa=qr=ua=null;break;case"mousedown":Yr=!0;break;case"contextmenu":case"mouseup":case"dragend":Yr=!1,ku(N,n,O);break;case"selectionchange":if(gp)break;case"keydown":case"keyup":ku(N,n,O)}var He;if(Hr)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else sa?yu(e,n)&&(Ge="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ge="onCompositionStart");Ge&&(pu&&n.locale!=="ko"&&(sa||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&sa&&(He=su()):(rl=O,_r="value"in rl?rl.value:rl.textContent,sa=!0)),se=Zo(z,Ge),0<se.length&&(Ge=new du(Ge,e,null,n,O),N.push({event:Ge,listeners:se}),He?Ge.data=He:(He=vu(n),He!==null&&(Ge.data=He)))),(He=op?rp(e,n):cp(e,n))&&(Ge=Zo(z,"onBeforeInput"),0<Ge.length&&(se=new du("onBeforeInput","beforeinput",null,n,O),N.push({event:se,listeners:Ge}),se.data=He)),Pp(N,e,z,n,O)}l0(N,t)})}function zi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zo(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Qa(e,n),a!=null&&l.unshift(zi(e,a,i)),a=Qa(e,t),a!=null&&l.push(zi(e,a,i))),e.tag===3)return l;e=e.return}return[]}function lm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function i0(e,t,n,l,a){for(var i=t._reactName,r=[];n!==null&&n!==l;){var d=n,m=d.alternate,z=d.stateNode;if(d=d.tag,m!==null&&m===l)break;d!==5&&d!==26&&d!==27||z===null||(m=z,a?(z=Qa(n,i),z!=null&&r.unshift(zi(n,z,m))):a||(z=Qa(n,i),z!=null&&r.push(zi(n,z,m)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var am=/\r\n?/g,im=/\u0000|\uFFFD/g;function o0(e){return(typeof e=="string"?e:""+e).replace(am,`
9
+ `).replace(im,"")}function r0(e,t){return t=o0(t),o0(e)===t}function tt(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||oa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&oa(e,""+l);break;case"className":Fi(e,"class",l);break;case"tabIndex":Fi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Fi(e,n,l);break;case"style":ou(e,l,i);break;case"data":if(t!=="object"){Fi(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Wi(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="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 i=="function"&&(n==="formAction"?(t!=="input"&&tt(e,t,"name",a.name,a,null),tt(e,t,"formEncType",a.formEncType,a,null),tt(e,t,"formMethod",a.formMethod,a,null),tt(e,t,"formTarget",a.formTarget,a,null)):(tt(e,t,"encType",a.encType,a,null),tt(e,t,"method",a.method,a,null),tt(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Wi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=jn);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=Wi(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Ji(e,"popover",l);break;case"xlinkActuate":Bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Bn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Bn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Bn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Bn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ji(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Rh.get(n)||n,Ji(e,n,l))}}function ds(e,t,n,l,a,i){switch(n){case"style":ou(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?oa(e,l):(typeof l=="number"||typeof l=="bigint")&&oa(e,""+l);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ki.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[be]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Ji(e,n,l)}}}function Rt(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 l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var r=n[i];if(r!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:tt(e,t,i,r,n,null)}}a&&tt(e,t,"srcSet",n.srcSet,n,null),l&&tt(e,t,"src",n.src,n,null);return;case"input":qe("invalid",e);var d=i=r=a=null,m=null,z=null;for(l in n)if(n.hasOwnProperty(l)){var O=n[l];if(O!=null)switch(l){case"name":a=O;break;case"type":r=O;break;case"checked":m=O;break;case"defaultChecked":z=O;break;case"value":i=O;break;case"defaultValue":d=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:tt(e,t,l,O,n,null)}}nu(e,i,d,m,z,r,a,!1);return;case"select":qe("invalid",e),l=r=i=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":i=d;break;case"defaultValue":r=d;break;case"multiple":l=d;default:tt(e,t,a,d,n,null)}t=i,n=r,e.multiple=!!l,t!=null?ia(e,!!l,t,!1):n!=null&&ia(e,!!l,n,!0);return;case"textarea":qe("invalid",e),i=a=l=null;for(r in n)if(n.hasOwnProperty(r)&&(d=n[r],d!=null))switch(r){case"value":l=d;break;case"defaultValue":a=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(u(91));break;default:tt(e,t,r,d,n,null)}au(e,l,a,i);return;case"option":for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null)&&(m==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":tt(e,t,m,l,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(l=0;l<wi.length;l++)qe(wi[l],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(z in n)if(n.hasOwnProperty(z)&&(l=n[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:tt(e,t,z,l,n,null)}return;default:if(Tr(t)){for(O in n)n.hasOwnProperty(O)&&(l=n[O],l!==void 0&&ds(e,t,O,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&tt(e,t,d,l,n,null))}function om(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,r=null,d=null,m=null,z=null,O=null;for(E in n){var N=n[E];if(n.hasOwnProperty(E)&&N!=null)switch(E){case"checked":break;case"value":break;case"defaultValue":m=N;default:l.hasOwnProperty(E)||tt(e,t,E,null,l,N)}}for(var T in l){var E=l[T];if(N=n[T],l.hasOwnProperty(T)&&(E!=null||N!=null))switch(T){case"type":i=E;break;case"name":a=E;break;case"checked":z=E;break;case"defaultChecked":O=E;break;case"value":r=E;break;case"defaultValue":d=E;break;case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(137,t));break;default:E!==N&&tt(e,t,T,E,l,N)}}zr(e,r,d,m,z,O,i,a);return;case"select":E=r=d=T=null;for(i in n)if(m=n[i],n.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":E=m;default:l.hasOwnProperty(i)||tt(e,t,i,null,l,m)}for(a in l)if(i=l[a],m=n[a],l.hasOwnProperty(a)&&(i!=null||m!=null))switch(a){case"value":T=i;break;case"defaultValue":d=i;break;case"multiple":r=i;default:i!==m&&tt(e,t,a,i,l,m)}t=d,n=r,l=E,T!=null?ia(e,!!n,T,!1):!!l!=!!n&&(t!=null?ia(e,!!n,t,!0):ia(e,!!n,n?[]:"",!1));return;case"textarea":E=T=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:tt(e,t,d,null,l,a)}for(r in l)if(a=l[r],i=n[r],l.hasOwnProperty(r)&&(a!=null||i!=null))switch(r){case"value":T=a;break;case"defaultValue":E=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(u(91));break;default:a!==i&&tt(e,t,r,a,l,i)}lu(e,T,E);return;case"option":for(var ae in n)T=n[ae],n.hasOwnProperty(ae)&&T!=null&&!l.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:tt(e,t,ae,null,l,T));for(m in l)T=l[m],E=n[m],l.hasOwnProperty(m)&&T!==E&&(T!=null||E!=null)&&(m==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":tt(e,t,m,T,l,E));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 Se in n)T=n[Se],n.hasOwnProperty(Se)&&T!=null&&!l.hasOwnProperty(Se)&&tt(e,t,Se,null,l,T);for(z in l)if(T=l[z],E=n[z],l.hasOwnProperty(z)&&T!==E&&(T!=null||E!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:tt(e,t,z,T,l,E)}return;default:if(Tr(t)){for(var nt in n)T=n[nt],n.hasOwnProperty(nt)&&T!==void 0&&!l.hasOwnProperty(nt)&&ds(e,t,nt,void 0,l,T);for(O in l)T=l[O],E=n[O],!l.hasOwnProperty(O)||T===E||T===void 0&&E===void 0||ds(e,t,O,T,l,E);return}}for(var C in n)T=n[C],n.hasOwnProperty(C)&&T!=null&&!l.hasOwnProperty(C)&&tt(e,t,C,null,l,T);for(N in l)T=l[N],E=n[N],!l.hasOwnProperty(N)||T===E||T==null&&E==null||tt(e,t,N,T,l,E)}function c0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,r=a.initiatorType,d=a.duration;if(i&&d&&c0(r)){for(r=0,d=a.responseEnd,l+=1;l<n.length;l++){var m=n[l],z=m.startTime;if(z>d)break;var O=m.transferSize,N=m.initiatorType;O&&c0(N)&&(m=m.responseEnd,r+=O*(m<d?1:(d-z)/(m-z)))}if(--l,t+=8*(i+r)/(a.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 hs=null,ps=null;function Ko(e){return e.nodeType===9?e:e.ownerDocument}function s0(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 u0(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 ms(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 gs=null;function cm(){var e=window.event;return e&&e.type==="popstate"?e===gs?!1:(gs=e,!0):(gs=null,!1)}var f0=typeof setTimeout=="function"?setTimeout:void 0,sm=typeof clearTimeout=="function"?clearTimeout:void 0,d0=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof d0<"u"?function(e){return d0.resolve(null).then(e).catch(fm)}:f0;function fm(e){setTimeout(function(){throw e})}function zl(e){return e==="head"}function h0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Na(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Mi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Mi(n);for(var i=n.firstChild;i;){var r=i.nextSibling,d=i.nodeName;i[ze]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=r}}else n==="body"&&Mi(e.ownerDocument.body);n=a}while(n);Na(t)}function p0(e,t){var n=e;e=0;do{var l=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||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function ys(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":ys(n),mt(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function dm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ze])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function hm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=bn(e.nextSibling),e===null))return null;return e}function m0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=bn(e.nextSibling),e===null))return null;return e}function vs(e){return e.data==="$?"||e.data==="$~"}function bs(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function bn(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 xs=null;function g0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return bn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function y0(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 v0(e,t,n){switch(t=Ko(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(e)}var xn=new Map,b0=new Set;function Jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tl=j.d;j.d={f:mm,r:gm,D:ym,C:vm,L:bm,m:xm,X:Cm,S:Sm,M:wm};function mm(){var e=tl.f(),t=jo();return e||t}function gm(e){var t=st(e);t!==null&&t.tag===5&&t.type==="form"?Hf(t):tl.r(e)}var La=typeof document>"u"?null:document;function x0(e,t,n){var l=La;if(l&&typeof t=="string"&&t){var a=dn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),b0.has(a)||(b0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),Rt(t,"link",e),ft(t),l.head.appendChild(t)))}}function ym(e){tl.D(e),x0("dns-prefetch",e,null)}function vm(e,t){tl.C(e,t),x0("preconnect",e,t)}function bm(e,t,n){tl.L(e,t,n);var l=La;if(l&&e&&t){var a='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+dn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+dn(n.imageSizes)+'"]')):a+='[href="'+dn(e)+'"]';var i=a;switch(t){case"style":i=Ua(e);break;case"script":i=Ha(e)}xn.has(i)||(e=B({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),xn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ti(i))||t==="script"&&l.querySelector(Ai(i))||(t=l.createElement("link"),Rt(t,"link",e),ft(t),l.head.appendChild(t)))}}function xm(e,t){tl.m(e,t);var n=La;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ha(e)}if(!xn.has(i)&&(e=B({rel:"modulepreload",href:e},t),xn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ai(i)))return}l=n.createElement("link"),Rt(l,"link",e),ft(l),n.head.appendChild(l)}}}function Sm(e,t,n){tl.S(e,t,n);var l=La;if(l&&e){var a=Pt(l).hoistableStyles,i=Ua(e);t=t||"default";var r=a.get(i);if(!r){var d={loading:0,preload:null};if(r=l.querySelector(Ti(i)))d.loading=5;else{e=B({rel:"stylesheet",href:e,"data-precedence":t},n),(n=xn.get(i))&&Ss(e,n);var m=r=l.createElement("link");ft(m),Rt(m,"link",e),m._p=new Promise(function(z,O){m.onload=z,m.onerror=O}),m.addEventListener("load",function(){d.loading|=1}),m.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Fo(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:d},a.set(i,r)}}}function Cm(e,t){tl.X(e,t);var n=La;if(n&&e){var l=Pt(n).hoistableScripts,a=Ha(e),i=l.get(a);i||(i=n.querySelector(Ai(a)),i||(e=B({src:e,async:!0},t),(t=xn.get(a))&&Cs(e,t),i=n.createElement("script"),ft(i),Rt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function wm(e,t){tl.M(e,t);var n=La;if(n&&e){var l=Pt(n).hoistableScripts,a=Ha(e),i=l.get(a);i||(i=n.querySelector(Ai(a)),i||(e=B({src:e,async:!0,type:"module"},t),(t=xn.get(a))&&Cs(e,t),i=n.createElement("script"),ft(i),Rt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function S0(e,t,n,l){var a=(a=oe.current)?Jo(a):null;if(!a)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ua(n.href),n=Pt(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ua(n.href);var i=Pt(a).hoistableStyles,r=i.get(e);if(r||(a=a.ownerDocument||a,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=a.querySelector(Ti(e)))&&!i._p&&(r.instance=i,r.state.loading=5),xn.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},xn.set(e,n),i||zm(a,e,n,r.state))),t&&l===null)throw Error(u(528,""));return r}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ha(n),n=Pt(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ua(e){return'href="'+dn(e)+'"'}function Ti(e){return'link[rel="stylesheet"]['+e+"]"}function C0(e){return B({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Rt(t,"link",n),ft(t),e.head.appendChild(t))}function Ha(e){return'[src="'+dn(e)+'"]'}function Ai(e){return"script[async]"+e}function w0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+dn(n.href)+'"]');if(l)return t.instance=l,ft(l),l;var a=B({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ft(l),Rt(l,"style",a),Fo(l,n.precedence,e),t.instance=l;case"stylesheet":a=Ua(n.href);var i=e.querySelector(Ti(a));if(i)return t.state.loading|=4,t.instance=i,ft(i),i;l=C0(n),(a=xn.get(a))&&Ss(l,a),i=(e.ownerDocument||e).createElement("link"),ft(i);var r=i;return r._p=new Promise(function(d,m){r.onload=d,r.onerror=m}),Rt(i,"link",l),t.state.loading|=4,Fo(i,n.precedence,e),t.instance=i;case"script":return i=Ha(n.src),(a=e.querySelector(Ai(i)))?(t.instance=a,ft(a),a):(l=n,(a=xn.get(i))&&(l=B({},n),Cs(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),ft(a),Rt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Fo(l,n.precedence,e));return t.instance}function Fo(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,r=0;r<l.length;r++){var d=l[r];if(d.dataset.precedence===t)i=d;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Ss(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Cs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $o=null;function z0(e,t,n){if($o===null){var l=new Map,a=$o=new Map;a.set(n,l)}else a=$o,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ze]||i[$]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var d=l.get(r);d?d.push(i):l.set(r,[i])}}return l}function M0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Mm(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 T0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tm(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Ua(l.href),i=t.querySelector(Ti(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wo.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ft(i);return}i=t.ownerDocument||t,l=C0(l),(a=xn.get(a))&&Ss(l,a),i=i.createElement("link"),ft(i);var r=i;r._p=new Promise(function(d,m){r.onload=d,r.onerror=m}),Rt(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Wo.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var ws=0;function Am(e,t){return e.stylesheets&&e.count===0&&Po(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Po(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&ws===0&&(ws=62500*rm());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Po(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>ws?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Wo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Po(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Io=null;function Po(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Io=new Map,t.forEach(Em,e),Io=null,Wo.call(e))}function Em(e,t){if(!(t.state.loading&4)){var n=Io.get(e);if(n)var l=n.get(null);else{n=new Map,Io.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var r=a[i];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),l=r)}l&&n.set(null,l)}a=t.instance,r=a.getAttribute("data-precedence"),i=n.get(r)||l,i===l&&n.set(null,a),n.set(r,a),this.count++,l=Wo.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ei={$$typeof:te,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Dm(e,t,n,l,a,i,r,d,m){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=Va(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Va(0),this.hiddenUpdates=Va(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function A0(e,t,n,l,a,i,r,d,m,z,O,N){return e=new Dm(e,t,n,r,m,z,O,N,d),t=1,i===!0&&(t|=24),i=tn(3,null,null,t),e.current=i,i.stateNode=e,t=nc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},oc(i),e}function E0(e){return e?(e=ha,e):ha}function D0(e,t,n,l,a,i){a=E0(a),l.context===null?l.context=a:l.pendingContext=a,l=hl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=pl(e,l,t),n!==null&&($t(n,e,t),oi(n,e,t))}function k0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zs(e,t){k0(e,t),(e=e.alternate)&&k0(e,t)}function _0(e){if(e.tag===13||e.tag===31){var t=Hl(e,67108864);t!==null&&$t(t,e,67108864),zs(e,67108864)}}function O0(e){if(e.tag===13||e.tag===31){var t=rn();t=la(t);var n=Hl(e,t);n!==null&&$t(n,e,t),zs(e,t)}}var er=!0;function km(e,t,n,l){var a=A.T;A.T=null;var i=j.p;try{j.p=2,Ms(e,t,n,l)}finally{j.p=i,A.T=a}}function _m(e,t,n,l){var a=A.T;A.T=null;var i=j.p;try{j.p=8,Ms(e,t,n,l)}finally{j.p=i,A.T=a}}function Ms(e,t,n,l){if(er){var a=Ts(l);if(a===null)fs(e,t,l,tr,n),L0(e,l);else if(Rm(a,e,t,n,l))l.stopPropagation();else if(L0(e,l),t&4&&-1<Om.indexOf(e)){for(;a!==null;){var i=st(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=Un(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var m=1<<31-Yt(r);d.entanglements[1]|=m,r&=~m}_n(i),(Ze&6)===0&&(No=Dt()+500,Ci(0))}}break;case 31:case 13:d=Hl(i,2),d!==null&&$t(d,i,2),jo(),zs(i,2)}if(i=Ts(l),i===null&&fs(e,t,l,tr,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else fs(e,t,l,null,n)}}function Ts(e){return e=Er(e),As(e)}var tr=null;function As(e){if(tr=null,e=Tt(e),e!==null){var t=g(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=k(t),e!==null)return e;e=null}else if(n===31){if(e=R(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 tr=e,null}function R0(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(gr()){case Ga:return 2;case Vi:return 8;case Wl:case yr:return 32;case Xi:return 268435456;default:return 32}default:return 32}}var Es=!1,Ml=null,Tl=null,Al=null,Di=new Map,ki=new Map,El=[],Om="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 L0(e,t){switch(e){case"focusin":case"focusout":Ml=null;break;case"dragenter":case"dragleave":Tl=null;break;case"mouseover":case"mouseout":Al=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ki.delete(t.pointerId)}}function _i(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=st(t),t!==null&&_0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Rm(e,t,n,l,a){switch(t){case"focusin":return Ml=_i(Ml,e,t,n,l,a),!0;case"dragenter":return Tl=_i(Tl,e,t,n,l,a),!0;case"mouseover":return Al=_i(Al,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return Di.set(i,_i(Di.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,ki.set(i,_i(ki.get(i)||null,e,t,n,l,a)),!0}return!1}function U0(e){var t=Tt(e.target);if(t!==null){var n=g(t);if(n!==null){if(t=n.tag,t===13){if(t=k(n),t!==null){e.blockedOn=t,J(e.priority,function(){O0(n)});return}}else if(t===31){if(t=R(n),t!==null){e.blockedOn=t,J(e.priority,function(){O0(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 nr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ts(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Ar=l,n.target.dispatchEvent(l),Ar=null}else return t=st(n),t!==null&&_0(t),e.blockedOn=n,!1;t.shift()}return!0}function H0(e,t,n){nr(e)&&n.delete(t)}function Lm(){Es=!1,Ml!==null&&nr(Ml)&&(Ml=null),Tl!==null&&nr(Tl)&&(Tl=null),Al!==null&&nr(Al)&&(Al=null),Di.forEach(H0),ki.forEach(H0)}function lr(e,t){e.blockedOn===t&&(e.blockedOn=null,Es||(Es=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Lm)))}var ar=null;function N0(e){ar!==e&&(ar=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){ar===e&&(ar=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(As(l||n)===null)continue;break}var i=st(n);i!==null&&(e.splice(t,3),t-=3,Tc(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Na(e){function t(m){return lr(m,e)}Ml!==null&&lr(Ml,e),Tl!==null&&lr(Tl,e),Al!==null&&lr(Al,e),Di.forEach(t),ki.forEach(t);for(var n=0;n<El.length;n++){var l=El[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<El.length&&(n=El[0],n.blockedOn===null);)U0(n),n.blockedOn===null&&El.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],r=a[be]||null;if(typeof i=="function")r||N0(n);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(a=i,r=i[be]||null)d=r.formAction;else if(As(a)!==null)continue}else d=r.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),N0(n)}}}function B0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(r){return a=r})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Ds(e){this._internalRoot=e}ir.prototype.render=Ds.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=rn();D0(n,l,e,t,null,null)},ir.prototype.unmount=Ds.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;D0(e.current,2,null,e,null,null),jo(),t[ue]=null}};function ir(e){this._internalRoot=e}ir.prototype.unstable_scheduleHydration=function(e){if(e){var t=re();e={blockedOn:null,target:e,priority:t};for(var n=0;n<El.length&&t!==0&&t<El[n].priority;n++);El.splice(n,0,e),n===0&&U0(e)}};var j0=s.version;if(j0!=="19.2.4")throw Error(u(527,j0,"19.2.4"));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=S(t),e=e!==null?G(e):null,e=e===null?null:e.stateNode,e};var Um={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!or.isDisabled&&or.supportsFiber)try{il=or.inject(Um),qt=or}catch{}}return Li.createRoot=function(e,t){if(!p(e))throw Error(u(299));var n=!1,l="",a=Zf,i=Kf,r=Jf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=A0(e,1,!1,null,null,n,l,null,a,i,r,B0),e[ue]=t.current,us(e),new Ds(t)},Li.hydrateRoot=function(e,t,n){if(!p(e))throw Error(u(299));var l=!1,a="",i=Zf,r=Kf,d=Jf,m=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(m=n.formState)),t=A0(e,1,!0,t,n??null,l,a,m,i,r,d,B0),t.context=E0(null),n=t.current,l=rn(),l=la(l),a=hl(l),a.callback=null,pl(n,a,l),n=l,t.current.lanes=n,Vt(t,n),_n(t),e[ue]=t.current,us(e),new ir(t)},Li.version="19.2.4",Li}var ih;function Y1(){if(ih)return Us.exports;ih=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),Us.exports=q1(),Us.exports}var G1=Y1(),oh=function(s,h){var u=arguments;if(h==null||!Yi.call(h,"css"))return M.createElement.apply(void 0,u);var p=u.length,g=new Array(p);g[0]=$s,g[1]=Fs(s,h);for(var k=2;k<p;k++)g[k]=u[k];return M.createElement.apply(null,g)};(function(o){var s;s||(s=o.JSX||(o.JSX={}))})(oh||(oh={}));function b(){for(var o=arguments.length,s=new Array(o),h=0;h<o;h++)s[h]=arguments[h];return xh(s)}function nl(){var o=b.apply(void 0,arguments),s="animation-"+o.name;return{name:s,styles:"@keyframes "+s+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const V1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate"},X1={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:V1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},abortController:null,deleteOrphans:async()=>{}},Ch=M.createContext(X1);function qa(){return M.useContext(Ch)}const mr="-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",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6"},F={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Gi=b("font-family:",mr,";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;}",""),Q1=nl`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,Z1=nl`
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
+ `,Me={overlay:b("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:",Q1," 0.15s ease-out;font-family:",mr,";",""),modal:b(Gi," 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:",Z1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("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:b("font-size:",F.base,";color:",f.textSecondary,";margin:0;line-height:1.6;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("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:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:b("background-color:",f.danger,";border:1px solid ",f.danger,";color:white;&:hover{background-color:",f.dangerHover,";border-color:",f.dangerHover,";}","")};function Ui({title:o,message:s,confirmLabel:h="Confirm",cancelLabel:u="Cancel",variant:p="default",onConfirm:g,onCancel:k}){return c("div",{css:Me.overlay,onClick:k,children:x("div",{css:Me.modal,onClick:R=>R.stopPropagation(),children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),c("div",{css:Me.body,children:c("p",{css:Me.message,children:s})}),x("div",{css:Me.footer,children:[c("button",{css:[Me.btn,Me.btnCancel,"",""],onClick:k,children:u}),c("button",{css:[Me.btn,p==="danger"?Me.btnDanger:Me.btnConfirm,"",""],onClick:g,children:h})]})]})})}const K1={input:b("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 Xs({title:o,message:s,inputLabel:h,defaultValue:u="",placeholder:p,confirmLabel:g="Confirm",cancelLabel:k="Cancel",onConfirm:R,onCancel:L}){const[S,G]=uh.useState(u),B=K=>{K.preventDefault(),S.trim()&&R(S.trim())};return c("div",{css:Me.overlay,onClick:L,children:c("div",{css:Me.modal,onClick:K=>K.stopPropagation(),children:x("form",{onSubmit:B,children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),x("div",{css:Me.body,children:[s&&c("p",{css:Me.message,children:s}),h&&c("label",{css:Me.message,children:h}),c("input",{css:K1.input,type:"text",value:S,onChange:K=>G(K.target.value),placeholder:p,autoFocus:!0})]}),x("div",{css:Me.footer,children:[c("button",{type:"button",css:[Me.btn,Me.btnCancel,"",""],onClick:L,children:k}),c("button",{type:"submit",css:[Me.btn,Me.btnConfirm,"",""],disabled:!S.trim(),children:g})]})]})})})}function wh({title:o,message:s,buttonLabel:h="OK",onClose:u}){return c("div",{css:Me.overlay,onClick:u,children:x("div",{css:Me.modal,onClick:p=>p.stopPropagation(),children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),c("div",{css:Me.body,children:c("p",{css:Me.message,children:s})}),c("div",{css:Me.footer,children:c("button",{css:[Me.btn,Me.btnConfirm,"",""],onClick:u,children:h})})]})})}const kl={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:b("width:100%;height:8px;background-color:",f.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:b("height:100%;background:linear-gradient(90deg, ",f.primary,", ",f.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:b("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:b("font-size:",F.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function Ws({title:o,progress:s,onClose:h,onDeleteOrphans:u,onStop:p}){const g=s.status==="complete",k=s.status==="error",R=s.status==="stopped",L=s.status==="stopping",S=g||k||R,G=!S||L;return c("div",{css:Me.overlay,children:x("div",{css:Me.modal,onClick:B=>B.stopPropagation(),children:[c("div",{css:Me.header,children:c("h3",{css:Me.title,children:o})}),c("div",{css:Me.body,children:k?c("p",{css:Me.message,children:s.message||"An error occurred"}):R?x("p",{css:Me.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):g?x(Ct,{children:[x("p",{css:Me.message,children:[s.message?s.message:s.isMove?x(Ct,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?x(Ct,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?x(Ct,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(Ct,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?x(Ct,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?x(Ct,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):x(Ct,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(Ct,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?x(Ct,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&x("div",{css:kl.errorList,children:[s.errorMessages.slice(0,10).map((B,K)=>c("p",{css:kl.errorItem,children:B},K)),s.errorMessages.length>10&&x("p",{css:kl.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):x(Ct,{children:[c("p",{css:Me.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),x("div",{css:kl.progressContainer,children:[c("div",{css:kl.progressBar,children:c("div",{css:kl.progressFill,style:{width:`${s.percent}%`}})}),x("div",{css:kl.progressText,children:[x("span",{children:[s.current," of ",s.total]}),x("span",{children:[s.percent,"%"]})]}),s.currentFile&&c("p",{css:kl.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),x("div",{css:Me.footer,children:[G&&p&&c("button",{css:[Me.btn,Me.btnDanger,"",""],onClick:p,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),S&&s.orphanedFiles&&s.orphanedFiles.length>0&&u&&x("button",{css:[Me.btn,Me.btnDanger,"",""],onClick:u,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),S&&c("button",{css:[Me.btn,Me.btnConfirm,"",""],onClick:h,children:"Done"})]})]})})}const J1=nl`
22
+ from { opacity: 0; }
23
+ to { opacity: 1; }
24
+ `,F1=nl`
25
+ from {
26
+ opacity: 0;
27
+ transform: translateY(-8px) scale(0.98);
28
+ }
29
+ to {
30
+ opacity: 1;
31
+ transform: translateY(0) scale(1);
32
+ }
33
+ `,pt={overlay:b("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:",J1," 0.15s ease-out;font-family:",mr,";",""),modal:b(Gi," 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:",F1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("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:b("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:b("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:b("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:b("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:b("font-size:",F.base,";color:",f.text,";flex:1;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("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:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("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:b("display:flex;align-items:center;justify-content:center;padding:40px;color:",f.textSecondary,";",""),spinner:b("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 zh({selectedItems:o,currentPath:s,onMove:h,onCancel:u}){const[p,g]=M.useState([]),[k,R]=M.useState(!0),[L,S]=M.useState(null);M.useEffect(()=>{async function U(){try{const X=await fetch("/api/studio/list-folders");if(X.ok){const ge=await X.json();console.log("Loaded folders:",ge),g(ge.folders||[])}else console.error("Failed to load folders:",X.status,await X.text())}catch(X){console.error("Failed to load folders:",X)}finally{R(!1)}}U()},[]);const G=Array.from(o),B=p.filter(U=>!G.some(X=>U.path===X||U.path.startsWith(X+"/"))),K=U=>U===s,le=()=>{L&&h(L)};return c("div",{css:pt.overlay,onClick:u,children:x("div",{css:pt.modal,onClick:U=>U.stopPropagation(),children:[c("div",{css:pt.header,children:c("h3",{css:pt.title,children:"Move Items"})}),x("div",{css:pt.body,children:[x("p",{css:pt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),k?c("div",{css:pt.loading,children:c("div",{css:pt.spinner})}):B.length===0?c("div",{css:pt.loading,children:"No available folders to move to."}):c("div",{css:pt.folderList,children:B.map(U=>{const X=K(U.path);return x("div",{css:[pt.folderItem,L===U.path&&pt.folderItemSelected,X&&pt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!X&&S(U.path),children:[U.depth>0&&c("div",{css:pt.treeIndent,children:Array.from({length:U.depth}).map((ge,I)=>c("div",{css:pt.treeLine},I))}),c("svg",{css:pt.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"})}),x("span",{css:pt.folderName,children:[U.name,X&&" (current)"]})]},U.path)})})]}),x("div",{css:pt.footer,children:[c("button",{css:[pt.btn,pt.btnCancel,"",""],onClick:u,children:"Cancel"}),c("button",{css:[pt.btn,pt.btnConfirm,"",""],onClick:le,disabled:!L,children:"Move Here"})]})]})})}const $1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
34
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
35
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
36
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
37
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
38
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,ce={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:b("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:b("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",f.border,";",""),icon:b("width:32px;height:32px;color:",f.primary,";flex-shrink:0;",""),title:b("font-size:",F.xl,";font-weight:600;color:",f.text,";margin:0;",""),closeBtn:b("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:b("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:b("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:b("font-size:",F.base,";font-weight:500;color:",f.text,";margin:0 0 4px 0;",""),stepDesc:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0;line-height:1.5;",""),link:b("color:",f.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:b("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:b("color:",f.primary,";",""),envValue:b("color:",f.textSecondary,";",""),copyBtn:b("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:b("padding:16px 24px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:b("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:b("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 Mh({isOpen:o,onClose:s}){const[h,u]=M.useState(!1),p=async()=>{try{await navigator.clipboard.writeText($1),u(!0),setTimeout(()=>u(!1),2e3)}catch(g){console.error("Failed to copy:",g)}};return o?c("div",{css:ce.overlay,onClick:s,children:x("div",{css:ce.modal,onClick:g=>g.stopPropagation(),children:[x("div",{css:ce.header,children:[c("svg",{css:ce.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:ce.title,children:"Set Up CDN Storage"}),c("button",{css:ce.closeBtn,onClick:s,children:c("svg",{css:ce.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"})})})]}),x("div",{css:ce.content,children:[c("p",{css:ce.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),x("ol",{css:ce.steps,children:[x("li",{css:ce.step,children:[c("span",{css:ce.stepNumber,children:"1"}),x("div",{css:ce.stepContent,children:[c("h4",{css:ce.stepTitle,children:"Create a Cloudflare account"}),x("p",{css:ce.stepDesc,children:["Sign up at"," ",c("a",{css:ce.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),x("li",{css:ce.step,children:[c("span",{css:ce.stepNumber,children:"2"}),x("div",{css:ce.stepContent,children:[c("h4",{css:ce.stepTitle,children:"Create an R2 bucket"}),x("p",{css:ce.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",c("code",{children:"my-images"}),"."]})]})]}),x("li",{css:ce.step,children:[c("span",{css:ce.stepNumber,children:"3"}),x("div",{css:ce.stepContent,children:[c("h4",{css:ce.stepTitle,children:"Enable public access"}),x("p",{css:ce.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',c("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),x("li",{css:ce.step,children:[c("span",{css:ce.stepNumber,children:"4"}),x("div",{css:ce.stepContent,children:[c("h4",{css:ce.stepTitle,children:"Create API token"}),c("p",{css:ce.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),x("li",{css:ce.step,children:[c("span",{css:ce.stepNumber,children:"5"}),x("div",{css:ce.stepContent,children:[c("h4",{css:ce.stepTitle,children:"Add environment variables"}),x("p",{css:ce.stepDesc,children:["Add these to your ",c("code",{children:".env.local"})," file:"]})]})]})]}),x("div",{css:ce.envVarsWrapper,children:[x("div",{css:ce.envVars,children:[x("span",{css:ce.envVar,children:[c("span",{css:ce.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",c("span",{css:ce.envValue,children:"your_account_id"})]}),x("span",{css:ce.envVar,children:[c("span",{css:ce.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",c("span",{css:ce.envValue,children:"your_access_key"})]}),x("span",{css:ce.envVar,children:[c("span",{css:ce.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",c("span",{css:ce.envValue,children:"your_secret_key"})]}),x("span",{css:ce.envVar,children:[c("span",{css:ce.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",c("span",{css:ce.envValue,children:"your_bucket_name"})]}),x("span",{css:ce.envVar,children:[c("span",{css:ce.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:ce.envValue,children:"https://pub-xxx.r2.dev"})]}),x("span",{css:ce.envVar,children:[c("span",{css:ce.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:ce.envValue,children:"https://pub-xxx.r2.dev"})]})]}),x("button",{css:ce.copyBtn,onClick:p,title:"Copy to clipboard",children:[h&&c("span",{css:ce.copiedTooltip,children:"Copied!"}),c("svg",{css:ce.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"})})]})]})]}),x("div",{css:ce.footer,children:[x("a",{css:ce.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",c("svg",{css:ce.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:ce.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const W1=nl`
39
+ from { opacity: 0; }
40
+ to { opacity: 1; }
41
+ `,I1=nl`
42
+ from {
43
+ opacity: 0;
44
+ transform: translateY(-8px) scale(0.98);
45
+ }
46
+ to {
47
+ opacity: 1;
48
+ transform: translateY(0) scale(1);
49
+ }
50
+ `,it={overlay:b("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:",W1," 0.15s ease-out;font-family:",mr,";",""),modal:b(Gi," 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:",I1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),tabs:b("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",f.border,";",""),tab:b("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:b("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:b("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:b("border-color:",f.primary,";background-color:",f.primaryLight,";",""),dropzoneIcon:b("width:48px;height:48px;margin:0 auto 16px;color:",f.textMuted,";",""),dropzoneText:b("font-size:",F.base,";color:",f.text,";margin:0 0 4px;",""),dropzoneHint:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0;",""),textarea:b("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:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0 0 8px;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("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:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("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:b("margin-top:16px;padding:12px;background-color:",f.background,";border-radius:6px;font-size:",F.sm,";color:",f.text,";","")};function P1({currentPath:o,onClose:s,onUploadComplete:h}){const[u,p]=M.useState("upload"),[g,k]=M.useState([]),[R,L]=M.useState(""),[S,G]=M.useState(!1),[B,K]=M.useState(!1),[le,U]=M.useState(!1),X=M.useRef(null),ge=M.useCallback(ne=>{ne&&k(Array.from(ne))},[]),I=M.useCallback(ne=>{ne.preventDefault(),G(!1),ge(ne.dataTransfer.files)},[ge]),de=M.useCallback(async()=>{if(g.length!==0){K(!0);try{for(const ne of g){const D=new FormData;D.append("file",ne),D.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:D})}h(),s()}catch(ne){console.error("Upload failed:",ne)}finally{K(!1)}}},[g,o,h,s]),te=M.useCallback(async()=>{const ne=R.split(`
51
+ `).map(D=>D.trim()).filter(D=>D.length>0);if(ne.length!==0){U(!0);try{const V=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:ne})})).body?.getReader();if(!V)throw new Error("No reader");const Y=new TextDecoder;for(;;){const{done:xe,value:Le}=await V.read();if(xe)break;const Be=Y.decode(Le).split(`
52
+
53
+ `).filter(Ne=>Ne.startsWith("data: "));for(const Ne of Be)JSON.parse(Ne.replace("data: ","")).type==="complete"&&(h(),s())}}catch(D){console.error("Import failed:",D)}finally{U(!1)}}},[R,h,s]);return c("div",{css:it.overlay,onClick:s,children:x("div",{css:it.modal,onClick:ne=>ne.stopPropagation(),children:[x("div",{css:it.header,children:[c("h3",{css:it.title,children:"Add New"}),x("div",{css:it.tabs,children:[c("button",{css:[it.tab,u==="upload"&&it.tabActive,"",""],onClick:()=>p("upload"),children:"Upload Files"}),c("button",{css:[it.tab,u==="import"&&it.tabActive,"",""],onClick:()=>p("import"),children:"Import URLs"})]})]}),c("div",{css:it.body,children:u==="upload"?x(Ct,{children:[x("div",{css:[it.dropzone,S&&it.dropzoneActive,"",""],onClick:()=>X.current?.click(),onDragOver:ne=>{ne.preventDefault(),G(!0)},onDragLeave:()=>G(!1),onDrop:I,children:[c("svg",{css:it.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:it.dropzoneText,children:"Drop files here or click to browse"}),c("p",{css:it.dropzoneHint,children:"Supports images and other media files"})]}),c("input",{ref:X,type:"file",multiple:!0,css:it.fileInput,onChange:ne=>ge(ne.target.files)}),g.length>0&&x("div",{css:it.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):x(Ct,{children:[c("p",{css:it.textareaLabel,children:"Paste image URLs (one per line)"}),c("textarea",{css:it.textarea,value:R,onChange:ne=>L(ne.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
54
+ https://cdn.example.com/photos/image2.jpg`})]})}),x("div",{css:it.footer,children:[c("button",{css:[it.btn,it.btnCancel,"",""],onClick:s,children:"Cancel"}),u==="upload"?c("button",{css:[it.btn,it.btnConfirm,"",""],onClick:de,disabled:g.length===0||B,children:B?"Uploading...":"Upload"}):c("button",{css:[it.btn,it.btnConfirm,"",""],onClick:te,disabled:!R.trim()||le,children:le?"Importing...":"Import"})]})]})})}const js="36px",eg=nl`
55
+ to { transform: rotate(360deg); }
56
+ `,pe={toolbar:b("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:b("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",js,";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:b("background:",f.primary,";border-color:",f.primary,";color:white;&:hover:not(:disabled){background:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:b("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:b("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:b("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:b("svg{color:",f.text,";}",""),cloudDropdownItemDanger:b("color:",f.danger,";svg{color:",f.danger,";}",""),cloudDropdownDivider:b("height:1px;background-color:",f.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:b("animation:",eg," 1s linear infinite;",""),selectionCount:b("font-size:",F.base,";color:",f.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:b("color:",f.primary,";background:none;border:none;cursor:pointer;font-size:",F.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:b("width:1px;height:24px;background:",f.border,";margin:0 4px;",""),viewToggle:b("display:flex;align-items:center;height:",js,";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:b("height:",js,";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:b("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:b("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:b("background-color:",f.primaryLight,";color:",f.primary,";&:hover{background-color:",f.primaryLight,";color:",f.primary,";}","")};function tg(){const{selectedItems:o,viewMode:s,setViewMode:h,clearSelection:u,currentPath:p,triggerRefresh:g,focusedItem:k,scanRequested:R,clearScanRequest:L,fileItems:S,requestProcess:G,setProcessMode:B,actionState:K}=qa(),le=M.useRef(null),U=M.useRef(null),[X,ge]=M.useState(!1),[I,de]=M.useState(!1),[te,ne]=M.useState(!1),[D,V]=M.useState(!1),[Y,xe]=M.useState(!1),[Le,Oe]=M.useState(0),[Be,Ne]=M.useState(!1),[Fe,We]=M.useState(!1),[_e,A]=M.useState(!1),[j,P]=M.useState(0),[ie,ye]=M.useState(!1),[y,_]=M.useState("Processing Images"),[Q,q]=M.useState({current:0,total:0,percent:0,status:"processing"}),[ve,oe]=M.useState(null),[Ce,ot]=M.useState(!1),[at,Sn]=M.useState(!1),[we,Cn]=M.useState(!1),[$l,Te]=M.useState(!1),[zt,Bt]=M.useState(!1),[sn,jt]=M.useState(!1),[ll,An]=M.useState(!1),It=M.useRef(null),al=M.useRef(null),wn=p==="public/images"||p.startsWith("public/images/");M.useCallback(()=>{le.current?.click()},[]);const Dt=M.useCallback(async()=>{ne(!0),_("Scanning Files"),ye(!0),q({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const J=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!J)throw new Error("No reader");const W=new TextDecoder;let $="";for(;;){const{done:be,value:ue}=await J.read();if(be)break;$+=W.decode(ue,{stream:!0});const Ue=$.split(`
57
+
58
+ `);$=Ue.pop()||"";for(const Ee of Ue){if(!Ee.startsWith("data: "))continue;const fe=JSON.parse(Ee.slice(6));if(fe.type==="start")q({current:0,total:fe.total,percent:0,status:"processing",message:`Scanning ${fe.total} files...`});else if(fe.type==="progress")q({current:fe.current,total:fe.total,percent:fe.percent,status:"processing",currentFile:fe.currentFile});else if(fe.type==="cleanup")q(De=>({...De,message:fe.message}));else if(fe.type==="complete"){let De=fe.renamed>0?`${fe.renamed} file(s) renamed due to conflicts. `:"";fe.orphanedFiles&&fe.orphanedFiles.length>0&&(De+=`Found ${fe.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),q({current:fe.total||0,total:fe.total||0,percent:100,status:"complete",processed:fe.added,alreadyProcessed:fe.existingCount,errors:fe.errors,orphanedFiles:fe.orphanedFiles,pendingUpdates:fe.pendingUpdates,orphanedEntries:fe.orphanedEntries,message:De||void 0,isScan:!0}),g()}else fe.type==="error"&&q({current:0,total:0,percent:0,status:"error",message:fe.message||"Scan failed"})}}}catch(re){console.error("Scan error:",re),q({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{ne(!1)}},[g]);M.useEffect(()=>{const re=J=>{It.current&&!It.current.contains(J.target)&&jt(!1),al.current&&!al.current.contains(J.target)&&An(!1)};return document.addEventListener("mousedown",re),()=>document.removeEventListener("mousedown",re)},[]),M.useEffect(()=>{R&&!te&&(L(),Dt())},[R,te,L,Dt]);const gr=M.useCallback(async re=>{const J=re.target.files;if(!J||J.length===0)return;const W=Array.from(J);W.length>1?(q({current:0,total:W.length,percent:0,status:"processing",message:"Uploading files..."}),ye(!0)):de(!0);let $=0,be=0;try{for(let ue=0;ue<W.length;ue++){const Ue=W[ue],Ee=new FormData;Ee.append("file",Ue),Ee.append("path",p);try{const fe=await fetch("/api/studio/upload",{method:"POST",body:Ee});if(fe.ok)$++;else{const De=await fe.json();be++,W.length===1&&(fe.status>=500?(console.error("Upload error:",De),oe({title:"Upload Failed",message:`Failed to upload ${Ue.name}: ${De.error||"Unknown error"}`})):oe({title:"Cannot Upload Here",message:De.error||"Upload not allowed in this location."}))}}catch{be++}W.length>1&&q({current:ue+1,total:W.length,percent:Math.round((ue+1)/W.length*100),status:"processing",currentFile:Ue.name})}W.length>1&&q({current:W.length,total:W.length,percent:100,status:"complete",processed:$,errors:be}),g()}catch(ue){console.error("Upload error:",ue),W.length>1?q({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):oe({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{de(!1),le.current&&(le.current.value="")}},[p,g]),Ga=M.useCallback(async re=>{if(o.size>0){const W=Array.from(o),$=W.filter(ue=>(ue.split("/").pop()||"").includes(".")&&!ue.endsWith("/")),be=W.filter(ue=>!(ue.split("/").pop()||"").includes(".")||ue.endsWith("/"));if(be.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(Ue.images)for(const Ee of Ue.images){const fe=`public/${Ee}`;$.includes(fe)||$.push(fe)}}catch(ue){console.error("Failed to get folder files:",ue)}if($.length===0){oe({title:"No Files Found",message:"No files found in the selected items."});return}B(re),G($)}else try{const $=await(await fetch("/api/studio/count-images")).json();if(!$.images||$.images.length===0){oe({title:"No Images Found",message:"No images found in the public folder to process."});return}const be=$.images.map(ue=>`public/${ue}`);B(re),G(be)}catch(W){console.error("Failed to get images:",W),oe({title:"Error",message:"Failed to get images."})}},[o,G,B]),Vi=M.useCallback(()=>{U.current&&(q(re=>({...re,status:"stopping"})),U.current.abort())},[]),Wl=M.useCallback(async()=>{const re=Q.orphanedFiles;if(!(!re||re.length===0))try{const J=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:re})}),W=await J.json();J.ok?(q($=>({...$,orphanedFiles:void 0,orphansRemoved:W.deleted,message:`Deleted ${W.deleted} orphaned thumbnail${W.deleted!==1?"s":""}.`})),g()):oe({title:"Delete Failed",message:W.error||"Failed to delete orphaned files."})}catch(J){console.error("Delete orphans error:",J),oe({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[Q.orphanedFiles,g]),yr=M.useCallback(()=>{o.size!==0&&V(!0)},[o]),Xi=M.useCallback(async()=>{V(!1);try{const re=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(o)})});if(re.ok)u(),g();else{const J=await re.json();oe({title:"Delete Failed",message:J.error||"Unknown error"})}}catch(re){console.error("Delete error:",re),oe({title:"Delete Failed",message:"Delete failed. Check console for details."})}},[o,u,g]),vr=M.useCallback(async()=>{if(o.size===0)return;const re=Array.from(o),J=re.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),W=re.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/")),$=W.length>0;if($)try{const fe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(W.join(","))}`)).json();if(fe.images)for(const De of fe.images){const ze=`public/${De}`;J.includes(ze)||J.push(ze)}}catch(Ee){console.error("Failed to get folder files:",Ee)}if(J.length===0){oe({title:"No Files Found",message:"No files found in the selected items."});return}let be=!1,ue=!1,Ue=0;for(const Ee of J){const fe=S.find(De=>De.path===Ee);fe?fe.isRemote?be=!0:fe.cdnPushed?Ue++:ue=!0:$&&(ue=!0)}if(!$&&Ue===J.length){oe({title:"Already Pushed",message:`All ${J.length} file${J.length!==1?"s are":" is"} already on the CDN.`});return}Oe(J.length),Ne(be),We(ue),xe(!0)},[o,S]),br=M.useCallback(async()=>{xe(!1);const re=Array.from(o),J=re.filter(De=>(De.split("/").pop()||"").includes(".")&&!De.endsWith("/")),W=re.filter(De=>!(De.split("/").pop()||"").includes(".")||De.endsWith("/"));if(W.length>0)try{const ze=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(W.join(","))}`)).json();if(ze.images)for(const mt of ze.images){const Tt=`public/${mt}`;J.includes(Tt)||J.push(Tt)}}catch(De){console.error("Failed to get folder files:",De)}const $=J.map(De=>"/"+De.replace(/^public\//,"")),be=new AbortController;U.current=be,_("Pushing to CDN"),q({current:0,total:$.length,percent:0,status:"processing",message:"Pushing to CDN..."}),ye(!0);let ue=0,Ue=0,Ee=0;const fe=[];try{for(let ze=0;ze<$.length;ze++){if(be.signal.aborted){q(Pt=>({...Pt,status:"stopped",message:`Stopped. ${ue} file${ue!==1?"s":""} pushed.`})),u(),g(),U.current=null;return}const mt=$[ze];let Tt=!1,st=!1,Xt;for(let Pt=0;Pt<3&&!Tt&&!be.signal.aborted;Pt++)try{const ft=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[mt]}),signal:be.signal}),un=await ft.json();if(ft.ok)if(un.pushed?.length>0)ue++,Tt=!0;else if(un.alreadyPushed?.length>0)st=!0,Tt=!0;else if(un.errors?.length>0)for(const Ki of un.errors)Xt=Ki;else Tt=!0;else{if(un.error?.includes("R2 not configured")||un.error?.includes("CLOUDFLARE_R2")){ye(!1),Te(!0);return}Xt=un.error||`Failed: ${mt}`}}catch{Xt=`Network error: ${mt}`,Pt<2&&await new Promise(un=>setTimeout(un,500*(Pt+1)))}st?Ue++:!Tt&&Xt&&(Ee++,fe.push(Xt)),q({current:ze+1,total:$.length,percent:Math.round((ze+1)/$.length*100),status:"processing",currentFile:mt.replace(/^\//,"")})}if(be.signal.aborted){u(),g(),U.current=null;return}let De;ue===0&&Ee===0?De=`${Ue} file${Ue!==1?"s":""} already on CDN. 0 new files pushed.`:Ue>0&&Ee===0&&(De=`${ue} file${ue!==1?"s":""} pushed. ${Ue} already on CDN.`),q({current:$.length,total:$.length,percent:100,status:"complete",processed:ue,errors:Ee,errorMessages:fe.length>0?fe:void 0,message:De}),u(),g()}catch(De){if(be.signal.aborted){U.current=null;return}console.error("Push error:",De),q({current:0,total:0,percent:0,status:"error",message:"Failed to push to CDN."})}finally{U.current=null}},[o,u,g]),[il,qt]=M.useState([]),[Ut,Yt]=M.useState(0),xr=M.useCallback(async()=>{if(o.size===0)return;const re=Array.from(o),J=re.filter(ue=>(ue.split("/").pop()||"").includes(".")&&!ue.endsWith("/")),W=re.filter(ue=>!(ue.split("/").pop()||"").includes(".")||ue.endsWith("/")),$=W.length>0;if($)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(W.join(","))}`)).json();if(Ue.images)for(const Ee of Ue.images){const fe=`public/${Ee}`;J.includes(fe)||J.push(fe)}}catch(ue){console.error("Failed to get folder files:",ue)}if(J.length===0){oe({title:"No Files Found",message:"No files found in the selected items."});return}let be;if($)be=J;else if(be=J.filter(ue=>{const Ue=S.find(Ee=>Ee.path===ue);return Ue&&Ue.cdnPushed&&!Ue.isRemote}),be.length===0){oe({title:"No CDN Files",message:`None of the ${J.length} selected file${J.length!==1?"s are":" is"} on the CDN.`});return}qt(be),Yt(J.length),P(be.length),A(!0)},[o,S]),Qi=M.useRef(null),Sr=M.useCallback(async()=>{A(!1);const re=new AbortController;U.current=re;const J=`download-${Date.now()}-${Math.random().toString(36).slice(2)}`;Qi.current=J;const W=il.map($=>"/"+$.replace(/^public\//,""));_("Downloading from CDN"),ye(!0),q({current:0,total:W.length,percent:0,status:"processing"});try{const $=await fetch("/api/studio/download-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:W,operationId:J}),signal:re.signal});if(!$.ok||!$.body)throw new Error("Download request failed");const be=$.body.getReader(),ue=new TextDecoder;let Ue="",Ee=0;const fe=async()=>{try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:J})})}catch{}be.cancel(),q(De=>({...De,status:"stopped",message:`Stopped. ${Ee} file${Ee!==1?"s":""} downloaded.`})),u(),g(),U.current=null,Qi.current=null};re.signal.addEventListener("abort",fe);try{for(;;){const{done:De,value:ze}=await be.read();if(De)break;Ue+=ue.decode(ze,{stream:!0});const mt=Ue.split(`
59
+ `);Ue=mt.pop()||"";for(const Tt of mt)if(Tt.startsWith("data: "))try{const st=JSON.parse(Tt.slice(6));if(st.type==="progress")st.downloaded!==void 0&&(Ee=st.downloaded),q({current:st.current,total:st.total,percent:Math.round(st.current/st.total*100),status:"processing",message:st.message});else if(st.type==="complete"){Ee=st.downloaded||st.total||W.length;let Xt=st.message;Ut>Ee&&(Xt=`${Ee} file${Ee!==1?"s":""} downloaded out of ${Ut} selected.`),q({current:Ee,total:Ee,percent:100,status:"complete",message:Xt})}else st.type==="error"&&q({current:0,total:0,percent:0,status:"error",message:st.message})}catch{}}re.signal.aborted||(u(),g())}catch(De){if(!re.signal.aborted)throw De}finally{re.signal.removeEventListener("abort",fe)}}catch($){if(re.signal.aborted)return;console.error("Download error:",$),q({current:0,total:0,percent:0,status:"error",message:"Failed to download from CDN."})}finally{U.current=null}},[il,Ut,u,g]),Il=M.useCallback(async()=>{if(o.size===0)return;const J=Array.from(o).filter(W=>{const $=S.find(be=>be.path===W);return $&&$.hasUpdate});if(J.length===0){oe({title:"No Updates",message:"No files with pending updates in selection."});return}_("Pushing Updates"),ye(!0),q({current:0,total:J.length,percent:0,status:"processing"});try{const $=(await fetch("/api/studio/push-updates-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:J})})).body?.getReader();if(!$)throw new Error("No response body");const be=new TextDecoder;let ue="";for(;;){const{done:Ue,value:Ee}=await $.read();if(Ue)break;ue+=be.decode(Ee,{stream:!0});const fe=ue.split(`
60
+ `);ue=fe.pop()||"";for(const De of fe)if(De.startsWith("data: "))try{const ze=JSON.parse(De.slice(6));ze.type==="progress"?q({current:ze.current,total:ze.total,percent:ze.percent,status:"processing",currentFile:ze.currentFile}):ze.type==="cleanup"?q(mt=>({...mt,message:ze.message})):ze.type==="complete"?q({current:ze.total||J.length,total:ze.total||J.length,percent:100,status:"complete",message:ze.message}):ze.type==="error"&&q({current:0,total:0,percent:0,status:"error",message:ze.message})}catch{}}u(),g()}catch(W){console.error("Push updates error:",W),q({current:0,total:0,percent:0,status:"error",message:"Failed to push updates."})}},[o,S,u,g]),Pl=M.useCallback(async()=>{if(o.size===0)return;const J=Array.from(o).filter(W=>{const $=S.find(be=>be.path===W);return $&&$.hasUpdate});if(J.length!==0)try{const W=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:J})});if(W.ok)u(),g();else{const $=await W.json();oe({title:"Cancel Failed",message:$.error||"Unknown error"})}}catch(W){console.error("Cancel updates error:",W),oe({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,S,u,g]),ea=M.useCallback(async re=>{ot(!1);try{const J=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:p,name:re})});if(J.ok)g();else{const W=await J.json();oe({title:"Create Folder Failed",message:W.error||"Unknown error"})}}catch(J){console.error("Create folder error:",J),oe({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[p,g]),Un=M.useCallback(()=>{o.size!==0&&Cn(!0)},[o]),ta=M.useCallback(async re=>{const J=Array.from(o);_("Moving Files"),ye(!0),q({current:0,total:J.length,percent:0,status:"processing"});try{const W=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:J,destination:re})});if(!W.body)throw new Error("No response body");const $=W.body.getReader(),be=new TextDecoder;let ue="";for(;;){const{done:Ue,value:Ee}=await $.read();if(Ue)break;ue+=be.decode(Ee,{stream:!0});const fe=ue.split(`
61
+
62
+ `);ue=fe.pop()||"";for(const De of fe)if(De.startsWith("data: "))try{const ze=JSON.parse(De.slice(6));ze.type==="start"?q(mt=>({...mt,total:ze.total})):ze.type==="progress"?q({current:ze.current,total:ze.total,percent:ze.percent,currentFile:ze.currentFile,status:"processing"}):ze.type==="complete"?(q(mt=>({...mt,status:"complete",processed:ze.moved,errors:ze.errors,errorMessages:ze.errorMessages,isMove:!0})),u(),g()):ze.type==="error"&&q(mt=>({...mt,status:"error",errorMessage:ze.message}))}catch{}}}catch(W){console.error("Move error:",W),q($=>({...$,status:"error",errorMessage:"Failed to move items. Check console for details."}))}},[o,u,g]),{searchQuery:ol,setSearchQuery:_l}=qa(),Zi=M.useCallback(re=>{_l(re.target.value)},[_l]),Va=M.useCallback(re=>{re.key==="Escape"&&(re.stopPropagation(),_l(""),re.target.blur())},[_l]),Vt=o.size>0;Vt&&Array.from(o).some(re=>{const J=S.find(W=>W.path===re);return J&&J.cdnPushed&&!J.isRemote}),Vt&&Array.from(o).every(re=>{const J=S.find(W=>W.path===re);return J&&J.type==="file"&&J.cdnPushed&&!J.isRemote});const Cr=Vt&&Array.from(o).some(re=>{const J=S.find(W=>W.path===re);return J&&J.hasUpdate}),na=Array.from(o),Hn=na.length===1&&!na[0].includes("."),Nn=Hn?na[0]:null,la=Nn&&Nn.split("/").pop()||"",Xa=M.useCallback(async re=>{if(Nn){Sn(!1);try{(await fetch("/api/studio/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:Nn,newName:re})})).ok&&(u(),g())}catch(J){console.error("Failed to rename folder:",J)}}},[Nn,u,g]);return k?null:x(Ct,{children:[D&&c(Ui,{title:"Delete Items",message:`Are you sure you want to delete ${o.size} item(s)? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Xi,onCancel:()=>V(!1)}),Y&&c(Ui,{title:"Push to CDN",message:`Push ${Le} image${Le!==1?"s":""} to Cloudflare R2?${Be?" Remote images will be downloaded first.":""}${Fe?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:br,onCancel:()=>xe(!1)}),_e&&c(Ui,{title:"Download from CDN",message:Ut>j?`Download ${j} of ${Ut} selected file${Ut!==1?"s":""} from Cloudflare R2? (${Ut-j} not on CDN)`:`Download ${j} image${j!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`,confirmLabel:"Download",onConfirm:Sr,onCancel:()=>A(!1)}),ie&&c(Ws,{title:y,progress:Q,onStop:Vi,onDeleteOrphans:Wl,onClose:()=>{ye(!1),q({current:0,total:0,percent:0,status:"processing"}),g()}}),Ce&&c(Xs,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:ea,onCancel:()=>ot(!1)}),we&&c(zh,{selectedItems:o,currentPath:p,onMove:re=>{Cn(!1),ta(re)},onCancel:()=>Cn(!1)}),at&&Nn&&c(Xs,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:la,defaultValue:la,confirmLabel:"Rename",onConfirm:Xa,onCancel:()=>Sn(!1)}),ve&&c(wh,{title:ve.title,message:ve.message,onClose:()=>{oe(null),g()}}),c(Mh,{isOpen:$l,onClose:()=>Te(!1)}),X&&c(P1,{currentPath:p,onClose:()=>ge(!1),onUploadComplete:()=>{ge(!1),g()}}),x("div",{css:pe.toolbar,children:[c("input",{ref:le,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:gr,style:{display:"none"}}),x("div",{css:pe.left,children:[x("button",{css:[pe.btn,pe.btnPrimary,"",""],onClick:()=>ge(!0),disabled:I||wn,children:[c(ng,{}),"Add New"]}),x("button",{css:pe.btn,onClick:()=>Hn?Sn(!0):ot(!0),disabled:wn&&!Hn,title:wn&&!Hn?"Cannot create folders in protected images folder":void 0,children:[Hn?c(og,{}):c(ig,{}),Hn?"Rename Folder":"New Folder"]}),c("div",{css:pe.divider}),x("div",{css:pe.cloudDropdownWrapper,ref:al,children:[x("button",{css:pe.btn,onClick:()=>An(!ll),disabled:K.showProgress||wn,title:wn?"Cannot process images folder":void 0,children:[c(hg,{}),"Thumbnails",c("svg",{css:pe.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"})})]}),ll&&x("div",{css:pe.cloudDropdown,children:[x("button",{css:[pe.cloudDropdownItem,pe.cloudDropdownItemDefault,"",""],onClick:()=>{An(!1),Ga("generate")},children:[c(pg,{}),"Generate Thumbnails"]}),x("button",{css:[pe.cloudDropdownItem,pe.cloudDropdownItemDanger,"",""],onClick:()=>{An(!1),Ga("remove")},children:[c(mg,{}),"Remove Thumbnails"]})]})]}),x("button",{css:[pe.btn,pe.btnDanger,"",""],onClick:yr,disabled:!Vt,children:[c(ag,{}),"Delete"]}),x("button",{css:pe.btn,onClick:Un,disabled:!Vt,children:[c(rg,{}),"Move"]}),x("div",{css:pe.cloudDropdownWrapper,ref:It,children:[x("button",{css:[pe.btn,pe.btnCloud,"",""],onClick:()=>jt(!sn),disabled:!Vt,children:[c(rh,{}),"Cloud",c("svg",{css:pe.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"})})]}),sn&&Vt&&x("div",{css:pe.cloudDropdown,children:[Cr&&x(Ct,{children:[x("button",{css:pe.cloudDropdownItem,onClick:()=>{jt(!1),Il()},children:[c(cg,{}),"Push Update"]}),x("button",{css:[pe.cloudDropdownItem,pe.cloudDropdownItemDanger,"",""],onClick:()=>{jt(!1),Pl()},children:[c(sg,{}),"Cancel Update"]}),c("div",{css:pe.cloudDropdownDivider})]}),x("button",{css:pe.cloudDropdownItem,onClick:()=>{jt(!1),vr()},children:[c(rh,{}),"Push CDN"]}),x("button",{css:pe.cloudDropdownItem,onClick:()=>{jt(!1),xr()},children:[c(ug,{}),"Download"]})]})]}),x("div",{css:pe.searchWrapper,children:[c("input",{css:pe.searchInput,type:"text",placeholder:"Search images...",value:ol,onChange:Zi,onKeyDown:Va}),ol&&c("button",{css:pe.searchClearBtn,onClick:()=>_l(""),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"})})})]})]}),x("div",{css:pe.right,children:[Vt&&x("span",{css:pe.selectionCount,children:[o.size," selected",c("button",{css:pe.clearBtn,onClick:u,children:"Clear"})]}),x("button",{css:pe.btn,onClick:Dt,disabled:te,children:[c(lg,{spinning:te}),"Scan"]}),x("div",{css:pe.viewToggle,children:[c("button",{css:[pe.viewBtn,s==="grid"&&pe.viewBtnActive,"",""],onClick:()=>h("grid"),"aria-label":"Grid view",children:c(fg,{})}),c("button",{css:[pe.viewBtn,s==="list"&&pe.viewBtnActive,"",""],onClick:()=>h("list"),"aria-label":"List view",children:c(dg,{})})]})]})]})]})}function ng(){return c("svg",{css:pe.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 lg({spinning:o}){return c("svg",{css:[pe.icon,o&&pe.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 ag(){return c("svg",{css:pe.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 ig(){return c("svg",{css:pe.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 og(){return c("svg",{css:pe.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 rg(){return c("svg",{css:pe.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 rh(){return c("svg",{css:pe.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 cg(){return c("svg",{css:pe.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 sg(){return c("svg",{css:pe.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 ug(){return c("svg",{css:pe.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 fg(){return c("svg",{css:pe.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 dg(){return c("svg",{css:pe.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 hg(){return c("svg",{css:pe.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 pg(){return c("svg",{css:pe.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 mg(){return c("svg",{css:pe.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 gg{async get(s){const h=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!h.ok){const u=await h.json().catch(()=>({}));throw new Error(u.error||`Request failed: ${h.status}`)}return h.json()}async post(s,h){const u=await fetch(s,{method:"POST",headers:h?{"Content-Type":"application/json"}:void 0,body:h?JSON.stringify(h):void 0});if(!u.ok){const p=await u.json().catch(()=>({}));throw new Error(p.error||`Request failed: ${u.status}`)}return u.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,h="public"){const u=new FormData;u.append("file",s),u.append("path",h);const p=await fetch("/api/studio/upload",{method:"POST",body:u});if(!p.ok){const g=await p.json().catch(()=>({}));throw new Error(g.error||`Upload failed: ${p.status}`)}return p.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,h){return this.post("/api/studio/create-folder",{parentPath:s,name:h})}async rename(s,h){return this.post("/api/studio/rename",{oldPath:s,newName:h})}async move(s,h){return this.post("/api/studio/move",{paths:s,destination:h})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}processAllStream(){return new EventSource("/api/studio/process-all")}}const qs=new gg;function Th(){const{currentPath:o,setCurrentPath:s,navigateUp:h,selectedItems:u,toggleSelection:p,selectRange:g,lastSelectedPath:k,selectAll:R,clearSelection:L,refreshKey:S,setFocusedItem:G,triggerRefresh:B,triggerScan:K,searchQuery:le,showError:U,setFileItems:X}=qa(),[ge,I]=M.useState([]),[de,te]=M.useState(!0),[ne,D]=M.useState(!1),V=M.useRef(!0),Y=M.useRef(o);M.useEffect(()=>{async function j(){const P=Y.current!==o;(V.current||P)&&te(!0),Y.current=o;try{const ie=le&&le.length>=2?await qs.search(le):await qs.list(o),ye=ie.items||[];I(ye),X(ye),D(ie.isEmpty===!0)}catch(ie){const ye=ie instanceof Error?ie.message:"Failed to load items";U("Load Error",ye),I([]),X([]),D(!1)}te(!1),V.current=!1}j()},[o,S,le,U,X]);const xe=o==="public",Le=le&&le.length>=2,Oe=[...ge].sort((j,P)=>j.type==="folder"&&P.type!=="folder"?-1:j.type!=="folder"&&P.type==="folder"?1:j.name.localeCompare(P.name)),Be=Oe.length>0&&Oe.every(j=>u.has(j.path)),Ne=Oe.some(j=>u.has(j.path)),Fe=M.useCallback((j,P)=>{P.shiftKey&&k?g(k,j.path,Oe):p(j.path)},[k,g,Oe,p]),We=M.useCallback(j=>{j.type==="folder"?s(j.path):G(j)},[s,G]),_e=M.useCallback(async j=>{try{const P="/"+j.path.replace(/^public\//,"");await qs.reprocess([P]),B()}catch(P){const ie=P instanceof Error?P.message:"Failed to generate thumbnail";U("Processing Error",ie)}},[B,U]),A=M.useCallback(()=>{Be?L():R(Oe)},[Be,L,R,Oe]);return{items:ge,loading:de,sortedItems:Oe,metaEmpty:ne,isAtRoot:xe,isSearching:Le,allItemsSelected:Be,someItemsSelected:Ne,currentPath:o,selectedItems:u,navigateUp:h,handleItemClick:Fe,handleOpen:We,handleGenerateThumbnail:_e,handleSelectAll:A,triggerScan:K}}const yg=nl`
63
+ to { transform: rotate(360deg); }
64
+ `,ee={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:b("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",yg," 0.8s linear infinite;",""),empty:b("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:b("font-size:",F.base,";margin:0 0 4px 0;&:last-child{color:",f.textMuted,";font-size:",F.sm,";}",""),scanButton:b("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:b("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:b("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:b("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:b("width:18px;height:18px;accent-color:",f.primary,";cursor:pointer;",""),content:b("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",f.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:b("width:56px;height:56px;color:",f.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:b("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",f.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:b("width:56px;height:56px;color:",f.textMuted,";",""),fileIcon:b("width:40px;height:40px;color:",f.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:b("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:b("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:b("display:flex;align-items:center;gap:3px;font-size:",F.xs,";",""),folderStatLocal:b("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:b("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:b("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:b("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:b("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,";}",""),name:b("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:b("font-size:",F.xs,";color:",f.textMuted,";margin:2px 0 0 0;",""),selectAllRow:b("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";",""),selectAllLabel:b("display:flex;align-items:center;gap:10px;font-size:",F.base,";font-weight:500;color:",f.textSecondary,";cursor:pointer;&:hover{color:",f.text,";}",""),selectAllCheckbox:b("width:16px;height:16px;accent-color:",f.primary,";","")};function vg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:p,allItemsSelected:g,someItemsSelected:k,selectedItems:R,navigateUp:L,handleItemClick:S,handleOpen:G,handleGenerateThumbnail:B,handleSelectAll:K,triggerScan:le}=Th();return o?c("div",{css:ee.loading,children:c("div",{css:ee.spinner})}):h&&u?x("div",{css:ee.empty,children:[c("svg",{css:ee.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:ee.emptyText,children:"No files tracked yet"}),c("p",{css:ee.emptyText,children:"Click Scan to discover files in your public folder"}),c("button",{css:ee.scanButton,onClick:le,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:ee.empty,children:[c("svg",{css:ee.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:ee.emptyText,children:"No files in this folder"}),c("p",{css:ee.emptyText,children:"Upload images or click Scan in the toolbar"})]}):x("div",{children:[s.length>0&&c("div",{css:ee.selectAllRow,children:x("label",{css:ee.selectAllLabel,children:[c("input",{type:"checkbox",css:ee.selectAllCheckbox,checked:g,ref:U=>{U&&(U.indeterminate=k&&!g)},onChange:K}),"Select all (",s.length,")"]})}),x("div",{css:ee.grid,children:[!u&&!p&&x("div",{css:[ee.item,ee.parentItem,"",""],onClick:L,children:[c("div",{css:ee.content,children:c("svg",{css:ee.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"})})}),x("div",{css:ee.label,children:[c("p",{css:ee.name,children:".."}),c("p",{css:ee.size,children:"Parent folder"})]})]}),s.map(U=>c(xg,{item:U,isSelected:R.has(U.path),onClick:X=>S(U,X),onOpen:()=>G(U),onGenerateThumbnail:()=>B(U)},U.path))]})]})}function bg(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function xg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[g,k]=M.useState(!1),R=o.type==="folder",L=!R&&o.thumbnail!==void 0,S=o.isProtected||R&&o.name==="images"&&o.path==="public/images",G=bg(o.path),B=!R&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||G),K=U=>{U.stopPropagation();const X="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(X),k(!0),setTimeout(()=>k(!1),1500)},le=U=>{if(S){U.stopPropagation(),u();return}h(U)};return x("div",{css:[ee.item,s&&!S&&ee.itemSelected,"",""],onClick:le,children:[!S&&c("div",{css:ee.checkboxWrapper,onClick:U=>U.stopPropagation(),children:c("input",{type:"checkbox",css:ee.checkbox,checked:s,onChange:()=>h({})})}),x("div",{css:ee.content,children:[x("button",{css:ee.copyBtn,onClick:K,title:"Copy file path",children:[g&&c("span",{css:ee.tooltip,children:"Copied!"}),c("svg",{css:ee.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:ee.openBtn,onClick:U=>{U.stopPropagation(),u()},children:"Open"}),R?S?x("div",{css:ee.imagesFolderWrapper,children:[c("svg",{css:ee.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:ee.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:ee.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"})}):L&&o.thumbnail?c("img",{css:ee.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):c("svg",{css:ee.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:ee.label,children:c("div",{css:ee.labelRow,children:x("div",{css:ee.labelText,children:[c("p",{css:ee.name,title:o.name,children:o.name}),R?x("div",{css:ee.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[ee.folderStat,ee.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:ee.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"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&x("span",{css:[ee.folderStat,ee.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:ee.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"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&x("span",{css:[ee.folderStat,ee.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:ee.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"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&x("span",{css:[ee.folderStat,ee.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:ee.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"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&x("span",{css:ee.size,children:[o.fileCount," files"]})]}):x("div",{css:ee.statusRow,children:[c("div",{css:ee.statusLeft,children:o.hasUpdate?x(Ct,{children:[c("svg",{css:ee.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:ee.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:ee.updateLabel,children:"update"})]}):o.cdnPushed?c("svg",{css:o.isRemote?ee.storedIconRemote:ee.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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"})}):o.size!==void 0?c("span",{css:ee.size,children:Sg(o.size)}):null}),B&&c("span",{css:ee.thumbChips,children:G?c("span",{css:ee.thumbChip,children:G}):x(Ct,{children:[o.hasSm&&c("span",{css:ee.thumbChip,children:"SM"}),o.hasMd&&c("span",{css:ee.thumbChip,children:"MD"}),o.hasLg&&c("span",{css:ee.thumbChip,children:"LG"}),o.hasFull&&c("span",{css:ee.thumbChip,children:"FULL"})]})})]})]})})})]})}function Sg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Cg=nl`
65
+ to { transform: rotate(360deg); }
66
+ `,Z={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:b("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",Cg," 0.8s linear infinite;",""),empty:b("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyHint:b("font-size:",F.sm,";color:",f.textMuted,";margin-top:4px;",""),scanButton:b("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:b("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:b("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:b("",""),row:b("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:b("background-color:",f.primaryLight,";&:hover{background-color:",f.primaryLight,";}",""),parentRow:b("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:b("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:b("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:b("display:flex;align-items:center;gap:3px;font-size:",F.xs,";",""),folderStatLocal:b("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:b("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:b("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:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},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:b("width:24px;height:24px;color:",f.imagesFolder,";",""),lockIcon:b("width:10px;height:10px;color:",f.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:b("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),fileIcon:b("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),thumbnail:b("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",f.borderLight,";",""),name:b("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:b("font-size:",F.sm,";color:",f.textSecondary,";",""),cdnBadge:b("display:inline-flex;align-items:center;gap:4px;font-size:",F.xs,";font-weight:500;color:",f.success,";",""),cdnBadgeRemote:b("display:inline-flex;align-items:center;font-size:",F.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:b("font-size:",F.sm,";color:",f.textMuted,";",""),openBtn:b("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 wg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:p,allItemsSelected:g,someItemsSelected:k,selectedItems:R,navigateUp:L,handleItemClick:S,handleOpen:G,handleGenerateThumbnail:B,handleSelectAll:K,triggerScan:le}=Th();return o?c("div",{css:Z.loading,children:c("div",{css:Z.spinner})}):h&&u?x("div",{css:Z.empty,children:[c("p",{children:"No files tracked yet"}),c("p",{css:Z.emptyHint,children:"Click Scan to discover files in your public folder"}),c("button",{css:Z.scanButton,onClick:le,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:Z.empty,children:[c("p",{children:"No files in this folder"}),c("p",{css:Z.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):c("div",{css:Z.tableWrapper,children:x("table",{css:Z.table,children:[c("thead",{children:x("tr",{children:[c("th",{css:[Z.th,Z.thCheckbox,"",""],children:s.length>0&&c("input",{type:"checkbox",css:Z.checkbox,checked:g,ref:U=>{U&&(U.indeterminate=k&&!g)},onChange:K})}),c("th",{css:Z.th,children:"Name"}),c("th",{css:[Z.th,Z.thSize,"",""],children:"Size"}),c("th",{css:[Z.th,Z.thDimensions,"",""],children:"Dimensions"}),c("th",{css:[Z.th,Z.thCdn,"",""],children:"CDN"})]})}),x("tbody",{css:Z.tbody,children:[!u&&!p&&x("tr",{css:Z.parentRow,onClick:L,children:[c("td",{css:Z.td}),c("td",{css:Z.td,children:x("div",{css:Z.nameCell,children:[c("svg",{css:Z.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:Z.name,children:".."})]})}),c("td",{css:[Z.td,Z.meta,"",""],children:"--"}),c("td",{css:[Z.td,Z.meta,"",""],children:"Parent folder"}),c("td",{css:Z.td,children:"--"})]}),s.map(U=>c(zg,{item:U,isSelected:R.has(U.path),onClick:X=>S(U,X),onOpen:()=>G(U),onGenerateThumbnail:()=>B(U)},U.path))]})]})})}function zg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[g,k]=M.useState(!1),R=o.type==="folder",L=!R&&o.thumbnail!==void 0,S=o.isProtected||R&&o.name==="images"&&o.path==="public/images",G=K=>{K.stopPropagation();const le="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(le),k(!0),setTimeout(()=>k(!1),1500)},B=K=>{if(S){K.stopPropagation(),u();return}h(K)};return x("tr",{css:[Z.row,s&&!S&&Z.rowSelected,"",""],onClick:B,children:[c("td",{css:[Z.td,Z.checkboxCell,"",""],onClick:K=>K.stopPropagation(),children:!S&&c("input",{type:"checkbox",css:Z.checkbox,checked:s,onChange:()=>h({})})}),c("td",{css:Z.td,children:x("div",{css:Z.nameCell,children:[R?S?x("div",{css:Z.imagesFolderWrapper,children:[c("svg",{css:Z.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:Z.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:Z.folderIconWrapper,children:c("svg",{css:Z.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"})})}):L&&o.thumbnail?c("div",{css:Z.thumbnailWrapper,children:c("img",{css:Z.thumbnail,src:o.thumbnail,alt:o.name,loading:"lazy"})}):c("div",{css:Z.thumbnailWrapper,children:c("svg",{css:Z.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:Z.name,title:o.name,children:Mg(o.name)}),x("div",{css:Z.actionsCell,children:[x("button",{css:Z.copyBtn,onClick:G,title:"Copy file path",children:[g&&c("span",{css:Z.tooltip,children:"Copied!"}),c("svg",{css:Z.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:Z.openBtn,onClick:K=>{K.stopPropagation(),u()},children:"Open"})]})]})}),c("td",{css:[Z.td,Z.meta,"",""],children:R?x("div",{css:Z.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[Z.folderStat,Z.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:Z.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"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&x("span",{css:[Z.folderStat,Z.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:Z.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"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&x("span",{css:[Z.folderStat,Z.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:Z.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"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&x("span",{css:[Z.folderStat,Z.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:Z.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"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&x("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?x("span",{css:Z.updateLabel,children:[c("svg",{css:Z.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:Z.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"]}):o.cdnPushed?c("span",{css:Z.storedLabel,children:c("svg",{css:o.isRemote?Z.storedIconRemote:Z.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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"})})}):o.size!==void 0?ch(o.size):"--"}),c("td",{css:[Z.td,Z.meta,"",""],children:R?o.totalSize!==void 0?ch(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),c("td",{css:Z.td,children:o.cdnPushed?o.isRemote?c("span",{css:Z.cdnBadgeRemote,children:"Remote"}):x("span",{css:Z.cdnBadge,children:[c("svg",{css:Z.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:Z.cdnEmpty,children:"--"})})]})}function ch(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function Mg(o,s=32){if(o.length<=s)return o;const h=o.lastIndexOf("."),u=h>0?o.substring(h):"",p=h>0?o.substring(0,h):o,g=s-u.length-3;if(g<6)return o.substring(0,s-3)+"...";const k=Math.ceil(g/2),R=Math.floor(g/2);return p.substring(0,k)+"..."+p.substring(p.length-R)+u}const Tg=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],Ag=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function Eg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Tg.includes(s)}function Dg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Ag.includes(s)}const he={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:b("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:b("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:b("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:b("width:20px;height:20px;color:",f.textSecondary,";",""),statusIcon:b("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:b("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:b("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:b("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:b("width:80px;height:80px;color:",f.textMuted,";margin-bottom:16px;",""),fileName:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),sidebar:b("width:280px;background:",f.surface,";border-left:1px solid ",f.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:b("padding:16px 20px;border-bottom:1px solid ",f.border,";",""),sidebarTitle:b("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:b("display:flex;justify-content:space-between;font-size:",F.sm,";",""),infoLabel:b("color:",f.textSecondary,";",""),infoValue:b("color:",f.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:b("color:",f.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:b("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;}",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:b("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:b("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.danger,";}",""),actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function kg(){const{focusedItem:o,setFocusedItem:s,triggerRefresh:h,fileItems:u,requestDelete:p,requestMove:g,requestSync:k,requestProcess:R,actionState:L}=qa(),[S,G]=M.useState(!1),[B,K]=M.useState(!1),[le,U]=M.useState(null),[X,ge]=M.useState(!1),[I,de]=M.useState(!1),[te,ne]=M.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),D=L.showProgress,V=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1;if(!o)return null;const Y=Eg(o.name),xe=Dg(o.name),Le="/"+o.path.replace(/^public\//,""),Oe=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Le}`:Le,Be=typeof window<"u"?window.location.origin:"",Ne=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Le}`:`${Be}${Le}`,Fe=()=>{s(null)},We=()=>{navigator.clipboard.writeText(Ne),ge(!0),setTimeout(()=>ge(!1),1500)},_e=()=>{if(!o)return;const ie=document.createElement("a");ie.href=Ne,ie.download=o.name,ie.target="_blank",document.body.appendChild(ie),ie.click(),document.body.removeChild(ie)},A=async ie=>{if(G(!1),ie&&ie!==o.name)try{const ye=await fetch("/api/studio/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:ie})});if(ye.ok)h(),s(null);else{const y=await ye.json();U({title:"Rename Failed",message:y.error||"Failed to rename file"})}}catch(ye){console.error("Rename error:",ye),U({title:"Rename Failed",message:"An error occurred while renaming the file"})}},j=async()=>{if(o){de(!0),ne({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ie=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!ie.ok){const _=await ie.json();ne({current:0,total:3,percent:0,status:"error",message:_.error||"Failed to generate favicons"});return}const ye=ie.body?.getReader(),y=new TextDecoder;if(ye){let _="";for(;;){const{done:Q,value:q}=await ye.read();if(Q)break;_+=y.decode(q,{stream:!0});const ve=_.split(`
67
+ `);_=ve.pop()||"";for(const oe of ve)if(oe.startsWith("data: "))try{const Ce=JSON.parse(oe.slice(6));Ce.type==="start"?ne(ot=>({...ot,total:Ce.total})):Ce.type==="progress"?ne({current:Ce.current,total:Ce.total,percent:Ce.percent,status:"processing",message:Ce.message}):Ce.type==="complete"?ne({current:Ce.processed,total:Ce.processed,percent:100,status:Ce.errors>0?"error":"complete",message:Ce.message}):Ce.type==="error"&&ne(ot=>({...ot,status:"error",message:Ce.message}))}catch{}}}}catch(ie){console.error("Favicon generation error:",ie),ne({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},P=()=>Y?c("img",{css:he.image,src:Oe,alt:o.name}):xe?c("video",{css:he.video,src:Oe,controls:!0}):x("div",{css:he.filePlaceholder,children:[c("svg",{css:he.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:he.fileName,children:o.name})]});return x(Ct,{children:[le&&c(wh,{title:le.title,message:le.message,onClose:()=>U(null)}),c(Mh,{isOpen:B,onClose:()=>K(!1)}),S&&c(Xs,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:A,onCancel:()=>G(!1)}),I&&c(Ws,{title:"Generating Favicons",progress:te,onClose:()=>de(!1)}),c("div",{css:he.overlay,onClick:Fe,children:x("div",{css:he.container,onClick:ie=>ie.stopPropagation(),children:[x("div",{css:he.main,children:[x("div",{css:he.headerButtons,children:[o.cdnPushed&&!o.isRemote&&c("span",{css:he.statusIcon,title:"Pushed to CDN",children:c("svg",{css:he.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"})})}),o.isRemote&&c("span",{css:he.statusIcon,title:"Remote image",children:c("svg",{css:he.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"})})}),x("button",{css:he.copyBtn,onClick:We,title:"Copy file path",children:[X&&c("span",{css:he.tooltip,children:"Copied!"}),c("svg",{css:he.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:he.mainCloseBtn,onClick:Fe,"aria-label":"Close",children:c("svg",{css:he.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:he.mediaWrapper,children:P()})]}),x("div",{css:he.sidebar,children:[c("div",{css:he.sidebarHeader,children:c("h3",{css:he.sidebarTitle,children:"Details"})}),x("div",{css:he.sidebarContent,children:[x("div",{css:he.info,children:[x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Name"}),c("span",{css:he.infoValueWrap,children:o.name})]}),x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Path"}),c("span",{css:he.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Size"}),c("span",{css:he.infoValue,children:_g(o.size)})]}),o.dimensions&&x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Dimensions"}),x("span",{css:he.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"CDN Status"}),c("span",{css:he.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"URL"}),c("a",{href:Ne,target:"_blank",rel:"noopener noreferrer",css:he.infoLink,title:Ne,children:Ne})]})]}),x("div",{css:he.actions,children:[x("button",{css:he.actionBtn,onClick:()=>G(!0),disabled:o.isProtected,children:[c("svg",{css:he.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"]}),x("button",{css:he.actionBtn,onClick:()=>g([o.path]),disabled:D||o.isProtected,children:[c("svg",{css:he.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"]}),x("button",{css:he.actionBtn,onClick:()=>k([o.path],u),disabled:D||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[c("svg",{css:he.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"]}),x("button",{css:he.actionBtn,onClick:_e,disabled:D,title:"Download original image",children:[c("svg",{css:he.actionIcon,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-4l-4 4m0 0l-4-4m4 4V4"})}),"Download Image"]}),x("button",{css:he.actionBtn,onClick:()=>R([o.path]),disabled:D||o.isProtected,children:[c("svg",{css:he.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"})}),"Process Image"]}),V&&x("button",{css:he.actionBtn,onClick:j,disabled:I||o.isProtected,children:[c("svg",{css:he.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"]}),x("button",{css:[he.actionBtn,he.actionBtnDanger,"",""],onClick:()=>p([o.path]),disabled:D||o.isProtected,children:[c("svg",{css:he.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"]})]})]})]})]})})]})}function _g(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Og="36px",Ae={btn:b("height:",Og,";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:b("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:b(Gi," 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:b("font-size:",F.xl,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:b("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:b("font-size:",F.base,";font-weight:600;color:",f.text,";margin:0 0 12px 0;",""),description:b("font-size:",F.sm,";color:",f.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:b("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:b("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:b("width:14px;height:14px;color:",f.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:b("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:b("font-size:",F.xs,";font-weight:500;color:",f.textSecondary,";display:block;margin-bottom:6px;",""),footer:b("margin-top:24px;padding-top:20px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:b("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:b("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:b("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:b("font-size:",F.xs,";color:",f.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:b("padding:6px;background:none;border:none;cursor:pointer;color:",f.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",f.danger,";}",""),cdnAddBtn:b("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:b("font-size:",F.xs,";color:",f.danger,";margin-top:8px;padding:8px 12px;background:",f.dangerLight,";border-radius:6px;","")};function Rg(){const[o,s]=M.useState(!1);return x(Ct,{children:[c("button",{css:Ae.btn,onClick:()=>s(!0),"aria-label":"Settings",children:x("svg",{css:Ae.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"})]})}),o&&c(Ug,{onClose:()=>s(!1)})]})}const Lg=`# Dev site link (opens from Studio header)
68
+ STUDIO_DEV_SITE_URL=http://localhost:3000
69
+
70
+ # Cloudflare R2 Storage
71
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
72
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
73
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
74
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
75
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function Ug({onClose:o}){const{triggerRefresh:s}=qa(),[h,u]=M.useState(!1),[p,g]=M.useState([]),[k,R]=M.useState(!0),[L,S]=M.useState(!1),[G,B]=M.useState(!1);M.useEffect(()=>{async function I(){try{const te=await(await fetch("/api/studio/cdns")).json();g(te.cdns||[])}catch(de){console.error("Failed to load CDN URLs:",de)}finally{R(!1)}}I()},[]);const K=()=>{navigator.clipboard.writeText(Lg),u(!0),setTimeout(()=>u(!1),2e3)},le=M.useCallback((I,de)=>{g(te=>{const ne=[...te];return ne[I]=de,ne}),B(!0)},[]),U=M.useCallback(()=>{g(I=>[...I,""]),B(!0)},[]),X=M.useCallback(I=>{g(de=>de.filter((te,ne)=>ne!==I)),B(!0)},[]),ge=M.useCallback(async()=>{S(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:p})})).ok&&(B(!1),s(),o())}catch(I){console.error("Failed to save CDN URLs:",I)}finally{S(!1)}},[p,s,o]);return c("div",{css:Ae.overlay,onClick:o,children:x("div",{css:Ae.panel,onClick:I=>I.stopPropagation(),children:[x("div",{css:Ae.header,children:[c("h2",{css:Ae.title,children:"Settings"}),c("button",{css:Ae.closeBtn,onClick:o,children:c("svg",{css:Ae.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"})})})]}),x("div",{css:Ae.sections,children:[x("section",{children:[c("h3",{css:Ae.sectionTitle,children:"CDN URLs"}),c("p",{css:Ae.description,children:"Manage CDN base URLs used by your images:"}),k?c("p",{css:Ae.description,children:"Loading..."}):x(Ct,{children:[c("div",{css:Ae.cdnList,children:p.map((I,de)=>x("div",{css:Ae.cdnRow,children:[c("span",{css:Ae.cdnIndex,children:de}),c("input",{css:Ae.cdnInput,type:"text",value:I,onChange:te=>le(de,te.target.value),placeholder:"https://cdn.example.com"}),c("button",{css:Ae.cdnDeleteBtn,onClick:()=>X(de),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"})})})]},de))}),x("button",{css:Ae.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"]}),p.length>0&&c("p",{css:Ae.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),x("section",{children:[c("h3",{css:Ae.sectionTitle,children:"Environment Variables"}),x("p",{css:Ae.description,children:["Configure in ",c("code",{children:".env.studio"})," file:"]}),x("div",{css:Ae.codeWrapper,children:[x("button",{css:Ae.copyBtn,onClick:K,title:"Copy to clipboard",children:[h&&c("span",{css:Ae.tooltip,children:"Copied!"}),c("svg",{css:Ae.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"})})]}),x("div",{css:Ae.code,children:[c("p",{css:Ae.codeLine,children:"STUDIO_DEV_SITE_URL=http://localhost:3000"}),c("p",{css:Ae.codeLine,children:" "}),c("p",{css:Ae.codeLine,children:"# Cloudflare R2 Storage"}),c("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),c("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),c("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),c("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),c("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),x("section",{children:[c("h3",{css:Ae.sectionTitle,children:"Thumbnail Sizes"}),x("div",{css:Ae.grid,children:[x("div",{children:[c("label",{css:Ae.label,children:"Small"}),c("input",{css:Ae.input,type:"number",defaultValue:300})]}),x("div",{children:[c("label",{css:Ae.label,children:"Medium"}),c("input",{css:Ae.input,type:"number",defaultValue:700})]}),x("div",{children:[c("label",{css:Ae.label,children:"Large"}),c("input",{css:Ae.input,type:"number",defaultValue:1400})]})]})]})]}),x("div",{css:Ae.footer,children:[c("button",{css:Ae.cancelBtn,onClick:o,children:"Cancel"}),c("button",{css:Ae.saveBtn,onClick:ge,disabled:L||!G,children:L?"Saving...":"Save Changes"})]})]})})}const Fl={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:b("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:b("width:24px;height:24px;color:",f.danger,";flex-shrink:0;",""),title:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0;",""),message:b("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:b("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 Hg(){const{error:o,clearError:s}=qa();return o?c("div",{css:Fl.overlay,onClick:s,children:x("div",{css:Fl.modal,onClick:h=>h.stopPropagation(),children:[x("div",{css:Fl.header,children:[c("svg",{css:Fl.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:Fl.title,children:o.title})]}),c("p",{css:Fl.message,children:o.message}),c("button",{css:Fl.button,onClick:s,children:"OK"})]})}):null}const sh={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate"};function Ng({triggerRefresh:o,clearSelection:s,setFocusedItem:h,showError:u}){const[p,g]=M.useState(sh),k=M.useRef(null),R=M.useCallback(D=>{g(V=>({...V,progressState:typeof D=="function"?D(V.progressState):{...V.progressState,...D}}))},[]),L=M.useCallback(D=>{g(V=>({...V,actionPaths:D,showDeleteConfirm:!0}))},[]),S=M.useCallback(D=>{g(V=>({...V,actionPaths:D,showMoveModal:!0}))},[]),G=M.useCallback((D,V)=>{const Y=D.map(Oe=>"/"+Oe.replace(/^public\//,""));let xe=!1,Le=!1;for(const Oe of D){const Be=V.find(Ne=>Ne.path===Oe);Be&&(Be.isRemote?xe=!0:Be.cdnPushed||(Le=!0))}g(Oe=>({...Oe,actionPaths:D,syncImageCount:Y.length,syncHasRemote:xe,syncHasLocal:Le,showSyncConfirm:!0}))},[]),B=M.useCallback(D=>{g(V=>({...V,actionPaths:D,showProcessConfirm:!0,processMode:"generate"}))},[]),K=M.useCallback(D=>{g(V=>({...V,processMode:D}))},[]),le=M.useCallback(()=>{g(D=>({...D,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1}))},[]),U=M.useCallback(()=>{g(sh)},[]),X=M.useCallback(()=>{k.current&&k.current.abort()},[]),ge=M.useCallback(async()=>{const D=p.actionPaths;g(V=>({...V,showDeleteConfirm:!1}));try{const V=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:D})});if(V.ok)s(),h(null),o();else{const Y=await V.json();u("Delete Failed",Y.error||"Unknown error")}}catch(V){console.error("Delete error:",V),u("Delete Failed","Delete failed. Check console for details.")}},[p.actionPaths,s,h,o,u]),I=M.useCallback(async D=>{const V=p.actionPaths;g(Y=>({...Y,showMoveModal:!1,showProgress:!0,progressTitle:"Moving Files",progressState:{current:0,total:V.length,percent:0,status:"processing",message:"Moving files..."}}));try{const Y=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:V,destination:D})});if(!Y.ok){const Oe=await Y.json();R({status:"error",message:Oe.error||"Move failed"});return}const xe=Y.body?.getReader(),Le=new TextDecoder;if(xe){let Oe="";for(;;){const{done:Be,value:Ne}=await xe.read();if(Be)break;Oe+=Le.decode(Ne,{stream:!0});const Fe=Oe.split(`
76
+ `);Oe=Fe.pop()||"";for(const We of Fe)if(We.startsWith("data: "))try{const _e=JSON.parse(We.slice(6));_e.type==="start"?R(A=>({...A,total:_e.total})):_e.type==="progress"?R({current:_e.current,total:_e.total,percent:Math.round(_e.current/_e.total*100),status:"processing",message:_e.message}):_e.type==="complete"?(R(A=>({...A,status:"complete",message:`Moved ${_e.moved} file${_e.moved!==1?"s":""}${_e.errors>0?`, ${_e.errors} error${_e.errors!==1?"s":""}`:""}`})),_e.errors>0&&_e.errorMessages?.length>0&&u("Move Failed",_e.errorMessages.join(`
77
+ `)),s(),h(null),o()):_e.type==="error"&&R(A=>({...A,status:"error",message:_e.message||"Unknown error"}))}catch{}}}}catch(Y){console.error("Move error:",Y),R(xe=>({...xe,status:"error",message:"Failed to move files. Check console for details."}))}},[p.actionPaths,s,h,o,u,R]),de=M.useCallback(async()=>{const V=p.actionPaths.map(Le=>"/"+Le.replace(/^public\//,""));g(Le=>({...Le,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:V.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let Y=0;const xe=[];for(let Le=0;Le<V.length;Le++){const Oe=V[Le];try{const Be=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[Oe]})});if(Be.ok)Y++;else{const Ne=await Be.json();xe.push(`${Oe}: ${Ne.error||"Unknown error"}`)}}catch(Be){xe.push(`${Oe}: ${Be instanceof Error?Be.message:"Unknown error"}`)}R({current:Le+1,total:V.length,percent:Math.round((Le+1)/V.length*100),status:"processing",message:`Pushed ${Oe}`})}R({current:V.length,total:V.length,percent:100,status:xe.length>0?"error":"complete",message:`Pushed ${Y} file${Y!==1?"s":""}${xe.length>0?`, ${xe.length} error${xe.length!==1?"s":""}`:""}`}),xe.length>0&&u("Push Errors",xe.join(`
78
+ `)),s(),o()},[p.actionPaths,s,o,u,R]),te=M.useCallback(async()=>{const D=p.actionPaths,V=p.processMode,Y=D.map(Fe=>{const We=Fe.replace(/^public\//,"");return We.startsWith("/")?We:`/${We}`}),xe=V==="remove",Le=xe?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",Oe=xe?"Removing Thumbnails":"Generating Thumbnails",Be=xe?"Removing thumbnails...":"Generating thumbnails...";g(Fe=>({...Fe,showProcessConfirm:!1,showProgress:!0,progressTitle:Oe,progressState:{current:0,total:Y.length,percent:0,status:"processing",message:Be}})),k.current=new AbortController;const Ne=k.current.signal;try{const Fe=await fetch(Le,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:Y}),signal:Ne});if(!Fe.ok){const A=await Fe.json();R({current:0,total:Y.length,percent:0,status:"error",message:A.error||(xe?"Failed to remove thumbnails":"Processing failed")});return}const We=Fe.body?.getReader(),_e=new TextDecoder;if(We){let A="";for(;;){const{done:j,value:P}=await We.read();if(j)break;A+=_e.decode(P,{stream:!0});const ie=A.split(`
79
+ `);A=ie.pop()||"";for(const ye of ie)if(ye.startsWith("data: "))try{const y=JSON.parse(ye.slice(6));y.type==="start"?R(_=>({..._,total:y.total})):y.type==="progress"?R({current:y.current,total:y.total,percent:y.percent,status:"processing",message:y.message}):y.type==="cleanup"?R(_=>({..._,status:"cleanup",message:y.message})):y.type==="complete"?(R({current:y.processed,total:y.processed,percent:100,status:y.errors>0?"error":"complete",message:y.message}),o()):y.type==="error"&&R(_=>({..._,status:"error",message:y.message}))}catch{}}}}catch(Fe){Ne.aborted?R(We=>({...We,status:"stopped",message:xe?"Removal stopped by user":"Processing stopped by user"})):(console.error("Processing error:",Fe),R({current:0,total:Y.length,percent:0,status:"error",message:xe?"Failed to remove thumbnails. Check console for details.":"Processing failed. Check console for details."}))}finally{k.current=null}},[p.actionPaths,p.processMode,o,R]),ne=M.useCallback(async()=>{const D=p.progressState.orphanedFiles;if(!(!D||D.length===0))try{const V=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:D})});if(V.ok)R(Y=>({...Y,orphanedFiles:void 0,message:Y.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const Y=await V.json();u("Delete Failed",Y.error||"Failed to delete orphaned files")}}catch(V){console.error("Delete orphans error:",V),u("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[p.progressState.orphanedFiles,o,u,R]);return{actionState:p,setActionState:g,abortController:k.current,requestDelete:L,requestMove:S,requestSync:G,requestProcess:B,setProcessMode:K,cancelAction:le,closeProgress:U,stopProcessing:X,confirmDelete:ge,confirmMove:I,confirmSync:de,confirmProcess:te,deleteOrphans:ne}}const Bg="36px",Et={container:b(Gi," display:flex;flex-direction:column;height:100%;background:",f.background,";",""),header:b("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",f.surface,";border-bottom:1px solid ",f.border,";position:relative;",""),title:b("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:b("display:flex;align-items:center;gap:6px;font-size:",F.base,";color:",f.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:b("color:",f.border,";flex-shrink:0;",""),breadcrumbItem:b("color:",f.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",f.primary,";}",""),breadcrumbCurrent:b("color:",f.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:b("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:b("height:",Bg,";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:b("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:b("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:b("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 jg({onClose:o,isVisible:s=!0,standaloneMode:h=!1,workspacePath:u,siteUrl:p}){const g=o||(()=>{}),[k,R]=M.useState("public"),[L,S]=M.useState(new Set),[G,B]=M.useState(null),[K,le]=M.useState("grid"),[U,X]=M.useState(null),[ge,I]=M.useState(null),[de,te]=M.useState(!1),[ne,D]=M.useState(0),[V,Y]=M.useState(!1),[xe,Le]=M.useState(""),[Oe,Be]=M.useState(null),[Ne,Fe]=M.useState([]),[We,_e]=M.useState(!1),A=M.useCallback(()=>{D(Te=>Te+1)},[]),j=M.useCallback(()=>{Y(!0)},[]),P=M.useCallback(()=>{Y(!1)},[]),ie=M.useCallback((Te,zt)=>{Be({title:Te,message:zt})},[]),ye=M.useCallback(()=>{Be(null)},[]),y=M.useCallback(Te=>{Te.preventDefault(),Te.stopPropagation(),_e(!0)},[]),_=M.useCallback(Te=>{Te.preventDefault(),Te.stopPropagation(),_e(!1)},[]),Q=M.useCallback(async Te=>{Te.preventDefault(),Te.stopPropagation(),_e(!1);const zt=Array.from(Te.dataTransfer.files);if(zt.length!==0&&!(k==="public/images"||k.startsWith("public/images/"))){for(const Bt of zt){const sn=new FormData;sn.append("file",Bt),sn.append("path",k);try{await fetch("/api/studio/upload",{method:"POST",body:sn})}catch(jt){console.error("Upload error:",jt)}}A()}},[k,A]),q=M.useCallback(()=>{if(k==="public")return;const Te=k.split("/");Te.pop(),R(Te.join("/")||"public"),S(new Set)},[k]),ve=M.useCallback(Te=>{R(Te),S(new Set),X(null)},[]),oe=M.useCallback(Te=>{S(zt=>{const Bt=new Set(zt);return Bt.has(Te)?Bt.delete(Te):Bt.add(Te),Bt}),B(Te)},[]),Ce=M.useCallback((Te,zt,Bt)=>{const sn=Bt.findIndex(It=>It.path===Te),jt=Bt.findIndex(It=>It.path===zt);if(sn===-1||jt===-1)return;const ll=Math.min(sn,jt),An=Math.max(sn,jt);S(It=>{const al=new Set(It);for(let wn=ll;wn<=An;wn++)al.add(Bt[wn].path);return al}),B(zt)},[]),ot=M.useCallback(Te=>{S(new Set(Te.map(zt=>zt.path)))},[]),at=M.useCallback(()=>{S(new Set)},[]),Sn=M.useCallback(Te=>{X(Te)},[]),we=Ng({triggerRefresh:A,clearSelection:at,setFocusedItem:Sn,showError:ie}),Cn=M.useCallback(Te=>{if(Te.key==="Escape"){const zt=Te.target;if(zt.tagName==="INPUT"||zt.tagName==="TEXTAREA")return;U?X(null):h||g()}},[g,U,h]);M.useEffect(()=>(s&&(document.addEventListener("keydown",Cn),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Cn),document.body.style.overflow=""}),[Cn,s]);const $l={isOpen:!0,openStudio:()=>{},closeStudio:g,toggleStudio:g,currentPath:k,setCurrentPath:ve,navigateUp:q,selectedItems:L,toggleSelection:oe,selectRange:Ce,selectAll:ot,clearSelection:at,lastSelectedPath:G,viewMode:K,setViewMode:le,focusedItem:U,setFocusedItem:X,meta:ge,setMeta:I,isLoading:de,setIsLoading:te,refreshKey:ne,triggerRefresh:A,scanRequested:V,triggerScan:j,clearScanRequest:P,searchQuery:xe,setSearchQuery:Le,error:Oe,showError:ie,clearError:ye,fileItems:Ne,setFileItems:Fe,actionState:we.actionState,requestDelete:we.requestDelete,requestMove:we.requestMove,requestSync:we.requestSync,requestProcess:we.requestProcess,setProcessMode:we.setProcessMode,confirmDelete:we.confirmDelete,confirmMove:we.confirmMove,confirmSync:we.confirmSync,confirmProcess:we.confirmProcess,cancelAction:we.cancelAction,closeProgress:we.closeProgress,stopProcessing:we.stopProcessing,abortController:we.abortController,deleteOrphans:we.deleteOrphans};return c(Ch.Provider,{value:$l,children:x("div",{css:Et.container,children:[x("div",{css:Et.header,children:[c("div",{css:Et.headerLeft,children:c("h1",{css:Et.title,children:"Studio"})}),c("div",{css:Et.headerCenter,children:c(Vg,{currentPath:k,onNavigate:ve,projectName:u?u.split("/").pop():void 0})}),x("div",{css:Et.headerActions,children:[p&&c("a",{href:p,target:"_blank",rel:"noopener noreferrer",css:Et.headerIconBtn,title:`Open ${p}`,children:c(Xg,{})}),c(Rg,{}),!h&&c("button",{css:Et.headerBtn,onClick:g,"aria-label":"Close Studio",children:c(Qg,{})})]})]}),c(tg,{}),x("div",{css:Et.content,onDragOver:y,onDragLeave:_,onDrop:Q,children:[We&&c("div",{css:Et.dropOverlay,children:x("div",{css:Et.dropMessage,children:[c("svg",{css:Et.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:Et.fileBrowser,children:K==="grid"?c(vg,{}):c(wg,{})})]}),U&&c(kg,{}),c(Hg,{}),we.actionState.showDeleteConfirm&&c(Ui,{title:"Delete Files",message:`Are you sure you want to delete ${we.actionState.actionPaths.length} item${we.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:we.confirmDelete,onCancel:we.cancelAction}),we.actionState.showSyncConfirm&&c(Ui,{title:"Push to CDN",message:`Push ${we.actionState.syncImageCount} image${we.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${we.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${we.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:we.confirmSync,onCancel:we.cancelAction}),we.actionState.showProcessConfirm&&c(Gg,{imageCount:we.actionState.actionPaths.length,mode:we.actionState.processMode,onConfirm:we.confirmProcess,onCancel:we.cancelAction}),we.actionState.showMoveModal&&c(zh,{selectedItems:new Set(we.actionState.actionPaths),currentPath:k,onMove:Te=>we.confirmMove(Te),onCancel:we.cancelAction}),we.actionState.showProgress&&c(Ws,{title:we.actionState.progressTitle,progress:we.actionState.progressState,onStop:we.stopProcessing,onDeleteOrphans:we.deleteOrphans,onClose:we.closeProgress})]})})}var qg={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},Yg={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 Gg({imageCount:o,mode:s,onConfirm:h,onCancel:u}){const p={overlay:Yg,container:b("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:b("font-size:",F.lg,";font-weight:600;color:",f.text,";margin:0 0 16px;",""),message:b("font-size:",F.base,";color:",f.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:qg,cancelBtn:b("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:b("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:b("background:",f.danger,";&:hover{background:#dc2626;}","")},g=s==="remove",k=g?"Remove Thumbnails":"Generate Thumbnails",R=g?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,L=g?"Remove":"Generate";return c("div",{css:p.overlay,onClick:u,children:x("div",{css:p.container,onClick:S=>S.stopPropagation(),children:[c("h2",{css:p.title,children:k}),c("p",{css:p.message,children:R}),x("div",{css:p.actions,children:[c("button",{css:p.cancelBtn,onClick:u,children:"Cancel"}),c("button",{css:[p.confirmBtn,g&&p.confirmBtnDanger,"",""],onClick:h,children:L})]})]})})}function Vg({currentPath:o,onNavigate:s,projectName:h}){const u=o.split("/").filter(Boolean),p=u.map((g,k)=>({name:k===0&&g==="public"&&h?h:g,path:u.slice(0,k+1).join("/")}));return c("div",{css:Et.breadcrumbs,children:p.map((g,k)=>x("span",{style:{display:"flex",alignItems:"center",gap:6},children:[k>0&&c("span",{css:Et.breadcrumbSeparator,children:"/"}),k===p.length-1?c("span",{css:Et.breadcrumbCurrent,children:g.name}):c("span",{css:Et.breadcrumbItem,onClick:()=>s(g.path),children:g.name})]},g.path))})}function Xg(){return x("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 Qg(){return x("svg",{css:Et.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 Ah=document.getElementById("root");if(!Ah)throw new Error("Root element not found");const Zg=window.__STUDIO_WORKSPACE__||"Unknown",Kg=window.__STUDIO_SITE_URL__||"";G1.createRoot(Ah).render(c(M.StrictMode,{children:c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:c(jg,{isVisible:!0,standaloneMode:!0,workspacePath:Zg,siteUrl:Kg})})}));